From c0b1db400ceb1efa3f0456cd96c2c38fd42f5415 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 30 六月 2025 19:47:50 +0800
Subject: [PATCH] 1
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index 2961897..789257b 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -290,7 +290,7 @@
if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
throw new CoolException(BaseRes.PARAM);
}
-
+ HashMap<String, Object> comData = new HashMap<>();
param.getCombMats().forEach(elem -> {
// 鍒ゆ柇鏄惁鏈夌浉鍚屾潯鐮佺殑鏁版嵁
if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
@@ -299,7 +299,13 @@
.eq("matnr", elem.getMatnr()).eq("batch", elem.getBatch())) > 0) {
throw new CoolException(param.getBarcode() + "宸叉湁鐩稿悓鏁版嵁");
}
+ if (comData.get(elem.getThreeCode()) == null) {
+ comData.put(elem.getThreeCode(), elem);
+ } else {
+ throw new CoolException(elem.getThreeCode() + "璇ユ潯鐮佹壂鐮佷簡澶氭");
+ }
});
+
if (param.getBarcode().length() != 8) {
throw new CoolException("鏉$爜闀垮害涓嶆槸8浣�===>>" + param.getBarcode());
@@ -369,7 +375,7 @@
// 鐢熸垚鍏ュ簱閫氱煡妗�
List<DetlDto> detlDtos = new ArrayList<>();
- List<String> codes=new ArrayList<>();
+ List<String> codes = new ArrayList<>();
for (CombParam.CombMat elem : param.getCombMats()) {
codes.add(elem.getThreeCode());
}
@@ -473,11 +479,11 @@
} catch (IOException e) {
throw new RuntimeException(e);
}
- log.info("getData:{}",response);
+ log.info("getData:{}", response);
MesResponse jsonObject = JSON.parseObject(response, MesResponse.class);
if (jsonObject.getCode().equals(200)) {
JSONObject jsonObject1 = JSON.parseObject(jsonObject.getData());
- if (jsonObject1.getString("barcodeList")!=null){
+ if (jsonObject1.getString("barcodeList") != null) {
return JSON.parseArray(jsonObject1.getString("barcodeList"), CodeDataParam.class);
}
}
--
Gitblit v1.9.1