| | |
| | | |
| | | string HBeginDate = dic["HBeginDate"].ToString(); |
| | | string HEndDate = dic["HEndDate"].ToString(); |
| | | string HDeptID = dic["HDeptID"].ToString(); |
| | | int limit = int.Parse(dic["limit"].ToString()); |
| | | int HQCCheckItemID = int.Parse(dic["HQCCheckItemID"].ToString()); |
| | | int HMaterID = int.Parse(dic["HMaterID"].ToString()); |
| | | string HMouldNum = dic["HMouldNum"].ToString(); |
| | | string HSourceID = dic["HSourceID"].ToString(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_InspectionFormReport '" + HBeginDate + "','" + HEndDate + "'," + limit + "," + HQCCheckItemID + "," + HMaterID + ",'" + HMouldNum + "'", "h_p_QC_InspectionFormReport"); |
| | | ds = oCN.RunProcReturn("exec h_p_QC_InspectionFormReport '" + HBeginDate + "','" + HEndDate + "'," + limit + "," + HQCCheckItemID + "," + HMaterID + ",'" + HMouldNum + "','"+ HSourceID + "','"+ HDeptID + "'", "h_p_QC_InspectionFormReport"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | //ç¹å»ä¸»è¡¨æ ¼çæµè½¬å¡,æ¥è¯¢åè¡¨æ ¼æ°æ® |
| | | [Route("QC_CustomerAppealReport/Get_QC_FiveMenOneRingList_Right")] |
| | | [HttpGet] |
| | | public object Get_QC_FiveMenOneRingList_Right(string linterid,string SNs, string user) |
| | | public object Get_QC_FiveMenOneRingList_Right(string linterid,string HProcID,string SNs, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_FiveMenOneRingList_Query '" + linterid + "','" + SNs + "'", "h_p_QC_FiveMenOneRingList_Query"); |
| | | ds = oCN.RunProcReturn("exec h_p_QC_FiveMenOneRingList_Query '" + linterid + "','"+ HProcID + "','" + SNs + "'", "h_p_QC_FiveMenOneRingList_Query"); |
| | | |
| | | // éåææè¡¨ |
| | | foreach (DataTable table in ds.Tables) |
| | |
| | | /// PPM绩æè¶å¿å¾æ¥è¡¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("QC_QualityReportsController/GetQC_PPMReport_Json")] |
| | | [Route("QC_CustomerAppealReport/GetQC_PPMReport_Json")] |
| | | [HttpGet] |
| | | public object GetQC_PPMReport_Json(string sWhere) |
| | | { |
| | |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HYear = dic["HYear"].ToString();//å¹´ |
| | | string HDeptID = dic["HDeptID"].ToString();//é¨é¨ |
| | | string HMonth = dic["HMonth"].ToString();//æ |
| | | string HSupID = dic["HSupID"].ToString();//ä¾åºå |
| | | string HDivisionName = dic["HDivisionName"].ToString();//äºä¸é¨ |
| | | string HProject = dic["HProject"].ToString();//项ç®å· |
| | | string HBatchWork = dic["HBatchWork"].ToString();//æ¯å¦é产 |
| | | string HDivisionName = dic["HDivisionName"].ToString();//äºä¸é¨ |
| | | string HDeptID = dic["HDeptID"].ToString();//é¨é¨ |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_PPMReport '" + HYear.ToString() + "'," + HDeptID.ToString() + ",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_PPMReport"); |
| | | ds = oCN.RunProcReturn("exec h_p_QC_PPMReport '" + HYear + "','" + HMonth + "','" + HDivisionName + "','" + HProject + "','" + HBatchWork + "','" + HDeptID + "','" + HSupID + "'", "h_p_QC_PPMReport"); |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | ds = oCN.RunProcReturn("select a.HBillNo å·¥åºæµè½¬å¡å·,e.HInterID 设å¤id,e.HEquipFileNumber 设å¤ä»£ç ,e.HName 设å¤åç§°,d.HName çäº§èµæº,a.HMaterID ç©æid,c.HName ç©æåç§°,b.HProcID å·¥åºid,f.HName å·¥åºåç§°,b.HRelBeginDate å¼å§æ¶é´,b.HRelEndDate ç»ææ¶é´ " + |
| | | "from Sc_ProcessExchangeBillMain a inner join Sc_ProcessExchangeBillSub b on a.HInterID=b.HInterID " + |
| | | "left join Gy_Material c on a.HMaterID = c.HItemID left join Gy_Source d on b.HSourceID = d.HItemID " + |
| | | "left join Gy_EquipFileBillMain e on b.HSourceID = e.HSourceID left join Gy_Process f on b.HProcID = f.HItemID where a.HInterID='"+linterid+ "' and b.HProcID='"+HProcID+"'", "SB_EquipICMOTechParamBillMain"); |
| | | "left join Gy_EquipFileBillMain e on b.HSourceID = e.HSourceID and b.HSourceID<>0 left join Gy_Process f on b.HProcID = f.HItemID where a.HInterID='" + linterid+ "' and b.HProcID='"+HProcID+"'", "SB_EquipICMOTechParamBillMain"); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | |
| | | |
| | | [Route("QC_CustomerAppealReport/Get_TechParamList")] |
| | | [HttpGet] |
| | | public object Get_TechParamList(string HMaterID, string HProID, string HEquId, string user) |
| | | public object Get_TechParamList(string HMaterID, string HProID, string HEquId, string HTeachName, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("select c.HName å·¥èºåæ°,b.HDataForm ééæ¥æº from Gy_MaterialTechParamBillMain a " + |
| | | if (HTeachName=="") |
| | | { |
| | | ds = oCN.RunProcReturn("select c.HName å·¥èºåæ°,b.HDataForm ééæ¥æº from Gy_MaterialTechParamBillMain a " + |
| | | "inner join Gy_MaterialTechParamBillSub b on a.HInterID = b.HInterID " + |
| | | "left join Gy_TechnologyParameter c on b.HTechParamID = c.HItemID where a.HMaterID='" + HMaterID + "' and a.HProcID='"+ HProID + "' and a.HEquipID='"+ HEquId + "' and b.HDataForm='设å¤éé' ", "SB_EquipICMOTechParamBillMain"); |
| | | "left join Gy_TechnologyParameter c on b.HTechParamID = c.HItemID where a.HMaterID='" + HMaterID + "' and a.HProcID='" + HProID + "' and a.HEquipID='" + HEquId + "'", "SB_EquipICMOTechParamBillMain"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("select c.HName å·¥èºåæ°,b.HDataForm ééæ¥æº from Gy_MaterialTechParamBillMain a " + |
| | | "inner join Gy_MaterialTechParamBillSub b on a.HInterID = b.HInterID " + |
| | | "left join Gy_TechnologyParameter c on b.HTechParamID = c.HItemID where a.HMaterID='" + HMaterID + "' and a.HProcID='" + HProID + "' and a.HEquipID='" + HEquId + "' and c.HName ='" + HTeachName + "'", "SB_EquipICMOTechParamBillMain"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | |
| | | string HBeginDate = dic["HBeginDate"].ToString(); |
| | | string HEndDate = dic["HEndDate"].ToString(); |
| | | string HBatchNo = dic["HBatchNo"].ToString();//æ¹æ¬¡å· |
| | | string HBatchNo1 = dic["HBatchNo1"].ToString();//IDå· |
| | | string HProject = dic["HProject"].ToString();//项ç®å· |
| | | string HBatchWork = dic["HBatchWork"].ToString();//æ¯å¦é产 |
| | | string HDivisionName = dic["HDivisionName"].ToString();//äºä¸é¨ |
| | | string HProcName = dic["HProcName"].ToString();//å·¥åºåç§° |
| | | string HReceiveMan = dic["HReceiveMan"].ToString();//æä½å |
| | | string HEquipNumber = dic["HEquipNumber"].ToString();//设å¤ç¼ç |
| | | string HMaterName = dic["HMaterName"].ToString();//ç©æåç§° |
| | | string HBachNO_BCP = dic["HBachNO_BCP"].ToString();//åæåæ¹æ¬¡ |
| | | string HBachNO_CP = dic["HBachNO_CP"].ToString();//æåæ¹æ¬¡ |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_QualityDailyReprot '" + HBeginDate + "','" + HEndDate + "','" + HBatchNo + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "','" + HProcName + "','" + HReceiveMan + "','" + HEquipNumber + "'", "h_p_QC_QualityDailyReprot"); |
| | | ds = oCN.RunProcReturn("exec h_p_QC_QualityDailyReprot '" + HBeginDate + "','" + HEndDate + "','" + HBatchNo + "','" + HBatchNo1 + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "','" + HProcName + "','" + HReceiveMan + "','" + HEquipNumber + "','" + HMaterName + "','" + HBachNO_BCP + "','" + HBachNO_CP + "'", "h_p_QC_QualityDailyReprot"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region è´¨éæ¨¡å æ§è½æ£æµæ¥è¡¨ æ¥è¯¢ |
| | | |
| | | [Route("QC_CustomerAppealReport/getQC_TechParamReport")] |
| | | [HttpGet] |
| | | public object getQC_TechParamReport(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HBeginDate = dic["HBeginDate"].ToString(); |
| | | string HEndDate = dic["HEndDate"].ToString(); |
| | | string HProject = dic["HProject"].ToString();//项ç®å· |
| | | string HProcId = dic["HProcId"].ToString(); //å·¥åº |
| | | string Frequency = dic["Frequency"].ToString();//颿¬¡ |
| | | string HSourceID= dic["HSourceID"].ToString();//çäº§èµæº |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_TechParamReportList '" + Frequency + "','" + HProject + "','" + HProcId + "','" + HBeginDate + "','" + HEndDate + "','"+ HSourceID + "'", "h_p_TechParamReportList"); |
| | | |
| | | |
| | | //æ·»å åå |
| | | 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_BackWorkReport")] |
| | | [HttpGet] |
| | | public object getQC_BackWorkReport(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HBeginDate = dic["HBeginDate"].ToString(); |
| | | string HEndDate = dic["HEndDate"].ToString(); |
| | | string HProject = dic["HProject"].ToString();//项ç®å· |
| | | string HBatchWork = dic["HBatchWork"].ToString();//æ¯å¦é产 |
| | | string HDivisionName = dic["HDivisionName"].ToString();//äºä¸é¨ |
| | | string HMaterName = dic["HMaterName"].ToString();//ç©æåç§° |
| | | string HProcName = dic["HProcName"].ToString();//å·¥åºåç§° |
| | | string HBadReasonID = dic["HBadReasonID"].ToString();//ä¸è¯åå |
| | | |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_BackWorkReport '" + HBeginDate + "','" + HEndDate + "','" + HProject + "','" + HDivisionName + "','" + HBatchWork + "','" + HMaterName + "','" + HProcName + "','" + HBadReasonID + "'", "h_p_QC_BackWorkReport"); |
| | | |
| | | |
| | | //æ·»å åå |
| | | 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 |
| | | |
| | | |
| | | } |
| | | } |