public ActionResult ExportData(Lot_TransformedQuery query) { int recordCount = 0; string xlsName = string.Format("Transform_{0}", DateTime.Now.ToString("yyyyMMdd_hhmmss")); if (StringHelper.isNullOrEmpty(query.OrderBy)) { query.OrderBy = "CreateDate"; query.OrderDesc = true; } if (CurrentUserInfo.Role == UserRoles.Fab || CurrentUserInfo.Role == UserRoles.FabAdmin) { query.Osat = CurrentUserInfo.BUName; query.Status = (int)WaferStatus.WaitVendor; } IList <Lot_Transformed> list = service.GetAllLots(query, 0xf423f, 0, out recordCount); if (list != null && list.Count > 0) { foreach (Lot_Transformed lot in list) { lot.StatusText = WaferHelper.waferStatusDes(lot.Status); } } string nextUrl = Exporthelper.GetExport <Lot_Transformed>("LOTS", list, "/Export/Excels/Transform/", "/Content/Exports/ExportTransform.xml", xlsName, 0, 0); ResponseTypes redirect = ResponseTypes.Redirect; TipTypes information = TipTypes.Information; base.Response.Write(new HandlerResponse("0", "导出Excel文件", redirect.ToString(), information.ToString(), nextUrl, "", "").GenerateJsonResponse()); return(null); }
public ActionResult mDetail(string id) { Lot_Transformed lot = service.GetTransformById(id); if (lot != null) { lot.StatusText = WaferHelper.waferStatusDes(lot.Status); } IList <Wafer_Sbin> list = sbinService.GetSbinTextByLotId(id); LotDetailModel model = new LotDetailModel(); model.LotTransformed = lot; model.ListSbin = list; return(base.View(model)); }
public ActionResult Search(int pageSize, int pageIndex) { WaferQuery query = WaferQueryUtility.GetWaferQuery(base.Request); if (StringHelper.isNullOrEmpty(query.OrderBy)) { query.OrderBy = "CreateDate"; query.OrderDesc = true; } if (CurrentUserInfo.Role == UserRoles.Fab || CurrentUserInfo.Role == UserRoles.FabAdmin) { query.Osat = CurrentUserInfo.BUName; query.Status = (int)WaferStatus.WaitVendor; } int recordCount = 0; IList <Wafer> list = service.GetAllWaferBy(query, pageSize, pageIndex, out recordCount); if (list != null && list.Count > 0) { foreach (Wafer item in list) { item.StatusText = WaferHelper.waferStatusDes(item.Status); item.PEDisposeText = WaferHelper.WaferSelectionDes(item.PEDispose); item.QADisposeText = WaferHelper.WaferSelectionDes(item.QADispose); item.SPRDDecisionText = WaferHelper.WaferSelectionDes(item.SPRDDecision); Boolean IsTriggered = false; IList <Wafer_Sbin> ListSbin = sbinService.GetWaferSbin(item.TransformID, item.ID); foreach (Wafer_Sbin sbin in ListSbin) { if (sbin.IsTriggered) { IsTriggered = true; } } item.IsTriggered = IsTriggered; } } var json = JsonConvert.SerializeObject(new { currentPage = pageIndex, totalPages = PagerUtility.GetPageCount(recordCount, pageSize), rows = list, }); base.Response.Write(json); return(null); }
public ActionResult ExportData() { WaferQuery query = WaferQueryUtility.GetWaferQuery(base.Request); int recordCount = 0; string xlsName = string.Format("Wafer_{0}", DateTime.Now.ToString("yyyyMMdd_hhmmss")); if (StringHelper.isNullOrEmpty(query.OrderBy)) { query.OrderBy = "CreateDate"; query.OrderDesc = true; } if (CurrentUserInfo.Role == UserRoles.Fab || CurrentUserInfo.Role == UserRoles.FabAdmin) { query.Osat = CurrentUserInfo.BUName; query.Status = (int)WaferStatus.WaitVendor; } IList <Wafer> list = service.GetAllWaferBy(query, 0xf423f, 0, out recordCount); if (list != null && list.Count > 0) { foreach (Wafer item in list) { item.StatusText = WaferHelper.waferStatusDes(item.Status); item.PEDisposeText = WaferHelper.WaferSelectionDes(item.PEDispose); item.QADisposeText = WaferHelper.WaferSelectionDes(item.QADispose); item.SPRDDecisionText = WaferHelper.WaferSelectionDes(item.SPRDDecision); } } string path = "/Export/Excels/Wafer/"; string mp = Server.MapPath("~") + path; if (!Directory.Exists(mp)) { Directory.CreateDirectory(mp); } string nextUrl = Exporthelper.GetExport <Wafer>("LOTS", list, "/Export/Excels/Wafer/", "/Content/Exports/ExportWafer.xml", xlsName, 0, 0); ResponseTypes redirect = ResponseTypes.Redirect; TipTypes information = TipTypes.Information; base.Response.Write(new HandlerResponse("0", "导出Excel文件", redirect.ToString(), information.ToString(), nextUrl, "", "").GenerateJsonResponse()); return(null); }
public ActionResult Search(int pageSize, int pageIndex) { Lot_TransformedQuery query = TransformQueryUtility.GetLotTransformQuery(base.Request); if (StringHelper.isNullOrEmpty(query.OrderBy)) { query.OrderBy = "CreateDate"; query.OrderDesc = true; } if (CurrentUserInfo.Role == UserRoles.Fab || CurrentUserInfo.Role == UserRoles.FabAdmin) { query.Osat = CurrentUserInfo.BUName; //query.Status=(int)WaferStatus.WaitVendor; //query.PeVendorState = (int)WaferStatus.WaitPEVendor; } int recordCount = 0; IList <Lot_Transformed> list = service.GetAllLots(query, pageSize, pageIndex, out recordCount); if (list != null && list.Count > 0) { DateTime dt = DateTime.Parse(DateTime.Now.ToLocalTime().ToShortDateString()); foreach (Lot_Transformed lot in list) { lot.StatusText = WaferHelper.waferStatusDes(lot.Status); int recordcount = 0; IList <File> listFile = FileSystemService.GetFilesBy(lot.ID, "", "", "", "", FileStates.NotSpecified, FileTypes.NotSpecifiled, "", false, 0xf423f, 0, out recordcount); lot.FileCount = recordcount; lot.DiesposRemark = waferService.LoadCountByDispose(lot.ID, lot.Status); lot.dayCount = (dt - DateTime.Parse(lot.CompletionDate.ToShortDateString())).Days; } } var json = JsonConvert.SerializeObject(new { currentPage = pageIndex, totalPages = PagerUtility.GetPageCount(recordCount, pageSize), rows = list }); base.Response.Write(json); return(null); }