From b2f1ff879839b5cd3fd093527a39ad73cb16a61c Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 22 九月 2025 09:52:57 +0800
Subject: [PATCH] 1

---
 src/main/java/com/zy/asrs/task/handler/GhjtHandler.java |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/handler/GhjtHandler.java b/src/main/java/com/zy/asrs/task/handler/GhjtHandler.java
index 2bee97c..c7022d6 100644
--- a/src/main/java/com/zy/asrs/task/handler/GhjtHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/GhjtHandler.java
@@ -24,6 +24,7 @@
 
 import javax.annotation.Resource;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 /**
@@ -101,6 +102,7 @@
                     .setPath(MesConstant.GWCS_DCKK_URL)
                     .setHeaders(headers)
                     .setJson(body)
+                    .setTimeout(30, TimeUnit.SECONDS) // 璁剧疆杩炴帴 + 璇诲彇瓒呮椂涓�30绉�
                     .build()
                     .doPost();
             if (!Cools.isEmpty(response)) {
@@ -390,12 +392,52 @@
         if (config == null) {
             throw new CoolException("鐞嗚揣鑾峰彇澶囪揣鍖洪厤缃敊璇紒锛侊紒");
         }
+        Config chang = configMapper.selectConfigByCode("auto_tally_goods_chang");
+        if (chang == null) {
+            throw new CoolException("鐞嗚揣鑾峰彇澶囪揣鍖洪暱搴﹂厤缃敊璇紒锛侊紒");
+        }
+        Config kuan = configMapper.selectConfigByCode("auto_tally_goods_kuan");
+        if (kuan == null) {
+            throw new CoolException("鐞嗚揣鑾峰彇澶囪揣鍖哄搴﹂厤缃敊璇紒锛侊紒");
+        }
+        Config gao = configMapper.selectConfigByCode("auto_tally_goods_gao");
+        if (gao == null) {
+            throw new CoolException("鐞嗚揣鑾峰彇澶囪揣鍖洪珮搴﹂厤缃敊璇紒锛侊紒");
+        }
+
         // 鍓嶅嚑鍒楁槸澶囪揣鍖�
         int columnNum = Integer.parseInt(config.getValue());
 
         // 瀵绘壘涓�绠变竴鍗风殑锛屾病鏈夌悊璐х殑锛屼笉鍦ㄥ璐у尯鐨勭墿鏂欐槑缁�
         List<LocDetl> tallyGoosList = locDetlMapper.selectTallyGoosList(columnNum);
 
+        // 杩囨护鎺夋湪绠辫鏍煎搴﹀ぇ浜�600鐨�(澶т簬600涓�涓墭鐩樺彧鑳芥斁涓�绠�)
+        tallyGoosList = tallyGoosList.stream().filter(locDetl -> {
+            String[] split = locDetl.getColor().split("\\*");
+            if (split.length == 3) {
+                // 楂樺害涔熻浣庝簬614鎵嶈兘鐞嗚揣
+                //return Integer.parseInt(split[1]) <= 600 && Integer.parseInt(split[2]) <= 614;
+                //鏂伴�昏緫
+                String[] changLimit = chang.getValue().split("-");
+                if (changLimit.length == 2){
+                    if (Integer.parseInt(split[0]) >= Integer.parseInt(changLimit[0]) && Integer.parseInt(split[0]) <= Integer.parseInt(changLimit[1])){
+                        String[] kuanLimit = chang.getValue().split("-");
+                        if (kuanLimit.length == 2){
+                            if (Integer.parseInt(split[1]) >= Integer.parseInt(kuanLimit[0]) && Integer.parseInt(split[1]) <= Integer.parseInt(kuanLimit[1])){
+                                String[] gaoLimit = gao.getValue().split("-");
+                                if (gaoLimit.length == 2){
+                                    if (Integer.parseInt(split[2]) >= Integer.parseInt(gaoLimit[0]) && Integer.parseInt(split[2]) <= Integer.parseInt(gaoLimit[1])){
+                                        return true;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+                return false;
+        }).collect(Collectors.toList());
+
         // 瀵绘壘婊¤冻鐞嗚揣鏉′欢鐨勪袱涓湪绠�
         LocDetl leftLocDetl = null;
         LocDetl rightLocDetl = null;

--
Gitblit v1.9.1