| | |
| | | } |
| | | #endregion |
| | | |
| | | #region è´¨éæ¨¡å 设å¤å·¥èºåæ°è¶å¿åæå¾ |
| | | |
| | | [Route("QC_CustomerAppealReport/Get_QC_EquipMentCollectionTechParamList")] |
| | | [HttpGet] |
| | | public object Get_QC_EquipMentCollectionTechParamList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HEquipNumber = dic["HEquipNumber"].ToString(); |
| | | string HEquipName = dic["HEquipName"].ToString(); |
| | | string HProcName = dic["HProcName"].ToString(); |
| | | |
| | | string HTechParamName = dic["HTechParamName"].ToString(); |
| | | string HDate = dic["HDate"].ToString(); |
| | | |
| | | if ((HEquipNumber == null || HEquipNumber == "") && (HEquipName == null || HEquipName == "") && (HProcName == null || HProcName == "") && (HTechParamName == null || HTechParamName == "") && (HDate == null || HDate == "")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥è¯¢æ¡ä»¶ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select HSourceCode 设å¤ç¼ç ,CONVERT(VARCHAR, HDate, 120) é鿥æ,HTechParamName å·¥èºäº§æ°,HResult æ°éå¼ from Sb_EquipMentCollectionTechParam_Temp where HSourceCode='" + HEquipNumber + "' and HTechParamName='"+ HTechParamName + "' and CONVERT(date, HDate) <='"+HDate+"'", "Sb_EquipMentCollectionTechParam_Temp"); |
| | | |
| | | //æ·»å åå |
| | | 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 |
| | | |
| | | } |
| | | } |