王 垚
2022-11-28 e4674196f18a1bec1d92ce63a50addbca001c9b4
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -32,6 +32,248 @@
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        #region åŸºç¡€èµ„æ–™
        #region ä»“库资料
        //根据仓库ID、组织ID,返回仓库信息
        public Model.ClsGy_Warehouse_Model GetWhInfoByIDandOrg(long sHWhID, long HUSEORGID, ref string sErr)
        {
            DAL.ClsIF_Warehouse_View dal = new DAL.ClsIF_Warehouse_View();
            if (dal.GetInfoByIDandOrgID(sHWhID, HUSEORGID))
            {
                return dal.omodel;
            }
            else
            {
                return null;
            }
        }
        #endregion
        #region ä»“位资料
        #endregion
        #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);
                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列对象的列名
                }
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查询不到该单据记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取单据信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    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_InterIDAndSource_Json")]
        [HttpGet]
        public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType)
        {
            try
            {
                if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, HBillType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除所选行条码出入库临时表记录失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// æ ¹æ®å•据ID,删除条码出入库临时表记录
        /// </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;
            }
        }
        #endregion
        #region æäº¤ç”Ÿå•处理方法
@@ -87,6 +329,66 @@
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "销售出库校验失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
        #region ç”Ÿäº§è¡¥æ–™    ä¸Šä¼ ç”Ÿå•
        #region ç”Ÿäº§è¡¥æ–™    æ ¡éªŒæ¨¡å¼
        /// <summary>
        /// ç”Ÿäº§è¡¥æ–™æ ¡éªŒä¸Šä¼ 
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveMateReplenishOutBill_BillCheck_Json")]
        [HttpPost]
        public object set_SaveMateReplenishOutBill_BillCheck_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_MateReplenishOutBillMain> lsmain = new List<Model.ClsKf_MateReplenishOutBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getMateReplenishOutBillMainByJson(msg1);
                WebAPI.WebS.ClsKf_MateReplenishOutBillMain websLsmain = new WebS.ClsKf_MateReplenishOutBillMain();
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = "1254";
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveMateReplenishOutBill_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;
            }
@@ -195,8 +497,87 @@
        #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
@@ -213,7 +594,7 @@
        #endregion
        #region ç‰©æ–™æ¡ç å¤„理方法
        #region ç‰©æ–™æ¡ç å¤„理方法    å…¶ä»–出库库模块
        /// <summary>
        /// ç‰©æ–™æ¡ç æ–‡æœ¬æ¡† æ‰«ç è°ƒç”¨
@@ -255,6 +636,48 @@
        #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)
        {
            try
            {
                WebSoBar = oWebs.get_BarCode_MoveStock(sBarCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo);
                if (WebSoBar == null)
                {
                    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 å•据新增模块  èŽ·å–å•æ®åˆ—è¡¨ä¿¡æ¯å¤„ç†æ–¹æ³•
@@ -264,53 +687,13 @@
        /// <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)
                {
                    //判断是否启用器具管理(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");
                string sMouldManagerCtl = "N";  //是否启用器具管理
                string sFIFOCtl = "N";          //是否启用先进先出管理
                ds = oWebs.GetBillEntryTmpList(HInterID, HBillNo, HBillType, HStockOrgID, ref sMouldManagerCtl, ref sFIFOCtl, ref DBUtility.ClsPub.sErrInfo);
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
@@ -333,17 +716,17 @@
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "获取信息成功!";
                        objJsonResult.data = ds;
                        objJsonResult.list = columnNameList;
                        return objJsonResult;
                    }
                }
                else
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.data = new
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";返回物料明细列表时获取系统参数失败! " + sReturn;
                    objJsonResult.data = null;
                        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;
                }
            }
@@ -488,8 +871,107 @@
        #endregion
        #region å¤„理方法
        #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
            {
                ds = oWebs.GetKf_PonderationBillMain_Temp_BillCheck(HInterID, HBillType, sWhere);
                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列对象的列名
                }
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取列表信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region è¿”回缓存列表信息
        /// <summary>
        /// è¿”回缓存列表信息    æ ¡éªŒæ¨¡å¼
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetKf_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);
                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列对象的列名
                }
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据无缓存记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取缓存信息成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取缓存列表信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion