| | |
| | | } |
| | | #endregion |
| | | |
| | | #region è´¨éæ¨¡å æ§è½æ¥åºå°è´¦ |
| | | /// <summary> |
| | | /// è¿åç´éçæ¥è¡¨å表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("QC_CustomerAppealReport/QC_PerformanceScrapLedger")] |
| | | [HttpGet] |
| | | public object QC_PerformanceScrapLedger(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (sWhere == null || sWhere == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥è¯¢æ¡ä»¶ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | |
| | | string HBeginDate = dic["HBeginDate"].ToString(); |
| | | string HEndDate = dic["HEndDate"].ToString(); |
| | | string HBatchNo = dic["HBatchNo"].ToString(); |
| | | int HMaterID = int.Parse(dic["HMaterID"].ToString()); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_PerformanceScrapLedger '" + HBeginDate + "','" + HEndDate + "','" + HMaterID + "','" + HBatchNo+"'", "h_p_QC_PerformanceScrapLedger"); |
| | | |
| | | //æ·»å åå |
| | | 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 è´¨éæ¨¡å éæµç»è®°æ°æ®å°è´¦ |
| | | /// <summary> |
| | | /// è¿åç´éçæ¥è¡¨å表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("QC_CustomerAppealReport/QC_RegistrationForTestingReport")] |
| | | [HttpGet] |
| | | public object QC_RegistrationForTestingReport(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (sWhere == null || sWhere == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥è¯¢æ¡ä»¶ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | |
| | | string HBeginDate = dic["HBeginDate"].ToString(); |
| | | string HEndDate = dic["HEndDate"].ToString(); |
| | | string HBatchNo = dic["HBatchNo"].ToString(); |
| | | int HMaterID = int.Parse(dic["HMaterID"].ToString()); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_RegistrationForTestingReport '" + HBeginDate + "','" + HEndDate + "','" + HMaterID + "','" + HBatchNo + "'", "h_p_QC_RegistrationForTestingReport"); |
| | | |
| | | //æ·»å åå |
| | | 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 è´¨éæ¨¡å å¶ç¨ç»©æè¶å¿å¾(䏿¬¡åæ ¼ç) æ¥è¯¢ |
| | | |
| | | [Route("QC_CustomerAppealReport/getQC_ProcessPerformanceFirstPass")] |