From 9433906785a09557a6a4aee5f26fc586e73b2e51 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Fri, 14 Apr 2023 10:37:02 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E7=AB=99=E7=82=B9=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../station/service/impl/StationServiceImpl.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java index 3d425d6..84646b7 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java @@ -131,13 +131,15 @@ public class StationServiceImpl extends BaseServiceImpl existProject = projectClient.getProjectByPid(stationEntity.getCode()); - if(existProject.isSuccess() && ObjectUtil.isNotEmpty(existProject.getData())) { - Result dataDelete = projectClient.delete(stationEntity.getCode()); - Assert.isTrue(dataDelete.isSuccess(),() -> { - logger.error("hzims-operational:station:removeStation",stationEntity.getCode()+"删除失败,报错信息为:"+dataDelete.getMsg()); - throw new ServiceException("数据平台删除项目失败!"); - }); + Result dataDelete = projectClient.delete(stationEntity.getCode()); + Assert.isTrue(dataDelete.isSuccess(),() -> { + logger.error("hzims-operational:station:removeStation",stationEntity.getCode()+"删除失败,报错信息为:"+dataDelete.getMsg()); + throw new ServiceException("数据平台删除项目失败!"); + }); + // 删除所属机构 + R deptResult = sysClient.getDept(stationEntity.getRefDept()); + if(deptResult.isSuccess() && ObjectUtil.isNotEmpty(deptResult.getData())) { + deptClient.deleteDeptById(stationEntity.getRefDept()); } // 删除智能诊断站点 questionClient.deleteStationInfo(stationEntity.getCode());