Browse Source

# 站点删除接口调整

zhongwei
haungxing 2 years ago
parent
commit
9433906785
  1. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

@ -131,13 +131,15 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
boolean saveFlag = this.removeById(Long.valueOf(id));
if(saveFlag) {
// 删除数据平台项目
Result<ProjectVO> 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("数据平台删除项目失败!");
});
// 删除所属机构
R<Dept> deptResult = sysClient.getDept(stationEntity.getRefDept());
if(deptResult.isSuccess() && ObjectUtil.isNotEmpty(deptResult.getData())) {
deptClient.deleteDeptById(stationEntity.getRefDept());
}
// 删除智能诊断站点
questionClient.deleteStationInfo(stationEntity.getCode());

Loading…
Cancel
Save