From 317bcdd87f10e49b4c6be4b2baf576e4d24ebadb Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期六, 08 一月 2022 23:13:57 +0800
Subject: [PATCH] 新增生产拆箱模块调用方法

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

diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs
index db14b40..4ee7c3a 100644
--- a/CLOUDWEB/WebService1.asmx.cs
+++ b/CLOUDWEB/WebService1.asmx.cs
@@ -34319,6 +34319,147 @@
         #endregion
 
 
+        #region 鐢熶骇瑁呯銆佹媶绠辨ā鍧楄皟鐢ㄦ柟娉�
+
+        #region 鎵弿鎵樻潯鐮�
+
+        [WebMethod]
+        public Model.ClsKf_ICStockBill_WMS get_CheckTypeByPackBarCode_Pack(Int64 HInterID, string HBillNo, string HBillType, string HBarCode_Pack, string HHMaker, Int64 HOWNERID, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
+
+            DataSet ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_Temp_AddPackBarCode_Pack " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HHMaker + "'," + HOWNERID.ToString(), "h_p_KF_PonderationBillMain_Temp_AddPackBarCode_Pack");
+            if (ds == null || ds.Tables[0].Rows.Count == 0)
+            {
+                sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔墭鏉$爜鑾峰彇缁勬墭鍗曚俊鎭け璐ワ紒";
+                return null;
+            }
+            else
+            {
+                if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
+                {
+                    oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSourceBillNo"]);
+                    return oBar;
+                }
+                else
+                {
+                    sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔墭鏉$爜澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                    return null;
+                }
+            }
+        }
+
+        #endregion
+
+        #region 鐢熶骇鎷嗙妯″潡    鎵弿鎷嗙鏉$爜
+
+        [WebMethod]
+        public bool get_CheckTypeByBarCode_PackSplit(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HOWNERID, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+            DataSet ds = oCN.RunProcReturn("exec h_p_WMS_AddBarCode_PackSplit '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddBarCode_PackSplit");
+            if (ds == null || ds.Tables[0].Rows.Count == 0)
+            {
+                sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忔媶绠辨潯鐮佸け璐ワ紒";
+                return false;
+            }
+            else
+            {
+                if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
+                {
+                    return true;
+                }
+                else
+                {
+                    sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                    return false;
+                }
+            }
+        }
+
+        #endregion
+
+        #region 鐢熶骇瑁呯銆佹媶绠辨ā鍧楋紝杩斿洖鍒楄〃淇℃伅
+
+        [WebMethod]
+        public DataSet GetBillEntry_TmpList_Pack(Int64 HInterID, string HBillNo, string HBillType, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            DataSet DS = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmpList_Pack " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_BillEntryTmpList_Pack");
+            return DS;
+        }
+
+        #endregion
+
+        #region 涓婁紶鐢熸垚鐢熶骇鎷嗙鍗�
+
+        [WebMethod]
+        public bool set_SavePackSplitBill_New(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HOWNERID, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            try
+            {
+                oCn.BeginTran();
+                DataSet ds = oCn.RunProcReturn("exec h_p_Sc_PackSplitBill_Insert " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_Sc_PackSplitBill_Insert");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涗笂浼犲け璐ワ紒";
+                    oCn.RollBack();
+                    return false;
+                }
+                else
+                {
+                    if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
+                    {
+                        //鏍规嵁缁勬墭鍗曞瓙琛ㄤ俊鎭噸鏂扮敓鎴愮粍鎵樺崟姹囨�诲瓙琛紝灏嗘眹鎬诲瓙琛ㄤ腑鏉$爜鍐欏叆鏉$爜妗f
+                        Int64 HPackUnionInterID = Pub_Class.ClsPub.isLong(ds.Tables[0].Rows[0]["HPackUnionInterID"]);
+                        string HPackUnionBillType = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HPackUnionBillType"]);
+                        string HPackUnionBillNo = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HPackUnionBillNo"]);
+                        string HPackUnionMaker = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HPackUnionMaker"]);
+                        oCn.RunProc("EXEC h_p_Sc_PackUnionBill_SumSubBill2 " + HPackUnionInterID.ToString() + ",'" + HPackUnionBillType + "','" + HPackUnionBillNo + "','" + HPackUnionMaker + "'");
+                        oCn.Commit();
+                        return true;
+                    }
+                    else
+                    {
+                        sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                        oCn.RollBack();
+                        return false;
+                    }
+                }
+            }
+            catch (Exception e)
+            {
+                sErrMsg = "鐢熸垚鐢熶骇鎷嗙鍗曞け璐ワ紒" + e.Message;
+                oCn.RollBack();
+                return false;
+            }
+        }
+
+        #endregion
+
+        #region 鍒犻櫎鏄庣粏琛ㄤ綋閫変腑琛岃褰�
+
+        [WebMethod]
+        public bool set_DelPonderationBillMain_Temp_Pack(Int64 HInterID, string HBarCode, string HBillType, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            try
+            {
+                oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode='" + HBarCode + "' and HPieceQty=1", ref DBUtility.ClsPub.sExeReturnInfo);
+                return true;
+            }
+            catch (Exception e)
+            {
+                sErrMsg = "鍒犻櫎妯℃不鍏峰嚭鍏ュ簱涓存椂琛ㄨ褰曞け璐ワ紒" + e.Message;
+                return false;
+            }
+        }
+
+        #endregion
+
+        #endregion
 
 
         #region  妗岄潰鏉$爜鐢熸垚澶栫綉鐗�

--
Gitblit v1.9.1