|
|
@ -3468,7 +3468,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
{ |
|
|
|
|
|
|
|
model.MaterialStationsItems = await _pcsApi.GetMaterialStationsItemByItemID(model.MaterialItem.ItemID); |
|
|
|
model.MaterialStationsItems = model.MaterialStationsItems.Where(w => w.RuleStationID == model.RuleStation).ToList(); |
|
|
|
model.MaterialStationsItems = model.MaterialStationsItems.Where(w => w.RuleStationID == model.RuleStation).OrderBy(o => o.StationsItemSeq).ToList(); |
|
|
|
if (model.MaterialStationsItems.Count() == 0) |
|
|
|
{ |
|
|
|
ModelState.AddModelError("error", "找不到該站別作業工項"); |
|
|
@ -3538,7 +3538,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
var Kp = model.Inputs.Where(w => !w.Input.Contains("$")).ToList(); // 撈非不良代碼 = 組件序號
|
|
|
|
var Kp = model.Inputs.Where(w => !w.Contains("$")).ToList(); // 撈非不良代碼 = 組件序號
|
|
|
|
var q = await _pcsApi.GetBarCodeFromWip(model.Input); |
|
|
|
// 判斷是否用內部序號有對應到工單號碼,沒對應到視為組件或不良代碼
|
|
|
|
if (q.Success) |
|
|
@ -3569,7 +3569,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
model.StationSEQ = RuleStations.Where(w => w.StationID == model.Station).Select(s => s.Sequence).FirstOrDefault(); |
|
|
|
} |
|
|
|
// 判斷是否有$符號,代表有不良代碼
|
|
|
|
if (model.Inputs.Where(w => w.Input.Contains("$")).Any()) |
|
|
|
if (model.Inputs.Where(w => w.Contains("$")).Any()) |
|
|
|
{ |
|
|
|
model.BarcodeNG = true; |
|
|
|
// 判斷是否為投入站,投入站不能刷不良
|
|
|
@ -3618,12 +3618,12 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
} |
|
|
|
keyParts.Add(new BarCodeCheckDto.inputItem |
|
|
|
{ |
|
|
|
inputType = KeyPartItem.Input.Contains("$") ? "NG" : model.WipKps[i + KpItemQty].KpNo, |
|
|
|
inputData = KeyPartItem.Input, |
|
|
|
oldInputData = KeyPartItem.InputNo |
|
|
|
inputType = KeyPartItem.Contains("$") ? "NG" : model.WipKps[i + KpItemQty].KpNo, |
|
|
|
inputData = KeyPartItem, |
|
|
|
//oldInputData = KeyPartItem.InputNo
|
|
|
|
}); |
|
|
|
|
|
|
|
if (!KeyPartItem.Input.Contains("$")) |
|
|
|
if (!KeyPartItem.Contains("$")) |
|
|
|
i += 1; |
|
|
|
} |
|
|
|
|
|
|
|