From f3cd0e49e7a9416516067857a2f71d3bbba1aabe Mon Sep 17 00:00:00 2001
From: jhz <jhz@hz-kingdee.com>
Date: 星期日, 27 十一月 2022 21:37:53 +0800
Subject: [PATCH] 新增其他出库扫描源单方法

---
 CLOUDWEB/WebService1.asmx.cs |   99 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 99 insertions(+), 0 deletions(-)

diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs
index 35dce5d..404be34 100644
--- a/CLOUDWEB/WebService1.asmx.cs
+++ b/CLOUDWEB/WebService1.asmx.cs
@@ -41816,6 +41816,95 @@
 
         #endregion
 
+        #region 鍏朵粬鍑哄簱    鎵弿婧愬崟鏉$爜
+
+        [WebMethod]
+        public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_OtherOut(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
+            Int64 sMulSourceFlag = 0;   //澶氭簮鍗曟爣蹇楋紙0涓洪潪澶氭簮鍗曟ā寮忥紝1涓哄婧愬崟妯″紡锛�
+
+            //鑾峰彇绯荤粺鍙傛暟
+            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+            if (oSystemParameter.ShowBillByOrgID(HOWNERID, ref sErrMsg) == false)
+            {
+                sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔簮鍗曟椂鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+                return null;
+            }
+
+            if (oSystemParameter.omodel.Kf_OtherOutBill_MulSourceBill.ToUpper() == "Y") //绯荤粺鍙傛暟  鍏朵粬鍑哄簱鍗�-澶氭簮鍗曟ā寮�
+            {
+                sMulSourceFlag = 1;
+            }
+
+            //灏嗘簮鍗曚俊鎭瓨鍏ユ潯鐮佸嚭鍏ュ簱涓存椂琛�
+            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_OtherOut " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceBarCode_OtherOut");
+            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
+            {
+                sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涘皢婧愬崟淇℃伅瀛樺叆鏉$爜鍑哄叆搴撲复鏃惰〃澶辫触锛�";
+                return null;
+            }
+            else
+            {
+                if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0)
+                {
+                    //鍏堣繘鍏堝嚭鎺у埗
+                    if (oSystemParameter.omodel.Kf_OtherOutBill_FIFOCtl == "Y")  //绯荤粺鍙傛暟  鍏朵粬鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+                    {
+                        DataSet FIFO = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFO_OtherOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceFIFO_OtherOut");
+                        if (FIFO == null || FIFO.Tables[0].Rows.Count == 0)
+                        {
+                            sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涘瓨鍏ュ厛杩涘厛鍑轰复鏃惰〃澶辫触锛�";
+                            return null;
+                        }
+                        else
+                        {
+                            if (DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0][0]) == 1)
+                            {
+                                sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛�" + DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HRemark"]);
+                                return null;
+                            }
+                        }
+                    }
+                    //鍏堣繘鍏堝嚭涓嬫灦娓呭崟
+                    else if (oSystemParameter.omodel.Kf_OtherOutBill_FIFOList == "Y")  //绯荤粺鍙傛暟  鍏朵粬鍑哄簱鍗�-鍏堣繘鍏堝嚭涓嬫灦娓呭崟
+                    {
+                        DataSet FIFOList = oCn.RunProcReturn("exec h_p_WMS_AddSourceFIFOList_OtherOut " + HInterID.ToString() + ",'" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + HFIFOWhID.ToString() + "," + HOWNERID.ToString(), "h_p_WMS_AddSourceFIFOList_OtherOut");
+                        if (FIFOList == null || FIFOList.Tables[0].Rows.Count == 0)
+                        {
+                            sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涘瓨鍏ュ厛杩涘厛鍑轰笅鏋舵竻鍗曞け璐ワ紒";
+                            return null;
+                        }
+                        else
+                        {
+                            if (DBUtility.ClsPub.isLong(FIFOList.Tables[0].Rows[0][0]) == 1)
+                            {
+                                sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛�" + DBUtility.ClsPub.isStrNull(FIFOList.Tables[0].Rows[0]["HRemark"]);
+                                return null;
+                            }
+                        }
+                    }
+                    oBar.HBarType = "婧愬崟鏉$爜";
+                    oBar.HMulSourceFlag = sMulSourceFlag;
+                    oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]);
+                    oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]);
+                    oBar.HSupID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSupID"]);
+                    oBar.HSupName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSupName"]);
+                    oBar.HDeptID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HDeptID"]);
+                    oBar.HDeptName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HDeptName"]);
+                    return oBar;
+                }
+                else
+                {
+                    sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛�" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
+                    return null;
+                }
+            }
+        }
+
+        #endregion
+
         #region 鐩存帴璋冩嫧    鎵弿婧愬崟鏉$爜
 
         [WebMethod]
@@ -42555,6 +42644,16 @@
                 {
                     sMulSourceCtl = "Y";
                 }
+                //鍏堣繘鍏堝嚭鎺у埗锛�'Y'涓烘帶鍒讹級
+                if (oSystemParameterMain.Kf_OtherOutBill_FIFOCtl.ToUpper() == "Y")
+                {
+                    sFIFOCtl = "Y";
+                }
+                //鏄惁鍚敤澶氭簮鍗曟壂鐮佹ā寮忥紙'Y'涓哄惎鐢級
+                if (oSystemParameterMain.Kf_OtherOutBill_MulSourceBill.ToUpper() == "Y")
+                {
+                    sMulSourceCtl = "Y";
+                }
             }
             //濮斿鍑哄簱鍗�
             else if (HBillType == "1211")

--
Gitblit v1.9.1