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 DEPARTMENT_MANAGER = "departmentManager";
/** /**
* 技术官 * 技术官
*/ */
public static final String TECHNICAL_OFFICER_LIST = "technicalOfficerList";
/**
* 技术官(每人)
*/
public static final String TECHNICAL_OFFICER = "technicalOfficer"; public static final String TECHNICAL_OFFICER = "technicalOfficer";
/** /**
@@ -52,7 +52,8 @@ public class StandardInterpretFlow implements WorkCenterService {
* @param userId * @param userId
*/ */
@Override @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 processAllService = SpringContextUtil.getBean(ProcessAllService.class);
processAllService.specialTransfer(processAll, processApprovalRecord, toUserId, userId); processAllService.specialTransfer(processAll, processApprovalRecord, toUserId, userId);
// 解读人填写信息(分发) // 解读人填写信息(分发)
@@ -76,23 +77,47 @@ public class StandardInterpretFlow implements WorkCenterService {
} }
} }
/**
* 加签
* @param param
*/
@Override @Override
public void flowCountersign(DelegateTaskParam param) { public void flowCountersign(DelegateTaskParam param) {
String projectId = param.getProjectId(); String projectId = param.getProjectId();
String userId = param.getUserId(); String userId = param.getUserId();
String nodeId = param.getNodeId();
ProcessStandardInterpretService processStandardInterpretService = ProcessStandardInterpretService processStandardInterpretService =
SpringContextUtil.getBean(ProcessStandardInterpretService.class); SpringContextUtil.getBean(ProcessStandardInterpretService.class);
ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne( ProcessStandardInterpret processStandardInterpret = processStandardInterpretService.getOne(
new LambdaQueryWrapper<ProcessStandardInterpret>() new LambdaQueryWrapper<ProcessStandardInterpret>()
.eq(ProcessStandardInterpret::getProjectId, projectId)); .eq(ProcessStandardInterpret::getProjectId, projectId));
if (!Objects.isNull(processStandardInterpret)){ if (!Objects.isNull(processStandardInterpret)){
// 处理业务表 LambdaUpdateWrapper<ProcessStandardInterpret> updateWrapper = new LambdaUpdateWrapper<>();
String newCountersignPersonIds = processStandardInterpret.getCountersignPersonIds() + "," + userId; 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( processStandardInterpretService.update(updateWrapper);
new LambdaUpdateWrapper<ProcessStandardInterpret>()
.eq(ProcessStandardInterpret::getId, processStandardInterpret.getId())
.set(ProcessStandardInterpret::getCountersignPersonIds, newCountersignPersonIds));
} }
} }
} }
@@ -1474,10 +1474,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
processStandardInterpretService.updateById(processStandardInterpret); processStandardInterpretService.updateById(processStandardInterpret);
map.put(StandardInterpretCommon.JOINTLY_SIGN_LIST, map.put(StandardInterpretCommon.JOINTLY_SIGN_LIST,
Arrays.asList(processStandardInterpret.getCountersignPersonIds().split(","))); Arrays.asList(processStandardInterpret.getCountersignPersonIds().split(",")));
map.put(StandardInterpretCommon.DEPARTMENT_MANAGER, map.put(StandardInterpretCommon.DEPARTMENT_MANAGER_LIST,
processStandardInterpret.getUploader()); Arrays.asList(processStandardInterpret.getUploader().split(",")));
map.put(StandardInterpretCommon.TECHNICAL_OFFICER, map.put(StandardInterpretCommon.TECHNICAL_OFFICER_LIST,
processStandardInterpret.getApprovePersonId()); Arrays.asList(processStandardInterpret.getApprovePersonId().split(",")));
// 删除旧数据 // 删除旧数据
processStandardInterpretClauseService.removeByIds(processAllDelIds); processStandardInterpretClauseService.removeByIds(processAllDelIds);
@@ -1559,10 +1559,10 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
processStandardInterpretService.updateById(processStandardInterpret); processStandardInterpretService.updateById(processStandardInterpret);
map.put(StandardInterpretCommon.JOINTLY_SIGN_LIST, map.put(StandardInterpretCommon.JOINTLY_SIGN_LIST,
Arrays.asList(processStandardInterpret.getCountersignPersonIds().split(","))); Arrays.asList(processStandardInterpret.getCountersignPersonIds().split(",")));
map.put(StandardInterpretCommon.DEPARTMENT_MANAGER, map.put(StandardInterpretCommon.DEPARTMENT_MANAGER_LIST,
processStandardInterpret.getUploader()); Arrays.asList(processStandardInterpret.getUploader().split(",")));
map.put(StandardInterpretCommon.TECHNICAL_OFFICER, map.put(StandardInterpretCommon.TECHNICAL_OFFICER_LIST,
processStandardInterpret.getApprovePersonId()); Arrays.asList(processStandardInterpret.getApprovePersonId().split(",")));
processStandardInterpretClauseSublistService processStandardInterpretClauseSublistService
.saveOrUpdateBatch(processStandardInterpretClauseSublistList); .saveOrUpdateBatch(processStandardInterpretClauseSublistList);
break; break;
@@ -331,6 +331,8 @@ public class ProcessAllService extends ServiceImpl<ProcessAllMapper, ProcessAll>
processNodeLinkService.save(processNodeLink); processNodeLinkService.save(processNodeLink);
if (StandardInterpretCommon.JOINTLY_SIGN_LIST.equals(processNode.getVariableName()) || 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.COUNTERSIGN_USER_LIST.equals(processNode.getVariableName()) ||
ProcessStandardComplianceCheckConstants.MANAGER_LIST.equals(processNode.getVariableName()) || ProcessStandardComplianceCheckConstants.MANAGER_LIST.equals(processNode.getVariableName()) ||
ProcessStandardComplianceCheckConstants.SENIOR_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(); Object o = Class.forName(ProcessTypeEnum.getClassByValue(prcType)).newInstance();
if (o instanceof WorkCenterService){ if (o instanceof WorkCenterService){
classByValue = (WorkCenterService) o; classByValue = (WorkCenterService) o;
param.setNodeId(xmlNodeId);
classByValue.flowCountersign(param); classByValue.flowCountersign(param);
} }
}catch (Exception e) { }catch (Exception e) {
@@ -17,4 +17,6 @@ public class DelegateTaskParam {
String projectId; String projectId;
@ApiModelProperty(value = "流程类型") @ApiModelProperty(value = "流程类型")
Integer prcType; Integer prcType;
@ApiModelProperty(value = "节点id")
private String nodeId;
} }