【数据资产】
1、元数据导入
Showing
3 changed files
with
22 additions
and
4 deletions
... | @@ -284,7 +284,13 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService | ... | @@ -284,7 +284,13 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService |
284 | String crossPlatformApproveState = ""; | 284 | String crossPlatformApproveState = ""; |
285 | for (String guid : guids) { | 285 | for (String guid : guids) { |
286 | MfDemand entity = mfDemandService.getById(guid); | 286 | MfDemand entity = mfDemandService.getById(guid); |
287 | beforeRemove(entity); | 287 | if (entity == null) { |
288 | continue; | ||
289 | } | ||
290 | if (ApprovalStateEnum.CHECKING.getValue().equals(entity.getBizApproveState()) || | ||
291 | ApprovalStateEnum.PASSED.getValue().equals(entity.getBizApproveState())) { | ||
292 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, "审批中和审批通过的数据不能删除!"); | ||
293 | } | ||
288 | mfDemandService.removeById(entity); | 294 | mfDemandService.removeById(entity); |
289 | afterRemove(entity); | 295 | afterRemove(entity); |
290 | crossPlatformApproveState = entity.getCrossPlatformApproveState(); | 296 | crossPlatformApproveState = entity.getCrossPlatformApproveState(); | ... | ... |
... | @@ -200,7 +200,13 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro | ... | @@ -200,7 +200,13 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro |
200 | String crossPlatformApproveState = ""; | 200 | String crossPlatformApproveState = ""; |
201 | for (String guid : guids) { | 201 | for (String guid : guids) { |
202 | MfEnterpriseChangeApprove entity = mfEnterpriseChangeApproveService.getById(guid); | 202 | MfEnterpriseChangeApprove entity = mfEnterpriseChangeApproveService.getById(guid); |
203 | beforeRemove(entity); | 203 | if (entity == null) { |
204 | continue; | ||
205 | } | ||
206 | if (ApprovalStateEnum.CHECKING.getValue().equals(entity.getBizApproveState()) || | ||
207 | ApprovalStateEnum.PASSED.getValue().equals(entity.getBizApproveState())) { | ||
208 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, "审批中和审批通过的数据不能删除!"); | ||
209 | } | ||
204 | mfEnterpriseChangeApproveService.removeById(guid); | 210 | mfEnterpriseChangeApproveService.removeById(guid); |
205 | crossPlatformApproveState = entity.getCrossPlatformApproveState(); | 211 | crossPlatformApproveState = entity.getCrossPlatformApproveState(); |
206 | } | 212 | } | ... | ... |
... | @@ -382,7 +382,13 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -382,7 +382,13 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
382 | String crossPlatformApproveState = ""; | 382 | String crossPlatformApproveState = ""; |
383 | for (String guid : guids) { | 383 | for (String guid : guids) { |
384 | MfEnterprise entity = mfEnterpriseService.getById(guid); | 384 | MfEnterprise entity = mfEnterpriseService.getById(guid); |
385 | beforeRemove(entity); | 385 | if (entity == null) { |
386 | continue; | ||
387 | } | ||
388 | if (ApprovalStateEnum.CHECKING.getValue().equals(entity.getBizApproveState()) || | ||
389 | ApprovalStateEnum.PASSED.getValue().equals(entity.getBizApproveState())) { | ||
390 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, "审批中和审批通过的数据不能删除!"); | ||
391 | } | ||
386 | mfEnterpriseService.removeById(guid); | 392 | mfEnterpriseService.removeById(guid); |
387 | afterRemove(entity); | 393 | afterRemove(entity); |
388 | crossPlatformApproveState = entity.getCrossPlatformApproveState(); | 394 | crossPlatformApproveState = entity.getCrossPlatformApproveState(); |
... | @@ -806,7 +812,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris | ... | @@ -806,7 +812,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris |
806 | */ | 812 | */ |
807 | private void beforeRemove(MfEnterprise entity) { | 813 | private void beforeRemove(MfEnterprise entity) { |
808 | if (entity == null) { | 814 | if (entity == null) { |
809 | throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToDelMessage(FUNCTION_NAME)); | 815 | return; |
810 | } | 816 | } |
811 | if (ApprovalStateEnum.CHECKING.getValue().equals(entity.getBizApproveState()) || | 817 | if (ApprovalStateEnum.CHECKING.getValue().equals(entity.getBizApproveState()) || |
812 | ApprovalStateEnum.PASSED.getValue().equals(entity.getBizApproveState())) { | 818 | ApprovalStateEnum.PASSED.getValue().equals(entity.getBizApproveState())) { | ... | ... |
-
Please register or sign in to post a comment