| | |
| | | int HMaterID = int.Parse(dic["HMaterID"].ToString()); |
| | | string HMouldNum = dic["HMouldNum"].ToString(); |
| | | string HSourceID = dic["HSourceID"].ToString(); |
| | | string HProcID = dic["HProcID"].ToString(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_InspectionFormReport '" + HBeginDate + "','" + HEndDate + "'," + limit + "," + HQCCheckItemID + "," + HMaterID + ",'" + HMouldNum + "','"+ HSourceID + "','"+ HDeptID + "'", "h_p_QC_InspectionFormReport"); |
| | | ds = oCN.RunProcReturn("exec h_p_QC_InspectionFormReport '" + HBeginDate + "','" + HEndDate + "'," + limit + "," + HQCCheckItemID + "," + HMaterID + ",'" + HMouldNum + "','"+ HSourceID + "','"+ HDeptID + "','"+ HProcID + "'", "h_p_QC_InspectionFormReport"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region è´¨éæ¨¡å å
¨ç¨è´¨é追溯 (æ ¹æ®çäº§è®¢åæ¥è¯¢) |
| | | //页é¢åå§åå è½½ |
| | | [Route("QC_CustomerAppealReport/Get_QC_FiveMenOneRingList_HICM")] |
| | | [HttpGet] |
| | | public object Get_QC_FiveMenOneRingList_HICM(string HICMOBillNo, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_FiveMenOneRingList_HICM '" + HICMOBillNo + "'", "h_p_QC_FiveMenOneRingList_HICM"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤æ¡ç æ¥æ æ°æ®!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | // éåææè¡¨ |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | |
| | | //æ ¹æ®çäº§è®¢åæ¥è¯¢ |
| | | [Route("QC_CustomerAppealReport/Get_QC_FiveMenOneRingList_HICMOBillNoID")] |
| | | [HttpGet] |
| | | public object Get_QC_FiveMenOneRingList_HICMOBillNoID(string HICMOBillNo, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("select top 1 hmainid,HEntryID from h_v_IF_ICMOBillList where åæ®å·= '" + HICMOBillNo + "'", "h_v_Sc_ProcessExchangeBillList_Query"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //ç¹å»ä¸»è¡¨æ ¼çç产订å,æ¥è¯¢åè¡¨æ ¼æ°æ® |
| | | [Route("QC_CustomerAppealReport/Get_QC_FiveMenOneRingList_Right_ICM")] |
| | | [HttpGet] |
| | | public object Get_QC_FiveMenOneRingList_Right_ICM(string linterid, string HEntryID, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_FiveMenOneRingList_Query_HICM '" + linterid + "','" + HEntryID + "'", "h_p_QC_FiveMenOneRingList_Query_HICM"); |
| | | |
| | | // éåææè¡¨ |
| | | 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 |
| | | } |
| | | } |