From 1068673dcf41cdf7a7a06a26aaeb5652d734eb2d Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期四, 27 十一月 2025 09:36:08 +0800
Subject: [PATCH] 添加是否允许超收判断 出库上报明细问题修复
---
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/TaskSchedules.java | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/TaskSchedules.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/TaskSchedules.java
index b0239c1..db94bf4 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/TaskSchedules.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/TaskSchedules.java
@@ -611,19 +611,30 @@
if (wkOrders.isEmpty()) {
throw new CoolException("鍗曟嵁涓嶅瓨鍦紒锛�");
}
+
+ Config allowChang = configService.getOne(new LambdaQueryWrapper<Config>().eq(Config::getFlag, GlobalConfigCode.ALLOW_OVER_CHANGE));
+
wkOrders.forEach(order -> {
- //妫�鏌ュ崟鎹槸鍚﹀畬鎴�
- if (order.getAnfme().compareTo(order.getQty()) == 0) {
- order.setExceStatus(AsnExceStatus.OUT_STOCK_STATUS_TASK_DONE.val);
-// if (order.getType().equals(OrderType.ORDER_IN)) {
-// order.setExceStatus(AsnExceStatus.ASN_EXCE_STATUS_TASK_DONE.val);
-// } else {
-// order.setExceStatus(AsnExceStatus.OUT_STOCK_STATUS_TASK_DONE.val);
-// }
- if (!asnOrderService.updateById(order)) {
- throw new CoolException("鍑哄簱鍗曟洿鏂扮姸鎬佸け璐�");
+ //鍒ゆ柇鏄惁鍏佽瓒呮敹锛屼笉鍏佽瓒呮敹娣诲姞鎷掓敹鍒ゆ柇
+ if (!Objects.isNull(allowChang)) {
+ if (!Boolean.parseBoolean(allowChang.getVal())) {
+ if (order.getAnfme().compareTo(order.getQty()) == 0) {
+ order.setExceStatus(AsnExceStatus.OUT_STOCK_STATUS_TASK_DONE.val);
+ if (!asnOrderService.updateById(order)) {
+ throw new CoolException("鍑哄簱鍗曟洿鏂扮姸鎬佸け璐�");
+ }
+ }
+ } else {
+ if (order.getAnfme().compareTo(order.getQty()) <= 0) {
+ order.setExceStatus(AsnExceStatus.OUT_STOCK_STATUS_TASK_DONE.val);
+ if (!asnOrderService.updateById(order)) {
+ throw new CoolException("鍑哄簱鍗曟洿鏂扮姸鎬佸け璐�");
+ }
+ }
}
}
+ //妫�鏌ュ崟鎹槸鍚﹀畬鎴�
+
});
//鍑哄簱鍗曚笂鎶CS淇敼搴撲綅鐘舵��
try {
--
Gitblit v1.9.1