fix(标准解读流程): 解读人分发逻辑修改
This commit is contained in:
+50
-45
@@ -348,55 +348,56 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
queryWrapper.in(ProcessStandardInterpretClause::getId,
|
queryWrapper.in(ProcessStandardInterpretClause::getId,
|
||||||
Arrays.asList(distributeIdList.split(",")));
|
Arrays.asList(distributeIdList.split(",")));
|
||||||
}
|
}
|
||||||
List<ProcessStandardInterpretClause> processStandardInterpretClauseList =
|
|
||||||
processStandardInterpretClauseService.list(queryWrapper);
|
|
||||||
for (ProcessStandardInterpretClause processStandardInterpretClause :
|
|
||||||
processStandardInterpretClauseList) {
|
|
||||||
LambdaQueryWrapper<ProcessStandardInterpretClauseSublist> queryWrapper1 =
|
LambdaQueryWrapper<ProcessStandardInterpretClauseSublist> queryWrapper1 =
|
||||||
new LambdaQueryWrapper<>();
|
new LambdaQueryWrapper<>();
|
||||||
queryWrapper1.eq(ProcessStandardInterpretClauseSublist::getStandardInterpretClauseId,
|
|
||||||
processStandardInterpretClause.getId());
|
|
||||||
if (StringUtils.isNotBlank(distributeIdSubList)){
|
if (StringUtils.isNotBlank(distributeIdSubList)){
|
||||||
queryWrapper1.in(ProcessStandardInterpretClauseSublist::getId,
|
queryWrapper1.in(ProcessStandardInterpretClauseSublist::getId,
|
||||||
Arrays.asList(distributeIdSubList.split(",")));
|
Arrays.asList(distributeIdSubList.split(",")));
|
||||||
}
|
}
|
||||||
List<ProcessStandardInterpretClauseSublist> list =
|
List<ProcessStandardInterpretClauseSublist> list =
|
||||||
processStandardInterpretClauseSublistService.list(queryWrapper1);
|
processStandardInterpretClauseSublistService.list(queryWrapper1);
|
||||||
for (ProcessStandardInterpretClauseSublist processStandardInterpretClauseSublist : list) {
|
|
||||||
// 解读人
|
|
||||||
String interpretPersonId = processStandardInterpretClauseSublist.getInterpretPersonId();
|
|
||||||
variables.put(StandardInterpretCommon.INTERPRETING_PEOPLE, interpretPersonId);
|
|
||||||
StandardInterpretFlowDTO standardInterpretFlowDTO = new StandardInterpretFlowDTO();
|
|
||||||
// 流程信息
|
|
||||||
ProcessAll processAll = new ProcessAll();
|
|
||||||
processAll.setProjectId(processAlls.getProjectId());
|
|
||||||
standardInterpretFlowDTO.setProcessAll(processAll);
|
|
||||||
ProcessApprovalRecord processApprovalRecord = new ProcessApprovalRecord();
|
|
||||||
processApprovalRecord.setParentTaskId(taskId);
|
|
||||||
processApprovalRecord.setUserId(interpretPersonId);
|
|
||||||
processApprovalRecord.setFinishFlag(FinishFlagEnum.INCOMPLETE.getValue());
|
|
||||||
standardInterpretFlowDTO.setProcessApprovalRecord(processApprovalRecord);
|
|
||||||
standardInterpretFlowDTO.setMap(variables);
|
|
||||||
// 添加唯一标识,用于数据权限
|
|
||||||
String snowFlake = String.valueOf(SnowflakeUtils.snowflake());
|
|
||||||
variables.put(StandardInterpretCommon.SNOWFLAKE, snowFlake);
|
|
||||||
// 发起子流程
|
|
||||||
childrenFlowStart(standardInterpretFlowDTO);
|
|
||||||
|
|
||||||
processStandardInterpretClauseService.update(
|
// 根据解读人分组
|
||||||
new LambdaUpdateWrapper<ProcessStandardInterpretClause>()
|
Map<String, List<ProcessStandardInterpretClauseSublist>> mapList = list.stream()
|
||||||
.eq(ProcessStandardInterpretClause::getId,
|
.collect(Collectors.groupingBy(ProcessStandardInterpretClauseSublist::getInterpretPersonId));
|
||||||
processStandardInterpretClause.getId())
|
mapList.forEach((k, v) -> {
|
||||||
.set(ProcessStandardInterpretClause::getIsDistribute,
|
|
||||||
YesOrNoEnum.YES.getValue()));
|
|
||||||
|
|
||||||
processStandardInterpretClauseSublistService.update(
|
// 解读人
|
||||||
new LambdaUpdateWrapper<ProcessStandardInterpretClauseSublist>()
|
String interpretPersonId = k;
|
||||||
.eq(ProcessStandardInterpretClauseSublist::getId,
|
variables.put(StandardInterpretCommon.INTERPRETING_PEOPLE, interpretPersonId);
|
||||||
processStandardInterpretClauseSublist.getId())
|
StandardInterpretFlowDTO standardInterpretFlowDTO = new StandardInterpretFlowDTO();
|
||||||
.set(ProcessStandardInterpretClauseSublist::getSnowFlake, snowFlake));
|
// 流程信息
|
||||||
}
|
ProcessAll processAll = new ProcessAll();
|
||||||
}
|
processAll.setProjectId(processAlls.getProjectId());
|
||||||
|
standardInterpretFlowDTO.setProcessAll(processAll);
|
||||||
|
ProcessApprovalRecord processApprovalRecord = new ProcessApprovalRecord();
|
||||||
|
processApprovalRecord.setParentTaskId(taskId);
|
||||||
|
processApprovalRecord.setUserId(interpretPersonId);
|
||||||
|
processApprovalRecord.setFinishFlag(FinishFlagEnum.INCOMPLETE.getValue());
|
||||||
|
standardInterpretFlowDTO.setProcessApprovalRecord(processApprovalRecord);
|
||||||
|
standardInterpretFlowDTO.setMap(variables);
|
||||||
|
// 添加唯一标识,用于数据权限
|
||||||
|
String snowFlake = String.valueOf(SnowflakeUtils.snowflake());
|
||||||
|
variables.put(StandardInterpretCommon.SNOWFLAKE, snowFlake);
|
||||||
|
// 发起子流程
|
||||||
|
childrenFlowStart(standardInterpretFlowDTO);
|
||||||
|
|
||||||
|
processStandardInterpretClauseService.update(
|
||||||
|
new LambdaUpdateWrapper<ProcessStandardInterpretClause>()
|
||||||
|
.in(ProcessStandardInterpretClause::getId,
|
||||||
|
v.stream().map(ProcessStandardInterpretClauseSublist
|
||||||
|
::getStandardInterpretClauseId)
|
||||||
|
.collect(Collectors.toList()))
|
||||||
|
.set(ProcessStandardInterpretClause::getIsDistribute,
|
||||||
|
YesOrNoEnum.YES.getValue()));
|
||||||
|
|
||||||
|
processStandardInterpretClauseSublistService.update(
|
||||||
|
new LambdaUpdateWrapper<ProcessStandardInterpretClauseSublist>()
|
||||||
|
.in(ProcessStandardInterpretClauseSublist::getId,
|
||||||
|
v.stream().map(ProcessStandardInterpretClauseSublist::getId)
|
||||||
|
.collect(Collectors.toList()))
|
||||||
|
.set(ProcessStandardInterpretClauseSublist::getSnowFlake, snowFlake));
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}else if (StandardInterpretCommon.AUTO_TASK_2.equals(taskDefinitionKey)){
|
}else if (StandardInterpretCommon.AUTO_TASK_2.equals(taskDefinitionKey)){
|
||||||
@@ -414,23 +415,27 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
childrenFlowStart2(standardInterpretFlowDTO);
|
childrenFlowStart2(standardInterpretFlowDTO);
|
||||||
|
|
||||||
// 处理数据
|
// 处理数据
|
||||||
ProcessStandardInterpretClauseSublist processStandardInterpretClauseSublist =
|
List<ProcessStandardInterpretClauseSublist> processStandardInterpretClauseSublistList =
|
||||||
processStandardInterpretClauseSublistService.getOne(
|
processStandardInterpretClauseSublistService.list(
|
||||||
new LambdaQueryWrapper<ProcessStandardInterpretClauseSublist>()
|
new LambdaQueryWrapper<ProcessStandardInterpretClauseSublist>()
|
||||||
.eq(ProcessStandardInterpretClauseSublist::getSnowFlake, snowflake));
|
.eq(ProcessStandardInterpretClauseSublist::getSnowFlake, snowflake));
|
||||||
// 清除中间表解读人,设置驳回标识
|
// 清除中间表解读人,设置驳回标识
|
||||||
processStandardInterpretClauseService.update(
|
processStandardInterpretClauseService.update(
|
||||||
new LambdaUpdateWrapper<ProcessStandardInterpretClause>()
|
new LambdaUpdateWrapper<ProcessStandardInterpretClause>()
|
||||||
.eq(ProcessStandardInterpretClause::getId,
|
.in(ProcessStandardInterpretClause::getId,
|
||||||
processStandardInterpretClauseSublist.getStandardInterpretClauseId())
|
processStandardInterpretClauseSublistList.stream()
|
||||||
|
.map(ProcessStandardInterpretClauseSublist::getStandardInterpretClauseId)
|
||||||
|
.collect(Collectors.toList()))
|
||||||
.set(ProcessStandardInterpretClause::getIsReject, YesOrNoEnum.YES.getValue())
|
.set(ProcessStandardInterpretClause::getIsReject, YesOrNoEnum.YES.getValue())
|
||||||
.set(ProcessStandardInterpretClause::getInterpretPersonIds, null));
|
.set(ProcessStandardInterpretClause::getInterpretPersonIds, null));
|
||||||
|
|
||||||
// 删除旧分发数据
|
// 删除旧分发数据
|
||||||
processStandardInterpretClauseSublistService.remove(
|
processStandardInterpretClauseSublistService.remove(
|
||||||
new LambdaQueryWrapper<ProcessStandardInterpretClauseSublist>()
|
new LambdaQueryWrapper<ProcessStandardInterpretClauseSublist>()
|
||||||
.eq(ProcessStandardInterpretClauseSublist::getStandardInterpretClauseId,
|
.in(ProcessStandardInterpretClauseSublist::getStandardInterpretClauseId,
|
||||||
processStandardInterpretClauseSublist.getStandardInterpretClauseId())
|
processStandardInterpretClauseSublistList.stream()
|
||||||
|
.map(ProcessStandardInterpretClauseSublist::getStandardInterpretClauseId)
|
||||||
|
.collect(Collectors.toList()))
|
||||||
.eq(ProcessStandardInterpretClauseSublist::getSnowFlake, snowflake));
|
.eq(ProcessStandardInterpretClauseSublist::getSnowFlake, snowflake));
|
||||||
}else if (StandardInterpretCommon.MASTER_INTERPRET_SUMMARY.equals(taskDefinitionKey)){
|
}else if (StandardInterpretCommon.MASTER_INTERPRET_SUMMARY.equals(taskDefinitionKey)){
|
||||||
// 标准主解读汇总 合并条款
|
// 标准主解读汇总 合并条款
|
||||||
|
|||||||
Reference in New Issue
Block a user