fe901eab by xiaojie

【数据资产】

1、元数据导入
1 parent d412776b
......@@ -284,7 +284,13 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
String crossPlatformApproveState = "";
for (String guid : guids) {
MfDemand entity = mfDemandService.getById(guid);
beforeRemove(entity);
if (entity == null) {
continue;
}
if (ApprovalStateEnum.CHECKING.getValue().equals(entity.getBizApproveState()) ||
ApprovalStateEnum.PASSED.getValue().equals(entity.getBizApproveState())) {
throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, "审批中和审批通过的数据不能删除!");
}
mfDemandService.removeById(entity);
afterRemove(entity);
crossPlatformApproveState = entity.getCrossPlatformApproveState();
......
......@@ -200,7 +200,13 @@ public class EnterpriseChangeApproveServiceImpl implements EnterpriseChangeAppro
String crossPlatformApproveState = "";
for (String guid : guids) {
MfEnterpriseChangeApprove entity = mfEnterpriseChangeApproveService.getById(guid);
beforeRemove(entity);
if (entity == null) {
continue;
}
if (ApprovalStateEnum.CHECKING.getValue().equals(entity.getBizApproveState()) ||
ApprovalStateEnum.PASSED.getValue().equals(entity.getBizApproveState())) {
throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, "审批中和审批通过的数据不能删除!");
}
mfEnterpriseChangeApproveService.removeById(guid);
crossPlatformApproveState = entity.getCrossPlatformApproveState();
}
......
......@@ -382,7 +382,13 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
String crossPlatformApproveState = "";
for (String guid : guids) {
MfEnterprise entity = mfEnterpriseService.getById(guid);
beforeRemove(entity);
if (entity == null) {
continue;
}
if (ApprovalStateEnum.CHECKING.getValue().equals(entity.getBizApproveState()) ||
ApprovalStateEnum.PASSED.getValue().equals(entity.getBizApproveState())) {
throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, "审批中和审批通过的数据不能删除!");
}
mfEnterpriseService.removeById(guid);
afterRemove(entity);
crossPlatformApproveState = entity.getCrossPlatformApproveState();
......@@ -806,7 +812,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
*/
private void beforeRemove(MfEnterprise entity) {
if (entity == null) {
throw new CsbrSystemException(SystemError.DATA_DEL_ERROR, messageSourceUtil.notExistsToDelMessage(FUNCTION_NAME));
return;
}
if (ApprovalStateEnum.CHECKING.getValue().equals(entity.getBizApproveState()) ||
ApprovalStateEnum.PASSED.getValue().equals(entity.getBizApproveState())) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!