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 | 40 ++++++++++++++++++++++++++++++++++++---- 1 files changed, 36 insertions(+), 4 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 c54c985..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,6 +392,19 @@ 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()); @@ -399,11 +414,28 @@ // 杩囨护鎺夋湪绠辫鏍煎搴﹀ぇ浜�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; - } else { - return false; + 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()); // 瀵绘壘婊¤冻鐞嗚揣鏉′欢鐨勪袱涓湪绠� -- Gitblit v1.9.1