|
@ -1261,7 +1261,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
int wipID = q1.WipID; |
|
|
int wipID = q1.WipID; |
|
|
int flowRuleID = q1.FlowRuleID; |
|
|
int flowRuleID = q1.FlowRuleID; |
|
|
|
|
|
|
|
|
resultModel = (ResultModel<string>)await GetBarCodeLastStopRuleStationID(wipID, BarCodeID, station, flowRuleID); |
|
|
resultModel = (ResultModel<string>)await GetBarCodeLastStopRuleStationID(wipID, BarCodeID, station, flowRuleID, RuleStationID); |
|
|
if (!resultModel.Success) |
|
|
if (!resultModel.Success) |
|
|
return resultModel; |
|
|
return resultModel; |
|
|
|
|
|
|
|
@ -1769,8 +1769,9 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
/// <param name="barCodeID">BarCodeID</param>
|
|
|
/// <param name="barCodeID">BarCodeID</param>
|
|
|
/// <param name="stationID">目前作業站ID</param>
|
|
|
/// <param name="stationID">目前作業站ID</param>
|
|
|
/// <param name="flowRuleID">工單流程ID</param>
|
|
|
/// <param name="flowRuleID">工單流程ID</param>
|
|
|
|
|
|
/// <param name="RuleStationID">目前作業站ID(RuleStation)</param>
|
|
|
/// <returns>true:false</returns>
|
|
|
/// <returns>true:false</returns>
|
|
|
private async Task<IResultModel> GetBarCodeLastStopRuleStationID(int wipID, int barCodeID, int stationID, int flowRuleID) |
|
|
private async Task<IResultModel> GetBarCodeLastStopRuleStationID(int wipID, int barCodeID, int stationID, int flowRuleID, int? RuleStationID) |
|
|
{ |
|
|
{ |
|
|
ResultModel<string> resultModel = new ResultModel<string> { Success = false }; |
|
|
ResultModel<string> resultModel = new ResultModel<string> { Success = false }; |
|
|
WipInfosController wipInfosController = new WipInfosController(_context); |
|
|
WipInfosController wipInfosController = new WipInfosController(_context); |
|
@ -1806,6 +1807,15 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES |
|
|
return resultModel; |
|
|
return resultModel; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else // 防止第一站重複刷入
|
|
|
|
|
|
{ |
|
|
|
|
|
if (_context.BarcodeStation.Where(w => w.BarcodeID == barCodeID |
|
|
|
|
|
&& w.RuleStationID == RuleStationID).Any()) |
|
|
|
|
|
{ |
|
|
|
|
|
resultModel.Msg = "該內部序號已刷過此站"; |
|
|
|
|
|
return resultModel; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
resultModel.Success = true; |
|
|
resultModel.Success = true; |
|
|
return resultModel; |
|
|
return resultModel; |
|
|
} |
|
|
} |
|
|