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_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 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 io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,4 +36,8 @@ public class StandardInterpretFlowDTO {
|
|||||||
/**草稿信息json字符串*/
|
/**草稿信息json字符串*/
|
||||||
@ApiModelProperty(value = "草稿信息json字符串")
|
@ApiModelProperty(value = "草稿信息json字符串")
|
||||||
private String infoJsonStr;
|
private String infoJsonStr;
|
||||||
|
|
||||||
|
/**流程全局删除ids*/
|
||||||
|
@ApiModelProperty(value="流程全局删除ids")
|
||||||
|
private List<String> processAllDelIds;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -47,5 +47,8 @@ public class ProcessStandardInterpretClause extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "分解单来源(字典)")
|
@ApiModelProperty(value = "分解单来源(字典)")
|
||||||
@Dict(dicCode = "process_manuscript")
|
@Dict(dicCode = "process_manuscript")
|
||||||
private String decompositionSource;
|
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,
|
IF(lds.id is not null, null, lds2.item_content) itemContent,
|
||||||
standard_interpret_id,
|
standard_interpret_id,
|
||||||
psic.clause_id,
|
psic.clause_id,
|
||||||
interpret_person_ids
|
interpret_person_ids,
|
||||||
|
is_reject
|
||||||
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
|
||||||
|
|||||||
+3
@@ -39,6 +39,9 @@ public class ProcessStandardInterpretClauseServiceImpl
|
|||||||
// 标准主解读人分发 节点查询未分发数据
|
// 标准主解读人分发 节点查询未分发数据
|
||||||
queryWrapper.isNull("null".equals(processStandardInterpretClause.getInterpretPersonIds()),
|
queryWrapper.isNull("null".equals(processStandardInterpretClause.getInterpretPersonIds()),
|
||||||
"interpret_person_ids");
|
"interpret_person_ids");
|
||||||
|
// 标准主解读人重新分发 节点查询驳回数据
|
||||||
|
queryWrapper.eq(StringUtils.isNotBlank(processStandardInterpretClause.getIsReject()),
|
||||||
|
"is_reject", processStandardInterpretClause.getIsReject());
|
||||||
queryWrapper.orderByAsc("id");
|
queryWrapper.orderByAsc("id");
|
||||||
return processStandardInterpretClauseMapper.queryList(queryWrapper);
|
return processStandardInterpretClauseMapper.queryList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|||||||
+44
-10
@@ -200,6 +200,8 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
processNodeLinkService.saveNodeUserLink(processAll.getProcessDefinitionId(), processAll.getProcessInstanceId(),
|
processNodeLinkService.saveNodeUserLink(processAll.getProcessDefinitionId(), processAll.getProcessInstanceId(),
|
||||||
flowUtility.listToString(map));
|
flowUtility.listToString(map));
|
||||||
|
|
||||||
|
map.put(StandardInterpretCommon.PROJECT_ID, processAll.getProjectId());
|
||||||
|
|
||||||
// 完成任务
|
// 完成任务
|
||||||
taskService.complete(processAll.getTaskId(), map);
|
taskService.complete(processAll.getTaskId(), map);
|
||||||
|
|
||||||
@@ -239,8 +241,10 @@ 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 snowflake =(String) delegateTask.getVariable(StandardInterpretCommon.SNOWFLAKE);
|
||||||
ProcessAll processAlls = processAllService.getOne(new LambdaQueryWrapper<ProcessAll>()
|
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 mainInstanceId =(String) delegateTask.getVariable(ActivitiCommon.MAIN_INSTANCE_ID);
|
||||||
String masterInterpret =(String) delegateTask.getVariable(StandardInterpretCommon.MASTER_INTERPRET);
|
String masterInterpret =(String) delegateTask.getVariable(StandardInterpretCommon.MASTER_INTERPRET);
|
||||||
@@ -305,8 +309,30 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
processAll.setProjectId(processAlls.getProjectId());
|
processAll.setProjectId(processAlls.getProjectId());
|
||||||
standardInterpretFlowDTO.setProcessAll(processAll);
|
standardInterpretFlowDTO.setProcessAll(processAll);
|
||||||
standardInterpretFlowDTO.setMap(variables);
|
standardInterpretFlowDTO.setMap(variables);
|
||||||
|
ProcessApprovalRecord processApprovalRecord = new ProcessApprovalRecord();
|
||||||
|
processApprovalRecord.setParentTaskId(taskId);
|
||||||
|
// processApprovalRecord.setUserId(interpretPersonId);
|
||||||
|
processApprovalRecord.setFinishFlag(FinishFlagEnum.INCOMPLETE.getValue());
|
||||||
|
standardInterpretFlowDTO.setProcessApprovalRecord(processApprovalRecord);
|
||||||
childrenFlowStart2(standardInterpretFlowDTO);
|
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)){
|
}else if (StandardInterpretCommon.MASTER_INTERPRET_SUMMARY.equals(taskDefinitionKey)){
|
||||||
// 标准主解读汇总 合并条款
|
// 标准主解读汇总 合并条款
|
||||||
ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne(
|
ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne(
|
||||||
@@ -490,6 +516,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
if (StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE.equals(node)){
|
if (StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE.equals(node)){
|
||||||
processStandardInterpretClause.setInterpretPersonIds("null");
|
processStandardInterpretClause.setInterpretPersonIds("null");
|
||||||
}
|
}
|
||||||
|
// 标准主解读人重新分发(分发)
|
||||||
|
if (StandardInterpretCommon.MASTER_INTERPRET_AGAIN_DISTRIBUTE.equals(node)){
|
||||||
|
processStandardInterpretClause.setIsReject(YesOrNoEnum.YES.getValue());
|
||||||
|
}
|
||||||
processStandardInterpretClauseList =
|
processStandardInterpretClauseList =
|
||||||
processStandardInterpretClauseService.queryList(processStandardInterpretClause);
|
processStandardInterpretClauseService.queryList(processStandardInterpretClause);
|
||||||
}
|
}
|
||||||
@@ -1065,6 +1095,8 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
private void handleBusinessData(StandardInterpretFlowDTO standardInterpretFlowDTO) {
|
private void handleBusinessData(StandardInterpretFlowDTO standardInterpretFlowDTO) {
|
||||||
// map(参数)
|
// map(参数)
|
||||||
Map<String, Object> map = standardInterpretFlowDTO.getMap();
|
Map<String, Object> map = standardInterpretFlowDTO.getMap();
|
||||||
|
// 流程全局删除ids
|
||||||
|
List<String> processAllDelIds = standardInterpretFlowDTO.getProcessAllDelIds();
|
||||||
StandardInterpretDTO data = standardInterpretFlowDTO.getData();
|
StandardInterpretDTO data = standardInterpretFlowDTO.getData();
|
||||||
// 标准解读流程
|
// 标准解读流程
|
||||||
ProcessStandardInterpret processStandardInterpret = data.getProcessStandardInterpret();
|
ProcessStandardInterpret processStandardInterpret = data.getProcessStandardInterpret();
|
||||||
@@ -1122,18 +1154,20 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
// 标准主解读人
|
// 标准主解读人
|
||||||
map.put(StandardInterpretCommon.MASTER_INTERPRET, processStandardInterpret.getMasterInterpretId());
|
map.put(StandardInterpretCommon.MASTER_INTERPRET, processStandardInterpret.getMasterInterpretId());
|
||||||
break;
|
break;
|
||||||
// 标准主解读人分发
|
// 标准主解读人分发
|
||||||
case StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE:
|
case StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE:
|
||||||
|
// 标准主解读人重新分发(分发)
|
||||||
|
case StandardInterpretCommon.MASTER_INTERPRET_AGAIN_DISTRIBUTE:
|
||||||
if (YesOrNoEnum.YES.getValue().equals(processStandardInterpret.getIsDistribute())){
|
if (YesOrNoEnum.YES.getValue().equals(processStandardInterpret.getIsDistribute())){
|
||||||
// 分发
|
// 分发
|
||||||
// 删除旧数据
|
// 删除旧数据
|
||||||
List<String> clauseIdList2 = processStandardInterpretClauseList.stream()
|
// List<String> clauseIdList2 = processStandardInterpretClauseList.stream()
|
||||||
.map(ProcessStandardInterpretClause::getId)
|
// .map(ProcessStandardInterpretClause::getId)
|
||||||
.collect(Collectors.toList());
|
// .collect(Collectors.toList());
|
||||||
LambdaQueryWrapper<ProcessStandardInterpretClause> removeQueryWrapper2 = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<ProcessStandardInterpretClause> removeQueryWrapper2 = new LambdaQueryWrapper<>();
|
||||||
removeQueryWrapper2.notIn(ProcessStandardInterpretClause::getId, clauseIdList2);
|
// removeQueryWrapper2.notIn(ProcessStandardInterpretClause::getId, clauseIdList2);
|
||||||
removeQueryWrapper2.eq(ProcessStandardInterpretClause::getStandardInterpretId, standardInterpretId);
|
// removeQueryWrapper2.eq(ProcessStandardInterpretClause::getStandardInterpretId, standardInterpretId);
|
||||||
processStandardInterpretClauseService.remove(removeQueryWrapper2);
|
processStandardInterpretClauseService.removeByIds(processAllDelIds);
|
||||||
|
|
||||||
// 更新 标准解读流程_条款中间表
|
// 更新 标准解读流程_条款中间表
|
||||||
processStandardInterpretClauseService.saveOrUpdateBatch(processStandardInterpretClauseList);
|
processStandardInterpretClauseService.saveOrUpdateBatch(processStandardInterpretClauseList);
|
||||||
|
|||||||
Reference in New Issue
Block a user