|
@@ -4183,7 +4183,11 @@ public class TaskController extends BladeController {
|
|
|
if (fixedFlow != null) {
|
|
|
List<FixedFlowLink> fixedFlowLinkList = jdbcTemplate.query("SELECT * FROM u_fixed_flow_link WHERE is_deleted = 0 AND fixed_flow_id = ? ORDER BY fixed_flow_branch_sort,fixed_flow_link_sort", new Object[]{fixedFlow.getId()}, new BeanPropertyRowMapper<>(FixedFlowLink.class));
|
|
|
if (fixedFlowLinkList.size() > 0) {
|
|
|
- Map<String, List<FixedFlowLink>> group = fixedFlowLinkList.stream().collect(Collectors.groupingBy(obj -> obj.getFixedFlowLink() + "@@@" + obj.getFixedFlowLinkType() + "@@@"+obj.getFlowTaskType(), LinkedHashMap::new, Collectors.toList()));
|
|
|
+ Map<String, List<FixedFlowLink>> group = fixedFlowLinkList.stream().collect(Collectors.groupingBy(
|
|
|
+ obj -> obj.getFixedFlowLink() + "@@@" + obj.getFixedFlowLinkType() + "@@@"+obj.getFlowTaskType() + "@@@"+obj.getFixedFlowLinkSort(),
|
|
|
+ LinkedHashMap::new,
|
|
|
+ Collectors.toList())
|
|
|
+ );
|
|
|
|
|
|
FixedFlowVO vo = new FixedFlowVO();
|
|
|
vo.setFixedFlowId(fixedFlow.getId());
|
|
@@ -4213,6 +4217,7 @@ public class TaskController extends BladeController {
|
|
|
}
|
|
|
|
|
|
fixedBranchVO.setUserList(userListResult);
|
|
|
+ fixedBranchVO.setUserIds(userListResult.stream().map(l->l.getUserId()+"").collect(Collectors.joining(",")));
|
|
|
fixedBranchVOList.add(fixedBranchVO);
|
|
|
}
|
|
|
|
|
@@ -4230,7 +4235,6 @@ public class TaskController extends BladeController {
|
|
|
if (ObjectUtil.isEmpty(dto.getFixedBranchList()) || dto.getFixedBranchList().size() == 0) {
|
|
|
return R.fail("请选择任务流程人员");
|
|
|
}
|
|
|
- taskClient.updateFixedFlow(dto.getFixedFlowId(), dto.getFixedName());
|
|
|
//校验是否被使用过
|
|
|
List<Task> tasks = jdbcTemplate.query("SELECT * FROM u_task WHERE contract_id = ? and is_deleted = 0 and status != 3 AND fixed_flow_id = ? ", new Object[]{dto.getContractId(), dto.getFixedFlowId()}, new BeanPropertyRowMapper<>(Task.class));
|
|
|
if (tasks.size() > 0) {
|
|
@@ -4256,8 +4260,12 @@ public class TaskController extends BladeController {
|
|
|
if(i>0){
|
|
|
userSort += Func.toLongList(dto.getFixedBranchList().get(i-1).getUserIds()).size();
|
|
|
}
|
|
|
- taskClient.updateFixedFlowLink(dto.getFixedFlowId(), fixedBranch.getName(), fixedBranch.getType(), fixedBranch.getUserIds(), dto.getProjectId(), dto.getContractId(), i+1 ,userSort,fixedBranch.getFlowTaskType());
|
|
|
+ R r = taskClient.updateFixedFlowLink(dto.getFixedFlowId(), fixedBranch.getName(), fixedBranch.getType(), fixedBranch.getUserIds(), dto.getProjectId(), dto.getContractId(), i + 1, userSort, fixedBranch.getFlowTaskType());
|
|
|
+ if (r.getCode() != 200){
|
|
|
+ throw new ServiceException("修改子流程失败:"+r.getMsg());
|
|
|
+ }
|
|
|
}
|
|
|
+ taskClient.updateFixedFlow(dto.getFixedFlowId(), dto.getFixedName());
|
|
|
return R.success("操作成功");
|
|
|
}
|
|
|
return R.fail("操作失败");
|