fix(标准解读流程): 流程完善
This commit is contained in:
@@ -167,4 +167,7 @@ public class ResultCommon {
|
||||
public static final String ASSESS_DELETE_ERROR = "assess.delete.error";
|
||||
//项目中有评估中的数据时,不允许删除
|
||||
public static final String ASSESS_DELETE_ERROR2 = "assess.delete.error2";
|
||||
|
||||
// 流程已分发,禁止驳回
|
||||
public static final String PROCESS_ALREADY_DISTRIBUTED = "process.already.distributed";
|
||||
}
|
||||
|
||||
+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:
|
||||
// 保存会签人员、审核人员、批准人员
|
||||
|
||||
@@ -79,4 +79,6 @@ task.urging.error.2=I currently do not have the authority to urge this process
|
||||
horizontal.transgression.select=no permission at the moment please reselect
|
||||
assess.delete.error=When there is data under rectification or approval in the non compliant items, deletion is not allowed
|
||||
assess.delete.error2=When there is data under evaluation in the project, deletion is not allowed
|
||||
new.en.standard.number.conflict=The new enterprise standard number is duplicated with the existing enterprise standard number, please modify and submit it again
|
||||
new.en.standard.number.conflict=The new enterprise standard number is duplicated with the existing enterprise standard number, please modify and submit it again
|
||||
|
||||
process.already.distributed=The process has been distributed, do not reject!
|
||||
|
||||
@@ -79,4 +79,6 @@ task.urging.error.2=\u6682\u65E0\u8BE5\u6D41\u7A0B\u50AC\u529E\u6743\u9650
|
||||
horizontal.transgression.select=\u6682\u65E0\u6743\u9650\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9
|
||||
assess.delete.error=\u672A\u7B26\u5408\u9879\u4E2D\u6709\u6574\u6539\u4E2D\u3001\u5BA1\u6279\u4E2D\u7684\u6570\u636E\u65F6\uFF0C\u4E0D\u5141\u8BB8\u5220\u9664
|
||||
assess.delete.error2=\u9879\u76EE\u4E2D\u6709\u8BC4\u4F30\u4E2D\u7684\u6570\u636E\u65F6\uFF0C\u4E0D\u5141\u8BB8\u5220\u9664
|
||||
new.en.standard.number.conflict=\u8BE5\u65B0\u4F01\u6807\u7F16\u53F7\u4E0E\u5DF2\u5B58\u5728\u7684\u4F01\u6807\u7F16\u53F7\u91CD\u590D\uFF0C\u8BF7\u91CD\u65B0\u4FEE\u6539\u63D0\u4EA4
|
||||
new.en.standard.number.conflict=\u8BE5\u65B0\u4F01\u6807\u7F16\u53F7\u4E0E\u5DF2\u5B58\u5728\u7684\u4F01\u6807\u7F16\u53F7\u91CD\u590D\uFF0C\u8BF7\u91CD\u65B0\u4FEE\u6539\u63D0\u4EA4
|
||||
|
||||
process.already.distributed=\u6D41\u7A0B\u5DF2\u5206\u53D1,\u7981\u6B62\u9A73\u56DE!
|
||||
|
||||
Reference in New Issue
Block a user