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());