From 176c22a8a0e65385ca1db7622ebba5a14614f5f7 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期五, 27 二月 2026 15:12:30 +0800
Subject: [PATCH] 首页AI事件统计、抓拍展示,限制卡车和车牌标签;还款提醒限制修改

---
 fzzy-igdss-core/src/main/java/com/fzzy/igds/timer/JobWarnService.java |    4 +-
 fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java |   95 ++++++++++++++++++++++++++++++-----------------
 fzzy-igdss-web/src/main/resources/templates/group/index.html          |    6 +-
 3 files changed, 65 insertions(+), 40 deletions(-)

diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/timer/JobWarnService.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/timer/JobWarnService.java
index 7913bef..85bd8f7 100644
--- a/fzzy-igdss-core/src/main/java/com/fzzy/igds/timer/JobWarnService.java
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/timer/JobWarnService.java
@@ -116,8 +116,8 @@
 
             per = sumMoney / backMoney;
 
-            if (per > 1.2) {
-                log.error("-----褰撳墠鍚堝悓={}涓嬭川鎶间粨搴�={}搴撳瓨鏈埌寰呰繕娆剧殑120%锛屼笉鐢熸垚杩樻鎻愰啋宸ュ崟-----", pledgeContract.getName(), pledgeContract.getDepotNames());
+            if (per > 1.1) {
+                log.error("-----褰撳墠鍚堝悓={}涓嬭川鎶间粨搴�={}搴撳瓨鏈埌寰呰繕娆剧殑110%锛屼笉鐢熸垚杩樻鎻愰啋宸ュ崟-----", pledgeContract.getName(), pledgeContract.getDepotNames());
                 continue;
             }
 
diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java b/fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java
index bd051f9..6bb065f 100644
--- a/fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/group/manager/GroupManager.java
@@ -17,7 +17,10 @@
 
 import javax.annotation.Resource;
 import java.text.DecimalFormat;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
 
 /**
  * @Description
@@ -128,6 +131,7 @@
 
     /**
      * 鑾峰彇搴撳尯灏佽淇℃伅
+     *
      * @param companyId
      * @return
      */
@@ -153,14 +157,14 @@
                     for (Depot depot : depotList) {
                         deptData.setDepotNumber(deptData.getDepotNumber() + 1);
 
-                        if(StringUtils.isNotBlank(depot.getPledgeBank())){
+                        if (StringUtils.isNotBlank(depot.getPledgeBank())) {
                             deptData.setDepotBankNumber(deptData.getDepotBankNumber() + 1);
                         }
 
-                        if(null == depot.getStorageReal()){
+                        if (null == depot.getStorageReal()) {
                             depot.setStorageReal(0.0);
                         }
-                        deptData.setStorageNum(deptData.getStorageNum() + depot.getStorageReal()/1000);
+                        deptData.setStorageNum(deptData.getStorageNum() + depot.getStorageReal() / 1000);
                     }
                 }
 
@@ -176,7 +180,7 @@
                         if (Constant.TYPE_IN.equals(inoutRecord.getType())) {
                             deptData.setInNum(deptData.getInNum() + 1);
                         }
-                        if (Constant.TYPE_OUT.equals(inoutRecord.getType())){
+                        if (Constant.TYPE_OUT.equals(inoutRecord.getType())) {
                             deptData.setOutNum(deptData.getOutNum() + 1);
 
                         }
@@ -192,16 +196,17 @@
 
     /**
      * 鑾峰彇搴撳尯涓嬬洃鎺т俊鎭�
+     *
      * @param param
      * @return
      */
     public PageResponse<List<Camera>> cameraList(IgdsBaseParam param) {
 
-        if(StringUtils.isBlank(param.getDeptId())){
+        if (StringUtils.isBlank(param.getDeptId())) {
             return new PageResponse<>(RespCodeEnum.CODE_2000, null);
         }
 
-        if (StringUtils.isBlank(param.getCompanyId())){
+        if (StringUtils.isBlank(param.getCompanyId())) {
             param.setCompanyId(ContextUtil.getCompanyId());
         }
 
@@ -240,26 +245,26 @@
             //鐢ㄤ簬缁熻鍒嗗搧绉嶅簱瀛�
             LinkedHashMap<String, Double> varietyMap = new LinkedHashMap<>();
             for (Depot depot : depotList) {
-                if(StringUtils.isNotBlank(depot.getPledgeBank())){
+                if (StringUtils.isNotBlank(depot.getPledgeBank())) {
                     indexData.setDepotBankNum(indexData.getDepotBankNum() + 1);
                 }
-                if(null == depot.getStorageReal()){
+                if (null == depot.getStorageReal()) {
                     depot.setStorageReal(0.0);
                 }
-                if(StringUtils.isNotBlank(depot.getStoreType()) && "2".equals(depot.getStoreType())){
-                    packFoodSum += depot.getStorageReal()/1000;
-                }else {
-                    foodSum += depot.getStorageReal()/1000;
+                if (StringUtils.isNotBlank(depot.getStoreType()) && "2".equals(depot.getStoreType())) {
+                    packFoodSum += depot.getStorageReal() / 1000;
+                } else {
+                    foodSum += depot.getStorageReal() / 1000;
                 }
 
-                if(depot.getStorageReal() > 0){
-                    if(StringUtils.isBlank(depot.getFoodVariety())){
+                if (depot.getStorageReal() > 0) {
+                    if (StringUtils.isBlank(depot.getFoodVariety())) {
                         //璁剧疆涓哄叾浠栧搧绫�
                         depot.setFoodVariety("9999000");
                     }
 
                     varietyMap.putIfAbsent(depot.getFoodVariety(), 0.000);
-                    varietyMap.put(depot.getFoodVariety(), varietyMap.get(depot.getFoodVariety()) + NumberUtil.keepPrecision(depot.getStorageReal()/1000, 3));
+                    varietyMap.put(depot.getFoodVariety(), varietyMap.get(depot.getFoodVariety()) + NumberUtil.keepPrecision(depot.getStorageReal() / 1000, 3));
                 }
             }
 
@@ -279,6 +284,7 @@
 
     /**
      * 澶у睆棣栭〉-搴撳尯淇℃伅缁熻
+     *
      * @param param
      * @return
      */
@@ -304,14 +310,14 @@
                     for (Depot depot : depotList) {
                         deptData.setDepotNumber(deptData.getDepotNumber() + 1);
 
-                        if(StringUtils.isNotBlank(depot.getPledgeBank())){
+                        if (StringUtils.isNotBlank(depot.getPledgeBank())) {
                             deptData.setDepotBankNumber(deptData.getDepotBankNumber() + 1);
                         }
 
-                        if(null == depot.getStorageReal()){
+                        if (null == depot.getStorageReal()) {
                             depot.setStorageReal(0.0);
                         }
-                        deptData.setStorageNum(deptData.getStorageNum() + depot.getStorageReal()/1000);
+                        deptData.setStorageNum(deptData.getStorageNum() + depot.getStorageReal() / 1000);
                     }
                 }
 
@@ -327,7 +333,7 @@
                         if (Constant.TYPE_IN.equals(inoutRecord.getType())) {
                             deptData.setInNum(deptData.getInNum() + 1);
                         }
-                        if (Constant.TYPE_OUT.equals(inoutRecord.getType())){
+                        if (Constant.TYPE_OUT.equals(inoutRecord.getType())) {
                             deptData.setOutNum(deptData.getOutNum() + 1);
 
                         }
@@ -341,10 +347,19 @@
                 igdsParam.setStart(DateUtil.getNewByDay(new Date(), -6));
                 igdsParam.setEnd(DateUtil.getNextZero(new Date()));
                 List<EventInfo> enevtList = eventInfoService.getListByParam(igdsParam);
-                if (null != enevtList && !enevtList.isEmpty()) {
-                    deptData.setWarnNum7(enevtList.size());
-                    for (EventInfo eventInfo : enevtList) {
-                        if(DateFormatUtils.format(new Date(), "yyyyMMdd").equals(DateFormatUtils.format(eventInfo.getTime(), "yyyyMMdd"))){
+                List<EventInfo> resultEnevtList = new ArrayList<>();
+                for (EventInfo info : enevtList) {
+                    //褰撴爣绛惧寘鍚� 鍗¤溅锛� 鎴栬�呭寘鍚ぇ鍐欑殑鑻辨枃瀛楁瘝锛堜唬琛ㄦ湁杞︾墝锛夋椂锛屾坊鍔犺繘result
+                    if (StringUtils.isNotBlank(info.getTags())) {
+                        if (info.getTags().contains("鍗¤溅") || info.getTags().matches(".*[A-Z].*")) {
+                            resultEnevtList.add(info);
+                        }
+                    }
+                }
+                if (null != resultEnevtList && !resultEnevtList.isEmpty()) {
+                    deptData.setWarnNum7(resultEnevtList.size());
+                    for (EventInfo eventInfo : resultEnevtList) {
+                        if (DateFormatUtils.format(new Date(), "yyyyMMdd").equals(DateFormatUtils.format(eventInfo.getTime(), "yyyyMMdd"))) {
                             deptData.setDailyTotal(deptData.getDailyTotal() + 1);
                         }
                     }
@@ -385,7 +400,7 @@
             groupGisData.setDeptNum(deptList.size());
             for (Dept dept : deptList) {
                 if (StringUtils.isBlank(dept.getXzqhdm()) || null == valuePieChart.get(dept.getXzqhdm())) {
-                    if(null == valuePieChart.get("999999")){
+                    if (null == valuePieChart.get("999999")) {
                         valuePieChart.put("999999", 0);
                         namePieChart.put("999999", "鍏朵粬鍖哄幙");
                     }
@@ -395,9 +410,9 @@
             }
         }
 
-        if(groupGisData.getDeptNum() > 0){
+        if (groupGisData.getDeptNum() > 0) {
             for (String mapKey : valuePieChart.keySet()) {
-                groupGisData.getDeptList().add(new ChartPie(valuePieChart.get(mapKey) + "", namePieChart.get(mapKey), new DecimalFormat("0.0").format((double)valuePieChart.get(mapKey) / groupGisData.getDeptNum() * 100)));
+                groupGisData.getDeptList().add(new ChartPie(valuePieChart.get(mapKey) + "", namePieChart.get(mapKey), new DecimalFormat("0.0").format((double) valuePieChart.get(mapKey) / groupGisData.getDeptNum() * 100)));
             }
         }
 
@@ -405,18 +420,18 @@
         List<Depot> depotList = depotService.getData(ContextUtil.getCompanyId(), ContextUtil.subDeptId(null), false);
         if (null != depotList && !depotList.isEmpty()) {
             for (Depot depot : depotList) {
-                if(null == depot.getStorageReal()){
+                if (null == depot.getStorageReal()) {
                     depot.setStorageReal(0.0);
                 }
                 groupGisData.setSum(groupGisData.getSum() + depot.getStorageReal());
-                if(StringUtils.isNotBlank(depot.getPledgeBank())){
+                if (StringUtils.isNotBlank(depot.getPledgeBank())) {
                     groupGisData.setBankSum(groupGisData.getBankSum() + depot.getStorageReal());
-                }else{
+                } else {
                     groupGisData.setNormalSum(groupGisData.getNormalSum() + depot.getStorageReal());
                 }
             }
         }
-        if(groupGisData.getSum() > 0){
+        if (groupGisData.getSum() > 0) {
             groupGisData.setSumPer(new DecimalFormat("0.00").format(groupGisData.getSum() / groupGisData.getSum() * 100L));
             groupGisData.setBankSumPer(new DecimalFormat("0.00").format(groupGisData.getBankSum() / groupGisData.getSum() * 100L));
             groupGisData.setNormalSumPer(new DecimalFormat("0.00").format(groupGisData.getNormalSum() / groupGisData.getSum() * 100L));
@@ -427,6 +442,7 @@
 
     /**
      * 澶у睆棣栭〉-鎶撴媿璺熻釜淇℃伅
+     *
      * @param param
      * @return
      */
@@ -436,13 +452,22 @@
         param.setEnd(new Date());
         List<SnapRecord> listSnap = snapRecordService.getListByParam(param);
 
-        if (null != listSnap && !listSnap.isEmpty()) {
+        List<SnapRecord> resultListSnap = new ArrayList<>();
+        for (SnapRecord info : listSnap) {
+            //褰撴爣绛惧寘鍚� 鍗¤溅锛� 鎴栬�呭寘鍚ぇ鍐欑殑鑻辨枃瀛楁瘝锛堜唬琛ㄦ湁杞︾墝锛夋椂锛屾坊鍔犺繘result
+            if (StringUtils.isNotBlank(info.getTags())) {
+                if (info.getTags().contains("鍗¤溅") || info.getTags().matches(".*[A-Z].*")) {
+                    resultListSnap.add(info);
+                }
+            }
+        }
+        if (null != resultListSnap && !resultListSnap.isEmpty()) {
             //鍒ゆ柇鏂囦欢鏄惁瀛樺湪
-            for (SnapRecord record : listSnap) {
-                record.setImgName(commonManager.isImgExit( record.getImgName(), null));
+            for (SnapRecord record : resultListSnap) {
+                record.setImgName(commonManager.isImgExit(record.getImgName(), null));
             }
         }
 
-        return new PageResponse<>(RespCodeEnum.CODE_0000, listSnap);
+        return new PageResponse<>(RespCodeEnum.CODE_0000, resultListSnap);
     }
 }
diff --git a/fzzy-igdss-web/src/main/resources/templates/group/index.html b/fzzy-igdss-web/src/main/resources/templates/group/index.html
index 5dddee8..fcc789d 100644
--- a/fzzy-igdss-web/src/main/resources/templates/group/index.html
+++ b/fzzy-igdss-web/src/main/resources/templates/group/index.html
@@ -458,9 +458,9 @@
 <script th:src="@{/common/igds-common.js}"></script>
 <script th:src="@{/group/mapList.js}"></script>
 <script th:src="@{/group/index.js}"></script>
-<script th:inline="javascript">    var userId = [[${loginUser.loginName}]];
-var companyId = [[${loginUser.companyId}]];
-
+<script th:inline="javascript">
+    var userId = [[${loginUser.loginName}]];
+    var companyId = [[${loginUser.companyId}]];
     var deptId = [[${deptId}]];
     var dicSlogan = [[${dicSlogan}]];
     var deptAllList = [[${deptAllList}]];

--
Gitblit v1.9.3