From 5701eb6693c654d53f1bba460eb3a417d495b344 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期三, 11 六月 2025 17:31:53 +0800
Subject: [PATCH] bug修复;下发任务给rcs携带货架码
---
src/main/java/com/zy/asrs/controller/OrderController.java | 43 +++++++++++++++++++++++++++++++++++--------
1 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/OrderController.java b/src/main/java/com/zy/asrs/controller/OrderController.java
index 50a5d9c..c96b978 100644
--- a/src/main/java/com/zy/asrs/controller/OrderController.java
+++ b/src/main/java/com/zy/asrs/controller/OrderController.java
@@ -231,7 +231,7 @@
if (o != null) {
String[] split = o.toString().split(",");
if (split[0].equals("39")) {
- wrapper.in("source", split).andNew().like("matnr", "401", SqlLike.RIGHT).or().like("matnr", "402", SqlLike.RIGHT);
+ wrapper.andNew().like("matnr", "401", SqlLike.RIGHT).or().like("matnr", "402", SqlLike.RIGHT).andNew().in("source", split);
} else {
wrapper.in("source", split);
}
@@ -245,7 +245,6 @@
// docIds.add(pakin.getDocId());
// }
// }
-
return R.ok(orderDetlService.selectPage(new Page<>(curr, limit), wrapper));
}
@@ -304,7 +303,7 @@
List<DocType> pakins = docTypeService.selectList(new EntityWrapper<DocType>().eq("pakin", 1));
List<Long> docIds = new ArrayList<>();
for (DocType pakin : pakins) {
- if (pakin.getDocId() == 36 || pakin.getDocId() == 39) {
+ if (pakin.getDocId() == 36 || pakin.getDocId() == 39 || pakin.getDocId() == 19) {
docIds.add(pakin.getDocId());
}
}
@@ -393,7 +392,7 @@
// wrapper.in("source", docIds);
Page<OrderDetl> page = orderDetlService.selectPage(new Page<>(curr, limit), wrapper);
for (OrderDetl record : page.getRecords()) {
- Double sumAnfme = agvLocDetlService.getSumAnfmeDb(record.getMatnr(), record.getThreeCode(), 1);
+ Double sumAnfme = agvLocDetlService.getSumAnfmeDb2(record.getMatnr(), record.getThreeCode(), 1);
record.setStock(sumAnfme == null ? 0 : sumAnfme);
}
return R.ok(page);
@@ -442,6 +441,14 @@
return R.error("鍗曟嵁缂栧彿宸插瓨鍦�");
}
Date now = new Date();
+ if (param.getDocType() == 33) {
+ for (OrderDetl orderDetl : param.getOrderDetlList()) {
+ if (orderDetl.getMatnr().startsWith("401") || orderDetl.getMatnr().startsWith("402")) {
+ param.setOrderNo("DC" + param.getOrderNo());
+ break;
+ }
+ }
+ }
order = new Order(
String.valueOf(snowflakeIdWorker.nextId()), // 缂栧彿[闈炵┖]
param.getOrderNo(), // 璁㈠崟缂栧彿
@@ -559,9 +566,15 @@
}
}
if (param.getDocType().intValue() == 32) {
+ String ono = "DB";
+ for (OrderDetl orderDetl : param.getOrderDetlList()) {
+ if (orderDetl.getMatnr().startsWith("401") || orderDetl.getMatnr().startsWith("402")) {
+ ono = "DC";
+ }
+ }
order = new Order(
String.valueOf(snowflakeIdWorker.nextId()), // 缂栧彿[闈炵┖]
- "DB" + param.getOrderNo(), // 璁㈠崟缂栧彿
+ ono + param.getOrderNo(), // 璁㈠崟缂栧彿
DateUtils.convert(now), // 鍗曟嵁鏃ユ湡
33L, // 鍗曟嵁绫诲瀷
null, // 椤圭洰缂栧彿
@@ -949,13 +962,17 @@
}
@RequestMapping(value = "/order/update/auth")
- @ManagerAuth
+ @ManagerAuth(memo = "淇敼璁㈠崟鐘舵��")
public R update(Order order) {
if (Cools.isEmpty(order) || null == order.getId()) {
return R.error("鍙傛暟缂哄け");
}
order.setUpdateBy(getUserId());
order.setUpdateTime(new Date());
+ Long settle = order.getSettle();
+ if (settle != null && settle == 6) {
+ order.setMemo(Cools.isEmpty(order.getMemo()) ? "鎵嬪姩瀹岀粨" : order.getMemo() + "鎵嬪姩瀹岀粨");
+ }
if (!orderService.updateById(order)) {
throw new CoolException("淇敼璁㈠崟澶辫触");
}
@@ -1185,7 +1202,12 @@
}
// 鐢熸垚璋冩嫧鍗�
if (docType.getDocId().intValue() == 32) {
- String dbUuid = "DB" + odNo;
+ String dbUuid;
+ if (!Cools.isEmpty(matnr) && (matnr.startsWith("401") || matnr.startsWith("402"))) {
+ dbUuid = "DC" + odNo;
+ } else {
+ dbUuid = "DB" + odNo;
+ }
Order order2 = orderService.selectByNo(dbUuid);
if (null == order2) {
order2 = new Order(
@@ -1452,7 +1474,12 @@
odNo += "_O";
}
if (docName.contains("璋冩嫧鍗�")) {
- odNo = "DB" + odNo;
+ if (!Cools.isEmpty(matnr) && (matnr.startsWith("401") || matnr.startsWith("402"))) {
+ odNo = "DC" + odNo;
+ } else {
+ odNo = "DB" + odNo;
+ }
+ //odNo = "DB" + odNo;
} else if (docName.contains("鍔犲伐鍗�")) {
odNo = "JG" + odNo;
} else {
--
Gitblit v1.9.1