| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region OEE报表 查询明细(班次) |
| | | /// <summary> |
| | | ///参数:string sql。 |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region OEE报表 查询运行日志 |
| | | [Route("Sc_OEEReport/GetOEERunLogs")] |
| | | [HttpGet] |
| | | public object GetOEERunLogs(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HEquipID = dic["HEquipID"].ToString();//设备 |
| | | string HBeginDate = dic["HBeginDate"].ToString();//开始日期 |
| | | string HEndDate = dic["HEndDate"].ToString();//结束日期 |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_SB_OEERunLogs '" + HEquipID.ToString() + "','" + HBeginDate + "','" + HEndDate + "'", "h_p_SB_OEERunLogs"); |
| | | 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列对象的列名 |
| | | } |
| | | 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 = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |