Commit 56bedfd3 by 龙于生 Committed by 284718418@qq.com

修改审批bug

parent 417a7ad6
......@@ -777,10 +777,7 @@ public class SpmkController {
redisUtil.set(asId.toString(),0,500);
return ResultUtil.error("您已审批过!");
}
Integer integer = spmkExecutorMapper.selectCount(new QueryWrapper<SpmkExecutor>().lambda()
.eq(SpmkExecutor::getId, approvingDto.getExecutorId())
.eq(SpmkExecutor::getEmpNum, userBean.getEmpNum())
.eq(SpmkExecutor::getSts, ExecutorSts.IN_EXECUTION.ordinal()));
if ( spmkExecutorMapper.selectCount(new QueryWrapper<SpmkExecutor>().lambda()
.eq(SpmkExecutor::getId, approvingDto.getExecutorId())
.eq(SpmkExecutor::getEmpNum, userBean.getEmpNum())
......
......@@ -49,7 +49,7 @@ public class Relation implements Serializable{
private List<User> users;
/**
* 主管是否手签 1是 0否
* 是否手签 1是 0否
*/
private Integer signature;
......
......@@ -26,6 +26,4 @@ public class User implements Serializable{
private String headUrl;
private Integer signature;
}
......@@ -616,42 +616,47 @@ public class RouterUtils {
.build()
.updateById();
listUser.get(i_user).setExecute(EXECUTED);
}
// 历史审批人
SpmkApproveSummary.builder()
.id(asId)
.historyApprover(listUser.get(i_user).getName())
.build()
.updateById();
//拒绝处理
// 0未执行 1执行中 2同意 3拒绝 4 转派
if (sts == ExecutorSts.REFUSE.ordinal()) {
// 更新 审批汇总 状态
SpmkApproveSummary.builder().id(asId).currentApprover(CommonEnum.NULL_STR.getDesc()).endTime(new Date()).sts(sts).build().updateById();
SpmkApproveExecuteRecord
.builder()
.id(executeRecordId)
.sts(sts)
// 历史审批人
SpmkApproveSummary.builder()
.id(asId)
.historyApprover(listUser.get(i_user).getName())
.build()
// 更新 审批执行记录
.updateById();
listFlowChildren.get(i_user).setExecute(EXECUTED);
return;
//转派 处理
//在 原审批人 列表中 插入 一个被转派人(审批人)
}else if (sts == ExecutorSts.REDEPLOY.ordinal()) {
List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1);
redeployUser.setExecute(UNEXECUTED);
users1.add(redeployUser);
List<User> users2 = CollectionUtil.sub(listUser, i_user+1, listUser.size());
//拒绝处理
// 0未执行 1执行中 2同意 3拒绝 4 转派
if (sts == ExecutorSts.REFUSE.ordinal()) {
// 更新 审批汇总 状态
SpmkApproveSummary.builder().id(asId).currentApprover(CommonEnum.NULL_STR.getDesc()).endTime(new Date()).sts(sts).build().updateById();
SpmkApproveExecuteRecord
.builder()
.id(executeRecordId)
.sts(sts)
.build()
// 更新 审批执行记录
.updateById();
listFlowChildren.get(i_user).setExecute(EXECUTED);
return;
//转派 处理
//在 原审批人 列表中 插入 一个被转派人(审批人)
}else if (sts == ExecutorSts.REDEPLOY.ordinal()) {
List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1);
redeployUser.setExecute(UNEXECUTED);
users1.add(redeployUser);
List<User> users2 = CollectionUtil.sub(listUser, i_user+1, listUser.size());
// System.out.println(users1);
// System.out.println(users2);
listUser = ListUtils.union(users1, users2);
n_user = listUser.size();
listUser = ListUtils.union(users1, users2);
n_user = listUser.size();
// System.out.println(listUser);
}
}
}else if (UNEXECUTED.equals(listUser.get(i_user).getExecute())) {
SpmkExecutor.builder()
.approveExecuteRecordId(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