From 8655501ffb8dbdaf2508e575933063e6731be714 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 28 八月 2026 17:14:40 +0800
Subject: [PATCH] refactor(mes): 重构MES生产批次和袋码管理功能

---
 yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productsales/MesWmProductSalesServiceImpl.java |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productsales/MesWmProductSalesServiceImpl.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productsales/MesWmProductSalesServiceImpl.java
index c2a2cc6..00652fd 100644
--- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productsales/MesWmProductSalesServiceImpl.java
+++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/wm/productsales/MesWmProductSalesServiceImpl.java
@@ -228,6 +228,10 @@
         if (pallet == null && bag == null) {
             throw exception(WM_MATERIAL_STOCK_NOT_EXISTS);
         }
+        // 鏈粦瀹氱敓浜ф壒娆$殑涓存椂鎵樼洏涓嶅厑璁稿弬涓庨攢鍞嚭搴�
+        if (pallet != null && pallet.getBatchId() == null) {
+            throw exception(PRO_PALLET_NOT_BIND_BATCH);
+        }
         Long codeId = pallet != null ? pallet.getId() : bag.getId();
         MesWmProductSalesDetailDO existed = pallet != null
                 ? productSalesDetailMapper.selectBySalesIdAndPalletCodeId(reqVO.getSalesId(), codeId)

--
Gitblit v1.9.3