| | |
| | | } |
| | | #endregion |
| | | |
| | | #region è´¨éæ¨¡å 设å¤å·¥èºåæ°è¶å¿å¾ æ ¹æ®æµè½¬å¡è·åè®¾å¤ |
| | | #region è´¨éæ¨¡å 设å¤å·¥èºåæ°è¶å¿å¾ æ ¹æ®æµè½¬å¡è·å设å¤+模å
· |
| | | |
| | | [Route("QC_CustomerAppealReport/Get_EquipList")] |
| | | [HttpGet] |
| | |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("select distinct b.HInterID HItemID,b.HName HName from SB_EquipICMOTechParamBillMain a left join Gy_EquipFileBillMain b on a.HEquipID=b.HInterID where HProcExchBillNo='" + HProcExchBillNo + "'", "SB_EquipICMOTechParamBillMain"); |
| | | ds = oCN.RunProcReturn("select distinct b.HInterID HItemID,b.HEquipFileNumber HEquipFileNumber,b.HName HName,d.HMouldNo HMouldNumber,d.HName HMouldName " + |
| | | " from SB_EquipICMOTechParamBillMain a left join Gy_EquipFileBillMain b on a.HEquipID=b.HInterID" + |
| | | " left join Sc_ICMOBillStatus_Tmp c on a.HProcExchInterID = c.HSourceInterID and a.HProcExchEntryID = c.HSourceEntryID and a.HProcID = c.HProcID" + |
| | | " left join Gy_MouldFileMain d on c.HMouldID = d.HInterID where HProcExchBillNo='" + HProcExchBillNo + "'", "SB_EquipICMOTechParamBillMain"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_QC_ProcessPerformanceFirstPassList order by æä»½ desc", "h_v_QC_ProcessPerformanceFirstPassList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_QC_ProcessPerformanceFirstPassList where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by æä»½ "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessPerformanceFirstPassList"); |
| | | } |
| | | |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HYear = dic["HYear"].ToString();//å¹´ |
| | | string HDeptName = dic["HDeptName"].ToString();//é¨é¨ |
| | | string HProject = dic["HProject"].ToString();//项ç®å· |
| | | string HMaterNumber = dic["HMaterNumber"].ToString();//ç©æä»£ç |
| | | string HMaterName = dic["HMaterName"].ToString();//ç©æåç§° |
| | | string HBatchWork = dic["HBatchWork"].ToString();//æ¯å¦é产 |
| | | string HDivisionName = dic["HDivisionName"].ToString();//äºä¸é¨ |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_ProcessPerformanceFirstPassList '" + HYear + "','"+ HDeptName + "','" + HProject + "','" + HMaterNumber + "','" + HMaterName + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ProcessPerformanceFirstPassList"); |
| | | |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region è´¨éæ¨¡å å¶ç¨ç»©æè¶å¿å¾(åæ ¼ç) æ¥è¯¢ |
| | | |
| | | [Route("QC_CustomerAppealReport/getQC_ProcessPerformancePass")] |
| | |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_QC_ProcessPerformancePassList order by æä»½ desc", "h_v_QC_ProcessPerformancePassList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_QC_ProcessPerformancePassList where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by æä»½ "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessPerformancePassList"); |
| | | } |
| | | |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HYear = dic["HYear"].ToString();//å¹´ |
| | | string HDeptName = dic["HDeptName"].ToString();//é¨é¨ |
| | | string HProject = dic["HProject"].ToString();//项ç®å· |
| | | string HMaterNumber = dic["HMaterNumber"].ToString();//ç©æä»£ç |
| | | string HMaterName = dic["HMaterName"].ToString();//ç©æåç§° |
| | | string HBatchWork = dic["HBatchWork"].ToString();//æ¯å¦é产 |
| | | string HDivisionName = dic["HDivisionName"].ToString();//äºä¸é¨ |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_ProcessPerformancePassList '" + HYear + "','" + HDeptName + "','" + HProject + "','" + HMaterNumber + "','" + HMaterName + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ProcessPerformancePassList"); |
| | | |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | { |
| | | 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 == "")) |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥è¯¢æ¡ä»¶ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | ds = oCN.RunProcReturn("select * from h_v_Sb_EquipMentCollectionTechParam order by é鿥æ desc", "h_v_Sb_EquipMentCollectionTechParam"); |
| | | } |
| | | |
| | | 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"); |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sb_EquipMentCollectionTechParam where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by é鿥æ "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMentCollectionTechParam"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region è´¨éæ¨¡å å
¨ç¨è´¨é追溯 |
| | | /// <summary> |
| | | /// è¿åå¼å¸¸é®é¢æ¥æº |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("QC_CustomerAppealReport/Get_QC_FiveMenOneRingList")] |
| | | [HttpGet] |
| | | public object Get_QC_FiveMenOneRingList(string SN, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_FiveMenOneRingList '" + SN + "'", "h_p_QC_FiveMenOneRingList"); |
| | | |
| | | // éåææè¡¨ |
| | | foreach (DataTable table in ds.Tables) |
| | | { |
| | | List<object> tableColumnList = new List<object>(); |
| | | |
| | | // æ·»å åå |
| | | foreach (DataColumn col in table.Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | tableColumnList.Add(JsonConvert.DeserializeObject(ColmString)); |
| | | } |
| | | |
| | | // å°æ¯ä¸ªè¡¨çååå表添å å°æ»ååå表 |
| | | columnNameList.Add(new { TableName = table.TableName, Columns = tableColumnList }); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds; |
| | | 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> |