From 259b76217c491e7c00257e985aa70bc68dd2e757 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期四, 30 三月 2023 21:43:36 +0800
Subject: [PATCH] 获取图片改成多次获取

---
 ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/ViolationsServiceImpl.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/ViolationsServiceImpl.java b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/ViolationsServiceImpl.java
index d216aa5..8794a56 100644
--- a/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/ViolationsServiceImpl.java
+++ b/ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/ViolationsServiceImpl.java
@@ -61,7 +61,9 @@
     public void saveFromVideo(List<VideoAlarmReport> videoAlarmReports) {
         for (VideoAlarmReport videoAlarmReport : videoAlarmReports) {
             VideoPoint videoPoint = null;
-            LambdaQueryWrapper<VideoPoint> queryWrapper = new LambdaQueryWrapper<VideoPoint>().eq(VideoPoint::getPlatResourceId, videoAlarmReport.getPlatResourceId());
+            LambdaQueryWrapper<VideoPoint> queryWrapper = new LambdaQueryWrapper<VideoPoint>()
+                    .eq(VideoPoint::getPlatResourceId, videoAlarmReport.getPlatResourceId())
+                    .or().eq(VideoPoint::getCode, videoAlarmReport.getPlatResourceId());
             List<VideoPoint> pointList = videoPointService.list(queryWrapper);
             if (pointList.size() > 0) {
                 videoPoint = pointList.get(0);
@@ -76,6 +78,7 @@
                 baseCase.setCommunityId(videoPoint.getCommunityId());
                 baseCase.setSite(videoPoint.getAddress());
                 baseCase.setGridId(videoPoint.getGridId());
+                baseCase.setSite(videoPoint.getAddress());
 
                 baseCaseService.save(baseCase);
                 violations.setId(baseCase.getId());

--
Gitblit v1.8.0