|
|
@ -236,7 +236,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
|
// 查詢工單號碼
|
|
|
|
if (!string.IsNullOrWhiteSpace(wipNo)) |
|
|
|
{ |
|
|
|
var wipID = _context.WipInfos.Where(w => w.WipNO == wipNo.Trim().ToUpper()).Select(s => s.WipID).ToList(); |
|
|
|
var wipID = _context.WipInfos.Where(w => w.WipNO == wipNo.Trim().ToUpper() && w.StatusNO != "E").Select(s => s.WipID).ToList(); |
|
|
|
barcodeInfos = await _context.BarcodeInfoes.Where(w => wipID.Contains(w.WipID)).ToListAsync(); |
|
|
|
} |
|
|
|
// 查詢料號
|
|
|
@ -247,7 +247,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
|
barcodeInfos = await _context.BarcodeInfoes.Where(w => wipID.Contains(w.WipID)).ToListAsync(); |
|
|
|
} |
|
|
|
|
|
|
|
var q = from q1 in barcodeInfos |
|
|
|
var q = from q1 in barcodeInfos.Where(w => w.RuleStatus != "S" && w.GetRuleStation.StationID != 1000) |
|
|
|
join q2 in _context.RuleStations on q1.RuleStationID equals q2.RuleStationID |
|
|
|
join q3 in _context.WipInfos on q1.WipID equals q3.WipID |
|
|
|
join q4 in _context.LineInfoes on q3.LineID equals q4.LineID |
|
|
|