| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region è´¨éæ¨¡å æåº¦æ¥å æ¥è¯¢ |
| | | |
| | | [Route("QC_CustomerAppealReport/GetQC_QualityMonthReportList")] |
| | | [HttpGet] |
| | | public object GetQC_QualityMonthReportList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HYear = dic["HYear"].ToString(); |
| | | string HMonth = dic["HMonth"].ToString(); |
| | | string HDivisionName = dic["HDivisionName"].ToString();//äºä¸é¨ |
| | | string HProject = dic["HProject"].ToString();//项ç®å· |
| | | string HBatchWork = dic["HBatchWork"].ToString();//æ¯å¦é产 |
| | | |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_QualityMonthReport '" + HYear + "','" + HMonth + "','" + HDivisionName + "','" + HProject + "','" + HBatchWork + "'", "h_p_QC_QualityMonthReport"); |
| | | |
| | | |
| | | //æ·»å åå |
| | | 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 |
| | | |
| | | #region è´¨éæ¨¡å 设å¤TOP3é®é¢ |
| | | /// <summary> |
| | | /// è¿å设å¤TOP3é®é¢ |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("QC_CustomerAppealReport/GetQC_BadReasonTop3ReportList")] |
| | | [HttpGet] |
| | | public object GetQC_BadReasonTop3ReportList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HYear = dic["HYear"].ToString(); |
| | | string HMonth = dic["HMonth"].ToString(); |
| | | string HProject = dic["HProject"].ToString();//项ç®å· |
| | | string HBatchWork = dic["HBatchWork"].ToString();//æ¯å¦é产 |
| | | string HDivisionName = dic["HDivisionName"].ToString();//äºä¸é¨ |
| | | |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_BadReasonTop3Report '" + HYear + "','" + HMonth + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_BadReasonTop3Report"); |
| | | |
| | | //æ·»å åå |
| | | 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 |
| | | } |
| | | } |