From 2df3a14d8961c8b8c8018e35078800608c13bbdb Mon Sep 17 00:00:00 2001 From: "BB.Wang" Date: Fri, 2 Dec 2022 11:00:49 +0800 Subject: [PATCH] =?UTF-8?q?Yiru=20=E4=BF=AE=E6=AD=A3=E5=B7=A1=E6=AA=A2?= =?UTF-8?q?=E6=A8=A1=E7=B5=84=E3=80=81=E5=B7=A5=E6=99=82=E6=A8=A1=E7=B5=84?= =?UTF-8?q?=E3=80=81=E5=AE=8C=E5=B7=A5=E5=85=A5=E5=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/PCSController.cs | 275 ++++++++++-------- .../Controllers/SPCController.cs | 32 +- .../Controllers/WHSController.cs | 13 +- AMESCoreStudio.Web/Views/BAS/BAS013.cshtml | 2 +- AMESCoreStudio.Web/Views/BAS/BAS019C.cshtml | 4 + AMESCoreStudio.Web/Views/SPC/SPC004.cshtml | 26 +- AMESCoreStudio.Web/Views/SPC/SPC005.cshtml | 35 +-- AMESCoreStudio.Web/Views/SPC/SPC005C.cshtml | 53 ++-- AMESCoreStudio.Web/Views/SPC/SPC005U.cshtml | 97 +++--- AMESCoreStudio.Web/Views/SPC/SPC005V.cshtml | 12 +- AMESCoreStudio.Web/Views/WHS/WHS003.cshtml | 12 +- AMESCoreStudio.Web/Views/WHS/WHS003C.cshtml | 87 +++++- .../AMES/InspectionResultMastersController.cs | 7 +- .../Models/AMES/InspectionForm.cs | 2 +- .../Models/AMES/InspectionResultMaster.cs | 6 +- AMESCoreStudio.WebApi/Models/BAS/RuninTime.cs | 2 +- 16 files changed, 424 insertions(+), 241 deletions(-) diff --git a/AMESCoreStudio.Web/Controllers/PCSController.cs b/AMESCoreStudio.Web/Controllers/PCSController.cs index 3f304d81..267cab8c 100644 --- a/AMESCoreStudio.Web/Controllers/PCSController.cs +++ b/AMESCoreStudio.Web/Controllers/PCSController.cs @@ -7315,174 +7315,215 @@ namespace AMESCoreStudio.Web.Controllers * 3.若有序號不可入庫 => 畫面顯示不可入之序號 * 4.所有序號可入庫 = > */ - - var result = await _fqcApi.GetBarcodeInfoesByBoxNo(boxNo: boxNo); + + var result = await _fqcApi.GetBarcodeInfoesByBoxNo(boxNo: boxNo); if (result.Count() != 0) { var _msg = string.Empty; - - if (recordNumber == null) _msg = "請輸入入庫箱號"; - if (AppSetting.Setting.Location == "9000" || AppSetting.Setting.Location == "0S08") - { - if (recordNumber.Length != 10 || !recordNumber.StartsWith("50000")) - { - _msg = "箱號:" + boxNo + " recordNumber 必須為10碼且為50000開頭,RecordNumber format error
"; - - } - - } - foreach (var item in result) + try { - var FlowStation_result = await _basApi.GetRuleStation(item.StationID); - if (FlowStation_result.Count() != 0) + if (recordNumber == null) _msg = "請輸入recordNumber"; + if (AppSetting.Setting.Location == "9000" || AppSetting.Setting.Location == "0S08") { - var FlowRule_result = await _basApi.GetRuleStationsByFlow(FlowStation_result.Select(s => s.FlowRuleID).First()); - if (FlowRule_result.Count() != 0) + if (recordNumber.Length != 10 || !recordNumber.StartsWith("50000")) { - var LastStationID = FlowRule_result.Where(w => w.StationID != 1000).OrderBy(o => o.Sequence).Select(s => s.StationID).Last(); + _msg = "箱號:" + boxNo + " recordNumber 必須為10碼且為50000開頭,RecordNumber format error
"; - if (item.StationID != LastStationID || item.RuleStatus != "P" || item.StatusID != -1) - { - _msg += "序號【" + item.BarcodeNo + "】,流程尚未完成,不可入庫!
"; - } } - else + + } + foreach (var item in result) + { + //因已到入庫階段有帶出箱號才會進到此判斷,因此判斷流程是否流結束改如下條件 + if (item.RuleStatus != "P" || item.StatusID != -1) { - _msg = "查無序號" + item.BarcodeNo + "目前流程(flowID)"; + _msg += "序號【" + item.BarcodeNo + "】,流程尚未完成,不可入庫!
"; } - } - else - { - _msg = "查無序號" + item.BarcodeNo + "目前流程(rule_station_ID)"; + //var FlowStation_result = await _basApi.GetRuleStation(item.StationID); + //if (FlowStation_result.Count() != 0) + //{ + // var FlowRule_result = await _basApi.GetRuleStationsByFlow(FlowStation_result.Select(s => s.FlowRuleID).First()); + // if (FlowRule_result.Count() != 0) + // { + // var LastStationID = FlowRule_result.Where(w => w.StationID != 1000).OrderBy(o => o.Sequence).Select(s => s.StationID).Last(); + + // if (item.StationID != LastStationID || item.RuleStatus != "P" || item.StatusID != -1) + // { + // _msg += "序號【" + item.BarcodeNo + "】,流程尚未完成,不可入庫!
"; + // } + // } + // else + // { + // _msg = "查無序號" + item.BarcodeNo + "目前流程(flowID)"; + // } + //} + + //else + //{ + // _msg = "查無序號" + item.BarcodeNo + "目前流程(rule_station_ID)"; + //} } - } - if (_msg == string.Empty) - { - - var FlowRules_result = await _basApi.GetFlowRulesByUnit("W"); - if (FlowRules_result.Count() != 0) + if (_msg == string.Empty) { - var FlowRuleID = FlowRules_result.Select(s => s.FlowRuleID).First(); - var ruleStations_result = await GetRuleStationByFlowRuleID(FlowRuleID); - var StationID = ruleStations_result.Select(s => s.StationID).First(); + var FlowRules_result = await _basApi.GetFlowRulesByUnit("W"); + if (FlowRules_result.Count() != 0) + { + var FlowRuleID = FlowRules_result.Select(s => s.FlowRuleID).First(); + var ruleStations_result = await GetRuleStationByFlowRuleID(FlowRuleID); + if (ruleStations_result.Count() != 0) + { + var StationID = ruleStations_result.Select(s => s.StationID).First(); - var Wipinfo_result = await _pcsApi.GetWipInfo(result.Select(s => s.WipID).First()); - var Wipinfo_LineID = Wipinfo_result.Select(s => s.LineID).First(); //lineid - var WipAtt_result = await _pcsApi.GetWipAtt(Wipinfo_result.Select(s => s.WipNO).First()); //料號 - var Userinfo_result = await _sysApi.GetUserInfo(GetLogInUserID()); + var Wipinfo_result = await _pcsApi.GetWipInfo(result.Select(s => s.WipID).First()); + var Wipinfo_LineID = Wipinfo_result.Select(s => s.LineID).First(); //lineid + var WipAtt_result = await _pcsApi.GetWipAtt(Wipinfo_result.Select(s => s.WipNO).First()); //料號 + var Userinfo_result = await _sysApi.GetUserInfo(GetLogInUserID()); - List PTD101AMESModels = new List(); - foreach (var item in result) - { - BarcodeInfo barcodeInfo = new BarcodeInfo - { - BarcodeID = item.BarcodeID, - BarcodeNo = item.BarcodeNo, - StatusNo = item.StatusNo, - StationID = StationID, - RuleStatus = "P",//F 不良 - BoxNo = item.BoxNo, - WipID = item.WipID, - StatusID = -1, - CreateUserID = item.CreateUserID, - CreateDate = item.CreateDate, - UpdateDate = System.DateTime.Now + List PTD101AMESModels = new List(); + foreach (var item in result) + { + BarcodeInfo barcodeInfo = new BarcodeInfo + { + BarcodeID = item.BarcodeID, + BarcodeNo = item.BarcodeNo, + StatusNo = item.StatusNo, + StationID = StationID, + RuleStatus = "P",//F 不良 + BoxNo = item.BoxNo, + WipID = item.WipID, + StatusID = -1, + CreateUserID = item.CreateUserID, + CreateDate = item.CreateDate, + UpdateDate = System.DateTime.Now + + + }; + + var resultPutBInfo = await _pcsApi.PutBarcodeInfoes(JsonConvert.SerializeObject(barcodeInfo)); + if (!resultPutBInfo.Success) + { + _msg = resultPutBInfo.Msg; + return new Result() { success = false, msg = _msg }; + } - }; + var barcodeStations = new BarcodeStation + { + BarcodeID = item.BarcodeID, + WipID = item.WipID, + StationID = StationID, + FlowRuleID = FlowRuleID, + RuleStatus = "P", + InputDate = DateTime.Now, + LineId = (int)Wipinfo_LineID, + CreateUserID = item.CreateUserID, + GetRuleStation = new RuleStation + { + //RuleStationID = RuleStationID, + //FlowRuleID = "", + //StationID ="", + //StationDescl + //Sequence="", + //StationType = "", + //CreateUserId =item.CreateUserID, + //CreateDate = DateTime.Now, + //UpdateDate = DateTime.Now + + + } + }; + var resultPoutBStation = await _pcsApi.PostBarcodeStation(JsonConvert.SerializeObject(barcodeStations)); + if (!resultPoutBStation.Success) + { + _msg = resultPoutBStation.Msg; + return new Result() { success = false, msg = _msg }; + } - await _pcsApi.PutBarcodeInfoes(JsonConvert.SerializeObject(barcodeInfo)); - var barcodeStations = new BarcodeStation - { - BarcodeID = item.BarcodeID, - WipID = item.WipID, - StationID = StationID, - FlowRuleID = FlowRuleID, - RuleStatus = "P", - InputDate = DateTime.Now, - LineId = (int)Wipinfo_LineID, - CreateUserID = item.CreateUserID, - GetRuleStation = new RuleStation - { - //RuleStationID = RuleStationID, - //FlowRuleID = "", - //StationID ="", - //StationDescl - //Sequence="", - //StationType = "", - //CreateUserId =item.CreateUserID, - //CreateDate = DateTime.Now, - //UpdateDate = DateTime.Now + PTD101AMESModels.Add(new PTD101AMESModel + { + FQCID = InhouseNo, + SSN = item.ExtraBarcodeNo, + ISN = item.BarcodeNo, + RecordNumber = recordNumber, + PN = WipAtt_result.ItemNO, + EmpID = Userinfo_result.Select(s => s.UserNo).FirstOrDefault(), + Location = AppSetting.Setting.Location - } - }; - await _pcsApi.PostBarcodeStation(JsonConvert.SerializeObject(barcodeStations)); + }); + } - PTD101AMESModels.Add(new PTD101AMESModel - { - FQCID = InhouseNo, - SSN = item.ExtraBarcodeNo, - ISN = item.BarcodeNo, - RecordNumber = recordNumber, - PN = WipAtt_result.ItemNO, - EmpID = Userinfo_result.Select(s => s.UserNo).FirstOrDefault(), - Location = AppSetting.Setting.Location + var Warehouseing = new WareHouseing + { + InhouseNo = InhouseNo, + SeqID = seq, + SerialNo = boxNo, + Serial_Type = "B", + RecordNumber = recordNumber, + Create_UserID = Userinfo_result.Select(s => s.UserID).FirstOrDefault(), + Create_Date = DateTime.Now + }; + var resultPostWH = await _pcsApi.PostWareHouseing(JsonConvert.SerializeObject(Warehouseing)); + if (!resultPostWH.Success) + { + _msg = resultPostWH.Msg; + return new Result() { success = false, msg = _msg }; + } - }); + var resultPTD101AMES = await _pcsApi.PostPTD101AMES(JsonConvert.SerializeObject(PTD101AMESModels)); - } + } + else + { + _msg = "入庫代碼(W)查無設定站別"; + } - var Warehouseing = new WareHouseing + } + else { - InhouseNo = InhouseNo, - SeqID = seq, - SerialNo = boxNo, - Serial_Type = "B", - RecordNumber = recordNumber, - Create_UserID = Userinfo_result.Select(s => s.UserID).FirstOrDefault(), - Create_Date = DateTime.Now - }; - - await _pcsApi.PostWareHouseing(JsonConvert.SerializeObject(Warehouseing)); - // await _pcsApi.PostPTD101AMES(JsonConvert.SerializeObject(PTD101AMESModels)); - + _msg = "查無入庫代碼(W)"; + } + if (_msg == string.Empty) + { + //執行入庫作業 + return new Result() { success = true, msg = "入庫完成" }; + } + else + { + return new Result() { success = false, msg = _msg }; + } } else { - _msg = "查無入庫代碼(W)"; + return new Result() { success = false, msg = _msg }; } - - - - //執行入庫作業 - return new Result() { success = true, msg = "入庫完成" }; } - else + catch (Exception ex) { + _msg = ex.ToString(); return new Result() { success = false, msg = _msg }; } - } else { return new Result() { success = false, msg = "NO SN DATA" }; } - + + } diff --git a/AMESCoreStudio.Web/Controllers/SPCController.cs b/AMESCoreStudio.Web/Controllers/SPCController.cs index 7cde4d79..95fa5688 100644 --- a/AMESCoreStudio.Web/Controllers/SPCController.cs +++ b/AMESCoreStudio.Web/Controllers/SPCController.cs @@ -729,7 +729,7 @@ namespace AMESCoreStudio.Web.Controllers [ResponseCache(Duration = 0)] [HttpGet] - public async Task GetInspectionResultMastersByQueryAsync(string WipNo, string ItemNo, string BarcodeNo) + public async Task GetInspectionResultMastersByQueryAsync(string WipNo, string ItemNo, string BarcodeNo,string Status_No) { @@ -739,7 +739,8 @@ namespace AMESCoreStudio.Web.Controllers ItemNo = " "; if (string.IsNullOrWhiteSpace(BarcodeNo)) BarcodeNo = " "; - + // if (string.IsNullOrWhiteSpace(Status_No)) + // Status_No = " "; var result = await _spcApi.GetInspectionResultMastersByQuery(WipNo, ItemNo, BarcodeNo, "C"); @@ -751,7 +752,7 @@ namespace AMESCoreStudio.Web.Controllers return Json(new Table() { count = 0, data = null }); } - public async Task GetInspectionResultDetailQueryAsync(int id ,string Line,string RuleStation) + public async Task GetInspectionResultDetailQueryAsync(int id ,string Line,string RuleStation,string InspectionResult) { var result = await _spcApi.GetInspectionResultDetailQuery(id); @@ -760,6 +761,8 @@ namespace AMESCoreStudio.Web.Controllers result = result.Where(w => w.Line == Line).ToList(); if (RuleStation != "0") result = result.Where(w => w.RuleStation == RuleStation).ToList(); + if (InspectionResult != "0") + result = result.Where(w => w.InspectionResult == InspectionResult).ToList(); if (result.Count > 0) { @@ -1138,6 +1141,29 @@ namespace AMESCoreStudio.Web.Controllers return Json(new Table() { count = 0, data = null }); } + + + public async Task GetInspectionResultDetailsAndBolbAsync(int id) + { + var result = await _spcApi.GetInspectionResultDetails(id); + + if (result.Count > 0) + { + foreach (var item in result) + { + var Bolbresult= await _spcApi.GetInspectionResultBlobsByQuery(item.InspectionID, item.InspectionItemID); + item.RuleStationID = Bolbresult.Count(); + } + return Json(new Table() { code = 0, msg = "", data = result, count = result.Count }); + + } + + return Json(new Table() { count = 0, data = null }); + } + + + + public async Task GetWipAttAsync(string id) { diff --git a/AMESCoreStudio.Web/Controllers/WHSController.cs b/AMESCoreStudio.Web/Controllers/WHSController.cs index 29a6f469..cbad2928 100644 --- a/AMESCoreStudio.Web/Controllers/WHSController.cs +++ b/AMESCoreStudio.Web/Controllers/WHSController.cs @@ -495,14 +495,15 @@ namespace AMESCoreStudio.Web.Controllers return View(); } //新增頁面 - public async Task WHS003C(string unit,string lineID) + public async Task WHS003C() { - await GetStationListByUnit(unit); - var result = await _basApi.GetFactoryUnit(unit); + // await GetStationListByUnit(unit); + await GetFactoryUnitsList(); + // var result = await _basApi.GetFactoryUnit(unit); //await GetMFGType(); - ViewBag.LineID = lineID; - ViewBag.UnitNo = unit; - ViewBag.FactoryU = result[0].UnitName; + // ViewBag.LineID = lineID; + // ViewBag.UnitNo = unit; + // ViewBag.FactoryU = result[0].UnitName; GetSideList(); return View(); } diff --git a/AMESCoreStudio.Web/Views/BAS/BAS013.cshtml b/AMESCoreStudio.Web/Views/BAS/BAS013.cshtml index aa42ac94..ab772da6 100644 --- a/AMESCoreStudio.Web/Views/BAS/BAS013.cshtml +++ b/AMESCoreStudio.Web/Views/BAS/BAS013.cshtml @@ -62,7 +62,7 @@ }, { field: 'time', - title: '燒機時間' + title: '燒機時間(小時)' }, { field: 'runinSoftware', diff --git a/AMESCoreStudio.Web/Views/BAS/BAS019C.cshtml b/AMESCoreStudio.Web/Views/BAS/BAS019C.cshtml index c827610e..a061933e 100644 --- a/AMESCoreStudio.Web/Views/BAS/BAS019C.cshtml +++ b/AMESCoreStudio.Web/Views/BAS/BAS019C.cshtml @@ -43,6 +43,10 @@ + + + + diff --git a/AMESCoreStudio.Web/Views/SPC/SPC004.cshtml b/AMESCoreStudio.Web/Views/SPC/SPC004.cshtml index 658e7fbc..96e7b2c2 100644 --- a/AMESCoreStudio.Web/Views/SPC/SPC004.cshtml +++ b/AMESCoreStudio.Web/Views/SPC/SPC004.cshtml @@ -26,14 +26,16 @@ - -
+
+
+
+
@@ -43,8 +45,6 @@
- -
@@ -55,6 +55,19 @@
+
+ +
+ +
+
+ +
-
+ @section Scripts{ diff --git a/AMESCoreStudio.Web/Views/SPC/SPC005.cshtml b/AMESCoreStudio.Web/Views/SPC/SPC005.cshtml index 95420d24..92938d50 100644 --- a/AMESCoreStudio.Web/Views/SPC/SPC005.cshtml +++ b/AMESCoreStudio.Web/Views/SPC/SPC005.cshtml @@ -41,8 +41,7 @@ - -
+
@@ -51,27 +50,25 @@
+
-
-
-
-
- -
- -
-
-
- -
+ +
+ +
+ +
+
+
+
-
+
+
- +
+
+ +
-
@@ -128,23 +131,21 @@ @*缺失人員*@ - + + @* *@ @*備註*@ @*線別*@ @*站別*@ @*插件位置*@ @*缺失單位*@ @*缺失人員*@ + @* + + + *@ diff --git a/AMESCoreStudio.Web/Views/SPC/SPC005V.cshtml b/AMESCoreStudio.Web/Views/SPC/SPC005V.cshtml index f83f9970..fe9bfd36 100644 --- a/AMESCoreStudio.Web/Views/SPC/SPC005V.cshtml +++ b/AMESCoreStudio.Web/Views/SPC/SPC005V.cshtml @@ -101,7 +101,7 @@ var formID = $("#InspectionID").val(); table.render({ elem: '#test', - url: '/SPC/GetInspectionResultDetails?id=' + formID, + url: '/SPC/GetInspectionResultDetailsandBolb?id=' + formID, id: 'test', toolbar: '#toolBar', //height:720, @@ -136,11 +136,17 @@ { field: 'missingRemark', title: '備註', width: 250, align: "left"},//templet: '#inputTest' { field: 'right', - width: 100, + width: 120, title: '操作', fixed: 'right', templet: function (d) { - return '檢視文件 ' + // return '檢視文件 ' + + var btn = '檢視文件 '; + if (d.ruleStationID > 0) + btn = btn + ' '; + return btn; + } } ]], diff --git a/AMESCoreStudio.Web/Views/WHS/WHS003.cshtml b/AMESCoreStudio.Web/Views/WHS/WHS003.cshtml index d3802ec5..7eaa6e58 100644 --- a/AMESCoreStudio.Web/Views/WHS/WHS003.cshtml +++ b/AMESCoreStudio.Web/Views/WHS/WHS003.cshtml @@ -204,13 +204,13 @@ hg.msghide("刷新数据!"); tt(); }); - //新增 - $('#btnAdd').click(function () { + //此段取消 + $('#btnAdd1').click(function () { var unit = $("#unitNo").val(); var lineID = $('#lineID').val(); if (unit != 0) { if (lineID != -99) { - hg.open('新增標準工時', '/WHS/WHS003C?unit=' + unit + "&lineID=" + lineID, 480, 480); + hg.open('新增標準工時', '/WHS/WHS003C', 480, 480); } else { alert("請選擇線別!!"); @@ -223,6 +223,12 @@ }); + $('#btnAdd').click(function () { + hg.open('新增標準工時', '/WHS/WHS003C', 480, 480); + + }); + + var table; $(function () { tt(); diff --git a/AMESCoreStudio.Web/Views/WHS/WHS003C.cshtml b/AMESCoreStudio.Web/Views/WHS/WHS003C.cshtml index fc7120fc..6e856c43 100644 --- a/AMESCoreStudio.Web/Views/WHS/WHS003C.cshtml +++ b/AMESCoreStudio.Web/Views/WHS/WHS003C.cshtml @@ -16,8 +16,6 @@
- - @@ -29,12 +27,25 @@
- - + + + +
+
+ + +
- +
@@ -87,6 +98,72 @@ parent.hg.msg(error); } }); + + $("#UnitNo").change(function () { + var data = $("#UnitNo").val(); + getLineInfoes(data); + getStations(data); + + }); + + function getLineInfoes(data) { + $.ajax({ + url: "/BAS/GetLineInfoByUnit", + dataType: 'json', + data: { id: data }, + contentType: "application/json", + type: 'get', + success: function (result) { + if (result.data) { + $("#LineID").empty();//清空下拉框的值 + $('#LineID').append(new Option("全部", "-99"));// 下拉選單裡新增元素 + $.each(result.data, function (index, item) { + $('#LineID').append(new Option(item.lineDesc, item.lineID));// 下拉選單裡新增元素 + }); + } + else { + $("#LineID").empty();//清空下拉框的值 + $('#LineID').append(new Option("無選項", "-99"));// 下拉選單裡新增元素 + } + layui.form.render("select");//重新渲染 固定寫法 + } + }); + }; + + + function getStations(data) { + $.ajax({ + url: "/BAS/GetStationses", + dataType: 'json', + contentType: "application/json", + type: 'get', + success: function (result) { + if (result.data) { + $("#StationID").empty(); + $('#StationID').append(new Option("請選擇", "")); + $('#StationID').append(new Option("N/A", "-1")); + var count = 0; + $.each(result.data, function (index, item) { + if (item.unitNo == data) { + $('#StationID').append(new Option(item.stationName, item.stationID)); + count = count + 1; + } + }); + if (count == 0) { + $("#StationID").empty(); + $('#StationID').append(new Option("無選項", "")); + } + } + else { + $("#StationID").empty(); + $('#StationID').append(new Option("無選項", "")); + } + layui.form.render("select"); + } + }); + }; + + diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/InspectionResultMastersController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/InspectionResultMastersController.cs index 3a485643..6f32b2f8 100644 --- a/AMESCoreStudio.WebApi/Controllers/AMES/InspectionResultMastersController.cs +++ b/AMESCoreStudio.WebApi/Controllers/AMES/InspectionResultMastersController.cs @@ -192,7 +192,12 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES } result.Data = await q.ToListAsync(); - + result.Data = result.Data.Select(s => + { + s.StatusNo = s.StatusNo == "C" ? "保存" : "暫存"; + + return s; + }).ToList(); if (result == null) { diff --git a/AMESCoreStudio.WebApi/Models/AMES/InspectionForm.cs b/AMESCoreStudio.WebApi/Models/AMES/InspectionForm.cs index 3d3b1e26..9558febe 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/InspectionForm.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/InspectionForm.cs @@ -34,7 +34,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES /// [Column("INSPECTION_NAME")] - [StringLength(10)] + [StringLength(100)] [Display(Name = "巡檢表單名稱")] [DataMember] [Required(ErrorMessage = "{0},不能空白")] diff --git a/AMESCoreStudio.WebApi/Models/AMES/InspectionResultMaster.cs b/AMESCoreStudio.WebApi/Models/AMES/InspectionResultMaster.cs index 778518e1..d7632da0 100644 --- a/AMESCoreStudio.WebApi/Models/AMES/InspectionResultMaster.cs +++ b/AMESCoreStudio.WebApi/Models/AMES/InspectionResultMaster.cs @@ -35,7 +35,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES [StringLength(30)] [Display(Name = "生產序號")] [DataMember] - [Required(ErrorMessage = "{0},不能空白")] + // [Required(ErrorMessage = "{0},不能空白")] YIRU modify 改為可以空白 系統自行卡關 工單號與生產序號可二擇一輸入 public string BarcodeNo { get; set; } /// @@ -45,7 +45,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES [StringLength(30)] [Display(Name = "工單號碼")] [DataMember] - [Required(ErrorMessage = "{0},不能空白")] + //[Required(ErrorMessage = "{0},不能空白")] YIRU modify 改為可以空白 系統自行卡關 工單號與生產序號可二擇一輸入 public string WipNo { get; set; } /// @@ -55,7 +55,7 @@ namespace AMESCoreStudio.WebApi.Models.AMES [StringLength(20)] [Display(Name = "料號")] [DataMember] - [Required(ErrorMessage = "{0},不能空白")] + // [Required(ErrorMessage = "{0},不能空白")] public string ItemNo { get; set; } /// diff --git a/AMESCoreStudio.WebApi/Models/BAS/RuninTime.cs b/AMESCoreStudio.WebApi/Models/BAS/RuninTime.cs index c77b189f..7c9a3afd 100644 --- a/AMESCoreStudio.WebApi/Models/BAS/RuninTime.cs +++ b/AMESCoreStudio.WebApi/Models/BAS/RuninTime.cs @@ -57,7 +57,7 @@ namespace AMESCoreStudio.WebApi.Models.BAS [Column("RUNIN_TIME")] [DataMember] [Required(ErrorMessage = "{0},不能空白")] - [Display(Name = "燒機時間")] + [Display(Name = "燒機時間(小時)")] public int Time { get; set; } ///