From 1ee76c252f2dbba62e0ec34cccf9eaac51de9083 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 23 七月 2025 16:25:23 +0800 Subject: [PATCH] 修改bug --- ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WarnServiceImpl.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WarnServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WarnServiceImpl.java index b985a79..2afbda0 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WarnServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/WarnServiceImpl.java @@ -75,6 +75,10 @@ List<Car> carList = carService.list(); List<Warn> warns = new ArrayList<>(); for (UPWarnMsgAdptInfoVo vo : list) { + long count = this.count(new LambdaQueryWrapper<Warn>().eq(Warn::getObjectId, vo.getInfoId())); + if(0 != count){ + continue; + } String warnTypeName = WarnType.getWarnTypeName(vo.getWarnType()); warn = new Warn(); Optional<Car> carOptional = carList.stream().filter(s -> s.getVehicleNumber().equals(vo.getVehicleNo())).findFirst(); -- Gitblit v1.7.1