| | |
| | | #endregion |
| | | |
| | | #region 器具保养任务(今日待保养、今日已保养、今天全部任务) |
| | | /// <summary> |
| | | /// 返回器具保养任务 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | |
| | | [Route("Sc_MouldMaintainTaskReport/MaintainList")] |
| | | [HttpGet] |
| | | public object MaintainList(string user) |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | [Route("Sc_MouldMaintainTaskReport/MaintainList_APP")] |
| | | [HttpGet] |
| | | public object MaintainList_APP(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HBeginDate = dic["HBeginDate"].ToString();//开始日期 |
| | | string HEndDate = dic["HEndDate"].ToString();//结束日期 |
| | | |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_MouldMaintainTaskReport_APP '" + HBeginDate + "','" + HEndDate + "','" + user + "'", "h_p_Sc_MouldMaintainTaskReport_APP"); |
| | | |
| | | |
| | | |
| | | if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | { |
| | | //添加列名 |
| | | 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 = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无数据"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 器具维修任务(待维修、已维修、全部任务) |