From 99b5d3d7c950a8332f81d3ca07be9f2d5957f58c Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期六, 29 三月 2025 16:26:44 +0800
Subject: [PATCH] 1.期初入库优化

---
 service/base/WmsBaseMangeer.cs |   39 ++++++++++++++++++++++++++++++++++++---
 1 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/service/base/PdaJyMangeer.cs b/service/base/WmsBaseMangeer.cs
similarity index 71%
rename from service/base/PdaJyMangeer.cs
rename to service/base/WmsBaseMangeer.cs
index e0f07eb..f36b0e0 100644
--- a/service/base/PdaJyMangeer.cs
+++ b/service/base/WmsBaseMangeer.cs
@@ -1,4 +1,4 @@
-锘縩amespace NewPdaSqlServer.util
+锘縩amespace NewPdaSqlServer.service.@base
 {
     using NewPdaSqlServer.Dto.service;
     using NewPdaSqlServer.entity;
@@ -9,9 +9,10 @@
     using NewPdaSqlServer.DB;
     using System.Data;
     using System.Data.SqlClient;
+    using Microsoft.EntityFrameworkCore.Metadata.Internal;
 
 
-    public class PdaJyMangeer
+    public class WmsBaseMangeer : Repository<dynamic>
     {
 
         /// <summary>
@@ -26,7 +27,7 @@
         /// <param name="billNo">鐢宠鍗曞彿</param>
         /// <param name="transactionNo">浜嬪姟绫诲瀷</param>
         /// <returns>鍖呭惈鏍¢獙缁撴灉鐨勬暟鎹紶杈撳璞�</returns>
-        public ProductionPickDto SalesReturnCheck(SqlSugarScope db, string edtUserNo,
+        public dynamic pdaInvJY(SqlSugarScope db, string edtUserNo,
             string barcode, string sectionCode, string stockId, string stockOrgId,
             string billNo, string transactionNo)
         {
@@ -80,5 +81,37 @@
                 }
             }
         }
+
+        /// <summary>
+        /// 鑾峰彇鏉$爜淇℃伅
+        /// </summary>
+        /// <param name="unity"></param>
+        /// <returns></returns>
+        /// <exception cref="Exception"></exception>
+        public MesInvItemBarcodes GetBarInfo(WarehouseQuery unity)
+        {
+            var barInfo = Db.Queryable<MesInvItemBarcodes>()
+                .Where(s => s.ItemBarcode == unity.barcode)
+                .First();
+            if (barInfo is null) throw new Exception("璇ユ潯鐮佸簱瀛樹笉瀛樺湪锛�");
+
+            return barInfo; // 杩斿洖绗竴琛屾暟鎹紝濡傛灉娌℃湁鍒欒繑鍥� null
+        }
+
+        /// <summary>
+        /// 鑾峰彇鐗╂枡淇℃伅
+        /// </summary>
+        /// <param name="strItemId"></param>
+        /// <returns></returns>
+        /// <exception cref="Exception"></exception>
+        public MesItems GetItemNo(decimal strItemId)
+        {
+            var itemInfo = Db.Queryable<MesItems>()
+                .Where(s => s.Id == strItemId && s.Fforbidstatus == "A")
+                .First();
+            if (itemInfo is null) throw new Exception("璇ユ潯鐮佸搴旂墿鏂欎俊鎭笉瀛樺湪鎴栧凡绂佺敤锛�");
+
+            return itemInfo;
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3