From 73e1fe9e92ccd8665ec72803856ab02b17b35a08 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期二, 07 四月 2026 16:28:05 +0800
Subject: [PATCH] Merge branch 'dev_长治_健齿齿科器材' of http://114.132.189.42:9002/r/product-inventory-management-after into dev_长治_健齿齿科器材
---
src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java | 9 +++++++++
1 files changed, 9 insertions(+), 0 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 f46baa1..8b2b427 100644
--- a/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
@@ -93,6 +93,7 @@
}
@Override
+ @Transactional(rollbackFor = Exception.class)
public Boolean addProductMain(ProductionProductMainDto dto) {
SysUser user = userMapper.selectUserById(dto.getUserId());
ProductionProductMain productionProductMain = new ProductionProductMain();
@@ -177,6 +178,12 @@
Long modelId = drawMaterial.getProductModelId();
BigDecimal reportQty = drawMaterial.getReportQty();
+ if (reportQty != null && reportQty.compareTo(new BigDecimal(0)) == 0) {
+ throw new RuntimeException("浜у搧" + drawMaterial.getProductName() + "- 鍨嬪彿" + drawMaterial.getModel() +
+ "- 鎵规鍙�=" + drawMaterial.getBatchNo() + "鐨勬枡宸茬敤瀹岋紝璇烽噸鏂伴鏂�");
+
+ }
+
String key = drawMaterial.getProductModelId() + "_" +
(drawMaterial.getBatchNo() == null ? "" : drawMaterial.getBatchNo()) + "_" +
(drawMaterial.getCustomer() == null ? "" : drawMaterial.getCustomer());
@@ -216,6 +223,8 @@
order.setDrawMaterials(JSON.toJSONString(existingMaterialList));
productOrderMapper.updateById(order);
}
+ }else {
+ throw new RuntimeException("璇烽鍙栨姇鍏ユ潗鏂�");
}
/*鏂板鎶ュ伐浜у嚭琛�*/
ProductionProductOutput productionProductOutput = new ProductionProductOutput();
--
Gitblit v1.9.3