【DAOP-1.0】数据需求
【功能点】测试问题处理
Showing
3 changed files
with
21 additions
and
109 deletions
| ... | @@ -184,44 +184,14 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -184,44 +184,14 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
| 184 | MfDemand entity = convertToEntity(rqVO); | 184 | MfDemand entity = convertToEntity(rqVO); |
| 185 | // 发起审批流程或保存草稿 | 185 | // 发起审批流程或保存草稿 |
| 186 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); | 186 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); |
| 187 | super.restartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, null, oldEntity::setBizApproveState); | 187 | super.restartWorkFlow(rqVO, oldEntity.getBizApproveState(), approvalDTO, this::saveDemand, entity::setBizApproveState); |
| 188 | if (rqVO.getIsRestart()) { | 188 | // 修改业务数据 |
| 189 | // 重新提交 | 189 | boolean flag = mfDemandService.updateById(entity); |
| 190 | againSubmitFlow(entity, rqVO, approvalDTO); | ||
| 191 | } else { | ||
| 192 | // 修改业务数据 | ||
| 193 | boolean flag = mfDemandService.updateById(entity); | ||
| 194 | if (!flag) { | ||
| 195 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, rqVO.getImmediateApprove() ? | ||
| 196 | messageSourceUtil.submitMessage(FUNCTION_NAME) : messageSourceUtil.updateMessage(FUNCTION_NAME)); | ||
| 197 | } | ||
| 198 | afterUpdate(entity, rqVO); | ||
| 199 | } | ||
| 200 | } | ||
| 201 | |||
| 202 | /** | ||
| 203 | * 重新提交数据需求 | ||
| 204 | * @author xcq | ||
| 205 | * @date 2024-12-31 18:46 | ||
| 206 | * @param entity | ||
| 207 | * @param rqVO | ||
| 208 | * @param approvalDTO | ||
| 209 | * @return void | ||
| 210 | */ | ||
| 211 | private void againSubmitFlow(MfDemand entity, DemandRQVO rqVO, AddApprovalDTO approvalDTO) { | ||
| 212 | // 重新提交的数据重置相关字段 | ||
| 213 | entity.setGuid(CommonUtil.newGuid()); | ||
| 214 | mfDemandService.csbrBaseEntity(entity); | ||
| 215 | // 保存新数据 | ||
| 216 | boolean flag = mfDemandService.save(entity); | ||
| 217 | if (!flag) { | 190 | if (!flag) { |
| 218 | throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(String.format("重新提交%s",FUNCTION_NAME))); | 191 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, rqVO.getImmediateApprove() ? |
| 192 | messageSourceUtil.submitMessage(FUNCTION_NAME) : messageSourceUtil.updateMessage(FUNCTION_NAME)); | ||
| 219 | } | 193 | } |
| 220 | // 发起新的流程 | 194 | afterUpdate(entity, rqVO); |
| 221 | approvalDTO.setGuid(entity.getGuid()); | ||
| 222 | approvalDTO.setBizGuid(entity.getGuid()); | ||
| 223 | approvalFlowUtil.addApproval(approvalDTO); | ||
| 224 | afterSave(entity, rqVO); | ||
| 225 | } | 195 | } |
| 226 | 196 | ||
| 227 | /** | 197 | /** | ... | ... |
| ... | @@ -318,48 +318,19 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -318,48 +318,19 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
| 318 | public void updateEnterprise(FlowRQBaseVO flowBaseVO) { | 318 | public void updateEnterprise(FlowRQBaseVO flowBaseVO) { |
| 319 | EnterpriseRQVO rqVO = (EnterpriseRQVO) flowBaseVO; | 319 | EnterpriseRQVO rqVO = (EnterpriseRQVO) flowBaseVO; |
| 320 | // 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行 | 320 | // 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行 |
| 321 | // MfEnterprise oldEntity = mfEnterpriseService.getById(rqVO.getGuid()); | 321 | MfEnterprise oldEntity = mfEnterpriseService.getById(rqVO.getGuid()); |
| 322 | beforeUpdate(rqVO); | 322 | beforeUpdate(rqVO); |
| 323 | MfEnterprise entity = convertToEntity(rqVO); | 323 | MfEnterprise entity = convertToEntity(rqVO); |
| 324 | // 发起审批流程或保存草稿 | 324 | // 发起审批流程或保存草稿 |
| 325 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); | 325 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); |
| 326 | super.restartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO,null, entity::setBizApproveState); | 326 | super.restartWorkFlow(rqVO, oldEntity.getBizApproveState(), approvalDTO, this::saveEnterprise, entity::setBizApproveState); |
| 327 | if (rqVO.getIsRestart()) { | 327 | // 修改业务数据 |
| 328 | // 重新提交 | 328 | boolean flag = mfEnterpriseService.updateById(entity); |
| 329 | againSubmitFlow(entity, rqVO, approvalDTO); | ||
| 330 | } else { | ||
| 331 | // 修改业务数据 | ||
| 332 | boolean flag = mfEnterpriseService.updateById(entity); | ||
| 333 | if (!flag) { | ||
| 334 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, rqVO.getImmediateApprove() ? | ||
| 335 | messageSourceUtil.submitMessage(FUNCTION_NAME) : messageSourceUtil.updateMessage(FUNCTION_NAME)); | ||
| 336 | } | ||
| 337 | afterUpdate(entity, rqVO); | ||
| 338 | } | ||
| 339 | } | ||
| 340 | |||
| 341 | /** | ||
| 342 | * 重新提交企业信息 | ||
| 343 | * @author xcq | ||
| 344 | * @date 2024-12-26 16:18 | ||
| 345 | * @param entity | ||
| 346 | * @param rqVO | ||
| 347 | * @param approvalDTO | ||
| 348 | * @return void | ||
| 349 | */ | ||
| 350 | private void againSubmitFlow(MfEnterprise entity, EnterpriseRQVO rqVO, AddApprovalDTO approvalDTO) { | ||
| 351 | // 重新提交的数据重置相关字段 | ||
| 352 | entity.setGuid(CommonUtil.newGuid()); | ||
| 353 | mfEnterpriseService.csbrBaseEntity(entity); | ||
| 354 | // 保存新数据 | ||
| 355 | boolean flag = mfEnterpriseService.save(entity); | ||
| 356 | if (!flag) { | 329 | if (!flag) { |
| 357 | throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(String.format("重新提交%s",FUNCTION_NAME))); | 330 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, rqVO.getImmediateApprove() ? |
| 331 | messageSourceUtil.submitMessage(FUNCTION_NAME) : messageSourceUtil.updateMessage(FUNCTION_NAME)); | ||
| 358 | } | 332 | } |
| 359 | // 发起新的流程 | 333 | afterUpdate(entity, rqVO); |
| 360 | approvalDTO.setGuid(entity.getGuid()); | ||
| 361 | approvalFlowUtil.addApproval(approvalDTO); | ||
| 362 | afterSave(entity, rqVO); | ||
| 363 | } | 334 | } |
| 364 | 335 | ||
| 365 | /** | 336 | /** | ... | ... |
| ... | @@ -161,7 +161,7 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser | ... | @@ -161,7 +161,7 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser |
| 161 | public void updateServicerMaintain(FlowRQBaseVO flowBaseVO) { | 161 | public void updateServicerMaintain(FlowRQBaseVO flowBaseVO) { |
| 162 | ServicerMaintainRQVO rqVO = (ServicerMaintainRQVO) flowBaseVO; | 162 | ServicerMaintainRQVO rqVO = (ServicerMaintainRQVO) flowBaseVO; |
| 163 | // 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行 | 163 | // 将修改前数据查出来缓存下来,传入到修改后方法中,用于一些特殊逻辑处理,如某个值变化才进行 |
| 164 | // MfServicerMaintain oldEntity = mfServicerMaintainService.getById(rqVO.getGuid()); | 164 | MfServicerMaintain oldEntity = mfServicerMaintainService.getById(rqVO.getGuid()); |
| 165 | beforeUpdate(rqVO); | 165 | beforeUpdate(rqVO); |
| 166 | MfServicerMaintain entity = convertToEntity(rqVO); | 166 | MfServicerMaintain entity = convertToEntity(rqVO); |
| 167 | if("Y".equals(rqVO.getBizApproveState())){ | 167 | if("Y".equals(rqVO.getBizApproveState())){ |
| ... | @@ -176,45 +176,16 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser | ... | @@ -176,45 +176,16 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser |
| 176 | else{ | 176 | else{ |
| 177 | // 发起审批流程或保存草稿 | 177 | // 发起审批流程或保存草稿 |
| 178 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); | 178 | AddApprovalDTO approvalDTO = getAddApprovalDTO(entity); |
| 179 | super.restartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO,null, entity::setBizApproveState); | 179 | super.restartWorkFlow(rqVO, oldEntity.getBizApproveState(), approvalDTO, this::saveServicerMaintain, entity::setBizApproveState); |
| 180 | if (rqVO.getIsRestart()) { | 180 | // 修改业务数据 |
| 181 | // 重新提交 | 181 | boolean flag = mfServicerMaintainService.updateById(entity); |
| 182 | againSubmitFlow(entity, rqVO, approvalDTO); | 182 | if (!flag) { |
| 183 | } else { | 183 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, rqVO.getImmediateApprove() ? |
| 184 | // 修改业务数据 | 184 | messageSourceUtil.submitMessage(FUNCTION_NAME) : messageSourceUtil.updateMessage(FUNCTION_NAME)); |
| 185 | boolean flag = mfServicerMaintainService.updateById(entity); | ||
| 186 | if (!flag) { | ||
| 187 | throw new CsbrSystemException(SystemError.DATA_UPDATE_ERROR, rqVO.getImmediateApprove() ? | ||
| 188 | messageSourceUtil.submitMessage(FUNCTION_NAME) : messageSourceUtil.updateMessage(FUNCTION_NAME)); | ||
| 189 | } | ||
| 190 | afterUpdate(entity, rqVO); | ||
| 191 | } | 185 | } |
| 186 | afterUpdate(entity, rqVO); | ||
| 192 | } | 187 | } |
| 193 | } | 188 | } |
| 194 | |||
| 195 | /** | ||
| 196 | * 重新提交服务商维护 | ||
| 197 | * @author xcq | ||
| 198 | * @date 2024-12-31 18:49 | ||
| 199 | * @param entity | ||
| 200 | * @param rqVO | ||
| 201 | * @param approvalDTO | ||
| 202 | * @return void | ||
| 203 | */ | ||
| 204 | private void againSubmitFlow(MfServicerMaintain entity, ServicerMaintainRQVO rqVO, AddApprovalDTO approvalDTO) { | ||
| 205 | // 重新提交的数据重置相关字段 | ||
| 206 | entity.setGuid(CommonUtil.newGuid()); | ||
| 207 | mfServicerMaintainService.csbrBaseEntity(entity); | ||
| 208 | // 保存新数据 | ||
| 209 | boolean flag = mfServicerMaintainService.save(entity); | ||
| 210 | if (!flag) { | ||
| 211 | throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(String.format("重新提交%s",FUNCTION_NAME))); | ||
| 212 | } | ||
| 213 | // 发起新的流程 | ||
| 214 | approvalDTO.setGuid(entity.getGuid()); | ||
| 215 | approvalFlowUtil.addApproval(approvalDTO); | ||
| 216 | afterSave(entity, rqVO); | ||
| 217 | } | ||
| 218 | 189 | ||
| 219 | /** | 190 | /** |
| 220 | * 服务商维护数据删除、并有相关的处理操作 | 191 | * 服务商维护数据删除、并有相关的处理操作 | ... | ... |
-
Please register or sign in to post a comment