From 6bb66501148afcd970188ed122e2ee37908e3127 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 25 五月 2026 13:45:17 +0800
Subject: [PATCH] feat: 报工投入用“投入重量/数量”
---
src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
index 989b4e4..2ab812a 100644
--- a/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
@@ -55,7 +55,7 @@
private static final String PROCESS_VOLTAGE_SORT = "鐢靛帇鍒嗛��";
private static final String PROCESS_OPTICAL_INSPECTION = "鍏夋澶栬";
private static final String PROCESS_PACKAGING = "鍖呰";
- private static final String INPUT_WEIGHT_PARAMETER = "鎶曞叆閲嶉噺";
+ private static final String INPUT_WEIGHT_PARAMETER = "鎶曞叆閲嶉噺/鏁伴噺";
private static final String INPUT_WEIGHT_FIELD = "inputWeight";
private static final Object PRODUCT_MAIN_NO_LOCK = new Object();
@@ -204,9 +204,9 @@
BigDecimal previousCompleteQty =
previousWorkOrder.getCompleteQuantity() == null ? BigDecimal.ZERO : previousWorkOrder.getCompleteQuantity();
- if (currentReportedQty.add(reportQty).compareTo(previousCompleteQty) > 0) {
- throw new ServiceException("鏈鎶ュ伐鏁伴噺瓒呰繃涓婇亾宸ュ簭鍙祦杞暟閲�");
- }
+// if (currentReportedQty.add(reportQty).compareTo(previousCompleteQty) > 0) {
+// throw new ServiceException("鏈鎶ュ伐鏁伴噺瓒呰繃涓婇亾宸ュ簭鍙祦杞暟閲�");
+// }
List<ProductProcessRouteItem> previousItems = productProcessRouteItemMapper.selectList(
Wrappers.<ProductProcessRouteItem>lambdaQuery()
@@ -250,10 +250,10 @@
.filter(Objects::nonNull)
.reduce(BigDecimal.ZERO, BigDecimal::add);
}
- if (productWorkOrder.getPlanQuantity() != null
- && currentWorkOrderReportedQty.add(reportQty).compareTo(productWorkOrder.getPlanQuantity()) > 0) {
- throw new ServiceException("鏈鎶ュ伐鏁伴噺瓒呰繃宸ュ崟鍙姤鏁伴噺");
- }
+// if (productWorkOrder.getPlanQuantity() != null
+// && currentWorkOrderReportedQty.add(reportQty).compareTo(productWorkOrder.getPlanQuantity()) > 0) {
+// throw new ServiceException("鏈鎶ュ伐鏁伴噺瓒呰繃宸ュ崟鍙姤鏁伴噺");
+// }
// 绗簲姝ワ細鐢熸垚鎶ュ伐鍗曞彿骞剁‘瀹氭姤宸ヤ汉淇℃伅
String productNo;
@@ -778,7 +778,7 @@
try {
parsed = JSON.parse(otherData);
} catch (Exception ex) {
- throw new ServiceException("鎶ュ伐鍙傛暟鏍煎紡閿欒锛屾棤娉曡В鏋愭姇鍏ラ噸閲�");
+ throw new ServiceException("鎶ュ伐鍙傛暟鏍煎紡閿欒锛屾棤娉曡В鏋愭姇鍏ラ噸閲�/鏁伴噺");
}
String inputWeight = StringUtils.trim(findParameterValue(parsed, INPUT_WEIGHT_PARAMETER));
if (StringUtils.isBlank(inputWeight)) {
@@ -790,7 +790,7 @@
try {
return new BigDecimal(inputWeight);
} catch (NumberFormatException ex) {
- throw new ServiceException("鎶ュ伐鍙傛暟涓殑鎶曞叆閲嶉噺鏍煎紡閿欒");
+ throw new ServiceException("鎶ュ伐鍙傛暟涓殑鎶曞叆閲嶉噺/鏁伴噺鏍煎紡閿欒");
}
}
--
Gitblit v1.9.3