|
@ -176,26 +176,29 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
burnIn = true; |
|
|
burnIn = true; |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
#region KeyParts 判斷
|
|
|
|
|
|
StationsesController stationsesController = new StationsesController(_context); |
|
|
StationsesController stationsesController = new StationsesController(_context); |
|
|
var station = await stationsesController.GetStations(barCodeCheckDto.stationID); |
|
|
var station = await stationsesController.GetStations(barCodeCheckDto.stationID); |
|
|
if (barCodeCheckDto.inputItems.Where(w => !w.inputType.Contains("NG")).Any()) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
var barcodeItemKPDto = new BarcodeItemKPDto |
|
|
#region KeyParts 判斷
|
|
|
|
|
|
// 不是維修跑KeyParts判斷
|
|
|
|
|
|
if (barCodeCheckDto.barcodeType != "S") |
|
|
|
|
|
{ |
|
|
|
|
|
if (barCodeCheckDto.inputItems.Where(w => !w.inputType.Contains("NG")).Any()) |
|
|
{ |
|
|
{ |
|
|
WipNo = barCodeCheckDto.wipNo, |
|
|
|
|
|
barcode = barCodeCheckDto.barcode, |
|
|
|
|
|
unitNo = barCodeCheckDto.unitNo, |
|
|
|
|
|
ststionUnitNo = station.Value.Where(w => w.StationID == barCodeCheckDto.stationID).FirstOrDefault().UnitNo, |
|
|
|
|
|
inputKP = barCodeCheckDto.inputItems.Where(w => !w.inputType.Contains("NG")).ToList() |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var resultKeyParts = await CheckBarCodeKPAsync(barcodeItemKPDto); |
|
|
var barcodeItemKPDto = new BarcodeItemKPDto |
|
|
if (!resultKeyParts.Success) |
|
|
{ |
|
|
return (ResultModel<string>)resultKeyParts; |
|
|
WipNo = barCodeCheckDto.wipNo, |
|
|
//else
|
|
|
barcode = barCodeCheckDto.barcode, |
|
|
// barCodeCheckDto.extNo = resultKeyParts.Msg;
|
|
|
unitNo = barCodeCheckDto.unitNo, |
|
|
|
|
|
ststionUnitNo = station.Value.Where(w => w.StationID == barCodeCheckDto.stationID).FirstOrDefault().UnitNo, |
|
|
|
|
|
inputKP = barCodeCheckDto.inputItems.Where(w => !w.inputType.Contains("NG")).ToList() |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var resultKeyParts = await CheckBarCodeKPAsync(barcodeItemKPDto); |
|
|
|
|
|
if (!resultKeyParts.Success) |
|
|
|
|
|
return (ResultModel<string>)resultKeyParts; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
@ -342,13 +345,17 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
ItemNo = barCodeItem.ItemNo, |
|
|
ItemNo = barCodeItem.ItemNo, |
|
|
PartNoOld = KPs.oldInputData, |
|
|
PartNoOld = KPs.oldInputData, |
|
|
ChangeType = "RP", |
|
|
ChangeType = "RP", |
|
|
KpItemNo = KPs.inputData |
|
|
KpItemNo = KPs.inputData, |
|
|
|
|
|
CreateUserID = barCodeCheckDto.userID |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(resultModel.Msg)) |
|
|
if (!string.IsNullOrWhiteSpace(resultModel.Msg)) |
|
|
return resultModel; |
|
|
return resultModel; |
|
|
|
|
|
|
|
|
|
|
|
// 將InputItem清空
|
|
|
|
|
|
barCodeCheckDto.inputItems = new List<BarCodeCheckDto.inputItem>(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//var NextStopCloseStation = await CheckNextStopCloseStation(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.station);
|
|
|
//var NextStopCloseStation = await CheckNextStopCloseStation(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.station);
|
|
@ -1879,8 +1886,12 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
if (!string.IsNullOrWhiteSpace(barcodeKPDtoItem.inputType)) |
|
|
if (!string.IsNullOrWhiteSpace(barcodeKPDtoItem.inputType)) |
|
|
{ |
|
|
{ |
|
|
wipKpsItem = wipKps.Where(w => w.KpNo == barcodeKPDtoItem.inputType).FirstOrDefault(); |
|
|
wipKpsItem = wipKps.Where(w => w.KpNo == barcodeKPDtoItem.inputType).FirstOrDefault(); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (wipKpsItem != null) |
|
|
|
|
|
{ |
|
|
|
|
|
wipKpsItem = wipKps[x + i]; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#region 比對序號長度是否正確
|
|
|
#region 比對序號長度是否正確
|
|
|
if (!string.IsNullOrWhiteSpace(wipKpsItem.Length.ToString())) |
|
|
if (!string.IsNullOrWhiteSpace(wipKpsItem.Length.ToString())) |
|
|