|
|
@ -32,13 +32,6 @@ namespace WY.NewJit.MsgCheck |
|
|
|
_waitPrintRepository = waitPrintRepository; |
|
|
|
} |
|
|
|
/// <summary>
|
|
|
|
/// 清空缓存
|
|
|
|
/// </summary>
|
|
|
|
public void CleanBillNumberRecordCache() |
|
|
|
{ |
|
|
|
_billNumberRecordCaches.Clear(); |
|
|
|
} |
|
|
|
/// <summary>
|
|
|
|
/// 获取和更新记录和内存
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="isupdate"></param>
|
|
|
@ -49,9 +42,22 @@ namespace WY.NewJit.MsgCheck |
|
|
|
if (isupdate) |
|
|
|
{ |
|
|
|
await _billNumberRepository.UpdateManyAsync(_billNumberRecordCaches); |
|
|
|
foreach (var item in _billNumberRecordCaches) |
|
|
|
{ |
|
|
|
var re = await _billNumberRepository.GetListAsync(r=>r.Id==item.Id); |
|
|
|
if (re.Count == 0) |
|
|
|
{ |
|
|
|
await _billNumberRepository.InsertAsync(item); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
await _billNumberRepository.UpdateAsync(item); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
_billNumberRecordCaches.Clear(); |
|
|
|
_billNumberRecordCaches = await _billNumberRepository.GetListAsync(); |
|
|
|
foreach (var item in _billNumberRecordCaches) |
|
|
|
{ |
|
|
@ -86,7 +92,7 @@ namespace WY.NewJit.MsgCheck |
|
|
|
GuidGenerator.Create(), |
|
|
|
productLine, |
|
|
|
1, |
|
|
|
0, |
|
|
|
number, |
|
|
|
0, |
|
|
|
DateTime.Now |
|
|
|
); |
|
|
|