【DAOP-1.0】数据需求
【功能点】测试问题处理
Showing
3 changed files
with
5 additions
and
93 deletions
... | @@ -184,11 +184,7 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -184,11 +184,7 @@ 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()) { | ||
189 | // 重新提交 | ||
190 | againSubmitFlow(entity, rqVO, approvalDTO); | ||
191 | } else { | ||
192 | // 修改业务数据 | 188 | // 修改业务数据 |
193 | boolean flag = mfDemandService.updateById(entity); | 189 | boolean flag = mfDemandService.updateById(entity); |
194 | if (!flag) { | 190 | if (!flag) { |
... | @@ -197,32 +193,6 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -197,32 +193,6 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
197 | } | 193 | } |
198 | afterUpdate(entity, rqVO); | 194 | afterUpdate(entity, rqVO); |
199 | } | 195 | } |
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) { | ||
218 | throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(String.format("重新提交%s",FUNCTION_NAME))); | ||
219 | } | ||
220 | // 发起新的流程 | ||
221 | approvalDTO.setGuid(entity.getGuid()); | ||
222 | approvalDTO.setBizGuid(entity.getGuid()); | ||
223 | approvalFlowUtil.addApproval(approvalDTO); | ||
224 | afterSave(entity, rqVO); | ||
225 | } | ||
226 | 196 | ||
227 | /** | 197 | /** |
228 | * 数据需求数据删除、并有相关的处理操作 | 198 | * 数据需求数据删除、并有相关的处理操作 | ... | ... |
... | @@ -318,16 +318,12 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -318,16 +318,12 @@ 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()) { | ||
328 | // 重新提交 | ||
329 | againSubmitFlow(entity, rqVO, approvalDTO); | ||
330 | } else { | ||
331 | // 修改业务数据 | 327 | // 修改业务数据 |
332 | boolean flag = mfEnterpriseService.updateById(entity); | 328 | boolean flag = mfEnterpriseService.updateById(entity); |
333 | if (!flag) { | 329 | if (!flag) { |
... | @@ -336,31 +332,6 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -336,31 +332,6 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
336 | } | 332 | } |
337 | afterUpdate(entity, rqVO); | 333 | afterUpdate(entity, rqVO); |
338 | } | 334 | } |
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) { | ||
357 | throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(String.format("重新提交%s",FUNCTION_NAME))); | ||
358 | } | ||
359 | // 发起新的流程 | ||
360 | approvalDTO.setGuid(entity.getGuid()); | ||
361 | approvalFlowUtil.addApproval(approvalDTO); | ||
362 | afterSave(entity, rqVO); | ||
363 | } | ||
364 | 335 | ||
365 | /** | 336 | /** |
366 | * 企业信息数据删除、并有相关的处理操作 | 337 | * 企业信息数据删除、并有相关的处理操作 | ... | ... |
... | @@ -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,11 +176,7 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser | ... | @@ -176,11 +176,7 @@ 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()) { | ||
181 | // 重新提交 | ||
182 | againSubmitFlow(entity, rqVO, approvalDTO); | ||
183 | } else { | ||
184 | // 修改业务数据 | 180 | // 修改业务数据 |
185 | boolean flag = mfServicerMaintainService.updateById(entity); | 181 | boolean flag = mfServicerMaintainService.updateById(entity); |
186 | if (!flag) { | 182 | if (!flag) { |
... | @@ -190,31 +186,6 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser | ... | @@ -190,31 +186,6 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser |
190 | afterUpdate(entity, rqVO); | 186 | afterUpdate(entity, rqVO); |
191 | } | 187 | } |
192 | } | 188 | } |
193 | } | ||
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