From c455612b03e6ecac994884dde5b5f4bc4909c181 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 11 三月 2025 17:12:52 +0800
Subject: [PATCH] 1

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs"
index 166af4f..9bc3cd4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs"
@@ -34,6 +34,44 @@
             return stockInfo;
         }
         /// <summary>
+        /// 娣诲姞绌烘墭鐩樼粍鐩樹俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        public WebResponseContent AddStockEmpty(string palletCode)
+        {
+            try
+            {
+                Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == "Empty000");
+                if (materielInfo == null) throw new Exception($"鏈壘鍒扮┖鎵樼洏淇℃伅,鐗╂枡缂栧彿銆怑mpty000銆�");
+                Dt_StockInfo stockInfo = new Dt_StockInfo()
+                {
+                    PalletCode = palletCode,
+                    StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt(),
+                    Creater = "System",
+                    Details = new List<Dt_StockInfoDetail>()
+                };
+                Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail()
+                {
+                    Status = StockStatusEmun.鍏ュ簱纭.ObjToInt(),
+                    OrderNo = DateTime.Now.ToString("yyMMdd"),
+                    StockId = stockInfo.Id != 0 ? stockInfo.Id : 0,
+                    MaterielName = materielInfo.MaterielName,
+                    MaterielCode = materielInfo.MaterielCode,
+                    BatchNo = DateTime.Now.ToString("yyMMdd") + "E",
+                    StockQuantity = 1,
+                    SerialNumber = "",
+                    Creater = "System"
+                };
+                stockInfo.Details.Add(stockInfoDetail);
+                AddMaterielGroup(stockInfo);
+                return WebResponseContent.Instance.OK();
+            }
+            catch (Exception ex)
+            {
+                return WebResponseContent.Instance.Error(ex.Message);
+            }
+        }
+        /// <summary>
         /// 娣诲姞缁勭洏/搴撳瓨淇℃伅
         /// </summary>
         /// <returns></returns>

--
Gitblit v1.9.3