This commit is contained in:
gcw_MV9p2JJN 2026-01-27 15:29:27 +08:00
parent 1657e8e453
commit d44b94795e

View File

@ -196,6 +196,23 @@ namespace RIZO.Service.PLCBackground.Stations
}
}
//12 最大重复入站次数
int MaxRepeatEntries = processOperations.Where(operation => operation.OperationCode == workstationCode).Select(operation => operation.MaxStationCount??1).First();
if(MaxRepeatEntries>1)
{
int currentStationEntryCount = await Context.Queryable<ProductPassStationRecord>()
.Where(it => it.ProductSN == productSN)
.Where(it => it.OperationCode == workstationCode)
.Where(it => it.PasstationType == 1)
.CountAsync();
if(currentStationEntryCount >= MaxRepeatEntries)
{
result = EntryPermissionResult.MaximumRepeatedEntries;
goto InsertPassrecord;
}
}
//OK 准许进站
result = EntryPermissionResult.AllowIntoStation;
goto InsertPassrecord;
@ -252,7 +269,9 @@ namespace RIZO.Service.PLCBackground.Stations
//0之前工位数据异常
PreviousStationDataAbnormal = 0,
//11 未知异常
UnkownException = 11
UnkownException = 11,
//12 最大重复入站次数
MaximumRepeatedEntries = 12
}
}