| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 设备看板 |
| | | [Route(template: "EquipMentData")] |
| | | [HttpGet] |
| | | public HttpResponseMessage EquipMentData(string CallHouseCode, int limit, int offset) |
| | | { |
| | | List<CallTopTable> list = new List<CallTopTable>(); |
| | | list = LoadDataBLL.EquipMentData(); |
| | | Dictionary<object, object> dList = new Dictionary<object, object>(); |
| | | dList.Add("total", 1); |
| | | dList.Add("rows", list); |
| | | //HttpResponseMessage response = Request.CreateResponse(); |
| | | //response.StatusCode = HttpStatusCode.OK; |
| | | //response.Content = new StringContent(JsonConvert.SerializeObject(new { code = 200, data = dList }), System.Text.Encoding.UTF8); |
| | | //return response; |
| | | |
| | | var timeConverter = new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd" }; |
| | | HttpResponseMessage response = Request.CreateResponse(); |
| | | response.StatusCode = HttpStatusCode.OK; |
| | | response.Content = new StringContent(JsonConvert.SerializeObject(dList, Formatting.Indented, timeConverter)); |
| | | return response; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | //public static List<CallTopTable> EquipMentData() |
| | | //{ |
| | | // //执行存储过程@lineCodeList |
| | | // // 存储过程名称 |
| | | // string strProcName = "select 20 as HICMOBillNO , '60%' as HNUMBER ,12 as HNAME, 4 HMODEL ,2 as HQTY ,1 as HLEFT ,1 as HSTATUS"; |
| | | // //创建参数 |
| | | // //parameters[0].Direction = ParameterDirection.Output; |
| | | // DataTable dt = DBHelper.GetTable(strProcName); |
| | | // if (dt != null && dt.Rows.Count > 0) |
| | | // { |
| | | // return dt.AsEnumerable().Select(t => new CallTopTable(t)).ToList(); |
| | | // } |
| | | // return new List<CallTopTable>(); |
| | | //} |
| | | |
| | | |
| | | #region[叫料看板上列表数据] |
| | | [Route(template: "CallTableTopData")] |
| | | [HttpGet] |
| | | public HttpResponseMessage CallTableTopData(int limit, int offset) |
| | | public HttpResponseMessage CallTableTopData(string CallHouseCode, int limit, int offset) |
| | | { |
| | | int count = 0; |
| | | int pageSize = limit; //页码大小 |