|
@ -2201,11 +2201,16 @@ select * from |
|
|
retObj.ProductLine = plStr; |
|
|
retObj.ProductLine = plStr; |
|
|
retObj.ConfigMinutes = _configuration[$"ConfigDic:ProductLineTimeoutRemind_New:{plStr}"].TryToInt() ?? 30; |
|
|
retObj.ConfigMinutes = _configuration[$"ConfigDic:ProductLineTimeoutRemind_New:{plStr}"].TryToInt() ?? 30; |
|
|
|
|
|
|
|
|
int maxSN2= await _waitPrintRepository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.HostSN2); |
|
|
var qry = _waitPrintRepository.Where(itm => itm.ProductLine == plStr); |
|
|
WaitPrint lastitem = await _waitPrintRepository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.HostSN2 == maxSN2); |
|
|
bool hasData = await qry.AnyAsync(); |
|
|
|
|
|
|
|
|
var cache = _timeoutCacheList.FirstOrDefault(itm => itm.ProductLine == plStr); |
|
|
var cache = _timeoutCacheList.FirstOrDefault(itm => itm.ProductLine == plStr); |
|
|
if (lastitem != null) //未打印表有数据
|
|
|
if (hasData) //未打印表有数据
|
|
|
{ |
|
|
{ |
|
|
|
|
|
int maxSN2 = await qry.MaxAsync(itm => itm.HostSN2); |
|
|
|
|
|
WaitPrint lastitem = await _waitPrintRepository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.HostSN2 == maxSN2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
retObj.LastReceiveTime = lastitem.ReceiveTime ?? ServerHelper.CurrentDateTime; |
|
|
retObj.LastReceiveTime = lastitem.ReceiveTime ?? ServerHelper.CurrentDateTime; |
|
|
retObj.TimeoutMinutes = MinuteDiff(retObj.LastReceiveTime, ServerHelper.CurrentDateTime); |
|
|
retObj.TimeoutMinutes = MinuteDiff(retObj.LastReceiveTime, ServerHelper.CurrentDateTime); |
|
|
if (cache != null) |
|
|
if (cache != null) |
|
|