Browse Source

生成单据号方法修改

master
lvzb 1 year ago
parent
commit
250de8a254
  1. 12
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs

12
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs

@ -24,20 +24,17 @@ namespace WY.NewJit.MsgCheck
private readonly LogRemindDomainService _logRemindDomainService; private readonly LogRemindDomainService _logRemindDomainService;
public static List<BillNumberRecord> _billNumberRecordCaches= new List<BillNumberRecord>() ;//记录内存 public static List<BillNumberRecord> _billNumberRecordCaches= new List<BillNumberRecord>() ;//记录内存
private readonly IObjectMapper _objectMapper;
public BillNumberRecordDomainService( public BillNumberRecordDomainService(
IRepository<BillNumberRecord, Guid> billNumberRepository, IRepository<BillNumberRecord, Guid> billNumberRepository,
ILogger<M100CheckDomainService> logger, ILogger<M100CheckDomainService> logger,
LogRemindDomainService logRemindDomainService, LogRemindDomainService logRemindDomainService,
IRepository<WaitPrint, Guid> waitPrintRepository, IRepository<WaitPrint, Guid> waitPrintRepository)
IObjectMapper objectMapper)
{ {
_billNumberRepository = billNumberRepository; _billNumberRepository = billNumberRepository;
_logger = logger; _logger = logger;
_logRemindDomainService = logRemindDomainService; _logRemindDomainService = logRemindDomainService;
_waitPrintRepository = waitPrintRepository; _waitPrintRepository = waitPrintRepository;
_objectMapper = objectMapper;
} }
/// <summary> /// <summary>
/// 获取和更新记录和内存 /// 获取和更新记录和内存
@ -66,10 +63,7 @@ namespace WY.NewJit.MsgCheck
else else
{ {
_billNumberRecordCaches.Clear(); _billNumberRecordCaches.Clear();
//_billNumberRecordCaches = await _billNumberRepository.GetListAsync(); _billNumberRecordCaches = await _billNumberRepository.GetListAsync();
var aa = await _billNumberRepository.GetListAsync();
_billNumberRecordCaches = _objectMapper.Map<List<BillNumberRecord>, List<BillNumberRecord>>(aa);
foreach (var item in _billNumberRecordCaches) foreach (var item in _billNumberRecordCaches)
{ {

Loading…
Cancel
Save