Commit bae1750f by 龙于生

修改审批 转派可以转派多个人

parent 42b96877
......@@ -842,7 +842,8 @@ public class SpmkController {
approvingDto.getSts(),
approvingDto.getUser(),
approvingDto.getSignatureImg(),
userBean.getEmpNum()
userBean.getEmpNum(),
approvingDto.getUserList()
);
// 更新 flowChildren
......
......@@ -9,6 +9,8 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
......@@ -40,4 +42,7 @@ public class ApprovingDto {
@ApiModelProperty(value = "签字图片 ", example = "签字图片")
private String signatureImg;
@ApiModelProperty(value = "被转派人数组 ", example = "数组")
private List<User> userList;
}
......@@ -570,7 +570,7 @@ public class RouterUtils {
* @param opinion 意见
* @param sts 状态 1执行中 2通过 3拒绝
*/
public static void approving(List<FlowChildren> listFlowChildren,Integer asId,Integer executeRecordId, Integer executorId, String opinion,Integer sts,User redeployUser,String signatureImg,Integer empNum ) throws Exception {
public static void approving(List<FlowChildren> listFlowChildren,Integer asId,Integer executeRecordId, Integer executorId, String opinion,Integer sts,User redeployUser,String signatureImg,Integer empNum,List<User> redeployUserList) throws Exception {
boolean hasNextApprover = false;
......@@ -580,7 +580,7 @@ public class RouterUtils {
// 新增 执行人
List<User> listUser = CollUtil.toList();
boolean aobl = false;
boolean aobl = false;//用于判断是 否并序审批
List<Relation> listR = listFlowChildren.get(i).getRelation();
if (CollectionUtil.isNotEmpty(listR)) {
listUser = listR.get(0).getUsers();
......@@ -642,14 +642,30 @@ public class RouterUtils {
//转派 处理
//在 原审批人 列表中 插入 一个被转派人(审批人)
}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());
if(redeployUserList.size() >0 ){
List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1);
for (User ruser:redeployUserList
) {
ruser.setExecute(UNEXECUTED);
users1.add(ruser);
n_user = listUser.size();
}
// List<User> users2 = CollectionUtil.sub(listUser, i_user+1, listUser.size());
// listUser = ListUtils.union(users1, users2);//并集
listR.get(0).setApprovalOrder("1");
}else {
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());
listUser = ListUtils.union(users1, users2);
n_user = listUser.size();
}
//
// System.out.println(users1);
// System.out.println(users2);
listUser = ListUtils.union(users1, users2);
n_user = listUser.size();
//
// System.out.println(listUser);
}
}
......@@ -674,7 +690,7 @@ public class RouterUtils {
SpmkApproveSummary.builder().id(asId).currentApprover(listUser.get(i_user).getName()).build().updateById();
// 处理了 下一个审批人 则跳出循环
break;
//break;
}
}
......
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