|
@ -5804,6 +5804,8 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
// 工單流程ID 取站別
|
|
|
// 工單流程ID 取站別
|
|
|
var ruleStations = await GetRuleStationByFlowRuleID(model.FlowRuleID); |
|
|
var ruleStations = await GetRuleStationByFlowRuleID(model.FlowRuleID); |
|
|
if (model.Station != 0) |
|
|
if (model.Station != 0) |
|
|
|
|
|
{ |
|
|
|
|
|
if (ruleStations.Where(w => w.StationID == model.Station).Any()) |
|
|
{ |
|
|
{ |
|
|
model.RuleStation = ruleStations.Where(w => w.StationID == model.Station).FirstOrDefault().RuleStationID; |
|
|
model.RuleStation = ruleStations.Where(w => w.StationID == model.Station).FirstOrDefault().RuleStationID; |
|
|
model.StationTypeNo = ruleStations.Where(w => w.StationID == model.Station).FirstOrDefault().Station.TypeNo; |
|
|
model.StationTypeNo = ruleStations.Where(w => w.StationID == model.Station).FirstOrDefault().Station.TypeNo; |
|
@ -5814,6 +5816,13 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
model.StationTypeNo = ruleStations.FirstOrDefault().Station.TypeNo; |
|
|
model.StationTypeNo = ruleStations.FirstOrDefault().Station.TypeNo; |
|
|
model.Station = ruleStations.FirstOrDefault().StationID; |
|
|
model.Station = ruleStations.FirstOrDefault().StationID; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
model.RuleStation = ruleStations.FirstOrDefault().RuleStationID; |
|
|
|
|
|
model.StationTypeNo = ruleStations.FirstOrDefault().Station.TypeNo; |
|
|
|
|
|
model.Station = ruleStations.FirstOrDefault().StationID; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 工單已刷數量
|
|
|
// 工單已刷數量
|
|
|
model.InputQTY = await _pcsApi.GetBarcodeStationByInputQty(model.WipID, model.Station); |
|
|
model.InputQTY = await _pcsApi.GetBarcodeStationByInputQty(model.WipID, model.Station); |
|
@ -6910,7 +6919,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
var result_BarcodeInfo = await _pcsApi.GetBarcodeInfoesByWipNo(model.WipNo.Trim().ToUpper()); |
|
|
var result_BarcodeInfo = await _pcsApi.GetBarcodeInfoesByWipNo(model.WipNo.Trim().ToUpper()); |
|
|
if (model.Type == "P") |
|
|
if (model.Type == "P") |
|
|
{ |
|
|
{ |
|
|
var put_BarcodeInfo = result_BarcodeInfo.Where(w => w.StationID == model.GoByStation).ToList(); |
|
|
var put_BarcodeInfo = result_BarcodeInfo.Where(w => w.StationID == model.GoByStation && w.StatusNo != "-1").ToList(); |
|
|
put_BarcodeInfo = put_BarcodeInfo.Select(s => { s.StationID = model.RetrueStation; return s; }).ToList(); |
|
|
put_BarcodeInfo = put_BarcodeInfo.Select(s => { s.StationID = model.RetrueStation; return s; }).ToList(); |
|
|
foreach (var item in put_BarcodeInfo) |
|
|
foreach (var item in put_BarcodeInfo) |
|
|
{ |
|
|
{ |
|
@ -6924,7 +6933,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
var goByStations = result_RuleStation.Where(w => w.Sequence >= goBySequence).Select(s => s.StationID).ToList(); |
|
|
var goByStations = result_RuleStation.Where(w => w.Sequence >= goBySequence).Select(s => s.StationID).ToList(); |
|
|
foreach (var Station in goByStations) |
|
|
foreach (var Station in goByStations) |
|
|
{ |
|
|
{ |
|
|
var put_BarcodeInfo = result_BarcodeInfo.Where(w => w.StationID == Station).ToList(); |
|
|
var put_BarcodeInfo = result_BarcodeInfo.Where(w => w.StationID == Station && w.StatusNo != "-1").ToList(); |
|
|
put_BarcodeInfo = put_BarcodeInfo.Select(s => { s.StationID = model.RetrueStation; return s; }).ToList(); |
|
|
put_BarcodeInfo = put_BarcodeInfo.Select(s => { s.StationID = model.RetrueStation; return s; }).ToList(); |
|
|
foreach (var item in put_BarcodeInfo) |
|
|
foreach (var item in put_BarcodeInfo) |
|
|
{ |
|
|
{ |
|
|