From 2b0daf717e9f08e44f63b47953ec4c249dbd52a8 Mon Sep 17 00:00:00 2001 From: Marvin Date: Tue, 26 Apr 2022 13:54:13 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9NG=5FINFO=E7=9A=84REASON=5F?= =?UTF-8?q?NO=E9=95=BF=E5=BA=A6=E4=B8=BA10=202.=E4=BF=AE=E6=94=B9NG=5FCOMP?= =?UTF-8?q?ONENT=E7=9A=84NG=5FNO=E9=95=BF=E5=BA=A6=E4=B8=BA10=203.?= =?UTF-8?q?=E4=BF=AE=E6=94=B9NG=5FREPAIR=E7=9A=84REPAIR=5FNO=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E4=B8=BA10=204.=E4=BF=AE=E6=94=B9=E5=88=86=E5=B8=83?= =?UTF-8?q?=E5=9B=BE=E7=9A=84WIP=E6=95=B0=E5=B0=8F=E4=BA=8E0=E6=97=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AMESCoreStudio.Web/Controllers/QRSController.cs | 7 ++++++- AMESCoreStudio.WebApi/Models/AMES/NgComponent.cs | 2 +- AMESCoreStudio.WebApi/Models/AMES/NgInfo.cs | 2 +- AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/QRSController.cs b/AMESCoreStudio.Web/Controllers/QRSController.cs index 0cd8e47a..4bffbf6f 100644 --- a/AMESCoreStudio.Web/Controllers/QRSController.cs +++ b/AMESCoreStudio.Web/Controllers/QRSController.cs @@ -235,7 +235,12 @@ namespace AMESCoreStudio.Web.Controllers } } } - stationWip = stationWip + "" + (okQty1 + ngQty1 - okQty2 - ngQty2) + ""; + int wip_qty = okQty1 + ngQty1 - okQty2 - ngQty2; + if (wip_qty < 0) + { + wip_qty = 0; + } + stationWip = stationWip + "" + wip_qty + ""; } stationWip = stationWip + "
"; diff --git a/AMESCoreStudio.WebApi/Models/AMES/NgComponent.cs b/AMESCoreStudio.WebApi/Models/AMES/NgComponent.cs index d50cfc7b..54c93cd8 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/NgComponent.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/NgComponent.cs @@ -55,7 +55,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES /// [Required] [Column("NG_NO")] - [StringLength(6)] + [StringLength(10)] [DataMember] [Display(Name = "不良原因代碼")] public string NgNo { get; set; } diff --git a/AMESCoreStudio.WebApi/Models/AMES/NgInfo.cs b/AMESCoreStudio.WebApi/Models/AMES/NgInfo.cs index 88381382..255c604e 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/NgInfo.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/NgInfo.cs @@ -150,7 +150,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES /// [Column("REASON_NO")] [Display(Name = "不良現象原因代碼")] - [StringLength(6)] + [StringLength(10)] [DataMember] public string ReasonNo { get; set; } diff --git a/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs b/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs index 072aef84..468c226d 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/NgRepair.cs @@ -53,7 +53,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES /// [Required] [Column("REPAIR_NO")] - [StringLength(6)] + [StringLength(10)] [DataMember] [Display(Name = "維修代碼")] public string RepairNo { get; set; } = "N/A";