50b6f356 by 肖初晴

【DAOP-1.0】数据需求

【功能点】测试问题处理
1 parent af842054
......@@ -179,7 +179,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
public void updateDemand(FlowRQBaseVO flowBaseVO) {
DemandRQVO rqVO = (DemandRQVO) flowBaseVO;
// 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行
MfDemand oldEntity = mfDemandService.getById(rqVO.getGuid());
// MfDemand oldEntity = mfDemandService.getById(rqVO.getGuid());
beforeUpdate(rqVO);
MfDemand entity = convertToEntity(rqVO);
// 发起审批流程或保存草稿
......
......@@ -334,13 +334,16 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
public void updateEnterprise(FlowRQBaseVO flowBaseVO) {
EnterpriseRQVO rqVO = (EnterpriseRQVO) flowBaseVO;
// 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行
MfEnterprise oldEntity = mfEnterpriseService.getById(rqVO.getGuid());
// MfEnterprise oldEntity = mfEnterpriseService.getById(rqVO.getGuid());
beforeUpdate(rqVO);
MfEnterprise entity = convertToEntity(rqVO);
// 发起审批流程或保存草稿
AddApprovalDTO approvalDTO = getAddApprovalDTO(entity);
super.startOrRestartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, entity::setBizApproveState);
if(!rqVO.getIsRestart()){
if (rqVO.getIsRestart()) {
// 重新提交
againSubmitFlow(entity, rqVO, approvalDTO);
} else {
// 修改业务数据
boolean flag = mfEnterpriseService.updateById(entity);
if (!flag) {
......@@ -370,7 +373,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(String.format("重新提交%s",FUNCTION_NAME)));
}
// 发起新的流程
approvalDTO.setGuid(entity.getGuid());
approvalDTO.setBizGuid(entity.getGuid());
approvalFlowUtil.addApproval(approvalDTO);
afterSave(entity, rqVO);
}
......
......@@ -177,7 +177,10 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser
// 发起审批流程或保存草稿
AddApprovalDTO approvalDTO = getAddApprovalDTO(entity);
super.startOrRestartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, entity::setBizApproveState);
if(!rqVO.getIsRestart()){
if (rqVO.getIsRestart()) {
// 重新提交
againSubmitFlow(entity, rqVO, approvalDTO);
} else {
// 修改业务数据
boolean flag = mfServicerMaintainService.updateById(entity);
if (!flag) {
......@@ -208,7 +211,7 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser
throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(String.format("重新提交%s",FUNCTION_NAME)));
}
// 发起新的流程
approvalDTO.setGuid(entity.getGuid());
approvalDTO.setBizGuid(entity.getGuid());
approvalFlowUtil.addApproval(approvalDTO);
afterSave(entity, rqVO);
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!