From 2148a6167e10dfd99e143fbf509be96f2bc8e369 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期三, 21 二月 2024 10:56:28 +0800
Subject: [PATCH] 新增扫描班组条码调用方法,新增生产汇报单上传方法,新增生产汇报、委外入库扫描源单条码调用方法

---
 WebAPI/Controllers/条码管理/WEBSController.cs | 1143 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 1,131 insertions(+), 12 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 4a61c07..64eaf38 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"
@@ -37,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銆佸崟鎹彿
 
         /// <summary>
@@ -465,16 +614,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;
                 }
@@ -507,16 +696,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;
                 }
@@ -572,6 +763,88 @@
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
                 objJsonResult.Message = "杩斿洖瀹㈡埛淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #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;
             }
@@ -780,6 +1053,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>
@@ -822,10 +1147,10 @@
         #endregion
 
 
-        #region 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁鍙枫�佹簮鍗曞彿鏌ヨ宸蹭笂浼犲崟鎹俊鎭�
+        #region 宸蹭笂浼犳煡璇㈢晫闈㈠埛鏂�
 
         /// <summary>
-        /// 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁鍙枫�佹簮鍗曞彿鏌ヨ宸蹭笂浼犲崟鎹俊鎭�
+        /// 宸蹭笂浼犳煡璇㈢晫闈紝鏍规嵁鍗曟嵁绫诲瀷銆佸崟鎹彿銆佹簮鍗曞彿鏌ヨ宸蹭笂浼犲崟鎹俊鎭�
         /// </summary>
         /// <returns></returns>
         [Route("WEBSController/GetKf_ICStockBillQueryList_Json")]
@@ -835,6 +1160,53 @@
             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";
@@ -989,12 +1361,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
@@ -1082,6 +1782,95 @@
 
         #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 閿�鍞嚭搴�    涓婁紶鐢熷崟
 
@@ -1224,8 +2013,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 濮斿棰嗘枡    鏍¢獙妯″紡
 
@@ -1275,6 +2141,89 @@
                 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_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;
             }
@@ -1498,6 +2447,48 @@
 
         #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 鐢熶骇鍏ュ簱    鎵弿婧愬崟鏉$爜
 
         /// <summary>
@@ -1582,6 +2573,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>
@@ -1623,9 +2656,6 @@
         }
 
         #endregion
-
-
-
 
         #region 鐢熶骇棰嗘枡    鎵弿婧愬崟鏉$爜
 
@@ -3900,8 +4930,97 @@
 
         #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 鎶ヨ〃鏁版嵁鑾峰彇鏂规硶
 
         #region 鏉$爜鍑哄叆搴撹褰曟姤琛�

--
Gitblit v1.9.1