/// <summary> /// 总库存-查询出库如明细金额 /// </summary> /// <param name="year"></param> /// <param name="month"></param> /// <returns></returns> public Dictionary <string, object> getCRKDetail(string year, string month, int ISWZ, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataSet ds = db.getCRKDetail(year, month, ISWZ); if (ds.Tables.Count > 0) { DataTable dtNew = new DataTable(); dtNew.Columns.Add("WERKS_NAME"); dtNew.Columns.Add("RKJE"); //dtNew.Columns.Add("RKL"); dtNew.Columns.Add("CKJE"); //dtNew.Columns.Add("CKL"); foreach (DataRow rowDKName in ds.Tables["DK_NAME"].Rows) { int i = 0;//判断下面是否有数据,有才会add到dtnew里 DataRow newRow = dtNew.NewRow(); DataRow[] rowRK = ds.Tables["RKJE_Detail"].Select("WERKS_NAME='" + rowDKName["WERKS_NAME"] + "'"); if (rowRK.Length > 0) { i = 1; newRow["WERKS_NAME"] = rowRK[0]["WERKS_NAME"]; newRow["RKJE"] = rowRK[0]["RKJE"]; // newRow["RKL"] = rowRK[0]["RKL"]; } rowRK = ds.Tables["CKJE_Detail"].Select("WERKS_NAME='" + rowDKName["WERKS_NAME"] + "'"); if (rowRK.Length > 0) { i = 1; newRow["WERKS_NAME"] = rowRK[0]["WERKS_NAME"]; newRow["CKJE"] = rowRK[0]["CKJE"]; // newRow["CKL"] = rowRK[0]["CKL"]; } if (i == 1) { dtNew.Rows.Add(newRow); } } r["code"] = 2000; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dtNew, page, limit));//dt r["message"] = "成功!"; r["total"] = dtNew.Rows.Count; } else { r["code"] = 2000; r["message"] = "成功!,但是没有数据"; r["items"] = new DataTable();//dt r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> GetInfo(string XMBH, string XMMC, int page, int limit, string userid) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetInfo(XMBH, XMMC, userid); if (dt.Rows.Count > 0) { r["code"] = 2000; r["message"] = "success"; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "success,but no info "; r["total"] = dt.Rows.Count; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
/// <summary> /// 获取服务信息 /// </summary> public Dictionary <string, object> fetchServerList(Dictionary <string, object> d) { Dictionary <string, object> r = new Dictionary <string, object>(); int limit = d["limit"] == null ? 100 : int.Parse(d["limit"].ToString()); int page = d["page"] == null ? 1 : int.Parse(d["page"].ToString()); string name = d["name"] == null ? "" : d["name"].ToString(); try { DataTable dt = db.getServer(name); if (dt != null && dt.Rows.Count > 0) { r["code"] = 2000; r["message"] = ""; r["total"] = dt.Rows.Count; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page, limit)); return(r); } r["code"] = 2000; r["message"] = ""; r["total"] = 0; r["items"] = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(new DataTable())); } catch (Exception e) { r["total"] = 0; r["items"] = new Dictionary <string, object>(); r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> GetShopInfo(string ORG_CODE, string ZHXM, string IS_PASS, string FWSX, string FWID, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetShopInfo(ORG_CODE, ZHXM, IS_PASS, FWSX, FWID); if (dt.Rows.Count > 0) { r["message"] = "成功!"; r["code"] = 2000; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["total"] = dt.Rows.Count; } else { r["message"] = "成功,但是没有数据"; r["code"] = 2000; r["items"] = new DataTable(); r["total"] = 0; } } catch (Exception e) { r["message"] = e.Message; r["code"] = -1; } return(r); }
public Dictionary <string, object> GetTaskInfo(string RWBH, string RWMC, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetTaskInfo(RWBH, RWMC); if (dt.Rows.Count > 0) { r["message"] = "成功"; r["code"] = 2000; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["total"] = dt.Rows.Count; } else { r["message"] = "成功,但是没有数据"; r["code"] = 2000; r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> GetTotalFK_JYWZ(string ISWZ, string WERKS, string DKCODE, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetTotalFK_JYWZ(ISWZ, WERKS, DKCODE); if (dt.Rows.Count > 0) { r["code"] = 2000; r["message"] = "成功"; r["total"] = dt.Rows.Count; r["items"] = KVTool.GetPagedTable(dt, page, limit); } else { r["code"] = 2000; r["message"] = "成功,但是没有数据"; r["total"] = 0; r["items"] = new DataTable(); } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
/// <summary> /// 查询 /// </summary> /// <returns></returns> public Dictionary <string, object> fetchSyncConfList(Dictionary <string, object> d) { Dictionary <string, object> r = new Dictionary <string, object>(); try { //DataTable dt = db.fetchSyncConfList(d); //string jsonStr = ""; //if (dt != null && dt.Rows.Count > 0) //{ // jsonStr = GetSubMenu("", dt); //} //r["items"] = JsonConvert.DeserializeObject("["+jsonStr+"]"); //r["code"] = 2000; //r["message"] = "查询成功"; int limit = d["limit"] == null ? 100 : int.Parse(d["limit"].ToString()); int page = d["page"] == null ? 1 : int.Parse(d["page"].ToString()); DataTable dt = db.fetchSyncConfList(d); r["total"] = dt.Rows.Count; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page, limit)); r["code"] = 2000; r["message"] = "查询成功"; } catch (Exception ex) { r["items"] = null; r["code"] = -1; r["message"] = ex.Message; } return(r); }
public Dictionary <string, object> getTaxComputeconfig(string limit, string page) { int lit = int.Parse(limit); int pa = int.Parse(page); Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.getTaxComputeconfig(); if (dt.Rows.Count != 0) { r["message"] = "成功"; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, pa, lit)); r["code"] = 2000; r["total"] = dt.Rows.Count; } else { r["message"] = "成功"; r["code"] = 2000; r["total"] = 0; } } catch (Exception e) { r["message"] = e.Message; r["code"] = -1; } return(r); }
/// <summary> /// 查询用户信息 /// </summary> /// <param name="d"></param> /// <returns></returns> public Dictionary <string, object> fetchUserForLoginList(string limit, string page, string USER_ID) { Dictionary <string, object> r = new Dictionary <string, object>(); try { int limit1 = limit == null ? 100 : int.Parse(limit); int page1 = page == null ? 1 : int.Parse(page); DataTable dt = db.fetchUserForLoginList(USER_ID); if (dt != null && dt.Rows.Count > 0) { r["total"] = dt.Rows.Count; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page1, limit1)); r["code"] = 2000; r["message"] = "查询成功"; } else { r["total"] = 0; r["items"] = new Dictionary <string, object>(); r["code"] = 2000; r["message"] = "查询成功"; } } catch (Exception e) { r["total"] = 0; r["items"] = new Dictionary <string, object>(); r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> GetCheckResult(string year, string FWBH, string RWMC, string JCJG, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetCheckResult(year, FWBH, RWMC, JCJG); if (dt.Rows.Count > 0) { r["message"] = "成功"; r["code"] = 2000; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["total"] = dt.Rows.Count; } else { r["message"] = "成功,但是没有数据"; r["code"] = 2000; r["total"] = 0; r["items"] = new DataTable(); } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> GetRegionDirector(string SSQY, string FZR, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetRegionDirector(SSQY, FZR); if (dt.Rows.Count > 0) { r["code"] = 2000; r["message"] = "成功"; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "成功,但是没有数据!"; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
/// <summary> /// 查询实物库存-总库 第一层 /// </summary> /// <param name="WERKS">工厂名称</param> /// <returns></returns> public Dictionary <string, object> GetSWKCDW(string ISWZ, string WERKS, string LGPLA, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetSWKCDW(ISWZ, WERKS, LGPLA); if (dt.Rows.Count > 0) { r["code"] = 2000; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page, limit));//dt r["message"] = "成功!"; r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "成功!但是没有数据"; r["items"] = new DataTable();//dt r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
/// <summary> /// 重点物资出入库明细-去向明细 /// </summary> /// <param name="MATNR"></param> /// <param name="MONTH"></param> /// <param name="MATKL"></param> /// <param name="page"></param> /// <param name="limit"></param> /// <returns></returns> public Dictionary <string, object> getZDWZCRKDetail(string MATNR, string MONTH, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.getZDWZCRKDetail(MATNR, MONTH); if (dt.Rows.Count > 0) { r["code"] = 2000; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page, limit));//dt r["message"] = "success"; r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "success,but no info"; r["items"] = new DataTable();//dt r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
/// <summary> /// 总库存保管员工作量明细查询 /// </summary> /// <param name="nianyue">年月</param> /// <param name="TZDType">1 入库单 2 出库单</param> /// <param name="workerCode">员工编号</param> public Dictionary <string, object> getBGYGZLDetail(string nianyue, string TZDType, string workerCode, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.getBGYGZLDetail(nianyue, TZDType, workerCode); if (dt.Rows.Count > 0) { r["code"] = 2000; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page, limit));//dt r["message"] = "成功!"; r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "成功!,但是没有数据"; r["items"] = new DataTable();//dt r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> GetGetFloatWindowDetailInfo(string LGPLA, string DLCODE, string LGORT, string MATNR, string MATKL, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetGetFloatWindowDetailInfo(LGPLA, DLCODE, LGORT, MATNR, MATKL); //DataTable dt = db.getZDWZCRKDetail(DKCODE,MATNR, MONTH); if (dt.Rows.Count > 0) { r["code"] = 2000; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page, limit));//dt r["message"] = "success"; r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "success,but no info"; r["items"] = new DataTable();//dt r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> GetFacInfo(string WERKS, string LGORT, string LGORT_NAME, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetFacInfo(WERKS, LGORT, LGORT_NAME); if (dt.Rows.Count > 0) { r["code"] = 2000; r["message"] = "成功!"; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "成功!但是没有数据"; r["items"] = new DataTable(); } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> getSWCRKDetail(string year, string month, string dkcode, string typ, int limit, int page) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.getSWCRKDetail(year, month, dkcode, typ); if (dt.Rows.Count > 0) { r["code"] = 2000; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page, limit));//dt r["message"] = "成功!"; r["total"] = 0; } else { r["code"] = 2000; r["message"] = "成功!,但是没有数据"; r["items"] = new DataTable();//dt r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> GetWLDetail(string MATNR, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetWLDetail(MATNR); if (dt.Rows.Count > 0) { r["code"] = 2000; r["message"] = "成功!"; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "成功!但是没有数据"; r["items"] = new DataTable(); } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> getDepartmentStatus(Dictionary <string, object> d) { int limit = d["limit"] == null ? 100 : int.Parse(d["limit"].ToString()); int page = d["page"] == null ? 1 : int.Parse(d["page"].ToString()); Dictionary <string, object> r = new Dictionary <string, object>(); DataTable dt = DB.getDepartmentStatus(d); try { if (dt != null && dt.Rows.Count > 0) { r["total"] = dt.Rows.Count; r["message"] = "成功"; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page, limit)); r["code"] = 2000; } else { r["total"] = 0; r["message"] = "成功"; r["code"] = 2000; } } catch (Exception e) { r["message"] = e.Message; r["code"] = -1; } return(r); }
public Dictionary <string, object> GetPFIncomeReport(string date, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetPFIncomeReport(date); if (dt.Rows.Count > 0) { r["code"] = 2000; r["message"] = "成功"; r["total"] = dt.Rows.Count; r["items"] = KVTool.GetPagedTable(dt, page, limit); } else { r["code"] = 2000; r["messsage"] = "成功,但是没有数据"; r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> fetchConfigList(Dictionary <string, object> d) { Dictionary <string, object> r = new Dictionary <string, object>(); try { int limit = d["limit"] == null ? 100 : int.Parse(d["limit"].ToString()); int page = d["page"] == null ? 1 : int.Parse(d["page"].ToString()); DataTable dt = db.fetchConfigList(d); r["total"] = dt.Rows.Count; //r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page,limit)); r["items"] = KVTool.RowsToListDic(dt, d); r["code"] = 2000; r["message"] = "查询成功"; } catch (Exception e) { r["total"] = 0; r["items"] = null; r["code"] = -1; r["message"] = e.Message; } return(r); }
/// <summary> /// 紧急入库单查询 /// </summary> /// <param name="CODE">单号</param> /// <param name="MATNR">物料编码</param> /// <param name="MATNX">物料描述</param> /// <param name="MATNX">字典表父节点code</param> /// <param name="userid">登录人id</param> /// <param name="type">查询类型,0为非审批查询,1为审批待办,2为已办</param> /// <param name="limit">每页条数</param> /// <param name="page">页数</param> /// <param name="SortType">排序方向,0为正序,1位倒叙</param> /// <param name="GroupType">排序方式,0为申请单位,1为出库原因,2为库存地点,3为单据状态,4为供应商</param> /// <returns></returns> public Dictionary <string, object> GetRKInfo (string CODE, string MATNR, string MATNX, string ParentCode, string userid, int type, int limit, int page, int SortType = 0, int GroupType = 0, string OrgCode = null, string starttime = null, string endtime = null) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetRKInfo(CODE, MATNR, MATNX, ParentCode, userid, type, SortType, GroupType, OrgCode, starttime, endtime); if (dt.Rows.Count > 0) { r["code"] = 2000; r["message"] = "成功!"; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "成功但是没有数据!"; r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> GetShopUserInfo(string FWBH, string ZHXM, string SFZH, string SHOPBH, int SHOP_STATUS, int limit, int page) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetShopUserInfo(FWBH, ZHXM, SFZH, SHOPBH, SHOP_STATUS); if (dt.Rows.Count > 0) { r["code"] = 2000; r["message"] = "成功"; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["total"] = dt.Rows.Count; } else { r["code"] = 2001; r["message"] = "成功,但是没有数据,租户可能已经解除了物业关系"; r["items"] = dt; r["total"] = 0; } } catch (Exception e) { r["message"] = e.Message; r["code"] = -1; } return(r); }
public Dictionary <string, object> GetFeeResult(string CZ_SHID, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetFeeResult(CZ_SHID); if (dt.Rows.Count > 0) { r["message"] = "成功"; r["code"] = 2000; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["total"] = dt.Rows.Count; } else { r["message"] = "成功但是没有数据"; r["code"] = 2000; r["total"] = 0; } } catch (Exception e) { r["message"] = e.Message; r["code"] = -1; } return(r); }
public Dictionary <string, object> GetGCInfo(string DW_CODE, string DW_NAME, string DW_ISSS, int limit, int page) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetGCInfo(DW_CODE, DW_NAME, DW_ISSS); if (dt.Rows.Count > 0) { r["code"] = 2000; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["message"] = "成功!"; r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "成功!,但是没有数据"; r["items"] = new DataTable(); } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> GetCheckPlan(string JHMC, string JHND, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetCheckPlan(JHMC, JHND); if (dt.Rows.Count > 0) { r["message"] = "成功"; r["total"] = dt.Rows.Count; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["code"] = 2000; } else { r["code"] = 2000; r["message"] = "成功,但是没有数据"; } } catch (Exception e) { r["message"] = e.Message; r["code"] = -1; } return(r); }
public Dictionary <string, object> GetRKInfo(int page, int limit, string CKTime, string LocationNumber) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetCKInfo(CKTime, LocationNumber); if (dt.Rows.Count > 0) { r["code"] = 2000; r["message"] = "成功"; r["total"] = dt.Rows.Count; r["items"] = KVTool.GetPagedTable(dt, page, limit); } else { r["code"] = 2000; r["message"] = "成功,但是没有数据!"; r["items"] = new DataTable(); r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = "failed!" + e.Message; } return(r); }
/// <summary> /// 重点物资储备查询-分库明细 /// </summary> /// <param name="WERKS"></param> /// <param name="DKCODE"></param> /// <param name="WERKS_NAME"></param> /// <param name="MATNR"></param> /// <param name="MATKL"></param> /// <param name="page"></param> /// <param name="limit"></param> /// <returns></returns> public Dictionary <string, object> getDetailZDWZCBTOTALDETAIL(string WERKS, string DKCODE, string WERKS_NAME, string MATNR, string MATKL, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = new DataTable(); dt = db.getDetailZDWZCBTOTALDETAIL(WERKS, DKCODE, WERKS_NAME, MATNR, MATKL); if (dt.Rows.Count > 0) { r["code"] = 2000; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page, limit));//dt r["message"] = "success"; r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "success,but no info"; r["items"] = new DataTable();//dt r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
public Dictionary <string, object> GetCRKInfo(string DK_CODE, string ERDATE, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetCRKInfo(DK_CODE, ERDATE); if (dt.Rows.Count > 0) { r["code"] = 2000; r["message"] = "成功!"; r["items"] = KVTool.GetPagedTable(dt, page, limit); r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "成功!但是没有数据!"; r["items"] = new DataTable(); r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }
/// <summary> /// 查询积压物资-总库页面 /// </summary> /// <param name="WERKS_NAME">工厂名称</param> /// <param name="LGORTNAME">库存地点名称</param> /// <param name="MATNR">物料编码</param> /// <param name="MATKL">物料组编码</param> /// <returns></returns> public Dictionary <string, object> GetJYWZ(string DLCODE, string MEINS, string ISWZ, string WERKS, string WERKS_NAME, string LGORTNAME, string MATNR, string MATKL, int page, int limit) { Dictionary <string, object> r = new Dictionary <string, object>(); try { DataTable dt = db.GetJYWZ(DLCODE, ISWZ, MEINS, WERKS, WERKS_NAME, LGORTNAME, MATNR, MATKL); if (dt.Rows.Count > 0) { r["code"] = 2000; r["items"] = KVTool.TableToListDic(KVTool.GetPagedTable(dt, page, limit));//dt r["message"] = "成功!"; r["total"] = dt.Rows.Count; } else { r["code"] = 2000; r["message"] = "成功!但是没有数据"; r["items"] = new DataTable();//dt r["total"] = 0; } } catch (Exception e) { r["code"] = -1; r["message"] = e.Message; } return(r); }