feat(标准解读流程): 主解读人重新分发
This commit is contained in:
+9
@@ -37,6 +37,10 @@ public class StandardInterpretCommon {
|
||||
* 标准主解读人分发
|
||||
*/
|
||||
public static final String MASTER_INTERPRET_DISTRIBUTE = "master_interpret_distribute";
|
||||
/**
|
||||
* 标准主解读人重新分发(分发)
|
||||
*/
|
||||
public static final String MASTER_INTERPRET_AGAIN_DISTRIBUTE = "master_interpret_again_distribute";
|
||||
/**
|
||||
* 解读人填写信息(分发)
|
||||
*/
|
||||
@@ -134,4 +138,9 @@ public class StandardInterpretCommon {
|
||||
* 唯一标识
|
||||
*/
|
||||
public static final String SNOWFLAKE = "snowflake";
|
||||
|
||||
/**
|
||||
* 唯一标识
|
||||
*/
|
||||
public static final String PROJECT_ID = "projectId";
|
||||
}
|
||||
|
||||
+5
@@ -5,6 +5,7 @@ import com.jero.modules.activiti.entity.ProcessApprovalRecord;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -35,4 +36,8 @@ public class StandardInterpretFlowDTO {
|
||||
/**草稿信息json字符串*/
|
||||
@ApiModelProperty(value = "草稿信息json字符串")
|
||||
private String infoJsonStr;
|
||||
|
||||
/**流程全局删除ids*/
|
||||
@ApiModelProperty(value="流程全局删除ids")
|
||||
private List<String> processAllDelIds;
|
||||
}
|
||||
|
||||
+3
@@ -47,5 +47,8 @@ public class ProcessStandardInterpretClause extends BaseEntity {
|
||||
@ApiModelProperty(value = "分解单来源(字典)")
|
||||
@Dict(dicCode = "process_manuscript")
|
||||
private String decompositionSource;
|
||||
/**是否驳回过(1:是 0:否)*/
|
||||
@ApiModelProperty(value = "是否驳回过(1:是 0:否)")
|
||||
private String isReject;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -10,7 +10,8 @@
|
||||
IF(lds.id is not null, null, lds2.item_content) itemContent,
|
||||
standard_interpret_id,
|
||||
psic.clause_id,
|
||||
interpret_person_ids
|
||||
interpret_person_ids,
|
||||
is_reject
|
||||
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_document_split lds2 on psic.clause_id = lds2.id and lds2.del_flag = 0
|
||||
|
||||
+3
@@ -39,6 +39,9 @@ public class ProcessStandardInterpretClauseServiceImpl
|
||||
// 标准主解读人分发 节点查询未分发数据
|
||||
queryWrapper.isNull("null".equals(processStandardInterpretClause.getInterpretPersonIds()),
|
||||
"interpret_person_ids");
|
||||
// 标准主解读人重新分发 节点查询驳回数据
|
||||
queryWrapper.eq(StringUtils.isNotBlank(processStandardInterpretClause.getIsReject()),
|
||||
"is_reject", processStandardInterpretClause.getIsReject());
|
||||
queryWrapper.orderByAsc("id");
|
||||
return processStandardInterpretClauseMapper.queryList(queryWrapper);
|
||||
}
|
||||
|
||||
+44
-10
@@ -200,6 +200,8 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
processNodeLinkService.saveNodeUserLink(processAll.getProcessDefinitionId(), processAll.getProcessInstanceId(),
|
||||
flowUtility.listToString(map));
|
||||
|
||||
map.put(StandardInterpretCommon.PROJECT_ID, processAll.getProjectId());
|
||||
|
||||
// 完成任务
|
||||
taskService.complete(processAll.getTaskId(), map);
|
||||
|
||||
@@ -239,8 +241,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
String taskDefinitionKey = delegateTask.getTaskDefinitionKey();
|
||||
String processInstanceId = delegateTask.getProcessInstanceId();
|
||||
|
||||
String projectId =(String) delegateTask.getVariable(StandardInterpretCommon.PROJECT_ID);
|
||||
String snowflake =(String) delegateTask.getVariable(StandardInterpretCommon.SNOWFLAKE);
|
||||
ProcessAll processAlls = processAllService.getOne(new LambdaQueryWrapper<ProcessAll>()
|
||||
.eq(ProcessAll::getProcessInstanceId, processInstanceId));
|
||||
.eq(ProcessAll::getProjectId, projectId));
|
||||
|
||||
String mainInstanceId =(String) delegateTask.getVariable(ActivitiCommon.MAIN_INSTANCE_ID);
|
||||
String masterInterpret =(String) delegateTask.getVariable(StandardInterpretCommon.MASTER_INTERPRET);
|
||||
@@ -305,8 +309,30 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
processAll.setProjectId(processAlls.getProjectId());
|
||||
standardInterpretFlowDTO.setProcessAll(processAll);
|
||||
standardInterpretFlowDTO.setMap(variables);
|
||||
ProcessApprovalRecord processApprovalRecord = new ProcessApprovalRecord();
|
||||
processApprovalRecord.setParentTaskId(taskId);
|
||||
// processApprovalRecord.setUserId(interpretPersonId);
|
||||
processApprovalRecord.setFinishFlag(FinishFlagEnum.INCOMPLETE.getValue());
|
||||
standardInterpretFlowDTO.setProcessApprovalRecord(processApprovalRecord);
|
||||
childrenFlowStart2(standardInterpretFlowDTO);
|
||||
log.info("发起 标准解读流程(子解读人流程)");
|
||||
|
||||
// 处理数据
|
||||
ProcessStandardInterpretClauseSublist processStandardInterpretClauseSublist =
|
||||
processStandardInterpretClauseSublistService.getOne(
|
||||
new LambdaQueryWrapper<ProcessStandardInterpretClauseSublist>()
|
||||
.eq(ProcessStandardInterpretClauseSublist::getSnowFlake, snowflake));
|
||||
// 清除中间表解读人
|
||||
processStandardInterpretClauseService.update(
|
||||
new LambdaUpdateWrapper<ProcessStandardInterpretClause>()
|
||||
.eq(ProcessStandardInterpretClause::getId,
|
||||
processStandardInterpretClauseSublist.getStandardInterpretClauseId())
|
||||
.set(ProcessStandardInterpretClause::getInterpretPersonIds, null));
|
||||
|
||||
// 删除旧分发数据
|
||||
processStandardInterpretClauseSublistService.remove(
|
||||
new LambdaQueryWrapper<ProcessStandardInterpretClauseSublist>()
|
||||
.eq(ProcessStandardInterpretClauseSublist::getStandardInterpretClauseId,
|
||||
processStandardInterpretClauseSublist.getStandardInterpretClauseId()));
|
||||
}else if (StandardInterpretCommon.MASTER_INTERPRET_SUMMARY.equals(taskDefinitionKey)){
|
||||
// 标准主解读汇总 合并条款
|
||||
ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne(
|
||||
@@ -490,6 +516,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
if (StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE.equals(node)){
|
||||
processStandardInterpretClause.setInterpretPersonIds("null");
|
||||
}
|
||||
// 标准主解读人重新分发(分发)
|
||||
if (StandardInterpretCommon.MASTER_INTERPRET_AGAIN_DISTRIBUTE.equals(node)){
|
||||
processStandardInterpretClause.setIsReject(YesOrNoEnum.YES.getValue());
|
||||
}
|
||||
processStandardInterpretClauseList =
|
||||
processStandardInterpretClauseService.queryList(processStandardInterpretClause);
|
||||
}
|
||||
@@ -1065,6 +1095,8 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
private void handleBusinessData(StandardInterpretFlowDTO standardInterpretFlowDTO) {
|
||||
// map(参数)
|
||||
Map<String, Object> map = standardInterpretFlowDTO.getMap();
|
||||
// 流程全局删除ids
|
||||
List<String> processAllDelIds = standardInterpretFlowDTO.getProcessAllDelIds();
|
||||
StandardInterpretDTO data = standardInterpretFlowDTO.getData();
|
||||
// 标准解读流程
|
||||
ProcessStandardInterpret processStandardInterpret = data.getProcessStandardInterpret();
|
||||
@@ -1122,18 +1154,20 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
// 标准主解读人
|
||||
map.put(StandardInterpretCommon.MASTER_INTERPRET, processStandardInterpret.getMasterInterpretId());
|
||||
break;
|
||||
// 标准主解读人分发
|
||||
// 标准主解读人分发
|
||||
case StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE:
|
||||
// 标准主解读人重新分发(分发)
|
||||
case StandardInterpretCommon.MASTER_INTERPRET_AGAIN_DISTRIBUTE:
|
||||
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.remove(removeQueryWrapper2);
|
||||
// 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.saveOrUpdateBatch(processStandardInterpretClauseList);
|
||||
|
||||
Reference in New Issue
Block a user