From 8b183d84e9796f7643424223816b6f6ef5cb60ee Mon Sep 17 00:00:00 2001 From: xy <748613696@qq.com> Date: Fri, 24 Apr 2026 09:43:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(delivery):=20=E6=B7=BB=E5=8A=A0=E7=9B=91?= =?UTF-8?q?=E6=B5=8B=E7=82=B9=E9=99=90=E5=80=BC=E5=88=A0=E9=99=A4=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在删除监测点表和拓扑图关系的同时删除对应的监测点限值数据 - 在三个不同的删除操作位置都添加了监测点限值的批量删除逻辑 - 确保设备数据缓存刷新时完整清理相关关联数据 --- .../service/impl/CsEquipmentDeliveryServiceImpl.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java index bf10368..a69c17b 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsEquipmentDeliveryServiceImpl.java @@ -47,6 +47,7 @@ import com.njcn.csdevice.utils.StringUtil; import com.njcn.csharmonic.api.EventUserFeignClient; import com.njcn.csharmonic.param.CsEventUserQueryParam; import com.njcn.csharmonic.pojo.po.CsEventPO; +import com.njcn.device.biz.mapper.OverLimitWlMapper; import com.njcn.oss.constant.OssPath; import com.njcn.oss.utils.FileStorageUtil; import com.njcn.redis.pojo.enums.AppRedisKey; @@ -124,6 +125,7 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl list = csLedgerService.lambdaQuery().eq(CsLedger::getPid, id).list(); if (!CollectionUtils.isEmpty(list)) { List collect = list.stream().map(CsLedger::getId).collect(Collectors.toList()); LambdaQueryWrapper csLinePOLambdaQueryWrapper = new LambdaQueryWrapper<>(); csLinePOLambdaQueryWrapper.in(CsLinePO::getLineId, collect); csLinePOService.remove(csLinePOLambdaQueryWrapper); + //删除监测点限值 + overLimitWlMapper.deleteBatchIds(collect); + QueryWrapper appLineTopologyDiagramPOQueryWrapper = new QueryWrapper<>(); appLineTopologyDiagramPOQueryWrapper.clear(); appLineTopologyDiagramPOQueryWrapper.in("line_id", collect); @@ -712,6 +717,9 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl appLineTopologyDiagramPOQueryWrapper = new QueryWrapper<>(); appLineTopologyDiagramPOQueryWrapper.clear(); appLineTopologyDiagramPOQueryWrapper.in("line_id", collect); @@ -893,6 +901,8 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl csLinePOLambdaQueryWrapper = new LambdaQueryWrapper<>(); csLinePOLambdaQueryWrapper.in(CsLinePO::getLineId, collect); csLinePOService.remove(csLinePOLambdaQueryWrapper); + //删除监测点限值 + overLimitWlMapper.deleteBatchIds(collect); } LambdaQueryWrapper csLedgerLambdaQueryWrapper = new LambdaQueryWrapper<>(); csLedgerLambdaQueryWrapper.clear();