7fb3a27c by 肖初晴

【DAOP-1.0】数据需求

【功能点】测试问题处理
1 parent 8b92a9da
...@@ -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) {
...@@ -195,6 +198,30 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService ...@@ -195,6 +198,30 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
195 afterUpdate(entity, rqVO); 198 afterUpdate(entity, rqVO);
196 } 199 }
197 } 200 }
201
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 }
198 225
199 /** 226 /**
200 * 数据需求数据删除、并有相关的处理操作 227 * 数据需求数据删除、并有相关的处理操作
......
...@@ -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);
...@@ -334,6 +334,30 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris ...@@ -334,6 +334,30 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
334 afterUpdate(entity, rqVO); 334 afterUpdate(entity, rqVO);
335 } 335 }
336 } 336 }
337
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 }
337 361
338 /** 362 /**
339 * 企业信息数据删除、并有相关的处理操作 363 * 企业信息数据删除、并有相关的处理操作
......
...@@ -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);
...@@ -188,6 +188,30 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser ...@@ -188,6 +188,30 @@ public class ServicerMaintainServiceImpl extends FlowAbstractImpl implements Ser
188 } 188 }
189 } 189 }
190 } 190 }
191
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 }
191 215
192 /** 216 /**
193 * 服务商维护数据删除、并有相关的处理操作 217 * 服务商维护数据删除、并有相关的处理操作
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!