feat: 标准入库流程提交

This commit is contained in:
super_liu
2021-06-23 16:45:19 +08:00
parent b8ec9d4082
commit 261cc9448a
3 changed files with 26 additions and 4 deletions
@@ -72,6 +72,17 @@ public class ApplyApplicantAfter implements TaskListener{
busProcessNameService.saveOrUpdate(one1);
}
QueryWrapper queryWrapper1 = new QueryWrapper();
queryWrapper1.eq("TASK_ID",delegateTask.getId());
List<BusProcessNew> list = busBean.list(queryWrapper1);
if(!list.isEmpty()){
BusProcessNew busProcessNew = list.get(0);
busProcessNew.setTaskId(delegateTask.getId());
busProcessNew.setCommitText(object.getString("commentText"));
busBean.saveOrUpdate(busProcessNew);
}
if(nextUserList != null && !nextUserList.isEmpty()){
for(String nextUser : nextUserList){
BusProcessNew busProcessNew = new BusProcessNew();
@@ -40,11 +40,11 @@ public class CountersignAfter implements TaskListener{
// JSONObject array = object.getJSONObject("hqsqForm");
if(StringUtils.isNotBlank(object.getString("jlUserId"))){
delegateTask.setVariable("managerUserId",object.getString("jlUserId"));
nextUserList.add(object.getString("jlUserId"));
if(StringUtils.isNotBlank(object.getString("applyUpdUserId"))){
delegateTask.setVariable("applyUserId",object.getString("applyUpdUserId"));
nextUserList.add(object.getString("applyUpdUserId"));
}else {
throw new ActivitiException("1#2经理人不存在,请配置相关人员");
throw new ActivitiException("1#2申请人修订用户不存在,请配置相关人员");
}
//截止时间 流程描述 创建人
@@ -71,6 +71,16 @@ public class CountersignAfter implements TaskListener{
busProcessNameService.saveOrUpdate(one1);
}
QueryWrapper queryWrapper1 = new QueryWrapper();
queryWrapper1.eq("TASK_ID",delegateTask.getId());
List<BusProcessNew> list = busBean.list(queryWrapper1);
if(!list.isEmpty()){
BusProcessNew busProcessNew = list.get(0);
busProcessNew.setTaskId(delegateTask.getId());
busProcessNew.setCommitText(object.getString("commentText"));
busBean.saveOrUpdate(busProcessNew);
}
if(nextUserList != null && !nextUserList.isEmpty()){
for(String nextUser : nextUserList){
BusProcessNew busProcessNew = new BusProcessNew();
@@ -55,6 +55,7 @@ public class SLApplicantAfter implements TaskListener{
}
// 配置多实例
delegateTask.setVariable("hqUserList",nextUserList);
delegateTask.addCandidateUsers(nextUserList);
}else {
throw new ActivitiException("1#2会签状态不存在,请配置相关状态");
}