|
@ -116,7 +116,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public ResultBean cc(Map<String, Object> map,String taskDefKey) { |
|
|
public ResultBean cc(Map<String, Object> map, String taskDefKey) { |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
log.info("FlowableRest-cc:{}", JSONObject.toJSONString(map)); |
|
|
log.info("FlowableRest-cc:{}", JSONObject.toJSONString(map)); |
|
|
Object bv1 = map.get("bv"); |
|
|
Object bv1 = map.get("bv"); |
|
@ -197,12 +197,12 @@ public class FlowableRest implements FlowableFeign { |
|
|
return rb.setMsg("抄送失败,流程定义不存在!"); |
|
|
return rb.setMsg("抄送失败,流程定义不存在!"); |
|
|
} |
|
|
} |
|
|
mfq.setModuleName(process.get("NAME_")); |
|
|
mfq.setModuleName(process.get("NAME_")); |
|
|
if(processVariables.containsKey("orderNames")){ |
|
|
if (processVariables.containsKey("orderNames")) { |
|
|
mfq.setMsgTitle(processVariables.get("orderNames").toString()); |
|
|
mfq.setMsgTitle(processVariables.get("orderNames").toString()); |
|
|
}else{ |
|
|
} else { |
|
|
mfq.setMsgTitle(process.get("NAME_")); |
|
|
mfq.setMsgTitle(process.get("NAME_")); |
|
|
} |
|
|
} |
|
|
if(processVariables.containsKey("sendRecommendSid")){//增加的其他的抄送人
|
|
|
if (processVariables.containsKey("sendRecommendSid")) {//增加的其他的抄送人
|
|
|
userSids.append(processVariables.get("sendRecommendSid").toString()).append(","); |
|
|
userSids.append(processVariables.get("sendRecommendSid").toString()).append(","); |
|
|
} |
|
|
} |
|
|
userSids.deleteCharAt(userSids.length() - 1); |
|
|
userSids.deleteCharAt(userSids.length() - 1); |
|
@ -305,7 +305,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
if (!success) { |
|
|
if (!success) { |
|
|
// return rb.setMsg(nextNodeUserSidsOfCreate.getMsg());
|
|
|
// return rb.setMsg(nextNodeUserSidsOfCreate.getMsg());
|
|
|
nextNodeUserSids_ = ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId(); |
|
|
nextNodeUserSids_ = ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId(); |
|
|
}else{ |
|
|
} else { |
|
|
nextNodeUserSids_ = nextNodeUserSidsOfCreate.getData().getUserSid(); |
|
|
nextNodeUserSids_ = nextNodeUserSidsOfCreate.getData().getUserSid(); |
|
|
dto.getFormVariables().put(BusinessVariables.ORGPATH, nextNodeUserSidsOfCreate.getData().getOrgPath()); |
|
|
dto.getFormVariables().put(BusinessVariables.ORGPATH, nextNodeUserSidsOfCreate.getData().getOrgPath()); |
|
|
} |
|
|
} |
|
@ -333,11 +333,11 @@ public class FlowableRest implements FlowableFeign { |
|
|
public ResultBean<UpdateFlowFieldVo> handleProsess(BusinessVariables dto) { |
|
|
public ResultBean<UpdateFlowFieldVo> handleProsess(BusinessVariables dto) { |
|
|
ResultBean<UpdateFlowFieldVo> rb = ResultBean.fireFail(); |
|
|
ResultBean<UpdateFlowFieldVo> rb = ResultBean.fireFail(); |
|
|
ResultBean<UpdateFlowFieldVo> updateFlowFieldVoResultBean = handleProsess(dto, true); |
|
|
ResultBean<UpdateFlowFieldVo> updateFlowFieldVoResultBean = handleProsess(dto, true); |
|
|
log.info("流程返回:{}",JSONObject.toJSONString(updateFlowFieldVoResultBean)); |
|
|
log.info("流程返回:{}", JSONObject.toJSONString(updateFlowFieldVoResultBean)); |
|
|
//需要判断办结后再执行 TODO
|
|
|
//需要判断办结后再执行 TODO
|
|
|
if (updateFlowFieldVoResultBean.getSuccess()) { |
|
|
if (updateFlowFieldVoResultBean.getSuccess()) { |
|
|
log.info("流程返回:{}",JSONObject.toJSONString(updateFlowFieldVoResultBean)); |
|
|
log.info("流程返回:{}", JSONObject.toJSONString(updateFlowFieldVoResultBean)); |
|
|
if ("Event_end".equals(updateFlowFieldVoResultBean.getData().getTaskDefKey())) { |
|
|
if ("Event_end".equals(updateFlowFieldVoResultBean.getData().getTaskDefKey())) { |
|
|
try { |
|
|
try { |
|
|
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
|
|
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
|
|
.setNameFormat("demo-pool-%d").build(); |
|
|
.setNameFormat("demo-pool-%d").build(); |
|
@ -351,7 +351,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
UpdateFlowFieldVo ufVo = updateFlowFieldVoResultBean.getData(); |
|
|
UpdateFlowFieldVo ufVo = updateFlowFieldVoResultBean.getData(); |
|
|
ufVo.setTaskId(dto.getTaskId()); |
|
|
ufVo.setTaskId(dto.getTaskId()); |
|
|
map.put("uff", ufVo); |
|
|
map.put("uff", ufVo); |
|
|
cc(map,dto.getTaskDefKey()); |
|
|
cc(map, dto.getTaskDefKey()); |
|
|
}); |
|
|
}); |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
@ -389,31 +389,37 @@ public class FlowableRest implements FlowableFeign { |
|
|
boolean isChange = false; |
|
|
boolean isChange = false; |
|
|
String firstName = ""; |
|
|
String firstName = ""; |
|
|
String firstSid = ""; |
|
|
String firstSid = ""; |
|
|
|
|
|
String changeName = ""; |
|
|
if (StringUtils.isBlank(nextUserSid)) { |
|
|
if (StringUtils.isBlank(nextUserSid)) { |
|
|
ResultBean<UserAndOrgPath> nextNodeUserSidsOfSubmit = getNextNodeUserSidsOfSubmit(dto); |
|
|
ResultBean<UserAndOrgPath> nextNodeUserSidsOfSubmit = getNextNodeUserSidsOfSubmit(dto); |
|
|
if (!nextNodeUserSidsOfSubmit.getSuccess()) { |
|
|
if (!nextNodeUserSidsOfSubmit.getSuccess()) { |
|
|
// return rb.setMsg("nextUserSid 不能为空!");
|
|
|
//下一环节用户为空的情况
|
|
|
//=================================添加系统个管理员自动审批
|
|
|
|
|
|
nextUserSid = ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId(); |
|
|
nextUserSid = ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId(); |
|
|
adminContains = true; |
|
|
adminContains = true; |
|
|
}else{ |
|
|
} else { |
|
|
nextUserSid = nextNodeUserSidsOfSubmit.getData().getUserSid(); |
|
|
nextUserSid = nextNodeUserSidsOfSubmit.getData().getUserSid(); |
|
|
formVariables.put(BusinessVariables.ORGPATH, nextNodeUserSidsOfSubmit.getData().getOrgPath()); |
|
|
formVariables.put(BusinessVariables.ORGPATH, nextNodeUserSidsOfSubmit.getData().getOrgPath()); |
|
|
if(nextUserSid != null){ |
|
|
//下一环节不为空,查询下一环节用户是否有转办人
|
|
|
|
|
|
if (nextUserSid != null) { |
|
|
List<String> nextUserList = Arrays.asList(nextUserSid.split(",")); |
|
|
List<String> nextUserList = Arrays.asList(nextUserSid.split(",")); |
|
|
if(nextUserList.size() == 1){ |
|
|
if (nextUserList.size() == 1) { |
|
|
|
|
|
//下一环节用户sid
|
|
|
firstSid = nextUserList.get(0); |
|
|
firstSid = nextUserList.get(0); |
|
|
ResultBean<SysUserVo> sysUserVoResultBean = sysUserFeign.fetchBySid(firstSid); |
|
|
ResultBean<SysUserVo> sysUserVoResultBean = sysUserFeign.fetchBySid(firstSid); |
|
|
if(sysUserVoResultBean.getData() != null){ |
|
|
if (sysUserVoResultBean.getData() != null) { |
|
|
|
|
|
//下一环节用户名称
|
|
|
firstName = sysUserVoResultBean.getData().getName(); |
|
|
firstName = sysUserVoResultBean.getData().getName(); |
|
|
} |
|
|
} |
|
|
SysFlowableConfigQuery sysFlowableConfigQuery = new SysFlowableConfigQuery(); |
|
|
SysFlowableConfigQuery sysFlowableConfigQuery = new SysFlowableConfigQuery(); |
|
|
sysFlowableConfigQuery.setUserSid(firstSid); |
|
|
sysFlowableConfigQuery.setUserSid(firstSid); |
|
|
sysFlowableConfigQuery.setNowDate(new Date()); |
|
|
sysFlowableConfigQuery.setNowDate(new Date()); |
|
|
ResultBean<SysFlowableConfigVvo> sysFlowableConfigVvoResultBean = sysFlowableConfigFeign.selectByUserSid(sysFlowableConfigQuery); |
|
|
ResultBean<SysFlowableConfigVvo> sysFlowableConfigVvoResultBean = sysFlowableConfigFeign.selectByUserSid(sysFlowableConfigQuery); |
|
|
if(sysFlowableConfigVvoResultBean.getData() != null){ |
|
|
if (sysFlowableConfigVvoResultBean.getData() != null) { |
|
|
if(StringUtils.isNotBlank(sysFlowableConfigVvoResultBean.getData().getChangeUserSid())){ |
|
|
if (StringUtils.isNotBlank(sysFlowableConfigVvoResultBean.getData().getChangeUserSid())) { |
|
|
|
|
|
//转办人sid
|
|
|
nextUserSid = sysFlowableConfigVvoResultBean.getData().getChangeUserSid(); |
|
|
nextUserSid = sysFlowableConfigVvoResultBean.getData().getChangeUserSid(); |
|
|
|
|
|
//转办人名称
|
|
|
|
|
|
changeName = sysFlowableConfigVvoResultBean.getData().getChangeName(); |
|
|
isChange = true; |
|
|
isChange = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -421,8 +427,9 @@ public class FlowableRest implements FlowableFeign { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}else{ |
|
|
} else { |
|
|
if(ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId().equals(nextUserSid)){ |
|
|
//若下一环节用户与系统管理员一致,则自动审批
|
|
|
|
|
|
if (ProcDefEnum.DEFAUL_TADMIN_SID.getProDefId().equals(nextUserSid)) { |
|
|
adminContains = true; |
|
|
adminContains = true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -442,6 +449,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
if (StringUtils.isBlank(businessSid)) { |
|
|
if (StringUtils.isBlank(businessSid)) { |
|
|
return rb.setMsg("业务sid 不能为空!"); |
|
|
return rb.setMsg("业务sid 不能为空!"); |
|
|
} |
|
|
} |
|
|
|
|
|
//查询任务id为taskId的任务是否存在
|
|
|
Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); |
|
|
Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); |
|
|
if (Objects.isNull(task)) { |
|
|
if (Objects.isNull(task)) { |
|
|
return rb.setMsg("任务不存在"); |
|
|
return rb.setMsg("任务不存在"); |
|
@ -454,7 +462,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
String taskDefKey = ""; |
|
|
String taskDefKey = ""; |
|
|
vo.setSid(businessSid); |
|
|
vo.setSid(businessSid); |
|
|
|
|
|
|
|
|
if (DelegationState.PENDING.equals(task.getDelegationState())) { |
|
|
if (DelegationState.PENDING.equals(task.getDelegationState())) {//加签
|
|
|
taskService.addComment(taskId, instanceId, |
|
|
taskService.addComment(taskId, instanceId, |
|
|
FlowComment.DELEGATE.getType(), comment); |
|
|
FlowComment.DELEGATE.getType(), comment); |
|
|
taskService.resolveTask(taskId, formVariables); |
|
|
taskService.resolveTask(taskId, formVariables); |
|
@ -469,15 +477,11 @@ public class FlowableRest implements FlowableFeign { |
|
|
if (ll.getData().size() > 0) { |
|
|
if (ll.getData().size() > 0) { |
|
|
LatestTaskVo latestTaskVo = ll.getData().get(0); |
|
|
LatestTaskVo latestTaskVo = ll.getData().get(0); |
|
|
String id_ = latestTaskVo.getId_(); |
|
|
String id_ = latestTaskVo.getId_(); |
|
|
if(isChange){//添加评论
|
|
|
if (isChange) {//若下一环节用户存在转办人则添加评论
|
|
|
ResultBean<SysUserVo> sysUserVoResultBean = sysUserFeign.fetchBySid(nextUserSid); |
|
|
|
|
|
ProcessCommentDto processCommentDto = new ProcessCommentDto(); |
|
|
ProcessCommentDto processCommentDto = new ProcessCommentDto(); |
|
|
processCommentDto.setReviewerSid(firstSid); |
|
|
processCommentDto.setReviewerSid(firstSid); |
|
|
if(sysUserVoResultBean.getData() != null){ |
|
|
processCommentDto.setReviewer(firstName); |
|
|
String changeName = sysUserVoResultBean.getData().getName(); |
|
|
processCommentDto.setContent("交" + changeName + "转办"); |
|
|
processCommentDto.setReviewer(firstName); |
|
|
|
|
|
processCommentDto.setContent("交"+changeName+"转办"); |
|
|
|
|
|
} |
|
|
|
|
|
processCommentDto.setTime(new Date()); |
|
|
processCommentDto.setTime(new Date()); |
|
|
processCommentDto.setProcessId(dto.getInstanceId()); |
|
|
processCommentDto.setProcessId(dto.getInstanceId()); |
|
|
processCommentService.saveOrUpdateDto(processCommentDto); |
|
|
processCommentService.saveOrUpdateDto(processCommentDto); |
|
@ -494,7 +498,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
vo.setNodeState(FlowComment.SETTLE.getRemark()); |
|
|
vo.setNodeState(FlowComment.SETTLE.getRemark()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (adminContains) { |
|
|
if (adminContains) {//若下一环节用户与系统管理员一致,则自动审批
|
|
|
dto.setUserSid(nextUserSid); |
|
|
dto.setUserSid(nextUserSid); |
|
|
dto.setTaskId(vo.getTaskId()); |
|
|
dto.setTaskId(vo.getTaskId()); |
|
|
dto.setTaskDefKey(taskDefKey); |
|
|
dto.setTaskDefKey(taskDefKey); |
|
@ -510,13 +514,13 @@ public class FlowableRest implements FlowableFeign { |
|
|
if (taskDefKey.equals(id) && i + 1 < flowElements.size()) { |
|
|
if (taskDefKey.equals(id) && i + 1 < flowElements.size()) { |
|
|
FlowElement flowElement1 = flowElements.get(i + 1); |
|
|
FlowElement flowElement1 = flowElements.get(i + 1); |
|
|
List<SysUserVo> sysUserVoLists2 = new ArrayList<>(); |
|
|
List<SysUserVo> sysUserVoLists2 = new ArrayList<>(); |
|
|
if(i+2<flowElements.size()){ |
|
|
if (i + 2 < flowElements.size()) { |
|
|
FlowElement flowElement2 = flowElements.get(i + 2); |
|
|
FlowElement flowElement2 = flowElements.get(i + 2); |
|
|
if (flowElement2 instanceof UserTask) { |
|
|
if (flowElement2 instanceof UserTask) { |
|
|
UserTask userTask = (UserTask) flowElement2; |
|
|
UserTask userTask = (UserTask) flowElement2; |
|
|
List<String> candidateGroups = userTask.getCandidateGroups(); |
|
|
List<String> candidateGroups = userTask.getCandidateGroups(); |
|
|
//根据角色查询用户
|
|
|
//根据角色查询用户
|
|
|
for (String roleSid : candidateGroups) { |
|
|
/*for (String roleSid : candidateGroups) { |
|
|
UserQuery userQuery = new UserQuery(); |
|
|
UserQuery userQuery = new UserQuery(); |
|
|
userQuery.setRoleSid(roleSid); |
|
|
userQuery.setRoleSid(roleSid); |
|
|
userQuery.setOrgSidPath(dto.getOrgSidPath()); |
|
|
userQuery.setOrgSidPath(dto.getOrgSidPath()); |
|
@ -526,6 +530,13 @@ public class FlowableRest implements FlowableFeign { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
sysUserVoLists2.addAll(userByRole.getData()); |
|
|
sysUserVoLists2.addAll(userByRole.getData()); |
|
|
|
|
|
}*/ |
|
|
|
|
|
UserssQuery userssQuery = new UserssQuery(); |
|
|
|
|
|
userssQuery.setCandidateGroups(candidateGroups); |
|
|
|
|
|
userssQuery.setOrgSidPath(dto.getOrgSidPath()); |
|
|
|
|
|
sysUserVoLists2 = sysUserFeign.getUsersByRoles(userssQuery).getData(); |
|
|
|
|
|
if (sysUserVoLists2 == null) { |
|
|
|
|
|
sysUserVoLists2 = new ArrayList<>(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -534,7 +545,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
List<String> candidateGroups = userTask.getCandidateGroups(); |
|
|
List<String> candidateGroups = userTask.getCandidateGroups(); |
|
|
List<SysUserVo> sysUserVoLists = new ArrayList<>(); |
|
|
List<SysUserVo> sysUserVoLists = new ArrayList<>(); |
|
|
//根据角色查询用户
|
|
|
//根据角色查询用户
|
|
|
for (String roleSid : candidateGroups) { |
|
|
/* for (String roleSid : candidateGroups) { |
|
|
UserQuery userQuery = new UserQuery(); |
|
|
UserQuery userQuery = new UserQuery(); |
|
|
userQuery.setRoleSid(roleSid); |
|
|
userQuery.setRoleSid(roleSid); |
|
|
userQuery.setOrgSidPath(dto.getOrgSidPath()); |
|
|
userQuery.setOrgSidPath(dto.getOrgSidPath()); |
|
@ -544,6 +555,13 @@ public class FlowableRest implements FlowableFeign { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
sysUserVoLists.addAll(userByRole.getData()); |
|
|
sysUserVoLists.addAll(userByRole.getData()); |
|
|
|
|
|
}*/ |
|
|
|
|
|
UserssQuery userssQuery = new UserssQuery(); |
|
|
|
|
|
userssQuery.setCandidateGroups(candidateGroups); |
|
|
|
|
|
userssQuery.setOrgSidPath(dto.getOrgSidPath()); |
|
|
|
|
|
sysUserVoLists = sysUserFeign.getUsersByRoles(userssQuery).getData(); |
|
|
|
|
|
if (sysUserVoLists == null) { |
|
|
|
|
|
sysUserVoLists = new ArrayList<>(); |
|
|
} |
|
|
} |
|
|
//当前环节运营部总经理 刘丽艳 点击同意 下一环节 事业部副总经理 (nextUserSid) 和事业部总经理(sysUserVoLists.get(0).getSid())
|
|
|
//当前环节运营部总经理 刘丽艳 点击同意 下一环节 事业部副总经理 (nextUserSid) 和事业部总经理(sysUserVoLists.get(0).getSid())
|
|
|
//判断查询回来的用户的集合size是1 并且用户的sid和下一环节的用户的sid相同。
|
|
|
//判断查询回来的用户的集合size是1 并且用户的sid和下一环节的用户的sid相同。
|
|
@ -552,7 +570,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
//如果下一环节无用户,则默认系统管理员自动审批
|
|
|
//如果下一环节无用户,则默认系统管理员自动审批
|
|
|
if(sysUserVoLists.size() == 0 && sysUserVoLists2.size() == 1 && sysUserVoLists2.get(0).getSid().equals(nextUserSid)){ |
|
|
if (sysUserVoLists.size() == 0 && sysUserVoLists2.size() == 1 && sysUserVoLists2.get(0).getSid().equals(nextUserSid)) { |
|
|
contains = true; |
|
|
contains = true; |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
@ -579,6 +597,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 未添加系统管理员自动审批功能 |
|
|
* 未添加系统管理员自动审批功能 |
|
|
|
|
|
* |
|
|
* @param dto |
|
|
* @param dto |
|
|
* @param b 是否连续跳转环节 |
|
|
* @param b 是否连续跳转环节 |
|
|
* @return |
|
|
* @return |
|
@ -604,7 +623,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
ResultBean<UserAndOrgPath> nextNodeUserSidsOfSubmit = getNextNodeUserSidsOfSubmit(dto); |
|
|
ResultBean<UserAndOrgPath> nextNodeUserSidsOfSubmit = getNextNodeUserSidsOfSubmit(dto); |
|
|
if (!nextNodeUserSidsOfSubmit.getSuccess()) { |
|
|
if (!nextNodeUserSidsOfSubmit.getSuccess()) { |
|
|
return rb.setMsg("nextUserSid 不能为空!"); |
|
|
return rb.setMsg("nextUserSid 不能为空!"); |
|
|
}else{ |
|
|
} else { |
|
|
nextUserSid = nextNodeUserSidsOfSubmit.getData().getUserSid(); |
|
|
nextUserSid = nextNodeUserSidsOfSubmit.getData().getUserSid(); |
|
|
formVariables.put(BusinessVariables.ORGPATH, nextNodeUserSidsOfSubmit.getData().getOrgPath()); |
|
|
formVariables.put(BusinessVariables.ORGPATH, nextNodeUserSidsOfSubmit.getData().getOrgPath()); |
|
|
|
|
|
|
|
@ -811,8 +830,8 @@ public class FlowableRest implements FlowableFeign { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public ResultBean<Map<String,Object>> selectFlowVaributes(String taskId) { |
|
|
public ResultBean<Map<String, Object>> selectFlowVaributes(String taskId) { |
|
|
ResultBean<Map<String,Object>> rb = ResultBean.fireFail(); |
|
|
ResultBean<Map<String, Object>> rb = ResultBean.fireFail(); |
|
|
HistoricTaskInstance historicTaskInstance = historyService.createHistoricTaskInstanceQuery() |
|
|
HistoricTaskInstance historicTaskInstance = historyService.createHistoricTaskInstanceQuery() |
|
|
.includeProcessVariables().taskId(taskId).singleResult(); |
|
|
.includeProcessVariables().taskId(taskId).singleResult(); |
|
|
Map<String, Object> processVariables = historicTaskInstance.getProcessVariables(); |
|
|
Map<String, Object> processVariables = historicTaskInstance.getProcessVariables(); |
|
@ -845,12 +864,12 @@ public class FlowableRest implements FlowableFeign { |
|
|
shareUserQuery.setMemberSids(memberSidList); |
|
|
shareUserQuery.setMemberSids(memberSidList); |
|
|
//查询所勾选的人员和勾选的部门下的去重后的所有人员的用户sid
|
|
|
//查询所勾选的人员和勾选的部门下的去重后的所有人员的用户sid
|
|
|
ResultBean<List<String>> staffList = sysUserFeign.shareSelectUser(shareUserQuery); |
|
|
ResultBean<List<String>> staffList = sysUserFeign.shareSelectUser(shareUserQuery); |
|
|
if(memberSidList == null && orgSidList != null && orgSidList.size()>0){ |
|
|
if (memberSidList == null && orgSidList != null && orgSidList.size() > 0) { |
|
|
if(staffList.getData() == null || staffList.getData().size() == 0){ |
|
|
if (staffList.getData() == null || staffList.getData().size() == 0) { |
|
|
return rb.setMsg("所选部门下无分享人员"); |
|
|
return rb.setMsg("所选部门下无分享人员"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if(memberSidList == null && orgSidList == null && orgSidList.size() == 0){ |
|
|
if (memberSidList == null && orgSidList == null && orgSidList.size() == 0) { |
|
|
return rb.setMsg("请选择人员"); |
|
|
return rb.setMsg("请选择人员"); |
|
|
} |
|
|
} |
|
|
//组装分享的消息数据
|
|
|
//组装分享的消息数据
|
|
@ -878,7 +897,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
} |
|
|
} |
|
|
log.info("分享方法-historicTaskInstance:{}", JSONObject.toJSONString(historicTaskInstance)); |
|
|
log.info("分享方法-historicTaskInstance:{}", JSONObject.toJSONString(historicTaskInstance)); |
|
|
StringBuilder userSids = new StringBuilder(); |
|
|
StringBuilder userSids = new StringBuilder(); |
|
|
staffList.getData().forEach(f->{ |
|
|
staffList.getData().forEach(f -> { |
|
|
userSids.append(f).append(","); |
|
|
userSids.append(f).append(","); |
|
|
}); |
|
|
}); |
|
|
userSids.deleteCharAt(userSids.length() - 1); |
|
|
userSids.deleteCharAt(userSids.length() - 1); |
|
@ -904,9 +923,9 @@ public class FlowableRest implements FlowableFeign { |
|
|
BeanUtil.copyProperties(uff, messageFlowVo); |
|
|
BeanUtil.copyProperties(uff, messageFlowVo); |
|
|
mfq.setUfVo(messageFlowVo); |
|
|
mfq.setUfVo(messageFlowVo); |
|
|
mfq.setModuleName(process.get("NAME_")); |
|
|
mfq.setModuleName(process.get("NAME_")); |
|
|
if(processVariables.containsKey("orderNames")){ |
|
|
if (processVariables.containsKey("orderNames")) { |
|
|
mfq.setMsgTitle(processVariables.get("orderNames").toString()); |
|
|
mfq.setMsgTitle(processVariables.get("orderNames").toString()); |
|
|
}else{ |
|
|
} else { |
|
|
mfq.setMsgTitle(process.get("NAME_")); |
|
|
mfq.setMsgTitle(process.get("NAME_")); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -921,18 +940,18 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public ResultBean<FlowSelectVo> selectFlows(String proDefId, String proInsId) { |
|
|
public ResultBean<FlowSelectVo> selectFlows(String proDefId, String proInsId) { |
|
|
return flowableService.selectFlows(proDefId,proInsId); |
|
|
return flowableService.selectFlows(proDefId, proInsId); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public ResultBean<Map<String, Object>> getMap(FlowProcessMapQuery query) { |
|
|
public ResultBean<Map<String, Object>> getMap(FlowProcessMapQuery query) { |
|
|
ResultBean<Map<String,Object>> rb = ResultBean.fireFail(); |
|
|
ResultBean<Map<String, Object>> rb = ResultBean.fireFail(); |
|
|
Map<String,Object> variables = query.getVariables(); |
|
|
Map<String, Object> variables = query.getVariables(); |
|
|
String contractNo = query.getContractNo(); |
|
|
String contractNo = query.getContractNo(); |
|
|
String proDefKey = query.getProDefKey(); |
|
|
String proDefKey = query.getProDefKey(); |
|
|
Map<String, String> process = processService.getProcessDefByDefId(proDefKey); |
|
|
Map<String, String> process = processService.getProcessDefByDefId(proDefKey); |
|
|
String orderNames = contractNo+process.get("NAME_"); |
|
|
String orderNames = contractNo + process.get("NAME_"); |
|
|
variables.put("orderNames",orderNames); |
|
|
variables.put("orderNames", orderNames); |
|
|
return rb.success().setData(variables); |
|
|
return rb.success().setData(variables); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|