|
@@ -272,6 +272,12 @@ public class TaskClientImpl implements TaskClient {
|
|
|
LinkedHashMap::new,
|
|
|
Collectors.toList()));
|
|
|
|
|
|
+ //获取当前任务中所有的流程,并且去重,如果该流程已经存在,那么则不允许编辑和删除
|
|
|
+ List<Long> ids = taskService.list(new LambdaQueryWrapper<Task>()
|
|
|
+ .select(Task::getFixedFlowId)
|
|
|
+ .eq(Task::getContractId, dto.getContractId())
|
|
|
+ .isNotNull(Task::getFixedFlowId)
|
|
|
+ .groupBy(Task::getFixedFlowId)).stream().map(l -> l.getFixedFlowId()).collect(Collectors.toList());
|
|
|
List<Map<String, Object>> result = new LinkedList<>();
|
|
|
for (FixedFlow fixedFlow : fixedFlows) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
@@ -288,6 +294,7 @@ public class TaskClientImpl implements TaskClient {
|
|
|
.keySet();
|
|
|
|
|
|
map.put("id", fixedFlow.getId());
|
|
|
+ map.put("isUse", ids.contains(fixedFlow.getId()) ? 1 : 0);
|
|
|
map.put("fixedFlowName", fixedFlow.getFixedFlowName());
|
|
|
map.put("linkUserJoinString", StringUtils.join(names, ","));
|
|
|
}
|