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 ExportHistory() { string xlsName = string.Format("History_{0}", DateTime.Now.ToString("yyyyMMdd_hhmmss")); HistoryQuery query = HistoryQueryUtility.GetHistoryQuery(base.Request); int recordCount = 0; IList <VwWafer_History> list = historyService.HistoryList(query, 0xf423f, 0, out recordCount); if (list != null && list.Count > 0) { foreach (VwWafer_History history in list) { if (history.IsVendor) { history.DisposeText = "Confirmed"; } else { history.DisposeText = WaferHelper.WaferSelectionDes(history.Dispose); } } } string nextUrl = Exporthelper.GetExport <VwWafer_History>("Historys", list, "/Export/Excels/History/", "/Content/Exports/ExportHistory.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 doOtherBinDispose() { string lotID = base.Request.Form["lotIDForOtherBinDispose"]; string otherBinDisposeCommentID = base.Request.Form["hidOtherBinDisposeCommentID"]; string str3 = base.Request.Form["txtOtherBinDisposeComment"]; int newPEDispose = Convert.ToInt32(base.Request.Form["hidPEDispose"]); if (StringHelper.isNullOrEmpty(str3)) { str3 = "Other Bin dispose."; } Lot lot = LotService.doOtherBinDispose(lotID, newPEDispose, otherBinDisposeCommentID, str3, BaseController.CurrentUserInfo); NotificationService.ClearNotificationsByRoleAndLotID(UserRoles.PE, lotID, NotificationTypes.LotDispose); NotificationService.ClearNotificationsByRoleAndLotID(UserRoles.PE, lotID, NotificationTypes.OtherBinDispose); if (lot.VenderConfirmed) { NotificationService.CreateOSATConfirmNotificationsWhileLotChanged(lot.VenderID, lot, "OTHERBINDISPOSE"); } ResponseTypes tip = ResponseTypes.Tip; TipTypes information = TipTypes.Information; base.Response.Write(new HandlerResponse("0", "doOtherBinDisposeSuccessed", tip.ToString(), information.ToString(), "", "", lot.Status).GenerateJsonResponse()); return(null); }
public void ChangeTip(TipTypes tipType) { DisableTips(); if (tipType == TipTypes.BoxTip) { boxTip.gameObject.SetActive(true); } else if (tipType == TipTypes.TriangleTip) { triangleTip.gameObject.SetActive(true); } else if (tipType == TipTypes.ArchTip) { archTip.gameObject.SetActive(true); } }
public ActionResult ExportLots(string orderBy, bool desc) { int recordCount = 0; string xlsName = string.Format("LOTS_{0}", DateTime.Now.ToString("yyyyMMdd_hhmmss")); if (StringHelper.isNullOrEmpty(orderBy)) { orderBy = "CreateTime"; desc = true; } IList <LotView> tList = LotService.GetLotViews(QueryUtility.GetQueryFromRequest(base.Request, BaseController.CurrentUserInfo.UserID), orderBy, desc, 0, 0xf423f, out recordCount); string nextUrl = Exporthelper.GetExport <LotView>("LOTS", tList, "/Export/Excels/Lots/", "/Content/Exports/ExportLots.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 ExportSwbin(string lotID, string code, string defect, string qty, string failRate, string isPassed, string limited, string orderBy, bool desc = false) { int recordCount = 0; LotView lotViewByLotID = LotService.GetLotViewByLotID(lotID); if (StringHelper.isNullOrEmpty(orderBy)) { orderBy = "Code"; } desc = false; string xlsName = "LOT_" + lotViewByLotID.LotNO + "_SWBin"; IList <SWBin> tList = LotService.GetSWBinsBy(lotID, code, defect, qty, failRate, isPassed, limited, orderBy, desc, 0, 0x1869f, out recordCount); string nextUrl = Exporthelper.GetExport <SWBin>("SW Bin", tList, "/Export/Excels/Swbins/", "/Content/Exports/ExportSwbins.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 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 SaveDecision() { string code = string.Empty; string message = string.Empty; string str3 = string.Empty; int dispose = -1; Lot lotByLotID = LotService.GetLotByLotID(base.Request.Form["lotID"]); int lastDecision = lotByLotID.LastDecision; switch (BaseController.CurrentUserInfo.Role) { case UserRoles.OSAT: case UserRoles.OSATAdmin: { string str6 = base.Request.Form["chkConfirmedValue"]; char[] separator = new char[] { ',' }; string[] strArray = str6.Split(separator); if ((str6.Length <= 0) || (lotByLotID.SPRDDecision == 0xff)) { code = "1"; message = "Confirm failed because the lot status changed."; } else { NotificationService.ClearNotificationsByOSATIDAndLotID(lotByLotID.VenderID, lotByLotID.LotID); foreach (string str7 in strArray) { if (!(str7 == "0")) { if (str7 == "1") { lotByLotID.VenderConfirmed = true; lotByLotID.VenderConfirmTime = DateTime.Now; } else if (str7 == "2") { lotByLotID.VenderConfirmed = true; lotByLotID.VenderConfirmTime = DateTime.Now; str3 = "Confirm Rescreen"; } else if (str7 == "3") { lotByLotID.VenderConfirmed = true; lotByLotID.VenderConfirmTime = DateTime.Now; str3 = "Confirm Scrap"; } else if (str7 == "5") { lotByLotID.OtherBinDisposeConfirmed = true; lotByLotID.OtherBinDisposeConfirmTime = DateTime.Now; } } else { lotByLotID.VenderConfirmed = true; lotByLotID.VenderConfirmTime = DateTime.Now; str3 = "Confirm Release"; } } if (str6.Contains("1") && str6.Contains("5")) { str3 = "Confirm Bin1 Release and Other Bin Dispose"; } if (str6.Contains("1") && !str6.Contains("5")) { str3 = "Confirm Bin1 Release"; } if (!str6.Contains("1") && str6.Contains("5")) { str3 = "Confirm Other Bin Dispose"; } LotService.UpdateLot(lotByLotID); lotByLotID = LotService.GetLotByLotID(lotByLotID.LotID); if (lotByLotID.Status == "END") { lotByLotID.SDStates = 0xff; LotService.UpdateLot(lotByLotID); } } //base.Session.Contents["User"] = UserService.GetOSATUserByHashedCID(BaseController.CurrentUserInfo.UserID); goto Label_0431; } case UserRoles.PE: case UserRoles.PEAdmin: lotByLotID.PEDisposeTime = DateTime.Now; dispose = Convert.ToInt32(base.Request.Form["PEDispose"]); lotByLotID.SetPEDispose(dispose); NotificationService.ClearNotificationsByRoleAndLotID(BaseController.CurrentUserInfo.Role, lotByLotID.LotID, NotificationTypes.LotDispose); switch (dispose) { case 1: if (!lotByLotID.OtherBinDispose) { NotificationService.CreateOtherBinDisposeNotificationToSomebody(lotByLotID.LotID, BaseController.CurrentUserInfo.UserID); } goto Label_0114; case 2: case 3: NotificationService.ClearNotificationsByRoleAndLotID(UserRoles.PE, lotByLotID.LotID, NotificationTypes.OtherBinDispose); goto Label_0114; case 4: //不需要给自己发邮件 //NotificationService.CreateDisposeNotification(lotByLotID, "", BaseController.CurrentUserInfo); goto Label_0114; } break; case UserRoles.QA: case UserRoles.QAAdmin: dispose = Convert.ToInt32(base.Request.Form["QADispose"]); lotByLotID.QADisposeTime = DateTime.Now; lotByLotID.SetQADispose(dispose); NotificationService.ClearNotificationsByRoleAndLotID(BaseController.CurrentUserInfo.Role, lotByLotID.LotID, NotificationTypes.LotDispose); switch (dispose) { case 1: if (!lotByLotID.OtherBinDispose) { NotificationService.CreateOtherBinDisposeNotificationsToPEs(lotByLotID.LotID); } break; case 2: case 3: NotificationService.ClearNotificationsByRoleAndLotID(UserRoles.PE, lotByLotID.LotID, NotificationTypes.OtherBinDispose); break; case 4: //不需要给自己发邮件 //NotificationService.CreateDisposeNotification(lotByLotID, "", BaseController.CurrentUserInfo); break; } //base.Session.Contents["User"] = UserService.GetUserByID(BaseController.CurrentUserInfo.UserID); code = "0"; message = "Save decision successed."; goto Label_0431; default: goto Label_0431; } Label_0114: //base.Session.Contents["User"] = UserService.GetUserByID(BaseController.CurrentUserInfo.UserID); code = "0"; message = "Save decision successed."; Label_0431: LotService.UpdateLot(lotByLotID); string commentText = base.Request.Form["txtComment"]; string commentID = base.Request.Form["hidNewCommentID"]; bool internalOnly = base.Request.Form["chkInternal"] != null; if (internalOnly && (dispose != -1)) { Comment comment = LotService.GenerateComment(lotByLotID.LotID, dispose, commentID, commentText, internalOnly, BaseController.CurrentUserInfo); Comment comment2 = LotService.GenerateComment(lotByLotID.LotID, dispose, Guid.NewGuid().ToString(), "", false, BaseController.CurrentUserInfo); if (!StringHelper.isNullOrEmpty(str3)) { comment.CommentText = str3 + "<br/>" + comment.CommentText; comment2.CommentText = str3; } LotService.AddDisposeComment(comment); LotService.AddDisposeComment(comment2); } else { Comment comment3 = LotService.GenerateComment(lotByLotID.LotID, dispose, commentID, commentText, internalOnly, BaseController.CurrentUserInfo); if (!StringHelper.isNullOrEmpty(str3)) { comment3.CommentText = str3 + "<br/>" + comment3.CommentText; } LotService.AddDisposeComment(comment3); } ResponseTypes tip = ResponseTypes.Tip; TipTypes information = TipTypes.Information; base.Response.Write(new HandlerResponse(code, message, tip.ToString(), information.ToString(), "", "", lotByLotID.Status).GenerateJsonResponse()); return(null); }