| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 设备节拍维护 查询,审核,反审核,禁用,反禁用 |
| | | /// <summary> |
| | | /// 设备节拍维护 查询 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <param name="user"></param> |
| | | /// <returns></returns> |
| | | [Route("Gy_BadReason/Sb_EqiupMaterWorkTimeList")] |
| | | [HttpGet] |
| | | public object Sb_EqiupMaterWorkTimeList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("EqiupMaterWorkTimes_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string sql1 = "select * from h_v_Sb_EqiupMaterWorkTimes where 1 = 1"; |
| | | string sql = sql1 + sWhere + " order by 设备代码 "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EqiupMaterWorkTimes"); |
| | | |
| | | //添加列名 |
| | | 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.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 |
| | | } |
| | | } |