|
|
@ -45,19 +45,13 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
|
|
|
|
|
var BarcodeItems = await q.ToListAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var data in BarcodeItems) |
|
|
|
{ |
|
|
|
data.B = _context.BarcodeInfoes.Find(data.BarcodeID); |
|
|
|
data.I = _context.Items.Find(data.ItemNo); |
|
|
|
data.S = _context.RuleStations.Find(data.StationID); |
|
|
|
data.S = _context.Stationses.Find(data.StationID); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return BarcodeItems; |
|
|
|
//return await _context.BarcodeItems.ToListAsync();
|
|
|
|
} |
|
|
@ -103,7 +97,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
|
{ |
|
|
|
data.B = _context.BarcodeInfoes.Find(data.BarcodeID); |
|
|
|
data.I = _context.Items.Find(data.ItemNo); |
|
|
|
data.S = _context.RuleStations.Find(data.StationID); |
|
|
|
data.S = _context.Stationses.Find(data.StationID); |
|
|
|
} |
|
|
|
|
|
|
|
if (barcodeItem == null) |
|
|
@ -138,7 +132,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
|
//data.Serial = i + 1;
|
|
|
|
data.B = _context.BarcodeInfoes.Find(data.BarcodeID); |
|
|
|
data.I = _context.Items.Find(data.ItemNo); |
|
|
|
data.S = _context.RuleStations.Find(data.StationID); |
|
|
|
data.S = _context.Stationses.Find(data.StationID); |
|
|
|
} |
|
|
|
|
|
|
|
if (barcodeItem == null) |
|
|
@ -165,7 +159,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
|
if (id != "0") |
|
|
|
{ |
|
|
|
//製程單位
|
|
|
|
q = q.Where(p => p.S.Station.UnitNo.Equals(id)); |
|
|
|
q = q.Where(p => p.S.UnitNo.Equals(id)); |
|
|
|
} |
|
|
|
//內部條碼
|
|
|
|
q = q.Where(p => p.B.BarcodeNo.Equals(str)); |
|
|
@ -176,7 +170,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
|
//data.Serial = i + 1;
|
|
|
|
data.B = _context.BarcodeInfoes.Find(data.BarcodeID); |
|
|
|
data.I = _context.Items.Find(data.ItemNo); |
|
|
|
data.S = _context.RuleStations.Find(data.StationID); |
|
|
|
data.S = _context.Stationses.Find(data.StationID); |
|
|
|
} |
|
|
|
|
|
|
|
if (barcodeItem == null) |
|
|
@ -343,8 +337,6 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
|
q = q.Where(w => w.ItemNo == KPItemNo).ToList(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 紀錄筆數
|
|
|
|
result.DataTotal = q.Count(); |
|
|
|
|
|
|
|