From 122e343b705b057e71f1ef677d18237900844a16 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 12 九月 2025 10:51:37 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/条码管理/WEBSController.cs |   50 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 49 insertions(+), 1 deletions(-)

diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index 2b95002..de6c9fb 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -381,12 +381,50 @@
             {
                 Int64 HWhID = 0;
                 HWhID = DBUtility.ClsPub.isLong(HBarCode.Replace("HWH", ""));
-                ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HSPFlag from Gy_Warehouse with(nolock) where HStopflag=0 and HItemID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Warehouse");
+                ds = oCn.RunProcReturn("exec h_p_Gy_Warehouse_PDA " + HWhID.ToString() + "," + HStockOrgID.ToString(), "h_p_Gy_Warehouse_PDA");
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
                     objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵粨搴撴潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "杩斿洖浠撳簱淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        /// <summary>
+        /// 鑾峰彇PDA浠撳簱鍒楄〃淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetWarehouseList_Json")]
+        [HttpGet]
+        public object GetWarehouseList_Json(string Warehouse, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_Gy_WarehouseList_PDA '" + Warehouse + "'," + HStockOrgID.ToString(), "h_p_Gy_WarehouseList_PDA");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍浠撳簱璁板綍锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -2511,6 +2549,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1202";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveProductInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -2652,6 +2691,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1201";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SavePOStockInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -2877,6 +2917,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1203";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveOtherInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3031,6 +3072,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1204";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveMateOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3271,6 +3313,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1205";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveSellOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3410,6 +3453,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1211";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveEntrustOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3548,6 +3592,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1206";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveOtherOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3685,6 +3730,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1254";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveMateReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3744,6 +3790,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1255";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveEntrustReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -4031,6 +4078,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1207";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveMoveStockBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))

--
Gitblit v1.9.1