From 45b33e77b6f90e0a18fc88bbb0826ecf1e7b9b51 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 19 六月 2024 15:25:16 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/条码管理/WEBSController.cs | 3515 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 3,499 insertions(+), 16 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 21941f8..63e66fe 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"
@@ -21,6 +21,7 @@
 {
     public class WEBSController : ApiController
     {
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
         public string sWhere = "";
         public WebServer webserver = new WebServer();
         public DataSet ds = new DataSet();
@@ -36,6 +37,155 @@
 
 
         #region 鍏敤鏂规硶
+
+        #region 璐﹀彿鐧诲叆
+
+        /// <summary>
+        /// 璐﹀彿鐧诲叆鏃堕獙璇佽处鍙枫�佸瘑鐮佷俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetUser_Json")]
+        [HttpGet]
+        public object GetUser_Json(string HUserNumber, string HPassWord, Int64 HStockOrgID, string HStockOrgName)
+        {
+            try
+            {
+                HPassWord = DBUtility.ClsPub.StrToPsd(HPassWord.Trim());
+                ds = oCn.RunProcReturn("exec h_p_Gy_User '" + HUserNumber + "','" + HPassWord + "'," + HStockOrgID.ToString(), "h_p_Gy_User");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "杈撳叆鐨勭敤鎴峰悕鎴栧瘑鐮侀敊璇紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    //鍒ゆ柇鐢ㄦ埛瀵瑰簲缁勭粐鏉冮檺锛屽緱鍒扮櫥鍏ョ粍缁囦俊鎭紙ID銆佷唬鐮併�佸悕绉帮級
+                    DataSet ds2 = oWebs.get_ORGANIZATIONS_UserByOrgRelation(HUserNumber, HStockOrgName);
+                    if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍒ゆ柇鐢ㄦ埛瀵瑰簲缁勭粐鏉冮檺閿欒锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HBack"])==1)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HRemark"]);
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    //鍒ゆ柇鐢ㄦ埛璐﹀彿瀵嗙爜锛圵ISE銆丆LOUD锛夋槸鍚︽纭�
+                    if (!oWebs.CheckUser(DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["Czymc"]), ref DBUtility.ClsPub.sErrInfo))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //澶辫触锛�
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    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/CheckModRight_Json")]
+        [HttpGet]
+        public object CheckModRight_Json(string ModRightName, string HUserName)
+        {
+            try
+            {
+                //鑾峰彇绯荤粺鍙傛暟
+                string sErrMsg = "";
+                if (oSystemParameter.ShowBill(ref sErrMsg) == true)
+                {
+                    //鍒ゆ柇鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HUserName))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎮ㄦ病鏈夊搴旀ā鍧楁潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    if (oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode.ToUpper() == "WISE")
+                    {
+                        ds = oCn.RunProcReturn("exec h_p_K3_User '" + HUserName + "'", "h_p_K3_User");
+                        if (ds == null || ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鎮ㄧ殑鐢ㄦ埛娌℃湁缁戝畾閲戣澏璐﹀彿,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else if (oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode.ToUpper() == "CLOUD")
+                    {
+                        //鍒ゆ柇鐢ㄦ埛璐﹀彿瀵嗙爜锛圵ISE銆丆LOUD锛夋槸鍚︽纭�
+                        if (!oWebs.CheckUser(HUserName, ref DBUtility.ClsPub.sErrInfo))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //澶辫触锛�
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+                    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 鑾峰彇鏈�澶у崟鎹甀D銆佸崟鎹彿
 
@@ -94,6 +244,109 @@
 
         #endregion
 
+        #region 鑾峰彇鏈�澶у崟鎹彿
+
+        /// <summary>
+        /// 鑾峰彇鏈�澶у崟鎹彿
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetMaxBillNo_Json")]
+        [HttpGet]
+        public object GetMaxBillNo_Json(string HBillType)
+        {
+            try
+            {
+                string sErrMsg = "";
+                string HBillNo = "";
+                HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true);
+
+                //----------鍒涘缓铏氳〃------------------------
+                DataTable dt_Main = new DataTable("Json");
+                dt_Main.Columns.Add("HBillNo", typeof(string));
+                //---------鍒涘缓鏂拌------------------------
+                DataRow dr_main = dt_Main.NewRow(); //鍒涘缓鏂拌 
+                dt_Main.Rows.Add(dr_main);          //灏嗘柊琛屽姞鍏ュ埌琛ㄤ腑
+                dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo);
+                //杩斿洖鏁版嵁
+                if (HBillNo == "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈�澶у崟鎹彿鑾峰彇澶辫触";
+                    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 = "鑾峰彇鏈�澶у崟鎹彿澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+
+        #region 鏍规嵁鏉$爜锛岃繑鍥炴潯鐮佹。妗堜腑鏉$爜淇℃伅
+
+        /// <summary>
+        /// 鏍规嵁鏉$爜锛岃繑鍥炴潯鐮佹。妗堜腑鏉$爜淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetBarCode_Json")]
+        [HttpGet]
+        public object GetBarCode_Json(string HBarCode)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill where HBarCode='" + HBarCode + "' order by HStopflag", "h_v_Gy_BarCodeBill");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏉$爜妗f涓笉瀛樺湪璇ユ潯鐮侊紝璇风‘璁ゆ潯鐮佹槸鍚︽纭垨鏄惁宸茶鍒犻櫎锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else if (DBUtility.ClsPub.isBool(ds.Tables[0].Rows[0]["HStopflag"]))
+                {
+                    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
 
@@ -415,16 +668,56 @@
         /// <returns></returns>
         [Route("WEBSController/GetSupplier_Json")]
         [HttpGet]
-        public object GetSupplier_Json(Int64 HSupID)
+        public object GetSupplier_Json(string HBarCode, Int64 HStockOrgID)
         {
             try
             {
-                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Supplier with(nolock) where HStopflag=0 and HItemID=" + HSupID.ToString(), "Gy_Supplier");
+                Int64 HSupID = 0;
+                HSupID = DBUtility.ClsPub.isLong(HBarCode);
+                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Supplier with(nolock) where HStopflag=0 and HItemID=" + HSupID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Supplier");
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵緵搴斿晢鏉$爜鏄惁姝g‘锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
+                    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/GetSupplierList_Json")]
+        [HttpGet]
+        public object GetSupplierList_Json(string Supplier, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Supplier with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%')", "Gy_Supplier");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍渚涘簲鍟嗚褰曪紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -457,16 +750,18 @@
         /// <returns></returns>
         [Route("WEBSController/GetCustomer_Json")]
         [HttpGet]
-        public object GetCustomer_Json(Int64 HCusID)
+        public object GetCustomer_Json(string HBarCode, Int64 HStockOrgID)
         {
             try
             {
-                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HItemID=" + HCusID.ToString(), "Gy_Customer");
+                Int64 HCusID = 0;
+                HCusID = DBUtility.ClsPub.isLong(HBarCode);
+                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Customer with(nolock) where HStopflag=0 and HItemID=" + HCusID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Customer");
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵鎴锋潯鐮佹槸鍚︽纭紝涓斾负闈炵鐢ㄧ姸鎬侊紒";
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵鎴锋潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -529,10 +824,256 @@
 
         #endregion
 
+        #region 鐝粍璧勬枡
+
+        /// <summary>
+        /// 鎵爜杩斿洖鐝粍淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetGroup_Json")]
+        [HttpGet]
+        public object GetGroup_Json(string HBarCode, Int64 HStockOrgID)
+        {
+            try
+            {
+                Int64 HGroupID = 0;
+                HGroupID = DBUtility.ClsPub.isLong(HBarCode);
+                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Group with(nolock) where HStopflag=0 and HItemID=" + HGroupID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Group");
+                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/GetGroupList_Json")]
+        [HttpGet]
+        public object GetGroupList_Json(string Group, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("select HItemID,HNumber,HName from Gy_Group with(nolock) where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + Group + "%' or HName like '%" + Group + "%')", "Gy_Group");
+                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/GetEquip_Json")]
+        [HttpGet]
+        public object GetEquip_Json(string HBarCode)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("select HInterID,HEquipFileNumber,HName,HSourceID from h_v_Gy_EquipFileBill where HBarCode='" + HBarCode + "'", "h_v_Gy_EquipFileBill");
+                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/GetEquipList_Json")]
+        [HttpGet]
+        public object GetEquipList_Json(string Equip)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("select HInterID,HEquipFileNumber,HName,HSourceID,HSourceName from h_v_Gy_EquipFileBill where HEquipFileNumber like '%" + Equip + "%' or HName like '%" + Equip + "%'", "h_v_Gy_EquipFileBill");
+                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 鐩存帴璋冩嫧    鑾峰彇璋冩嫧鍑鸿揣绫诲瀷
+
+        /// <summary>
+        /// 鑾峰彇璋冩嫧鍑鸿揣绫诲瀷
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetStockMoveStyle_Json")]
+        [HttpGet]
+        public Object GetStockMoveStyle_Json()
+        {
+            try
+            {
+                ds = oWebs.get_StockMoveStyle();
+                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/GetMoveDirect_Json")]
+        [HttpGet]
+        public Object GetMoveDirect_Json()
+        {
+            try
+            {
+                ds = oWebs.get_MoveDirect();
+                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 鏍规嵁鍗曟嵁绫诲瀷鑾峰彇鍗曟嵁瀛愮被鍨�
 
@@ -590,6 +1131,38 @@
             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 鎵爜妯″潡    鏍规嵁HItemID鍒犻櫎缂撳瓨鍒楄〃涓搴旀潯鐮佽褰�
+
+        /// <summary>
+        /// 鏍规嵁HItemID鍒犻櫎鏉$爜鍑哄叆搴撶紦瀛樿〃涓褰�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_DelPonderationBillMain_Temp_HItemID_Json")]
+        [HttpGet]
+        public object set_DelPonderationBillMain_Temp_HItemID_Json(long HInterID, string HBillType, long HItemID)
+        {
+            try
+            {
+                oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HItemID=" + HItemID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo);
                 objJsonResult.code = "0";
                 objJsonResult.count = 1;
                 objJsonResult.Message = "鍒犻櫎鎴愬姛";
@@ -698,6 +1271,58 @@
 
         #region 缂撳瓨鍒楄〃妯″潡璋冪敤
 
+        #region 缂撳瓨鍒楄〃鐣岄潰锛岃繑鍥炵紦瀛樺垪琛ㄤ俊鎭�
+
+        /// <summary>
+        /// 缂撳瓨鍒楄〃鐣岄潰锛岃繑鍥炵紦瀛樺垪琛ㄤ俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetKf_PonderationBillMain_TempList_New_Json")]
+        [HttpGet]
+        public object GetKf_PonderationBillMain_TempList_New_Json(string HBillType, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oWebs.GetKf_PonderationBillMain_TempList_New(HBillType, HMaker, HStockOrgID);
+                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
+
+
         #region 缂撳瓨鍒楄〃    缂栬緫鍔熻兘璋冪敤
 
         /// <summary>
@@ -740,10 +1365,10 @@
         #endregion
 
 
-        #region 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁鍙枫�佹簮鍗曞彿鏌ヨ宸蹭笂浼犲崟鎹俊鎭�
+        #region 宸蹭笂浼犳煡璇㈢晫闈㈠埛鏂�
 
         /// <summary>
-        /// 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁鍙枫�佹簮鍗曞彿鏌ヨ宸蹭笂浼犲崟鎹俊鎭�
+        /// 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁绫诲瀷銆佸崟鎹彿銆佹簮鍗曞彿鏌ヨ宸蹭笂浼犲崟鎹俊鎭�
         /// </summary>
         /// <returns></returns>
         [Route("WEBSController/GetKf_ICStockBillQueryList_Json")]
@@ -753,6 +1378,100 @@
             try
             {
                 ds = oWebs.GetKf_ICStockBillQueryList(HBillType, HBillNo, HSourceBillNo);
+                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;
+            }
+        }
+
+        /// <summary>
+        /// 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁绫诲瀷銆佸崟鎹彿銆佹簮鍗曞彿銆佺敤鎴锋煡璇㈠凡涓婁紶鍗曟嵁淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetKf_ICStockBillQueryList_User_Json")]
+        [HttpGet]
+        public object GetKf_ICStockBillQueryList_User_Json(string HBillType, string HBillNo, string HSourceBillNo, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_Kf_ICStockBillQueryByUserList '" + HBillType + "','" + HBillNo + "','" + HSourceBillNo + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Kf_ICStockBillQueryByUserList");
+                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;
+            }
+        }
+
+        /// <summary>
+        /// 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁绫诲瀷銆佸崟鎹彿銆佹簮鍗曞彿銆佺敤鎴枫�佽嚜瀹氫箟瀛楁鏌ヨ宸蹭笂浼犲崟鎹俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetKf_ICStockBillList_Json")]
+        [HttpGet]
+        public object GetKf_ICStockBillList_Json(string HBillType, string HBillNo, string HSourceBillNo, string HMaker, Int64 HStockOrgID, string sWhere)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_Kf_ICStockBillQueryList_New '" + HBillType + "','" + HBillNo + "','" + HSourceBillNo + "','" + HMaker + "'," + HStockOrgID.ToString() + ",'" + sWhere+"'", "h_p_Kf_ICStockBillQueryList_New");
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
@@ -907,12 +1626,340 @@
 
         #region 鎻愪氦鐢熷崟澶勭悊鏂规硶
 
+        #region 鐢熶骇姹囨姤    涓婁紶鐢熷崟
+
+        #region 鐢熶骇姹囨姤    鏂板妯″紡
+
+        /// <summary>
+        /// 鐢熶骇姹囨姤鏂板涓婁紶
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveICMOReportBill_Json")]
+        [HttpPost]
+        public object set_SaveICMOReportBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsSc_ICMOReportBillMain> lsmain = new List<Model.ClsSc_ICMOReportBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getICMOReportBillMainByJson(msg1);
+                WebS.ClsSc_ICMOReportBillMain websLsmain = new WebS.ClsSc_ICMOReportBillMain();
+                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.HGroupID = lsmain[0].HGroupID;
+                websLsmain.HEmpID = lsmain[0].HEmpID;
+                websLsmain.HCheckType = lsmain[0].HCheckType;
+                websLsmain.HRemark = lsmain[0].HRemark;
+                websLsmain.HBillSubType = lsmain[0].HBillSubType;
+                if (lsmain[0].HMainSourceBillType == "3710")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇璁㈠崟";
+                }
+                else
+                {
+                    websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+                }
+                websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HBillerID = lsmain[0].HBillerID;
+                websLsmain.HPRDORGID = lsmain[0].HSTOCKORGID;
+
+                if (oWebs.set_SaveICMOReportBill_New(websLsmain, sSourceType, 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
+
         #region 鐢熶骇鍏ュ簱    涓婁紶鐢熷崟
 
+        #region 鐢熶骇鍏ュ簱    鏂板妯″紡
+
+        /// <summary>
+        /// 鐢熶骇鍏ュ簱鏂板涓婁紶
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveProductInBill_Json")]
+        [HttpPost]
+        public object set_SaveProductInBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_ProductInBillMain> lsmain = new List<Model.ClsKf_ProductInBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getProductInBillMainByJson(msg1);
+                WebS.ClsKf_ProductInBillMain websLsmain = new WebS.ClsKf_ProductInBillMain();
+                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.HBillSubType = lsmain[0].HBillSubType;
+                if (lsmain[0].HMainSourceBillType == "3710")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇璁㈠崟";
+                }
+                else if (lsmain[0].HMainSourceBillType == "3711")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇姹囨姤鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "3714")
+                {
+                    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_SaveProductInBill_New(websLsmain, sSourceType, 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
 
         #region 閲囪喘鍏ュ簱    涓婁紶鐢熷崟
+
+        #region 閲囪喘鍏ュ簱    鏂板妯″紡
+
+        /// <summary>
+        /// 閲囪喘鍏ュ簱鏂板涓婁紶
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SavePOStockInBill_Json")]
+        [HttpPost]
+        public object set_SavePOStockInBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_POStockInBillMain> lsmain = new List<Model.ClsKf_POStockInBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getPOStockInBillMainByJson(msg1);
+                WebS.ClsKf_POStockInBillMain websLsmain = new WebS.ClsKf_POStockInBillMain();
+                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.HBillSubType = lsmain[0].HBillSubType;
+                if (lsmain[0].HMainSourceBillType == "1102")
+                {
+                    websLsmain.HMainSourceBillType = "閲囪喘璁㈠崟";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1103")
+                {
+                    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_SavePOStockInBill_New(websLsmain, sSourceType, 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
+
+        #region 濮斿鍏ュ簱    涓婁紶鐢熷崟
+
+        #region 濮斿鍏ュ簱    鏂板妯″紡
+
+        /// <summary>
+        /// 濮斿鍏ュ簱鏂板涓婁紶
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveEntrustInBill_Json")]
+        [HttpPost]
+        public object set_SaveEntrustInBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_EntrustInBillMain> lsmain = new List<Model.ClsKf_EntrustInBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getEntrustInBillMainByJson(msg1);
+                WebS.ClsKf_EntrustInBillMain websLsmain = new WebS.ClsKf_EntrustInBillMain();
+                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.HMangerID = lsmain[0].HMangerID;
+                websLsmain.HRemark = lsmain[0].HRemark;
+                websLsmain.HExplanation = lsmain[0].HExplanation;
+                websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+                websLsmain.HBillSubType = lsmain[0].HBillSubType;
+                if (lsmain[0].HMainSourceBillType == "1601")
+                {
+                    websLsmain.HMainSourceBillType = "濮斿璁㈠崟";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1103")
+                {
+                    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_SaveEntrustInBill_New(websLsmain, sSourceType, 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
@@ -990,7 +2037,7 @@
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鍏朵粬鍑哄簱鍗曚笂浼犲け璐ワ紒" + e.ToString();
+                objJsonResult.Message = "鍏朵粬鍏ュ簱鍗曚笂浼犲け璐ワ紒" + e.ToString();
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -1000,8 +2047,179 @@
 
         #endregion
 
+        #region 棰嗘枡鍑哄簱    涓婁紶鐢熷崟
+
+        #region 棰嗘枡鍑哄簱    鏂板妯″紡
+
+        /// <summary>
+        /// 棰嗘枡鍑哄簱鏂板涓婁紶
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveMateOutBill_Json")]
+        [HttpPost]
+        public object set_SaveMateOutBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_MateOutBillMain> lsmain = new List<Model.ClsKf_MateOutBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getMateOutBillMainByJson(msg1);
+                WebS.ClsKf_MateOutBillMain websLsmain = new WebS.ClsKf_MateOutBillMain();
+                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.HBillSubType = lsmain[0].HBillSubType;
+                if (lsmain[0].HMainSourceBillType == "3720")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1214")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇鍙戞枡閫氱煡鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "3721")
+                {
+                    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_SaveMateOutBill_New(websLsmain, sSourceType, 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
 
         #region 閿�鍞嚭搴�    涓婁紶鐢熷崟
+
+        #region 閿�鍞嚭搴�    鏂板妯″紡
+
+        /// <summary>
+        /// 閿�鍞嚭搴撴柊澧炰笂浼�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveSellOutBill_Json")]
+        [HttpPost]
+        public object set_SaveSellOutBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_SellOutBillMain> lsmain = new List<Model.ClsKf_SellOutBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getSellOutBillMainByJson(msg1);
+                WebS.ClsKf_SellOutBillMain websLsmain = new WebS.ClsKf_SellOutBillMain();
+                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.HBillSubType = lsmain[0].HBillSubType;
+                if (lsmain[0].HMainSourceBillType == "1402")
+                {
+                    websLsmain.HMainSourceBillType = "鍙戣揣閫氱煡鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1401")
+                {
+                    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_SaveSellOutBill_New(websLsmain, sSourceType, 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 閿�鍞嚭搴�    鏍¢獙妯″紡
 
@@ -1060,8 +2278,85 @@
 
         #endregion
 
-
         #region 濮斿棰嗘枡    涓婁紶鐢熷崟
+
+        #region 濮斿棰嗘枡    鏂板妯″紡
+
+        /// <summary>
+        /// 濮斿棰嗘枡鏂板涓婁紶
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveEntrustOutBill_Json")]
+        [HttpPost]
+        public object set_SaveEntrustOutBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_EntrustOutBillMain> lsmain = new List<Model.ClsKf_EntrustOutBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getEntrustOutBillMainByJson(msg1);
+                WebS.ClsKf_EntrustOutBillMain websLsmain = new WebS.ClsKf_EntrustOutBillMain();
+                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.HMangerID = lsmain[0].HMangerID;
+                websLsmain.HRemark = lsmain[0].HRemark;
+                websLsmain.HExplanation = lsmain[0].HExplanation;
+                websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+                websLsmain.HBillSubType = lsmain[0].HBillSubType;
+                if (lsmain[0].HMainSourceBillType == "1604")
+                {
+                    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_SaveEntrustOutBill_New(websLsmain, sSourceType, 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 濮斿棰嗘枡    鏍¢獙妯″紡
 
@@ -1120,8 +2415,168 @@
 
         #endregion
 
+        #region 鍏朵粬鍑哄簱    涓婁紶鐢熷崟
+
+        #region 鍏朵粬鍑哄簱    鏂板妯″紡
+
+        /// <summary>
+        /// 鍏朵粬鍑哄簱鏂板涓婁紶
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveOtherOutBill_Json")]
+        [HttpPost]
+        public object set_SaveOtherOutBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_OtherOutBillMain> lsmain = new List<Model.ClsKf_OtherOutBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getOtherOutBillMainByJson(msg1);
+                WebS.ClsKf_OtherOutBillMain websLsmain = new WebS.ClsKf_OtherOutBillMain();
+                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 == "1242")
+                {
+                    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_SaveOtherOutBill_New(websLsmain, sSourceType, 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
 
         #region 鐢熶骇琛ユ枡    涓婁紶鐢熷崟
+
+        #region 鐢熶骇琛ユ枡    鏂板妯″紡
+
+        /// <summary>
+        /// 鐢熶骇琛ユ枡鏂板涓婁紶
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveMateReplenishOutBill_Json")]
+        [HttpPost]
+        public object set_SaveMateReplenishOutBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_MateReplenishOutBillMain> lsmain = new List<Model.ClsKf_MateReplenishOutBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getMateReplenishOutBillMainByJson(msg1);
+                WebS.ClsKf_MateReplenishOutBillMain websLsmain = new WebS.ClsKf_MateReplenishOutBillMain();
+                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.HBillSubType = lsmain[0].HBillSubType;
+                if (lsmain[0].HMainSourceBillType == "3720")
+                {
+                    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_SaveMateReplenishOutBill_New(websLsmain, sSourceType, 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 鐢熶骇琛ユ枡    鏍¢獙妯″紡
 
@@ -1179,7 +2634,6 @@
         #endregion
 
         #endregion
-
 
         #region 濮斿琛ユ枡    涓婁紶鐢熷崟
 
@@ -1240,8 +2694,114 @@
 
         #endregion
 
-
         #region 鐩存帴璋冩嫧    涓婁紶鐢熷崟
+
+        #region 鐩存帴璋冩嫧    鏂板妯″紡
+
+        /// <summary>
+        /// 鐩存帴璋冩嫧鏂板涓婁紶
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveMoveStockBill_Json")]
+        [HttpPost]
+        public object set_SaveMoveStockBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_MoveStockBillMain> lsmain = new List<Model.ClsKf_MoveStockBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getMoveStockBillMainByJson(msg1);
+                WebS.ClsKf_MoveStockBillMain websLsmain = new WebS.ClsKf_MoveStockBillMain();
+                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.HBillSubType = lsmain[0].HBillSubType;
+                websLsmain.HStockStyle = lsmain[0].HStockStyle;
+                websLsmain.HTransferDirect = lsmain[0].HTransferDirect;
+                websLsmain.HShipType = lsmain[0].HShipType;
+                if (lsmain[0].HMainSourceBillType == "1402")
+                {
+                    websLsmain.HMainSourceBillType = "鍙戣揣閫氱煡鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1243")
+                {
+                    websLsmain.HMainSourceBillType = "璋冩嫧鐢宠鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "3720")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1604")
+                {
+                    websLsmain.HMainSourceBillType = "濮斿鐢ㄦ枡娓呭崟";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1214")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇鍙戞枡閫氱煡鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "3721")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇澶囨枡鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1242")
+                {
+                    websLsmain.HMainSourceBillType = "鍑哄簱鐢宠鍗�";
+                }
+                else
+                {
+                    websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+                }
+                websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HBillerID = lsmain[0].HBillerID;
+                websLsmain.HStockInOrgID = lsmain[0].HStockInOrgID;
+                websLsmain.HStockOutOrgID = lsmain[0].HStockOutOrgID;
+                websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
+                websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
+
+                if (oWebs.set_SaveMoveStockBill(websLsmain, sSourceType, 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 鎹㈡墭璋冩嫧鍗�
 
@@ -1286,7 +2846,347 @@
 
         #endregion
 
+        #region 鍒嗘寮忚皟鍑�    涓婁紶鐢熷崟
 
+        #region 鍒嗘寮忚皟鍑�    鏂板妯″紡
+
+        /// <summary>
+        /// 鍒嗘寮忚皟鍑烘柊澧炰笂浼�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveMoveStockStepOutBill_Json")]
+        [HttpPost]
+        public object set_SaveMoveStockStepOutBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_MoveStockStepOutBillMain> lsmain = new List<Model.ClsKf_MoveStockStepOutBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getMoveStockStepOutBillMainByJson(msg1);
+                WebS.ClsKf_MoveStockStepOutBillMain websLsmain = new WebS.ClsKf_MoveStockStepOutBillMain();
+                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.HBillSubType = lsmain[0].HBillSubType;
+                websLsmain.HStockStyle = lsmain[0].HStockStyle;
+                if (lsmain[0].HMainSourceBillType == "1402")
+                {
+                    websLsmain.HMainSourceBillType = "鍙戣揣閫氱煡鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1243")
+                {
+                    websLsmain.HMainSourceBillType = "璋冩嫧鐢宠鍗�";
+                }
+                else
+                {
+                    websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+                }
+                websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HBillerID = lsmain[0].HBillerID;
+                websLsmain.HStockInOrgID = lsmain[0].HStockInOrgID;
+                websLsmain.HStockOutOrgID = lsmain[0].HStockOutOrgID;
+                websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
+                websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
+
+                if (oWebs.set_SaveMoveStockStepOutBill_New(websLsmain, sSourceType, 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
+
+        #region 鍒嗘寮忚皟鍏�    涓婁紶鐢熷崟
+
+        #region 鍒嗘寮忚皟鍏�    鏂板妯″紡
+
+        /// <summary>
+        /// 鍒嗘寮忚皟鍏ユ柊澧炰笂浼�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveMoveStockStepInBill_Json")]
+        [HttpPost]
+        public object set_SaveMoveStockStepInBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_MoveStockStepInBillMain> lsmain = new List<Model.ClsKf_MoveStockStepInBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getMoveStockStepInBillMainByJson(msg1);
+                WebS.ClsKf_MoveStockStepInBillMain websLsmain = new WebS.ClsKf_MoveStockStepInBillMain();
+                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.HBillSubType = lsmain[0].HBillSubType;
+                websLsmain.HStockStyle = lsmain[0].HStockStyle;
+                if (lsmain[0].HMainSourceBillType == "1250")
+                {
+                    websLsmain.HMainSourceBillType = "鍒嗘寮忚皟鍑哄崟";
+                }
+                else
+                {
+                    websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+                }
+                websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HBillerID = lsmain[0].HBillerID;
+                websLsmain.HStockInOrgID = lsmain[0].HStockInOrgID;
+                websLsmain.HStockOutOrgID = lsmain[0].HStockOutOrgID;
+                websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
+                websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
+
+                if (oWebs.set_SaveMoveStockStepInBill_New(websLsmain, sSourceType, 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
+
+        #region 閲囪喘閫�鏂�    涓婁紶鐢熷崟
+
+        #region 閲囪喘閫�鏂�    鏂板妯″紡
+
+        /// <summary>
+        /// 閲囪喘閫�鏂欐柊澧炰笂浼�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SavePOStockInBackBill_Json")]
+        [HttpPost]
+        public object set_SavePOStockInBackBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getICStockBillMainByJson(msg1);
+                WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+                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.HBillSubType = lsmain[0].HBillSubType;
+                if (lsmain[0].HMainSourceBillType == "1102")
+                {
+                    websLsmain.HMainSourceBillType = "閲囪喘璁㈠崟";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1105")
+                {
+                    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_SavePOStockInBackBill_New(websLsmain, sSourceType, 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
+
+        #region 鐢熶骇閫�鏂�    涓婁紶鐢熷崟
+
+        #region 鐢熶骇閫�鏂�    鏂板妯″紡
+
+        /// <summary>
+        /// 鐢熶骇閫�鏂欐柊澧炰笂浼�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveMateOutBackBill_Json")]
+        [HttpPost]
+        public object set_SaveMateOutBackBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getICStockBillMainByJson(msg1);
+                WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+                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.HBillSubType = lsmain[0].HBillSubType;
+                if (lsmain[0].HMainSourceBillType == "3720")
+                {
+                    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_SaveMateOutBackBill_New(websLsmain, sSourceType, 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
 
         #region 鐢熶骇缁勬墭鍗�    涓婁紶鐢熷崟
 
@@ -1329,10 +3229,198 @@
 
         #endregion
 
+        #region 涓婃枡闃查敊鍗�     涓婁紶鐢熷崟
+
+        /// <summary>
+        /// 涓婃枡闃查敊鍗曟柊澧炰笂浼�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveMaterToSourceBill_Json")]
+        [HttpPost]
+        public object set_SaveMaterToSourceBill_Json([FromBody] JObject oMain)
+        {
+            BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
+            DAL.ClsSc_MaterToSourceBill BillNew = new DAL.ClsSc_MaterToSourceBill();
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                string sMainStr = "[" + msg1.ToString() + "]";
+                List<Model.ClsSc_MaterToSourceBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_MaterToSourceBillMain>>(sMainStr);
+
+                //鍗曟嵁鍙锋槸鍚﹂噸澶�
+                if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, mainList[0].HBillNo, BillStatus, mainList[0].HInterID))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+                string s = "";
+                int sYear = 0;
+                int sPeriod = 0;
+                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(mainList[0].HDate, ref sYear, ref sPeriod, ref s) == false)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = s;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //鍥哄畾璧嬪��=================================
+                BillNew.omodel.HYear = sYear;
+                BillNew.omodel.HPeriod = sPeriod;
+                BillNew.omodel.HBillType = "3786";
+                BillNew.omodel.HInterID = mainList[0].HInterID;
+                BillNew.omodel.HBillNo = mainList[0].HBillNo;
+                BillNew.omodel.HDate = mainList[0].HDate;
+                BillNew.omodel.HRemark = mainList[0].HRemark;
+                BillNew.omodel.HMaker = mainList[0].HMaker;
+                BillNew.omodel.HSTOCKORGID = mainList[0].HSTOCKORGID;
+                DBUtility.ClsPub.CurUserName = mainList[0].HMaker;
+                //====================================================
+                BillNew.omodel.HProcExchInterID = mainList[0].HProcExchInterID;
+                BillNew.omodel.HProcExchEntryID = mainList[0].HProcExchEntryID;
+                BillNew.omodel.HProcExchBillNo = mainList[0].HProcExchBillNo;
+                BillNew.omodel.HICMOInterID = mainList[0].HICMOInterID;
+                BillNew.omodel.HICMOEntryID = mainList[0].HICMOEntryID;
+                BillNew.omodel.HICMOBillNo = mainList[0].HICMOBillNo;
+                BillNew.omodel.HSourceID = mainList[0].HSourceID;
+                BillNew.omodel.HSourceBarCode = mainList[0].HSourceBarCode;
+                BillNew.omodel.HEquipID = mainList[0].HEquipID;
+                BillNew.omodel.HWorkerID = mainList[0].HWorkerID;
+                BillNew.omodel.HWorkerBarCode = mainList[0].HWorkerBarCode;
+                BillNew.omodel.HGroupID = mainList[0].HGroupID;
+                BillNew.omodel.HMainSourceBillType = mainList[0].HMainSourceBillType;
+                if (mainList[0].HMainSourceBillType == "3772")
+                {
+                    BillNew.omodel.HMainSourceInterID = mainList[0].HProcExchInterID;
+                    BillNew.omodel.HMainSourceEntryID = mainList[0].HProcExchEntryID;
+                    BillNew.omodel.HMainSourceBillNo = mainList[0].HProcExchBillNo;
+                }
+                else
+                {
+                    BillNew.omodel.HMainSourceInterID = mainList[0].HICMOInterID;
+                    BillNew.omodel.HMainSourceEntryID = mainList[0].HICMOEntryID;
+                    BillNew.omodel.HMainSourceBillNo = mainList[0].HICMOBillNo;
+                }
+                //瀛愯〃璧嬪��
+                ds = oCn.RunProcReturn("exec h_p_Sc_GetMaterToSourceBill_Temp " + BillNew.omodel.HInterID.ToString() + ",'" + BillNew.omodel.HBillType + "'", "h_p_Sc_GetMaterToSourceBill_Temp");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
+                    {
+                        Model.ClsSc_MaterToSourceBillSub oSub = new Model.ClsSc_MaterToSourceBillSub();
+                        //鍥哄畾璧嬪��========================================
+                        oSub.HEntryID = i + 1;
+                        oSub.HRemark = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HRemark"]);
+                        oSub.HSourceInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSourceInterID"]);
+                        oSub.HSourceEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSourceEntryID"]);
+                        oSub.HSourceBillType = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSourceBillType"]);
+                        oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSourceBillNo"]);
+                        oSub.HRelationQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HRelationQty"]);
+                        oSub.HRelationMoney = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HRelationMoney"]);
+                        oSub.HBillNo_bak = mainList[0].HBillNo;
+                        //=============================
+                        oSub.HMaterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HMaterID"]);
+                        oSub.HUnitID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HUnitID"]);
+                        oSub.HQty = DBUtility.ClsPub.isSingle(ds.Tables[0].Rows[i]["HQty"]);
+                        oSub.HPieceQty = DBUtility.ClsPub.isSingle(ds.Tables[0].Rows[i]["HPieceQty"]);
+                        oSub.HScanDate = DBUtility.ClsPub.isDate(ds.Tables[0].Rows[i]["HScanDate"]);
+                        oSub.HBarCode = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HBarCode"]);
+                        oSub.HBarCode_Pack = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HBarCode_Pack"]);
+                        BillNew.DetailColl.Add(oSub);
+                    }
+                }
+                //淇濆瓨
+                bool bResult;
+                bResult = BillNew.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+
+                if (bResult)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;  //鎴愬姛锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "涓婃枡闃查敊鍗曚笂浼犲け璐ワ紒" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
         #endregion
 
 
         #region 婧愬崟鏉$爜澶勭悊鏂规硶
+
+        #region 鐢熶骇姹囨姤    鎵弿婧愬崟鏉$爜
+
+        /// <summary>
+        /// 鐢熶骇姹囨姤    鎵弿婧愬崟鏉$爜
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_SourceBarCode_ICMOReport_Json")]
+        [HttpGet]
+        public object get_SourceBarCode_ICMOReport_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                WebSoBar = oWebs.get_SourceBarCode_ICMOReport(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, 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;
+            }
+        }
+
+        #endregion
 
         #region 鐢熶骇鍏ュ簱    鎵弿婧愬崟鏉$爜
 
@@ -1418,6 +3506,48 @@
 
         #endregion
 
+        #region 濮斿鍏ュ簱    鎵弿婧愬崟鏉$爜
+
+        /// <summary>
+        /// 濮斿鍏ュ簱    鎵弿婧愬崟鏉$爜
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_SourceBarCode_EntrustIn_Json")]
+        [HttpGet]
+        public object get_SourceBarCode_EntrustIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                WebSoBar = oWebs.get_SourceBarCode_EntrustIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, 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;
+            }
+        }
+
+        #endregion
+
         #region 鍏朵粬鍏ュ簱    鎵弿婧愬崟鏉$爜
 
         /// <summary>
@@ -1459,9 +3589,6 @@
         }
 
         #endregion
-
-
-
 
         #region 鐢熶骇棰嗘枡    鎵弿婧愬崟鏉$爜
 
@@ -1631,6 +3758,48 @@
 
         #endregion
 
+        #region 鐢熶骇琛ユ枡    鎵弿婧愬崟鏉$爜
+
+        /// <summary>
+        /// 鐢熶骇琛ユ枡    鎵弿婧愬崟鏉$爜
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_SourceBarCode_MateReplenishOut_Json")]
+        [HttpGet]
+        public object get_SourceBarCode_MateReplenishOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HStockOrgID)
+        {
+            try
+            {
+                WebSoBar = oWebs.get_SourceBarCode_MateReplenishOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, 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;
+            }
+        }
+
+        #endregion
+
         #region 鐩存帴璋冩嫧    鎵弿婧愬崟鏉$爜
 
         /// <summary>
@@ -1757,6 +3926,90 @@
 
         #endregion
 
+        #region 閲囪喘閫�鏂�    鎵弿婧愬崟鏉$爜
+
+        /// <summary>
+        /// 閲囪喘閫�鏂�    鎵弿婧愬崟鏉$爜
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_SourceBarCode_POStockInBack_Json")]
+        [HttpGet]
+        public object get_SourceBarCode_POStockInBack_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                WebSoBar = oWebs.get_SourceBarCode_POStockInBack(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, 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;
+            }
+        }
+
+        #endregion
+
+        #region 鐢熶骇閫�鏂�    鎵弿婧愬崟鏉$爜
+
+        /// <summary>
+        /// 鐢熶骇閫�鏂�    鎵弿婧愬崟鏉$爜
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_SourceBarCode_MateOutBack_Json")]
+        [HttpGet]
+        public object get_SourceBarCode_MateOutBack_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                WebSoBar = oWebs.get_SourceBarCode_MateOutBack(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, 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;
+            }
+        }
+
+        #endregion
+
         #endregion
 
 
@@ -1826,6 +4079,66 @@
         #endregion
 
         #region 鐗╂枡鏉$爜澶勭悊鏂规硶    璋冩嫧妯″潡
+
+        /// <summary>
+        /// 鐗╂枡鏉$爜鏂囨湰妗� 璋冩嫧鎵爜璋冪敤  20240222
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/get_BarCode_MoveStock_Json")]
+        [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, string HCustom1, string HCustom2)
+        {
+            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(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 = 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;
+            }
+        }
 
         /// <summary>
         /// 鐗╂枡鏉$爜鏂囨湰妗� 鎵爜璋冪敤
@@ -2096,6 +4409,57 @@
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
                 objJsonResult.Message = "鑾峰彇鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 鏍规嵁鍗曟嵁ID銆佺墿鏂橧D杩斿洖鏉$爜涓存椂琛ㄤ腑鏉$爜淇℃伅
+
+        /// <summary>
+        ///  鏍规嵁鍗曟嵁ID銆佺墿鏂橧D杩斿洖鏉$爜涓存椂琛ㄤ腑鏉$爜淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetBarCodeByMaterID_Temp_Json")]
+        [HttpGet]
+        public object GetBarCodeByMaterID_Temp_Json(Int64 HInterID, string HBillType, Int64 HMaterID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeByMaterID_Temp " + HInterID.ToString() + ",'" + HBillType + "'," + HMaterID.ToString(), "h_p_WMS_BarCodeByMaterID_Temp");
+                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;
             }
@@ -3305,15 +5669,947 @@
         #endregion
 
 
-        #region 澶勭悊鏂规硶
+        #region 鍑洪棬纭鍗曟ā鍧楄皟鐢ㄦ柟娉�     20240308
 
+        #region 鎵弿鍗曟嵁鍙锋潯鐮佽皟鐢�
+
+        /// <summary>
+        /// 鎵弿鍗曟嵁鍙锋潯鐮�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/Get_SourceBarCode_OutDoorCheck_Json")]
+        [HttpGet]
+        public object Get_SourceBarCode_OutDoorCheck_Json(string HBarCode, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_OutDoorCheck '" + HBarCode + "'," + HStockOrgID.ToString(), "h_p_WMS_AddSourceBarCode_OutDoorCheck");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎵弿鍗曟嵁鍙锋潯鐮佸垽鏂け璐ワ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
+                    {
+                        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;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎵弿鍗曟嵁鍙锋潯鐮佸け璐ワ紒" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                        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_SaveOutDoorCheckBill_Json")]
+        [HttpPost]
+        public object set_SaveOutDoorCheckBill_Json([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsXs_OutDoorCheckBillMain> lsmain = new List<Model.ClsXs_OutDoorCheckBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getOutDoorCheckBillMainByJson(msg1);
+                ClsXs_OutDoorCheckBillMain oMain = new ClsXs_OutDoorCheckBillMain();
+                string sSourceType = lsmain[0].HMainSourceBillType;
+                oMain.HInterID = lsmain[0].HInterID;
+                oMain.HBillNo = lsmain[0].HBillNo;
+                oMain.HBillType = lsmain[0].HBillType;
+                oMain.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
+                oMain.HMainSourceBillType = lsmain[0].HMainSourceBillType;
+                oMain.HMainSourceInterID = lsmain[0].HMainSourceInterID;
+                oMain.HMainSourceEntryID = lsmain[0].HMainSourceEntryID;
+                oMain.HMainSourceBillNo = lsmain[0].HMainSourceBillNo;
+                oMain.HExplanation = lsmain[0].HExplanation;
+                oMain.HRemark = lsmain[0].HRemark;
+                oMain.HMaker = lsmain[0].HMaker;
+                oMain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+                //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+                string s = "";
+                int sYear = 0;
+                int sPeriod = 0;
+                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = s;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    oMain.HYear = sYear;
+                    oMain.HPeriod = sPeriod;
+                }
+
+                oCn.BeginTran();
+                //鐢熸垚鍑洪棬纭鍗曪紙鍙渶鐢熸垚涓昏〃鏁版嵁锛�
+                //鎻掑叆涓昏〃
+                oCn.RunProc("Insert Into Xs_OutDoorCheckBillMain " +
+                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+                ",HYear,HPeriod,HBillStatus,HRemark,HMaker,HMakeDate" +
+                ",HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo" +
+                ",HExplanation,HSTOCKORGID" +
+                ") " +
+                " values('" + oMain.HBillType + "','" + oMain.HBillType + "'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HDate.ToShortDateString() + "'" +
+                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",1,'" + oMain.HRemark + "','" + oMain.HMaker + "',getdate()" +
+                ",'" + oMain.HMainSourceBillType + "'," + oMain.HMainSourceInterID.ToString() + "," + oMain.HMainSourceEntryID.ToString() + ",'" + oMain.HMainSourceBillNo + "'" +
+                ",'" + oMain.HExplanation + "'," + oMain.HSTOCKORGID.ToString() +
+                ") ");
+
+                //瀹℃牳鍗曟嵁
+                oCn.RunProc("Update Xs_OutDoorCheckBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + oMain.HInterID.ToString());
+
+                oCn.Commit();
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鐢熸垚骞跺鏍稿嚭闂ㄧ‘璁ゅ崟鎴愬姛锛佸崟鎹彿涓猴細" + oMain.HBillNo;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍑洪棬纭鍗曚笂浼犲け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
 
         #endregion
 
 
+        #region 涓婃枡闃查敊鍗曟ā鍧楄皟鐢ㄦ柟娉�     20240528
+
+        #region 涓婃枡闃查敊鍗曟壂鐮佹ā鍧�  鎵弿婧愬崟鏉$爜璋冪敤鏂规硶
+        /// <summary>
+        /// 鎵弿婧愬崟鏉$爜
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/get_SourceBarCode_MaterToSource_Json")]
+        [HttpGet]
+        public object get_SourceBarCode_MaterToSource_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_MaterToSource " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "','" + HMaker + "'", "h_p_WMS_AddSourceBarCode_MaterToSource");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎵弿婧愬崟鏉$爜锛屽啓鍏ユ簮鍗曚复鏃惰〃澶辫触锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                    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/get_BarCode_MaterToSource_Json")]
+        [HttpGet]
+        public object get_BarCode_MaterToSource_Json(Int64 HInterID, string HBillNo, string HBillType, string HBarCode, string HMaker)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_MaterToSource " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode + "','" + HMaker + "'", "h_p_WMS_AddBarCode_MaterToSource");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎵弿鐗╂枡鏉$爜锛屽啓鍏ョ墿鏂欐潯鐮佷复鏃惰〃澶辫触锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                    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/GetBillEntryTmpList_MaterToSource_Json")]
+        [HttpGet]
+        public object GetBillEntryTmpList_MaterToSource_Json(Int64 HInterID, string HBillNo, string HBillType)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmpList_MaterToSource " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_BillEntryTmpList_MaterToSource");
+                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
+
+        #region 涓婃枡闃查敊鍗曟壂鐮佹ā鍧�    鍒犻櫎鍔熻兘鎸夐挳璋冪敤  鍒犻櫎閫変腑琛岀墿鏂欐潯鐮佷复鏃惰〃璁板綍
+
+        /// <summary>
+        /// 鍒犻櫎閫変腑琛岀墿鏂欐潯鐮佷复鏃惰〃璁板綍
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_DelStationInBillSub_BindBarCodeTemp_Json")]
+        [HttpGet]
+        public object set_DelStationInBillSub_BindBarCodeTemp_Json(Int64 HInterID, string HBillType, string HBarCode)
+        {
+            try
+            {
+                oCn.RunProc("Delete from Sc_StationInBillSub_BindBarCodeTemp where 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/GetSourceBill_Temp_MaterToSource_Json")]
+        [HttpGet]
+        public object GetSourceBill_Temp_MaterToSource_Json(Int64 HInterID, string HBillType)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_SourceBill_Temp_MaterToSource " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_SourceBill_Temp_MaterToSource");
+                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
+
+        #region 涓婃枡闃查敊鍗曠紦瀛樺垪琛ㄦā鍧楄皟鐢ㄦ柟娉�
+
+        #region 涓婃枡闃查敊鍗曠紦瀛樺垪琛ㄧ晫闈紝杩斿洖缂撳瓨鍒楄〃淇℃伅
+
+        /// <summary>
+        /// 涓婃枡闃查敊鍗曠紦瀛樺垪琛ㄧ晫闈紝杩斿洖缂撳瓨鍒楄〃淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetStationInBillSub_BindBarCodeTempList_Json")]
+        [HttpGet]
+        public object GetStationInBillSub_BindBarCodeTempList_Json(string HBillType, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_Sc_GetStationInBillSub_BindBarCodeTempList '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Sc_GetStationInBillSub_BindBarCodeTempList");
+                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
+
+        #region 涓婃枡闃查敊鍗曠紦瀛樺垪琛ㄦā鍧�  鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+
+        /// <summary>
+        /// 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_DeleteStationInBillSub_BindBarCodeTemp_Json")]
+        [HttpGet]
+        public object set_DeleteStationInBillSub_BindBarCodeTemp_Json(long HInterID, string HBillType)
+        {
+            try
+            {
+                oCn.RunProc("Delete from Sc_StationInBillSub_BindSourceTemp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+                oCn.RunProc("Delete from Sc_StationInBillSub_BindBarCodeTemp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", 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
+
+        #endregion
+
+        #endregion
 
 
+        #region 鐗╂枡鏉$爜鏌ヨ璋冪敤鏂规硶
+        /// <summary>
+        /// 鑾峰彇鏉$爜淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetGy_BarCodeBill_QiaoYi_PDA_Json")]
+        [HttpGet]
+        public object GetGy_BarCodeBill_QiaoYi_PDA_Json(string sWhere)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillList_QiaoYi '" + sWhere+ "'", "h_p_Gy_BarCodeBillList_QiaoYi");
+                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
 
+        #region 宸ュ簭鍑虹珯姹囨姤鍗曞垪琛ㄦ煡璇㈣皟鐢ㄦ柟娉�
+        /// <summary>
+        /// 鑾峰彇鏉$爜淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetMES_StationOutBillList_PDA_QiaoYi_Json")]
+        [HttpGet]
+        public object GetMES_StationOutBillList_PDA_QiaoYi_Json(string HProcExchBillNo, string HBillNo, string HNumber, string HName, string HICMOBillNo, string user)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_MES_StationOutBillList_PDA_QiaoYi '" + HProcExchBillNo + "','" + HBillNo + "','" + HNumber + "','" + HName + "','" + HICMOBillNo + "'", "h_p_MES_StationOutBillList_PDA_QiaoYi");
+                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
+
+        #region 宸ュ簭杩涚珯鎺ユ敹鍗曞垪琛ㄦ煡璇㈣皟鐢ㄦ柟娉�
+        /// <summary>
+        /// 鑾峰彇鏉$爜淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetMES_StationInBillList_PDA_QiaoYi_Json")]
+        [HttpGet]
+        public object GetMES_StationInBillList_PDA_QiaoYi_Json(string HProcExchBillNo, string HBillNo, string HNumber, string HName, string HICMOBillNo, string user)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_MES_StationInBillList_PDA_QiaoYi '" + HProcExchBillNo + "','" + HBillNo + "','" + HNumber + "','" + HName + "','" + HICMOBillNo + "'", "h_p_MES_StationInBillList_PDA_QiaoYi");
+                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
+
+        #region 宸ュ簭娴佽浆鍗″垪琛ㄦ煡璇㈣皟鐢ㄦ柟娉�
+
+        #region 鍗曟嵁鍒楄〃璋冪敤鏂规硶
+
+        /// <summary>
+        /// 鑾峰彇鏉$爜淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetMES_ProcessExchangeBillList_PDA_QiaoYi_Json")]
+        [HttpGet]
+        public object GetMES_ProcessExchangeBillList_PDA_QiaoYi_Json(string HBillNo, string HNumber, string HName, string HICMOBillNo, string user)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeBillList_PDA_QiaoYi '" + HBillNo + "','" + HNumber + "','" + HName + "','" + HICMOBillNo + "'", "h_p_MES_ProcessExchangeBillList_PDA_QiaoYi");
+                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
+
+        #region 瀛愯〃鏄庣粏璋冪敤鏂规硶
+        /// <summary>
+        /// 鏌ョ湅鏄庣粏
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetMES_ProcessExchangeSubBillList_PDA_QiaoYi_Json")]
+        [HttpGet]
+        public object GetMES_ProcessExchangeSubBillList_PDA_QiaoYi_Json(string HInterID, string user)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi '" + HInterID+ "'", "h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi");
+                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/GetMES_Sc_ICMOBillList_PDA_QiaoYi_Json")]
+        [HttpGet]
+        public object GetMES_Sc_ICMOBillList_PDA_QiaoYi_Json(string HBillNo, string HNumber, string HMaterName, string HDeptName, string user)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_MES_Sc_ICMOBillList_PDA_QiaoYi '" + HBillNo + "','" + HNumber + "','" + HMaterName + "','" + HDeptName + "'", "h_p_MES_Sc_ICMOBillList_PDA_QiaoYi");
+                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
+
+        #region 鏌ョ湅鍏宠仈璋冪敤鏂规硶
+        /// <summary>
+        /// 鏌ョ湅鏄庣粏
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetMES_Sc_ICMOSubBillList_PDA_QiaoYi_Json")]
+        [HttpGet]
+        public object GetMES_Sc_ICMOSubBillList_PDA_QiaoYi_Json(string HInterID, string HDATA, string user)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_MES_Sc_ICMOSubBillList_PDA_QiaoYi '" + HInterID + "'", "h_p_MES_Sc_ICMOSubBillList_PDA_QiaoYi");
+                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鍒楀璞$殑鍒楀悕
+                    }
+                   if (HDATA=="HSPE")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鎴愬姛锛�";
+                        objJsonResult.data = ds.Tables[0];
+                        objJsonResult.list = columnNameList;
+                        return objJsonResult;
+                    }
+                   else if (HDATA == "HICM")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鎴愬姛锛�";
+                        objJsonResult.data = ds.Tables[1];
+                        objJsonResult.list = columnNameList;
+                        return objJsonResult;
+                    }
+                   else 
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鎴愬姛锛�";
+                        objJsonResult.data = ds.Tables[2];
+                        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 鏉$爜鍑哄叆搴撴煡璇㈣皟鐢ㄦ柟娉�
+        /// <summary>
+        /// 鑾峰彇鏉$爜淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetGy_BarCodeBillInOut_PDA_Json")]
+        [HttpGet]
+        public object GetGy_BarCodeBillInOut_PDA_Json(string HBarCode)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillInOut_PDA_QiaoYi '" + HBarCode + "'", "h_p_Gy_BarCodeBillInOut_PDA_QiaoYi");
+                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;
+            }
+        }
+
+
+        /// <summary>
+        /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Gy_BarCodeBillInOut/cx")]
+        [HttpGet]
+        public object cx(string HBarCode)
+        {
+            try
+            {
+
+                ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillInOut_PDA_QiaoYi '" + HBarCode + "'", "h_p_Gy_BarCodeBillInOut_PDA_QiaoYi");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "false锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
 
         #region 鎶ヨ〃鏁版嵁鑾峰彇鏂规硶
 
@@ -3558,7 +6854,194 @@
 
         #endregion
 
+        #region 浠撳簱鏀跺彂瀛樻姤琛�
+        /// <summary>
+        /// 浠撳簱鏀跺彂瀛樻姤琛�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetKf_StockInOutSumQueryReport_Json")]
+        [HttpGet]
+        public object GetKf_StockInOutSumQueryReport_Json(string sWhere)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_Kf_StockInOutSumQueryReport " + sWhere, "h_p_Kf_StockInOutSumQueryReport");
+                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鍒楀璞$殑鍒楀悕
+                }
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "褰撳墠鎵�杈撳叆杩囨护鏉′欢锛屾病鏈夎繑鍥炰换浣曠粨鏋滐紒";
+                    objJsonResult.data = null;
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+                else
+                {
+                    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/GetKF_ICinventoryQueryReport_Json")]
+        [HttpGet]
+        public object GetKF_ICinventoryQueryReport_Json(string sWhere)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_KF_ICinventoryQueryReport " + sWhere, "h_p_KF_ICinventoryQueryReport");
+                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鍒楀璞$殑鍒楀悕
+                }
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "褰撳墠鎵�杈撳叆杩囨护鏉′欢锛屾病鏈夎繑鍥炰换浣曠粨鏋滐紒";
+                    objJsonResult.data = null;
+                    objJsonResult.list = columnNameList;
+                    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/GetKf_ICInvBalList")]
+        [HttpGet]
+        public object GetKf_ICInvBalList(string sWhere)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCn.RunProcReturn("select * from h_v_Kf_ICInvBalList ", "h_v_Kf_ICInvBalList");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Kf_ICInvBalList where 1 = 1 ";
+                    string sql = sql1 + sWhere;
+                    ds = oCn.RunProcReturn(sql, "h_v_Kf_ICInvBalList");
+                }
+
+                //娣诲姞鍒楀悕
+                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 = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;                
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鏈熷垵搴撳瓨鎶ヨ〃
+        /// <summary>
+        /// 浠撳簱鏀跺彂瀛樻姤琛�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/UpdateKf_ICInvBal")]
+        [HttpGet]
+        public object UpdateKf_ICInvBal( )
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_KF_ICinventory ", "h_p_KF_ICinventory");
+
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鏍″鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
         #endregion
 
 

--
Gitblit v1.9.1