diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationAttributeService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationAttributeService.java index c9cee14..14121d5 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationAttributeService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationAttributeService.java @@ -35,4 +35,10 @@ public interface IStationAttributeService extends BaseService getStationCodeList(); Map getPointUnit(); + + /** + * 根据站点编号删除站点属性配置 + * @param stationCode 站点编码 + */ + void removeByStationCode(String stationCode); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationAttributeServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationAttributeServiceImpl.java index 89f37a1..27a0ded 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationAttributeServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationAttributeServiceImpl.java @@ -183,4 +183,13 @@ public class StationAttributeServiceImpl extends BaseServiceImpl queryWrapper = Wrappers.lambdaQuery().eq(StationAttributeEntity::getStationId, stationCode); + List list = this.list(queryWrapper); + if(CollectionUtil.isNotEmpty(list)) { + this.deleteLogic(list.stream().map(StationAttributeEntity::getId).collect(Collectors.toList())); + } + } } 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 6ab53ce..fe18a39 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 @@ -15,6 +15,7 @@ import com.hnac.hzims.operational.station.entity.ControlUsersEntity; import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.mapper.ControlUsersMapper; import com.hnac.hzims.operational.station.mapper.StationMapper; +import com.hnac.hzims.operational.station.service.IStationAttributeService; import com.hnac.hzims.operational.station.service.IStationService; import com.hnac.hzims.operational.station.vo.HzimsStationCountVo; import com.hnac.hzims.operational.station.vo.StationAndDeptVo; @@ -69,6 +70,7 @@ public class StationServiceImpl extends BaseServiceImpl { + stationAttributeService.removeByStationCode(stationEntity.getCode()); + },"删除站点集中监控属性").start(); return saveFlag; }