fix(87474): 标准解读流程 --最后两个节点缺少加签功能

This commit is contained in:
yjz
2024-07-26 10:46:07 +08:00
parent ad9cce2784
commit 2f85ff4cdd
5 changed files with 53 additions and 15 deletions
@@ -106,10 +106,18 @@ public class StandardInterpretCommon {
/**
* 部门科室经理
*/
public static final String DEPARTMENT_MANAGER_LIST = "departmentManagerList";
/**
* 部门科室经理(每人)
*/
public static final String DEPARTMENT_MANAGER = "departmentManager";
/**
* 技术官
*/
public static final String TECHNICAL_OFFICER_LIST = "technicalOfficerList";
/**
* 技术官(每人)
*/
public static final String TECHNICAL_OFFICER = "technicalOfficer";
/**
@@ -52,7 +52,8 @@ public class StandardInterpretFlow implements WorkCenterService {
* @param userId
*/
@Override
public void handleTransfer(ProcessAll processAll, ProcessApprovalRecord processApprovalRecord, String toUserId, String userId) {
public void handleTransfer(ProcessAll processAll, ProcessApprovalRecord processApprovalRecord,
String toUserId, String userId) {
ProcessAllService processAllService = SpringContextUtil.getBean(ProcessAllService.class);
processAllService.specialTransfer(processAll, processApprovalRecord, toUserId, userId);
// 解读人填写信息(分发)
@@ -76,23 +77,47 @@ public class StandardInterpretFlow implements WorkCenterService {
}
}
/**
* 加签
* @param param
*/
@Override
public void flowCountersign(DelegateTaskParam param) {
String projectId = param.getProjectId();
String userId = param.getUserId();
String nodeId = param.getNodeId();
ProcessStandardInterpretService processStandardInterpretService =
SpringContextUtil.getBean(ProcessStandardInterpretService.class);
ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne(
new LambdaQueryWrapper<ProcessStandardInterpret>()
.eq(ProcessStandardInterpret::getProjectId, projectId));
if (!Objects.isNull(processStandardInterpret)){
// 处理业务表
String newCountersignPersonIds = processStandardInterpret.getCountersignPersonIds() + "," + userId;
LambdaUpdateWrapper<ProcessStandardInterpret> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(ProcessStandardInterpret::getId, processStandardInterpret.getId());
switch (nodeId){
case StandardInterpretCommon.JOINTLY_SIGN_1:
case StandardInterpretCommon.JOINTLY_SIGN_2:
String newCountersignPersonIds = processStandardInterpret.getCountersignPersonIds() + "," + userId;
updateWrapper.set(ProcessStandardInterpret::getCountersignPersonIds, newCountersignPersonIds);
break;
case StandardInterpretCommon.DEPARTMENT_MANAGER_APPROVE_1:
case StandardInterpretCommon.DEPARTMENT_MANAGER_APPROVE_2:
String newUploader = processStandardInterpret.getUploader() + "," + userId;
updateWrapper.set(ProcessStandardInterpret::getUploader, newUploader);
break;
case StandardInterpretCommon.TECHNICAL_OFFICER_APPROVAL_1:
case StandardInterpretCommon.TECHNICAL_OFFICER_APPROVAL_2:
String newApprovePersonId = processStandardInterpret.getApprovePersonId() + "," + userId;
updateWrapper.set(ProcessStandardInterpret::getApprovePersonId, newApprovePersonId);
break;
default:
return;
}
// 更新会签人员信息
processStandardInterpretService.update(
new LambdaUpdateWrapper<ProcessStandardInterpret>()
.eq(ProcessStandardInterpret::getId, processStandardInterpret.getId())
.set(ProcessStandardInterpret::getCountersignPersonIds, newCountersignPersonIds));
processStandardInterpretService.update(updateWrapper);
}
}
}
@@ -1474,10 +1474,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
processStandardInterpretService.updateById(processStandardInterpret);
map.put(StandardInterpretCommon.JOINTLY_SIGN_LIST,
Arrays.asList(processStandardInterpret.getCountersignPersonIds().split(",")));
map.put(StandardInterpretCommon.DEPARTMENT_MANAGER,
processStandardInterpret.getUploader());
map.put(StandardInterpretCommon.TECHNICAL_OFFICER,
processStandardInterpret.getApprovePersonId());
map.put(StandardInterpretCommon.DEPARTMENT_MANAGER_LIST,
Arrays.asList(processStandardInterpret.getUploader().split(",")));
map.put(StandardInterpretCommon.TECHNICAL_OFFICER_LIST,
Arrays.asList(processStandardInterpret.getApprovePersonId().split(",")));
// 删除旧数据
processStandardInterpretClauseService.removeByIds(processAllDelIds);
@@ -1559,10 +1559,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
processStandardInterpretService.updateById(processStandardInterpret);
map.put(StandardInterpretCommon.JOINTLY_SIGN_LIST,
Arrays.asList(processStandardInterpret.getCountersignPersonIds().split(",")));
map.put(StandardInterpretCommon.DEPARTMENT_MANAGER,
processStandardInterpret.getUploader());
map.put(StandardInterpretCommon.TECHNICAL_OFFICER,
processStandardInterpret.getApprovePersonId());
map.put(StandardInterpretCommon.DEPARTMENT_MANAGER_LIST,
Arrays.asList(processStandardInterpret.getUploader().split(",")));
map.put(StandardInterpretCommon.TECHNICAL_OFFICER_LIST,
Arrays.asList(processStandardInterpret.getApprovePersonId().split(",")));
processStandardInterpretClauseSublistService
.saveOrUpdateBatch(processStandardInterpretClauseSublistList);
break;
@@ -331,6 +331,8 @@ public class ProcessAllService extends ServiceImpl<ProcessAllMapper, ProcessAll>
processNodeLinkService.save(processNodeLink);
if (StandardInterpretCommon.JOINTLY_SIGN_LIST.equals(processNode.getVariableName()) ||
StandardInterpretCommon.DEPARTMENT_MANAGER_LIST.equals(processNode.getVariableName()) ||
StandardInterpretCommon.TECHNICAL_OFFICER_LIST.equals(processNode.getVariableName()) ||
ProcessStandardComplianceCheckConstants.COUNTERSIGN_USER_LIST.equals(processNode.getVariableName()) ||
ProcessStandardComplianceCheckConstants.MANAGER_LIST.equals(processNode.getVariableName()) ||
ProcessStandardComplianceCheckConstants.SENIOR_MANAGER_LIST.equals(processNode.getVariableName())){
@@ -346,6 +348,7 @@ public class ProcessAllService extends ServiceImpl<ProcessAllMapper, ProcessAll>
Object o = Class.forName(ProcessTypeEnum.getClassByValue(prcType)).newInstance();
if (o instanceof WorkCenterService){
classByValue = (WorkCenterService) o;
param.setNodeId(xmlNodeId);
classByValue.flowCountersign(param);
}
}catch (Exception e) {
@@ -17,4 +17,6 @@ public class DelegateTaskParam {
String projectId;
@ApiModelProperty(value = "流程类型")
Integer prcType;
@ApiModelProperty(value = "节点id")
private String nodeId;
}