fix(标准解读流程): 完善
This commit is contained in:
+4
@@ -152,6 +152,10 @@ public class StandardInterpretCommon {
|
|||||||
* 分发的数据id
|
* 分发的数据id
|
||||||
*/
|
*/
|
||||||
public static final String DISTRIBUTE_ID_LIST = "distributeIdList";
|
public static final String DISTRIBUTE_ID_LIST = "distributeIdList";
|
||||||
|
/**
|
||||||
|
* 要分发的数据中间表子表id
|
||||||
|
*/
|
||||||
|
public static final String DISTRIBUTE_ID_SUB_LIST = "distributeIdSubList";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否下发:1:是 2:否 0:驳回
|
* 是否下发:1:是 2:否 0:驳回
|
||||||
|
|||||||
+39
-6
@@ -282,6 +282,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
String projectId = (String) delegateTask.getVariable(StandardInterpretCommon.PROJECT_ID);
|
String projectId = (String) delegateTask.getVariable(StandardInterpretCommon.PROJECT_ID);
|
||||||
String snowflake = (String) delegateTask.getVariable(StandardInterpretCommon.SNOWFLAKE);
|
String snowflake = (String) delegateTask.getVariable(StandardInterpretCommon.SNOWFLAKE);
|
||||||
String distributeIdList = (String) delegateTask.getVariable(StandardInterpretCommon.DISTRIBUTE_ID_LIST);
|
String distributeIdList = (String) delegateTask.getVariable(StandardInterpretCommon.DISTRIBUTE_ID_LIST);
|
||||||
|
String distributeIdSubList = (String) delegateTask.getVariable(StandardInterpretCommon.DISTRIBUTE_ID_SUB_LIST);
|
||||||
ProcessAll processAlls = processAllService.getOne(new LambdaQueryWrapper<ProcessAll>()
|
ProcessAll processAlls = processAllService.getOne(new LambdaQueryWrapper<ProcessAll>()
|
||||||
.eq(ProcessAll::getProjectId, projectId));
|
.eq(ProcessAll::getProjectId, projectId));
|
||||||
|
|
||||||
@@ -310,11 +311,16 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
processStandardInterpretClauseService.list(queryWrapper);
|
processStandardInterpretClauseService.list(queryWrapper);
|
||||||
for (ProcessStandardInterpretClause processStandardInterpretClause :
|
for (ProcessStandardInterpretClause processStandardInterpretClause :
|
||||||
processStandardInterpretClauseList) {
|
processStandardInterpretClauseList) {
|
||||||
|
LambdaQueryWrapper<ProcessStandardInterpretClauseSublist> queryWrapper1 =
|
||||||
|
new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper1.eq(ProcessStandardInterpretClauseSublist::getStandardInterpretClauseId,
|
||||||
|
processStandardInterpretClause.getId());
|
||||||
|
if (StringUtils.isNotBlank(distributeIdSubList)){
|
||||||
|
queryWrapper1.in(ProcessStandardInterpretClauseSublist::getId,
|
||||||
|
Arrays.asList(distributeIdSubList.split(",")));
|
||||||
|
}
|
||||||
List<ProcessStandardInterpretClauseSublist> list =
|
List<ProcessStandardInterpretClauseSublist> list =
|
||||||
processStandardInterpretClauseSublistService.list(
|
processStandardInterpretClauseSublistService.list(queryWrapper1);
|
||||||
new LambdaQueryWrapper<ProcessStandardInterpretClauseSublist>()
|
|
||||||
.eq(ProcessStandardInterpretClauseSublist::getStandardInterpretClauseId,
|
|
||||||
processStandardInterpretClause.getId()));
|
|
||||||
for (ProcessStandardInterpretClauseSublist processStandardInterpretClauseSublist : list) {
|
for (ProcessStandardInterpretClauseSublist processStandardInterpretClauseSublist : list) {
|
||||||
// 解读人
|
// 解读人
|
||||||
String interpretPersonId = processStandardInterpretClauseSublist.getInterpretPersonId();
|
String interpretPersonId = processStandardInterpretClauseSublist.getInterpretPersonId();
|
||||||
@@ -1334,8 +1340,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
int unallocatedQuantity = 0;
|
int unallocatedQuantity = 0;
|
||||||
// 子解读人
|
// 子解读人
|
||||||
List<String> interpretPersonIdList = new ArrayList<>();
|
List<String> interpretPersonIdList = new ArrayList<>();
|
||||||
// 要分发的数据id
|
// 要分发的数据中间表id
|
||||||
List<String> distributeIdList = new ArrayList<>();
|
List<String> distributeIdList = new ArrayList<>();
|
||||||
|
// 要分发的数据中间表子表id
|
||||||
|
List<String> distributeIdSubList = new ArrayList<>();
|
||||||
for (ProcessStandardInterpretClause StandardInterpretClause : processStandardInterpretClauseList) {
|
for (ProcessStandardInterpretClause StandardInterpretClause : processStandardInterpretClauseList) {
|
||||||
distributeIdList.add(StandardInterpretClause.getId());
|
distributeIdList.add(StandardInterpretClause.getId());
|
||||||
if (StringUtils.isBlank(StandardInterpretClause.getInterpretPersonIds())){
|
if (StringUtils.isBlank(StandardInterpretClause.getInterpretPersonIds())){
|
||||||
@@ -1347,11 +1355,14 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
StandardInterpretClause.getInterpretPersonIds().split(",")) {
|
StandardInterpretClause.getInterpretPersonIds().split(",")) {
|
||||||
ProcessStandardInterpretClauseSublist clauseSublist =
|
ProcessStandardInterpretClauseSublist clauseSublist =
|
||||||
new ProcessStandardInterpretClauseSublist();
|
new ProcessStandardInterpretClauseSublist();
|
||||||
|
String id = String.valueOf(SnowflakeUtils.snowflake());
|
||||||
|
clauseSublist.setId(id);
|
||||||
clauseSublist.setStandardInterpretClauseId(StandardInterpretClause.getId());
|
clauseSublist.setStandardInterpretClauseId(StandardInterpretClause.getId());
|
||||||
clauseSublist.setClauseId(StandardInterpretClause.getClauseId());
|
clauseSublist.setClauseId(StandardInterpretClause.getClauseId());
|
||||||
clauseSublist.setInterpretPersonId(interpretPersonId);
|
clauseSublist.setInterpretPersonId(interpretPersonId);
|
||||||
processStandardInterpretClauseSublists.add(clauseSublist);
|
processStandardInterpretClauseSublists.add(clauseSublist);
|
||||||
interpretPersonIdList.add(interpretPersonId);
|
interpretPersonIdList.add(interpretPersonId);
|
||||||
|
distributeIdSubList.add(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 设置未分配数量
|
// 设置未分配数量
|
||||||
@@ -1359,9 +1370,12 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
// 设置子解读人
|
// 设置子解读人
|
||||||
map.put(StandardInterpretCommon.INTERPRETING_PEOPLE,
|
map.put(StandardInterpretCommon.INTERPRETING_PEOPLE,
|
||||||
String.join(",", interpretPersonIdList));
|
String.join(",", interpretPersonIdList));
|
||||||
// 设置要分发的数据id
|
// 要分发的数据中间表id
|
||||||
map.put(StandardInterpretCommon.DISTRIBUTE_ID_LIST,
|
map.put(StandardInterpretCommon.DISTRIBUTE_ID_LIST,
|
||||||
String.join(",", distributeIdList));
|
String.join(",", distributeIdList));
|
||||||
|
// 要分发的数据中间表子表id
|
||||||
|
map.put(StandardInterpretCommon.DISTRIBUTE_ID_SUB_LIST,
|
||||||
|
String.join(",", distributeIdSubList));
|
||||||
// 设置主流程实例id
|
// 设置主流程实例id
|
||||||
map.put(ActivitiCommon.MAIN_INSTANCE_ID,
|
map.put(ActivitiCommon.MAIN_INSTANCE_ID,
|
||||||
standardInterpretFlowDTO.getProcessAll().getProcessInstanceId());
|
standardInterpretFlowDTO.getProcessAll().getProcessInstanceId());
|
||||||
@@ -1437,6 +1451,25 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
.saveOrUpdateBatch(processStandardInterpretClauseSublistList);
|
.saveOrUpdateBatch(processStandardInterpretClauseSublistList);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
// 会签(不分发)
|
||||||
|
case StandardInterpretCommon.JOINTLY_SIGN_2:
|
||||||
|
// 各涉及部门科室经理审核(不分发)
|
||||||
|
case StandardInterpretCommon.DEPARTMENT_MANAGER_APPROVE_2:
|
||||||
|
// 主控部门高级经理/法规认证技术管批准(不分发)
|
||||||
|
case StandardInterpretCommon.TECHNICAL_OFFICER_APPROVAL_2:
|
||||||
|
boolean passs = (boolean) map.get(StandardInterpretCommon.PASS);
|
||||||
|
if (passs){
|
||||||
|
processStandardInterpretClauseSublistService
|
||||||
|
.saveOrUpdateBatch(processStandardInterpretClauseSublistList);
|
||||||
|
}else {
|
||||||
|
// 驳回
|
||||||
|
// 删除 标准解读流程_条款中间表_子表 数据
|
||||||
|
// List<String> idList = processStandardInterpretClauseSublistList.stream()
|
||||||
|
// .map(ProcessStandardInterpretClauseSublist::getId)
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// processStandardInterpretClauseSublistService.removeByIds(idList);
|
||||||
|
}
|
||||||
|
break;
|
||||||
// 标准主解读汇总(分发)
|
// 标准主解读汇总(分发)
|
||||||
case StandardInterpretCommon.MASTER_INTERPRET_SUMMARY:
|
case StandardInterpretCommon.MASTER_INTERPRET_SUMMARY:
|
||||||
// 保存会签人员、审核人员、批准人员
|
// 保存会签人员、审核人员、批准人员
|
||||||
|
|||||||
Reference in New Issue
Block a user