WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -23,13 +23,78 @@
        public string sWhere = "";
        public WebServer webserver = new WebServer();
        public DataSet ds = new DataSet();
        private json objjson = new json();
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        public ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
        public WebS.WebService1 oWebs = new WebS.WebService1();
        public WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        WebS.ClsXt_SystemParameterMain oSystemParameterMain = new WebS.ClsXt_SystemParameterMain();
        #region å…¬ç”¨æ–¹æ³•
        #region èŽ·å–æœ€å¤§å•æ®ID、单据号
        /// <summary>
        /// èŽ·å–æœ€å¤§å•æ®ID、单据号
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetMaxBillNoAndID_Json")]
        [HttpGet]
        public object GetMaxBillNoAndID_Json(string HBillType)
        {
            try
            {
                string sErrMsg = "";
                Int64 HInterID = 0;
                string HBillNo = "";
                HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref sErrMsg);
                HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true);
                //----------创建虚表------------------------
                DataTable dt_Main = new DataTable("Json");
                dt_Main.Columns.Add("HBillNo", typeof(string));
                dt_Main.Columns.Add("HInterID", typeof(int));
                //---------创建新行------------------------
                DataRow dr_main = dt_Main.NewRow(); //创建新行
                dt_Main.Rows.Add(dr_main);          //将新行加入到表中
                dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo);
                dr_main["HInterID"] = DBUtility.ClsPub.isLong(HInterID);
                //返回数据
                if (HBillNo == "" || HInterID == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "最大单据ID、单据号获取失败";
                    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 = "获取最大单据ID、单据号失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region åŸºç¡€èµ„æ–™
@@ -60,14 +125,229 @@
        #endregion
        #region ç•Œé¢æŽ§ä»¶åŠŸèƒ½è°ƒç”¨æ–¹æ³•
        #region æ ¹æ®å•据类型获取单据子类型
        /// <summary>
        /// æ ¹æ®å•据类型获取单据子类型
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetBillSubType_Json")]
        [HttpGet]
        public Object GetBillSubType_Json(string HBillType, Int64 HStockOrgID)
        {
            try
            {
                ds = oWebs.get_BillSubType(HBillType, HStockOrgID);
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查询不到单据子类型信息!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "根据单据类型获取单据子类型信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region ç¼“存列表    ç¼–辑功能调用
        /// <summary>
        /// ç¼“存列表选择编辑时,判断所选单据是否已存在上传记录,启用先进先出功能的,回填先进先出临时表状态(更新 HlineStatus =0)
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/TempList_Modify_Json")]
        [HttpGet]
        public object TempList_Modify_Json(long HInterID, string HBillNo, string HBillType)
        {
            try
            {
                if (oWebs.TempList_Modify(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "缓存列表编辑前判断失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å·²ä¸Šä¼ æŸ¥è¯¢ç•Œé¢ï¼Œæ ¹æ®å•据号、源单号查询已上传单据信息
        /// <summary>
        /// å·²ä¸Šä¼ æŸ¥è¯¢ç•Œé¢ï¼Œæ ¹æ®å•据号、源单号查询已上传单据信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetKf_ICStockBillQueryList_Json")]
        [HttpGet]
        public object GetKf_ICStockBillQueryList_Json(string HBillType, string HBillNo, string HSourceBillNo)
        {
            try
            {
                ds = oWebs.GetKf_ICStockBillQueryList(HBillType, HBillNo, HSourceBillNo);
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查询不到该单据记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    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 å·²ä¸Šä¼ åˆ—表界面,撤销功能,删除WMS表和本地出入库单记录,并更新TEMP表中的上传字段 HRelationInterID=0
        /// <summary>
        /// å·²ä¸Šä¼ åˆ—表界面,撤销功能,删除WMS表和本地出入库单记录,并更新TEMP表中的上传字段 HRelationInterID=0
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/DeleteICStockBillAndWMS_Json")]
        [HttpGet]
        public object DeleteICStockBillAndWMS_Json(Int64 HInterID, string HBillNo, string HBillType)
        {
            try
            {
                if (oWebs.DeleteICStockBillAndWMS(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "撤销单据已上传记录失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æ¡ç å‡ºå…¥åº“缓存列表模块  åˆ é™¤ç¼“存列表单据
        /// <summary>
        /// åˆ é™¤ç¼“存列表单据
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_DelPonderationBillMain_Temp_Json")]
        [HttpGet]
        public object set_DelPonderationBillMain_Temp_Json(long HInterID, string HBillType)
        {
            try
            {
                oCn.RunProc("Delete from KF_PonderationBillMain_Temp 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
        #region åˆ é™¤æ¡ç å‡ºå…¥åº“临时表记录
        /// <summary>
        /// åˆ é™¤æ¡ç å‡ºå…¥åº“临时表记录
        /// æ‰«ç æ¨¡å—,删除选中行条码出入库临时表记录
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")]
        [HttpPost]
        [HttpGet]
        public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType)
        {
            try
@@ -93,7 +373,86 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除条码出入库临时表记录失败!" + e.ToString();
                objJsonResult.Message = "删除所选行条码出入库临时表记录失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// æ ¹æ®å•据ID,删除条码出入库临时表记录
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/DeleteBillList_Json")]
        [HttpGet]
        public object DeleteBillList_Json(long HInterID)
        {
            try
            {
                if (oWebs.DeleteBillList(HInterID, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除所选单据条码出入库临时表记录失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region åˆ é™¤å…ˆè¿›å…ˆå‡ºä¸´æ—¶è¡¨ï¼ˆæ›´æ–° HlineStatus =1)
        /// <summary>
        /// åˆ é™¤å…ˆè¿›å…ˆå‡ºä¸´æ—¶è¡¨ï¼ˆæ›´æ–° HlineStatus =1)
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json")]
        [HttpGet]
        public object set_DelPonderationBillMain_Temp_FIFO_Json(long HInterID, string HBillType)
        {
            try
            {
                if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, HBillType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "更新先进先出临时表HlineStatus值失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -165,6 +524,66 @@
        #endregion
        #region å§”外领料    ä¸Šä¼ ç”Ÿå•
        #region å§”外领料    æ ¡éªŒæ¨¡å¼
        /// <summary>
        /// å§”外领料校验上传
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveEntrustOutBill_BillCheck_Json")]
        [HttpPost]
        public object set_SaveEntrustOutBill_BillCheck_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);
                WebAPI.WebS.ClsKf_EntrustOutBillMain websLsmain = new WebS.ClsKf_EntrustOutBillMain();
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = "1211";
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveEntrustOutBill_BillCheck(websLsmain, 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 ç”Ÿäº§è¡¥æ–™    æ ¡éªŒæ¨¡å¼
@@ -224,6 +643,155 @@
        #endregion
        #region å§”外补料    ä¸Šä¼ ç”Ÿå•
        #region å§”外补料    æ ¡éªŒæ¨¡å¼
        /// <summary>
        /// å§”外补料校验上传
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveEntrustReplenishOutBill_BillCheck_Json")]
        [HttpPost]
        public object set_SaveEntrustReplenishOutBill_BillCheck_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_EntrustReplenishOutBillMain> lsmain = new List<Model.ClsKf_EntrustReplenishOutBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getEntrustReplenishOutBillMainByJson(msg1);
                WebAPI.WebS.ClsKf_EntrustReplenishOutBillMain websLsmain = new WebS.ClsKf_EntrustReplenishOutBillMain();
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = "1255";
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveEntrustReplenishOutBill_BillCheck(websLsmain, 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_SaveMoveStockBill_HuanTuo_Json")]
        [HttpGet]
        public object set_SaveMoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                if (oWebs.set_SaveMoveStockBill_HuanTuo(HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "生成换托调拨单失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region ç”Ÿäº§ç»„托单    ä¸Šä¼ ç”Ÿå•
        /// <summary>
        /// ä¸Šä¼ ç”Ÿæˆç”Ÿäº§ç»„托单
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SavePackUnionBill_Json")]
        [HttpGet]
        public object set_SavePackUnionBill_Json(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                if (oWebs.set_SavePackUnionBill_Add(HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "生成生产组托单失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
@@ -271,8 +839,132 @@
        #endregion
        #region é‡‡è´­å…¥åº“    æ‰«ææºå•条码
        /// <summary>
        /// é‡‡è´­å…¥åº“    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_SourceBarCode_POStockIn_Json")]
        [HttpGet]
        public object get_SourceBarCode_POStockIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_POStockIn(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_OtherIn_Json")]
        [HttpGet]
        public object get_SourceBarCode_OtherIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_OtherIn(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_MateOut_Json")]
        [HttpGet]
        public object get_SourceBarCode_MateOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HStockOrgID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_MateOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HPTQty, HPlanMode, 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
@@ -320,42 +1012,17 @@
        #region å§”外出库    æ‰«ææºå•条码
        #endregion
        #region ç›´æŽ¥è°ƒæ‹¨    æ‰«ææºå•条码
        #endregion
        #region åˆ†æ­¥å¼è°ƒå‡º    æ‰«ææºå•条码
        #endregion
        #region åˆ†æ­¥å¼è°ƒå…¥    æ‰«ææºå•条码
        #endregion
        #endregion
        #region ç‰©æ–™æ¡ç å¤„理方法
        /// <summary>
        /// ç‰©æ–™æ¡ç æ–‡æœ¬æ¡† æ‰«ç è°ƒç”¨
        /// å§”外出库    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_BarCode_Json")]
        [Route("WEBSController/Get_SourceBarCode_EntrustOut_Json")]
        [HttpGet]
        public Object get_BarCode_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockOrgID, string HScanStyle, string HCustom1, string HCustom2)
        public object get_SourceBarCode_EntrustOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HStockOrgID)
        {
            try
            {
                var sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo,HMaker);
                SourceFlag = true;
                WebSoBar = oWebs.get_BarCode(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HScanStyle, HCustom1, HCustom2, ref DBUtility.ClsPub.sErrInfo);
                WebSoBar = oWebs.get_SourceBarCode_EntrustOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                if (WebSoBar == null)
                {
                    objJsonResult.code = "0";
@@ -377,7 +1044,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "扫描条码失败!" + e.ToString();
                objJsonResult.Message = "扫描源单条码失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -385,6 +1052,458 @@
        #endregion
        #region å…¶ä»–出库    æ‰«ææºå•条码
        /// <summary>
        /// å…¶ä»–出库    æ‰«ææºå•条码
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/get_SourceBarCode_OtherOut_Json")]
        [HttpGet]
        public object get_SourceBarCode_OtherOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_OtherOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HOWNERID, 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_MoveStock_Json")]
        [HttpGet]
        public object get_SourceBarCode_MoveStock_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_MoveStock(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HOWNERID, 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_MoveStockStepOut_Json")]
        [HttpGet]
        public object get_SourceBarCode_MoveStockStepOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HStockInOrgID, Int64 HStockOutOrgID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_MoveStockStepOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockInOrgID, HStockOutOrgID, 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_MoveStockStepIn_Json")]
        [HttpGet]
        public object get_SourceBarCode_MoveStockStepIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockInOrgID, Int64 HStockOutOrgID)
        {
            try
            {
                WebSoBar = oWebs.get_SourceBarCode_MoveStockStepIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockInOrgID, HStockOutOrgID, 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
        #region ç‰©æ–™æ¡ç å¤„理方法    å…¶ä»–出库库模块
        /// <summary>
        /// ç‰©æ–™æ¡ç æ–‡æœ¬æ¡† æ‰«ç è°ƒç”¨
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_BarCode_Json")]
        [HttpGet]
        public Object get_BarCode_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockOrgID, string HScanStyle, string HCustom1, string HCustom2)
        {
            //获取系统参数
            string sErrMsg = "";
            string sJXCode = "";
            if (oSystemParameter.ShowBill(ref sErrMsg) == true)
            {
                if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
                {
                    sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo, HMaker);
                    SourceFlag = true;
                }
                else
                {
                    sJXCode = sBarCode;
                }
                try
                {
                    WebSoBar = oWebs.get_BarCode(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HStockOrgID, HScanStyle, HCustom1, HCustom2, ref DBUtility.ClsPub.sErrInfo);
                    if (WebSoBar == null)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "成功";
                        objJsonResult.data = WebSoBar;
                        return objJsonResult;
                    }
                }
                catch (Exception e)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "扫描条码失败!" + e.ToString();
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                objJsonResult.data = null;
                return objJsonResult;
            }
         }
        #endregion
        #region ç‰©æ–™æ¡ç å¤„理方法    è°ƒæ‹¨æ¨¡å—
        /// <summary>
        /// ç‰©æ–™æ¡ç æ–‡æœ¬æ¡† æ‰«ç è°ƒç”¨
        /// </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 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
                {
                    string HCustom1 = "", HCustom2 = "";
                    WebSoBar = oWebs.get_BarCode_MoveStock(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo, HCustom1, HCustom2);
                    if (WebSoBar == null)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "成功";
                        objJsonResult.data = WebSoBar;
                        return objJsonResult;
                    }
                }
                catch (Exception e)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 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;
            }
            //try
            //{
            //    var sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
            //    WebSoBar = oWebs.get_BarCode_MoveStock(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
            //    if (WebSoBar == null)
            //    {
            //        objJsonResult.code = "0";
            //        objJsonResult.count = 0;
            //        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
            //        objJsonResult.data = null;
            //        return objJsonResult;
            //    }
            //    else
            //    {
            //        objJsonResult.code = "0";
            //        objJsonResult.count = 1;
            //        objJsonResult.Message = "成功";
            //        objJsonResult.data = WebSoBar;
            //        return objJsonResult;
            //    }
            //}
            //catch (Exception e)
            //{
            //    objJsonResult.code = "0";
            //    objJsonResult.count = 0;
            //    objJsonResult.Message = "扫描条码失败!" + e.ToString();
            //    objJsonResult.data = null;
            //    return objJsonResult;
            //}
        }
        #endregion
        #region ç‰©æ–™æ¡ç å¤„理方法    è°ƒæ‹¨ç›˜ç‚¹æ¨¡å—
        /// <summary>
        /// ç‰©æ–™æ¡ç æ–‡æœ¬æ¡† æ‰«ç è°ƒç”¨
        /// </summary>
        /// <returns></returns>
        //[Route("WEBSController/get_BarCode_MoveStock_PD")]
        //[HttpGet]
        //public Object get_BarCode_MoveStock_PD(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle)
        //{
        //    string sErrMsg = "";
        //    string sJXCode = "";
        //    if (oSystemParameter.ShowBill(ref sErrMsg) == true)
        //    {
        //        if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
        //        {
        //            sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
        //            SourceFlag = true;
        //        }
        //        else
        //        {
        //            sJXCode = sBarCode;
        //        }
        //        try
        //        {
        //            WebSoBar = oWebs.get_BarCode_MoveStock_PD(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
        //            if (WebSoBar == null)
        //            {
        //                objJsonResult.code = "0";
        //                objJsonResult.count = 0;
        //                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
        //                objJsonResult.data = null;
        //                return objJsonResult;
        //            }
        //            else
        //            {
        //                objJsonResult.code = "0";
        //                objJsonResult.count = 1;
        //                objJsonResult.Message = "成功";
        //                objJsonResult.data = WebSoBar;
        //                return objJsonResult;
        //            }
        //        }
        //        catch (Exception e)
        //        {
        //            objJsonResult.code = "0";
        //            objJsonResult.count = 0;
        //            objJsonResult.Message = "扫描条码失败!" + e.ToString();
        //            objJsonResult.data = null;
        //            return objJsonResult;
        //        }
        //    }
        //    else
        //    {
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 0;
        //        objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
        //        objJsonResult.data = null;
        //        return objJsonResult;
        //    }
        //}
        #endregion
        #region æ‰«ç æ¨¡å—调用方法
        #region ä»Žç¼“存列表页面返回信息
        /// <summary>
        /// ä»Žç¼“存列表页面返回信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetSourceBill_Temp_Json")]
        [HttpGet]
        public object GetSourceBill_Temp_Json(Int64 HInterID, string HBillType)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_WMS_SourceBill_Temp " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_SourceBill_Temp");
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "从缓存列表返回时,没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    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 å•据新增模块  èŽ·å–å•æ®åˆ—è¡¨ä¿¡æ¯å¤„ç†æ–¹æ³•
@@ -394,86 +1513,45 @@
        /// <returns></returns>
        [Route("WEBSController/GetBillEntryTmpList_Json")]
        [HttpGet]
        public object GetBillEntryTmpList(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID, string sMouldManagerCtl, string sFIFOCtl)
        public object GetBillEntryTmpList(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
        {
            try
            {
                string sSimpleMode = "N";  //是否启用扫码简易模式,只显示已扫码源单记录(Y,N)
                string sReturn = "";
                //获取系统参数
                if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sReturn) == true)
                string sMouldManagerCtl = "N";  //是否启用器具管理
                string sFIFOCtl = "N";          //是否启用先进先出管理
                ds = oWebs.GetBillEntryTmpList(HInterID, HBillNo, HBillType, HStockOrgID, ref sMouldManagerCtl, ref sFIFOCtl, ref DBUtility.ClsPub.sErrInfo);
                if (ds == null)
                {
                    //判断是否启用器具管理(Y,N)
                    if (oSystemParameter.omodel.WMS_MouldManagerCtl == "Y")   //启用模治具管理
                    {
                        sMouldManagerCtl = "Y";
                    }
                    //判断是否启用先进先出管理(Y,N),是否启用扫码简易模式,只显示已扫码源单记录(Y,N)
                    if (HBillType == "1204")   //生产领料单
                    {
                        if (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MateOutBill_FIFOList == "Y")   //生产领料单-先进先出控制
                        {
                            sFIFOCtl = "Y";
                        }
                        if (oSystemParameter.omodel.Kf_MateOutBill_SimpleMode == "Y")   //生产领料单-扫码简易模式
                        {
                            sSimpleMode = "Y";
                        }
                    }
                    else if (HBillType == "1205" && (oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_SellOutBill_FIFOList == "Y"))   //销售出库单-先进先出控制
                    {
                        sFIFOCtl = "Y";
                    }
                    else if (HBillType == "1211" && (oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_EntrustOutBill_FIFOList == "Y"))   //委外出库单-先进先出控制
                    {
                        sFIFOCtl = "Y";
                    }
                    else if (HBillType == "1207" && (oSystemParameter.omodel.Kf_MoveStockBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MoveStockBill_FIFOList == "Y"))   //直接调拨单-先进先出控制
                    {
                        sFIFOCtl = "Y";
                    }
                    else if (HBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList == "Y"))   //分步式调出单-先进先出控制
                    {
                        sFIFOCtl = "Y";
                    }
                    DataSet ds = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmpList_LayUI " + HInterID.ToString() + ",'" + HBillType + "','" + sMouldManagerCtl + "','" + sFIFOCtl + "','" + sSimpleMode + "'", "h_p_WMS_BillEntryTmpList_LayUI");
                    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));//获取到DataColumn列对象的列名
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    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;
                        objJsonResult.list = columnNameList;
                        return objJsonResult;
                    }
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";返回物料明细列表时获取系统参数失败! " + sReturn;
                    objJsonResult.data = null;
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.data = new
                    {
                        Materlist = ds.Tables[0],           //返回物料明细列表信息(0)
                        Mouldlist = ds.Tables[1],           //返回模治具列表信息(1)
                        FIFOlist = ds.Tables[2],            //返回先进先出列表信息(2)
                        BarCodelist = ds.Tables[3],         //返回条码明细列表信息(3)
                        ICMOReportlist = ds.Tables[4],      //返回源单生产汇报单条码明细列表信息(4)
                        BarCodeDetailslist = ds.Tables[5]   //返回当前所扫描条码明细信息(5)
                    };
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
@@ -486,6 +1564,8 @@
                return objJsonResult;
            }
        }
        #endregion
        #endregion
@@ -586,9 +1666,802 @@
        [HttpGet]
        public Object get_CheckTypeByBarCode_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, Int64 HStockOrgID)
        {
            //获取系统参数
            string sErrMsg = "";
            string sJXCode = "";
            if (oSystemParameter.ShowBill(ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                {
                    //销售出库单
                    sSourceBarCodeCtl = "Y";
                }
                if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
                {
                    sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker);
                }
                else
                {
                    sJXCode = sBarCode;
                }
                try
                {
                    //原单据为扫码生成,校验时不生成条码记录,只对原扫描的条码进行核对
                    if (sSourceBarCodeCtl == "Y")
                    {
                        WebSoBar = oWebs.get_BillBarCode_Verify(HBillID, HBillNo, HBillType, sJXCode, HQty, 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;
                        }
                    }
                    //原单据非扫码生成,校验时生成条码记录
                    else
                    {
                        WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                        if (WebSoBar == null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "成功";
                            objJsonResult.data = WebSoBar;
                            return objJsonResult;
                        }
                    }
                }
                catch (Exception e)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "校验模式,扫描条码失败!" + e.ToString();
                    objJsonResult.data = null;
                    return objJsonResult;
                    }
                }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region è¿”回单据列表信息
        /// <summary>
        /// è¿”回单据列表信息    æ ¡éªŒæ¨¡å¼
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetKf_PonderationBillMain_Temp_BillCheck_Json")]
        [HttpGet]
        public object GetKf_PonderationBillMain_Temp_BillCheck_Json(long HInterID, string HBillType, string sWhere)
        {
            try
            {
                WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                ds = oWebs.GetKf_PonderationBillMain_Temp_BillCheck(HInterID, HBillType, sWhere);
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    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_DeleteBarCodeByEntryID_BillCheck_Json")]
        [HttpGet]
        public object set_DeleteBarCodeByEntryID_BillCheck_Json(long HInterID, string HBillType, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, Int64 HStockOrgID)
        {
            //获取系统参数
            string sErrMsg = "";
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                {
                    //销售出库单
                    sSourceBarCodeCtl = "Y";
                }
                //原单据为扫码生成,对原扫描的条码进行核对
                if (sSourceBarCodeCtl == "Y")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "校验条码,删除功能不可用! ";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //原单据非扫码生成
                else
                {
                    try
                    {
                        oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HMaterID=" + HMaterID.ToString() + " and HAuxPropID=" + HAuxPropID.ToString() + " and HMTONo='" + HMTONo + "' and HSourceInterID=" + HSourceInterID.ToString() + " and HSourceEntryID=" + HSourceEntryID.ToString() + " and HQty<>0 ", 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;
                    }
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç¼“存模块    è¿”回缓存列表信息
        /// <summary>
        /// è¿”回缓存列表信息    æ ¡éªŒæ¨¡å¼
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetKf_PonderationBillMain_TempList_BillCheck_Json")]
        [HttpGet]
        public object GetKf_PonderationBillMain_TempList_BillCheck_Json(string HBillType, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                ds = oWebs.GetKf_PonderationBillMain_TempList_BillCheck(HBillType, HMaker, HStockOrgID);
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据无缓存记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    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 ç¼“存模块    æ ¹æ®å•据ID,删除临时表记录
        /// <summary>
        /// æ ¹æ®å•据ID,删除临时表记录
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/DeleteBillList_BillCheck_Json")]
        [HttpGet]
        public object DeleteBillList_BillCheck_Json(long HInterID, string HBillType, Int64 HStockOrgID)
        {
            //获取系统参数
            string sErrMsg = "";
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                {
                    //销售出库单
                    sSourceBarCodeCtl = "Y";
                }
                //原单据为扫码生成,对原扫描的条码进行核对,删除条码出入库校验缓存记录
                if (sSourceBarCodeCtl == "Y")
                {
                    try
                    {
                        oCn.RunProc("Delete from KF_PonderationBillMain_Temp_Verify 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;
                    }
                }
                //原单据非扫码生成,删除条码出入库缓存列表记录
                else
                {
                    try
                    {
                        oCn.RunProc("Delete from KF_PonderationBillMain_Temp 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;
                    }
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç¼“存模块    å·²ä¸Šä¼ åˆ—表界面,撤销功能
        /// <summary>
        /// å·²ä¸Šä¼ åˆ—表界面,撤销功能,删除WMS表和本地出入库单记录,并更新TEMP表中的上传字段 HRelationInterID=0
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/DeleteICStockBillAndWMS_BillCheck_Json")]
        [HttpGet]
        public object DeleteICStockBillAndWMS_BillCheck_Json(Int64 HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
        {
            //获取系统参数
            string sErrMsg = "";
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                {
                    //销售出库单
                    sSourceBarCodeCtl = "Y";
                }
                //原单据为扫码生成,对原扫描的条码进行核对
                if (sSourceBarCodeCtl == "Y")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "校验条码,撤销功能不可用! ";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //原单据非扫码生成
                else
                {
                    try
                    {
                        if (oWebs.DeleteICStockBillAndWMS(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    catch (Exception e)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "撤销单据已上传记录失败!" + e.ToString();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
            }
            else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
        #endregion
        #endregion
        #region ç”Ÿäº§ç»„托单模块调用方法
        #region ç”Ÿäº§ç»„托单模块 æ‰«ææ‰˜æ¡ç 
        /// <summary>
        /// ç”Ÿäº§ç»„托单模块 æ‰«ææ‰˜æ¡ç 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_PackBarCode_PackUnionBill_Json")]
        [HttpGet]
        public object get_PackBarCode_PackUnionBill_Json(Int64 HInterID, string HBillNo, string HBillType, string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                WebS.ClsGy_BarCodeBill_WMS_Model WebSoBarModel = new WebS.ClsGy_BarCodeBill_WMS_Model();
                WebSoBarModel = oWebs.get_PackBarCode_PackUnionBill(HInterID, HBillNo, HBillType, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                if (WebSoBarModel == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功";
                    objJsonResult.data = WebSoBarModel;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "扫描托条码失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç”Ÿäº§ç»„托单模块 æ‰«ææ‰˜æ¡ç å¯¹åº”单个条码
        /// <summary>
        /// ç”Ÿäº§ç»„托单模块 æ‰«ææ‰˜æ¡ç å¯¹åº”单个条码
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_BarCode_PackUnionBill_Json")]
        [HttpGet]
        public object get_BarCode_PackUnionBill_Json(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                if (oWebs.get_BarCode_PackUnionBill(HBarCode, HInterID, HBillType, HBillNo, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "扫描条码失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region è¿”回组托列表信息
        /// <summary>
        /// è¿”回组托列表信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetBillEntry_Tmp_Pack_Json")]
        [HttpGet]
        public object GetBillEntry_Tmp_Pack_Json(long HInterID, string HBillNo, string HBillType)
        {
            try
            {
                ds = oWebs.GetBillEntry_Tmp_Pack(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo);
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取列表信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region åˆ é™¤æ˜Žç»†è¡¨ä½“选中行记录
        /// <summary>
        /// åˆ é™¤æ˜Žç»†è¡¨ä½“选中行记录
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_DelPackUnionBill_Temp_Pack_Json")]
        [HttpGet]
        public object set_DelPackUnionBill_Temp_Pack_Json(Int64 HInterID, string HBarCode, string HBillType)
        {
            try
            {
                if (oWebs.set_DelPackUnionBill_Temp_Pack(HInterID, HBarCode, HBillType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除组托记录失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç»„托缓存列表模块调用方法
        #region è¿”回组托缓存列表信息
        /// <summary>
        /// è¿”回组托缓存列表信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetSc_PackUnionBill_TempList_Json")]
        [HttpGet]
        public object GetSc_PackUnionBill_TempList_Json(string HBillType, string HMaker, long HStockOrgID)
        {
            try
            {
                ds = oWebs.GetSc_PackUnionBill_TempList(HBillType, HMaker, HStockOrgID);
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据无缓存记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取缓存信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取缓存列表信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region åˆ é™¤ç»„托缓存列表单据
        /// <summary>
        /// åˆ é™¤ç»„托缓存列表单据
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/DeleteTemp_PackUnionBill_Json")]
        [HttpGet]
        public object DeleteTemp_PackUnionBill_Json(Int64 HInterID)
        {
            try
            {
                if (oWebs.DeleteTemp_PackUnionBill(HInterID, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除缓存信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #endregion
        #region åˆ æ‰˜æ¨¡å—调用方法
        #region åˆ æ‰˜æ¨¡å— æ‰«ææ‰˜æ¡ç 
        /// <summary>
        /// åˆ æ‰˜æ¨¡å— æ‰«ææ‰˜æ¡ç 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_PackBarCode_DeletePackUnionBill_Json")]
        [HttpGet]
        public object Get_PackBarCode_DeletePackUnionBill_Json(string HBarCode_Pack, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_DeletePackUnionBill '" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddPackBarCode_DeletePackUnionBill");
                if (ds == null)
                {
                    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));  //获取到DataColumn列对象的列名
                        }
                        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/GetDeletePackUnionBill_Json")]
        [HttpGet]
        public object GetDeletePackUnionBill_Json(long HInterID, string HBillType, string HMaker)
        {
            try
            {
                oCn.RunProc("exec h_p_WMS_PackUnionBill_Delete " + HInterID.ToString() + ",'" + HBillType + "','" + HMaker + "'", 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
        #region æ¢æ‰˜è°ƒæ‹¨å•模块调用方法
        #region æ¢æ‰˜è°ƒæ‹¨å•模块 æ‰«æè°ƒå…¥æ‰˜æ¡ç 
        /// <summary>
        /// æ¢æ‰˜è°ƒæ‹¨å•模块 æ‰«æè°ƒå…¥æ‰˜æ¡ç 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_BarCodePack_In_MoveStockBill_HuanTuo_Json")]
        [HttpGet]
        public object get_BarCodePack_In_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillNo, string HBarCode_Pack, Int64 HStockOrgID)
        {
            try
            {
                WebSoBar = oWebs.get_BarCodePack_In_MoveStockBill_HuanTuo(HInterID, HBillNo, HBarCode_Pack, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                if (WebSoBar == null)
                {
                    objJsonResult.code = "0";
@@ -610,7 +2483,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "校验模式,扫描条码失败!" + e.ToString();
                objJsonResult.Message = "扫描调入托条码失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -618,8 +2491,238 @@
        #endregion
        #region å¤„理方法
        #region æ¢æ‰˜è°ƒæ‹¨å•模块 æ‰«æè°ƒå‡ºæ¡ç 
        /// <summary>
        /// æ¢æ‰˜è°ƒæ‹¨å•模块 æ‰«æè°ƒå‡ºæ¡ç 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/Get_BarCode_MoveStockBill_HuanTuo_Json")]
        [HttpGet]
        public object get_BarCode_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBillNo, string HBillType, string HBarCode, string HBarCode_Pack, Int64 HPackUnionInterID_In, Int64 HWhID, Int64 HSPID, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                if (oWebs.get_BarCode_MoveStockBill_HuanTuo(HInterID, HBillNo, HBillType, HBarCode, HBarCode_Pack, HPackUnionInterID_In, HWhID, HSPID, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "扫描调出条码失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æ¢æ‰˜è°ƒæ‹¨å•模块 è¿”回列表信息
        /// <summary>
        /// æ¢æ‰˜è°ƒæ‹¨å•模块 è¿”回列表信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetBillEntry_Temp_MoveStockBill_HuanTuo_Json")]
        [HttpGet]
        public object GetBillEntry_Temp_MoveStockBill_HuanTuo_Json(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
        {
            try
            {
                ds = oWebs.GetBillEntry_Temp_MoveStockBill_HuanTuo(HInterID, HBillNo, HBillType, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取列表信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æ¢æ‰˜è°ƒæ‹¨å•模块 æ‰«æåˆ é™¤æ˜Žç»†è¡¨ä½“行记录
        /// <summary>
        /// æ¢æ‰˜è°ƒæ‹¨å•模块 æ‰«æåˆ é™¤æ˜Žç»†è¡¨ä½“行记录
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo_Json")]
        [HttpGet]
        public object set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo_Json(Int64 HInterID, string HBarCode, string HBillType)
        {
            try
            {
                if (oWebs.set_DelPackUnionBill_Temp_MoveStockBill_HuanTuo(HInterID, HBarCode, HBillType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除换托调出记录失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æ¢æ‰˜è°ƒæ‹¨å•模块    ä»Žç¼“存列表页面返回信息
        /// <summary>
        /// ä»Žç¼“存列表页面返回信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetKF_MoveStockBill_TempList_HuanTuo_Json")]
        [HttpGet]
        public object GetKF_MoveStockBill_TempList_HuanTuo_Json(Int64 HInterID, string HBillType)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_KF_MoveStockBill_TempList_HuanTuo " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_KF_MoveStockBill_TempList_HuanTuo");
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "从缓存列表返回时,没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    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/GetPonderationBillMain_TempList_HuanTuo_Json")]
        [HttpGet]
        public object GetPonderationBillMain_TempList_HuanTuo_Json(string HBillType, string HMaker, long HStockOrgID)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_TempList_HuanTuo '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_KF_PonderationBillMain_TempList_HuanTuo");
                if (ds == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据无缓存记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    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
@@ -632,5 +2735,256 @@
        #endregion
        #region æŠ¥è¡¨æ•°æ®èŽ·å–æ–¹æ³•
        #region æ¡ç å‡ºå…¥åº“记录报表
        #region èŽ·å–å•æ®ç±»åž‹ä¿¡æ¯
        /// <summary>
        /// èŽ·å–å•æ®ç±»åž‹ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetBarCodeReport_BillType_Json")]
        [HttpGet]
        public object GetBarCodeReport_BillType_Json()
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeReport_BillType ", "h_p_WMS_BarCodeReport_BillType");
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "成功!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取单据类型信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region èŽ·å–æ¡ç å‡ºå…¥åº“è®°å½•
        /// <summary>
        /// èŽ·å–æ¡ç å‡ºå…¥åº“è®°å½•
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetKf_BarCodeOutInReport_Json")]
        [HttpGet]
        public object GetKf_BarCodeOutInReport_Json(string sWhere)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_Kf_BarCodeOutInReport_New " + sWhere, "h_p_Kf_BarCodeOutInReport_New");
                if (ds == null)
                {
                    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));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询条码出入库记录信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region æ¡ç åº“存查询报表
        #region èŽ·å–æ¡ç åº“å­˜ä¿¡æ¯
        /// <summary>
        /// èŽ·å–æ¡ç åº“å­˜ä¿¡æ¯
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetKf_BarCodeICInventoryReport_Json")]
        [HttpGet]
        public object GetKf_BarCodeICInventoryReport_Json(string sWhere)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeICInventoryReport " + sWhere, "h_p_WMS_BarCodeICInventoryReport");
                if (ds == null)
                {
                    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));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询条码库存信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region WMS物料出入库记录报表
        #region èŽ·å–WMS物料出入库记录
        /// <summary>
        /// èŽ·å–WMS物料出入库记录
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetKf_MaterOutInReport_Json")]
        [HttpGet]
        public object GetKf_MaterOutInReport_Json(string sWhere)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_WMS_MaterOutInReport " + sWhere, "h_p_WMS_MaterOutInReport");
                if (ds == null)
                {
                    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));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询WMS物料出入库记录信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region WMS物料库存查询报表
        #region èŽ·å–WMS物料库存信息
        /// <summary>
        /// èŽ·å–WMS物料库存信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetKf_MaterICInventoryReport_Json")]
        [HttpGet]
        public object GetKf_MaterICInventoryReport_Json(string sWhere)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_WMS_MaterICInventoryReport " + sWhere, "h_p_WMS_MaterICInventoryReport");
                if (ds == null)
                {
                    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));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询WMS物料库存信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #endregion
    }
}