Commit 50fd5d6f by 龙于生

修改并序审批bug

parent a9dd1b57
......@@ -580,11 +580,12 @@ public class RouterUtils {
// 新增 执行人
List<User> listUser = CollUtil.toList();
boolean aobl = false;
List<Relation> listR = listFlowChildren.get(i).getRelation();
if (CollectionUtil.isNotEmpty(listR)) {
listUser = listR.get(0).getUsers();
if("1".equals(listR.get(0).getApprovalOrder())){
aobl = true;
for (User user:listR.get(0).getUsers()
) {
if ("1".equals(user.getExecute())){
......@@ -592,12 +593,6 @@ public class RouterUtils {
}
}
/*for (int j = 0; j < listR.get(0).getUsers().size(); j++) {
String execute = listR.get(0).getUsers().get(j).getExecute();
if("1".equals(execute)){
es++;
}
}*/
}
}
......@@ -669,6 +664,7 @@ public class RouterUtils {
hasNextApprover = true;
listUser.get(i_user).setExecute(EXECUTING);
// 当前审批人
SpmkApproveSummary.builder().id(asId).currentApprover(listUser.get(i_user).getName()).build().updateById();
......@@ -722,6 +718,40 @@ public class RouterUtils {
listFlowChildren.get(i).setExecute(EXECUTED);
break;
case AUDIT:
if(aobl){
String currentApprover = "";
for (int i_user2 = 0,n_user2 = listUser.size(); i_user2 < n_user2; i_user2++) {
SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord
.builder()
.approveSummaryId(asId)
.name(ParticipatorType.APPROVER.getName())
.type(ParticipatorType.APPROVER.ordinal())
.sts(ExecuteRecordSts.IN_EXECUTION.ordinal())
.build();
// 新增 审批执行记录
aer2.insert();
SpmkExecutor executor = SpmkExecutor.builder()
.approveExecuteRecordId(aer2.getId())
.empNum(Integer.parseInt(listUser.get(i_user2).getId()))
.executorName(listUser.get(i_user2).getName())
.operatorHeaderUrl(listUser.get(i_user2).getHeadUrl())
.sts(ExecutorSts.IN_EXECUTION.ordinal())
.build();
executor.insert();
listUser.get(i_user2).setExecute(EXECUTING);
hasNextApprover = true;
currentApprover=currentApprover!=""?currentApprover+","+listUser.get(i_user2).getName():listUser.get(i_user2).getName();
// 当前审批人
SpmkApproveSummary.builder().id(asId).currentApprover(currentApprover).build().updateById();
}
listFlowChildren.get(i).setExecute(EXECUTING);
}else{
SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord
.builder()
.approveSummaryId(asId)
......@@ -751,6 +781,8 @@ public class RouterUtils {
}
listFlowChildren.get(i).setExecute(EXECUTING);
}
break;
case COPY:
SpmkApproveExecuteRecord aer3 = SpmkApproveExecuteRecord
......
......@@ -55,7 +55,8 @@
b.opinion SpmkExecutor_opinion,
b.sts SpmkExecutor_sts,
b.create_time SpmkExecutor_create_time,
b.update_time SpmkExecutor_update_time
b.update_time SpmkExecutor_update_time,
b.signature_img SpmkExecutor_signature_img
</sql>
<sql id="Base_Column_List_Alias">
......
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