From 00d2dab9f1367067b27906be93a43949beb43aa7 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 18 九月 2023 15:42:14 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/条码管理/WEBSController.cs |  958 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 891 insertions(+), 67 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 35da585..06f1c0b 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"
@@ -115,17 +115,423 @@
             }
         }
 
+        /// <summary>
+        /// 鎵爜杩斿洖浠撳簱淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetWarehouse_Json")]
+        [HttpGet]
+        public object GetWarehouse_Json(string HBarCode, Int64 HStockOrgID)
+        {
+            try
+            {
+                Int64 HWhID = 0;
+                HWhID = DBUtility.ClsPub.isLong(HBarCode.Replace("HWH", ""));
+                ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HSPFlag from Gy_Warehouse with(nolock) where HStopflag=0 and HItemID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Warehouse");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    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
 
         #region 浠撲綅璧勬枡
 
+        /// <summary>
+        /// 鎵爜杩斿洖浠撲綅淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetStockPlace_Json")]
+        [HttpGet]
+        public object GetStockPlace_Json(string HBarCode, Int64 HWhID, Int64 HStockOrgID)
+        {
+            try
+            {
+                Int64 sHSPID = 0;
+                Int64 sHWhID = 0;
+                if (HBarCode.Contains(";"))
+                {
+                    string[] sArray = HBarCode.Replace("HSP", "").Split(';');
+                    sHSPID = DBUtility.ClsPub.isLong(sArray[1]);
+                    sHWhID = DBUtility.ClsPub.isLong(sArray[0]);
+                }
+
+                if(HWhID==0)
+                {
+                    ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+                    if (ds == null || ds.Tables[0].Rows.Count == 0)
+                    {
+                        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;
+                    }
+                }
+                else
+                {
+                    ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+                    if (ds == null || ds.Tables[0].Rows.Count == 0)
+                    {
+                        DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+                        if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵粨浣嶆潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鎴愬姛锛�";
+                            objJsonResult.data = ds2.Tables[0];
+                            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;
+            }
+        }
+
+        /// <summary>
+        /// 鑾峰彇浠撲綅鍒楄〃淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetStockPlaceList_Json")]
+        [HttpGet]
+        public object GetStockPlaceList_Json(string StockPlace, Int64 HWhID, Int64 HStockOrgID)
+        {
+            try
+            {
+                //鐣岄潰涓婃湭閫夋嫨浠撳簱 鎴� 浠撲綅閫夋嫨鍒楄〃鐣岄潰杈撳叆杩囨护鏉′欢
+                if (HWhID == 0)
+                {
+                    ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "h_v_IF_StockPlace");
+                    if (ds == null || ds.Tables[0].Rows.Count == 0)
+                    {
+                        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;
+                    }
+                }
+                //鐣岄潰涓婂凡閫変粨搴�
+                else
+                {
+                    ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and HWHID=" + HWhID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "h_v_IF_StockPlace");
+                    if (ds == null || ds.Tables[0].Rows.Count == 0)
+                    {
+                        DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID = " + HStockOrgID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "h_v_IF_StockPlace");
+                        if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "娌℃湁杩斿洖浠讳綍浠撲綅璁板綍锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鎴愬姛锛�";
+                            objJsonResult.data = ds2.Tables[0];
+                            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
+
+        #region 鑱屽憳璧勬枡
+
+        /// <summary>
+        /// 鎵爜杩斿洖鑱屽憳淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetEmployee_Json")]
+        [HttpGet]
+        public object GetEmployee_Json(string HBarCode)
+        {
+            try
+            {
+                Int64 HEmpID = 0;
+                HEmpID = DBUtility.ClsPub.isLong(HBarCode);
+                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Employee with(nolock) where HStopflag=0 and HItemID=" + HEmpID.ToString(), "Gy_Employee");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    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
+
+        #region 閮ㄩ棬璧勬枡
+
+        /// <summary>
+        /// 鎵爜杩斿洖閮ㄩ棬淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetDepartment_Json")]
+        [HttpGet]
+        public object GetDepartment_Json(string HBarCode)
+        {
+            try
+            {
+                Int64 HDepID = 0;
+                HDepID = DBUtility.ClsPub.isLong(HBarCode.Replace("HDE", ""));
+                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Department with(nolock) where HStopflag=0 and HItemID=" + HDepID.ToString(), "Gy_Department");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    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
+
+        #region 渚涘簲鍟嗚祫鏂�
+
+        /// <summary>
+        /// 鎵爜杩斿洖渚涘簲鍟嗕俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetSupplier_Json")]
+        [HttpGet]
+        public object GetSupplier_Json(Int64 HSupID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Supplier with(nolock) where HStopflag=0 and HItemID=" + HSupID.ToString(), "Gy_Supplier");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵緵搴斿晢鏉$爜鏄惁姝g‘锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
+                    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
+
+        #region 瀹㈡埛璧勬枡
+
+        /// <summary>
+        /// 鎵爜杩斿洖瀹㈡埛淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetCustomer_Json")]
+        [HttpGet]
+        public object GetCustomer_Json(Int64 HCusID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HItemID=" + HCusID.ToString(), "Gy_Customer");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    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;
+            }
+        }
+
+        /// <summary>
+        /// 鑾峰彇瀹㈡埛鍒楄〃淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetCustomerList_Json")]
+        [HttpGet]
+        public object GetCustomerList_Json(string Customer, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Customer + "%' or HName like '%" + Customer + "%')", "Gy_Customer");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    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 鐣岄潰鎺т欢鍔熻兘璋冪敤鏂规硶
+        #region 鎵爜妯″潡璋冪敤鏂规硶
 
         #region 鏍规嵁鍗曟嵁绫诲瀷鑾峰彇鍗曟嵁瀛愮被鍨�
 
@@ -140,7 +546,7 @@
             try
             {
                 ds = oWebs.get_BillSubType(HBillType, HStockOrgID);
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -169,8 +575,127 @@
 
         #endregion
 
+
+        #region 鎵爜妯″潡    鏍规嵁鏉$爜鍒犻櫎缂撳瓨鍒楄〃涓搴旀潯鐮佽褰�
+
+        /// <summary>
+        /// 鏍规嵁鏉$爜鍒犻櫎鏉$爜鍑哄叆搴撶紦瀛樿〃涓褰�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_DelPonderationBillMain_Temp_BarCode_Json")]
+        [HttpGet]
+        public object set_DelPonderationBillMain_Temp_BarCode_Json(long HInterID, string HBillType, string HBarCode)
+        {
+            try
+            {
+                oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HBarCode<>'' and HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode='" + HBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                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/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")]
+        [HttpGet]
+        public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType)
+        {
+            try
+            {
+                if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, 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 鎵弿妯″潡    閫�鍑哄姛鑳芥寜閽皟鐢�    鍒犻櫎鍏堣繘鍏堝嚭涓存椂琛紙鏇存柊 HlineStatus =1锛�
+
+        /// <summary>
+        /// 鍒犻櫎鍏堣繘鍏堝嚭涓存椂琛紙鏇存柊 HlineStatus =1锛�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json")]
+        [HttpGet]
+        public object set_DelPonderationBillMain_Temp_FIFO_Json(long HInterID, string HBillType)
+        {
+            try
+            {
+                if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, 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 = "鏇存柊鍏堣繘鍏堝嚭涓存椂琛℉lineStatus鍊煎け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #endregion
+
+
+        #region 缂撳瓨鍒楄〃妯″潡璋冪敤
 
         #region 缂撳瓨鍒楄〃    缂栬緫鍔熻兘璋冪敤
 
@@ -227,7 +752,7 @@
             try
             {
                 ds = oWebs.GetKf_ICStockBillQueryList(HBillType, HBillNo, HSourceBillNo);
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -337,50 +862,8 @@
             }
         }
 
-        #endregion
-
-
-        #region 鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍
-
         /// <summary>
-        /// 鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰�
-        /// </summary>
-        /// <returns></returns>
-        [Route("WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")]
-        [HttpGet]
-        public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType)
-        {
-            try
-            {
-                if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, 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;
-            }
-        }
-
-        /// <summary>
-        /// 鏍规嵁鍗曟嵁ID,鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍
+        /// 鏍规嵁鍗曟嵁ID,鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍 锛堝姛鑳藉悓涓婇潰鏍规嵁ID鍒犻櫎缂撳瓨璁板綍鏂规硶锛�
         /// </summary>
         /// <returns></returns>
         [Route("WEBSController/DeleteBillList_Json")]
@@ -418,20 +901,74 @@
 
         #endregion
 
+        #endregion
 
-        #region 鍒犻櫎鍏堣繘鍏堝嚭涓存椂琛紙鏇存柊 HlineStatus =1锛�
+
+        #region 鎻愪氦鐢熷崟澶勭悊鏂规硶
+
+        #region 鐢熶骇鍏ュ簱    涓婁紶鐢熷崟
+
+
+        #endregion
+
+        #region 閲囪喘鍏ュ簱    涓婁紶鐢熷崟
+
+
+        #endregion
+
+        #region 鍏朵粬鍏ュ簱    涓婁紶鐢熷崟
+
+        #region 鍏朵粬鍏ュ簱    鏂板妯″紡
 
         /// <summary>
-        /// 鍒犻櫎鍏堣繘鍏堝嚭涓存椂琛紙鏇存柊 HlineStatus =1锛�
+        /// 鍏朵粬鍏ュ簱鏂板涓婁紶
         /// </summary>
         /// <returns></returns>
-        [Route("WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json")]
-        [HttpGet]
-        public object set_DelPonderationBillMain_Temp_FIFO_Json(long HInterID, string HBillType)
+        [Route("WEBSController/set_SaveOtherInBill_Json")]
+        [HttpPost]
+        public object set_SaveOtherInBill_Json([FromBody] JObject oMain)
         {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
             try
             {
-                if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, HBillType, ref DBUtility.ClsPub.sErrInfo))
+                List<Model.ClsKf_OtherInBillMain> lsmain = new List<Model.ClsKf_OtherInBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getOtherInBillMainByJson(msg1);
+                WebS.ClsKf_OtherInBillMain websLsmain = new WebS.ClsKf_OtherInBillMain();
+                string sSourceType = lsmain[0].HMainSourceBillType;
+                websLsmain.HInterID = lsmain[0].HInterID;
+                websLsmain.HBillNo = lsmain[0].HBillNo;
+                websLsmain.HBillType = lsmain[0].HBillType;
+                websLsmain.HDate = lsmain[0].HDate;
+                websLsmain.HDeptID = lsmain[0].HDeptID;
+                websLsmain.HWHID = lsmain[0].HWHID;
+                websLsmain.HSCWHID = lsmain[0].HSCWHID;
+                websLsmain.HSupID = lsmain[0].HSupID;
+                websLsmain.HKeeperID = lsmain[0].HKeeperID;
+                websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+                websLsmain.HEmpID = lsmain[0].HEmpID;
+                websLsmain.HManagerID = lsmain[0].HManagerID;
+                websLsmain.HRemark = lsmain[0].HRemark;
+                websLsmain.HExplanation = lsmain[0].HExplanation;
+                websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+                websLsmain.HStockStyle = lsmain[0].HStockStyle;
+                websLsmain.HBillSubType = lsmain[0].HBillSubType;
+                if(lsmain[0].HMainSourceBillType== "1241")
+                {
+                    websLsmain.HMainSourceBillType = "鍏ュ簱鐢宠鍗�";
+                }
+                else
+                {
+                    websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+                }
+                websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HBillerID = lsmain[0].HBillerID;
+                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+                websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
+
+                if (oWebs.set_SaveOtherInBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
@@ -452,7 +989,7 @@
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鏇存柊鍏堣繘鍏堝嚭涓存椂琛℉lineStatus鍊煎け璐ワ紒" + e.ToString();
+                objJsonResult.Message = "鍏朵粬鍑哄簱鍗曚笂浼犲け璐ワ紒" + e.ToString();
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -460,8 +997,7 @@
 
         #endregion
 
-
-        #region 鎻愪氦鐢熷崟澶勭悊鏂规硶
+        #endregion
 
 
         #region 閿�鍞嚭搴�    涓婁紶鐢熷崟
@@ -1223,7 +1759,7 @@
         #endregion
 
 
-        #region 鐗╂枡鏉$爜澶勭悊鏂规硶    鍏朵粬鍑哄簱搴撴ā鍧�
+        #region 鐗╂枡鏉$爜澶勭悊鏂规硶    鍑哄叆搴撴ā鍧�
 
         /// <summary>
         /// 鐗╂枡鏉$爜鏂囨湰妗� 鎵爜璋冪敤
@@ -1467,7 +2003,7 @@
             try
             {
                 ds = oCn.RunProcReturn("exec h_p_WMS_SourceBill_Temp " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_SourceBill_Temp");
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -1520,7 +2056,7 @@
                 string sMouldManagerCtl = "N";  //鏄惁鍚敤鍣ㄥ叿绠$悊
                 string sFIFOCtl = "N";          //鏄惁鍚敤鍏堣繘鍏堝嚭绠$悊
                 ds = oWebs.GetBillEntryTmpList(HInterID, HBillNo, HBillType, HStockOrgID, ref sMouldManagerCtl, ref sFIFOCtl, ref DBUtility.ClsPub.sErrInfo);
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -1530,14 +2066,47 @@
                 }
                 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鍒楀璞$殑鍒楀悕
                     }
+                    //娣诲姞妯℃不鍏峰垪琛ㄥ垪鍚�
+                    List<object> MouldcolumnNameList = new List<object>();
+                    foreach (DataColumn col in ds.Tables[1].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        MouldcolumnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+                    //娣诲姞鍏堣繘鍏堝嚭鍒楄〃鍒楀悕
+                    List<object> FIFOcolumnNameList = new List<object>();
+                    foreach (DataColumn col in ds.Tables[2].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        FIFOcolumnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+                    //娣诲姞鏉$爜鏄庣粏鍒楄〃鍒楀悕
+                    List<object> BarCodecolumnNameList = new List<object>();
+                    foreach (DataColumn col in ds.Tables[3].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        BarCodecolumnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+                    //娣诲姞婧愬崟鐢熶骇姹囨姤鍗曟潯鐮佹槑缁嗗垪琛ㄥ垪鍚�
+                    List<object> ICMOReportcolumnNameList = new List<object>();
+                    foreach (DataColumn col in ds.Tables[4].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        ICMOReportcolumnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
                     objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
@@ -1552,6 +2121,10 @@
                         BarCodeDetailslist = ds.Tables[5]   //杩斿洖褰撳墠鎵�鎵弿鏉$爜鏄庣粏淇℃伅锛�5锛�
                     };
                     objJsonResult.list = columnNameList;
+                    objJsonResult.list = MouldcolumnNameList;
+                    objJsonResult.list = FIFOcolumnNameList;
+                    objJsonResult.list = BarCodecolumnNameList;
+                    objJsonResult.list = ICMOReportcolumnNameList;
                     return objJsonResult;
                 }
             }
@@ -1765,7 +2338,7 @@
             try
             {
                 ds = oWebs.GetKf_PonderationBillMain_Temp_BillCheck(HInterID, HBillType, sWhere);
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -1880,7 +2453,7 @@
             try
             {
                 ds = oWebs.GetKf_PonderationBillMain_TempList_BillCheck(HBillType, HMaker, HStockOrgID);
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -2170,7 +2743,7 @@
             try
             {
                 ds = oWebs.GetBillEntry_Tmp_Pack(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo);
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -2265,7 +2838,7 @@
             try
             {
                 ds = oWebs.GetSc_PackUnionBill_TempList(HBillType, HMaker, HStockOrgID);
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -2364,7 +2937,7 @@
             try
             {
                 ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_DeletePackUnionBill '" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddPackBarCode_DeletePackUnionBill");
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -2545,7 +3118,7 @@
             try
             {
                 ds = oWebs.GetBillEntry_Temp_MoveStockBill_HuanTuo(HInterID, HBillNo, HBillType, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -2637,7 +3210,7 @@
             try
             {
                 ds = oCn.RunProcReturn("exec h_p_KF_MoveStockBill_TempList_HuanTuo " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_KF_MoveStockBill_TempList_HuanTuo");
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -2688,7 +3261,7 @@
             try
             {
                 ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_TempList_HuanTuo '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_KF_PonderationBillMain_TempList_HuanTuo");
-                if (ds == null)
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -2735,5 +3308,256 @@
         #endregion
 
 
+
+
+
+
+        #region 鎶ヨ〃鏁版嵁鑾峰彇鏂规硶
+
+        #region 鏉$爜鍑哄叆搴撹褰曟姤琛�
+
+        #region 鑾峰彇鍗曟嵁绫诲瀷淇℃伅
+        /// <summary>
+        /// 鑾峰彇鍗曟嵁绫诲瀷淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetBarCodeReport_BillType_Json")]
+        [HttpGet]
+        public object GetBarCodeReport_BillType_Json()
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeReport_BillType ", "h_p_WMS_BarCodeReport_BillType");
+                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
+
+        #region 鑾峰彇鏉$爜鍑哄叆搴撹褰�
+        /// <summary>
+        /// 鑾峰彇鏉$爜鍑哄叆搴撹褰�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetKf_BarCodeOutInReport_Json")]
+        [HttpGet]
+        public object GetKf_BarCodeOutInReport_Json(string sWhere)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_Kf_BarCodeOutInReport_New " + sWhere, "h_p_Kf_BarCodeOutInReport_New");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    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
+
+        #endregion
+
+        #region 鏉$爜搴撳瓨鏌ヨ鎶ヨ〃
+
+        #region 鑾峰彇鏉$爜搴撳瓨淇℃伅
+        /// <summary>
+        /// 鑾峰彇鏉$爜搴撳瓨淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetKf_BarCodeICInventoryReport_Json")]
+        [HttpGet]
+        public object GetKf_BarCodeICInventoryReport_Json(string sWhere)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeICInventoryReport " + sWhere, "h_p_WMS_BarCodeICInventoryReport");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    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
+
+        #endregion
+
+        #region WMS鐗╂枡鍑哄叆搴撹褰曟姤琛�
+
+        #region 鑾峰彇WMS鐗╂枡鍑哄叆搴撹褰�
+        /// <summary>
+        /// 鑾峰彇WMS鐗╂枡鍑哄叆搴撹褰�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetKf_MaterOutInReport_Json")]
+        [HttpGet]
+        public object GetKf_MaterOutInReport_Json(string sWhere)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_MaterOutInReport " + sWhere, "h_p_WMS_MaterOutInReport");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    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 = "鏌ヨWMS鐗╂枡鍑哄叆搴撹褰曚俊鎭け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #endregion
+
+        #region WMS鐗╂枡搴撳瓨鏌ヨ鎶ヨ〃
+
+        #region 鑾峰彇WMS鐗╂枡搴撳瓨淇℃伅
+        /// <summary>
+        /// 鑾峰彇WMS鐗╂枡搴撳瓨淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetKf_MaterICInventoryReport_Json")]
+        [HttpGet]
+        public object GetKf_MaterICInventoryReport_Json(string sWhere)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_MaterICInventoryReport " + sWhere, "h_p_WMS_MaterICInventoryReport");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    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 = "鏌ヨWMS鐗╂枡搴撳瓨淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #endregion
+
+
+        #endregion
+
+
     }
 }

--
Gitblit v1.9.1