Commit 7bc43a48 by tangzhaoqian Committed by chenzg

审批人审批bug修复

parent d83d42f7
...@@ -583,13 +583,6 @@ public class SpmkController { ...@@ -583,13 +583,6 @@ public class SpmkController {
// @BindingResultCtrol(title = "审批人审批") // @BindingResultCtrol(title = "审批人审批")
public Result<Object> approving(@CurrentUser UserBean userBean,@Validated @RequestBody ApprovingDto approvingDto) throws Exception { public Result<Object> approving(@CurrentUser UserBean userBean,@Validated @RequestBody ApprovingDto approvingDto) throws Exception {
if (spmkExecutorMapper.selectCount(new QueryWrapper<SpmkExecutor>().lambda()
.eq(SpmkExecutor::getId, approvingDto.getExecutorId())
.eq(SpmkExecutor::getEmpNum, userBean.getEmpNum())
.eq(SpmkExecutor::getSts, SpmkEnumInterface.ExecutorSts.NON_EXECUTION)) == 0) {
return ResultUtil.error("非当前审批人,无法审批!");
}
SpmkApproveDetail ad = SpmkApproveDetail.builder().build().selectOne(new QueryWrapper<SpmkApproveDetail>() SpmkApproveDetail ad = SpmkApproveDetail.builder().build().selectOne(new QueryWrapper<SpmkApproveDetail>()
.lambda() .lambda()
.select(SpmkApproveDetail::getId, .select(SpmkApproveDetail::getId,
...@@ -617,6 +610,14 @@ public class SpmkController { ...@@ -617,6 +610,14 @@ public class SpmkController {
return ResultUtil.error("您已审批过!"); return ResultUtil.error("您已审批过!");
} }
if ( spmkExecutorMapper.selectCount(new QueryWrapper<SpmkExecutor>().lambda()
.eq(SpmkExecutor::getId, approvingDto.getExecutorId())
.eq(SpmkExecutor::getEmpNum, userBean.getEmpNum())
.eq(SpmkExecutor::getSts, SpmkEnumInterface.ExecutorSts.IN_EXECUTION.ordinal())) == 0) {
return ResultUtil.error("非当前审批人,无法审批!");
}
if (aSummary.getSts() == 0) { if (aSummary.getSts() == 0) {
List<FlowChildren> listFlowChildren = ObjectUtil.deserialize(ad.getFlowChildren()); List<FlowChildren> listFlowChildren = ObjectUtil.deserialize(ad.getFlowChildren());
RouterUtils.approving( RouterUtils.approving(
...@@ -638,8 +639,9 @@ public class SpmkController { ...@@ -638,8 +639,9 @@ public class SpmkController {
aSummary = spmkApproveSummaryMapper.selectOne(new QueryWrapper<SpmkApproveSummary>().lambda() aSummary = spmkApproveSummaryMapper.selectOne(new QueryWrapper<SpmkApproveSummary>().lambda()
.select(SpmkApproveSummary::getSts,SpmkApproveSummary::getAssoType) .select(SpmkApproveSummary::getSts,SpmkApproveSummary::getAssoType)
.eq(SpmkApproveSummary::getId, approvingDto.getAsId())); .eq(SpmkApproveSummary::getId, approvingDto.getAsId()));
if (aSummary.getSts() != 3) { if (aSummary.getSts() != 3) {
SpmkApproveSummary.builder().id(approvingDto.getAsId()).endTime(new Date()).sts(2).build().updateById(); SpmkApproveSummary.builder().id(approvingDto.getAsId()).currentApprover("").endTime(new Date()).sts(2).build().updateById();
//审批完成后 业务 //审批完成后 业务
SpmkAssoBusiness sab = SpmkAssoBusinessFactory.createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType())); SpmkAssoBusiness sab = SpmkAssoBusinessFactory.createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType()));
......
...@@ -427,7 +427,7 @@ public class RouterUtils { ...@@ -427,7 +427,7 @@ public class RouterUtils {
// 0未执行 1执行中 2同意 3拒绝 4 转派 // 0未执行 1执行中 2同意 3拒绝 4 转派
if (sts == 3) { if (sts == 3) {
// 更新 审批汇总 状态 // 更新 审批汇总 状态
SpmkApproveSummary.builder().id(asId).endTime(new Date()).sts(sts).build().updateById(); SpmkApproveSummary.builder().id(asId).currentApprover("").endTime(new Date()).sts(sts).build().updateById();
SpmkApproveExecuteRecord SpmkApproveExecuteRecord
.builder() .builder()
.id(executeRecordId) .id(executeRecordId)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment