From 0ce56b76c7674d85aece15274348af14710be95d Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期六, 13 九月 2025 17:30:19 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/条码管理/WEBSController.cs |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 53 insertions(+), 4 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 b551237..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))
@@ -3954,7 +4001,7 @@
                     //鏁伴噺涓庢簮鍗曟暟閲忎笉涓�鑷存椂锛屾洿鏂版潯鐮佸嚭鍏ュ簱涓存椂琛� HQty 瀛楁鍊�
                     if (item.HQty != item.HQtyMust)
                     {
-                        oCn.RunProc("Update KF_PonderationBillMain_Temp set HQty=" + item.HQty.ToString() + " where HInterID= " + websLsmain.HInterID.ToString() + " and HBillType='" + websLsmain.HBillType + "' and HSourceInterID= " + item.HSourceInterID.ToString() + " and HSourceEntryID= " + item.HSourceEntryID.ToString());
+                        oCn.RunProc("Update KF_PonderationBillMain_Temp set HQty2=" + item.HQty.ToString() + " where HInterID= " + websLsmain.HInterID.ToString() + " and HBillType='" + websLsmain.HBillType + "' and HSourceInterID= " + item.HSourceInterID.ToString() + " and HSourceEntryID= " + item.HSourceEntryID.ToString());
                     }
                 }
 
@@ -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))
@@ -9762,11 +9810,12 @@
         /// <returns></returns>
         [Route("WEBSController/GetGy_BarCodeBill_QiaoYi_PDA_Json")]
         [HttpGet]
-        public object GetGy_BarCodeBill_QiaoYi_PDA_Json(string sWhere)
+        public object GetGy_BarCodeBill_QiaoYi_PDA_Json(string sBarCode, string sBarCodeOutDate, string sCustomerName, string sSellOutBillNo)
         {
             try
             {
-                ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillList_QiaoYi '" + sWhere+ "'", "h_p_Gy_BarCodeBillList_QiaoYi");
+                //ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillList_QiaoYi '" + sBarCode+ "'", "h_p_Gy_BarCodeBillList_QiaoYi");
+                ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillList_QiaoYi2 '" + sBarCode + "','" + sBarCodeOutDate + "','" + sCustomerName + "','" + sSellOutBillNo + "'", "h_p_Gy_BarCodeBillList_QiaoYi2");
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";

--
Gitblit v1.9.1