From eccad5a129106377a275be4f7cdc58e99e9b95d4 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 21 七月 2026 13:45:14 +0800
Subject: [PATCH] feat(mes): 实现库存移库功能
---
yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/service/item/MdmItemSkuService.java | 130 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 130 insertions(+), 0 deletions(-)
diff --git a/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/service/item/MdmItemSkuService.java b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/service/item/MdmItemSkuService.java
new file mode 100644
index 0000000..4944e36
--- /dev/null
+++ b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/service/item/MdmItemSkuService.java
@@ -0,0 +1,130 @@
+package cn.iocoder.yudao.module.mdm.service.item;
+
+import cn.iocoder.yudao.module.mdm.dal.dataobject.item.MdmItemSkuDO;
+import jakarta.validation.Valid;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
+
+/**
+ * MDM 鐗╂枡 SKU Service 鎺ュ彛
+ *
+ * @author 鑺嬮亾婧愮爜
+ */
+public interface MdmItemSkuService {
+
+ /**
+ * 鍒涘缓 SKU
+ *
+ * @param sku 鍒涘缓淇℃伅
+ * @return 缂栧彿
+ */
+ Long createItemSku(@Valid MdmItemSkuDO sku);
+
+ /**
+ * 鎵归噺鍒涘缓 SKU
+ *
+ * @param itemId 鐗╂枡缂栧彿
+ * @param skuList SKU 鍒楄〃
+ */
+ void createItemSkuList(Long itemId, List<MdmItemSkuDO> skuList);
+
+ /**
+ * 鏇存柊 SKU
+ *
+ * @param sku 鏇存柊淇℃伅
+ */
+ void updateItemSku(@Valid MdmItemSkuDO sku);
+
+ /**
+ * 鎵归噺鏇存柊 SKU
+ *
+ * @param itemId 鐗╂枡缂栧彿
+ * @param skuList SKU 鍒楄〃
+ */
+ void updateItemSkuList(Long itemId, List<MdmItemSkuDO> skuList);
+
+ /**
+ * 鍒犻櫎 SKU
+ *
+ * @param id 缂栧彿
+ */
+ void deleteItemSku(Long id);
+
+ /**
+ * 鍒犻櫎鐗╂枡鐨勬墍鏈� SKU
+ *
+ * @param itemId 鐗╂枡缂栧彿
+ */
+ void deleteItemSkuListByItemId(Long itemId);
+
+ /**
+ * 鑾峰緱 SKU
+ *
+ * @param id 缂栧彿
+ * @return SKU
+ */
+ MdmItemSkuDO getItemSku(Long id);
+
+ /**
+ * 鏍¢獙 SKU 瀛樺湪
+ *
+ * @param id 缂栧彿
+ * @return SKU
+ */
+ MdmItemSkuDO validateItemSkuExists(Long id);
+
+ /**
+ * 鏍¢獙 SKU 瀛樺湪涓斿惎鐢�
+ *
+ * @param id 缂栧彿
+ * @return SKU
+ */
+ MdmItemSkuDO validateItemSkuExistsAndEnable(Long id);
+
+ /**
+ * 鑾峰緱鐗╂枡鐨� SKU 鍒楄〃
+ *
+ * @param itemId 鐗╂枡缂栧彿
+ * @return SKU 鍒楄〃
+ */
+ List<MdmItemSkuDO> getItemSkuListByItemId(Long itemId);
+
+ /**
+ * 鑾峰緱 SKU 鍒楄〃
+ *
+ * @param ids 缂栧彿鏁扮粍
+ * @return SKU 鍒楄〃
+ */
+ List<MdmItemSkuDO> getItemSkuList(Collection<Long> ids);
+
+ /**
+ * 鑾峰緱 SKU Map
+ *
+ * @param ids 缂栧彿鏁扮粍
+ * @return SKU Map
+ */
+ default Map<Long, MdmItemSkuDO> getItemSkuMap(Collection<Long> ids) {
+ return convertMap(getItemSkuList(ids), MdmItemSkuDO::getId);
+ }
+
+ /**
+ * 鏍规嵁缂栫爜鑾峰彇 SKU
+ *
+ * @param code SKU 缂栫爜
+ * @return SKU
+ */
+ MdmItemSkuDO getItemSkuByCode(String code);
+
+ /**
+ * 鏍规嵁鏉$爜鑾峰彇 SKU
+ *
+ * @param barCode SKU 鏉$爜
+ * @return SKU
+ */
+ MdmItemSkuDO getItemSkuByBarCode(String barCode);
+
+}
\ No newline at end of file
--
Gitblit v1.9.3