From d1cfe6ed4a9ea812f7b3f1c1094be54ffb11cd73 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期五, 14 四月 2023 15:33:11 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/条码管理/WEBSController.cs |  735 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 688 insertions(+), 47 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 0492e04..a62a3b9 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"
@@ -23,13 +23,78 @@
         public string sWhere = "";
         public WebServer webserver = new WebServer();
         public DataSet ds = new DataSet();
-        private json objjson = new json();
         private json objJsonResult = new json();
         SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
         public ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
         public WebS.WebService1 oWebs = new WebS.WebService1();
         public WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
         Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+
+
+        WebS.ClsXt_SystemParameterMain oSystemParameterMain = new WebS.ClsXt_SystemParameterMain();
+
+
+        #region 鍏敤鏂规硶
+
+        #region 鑾峰彇鏈�澶у崟鎹甀D銆佸崟鎹彿
+
+        /// <summary>
+        /// 鑾峰彇鏈�澶у崟鎹甀D銆佸崟鎹彿
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetMaxBillNoAndID_Json")]
+        [HttpGet]
+        public object GetMaxBillNoAndID_Json(string HBillType)
+        {
+            try
+            {
+                string sErrMsg = "";
+                Int64 HInterID = 0;
+                string HBillNo = "";
+                HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref sErrMsg);
+                HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true);
+
+                //----------鍒涘缓铏氳〃------------------------
+                DataTable dt_Main = new DataTable("Json");
+                dt_Main.Columns.Add("HBillNo", typeof(string));
+                dt_Main.Columns.Add("HInterID", typeof(int));
+                //---------鍒涘缓鏂拌------------------------
+                DataRow dr_main = dt_Main.NewRow(); //鍒涘缓鏂拌 
+                dt_Main.Rows.Add(dr_main);          //灏嗘柊琛屽姞鍏ュ埌琛ㄤ腑
+                dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo);
+                dr_main["HInterID"] = DBUtility.ClsPub.isLong(HInterID);
+                //杩斿洖鏁版嵁
+                if (HBillNo == "" || HInterID == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈�澶у崟鎹甀D銆佸崟鎹彿鑾峰彇澶辫触";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇鎴愬姛";
+                    objJsonResult.data = dt_Main;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇鏈�澶у崟鎹甀D銆佸崟鎹彿澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+
+        #endregion
 
 
         #region 鍩虹璧勬枡
@@ -59,6 +124,52 @@
 
         #endregion
 
+
+        #region 鐣岄潰鎺т欢鍔熻兘璋冪敤鏂规硶
+
+        #region 鏍规嵁鍗曟嵁绫诲瀷鑾峰彇鍗曟嵁瀛愮被鍨�
+
+        /// <summary>
+        /// 鏍规嵁鍗曟嵁绫诲瀷鑾峰彇鍗曟嵁瀛愮被鍨�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetBillSubType_Json")]
+        [HttpGet]
+        public Object GetBillSubType_Json(string HBillType, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oWebs.get_BillSubType(HBillType, HStockOrgID);
+                if (ds == null)
+                {
+                    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;
+            }
+        }
+
+        #endregion
+
+        #endregion
 
         #region 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁鍙枫�佹簮鍗曞彿鏌ヨ宸蹭笂浼犲崟鎹俊鎭�
 
@@ -518,6 +629,48 @@
         #endregion
 
 
+
+        #region 鐢熶骇缁勬墭鍗�    涓婁紶鐢熷崟
+
+        /// <summary>
+        /// 涓婁紶鐢熸垚鐢熶骇缁勬墭鍗�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SavePackUnionBill_Json")]
+        [HttpGet]
+        public object set_SavePackUnionBill_Json(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                if (oWebs.set_SavePackUnionBill_Add(HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //鎴愬姛锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //澶辫触锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鐢熸垚鐢熶骇缁勬墭鍗曞け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
         #endregion
 
 
@@ -564,6 +717,53 @@
         }
 
         #endregion
+
+
+
+        #region 鐢熶骇鍏ュ簱    鎵弿婧愬崟鏉$爜
+
+        /// <summary>
+        /// 鐢熶骇鍏ュ簱    鎵弿婧愬崟鏉$爜
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_SourceBarCode_PoStockIn_Json")]
+        [HttpGet]
+        public object Get_SourceBarCode_PoStockIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID,Int64 HAccessFlag, WebS.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
+        {
+            try
+            {
+                WebSoBar = oWebs.get_SourceBill_MaterBarCode(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, HAccessFlag, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo);
+                if (WebSoBar == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛";
+                    objJsonResult.data = WebSoBar;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎵弿婧愬崟鏉$爜澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+
+
 
         #region 鐢熶骇棰嗘枡    鎵弿婧愬崟鏉$爜
 
@@ -724,37 +924,58 @@
         [HttpGet]
         public Object get_BarCode_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockOrgID, string HScanStyle, string HCustom1, string HCustom2)
         {
-            try
+            //鑾峰彇绯荤粺鍙傛暟
+            string sErrMsg = "";
+            string sJXCode = "";
+            if (oSystemParameter.ShowBill(ref sErrMsg) == true)
             {
-                var sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo,HMaker);
-                SourceFlag = true;
-                WebSoBar = oWebs.get_BarCode(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HScanStyle, HCustom1, HCustom2, ref DBUtility.ClsPub.sErrInfo);
-                if (WebSoBar == null)
+                if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-                    objJsonResult.data = null;
-                    return objJsonResult;
+                    sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo, HMaker);
+                    SourceFlag = true;
                 }
                 else
                 {
+                    sJXCode = sBarCode;
+                }
+                try
+                {
+                    WebSoBar = oWebs.get_BarCode(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HScanStyle, HCustom1, HCustom2, ref DBUtility.ClsPub.sErrInfo);
+                    if (WebSoBar == null)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鎴愬姛";
+                        objJsonResult.data = WebSoBar;
+                        return objJsonResult;
+                    }
+                }
+                catch (Exception e)
+                {
                     objJsonResult.code = "0";
-                    objJsonResult.count = 1;
-                    objJsonResult.Message = "鎴愬姛";
-                    objJsonResult.data = WebSoBar;
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString();
+                    objJsonResult.data = null;
                     return objJsonResult;
                 }
             }
-            catch (Exception e)
+            else
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString();
+                objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
                 objJsonResult.data = null;
                 return objJsonResult;
             }
-        }
+         }
 
         #endregion
 
@@ -768,35 +989,156 @@
         [HttpGet]
         public Object get_BarCode_MoveStock_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle)
         {
-            try
+            string sErrMsg = "";
+            string sJXCode = "";
+            if (oSystemParameter.ShowBill(ref sErrMsg) == true)
             {
-                WebSoBar = oWebs.get_BarCode_MoveStock(sBarCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
-                if (WebSoBar == null)
+                if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-                    objJsonResult.data = null;
-                    return objJsonResult;
+                     sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
+                    SourceFlag = true;
                 }
                 else
                 {
+                    sJXCode = sBarCode;
+                }
+                try
+                {
+                    string HCustom1 = "", HCustom2 = "";
+                    WebSoBar = oWebs.get_BarCode_MoveStock(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo, HCustom1, HCustom2);
+                    if (WebSoBar == null)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鎴愬姛";
+                        objJsonResult.data = WebSoBar;
+                        return objJsonResult;
+                    }
+                }
+                catch (Exception e)
+                {
                     objJsonResult.code = "0";
-                    objJsonResult.count = 1;
-                    objJsonResult.Message = "鎴愬姛";
-                    objJsonResult.data = WebSoBar;
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString();
+                    objJsonResult.data = null;
                     return objJsonResult;
                 }
             }
-            catch (Exception e)
+            else
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString();
+                objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
                 objJsonResult.data = null;
                 return objJsonResult;
             }
+
+
+
+            //try
+            //{
+            //    var sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
+            //    WebSoBar = oWebs.get_BarCode_MoveStock(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
+            //    if (WebSoBar == null)
+            //    {
+            //        objJsonResult.code = "0";
+            //        objJsonResult.count = 0;
+            //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+            //        objJsonResult.data = null;
+            //        return objJsonResult;
+            //    }
+            //    else
+            //    {
+            //        objJsonResult.code = "0";
+            //        objJsonResult.count = 1;
+            //        objJsonResult.Message = "鎴愬姛";
+            //        objJsonResult.data = WebSoBar;
+            //        return objJsonResult;
+            //    }
+            //}
+            //catch (Exception e)
+            //{
+            //    objJsonResult.code = "0";
+            //    objJsonResult.count = 0;
+            //    objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString();
+            //    objJsonResult.data = null;
+            //    return objJsonResult;
+            //}
         }
+
+        #endregion
+
+
+
+        #region 鐗╂枡鏉$爜澶勭悊鏂规硶    璋冩嫧鐩樼偣妯″潡
+
+        /// <summary>
+        /// 鐗╂枡鏉$爜鏂囨湰妗� 鎵爜璋冪敤
+        /// </summary>
+        /// <returns></returns>
+        //[Route("WEBSController/get_BarCode_MoveStock_PD")]
+        //[HttpGet]
+        //public Object get_BarCode_MoveStock_PD(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle)
+        //{
+        //    string sErrMsg = "";
+        //    string sJXCode = "";
+        //    if (oSystemParameter.ShowBill(ref sErrMsg) == true)
+        //    {
+        //        if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
+        //        {
+        //            sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
+        //            SourceFlag = true;
+        //        }
+        //        else
+        //        {
+        //            sJXCode = sBarCode;
+        //        }
+        //        try
+        //        {
+        //            WebSoBar = oWebs.get_BarCode_MoveStock_PD(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
+        //            if (WebSoBar == null)
+        //            {
+        //                objJsonResult.code = "0";
+        //                objJsonResult.count = 0;
+        //                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+        //                objJsonResult.data = null;
+        //                return objJsonResult;
+        //            }
+        //            else
+        //            {
+        //                objJsonResult.code = "0";
+        //                objJsonResult.count = 1;
+        //                objJsonResult.Message = "鎴愬姛";
+        //                objJsonResult.data = WebSoBar;
+        //                return objJsonResult;
+        //            }
+        //        }
+        //        catch (Exception e)
+        //        {
+        //            objJsonResult.code = "0";
+        //            objJsonResult.count = 0;
+        //            objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString();
+        //            objJsonResult.data = null;
+        //            return objJsonResult;
+        //        }
+        //    }
+        //    else
+        //    {
+        //        objJsonResult.code = "0";
+        //        objJsonResult.count = 0;
+        //        objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+        //        objJsonResult.data = null;
+        //        return objJsonResult;
+        //    }
+        //}
 
         #endregion
 
@@ -960,32 +1302,53 @@
         [HttpGet]
         public Object get_CheckTypeByBarCode_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, Int64 HStockOrgID)
         {
-            try
+            //鑾峰彇绯荤粺鍙傛暟
+            string sErrMsg = "";
+            string sJXCode = "";
+            if (oSystemParameter.ShowBill(ref sErrMsg) == true)
             {
-                var sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker);
-                WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
-                if (WebSoBar == null)
+                if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
-                    objJsonResult.data = null;
-                    return objJsonResult;
+                    sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker);
                 }
                 else
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 1;
-                    objJsonResult.Message = "鎴愬姛";
-                    objJsonResult.data = WebSoBar;
-                    return objJsonResult;
+                    sJXCode = sBarCode;
                 }
-            }
-            catch (Exception e)
+                try
+                {
+                    WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+                    if (WebSoBar == null)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鎴愬姛";
+                        objJsonResult.data = WebSoBar;
+                        return objJsonResult;
+                    }
+                }
+                catch (Exception e)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏍¢獙妯″紡锛屾壂鎻忔潯鐮佸け璐ワ紒" + e.ToString();
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                    }
+                }
+            else
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鏍¢獙妯″紡锛屾壂鎻忔潯鐮佸け璐ワ紒" + e.ToString();
+                objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -1098,6 +1461,284 @@
         #endregion
 
 
+        #region 鐢熶骇缁勬墭鍗曟ā鍧楄皟鐢ㄦ柟娉�
+
+        #region 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮�
+
+        /// <summary>
+        /// 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_PackBarCode_PackUnionBill_Json")]
+        [HttpGet]
+        public object get_PackBarCode_PackUnionBill_Json(Int64 HInterID, string HBillNo, string HBillType, string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                WebS.ClsGy_BarCodeBill_WMS_Model WebSoBarModel = new WebS.ClsGy_BarCodeBill_WMS_Model();
+                WebSoBarModel = oWebs.get_PackBarCode_PackUnionBill(HInterID, HBillNo, HBillType, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+                if (WebSoBarModel == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛";
+                    objJsonResult.data = WebSoBarModel;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎵弿鎵樻潯鐮佸け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮佸搴斿崟涓潯鐮�
+
+        /// <summary>
+        /// 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮佸搴斿崟涓潯鐮�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_BarCode_PackUnionBill_Json")]
+        [HttpGet]
+        public object get_BarCode_PackUnionBill_Json(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                if (oWebs.get_BarCode_PackUnionBill(HBarCode, HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //鎴愬姛锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //澶辫触锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 杩斿洖缁勬墭鍒楄〃淇℃伅
+
+        /// <summary>
+        /// 杩斿洖缁勬墭鍒楄〃淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetBillEntry_Tmp_Pack_Json")]
+        [HttpGet]
+        public object GetBillEntry_Tmp_Pack_Json(long HInterID, string HBillNo, string HBillType)
+        {
+            try
+            {
+                ds = oWebs.GetBillEntry_Tmp_Pack(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo);
+                if (ds == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    List<object> columnNameList = new List<object>();
+                    //娣诲姞鍒楀悕
+                    foreach (DataColumn col in ds.Tables[0].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 鍒犻櫎鏄庣粏琛ㄤ綋閫変腑琛岃褰�
+
+        /// <summary>
+        /// 鍒犻櫎鏄庣粏琛ㄤ綋閫変腑琛岃褰�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_DelPackUnionBill_Temp_Pack_Json")]
+        [HttpGet]
+        public object set_DelPackUnionBill_Temp_Pack_Json(Int64 HInterID, string HBarCode, string HBillType)
+        {
+            try
+            {
+                if (oWebs.set_DelPackUnionBill_Temp_Pack(HInterID, HBarCode, HBillType, ref DBUtility.ClsPub.sErrInfo))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //鎴愬姛锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //澶辫触锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎缁勬墭璁板綍澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+
+        #region 缁勬墭缂撳瓨鍒楄〃妯″潡璋冪敤鏂规硶
+
+        #region 杩斿洖缁勬墭缂撳瓨鍒楄〃淇℃伅
+
+        /// <summary>
+        /// 杩斿洖缁勬墭缂撳瓨鍒楄〃淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetSc_PackUnionBill_TempList_Json")]
+        [HttpGet]
+        public object GetSc_PackUnionBill_TempList_Json(string HBillType, string HMaker, long HStockOrgID)
+        {
+            try
+            {
+                ds = oWebs.GetSc_PackUnionBill_TempList(HBillType, HMaker, HStockOrgID);
+                if (ds == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁鏃犵紦瀛樿褰曪紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    List<object> columnNameList = new List<object>();
+                    //娣诲姞鍒楀悕
+                    foreach (DataColumn col in ds.Tables[0].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇缂撳瓨淇℃伅鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇缂撳瓨鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 鍒犻櫎缁勬墭缂撳瓨鍒楄〃鍗曟嵁
+
+        /// <summary>
+        /// 鍒犻櫎缁勬墭缂撳瓨鍒楄〃鍗曟嵁
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/DeleteTemp_PackUnionBill_Json")]
+        [HttpGet]
+        public object DeleteTemp_PackUnionBill_Json(Int64 HInterID)
+        {
+            try
+            {
+                if (oWebs.DeleteTemp_PackUnionBill(HInterID, ref DBUtility.ClsPub.sErrInfo))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //鎴愬姛锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //澶辫触锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎缂撳瓨淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #endregion
+
+        #endregion
+
+
         #region 澶勭悊鏂规硶
 
 

--
Gitblit v1.9.1