fix(标准解读流程): 流程完善
This commit is contained in:
+17
@@ -129,6 +129,10 @@ public class StandardInterpretCommon {
|
||||
* 标准主解读人 网关节点
|
||||
*/
|
||||
public static final String PASS_FIRST = "passFirst";
|
||||
/**
|
||||
* 标准主解读人 普通网关
|
||||
*/
|
||||
public static final String PASS = "pass";
|
||||
/**
|
||||
* 标准主解读人 未分发数量 网关节点
|
||||
*/
|
||||
@@ -148,4 +152,17 @@ public class StandardInterpretCommon {
|
||||
* 分发的数据id
|
||||
*/
|
||||
public static final String DISTRIBUTE_ID_LIST = "distributeIdList";
|
||||
|
||||
/**
|
||||
* 是否下发:1:是 2:否 0:驳回
|
||||
*/
|
||||
public static final Integer IS_DISTRIBUTE_1 = 1;
|
||||
/**
|
||||
* 是否下发:1:是 2:否 0:驳回
|
||||
*/
|
||||
public static final Integer IS_DISTRIBUTE_2 = 2;
|
||||
/**
|
||||
* 是否下发:1:是 2:否 0:驳回
|
||||
*/
|
||||
public static final Integer IS_DISTRIBUTE_0 = 0;
|
||||
}
|
||||
|
||||
+13
@@ -155,6 +155,19 @@ public class StandardInterpretFlowController {
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
|
||||
/**
|
||||
* 标准解读流程-流程加签
|
||||
* @return 结果对象
|
||||
*/
|
||||
@AutoLog(value = "标准解读流程-流程加签", operateType = CommonConstant.OPERATE_TYPE_3)
|
||||
@ApiOperation(value="标准解读流程-流程加签", notes="标准解读流程-流程加签")
|
||||
@GetMapping(value = "/flowCountersign")
|
||||
public Result<T> flowCountersign(@ApiParam("任务id") String taskId, @ApiParam("用户id") String userId,
|
||||
@ApiParam("项目id") String projectId) {
|
||||
standardInterpretFlowService.flowCountersign(taskId, userId, projectId);
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
|
||||
/**
|
||||
* 标准解读流程-导出(标准主解读人分发)
|
||||
*/
|
||||
|
||||
+9
@@ -114,4 +114,13 @@ public interface StandardInterpretFlowService {
|
||||
* @return
|
||||
*/
|
||||
ModelAndView exportExcelByUnDistribute(HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 流程加签
|
||||
*
|
||||
* @param taskId
|
||||
* @param userId
|
||||
* @param projectId
|
||||
*/
|
||||
void flowCountersign(String taskId, String userId, String projectId);
|
||||
}
|
||||
|
||||
+55
-9
@@ -249,7 +249,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
parameter.put("file_type",
|
||||
standardInterpretDTO.getProcessStandardInterpret().getDecompositionSource());
|
||||
List<Map<String, Object>> maps = documentSplitService.queryDocumentSplitDetailByList(parameter);
|
||||
if (!Objects.isNull(maps)){
|
||||
if (CollectionUtils.isNotEmpty(maps)){
|
||||
lawsDocumentSplit.setId(String.valueOf(maps.get(0).get("id")));
|
||||
}
|
||||
}else {
|
||||
@@ -375,7 +375,8 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
processStandardInterpretClauseSublistService.remove(
|
||||
new LambdaQueryWrapper<ProcessStandardInterpretClauseSublist>()
|
||||
.eq(ProcessStandardInterpretClauseSublist::getStandardInterpretClauseId,
|
||||
processStandardInterpretClauseSublist.getStandardInterpretClauseId()));
|
||||
processStandardInterpretClauseSublist.getStandardInterpretClauseId())
|
||||
.eq(ProcessStandardInterpretClauseSublist::getSnowFlake, snowflake));
|
||||
}else if (StandardInterpretCommon.MASTER_INTERPRET_SUMMARY.equals(taskDefinitionKey)){
|
||||
// 标准主解读汇总 合并条款
|
||||
ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne(
|
||||
@@ -842,6 +843,34 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
return mv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flowCountersign(String taskId, String userId, String projectId) {
|
||||
ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne(
|
||||
new LambdaQueryWrapper<ProcessStandardInterpret>()
|
||||
.eq(ProcessStandardInterpret::getProjectId, projectId));
|
||||
if (!Objects.isNull(processStandardInterpret)){
|
||||
String newCountersignPersonIds = processStandardInterpret.getCountersignPersonIds() + "," + userId;
|
||||
// 更新会签用户
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
runtimeService.setVariable(task.getExecutionId(), StandardInterpretCommon.JOINTLY_SIGN_LIST,
|
||||
Arrays.asList(newCountersignPersonIds.split(",")));
|
||||
|
||||
taskService.addCandidateUser(taskId, newCountersignPersonIds);
|
||||
// 增加会签数量
|
||||
Integer all = (Integer) taskService.getVariable(taskId, "nrOfInstances");
|
||||
taskService.setVariable(taskId, "nrOfInstances", all + 1);
|
||||
System.out.println("===================="+task);
|
||||
|
||||
List<Task> subTasks = taskService.createTaskQuery().executionId(task.getExecutionId()).list();
|
||||
|
||||
|
||||
processStandardInterpretService.update(
|
||||
new LambdaUpdateWrapper<ProcessStandardInterpret>()
|
||||
.eq(ProcessStandardInterpret::getId, processStandardInterpret.getId())
|
||||
.set(ProcessStandardInterpret::getCountersignPersonIds, newCountersignPersonIds));
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> sixthVerify(ProcessStandardInterpretClauseSublist data) {
|
||||
List<String> errorList = new ArrayList<>();
|
||||
String enterpriseStandard = data.getEnterpriseStandard();
|
||||
@@ -849,7 +878,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
LawsEnterpriseStandard lawsEnterpriseStandard =
|
||||
lawsEnterpriseStandardService.queryByStandardNumber(enterpriseStandard);
|
||||
if (Objects.isNull(lawsEnterpriseStandard)){
|
||||
errorList.add("企标标准不存在!");
|
||||
errorList.add("企业标准不存在!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1289,7 +1318,8 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
case StandardInterpretCommon.MASTER_INTERPRET_DISTRIBUTE:
|
||||
// 标准主解读人重新分发(分发)
|
||||
case StandardInterpretCommon.MASTER_INTERPRET_AGAIN_DISTRIBUTE:
|
||||
if (YesOrNoEnum.YES.getValue().equals(processStandardInterpret.getDistribute())){
|
||||
Integer passFirst = (Integer) map.get(StandardInterpretCommon.PASS_FIRST);
|
||||
if (StandardInterpretCommon.IS_DISTRIBUTE_1.equals(passFirst)){
|
||||
// 分发
|
||||
// 删除旧数据
|
||||
processStandardInterpretClauseService.removeByIds(processAllDelIds);
|
||||
@@ -1336,7 +1366,7 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
map.put(ActivitiCommon.MAIN_INSTANCE_ID,
|
||||
standardInterpretFlowDTO.getProcessAll().getProcessInstanceId());
|
||||
processStandardInterpretClauseSublistService.saveBatch(processStandardInterpretClauseSublists);
|
||||
}else {
|
||||
}else if (StandardInterpretCommon.IS_DISTRIBUTE_2.equals(passFirst)){
|
||||
// 不分发
|
||||
// 保存会签人员、审核人员、批准人员
|
||||
processStandardInterpretService.updateById(processStandardInterpret);
|
||||
@@ -1383,14 +1413,30 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
}
|
||||
}
|
||||
processStandardInterpretClauseService.saveOrUpdateBatch(newProcessStandardInterpretClauseList);
|
||||
}else {
|
||||
// 驳回
|
||||
ProcessApprovalRecord processApprovalRecord = standardInterpretFlowDTO.getProcessApprovalRecord();
|
||||
// 查询是否存在子流程
|
||||
int count = processApprovalRecordService.count(
|
||||
new LambdaQueryWrapper<ProcessApprovalRecord>()
|
||||
.eq(ProcessApprovalRecord::getProcessInstanceId,
|
||||
processApprovalRecord.getProcessInstanceId())
|
||||
.isNotNull(ProcessApprovalRecord::getParentTaskId));
|
||||
if (count > 0){
|
||||
throw new JeroBootException(ResultCommon.PROCESS_ALREADY_DISTRIBUTED);
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(processStandardInterpret.getDistribute())){
|
||||
map.put(StandardInterpretCommon.PASS_FIRST,
|
||||
Integer.parseInt(processStandardInterpret.getDistribute()));
|
||||
}
|
||||
processStandardInterpretService.updateById(processStandardInterpret);
|
||||
break;
|
||||
// 解读人填写信息(分发)
|
||||
case StandardInterpretCommon.INTERPRETING_PEOPLE_FILLOUT:
|
||||
boolean pass = (boolean) map.get(StandardInterpretCommon.PASS);
|
||||
if (pass){
|
||||
processStandardInterpretClauseSublistService
|
||||
.saveOrUpdateBatch(processStandardInterpretClauseSublistList);
|
||||
}
|
||||
break;
|
||||
// 标准主解读汇总(分发)
|
||||
case StandardInterpretCommon.MASTER_INTERPRET_SUMMARY:
|
||||
// 保存会签人员、审核人员、批准人员
|
||||
|
||||
Reference in New Issue
Block a user