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";