/// <summary> /// 查询挡车工产量日报 /// </summary> public JsonResult WorkerDay(string Time, string sClassName) { //json结果 JsonResult result = new JsonResult(); //json.data AjaxTablePageData <LoomWorkerDay> pageData = new AjaxTablePageData <LoomWorkerDay>(); //获取班次id int iClassId = 0; if (string.IsNullOrEmpty(Time) || string.IsNullOrEmpty(sClassName)) { iClassId = new LoomDAL().GetClassIdNow(); } else { iClassId = new LoomDAL().GetClassId(Time, sClassName); } //根据当前页和行数,获取数据集 List <LoomWorkerDay> list = new LoomDAL().GetWorkerDay(iClassId); pageData.data = list; //允许get result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; result.Data = pageData; return(result); }
/// <summary> /// 设备实时状态列表查询 /// </summary> public JsonResult StateNowListQuery() { //json结果 JsonResult result = new JsonResult(); //获取设备类型 string iMachineGroupID = Request.QueryString["query[iMachineGroupID]"]; if (String.IsNullOrEmpty(iMachineGroupID)) { return(result); } //获取查询 string query = Request.QueryString["query[generalSearch]"]; //获取状态 string status = Request.QueryString["query[Status]"]; //获取排序 string field = Request.QueryString["sort[field]"]; string sort = Request.QueryString["sort[sort]"]; //json.data AjaxTablePageData <Machine> pageData = new AjaxTablePageData <Machine>(); //根据当前页和行数,获取数据集 List <Machine> list = new YarnMachineDAL().GetStateNowListQuery(query, iMachineGroupID, status, field, sort); pageData.data = list; //允许get result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; result.Data = pageData; return(result); }
/// <summary> /// 设备实时状态列表查询 /// </summary> public JsonResult StateNowListQuery() { //json结果 JsonResult result = new JsonResult(); //json.data AjaxTablePageData <Warping> pageData = new AjaxTablePageData <Warping>(); //根据当前页和行数,获取数据集 List <Warping> list = new WarpingDAL().GetStateNowListQuery(); pageData.data = list; //允许get result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; result.Data = pageData; return(result); }
/// <summary> /// 织机实时状态查询 /// </summary> public JsonResult LoomStateNowQuery() { string varCheck = Request.QueryString["query[varCheck]"]; int machineVar = string.IsNullOrEmpty(varCheck) ? 0 : Convert.ToInt32(varCheck); //json结果 JsonResult result = new JsonResult(); //json.data AjaxTablePageData <LoomStateCoordinate> pageData = new AjaxTablePageData <LoomStateCoordinate>(); //根据当前页和行数,获取数据集 List <LoomStateCoordinate> list = new LoomDAL().GetLoomStateQuery(machineVar); pageData.data = list; //允许get result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; result.Data = pageData; return(result); }
/// <summary> /// 获取tables /// </summary> public JsonResult QueryTables() { //方法1,后台分页,适合数据量大的情况 //获取当前页 int page = Request.QueryString["pagination[page]"] == "" ? 1 : Convert.ToInt32(Request.QueryString["pagination[page]"]); //获取行数 int perpage = Request.QueryString["pagination[perpage]"] == "" ? 10 : Convert.ToInt32(Request.QueryString["pagination[perpage]"]); //获取排序 string field = Request.QueryString["sort[field]"]; string sort = Request.QueryString["sort[sort]"]; //json结果 JsonResult result = new JsonResult(); //json.data AjaxTablePageData <OpMachine> pageData = new AjaxTablePageData <OpMachine>(); //方法1 适合数据量大的情况 //根据当前页和行数,获取数据集 int total = 0; List <OpMachine> list = new OpMachineDAL().GetList(page, perpage, out total, field, sort); pageData.data = list ?? new List <OpMachine>(); //设置分页参数 pageData.meta = new AjaxTablePage { page = page, perpage = perpage, total = total }; result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; result.Data = pageData; return(result); //方法2,前台分页,适合数据量小的情况 ////获取排序 //string field = Request.QueryString["sort[field]"]; //string sort = Request.QueryString["sort[sort]"]; ////json结果 //JsonResult result = new JsonResult(); ////json.data //AjaxTablePageData<OpMachine> pageData = new AjaxTablePageData<OpMachine>(); //List<OpMachine> list = new OpMachineDAL().GetListSimple(field, sort); //pageData.data = list ?? new List<OpMachine>(); ////允许get //result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; //result.Data = pageData; //return result; }
/// <summary> /// 轴库明细统计 /// </summary> public JsonResult BeamLibraryCountQuery() { //json结果 JsonResult result = new JsonResult(); //获取排序 string field = Request.QueryString["sort[field]"]; string sort = Request.QueryString["sort[sort]"]; //json.data AjaxTablePageData <BeamLibraryCount> pageData = new AjaxTablePageData <BeamLibraryCount>(); //根据当前页和行数,获取数据集 List <BeamLibraryCount> list = new BeamLibraryDAL().GetBeamLibraryCountQuery(field, sort); pageData.data = list; //允许get result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; result.Data = pageData; return(result); }
/// <summary> /// 织机实时状态列表查询 /// </summary> public JsonResult LoomStateNowListQuery() { //获取查询 string query = Request.QueryString["query[generalSearch]"]; //获取状态 string status = Request.QueryString["query[Status]"]; //获取排序 string field = Request.QueryString["sort[field]"]; string sort = Request.QueryString["sort[sort]"]; //json结果 JsonResult result = new JsonResult(); //json.data AjaxTablePageData <Loom> pageData = new AjaxTablePageData <Loom>(); //根据当前页和行数,获取数据集 List <Loom> list = new LoomDAL().GetLoomStateNowListQuery(query, status, field, sort); pageData.data = list; //允许get result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; result.Data = pageData; return(result); }
/// <summary> /// 轴库明细查询 /// </summary> public JsonResult BeamLibraryQuery() { //json结果 JsonResult result = new JsonResult(); //获取查询 string query = Request.QueryString["query[generalSearch]"]; //获取状态 string sMaterialNo = Request.QueryString["query[sMaterialNo]"]; //获取排序 string field = Request.QueryString["sort[field]"]; string sort = Request.QueryString["sort[sort]"]; //json.data AjaxTablePageData <BeamLibrary> pageData = new AjaxTablePageData <BeamLibrary>(); //根据当前页和行数,获取数据集 List <BeamLibrary> list = new BeamLibraryDAL().GetBeamLibraryQuery(query, sMaterialNo, field, sort); pageData.data = list; //允许get result.JsonRequestBehavior = JsonRequestBehavior.AllowGet; result.Data = pageData; return(result); }