From e2ab7b6adeee3609a31a42f4b4c4960b20ece119 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期一, 19 八月 2024 16:02:44 +0800
Subject: [PATCH] 森楷扫描物料条码调用方法修改

---
 CLOUDWEB/WebService1.asmx.cs |   30 +++++++++++++++++++-----------
 1 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs
index 70a359a..b9c2950 100644
--- a/CLOUDWEB/WebService1.asmx.cs
+++ b/CLOUDWEB/WebService1.asmx.cs
@@ -9940,6 +9940,10 @@
                         {
                             sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100001\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},";
                         }
+                        else if (oSystemParameterMain.WMS_CampanyName == "妫シ") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
+                        {
+                            sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100003\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},";
+                        }
                         else
                         {
                             sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},";
@@ -43903,8 +43907,8 @@
                     }
                     return oBar;
                 }
-                //鍏朵粬鍏ュ簱銆佸叾浠栧嚭搴�  妫シ涓撶敤
-                else if ((HBillType == "1203" || HBillType == "1206") && oSystemParameter.omodel.WMS_CampanyName == "妫シ") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
+                //鍏朵粬鍏ュ簱  妫シ涓撶敤
+                else if (HBillType == "1203" && oSystemParameter.omodel.WMS_CampanyName == "妫シ") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
                 {
                     //鍒ゆ柇鏄惁鍚敤涓�閿壂鐮佹ā寮忥紝Y涓哄惎鐢紝鏈惎鐢ㄦ椂鍙壂鎻忕墿鏂欐潯鐮�
                     if (oSystemParameter.omodel.WMS_OneKeyMode.ToUpper() == "N")
@@ -44929,7 +44933,7 @@
                     }
                     return oBar;
                 }
-                //鍏朵粬鍏ュ簱  妫シ涓撶敤
+                //鍏朵粬鍏ュ簱  妫シ涓撶敤锛堜綔搴燂紝涓嶈皟鐢級
                 else if (HBillType == "1203" && oSystemParameter.omodel.WMS_CampanyName == "妫シ") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
                 {
                     //鏍规嵁鍗曚釜鏉$爜鑾峰彇瀵瑰簲鏁存墭鏉$爜淇℃伅鍐欏叆鏉$爜鍑哄叆搴撲复鏃惰〃
@@ -45873,7 +45877,8 @@
             if (dal.GetInfoByNumber_View(sBarCode))
             {
                 //鏍规嵁鍗曚釜鏉$爜鑾峰彇瀵瑰簲鏁存墭鏉$爜淇℃伅
-                DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'", "h_p_WMS_BeforeCheckToBarCode_ScanStyle");
+                //DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'", "h_p_WMS_BeforeCheckToBarCode_ScanStyle");
+                DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle_New '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'," + HOWNERID.ToString(), "h_p_WMS_BeforeCheckToBarCode_ScanStyle_New");
                 if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
                 {
                     sErrMsg = "鑾峰彇鏁存墭鏉$爜淇℃伅鍙戠敓閿欒锛�";
@@ -45901,6 +45906,7 @@
                     }
                     else
                     {
+                        dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HMaterID"]);
                         dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HSourceBillNo"]);
                         dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceEntryID"]);
                         dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceInterID"]);
@@ -46062,7 +46068,7 @@
                 ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" +
                 ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" +
                 ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate) " +
-                " select " + model.HInterID.ToString() + ",'" + model.HBillNo + "','" + model.HBillType + "',HMaterID,HAuxPropID," + model.HProcID.ToString() +
+                " select " + model.HInterID.ToString() + ",'" + model.HBillNo + "','" + model.HBillType + "'," + model.HMaterID.ToString() + ",HAuxPropID," + model.HProcID.ToString() +
                 "," + model.HWhID.ToString() + "," + model.HSCWHID.ToString() + "," + model.HStockPlaceID.ToString() + "," + model.HOutStockPlaceID.ToString() + "," + model.HGroupID.ToString() + ",'" + model.HAddr + "'" +
                 "," + model.HQtyMust.ToString() + ",HQty," + model.HPieceQty.ToString() + ",HBatchNo,HBarCode,''" +
                 ",'" + model.HMaker + "',getdate()" +
@@ -46072,9 +46078,9 @@
                 ",case when '" + model.HBillType + "'='1203' then HSourceBillNo else '" + model.HSourceBillNo + "' end" +
                 "," + model.HRelationInterID.ToString() + "," + model.HRelationEntryID.ToString() + ",'" + model.HRelationBillNo + "'," + Convert.ToString(model.HRedBlueFlag ? 1 : 0) + ",'" + model.HMTONo + "',0" +
                 "," + model.HSTOCKORGID.ToString() + "," + model.HOWNERID.ToString() + "," + model.HSTOCKORGID.ToString() + ",'','','" + model.HSubBillType + "'" +
-                ",0,0,'" + model.HCusBarCode + "'," + model.HMulSourceBill.ToString() + ",HProduceDate,HExpiryDate" +
+                ",0,0,'" + model.HCusBarCode + "'," + model.HMulSourceBill.ToString() + ",HProduceDate,HExpiryDate " +
                 //"from  Gy_BarCodeBill with(nolock) where charindex(',' + HBarCode + ',',',' + '" + sBarCode_New + "' + ',')>0"
-                "from  Gy_BarCodeBill with(nolock) where  HBarCode in (" + sBarCode_New + ")"
+                " from  Gy_BarCodeBill with(nolock) where  HBarCode in (" + sBarCode_New + ")"
                 );
                 return true;
             }
@@ -48631,7 +48637,7 @@
                 return null;
             }
 
-            if (HBillType == "1205" && oSystemParameter.omodel.WMS_CampanyName == "妫シ")
+            if ((HBillType == "1205" || HBillType == "1206") && oSystemParameter.omodel.WMS_CampanyName == "妫シ")
             {
                 oBar = get_CheckTypeByBarCode_New(sBarCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HCustom1, HScanStyle, ref sErrMsg);
                 if (oBar == null)
@@ -52069,7 +52075,8 @@
             }
 
             //鏍规嵁鍗曚釜鏉$爜鑾峰彇瀵瑰簲鏁存墭鏉$爜淇℃伅
-            DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'", "h_p_WMS_BeforeCheckToBarCode_ScanStyle");
+            //DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'", "h_p_WMS_BeforeCheckToBarCode_ScanStyle");
+            DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToBarCode_ScanStyle_New '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillType + "','" + HScanStyle + "'," + HStockOutOrgID.ToString(), "h_p_WMS_BeforeCheckToBarCode_ScanStyle_New");
             if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
             {
                 sErrMsg = "鑾峰彇鏁存墭鏉$爜淇℃伅鍙戠敓閿欒锛�";
@@ -52089,6 +52096,7 @@
                 }
                 else
                 {
+                    omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HMaterID"]);
                     omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HSourceBillNo"]);
                     omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceEntryID"]);
                     omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceInterID"]);
@@ -52201,7 +52209,7 @@
                 ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" +
                 ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" +
                 ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate) " +
-                " select " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "',HMaterID,HAuxPropID," + oMain.HProcID.ToString() +
+                " select " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'," + oMain.HMaterID.ToString() + ",HAuxPropID," + oMain.HProcID.ToString() +
                 "," + oMain.HWhID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + "," + oMain.HGroupID.ToString() + ",'" + oMain.HAddr + "'" +
                 "," + oMain.HQtyMust.ToString() + ",HQty," + oMain.HPieceQty.ToString() + ",HBatchNo,HBarCode,''" +
                 ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() + "," + oMain.HSourceEntryID.ToString() + ",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" +
@@ -52209,7 +52217,7 @@
                 "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','',0" +
                 ",0,0,'" + oMain.HCusBarCode + "',0,HProduceDate,HExpiryDate" +
                 //"from  Gy_BarCodeBill with(nolock) where charindex(',' + HBarCode + ',',',' + '" + sBarCode_New + "' + ',')>0"
-                "from  Gy_BarCodeBill with(nolock) where  HBarCode in (" + sBarCode_New + ")"
+                " from  Gy_BarCodeBill with(nolock) where  HBarCode in (" + sBarCode_New + ")"
                 );
             return true;
         }

--
Gitblit v1.9.1