From e012a72a5660566d698c93ca4f29b6e5ffe997b0 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期三, 29 十月 2025 16:47:35 +0800
Subject: [PATCH] 3077,3106只有合格能出,2041 只有待判能出
---
src/main/java/com/zy/asrs/task/handler/GhjtHandler.java | 38 +++++++++++++++++++++++++++++++++++---
1 files changed, 35 insertions(+), 3 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 b9cef6a..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());
@@ -400,10 +415,27 @@
tallyGoosList = tallyGoosList.stream().filter(locDetl -> {
String[] split = locDetl.getColor().split("\\*");
if (split.length == 3) {
- return Integer.parseInt(split[1]) <= 600;
- } else {
- return false;
+ // 楂樺害涔熻浣庝簬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