| | |
| | | #endregion |
| | | |
| | | |
| | | #region ä¸è¯åå æ¥è¯¢ |
| | | #region è¡¨æ ¼æ¥è¯¢ |
| | | [Route("Gy_BarCodeReportController/GetBadReason_proc")] |
| | | [HttpGet] |
| | | public object GetBadReason_proc(string sWhere, string user) |
| | |
| | | |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_BarCodeBadReasonReport '" + HBeginDate + "','" + HEndDate + "','" + Station + "','" + MaterialNo + "','" + LotNo + "'", "h_p_QC_BarCodeBadReasonReport"); |
| | | ds = oCN.RunProcReturn("exec h_p_QC_BarCodeReasonTable '" + HBeginDate + "','" + HEndDate + "','" + Station + "','" + MaterialNo + "','" + LotNo + "'", "h_p_QC_BarCodeReasonTable"); |
| | | |
| | | //æ·»å åå |
| | | //if (ds == null || ds.Tables.Count == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æªæ¥è¯¢å°æ°æ®ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //æ·»å åå1 |
| | | 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; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | { |
| | | 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; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | |
| | | |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ä¸è¯çæ¥è¯¢ |
| | | #region æ±ç¶å¾æ¥è¯¢ |
| | | [Route("Gy_BarCodeReportController/GetBadReasonTotal_proc")] |
| | | [HttpGet] |
| | | public object GetBadReasonTotal_proc(string sWhere, string user) |
| | |
| | | |
| | | string HBeginDate = dic["HBeginDate"].ToString(); |
| | | string HEndDate = dic["HEndDate"].ToString(); |
| | | string Station = dic["Station"].ToString();//ç«å° |
| | | string MaterialNo = dic["MaterialNo"].ToString();//æå· |
| | | string LotNo = dic["LotNo"].ToString();//æ¹æ¬¡å· |
| | | |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_BarCodeReasonTotalReport '" + HBeginDate + "','" + HEndDate + "','" + "','" + MaterialNo + "','" + LotNo + "'", "h_p_QC_BarCodeBadReasonReport"); |
| | | ds = oCN.RunProcReturn("exec h_p_QC_BarCodeReasonTotalReport '" + HBeginDate + "','" + HEndDate + "','" +Station + "','" + MaterialNo + "','" + LotNo + "'", "h_p_QC_BarCodeBadReasonReport"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region pieå¾ |
| | | [Route("Gy_BarCodeReportController/GetBadReason_pie")] |
| | | [HttpGet] |
| | | public object GetBadReason_pie(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | |
| | | string HBeginDate = dic["HBeginDate"].ToString(); |
| | | string HEndDate = dic["HEndDate"].ToString(); |
| | | string Station = dic["Station"].ToString();//ç«å° |
| | | string MaterialNo = dic["MaterialNo"].ToString();//æå· |
| | | string LotNo = dic["LotNo"].ToString();//æ¹æ¬¡å· |
| | | |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_BarCodeBadReasonReport_pie '" + HBeginDate + "','" + HEndDate + "','" + Station + "','" + MaterialNo + "','" + LotNo + "'", "h_p_QC_BarCodeBadReasonReport_pie"); |
| | | |
| | | //æ·»å åå |
| | | 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 |
| | | |
| | | |
| | | } |
| | | } |