From 1d527817fd732e6ec879948661e0377dcc26b452 Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期六, 11 二月 2023 15:29:24 +0800
Subject: [PATCH] 新增生产装箱追溯单模块所需调用方法,原扫描物料调用方法中生产汇报单多源单模式增加条码类型为“待装箱”状态不允许汇报控制

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

diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs
index 176b2a2..11d6562 100644
--- a/CLOUDWEB/WebService1.asmx.cs
+++ b/CLOUDWEB/WebService1.asmx.cs
@@ -38337,6 +38337,11 @@
                         sErrMsg = "澶氭簮鍗曟ā寮忎笅锛屾壂鎻忕墿鏂欐潯鐮佺殑鍘熷崟淇℃伅蹇呴』姝g‘锛�";
                         return false;
                     }
+                    else if (dal.omodel_View.HBarCodeStatus == "寰呰绠�")
+                    {
+                        sErrMsg = "鎵�鎵潯鐮佷负寰呰绠辩姸鎬侊紝涓嶅厑璁告眹鎶ワ紒";
+                        return false;
+                    }
                 }
                 else //闈炲鍘熷崟
                 {
@@ -46592,6 +46597,186 @@
         #endregion
 
 
+        #region 鐢熶骇瑁呯杩芥函鍗曟ā鍧楄皟鐢ㄦ柟娉�
+
+        #region 鎵弿绠辨潯鐮�
+
+        [WebMethod]
+        public Model.ClsGy_BarCodeBill_WMS_Model get_BarCode_PackUnionCarryUp(Int64 HInterID, string HBillNo, string HBillType, string HBarCode_Pack, string HHMaker, Int64 HStockOrgID, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            Model.ClsGy_BarCodeBill_WMS_Model oBar = new Model.ClsGy_BarCodeBill_WMS_Model();
+            DataSet ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_PackUnionCarryUp " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HHMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_PackUnionCarryUp");
+            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.HBarCode = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBarCode_Pack"]);
+                    return oBar;
+                }
+                else
+                {
+                    sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻忕鏉$爜澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                    return null;
+                }
+            }
+        }
+
+        #endregion
+
+        #region 鎵弿SN鏉$爜
+
+        [WebMethod]
+        public bool get_SNBarCode_PackUnionCarryUp(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+            DataSet ds = oCN.RunProcReturn("exec h_p_WMS_AddSNBarCode_PackUnionCarryUp '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddSNBarCode_PackUnionCarryUp");
+            if (ds == null || ds.Tables[0].Rows.Count == 0)
+            {
+                sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HInterID + "锛涙壂鎻廠N鏉$爜澶辫触锛�";
+                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_PackUnionCarryUp(Int64 HInterID, string HBillNo, string HBillType, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            DataSet DS = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmpList_PackUnionCarryUp " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_BillEntryTmpList_PackUnionCarryUp");
+            return DS;
+        }
+
+        #endregion
+
+        #region 涓婁紶鐢熸垚鐢熶骇瑁呯杩芥函鍗�
+
+        [WebMethod]
+        public bool set_SavePackUnionCarryUpBill_New(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            try
+            {
+                oCn.BeginTran();
+                DataSet ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionCarryUpBill_Insert " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Sc_PackUnionCarryUpBill_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)
+                    {
+                        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_DelPackUnionBill_Temp(Int64 HInterID, string HBarCode, string HBillType, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            try
+            {
+                oCn.RunProc("Delete from Sc_PackUnionBill_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and (HBarCode='" + HBarCode + "' or HBarCode_Cus='" + HBarCode + "') and HPieceQty=1", ref DBUtility.ClsPub.sExeReturnInfo);
+                return true;
+            }
+            catch (Exception e)
+            {
+                sErrMsg = "鍒犻櫎鐢熶骇瑁呯杩芥函鍗曟壂鐮佷复鏃惰〃璁板綍澶辫触锛�" + e.Message;
+                return false;
+            }
+        }
+
+        #endregion
+
+
+        #region 缂撳瓨鍒楄〃妯″潡璋冪敤鏂规硶
+
+        #region 杩斿洖缂撳瓨鍒楄〃淇℃伅
+
+        [WebMethod]
+        public DataSet GetSc_PackUnionBill_TempList(string HBillType, string HMaker, Int64 HStockOrgID)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            DataSet Ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_TempList '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Sc_PackUnionBill_TempList");
+            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+            {
+                return null;
+            }
+            else
+            {
+                return Ds;
+            }
+        }
+
+        #endregion
+
+        #region 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+
+        [WebMethod]
+        public bool DeleteTemp_PackUnionBill(Int64 HInterID, ref string sErrMsg)
+        {
+            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+            try
+            {
+                oCn.RunProc("Delete from Sc_PackUnionBill_Temp where HInterID=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo);
+                return true;
+            }
+            catch (Exception e)
+            {
+                sErrMsg = "鍒犻櫎澶辫触锛�" + e.Message;
+                return false;
+            }
+        }
+
+        #endregion
+
+        #endregion
+
+        #endregion
+
+
         #region 鏍¢獙妯″紡 鎵爜妯″潡璋冪敤鏂规硶
 
         #region 缂撳瓨鍒楄〃缂栬緫鎵撳紑鍗曟嵁鏃讹紝鑾峰彇鍗曟嵁淇℃伅   *鏍¢獙妯″紡

--
Gitblit v1.9.1