feat(标准解读流程): 完善流程
This commit is contained in:
+5
@@ -143,4 +143,9 @@ public class StandardInterpretCommon {
|
|||||||
* 唯一标识
|
* 唯一标识
|
||||||
*/
|
*/
|
||||||
public static final String PROJECT_ID = "projectId";
|
public static final String PROJECT_ID = "projectId";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分发的数据id
|
||||||
|
*/
|
||||||
|
public static final String DISTRIBUTE_ID_LIST = "distributeIdList";
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -50,5 +50,8 @@ public class ProcessStandardInterpretClause extends BaseEntity {
|
|||||||
/**是否驳回过(1:是 0:否)*/
|
/**是否驳回过(1:是 0:否)*/
|
||||||
@ApiModelProperty(value = "是否驳回过(1:是 0:否)")
|
@ApiModelProperty(value = "是否驳回过(1:是 0:否)")
|
||||||
private String isReject;
|
private String isReject;
|
||||||
|
/**是否分发(1:是 0:否)*/
|
||||||
|
@ApiModelProperty(value = "是否分发(1:是 0:否)")
|
||||||
|
private String isDistribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -11,7 +11,8 @@
|
|||||||
standard_interpret_id,
|
standard_interpret_id,
|
||||||
psic.clause_id,
|
psic.clause_id,
|
||||||
interpret_person_ids,
|
interpret_person_ids,
|
||||||
is_reject
|
is_reject,
|
||||||
|
is_distribute
|
||||||
from laws_chery_dev.process_standard_interpret_clause psic
|
from laws_chery_dev.process_standard_interpret_clause psic
|
||||||
left join laws_domestic_standard lds on psic.clause_id = lds.id and lds.del_flag = 0
|
left join laws_domestic_standard lds on psic.clause_id = lds.id and lds.del_flag = 0
|
||||||
left join laws_document_split lds2 on psic.clause_id = lds2.id and lds2.del_flag = 0
|
left join laws_document_split lds2 on psic.clause_id = lds2.id and lds2.del_flag = 0
|
||||||
|
|||||||
+2
-2
@@ -37,8 +37,8 @@ public class ProcessStandardInterpretClauseServiceImpl
|
|||||||
queryWrapper.eq(StringUtils.isNotBlank(processStandardInterpretClause.getStandardInterpretId()),
|
queryWrapper.eq(StringUtils.isNotBlank(processStandardInterpretClause.getStandardInterpretId()),
|
||||||
"standard_interpret_id", processStandardInterpretClause.getStandardInterpretId());
|
"standard_interpret_id", processStandardInterpretClause.getStandardInterpretId());
|
||||||
// 标准主解读人分发 节点查询未分发数据
|
// 标准主解读人分发 节点查询未分发数据
|
||||||
queryWrapper.isNull("null".equals(processStandardInterpretClause.getInterpretPersonIds()),
|
queryWrapper.eq(StringUtils.isNotBlank(processStandardInterpretClause.getIsDistribute()),
|
||||||
"interpret_person_ids");
|
"is_distribute", processStandardInterpretClause.getIsDistribute());
|
||||||
// 标准主解读人重新分发 节点查询驳回数据
|
// 标准主解读人重新分发 节点查询驳回数据
|
||||||
queryWrapper.eq(StringUtils.isNotBlank(processStandardInterpretClause.getIsReject()),
|
queryWrapper.eq(StringUtils.isNotBlank(processStandardInterpretClause.getIsReject()),
|
||||||
"is_reject", processStandardInterpretClause.getIsReject());
|
"is_reject", processStandardInterpretClause.getIsReject());
|
||||||
|
|||||||
+30
-24
@@ -252,8 +252,9 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
String taskDefinitionKey = delegateTask.getTaskDefinitionKey();
|
String taskDefinitionKey = delegateTask.getTaskDefinitionKey();
|
||||||
String processInstanceId = delegateTask.getProcessInstanceId();
|
String processInstanceId = delegateTask.getProcessInstanceId();
|
||||||
|
|
||||||
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);
|
||||||
ProcessAll processAlls = processAllService.getOne(new LambdaQueryWrapper<ProcessAll>()
|
ProcessAll processAlls = processAllService.getOne(new LambdaQueryWrapper<ProcessAll>()
|
||||||
.eq(ProcessAll::getProjectId, projectId));
|
.eq(ProcessAll::getProjectId, projectId));
|
||||||
|
|
||||||
@@ -272,10 +273,14 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
.eq(ProcessStandardInterpret::getProjectId, processAlls.getProjectId()));
|
.eq(ProcessStandardInterpret::getProjectId, processAlls.getProjectId()));
|
||||||
if (!Objects.isNull(processStandardInterpret)){
|
if (!Objects.isNull(processStandardInterpret)){
|
||||||
String id = processStandardInterpret.getId();
|
String id = processStandardInterpret.getId();
|
||||||
|
LambdaQueryWrapper<ProcessStandardInterpretClause> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ProcessStandardInterpretClause::getStandardInterpretId, id);
|
||||||
|
if (StringUtils.isNotBlank(distributeIdList)){
|
||||||
|
queryWrapper.in(ProcessStandardInterpretClause::getId,
|
||||||
|
Arrays.asList(distributeIdList.split(",")));
|
||||||
|
}
|
||||||
List<ProcessStandardInterpretClause> processStandardInterpretClauseList =
|
List<ProcessStandardInterpretClause> processStandardInterpretClauseList =
|
||||||
processStandardInterpretClauseService.list(
|
processStandardInterpretClauseService.list(queryWrapper);
|
||||||
new LambdaQueryWrapper<ProcessStandardInterpretClause>()
|
|
||||||
.eq(ProcessStandardInterpretClause::getStandardInterpretId, id));
|
|
||||||
for (ProcessStandardInterpretClause processStandardInterpretClause :
|
for (ProcessStandardInterpretClause processStandardInterpretClause :
|
||||||
processStandardInterpretClauseList) {
|
processStandardInterpretClauseList) {
|
||||||
List<ProcessStandardInterpretClauseSublist> list =
|
List<ProcessStandardInterpretClauseSublist> list =
|
||||||
@@ -304,6 +309,13 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
// 发起子流程
|
// 发起子流程
|
||||||
childrenFlowStart(standardInterpretFlowDTO);
|
childrenFlowStart(standardInterpretFlowDTO);
|
||||||
|
|
||||||
|
processStandardInterpretClauseService.update(
|
||||||
|
new LambdaUpdateWrapper<ProcessStandardInterpretClause>()
|
||||||
|
.eq(ProcessStandardInterpretClause::getId,
|
||||||
|
processStandardInterpretClause.getId())
|
||||||
|
.set(ProcessStandardInterpretClause::getIsDistribute,
|
||||||
|
YesOrNoEnum.YES.getValue()));
|
||||||
|
|
||||||
processStandardInterpretClauseSublistService.update(
|
processStandardInterpretClauseSublistService.update(
|
||||||
new LambdaUpdateWrapper<ProcessStandardInterpretClauseSublist>()
|
new LambdaUpdateWrapper<ProcessStandardInterpretClauseSublist>()
|
||||||
.eq(ProcessStandardInterpretClauseSublist::getId,
|
.eq(ProcessStandardInterpretClauseSublist::getId,
|
||||||
@@ -332,11 +344,12 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
processStandardInterpretClauseSublistService.getOne(
|
processStandardInterpretClauseSublistService.getOne(
|
||||||
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,
|
.eq(ProcessStandardInterpretClause::getId,
|
||||||
processStandardInterpretClauseSublist.getStandardInterpretClauseId())
|
processStandardInterpretClauseSublist.getStandardInterpretClauseId())
|
||||||
|
.set(ProcessStandardInterpretClause::getIsReject, YesOrNoEnum.YES.getValue())
|
||||||
.set(ProcessStandardInterpretClause::getInterpretPersonIds, null));
|
.set(ProcessStandardInterpretClause::getInterpretPersonIds, null));
|
||||||
|
|
||||||
// 删除旧分发数据
|
// 删除旧分发数据
|
||||||
@@ -525,7 +538,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
processStandardInterpretClause.setStandardInterpretId(processStandardInterpret.getId());
|
processStandardInterpretClause.setStandardInterpretId(processStandardInterpret.getId());
|
||||||
// 标准主解读人分发
|
// 标准主解读人分发
|
||||||
if (StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE.equals(node)){
|
if (StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE.equals(node)){
|
||||||
processStandardInterpretClause.setInterpretPersonIds("null");
|
processStandardInterpretClause.setIsDistribute(YesOrNoEnum.NO.getValue());
|
||||||
}
|
}
|
||||||
// 标准主解读人重新分发(分发)
|
// 标准主解读人重新分发(分发)
|
||||||
if (StandardInterpretCommon.MASTER_INTERPRET_AGAIN_DISTRIBUTE.equals(node)){
|
if (StandardInterpretCommon.MASTER_INTERPRET_AGAIN_DISTRIBUTE.equals(node)){
|
||||||
@@ -1153,15 +1166,6 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
// 主控部门联络人分发
|
// 主控部门联络人分发
|
||||||
case StandardInterpretCommon.CONTACT_PERSON_DISTRIBUTE:
|
case StandardInterpretCommon.CONTACT_PERSON_DISTRIBUTE:
|
||||||
processStandardInterpretService.updateById(processStandardInterpret);
|
processStandardInterpretService.updateById(processStandardInterpret);
|
||||||
|
|
||||||
// List<String> clauseIdList = processStandardInterpretClauseList.stream()
|
|
||||||
// .map(ProcessStandardInterpretClause::getId)
|
|
||||||
// .collect(Collectors.toList());
|
|
||||||
// 删除旧数据
|
|
||||||
// LambdaQueryWrapper<ProcessStandardInterpretClause> removeQueryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
// removeQueryWrapper.notIn(ProcessStandardInterpretClause::getId, clauseIdList);
|
|
||||||
// removeQueryWrapper.eq(ProcessStandardInterpretClause::getStandardInterpretId, standardInterpretId);
|
|
||||||
// processStandardInterpretClauseService.remove(removeQueryWrapper);
|
|
||||||
processStandardInterpretClauseService.removeByIds(processAllDelIds);
|
processStandardInterpretClauseService.removeByIds(processAllDelIds);
|
||||||
|
|
||||||
// 标准主解读人
|
// 标准主解读人
|
||||||
@@ -1174,12 +1178,6 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
if (YesOrNoEnum.YES.getValue().equals(processStandardInterpret.getIsDistribute())){
|
if (YesOrNoEnum.YES.getValue().equals(processStandardInterpret.getIsDistribute())){
|
||||||
// 分发
|
// 分发
|
||||||
// 删除旧数据
|
// 删除旧数据
|
||||||
// List<String> clauseIdList2 = processStandardInterpretClauseList.stream()
|
|
||||||
// .map(ProcessStandardInterpretClause::getId)
|
|
||||||
// .collect(Collectors.toList());
|
|
||||||
// LambdaQueryWrapper<ProcessStandardInterpretClause> removeQueryWrapper2 = new LambdaQueryWrapper<>();
|
|
||||||
// removeQueryWrapper2.notIn(ProcessStandardInterpretClause::getId, clauseIdList2);
|
|
||||||
// removeQueryWrapper2.eq(ProcessStandardInterpretClause::getStandardInterpretId, standardInterpretId);
|
|
||||||
processStandardInterpretClauseService.removeByIds(processAllDelIds);
|
processStandardInterpretClauseService.removeByIds(processAllDelIds);
|
||||||
|
|
||||||
// 更新 标准解读流程_条款中间表
|
// 更新 标准解读流程_条款中间表
|
||||||
@@ -1192,13 +1190,17 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
int unallocatedQuantity = 0;
|
int unallocatedQuantity = 0;
|
||||||
// 子解读人
|
// 子解读人
|
||||||
List<String> interpretPersonIdList = new ArrayList<>();
|
List<String> interpretPersonIdList = new ArrayList<>();
|
||||||
|
// 要分发的数据id
|
||||||
|
List<String> distributeIdList = new ArrayList<>();
|
||||||
for (ProcessStandardInterpretClause StandardInterpretClause : processStandardInterpretClauseList) {
|
for (ProcessStandardInterpretClause StandardInterpretClause : processStandardInterpretClauseList) {
|
||||||
|
distributeIdList.add(StandardInterpretClause.getId());
|
||||||
if (StringUtils.isBlank(StandardInterpretClause.getInterpretPersonIds())){
|
if (StringUtils.isBlank(StandardInterpretClause.getInterpretPersonIds())){
|
||||||
++ unallocatedQuantity;
|
++ unallocatedQuantity;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String interpretPersonId : StandardInterpretClause.getInterpretPersonIds().split(",")) {
|
for (String interpretPersonId :
|
||||||
|
StandardInterpretClause.getInterpretPersonIds().split(",")) {
|
||||||
ProcessStandardInterpretClauseSublist clauseSublist =
|
ProcessStandardInterpretClauseSublist clauseSublist =
|
||||||
new ProcessStandardInterpretClauseSublist();
|
new ProcessStandardInterpretClauseSublist();
|
||||||
clauseSublist.setStandardInterpretClauseId(StandardInterpretClause.getId());
|
clauseSublist.setStandardInterpretClauseId(StandardInterpretClause.getId());
|
||||||
@@ -1213,8 +1215,12 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
// 设置子解读人
|
// 设置子解读人
|
||||||
map.put(StandardInterpretCommon.INTERPRETING_PEOPLE,
|
map.put(StandardInterpretCommon.INTERPRETING_PEOPLE,
|
||||||
String.join(",", interpretPersonIdList));
|
String.join(",", interpretPersonIdList));
|
||||||
|
// 设置要分发的数据id
|
||||||
|
map.put(StandardInterpretCommon.DISTRIBUTE_ID_LIST,
|
||||||
|
String.join(",", distributeIdList));
|
||||||
// 设置主流程实例id
|
// 设置主流程实例id
|
||||||
map.put(ActivitiCommon.MAIN_INSTANCE_ID, standardInterpretFlowDTO.getProcessAll().getProcessInstanceId());
|
map.put(ActivitiCommon.MAIN_INSTANCE_ID,
|
||||||
|
standardInterpretFlowDTO.getProcessAll().getProcessInstanceId());
|
||||||
processStandardInterpretClauseSublistService.saveBatch(processStandardInterpretClauseSublists);
|
processStandardInterpretClauseSublistService.saveBatch(processStandardInterpretClauseSublists);
|
||||||
}else {
|
}else {
|
||||||
// 保存会签人员、审核人员、批准人员
|
// 保存会签人员、审核人员、批准人员
|
||||||
|
|||||||
Reference in New Issue
Block a user