【DAOP-1.0】数据需求
【功能点】测试问题处理
Showing
3 changed files
with
79 additions
and
4 deletions
... | @@ -184,8 +184,11 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -184,8 +184,11 @@ 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, oldEntity.getBizApproveState(), approvalDTO, this::saveDemand, entity::setBizApproveState); | 187 | super.startOrRestartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, entity::setBizApproveState); |
188 | if(!rqVO.getIsRestart()){ | 188 | if (rqVO.getIsRestart()) { |
189 | // 重新提交 | ||
190 | againSubmitFlow(entity, rqVO, approvalDTO); | ||
191 | } else { | ||
189 | // 修改业务数据 | 192 | // 修改业务数据 |
190 | boolean flag = mfDemandService.updateById(entity); | 193 | boolean flag = mfDemandService.updateById(entity); |
191 | if (!flag) { | 194 | if (!flag) { |
... | @@ -197,6 +200,30 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -197,6 +200,30 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
197 | } | 200 | } |
198 | 201 | ||
199 | /** | 202 | /** |
203 | * 重新提交数据需求 | ||
204 | * @author xcq | ||
205 | * @date 2025-02-17 18:16 | ||
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 | approvalFlowUtil.addApproval(approvalDTO); | ||
223 | afterSave(entity, rqVO); | ||
224 | } | ||
225 | |||
226 | /** | ||
200 | * 数据需求数据删除、并有相关的处理操作 | 227 | * 数据需求数据删除、并有相关的处理操作 |
201 | * @author xcq | 228 | * @author xcq |
202 | * @date 2024-12-31 18:46 | 229 | * @date 2024-12-31 18:46 | ... | ... |
... | @@ -323,7 +323,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -323,7 +323,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
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, oldEntity.getBizApproveState(), approvalDTO, this::saveEnterprise, entity::setBizApproveState); | 326 | super.startOrRestartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, entity::setBizApproveState); |
327 | if(!rqVO.getIsRestart()){ | 327 | if(!rqVO.getIsRestart()){ |
328 | // 修改业务数据 | 328 | // 修改业务数据 |
329 | boolean flag = mfEnterpriseService.updateById(entity); | 329 | boolean flag = mfEnterpriseService.updateById(entity); |
... | @@ -336,6 +336,30 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -336,6 +336,30 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
336 | } | 336 | } |
337 | 337 | ||
338 | /** | 338 | /** |
339 | * 重新提交企业信息 | ||
340 | * @author xcq | ||
341 | * @date 2024-12-26 16:18 | ||
342 | * @param entity | ||
343 | * @param rqVO | ||
344 | * @param approvalDTO | ||
345 | * @return void | ||
346 | */ | ||
347 | private void againSubmitFlow(MfEnterprise entity, EnterpriseRQVO rqVO, AddApprovalDTO approvalDTO) { | ||
348 | // 重新提交的数据重置相关字段 | ||
349 | entity.setGuid(CommonUtil.newGuid()); | ||
350 | mfEnterpriseService.csbrBaseEntity(entity); | ||
351 | // 保存新数据 | ||
352 | boolean flag = mfEnterpriseService.save(entity); | ||
353 | if (!flag) { | ||
354 | throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(String.format("重新提交%s",FUNCTION_NAME))); | ||
355 | } | ||
356 | // 发起新的流程 | ||
357 | approvalDTO.setGuid(entity.getGuid()); | ||
358 | approvalFlowUtil.addApproval(approvalDTO); | ||
359 | afterSave(entity, rqVO); | ||
360 | } | ||
361 | |||
362 | /** | ||
339 | * 企业信息数据删除、并有相关的处理操作 | 363 | * 企业信息数据删除、并有相关的处理操作 |
340 | * @author xcq | 364 | * @author xcq |
341 | * @date 2024-12-26 16:18 | 365 | * @date 2024-12-26 16:18 | ... | ... |
... | @@ -176,7 +176,7 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser | ... | @@ -176,7 +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, oldEntity.getBizApproveState(), approvalDTO, this::saveServicerMaintain, entity::setBizApproveState); | 179 | super.startOrRestartWorkFlow(rqVO, rqVO.getBizApproveState(), approvalDTO, entity::setBizApproveState); |
180 | if(!rqVO.getIsRestart()){ | 180 | if(!rqVO.getIsRestart()){ |
181 | // 修改业务数据 | 181 | // 修改业务数据 |
182 | boolean flag = mfServicerMaintainService.updateById(entity); | 182 | boolean flag = mfServicerMaintainService.updateById(entity); |
... | @@ -190,6 +190,30 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser | ... | @@ -190,6 +190,30 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser |
190 | } | 190 | } |
191 | 191 | ||
192 | /** | 192 | /** |
193 | * 重新提交服务商维护 | ||
194 | * @author xcq | ||
195 | * @date 2024-12-31 18:49 | ||
196 | * @param entity | ||
197 | * @param rqVO | ||
198 | * @param approvalDTO | ||
199 | * @return void | ||
200 | */ | ||
201 | private void againSubmitFlow(MfServicerMaintain entity, ServicerMaintainRQVO rqVO, AddApprovalDTO approvalDTO) { | ||
202 | // 重新提交的数据重置相关字段 | ||
203 | entity.setGuid(CommonUtil.newGuid()); | ||
204 | mfServicerMaintainService.csbrBaseEntity(entity); | ||
205 | // 保存新数据 | ||
206 | boolean flag = mfServicerMaintainService.save(entity); | ||
207 | if (!flag) { | ||
208 | throw new CsbrSystemException(SystemError.DATA_ADD_ERROR, messageSourceUtil.addMessage(String.format("重新提交%s",FUNCTION_NAME))); | ||
209 | } | ||
210 | // 发起新的流程 | ||
211 | approvalDTO.setGuid(entity.getGuid()); | ||
212 | approvalFlowUtil.addApproval(approvalDTO); | ||
213 | afterSave(entity, rqVO); | ||
214 | } | ||
215 | |||
216 | /** | ||
193 | * 服务商维护数据删除、并有相关的处理操作 | 217 | * 服务商维护数据删除、并有相关的处理操作 |
194 | * @author xcq | 218 | * @author xcq |
195 | * @date 2024-12-31 18:49 | 219 | * @date 2024-12-31 18:49 | ... | ... |
-
Please register or sign in to post a comment