| | |
| | | DataSet ds; |
| | | string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"]; |
| | | // GET: Gy_BarCodeReport |
| | | #region //è·åç«å°å· |
| | | |
| | | [Route("Gy_BarCodeReportController/Get_Stations")] |
| | | [HttpGet] |
| | | public object Get_Stations() |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region è·åæå· |
| | | |
| | | [Route("Gy_BarCodeReportController/GetMaterialNos")] |
| | | [HttpGet] |
| | | public object GetMaterialNos() |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å表æ¥è¯¢ |
| | | [Route("Gy_BarCodeReportController/list")] |
| | | |
| | | #region ä¸è¯åå æ¥è¯¢ |
| | | [Route("Gy_BarCodeReportController/GetBadReason_proc")] |
| | | [HttpGet] |
| | | public object list(string sWhere, string user) |
| | | public object GetBadReason_proc(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | |
| | | string HBeginDate = dic["HBeginDate"].ToString(); |
| | | string HEndDate = dic["HEndDate"].ToString(); |
| | | string Station = dic["Station"].ToString();//ç«å° |
| | | string MaterialNo = dic["MaterialNo"].ToString();//æå· |
| | | string LotNo = dic["LotNo"].ToString();//æ¹æ¬¡å· |
| | | |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldUpperBill_Query", 1, false, user)) |
| | | ds = oCN.RunProcReturn("exec h_p_QC_BarCodeBadReasonReport '" + HBeginDate + "','" + HEndDate + "','" + Station + "','" + MaterialNo + "','" + LotNo + "'", "h_p_QC_BarCodeBadReasonReport"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | //string sql1 = "s"+"select * from h_v_Gy_BarCodeReport"; |
| | | //string sql = sql1 + sWhere + " "; |
| | | //ds = oCN.RunProcReturn(sql, "h_v_Gy_BarCodeReport"); |
| | | ds =oCN.RunProcReturn("select a.HCheckProc æ£éªå·¥åº,b.HLayOutName æå·,a.HBarCode PNLæ¡ç ç¼å·,HPCSNo PCSå·,a.HPageIndex æ£åé¢,a.HBadReason ä¸è¯åå from QC_CheckNote_PNL_Temp a INNER JOIN Gy_PNLInfo b on a.HMakeDate=b.HMakeDate where 1=1 " + sWhere , "h_v_Gy_BarCodeReport"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables; |
| | | 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("Gy_BarCodeReportController/GetBadReasonTotal_proc")] |
| | | [HttpGet] |
| | | public object GetBadReasonTotal_proc(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | |
| | | string HBeginDate = dic["HBeginDate"].ToString(); |
| | | string HEndDate = dic["HEndDate"].ToString(); |
| | | string MaterialNo = dic["MaterialNo"].ToString();//æå· |
| | | string LotNo = dic["LotNo"].ToString();//æ¹æ¬¡å· |
| | | |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_QC_BarCodeReasonTotalReport '" + HBeginDate + "','" + HEndDate + "','" + "','" + MaterialNo + "','" + LotNo + "'", "h_p_QC_BarCodeBadReasonReport"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |