1
duhe
9 天以前 c3b14901031d985ef750027d4952264369a1d7b0
WebAPI/Controllers/SBGL/Sb_EquipReportController.cs
@@ -228,6 +228,60 @@
        }
        #endregion
        #region  故障登记跟踪(待派工、待维修、待验收)
        /// <summary>
        /// 返回故障登记跟踪
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sb_EquipRepairCheckTaskReport/RepairCheckList2")]
        [HttpGet]
        public object RepairCheckList2(string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec h_p_Sb_EquipRepairCheckTaskReport_2 " + user, "h_p_Sb_EquipRepairCheckTaskReport_2");
                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  故障登记跟踪(待维修、已维修、已验收)
        /// <summary>
        /// 返回故障登记跟踪