From 396b03068088e2c6059fb7cd316cbd5fb9ad05b0 Mon Sep 17 00:00:00 2001 From: Marvin Date: Thu, 26 May 2022 14:49:19 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=AD=A3=E7=B6=AD=E4=BF=AE=E9=80=B2?= =?UTF-8?q?=E5=87=BA=E6=A2=9D=E7=A2=BC=E6=9F=A5=E8=A9=A2,=E6=9C=AA?= =?UTF-8?q?=E5=87=BA=E7=AB=99=E6=99=82=E9=96=93=E9=A1=AF=E7=A4=BA=E7=A9=BA?= =?UTF-8?q?=E7=99=BD=202.=E4=BF=AE=E6=94=B9=E7=B6=AD=E4=BF=AE=E9=80=B2?= =?UTF-8?q?=E5=87=BA=E8=B3=87=E6=96=99=E7=B5=B1=E8=A8=88,=E6=9C=AA?= =?UTF-8?q?=E5=87=BA=E7=AB=99=E6=99=82=E9=96=93=E9=A1=AF=E7=A4=BA=E7=A9=BA?= =?UTF-8?q?=E7=99=BD,TAT=E7=94=A8=E7=95=B6=E5=89=8D=E6=99=82=E9=96=93?= =?UTF-8?q?=E5=8E=BB=E8=A8=88=E7=AE=97,=E5=96=AE=E4=BD=8D=E7=82=BA?= =?UTF-8?q?=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Views/REP/REP013.cshtml | 2 +- .../Controllers/AMES/NgRepairsController.cs | 12 ++++++------ AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/AMESCoreStudio.Web/Views/REP/REP013.cshtml b/AMESCoreStudio.Web/Views/REP/REP013.cshtml index c54229b3..5821664e 100644 --- a/AMESCoreStudio.Web/Views/REP/REP013.cshtml +++ b/AMESCoreStudio.Web/Views/REP/REP013.cshtml @@ -279,7 +279,7 @@ }, { field: 'tat', - title: 'TAT(Hour)', + title: 'TAT(天)', width: 160, sort: true }, diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/NgRepairsController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/NgRepairsController.cs index e9e191ac..fb50f22a 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/NgRepairsController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/NgRepairsController.cs @@ -128,7 +128,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES RepairUserName = y.UserName, //RepairUserName = helper.GetUserName(y.UserID).Result, q2.StationId, - CreateDate = (x.CreateDate == null ? DateTime.MaxValue : x.CreateDate), + CreateDate = (x.CreateDate == null ? null : x.CreateDate), StateDesc = (x.CreateDate != null ? "出站" : "進站") }; //StateDesc= (q7.UserName == "" ? "進站" : (q7.UserName != "" ? "出站":"")) @@ -218,7 +218,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES join qf in _context.UserInfoes on q8.ReplyUserID equals qf.UserID join qg in _context.RMAReasons on q1.RepairNo equals qg.RMAReasonNo join qh in _context.QATypes on qg.QATypeId equals qh.QATypeID - join qi in _context.CalendarTables on q1.CreateDate.Date equals qi.TimeID + join qi in _context.CalendarTables on q1.CreateDate.Value.Date equals qi.TimeID select new { q4.UnitNO, @@ -395,13 +395,13 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES from z in repair_reason.DefaultIfEmpty() join qh in _context.QATypes on z.QATypeId equals qh.QATypeID into repair_qa from a in repair_qa.DefaultIfEmpty() - join qi in _context.CalendarTables on x.CreateDate.Date equals qi.TimeID into repair_date + join qi in _context.CalendarTables on x.CreateDate.Value.Date equals qi.TimeID into repair_date from c in repair_date.DefaultIfEmpty() select new { q4.UnitNO, q6.LineDesc, - CreateDate = (x.CreateDate == null ? DateTime.MaxValue : x.CreateDate), + CreateDate = (x.CreateDate == null ? null : x.CreateDate), c.Month, WeekOfYearISO = (c.WeekOfYearISO == null ? 0 : c.WeekOfYearISO), q7.StationName, @@ -454,8 +454,8 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES CheckInUserName = helper.GetUserName(q2.CreateUserID).Result, CheckOutUserNo = helper.GetUserNo(x.CreateUserID).Result, CheckOutUserName = helper.GetUserName(x.CreateUserID).Result, - CheckOutDate = (x.CreateDate == null ? DateTime.MaxValue : x.CreateDate), - TAT = EF.Functions.DateDiffHour(q2.CreateDate, x.CreateDate == null ? DateTime.MaxValue : x.CreateDate), + CheckOutDate = (x.CreateDate == null ? null : x.CreateDate), + TAT = EF.Functions.DateDiffDay(q2.CreateDate, x.CreateDate == null ? DateTime.Now : x.CreateDate), StateDesc = (x.CreateDate != null ? "出站" : "進站") }; diff --git a/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs b/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs index 347a5e40..a04ba839 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs @@ -146,7 +146,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES /// [Column("CREATE_DATE")] [DataMember] - public DateTime CreateDate { get; set; } = System.DateTime.Now; + public DateTime? CreateDate { get; set; } = System.DateTime.Now; /// /// 更新者ID