diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/UnknownAssemblys/UnknownAssemblyAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/UnknownAssemblys/UnknownAssemblyAppService.cs index 6b382a2..6490ebf 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/UnknownAssemblys/UnknownAssemblyAppService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/UnknownAssemblys/UnknownAssemblyAppService.cs @@ -24,6 +24,7 @@ using WY.NewJit.MsgTransmission; using Volo.Abp.EventBus.Distributed; using WY.NewJit.SettleAccountFis; using WY.NewJit.MsgTransmission.PaiGe; +using WY.NewJit.PrintTable; namespace WY.NewJit.MsgCheck { @@ -47,6 +48,7 @@ namespace WY.NewJit.MsgCheck private readonly IRepository _billR100Repository; private readonly IRepository _billM100Repository; + private readonly IRepository _waitPrintRepository; /// /// ERP总成仓储 @@ -131,7 +133,8 @@ namespace WY.NewJit.MsgCheck R100CheckDomainService r100CheckDomainSrv, M100CheckDomainService m100CheckDomainService, IDistributedEventBus distributedEventBus, - IRepository partCfgRepository + IRepository partCfgRepository, + IRepository waitPrintRepository ) { _UnknownAssemblyRepository = UnknownAssemblyRepository; @@ -153,6 +156,7 @@ namespace WY.NewJit.MsgCheck _m100CheckDomainService = m100CheckDomainService; _distributedEventBus = distributedEventBus; _partCfgRepository = partCfgRepository; + _waitPrintRepository = waitPrintRepository; } #endregion @@ -909,6 +913,35 @@ select * from { m100Obj.NeedReplenishPrint = 1; await _billM100Repository.UpdateAsync(m100Obj); + //var waititem=await _waitPrintRepository.GetAsync(r=>r.M100Id== m100Obj.Id); + // if (waititem == null) + // { + + // WaitPrint targetWaitPrint = new WaitPrint(GuidGenerator.Create()); + // targetWaitPrint.M100Id = m100Obj.Id; + // //targetWaitPrint.BusinessType = m100Obj.BusinessType; + // //targetWaitPrint.ProductLine = sourceWaitPrint.ProductLine; + // //targetWaitPrint.OnlineTime = sourceWaitPrint.OnlineTime; + // //targetWaitPrint.HostSN = breaknum.ToString().Right(5).TryToIntZero(); + // //targetWaitPrint.KNR = null; + // //targetWaitPrint.VIN = null; + // //targetWaitPrint.VehicleModelCode = null; + // //targetWaitPrint.AssemblyID = null; + // //targetWaitPrint.BillStatus = BillStatusEnum.BreakNum; + // //targetWaitPrint.PrintType = PrintTypeEnum.ReplenishPrint; + // //targetWaitPrint.HostSN2 = Convert.ToInt32 (m100Obj.HostSN2); + // //targetWaitPrint.Description = null; + // //targetWaitPrint.ReceiveTime = null; + // //targetWaitPrint.CreationTime = null; + // //targetWaitPrint.CreatorId = null; + // //targetWaitPrint.LastModificationTime = null; + // //targetWaitPrint.LastModifierId = null; + // await _waitPrintRepository.InsertAsync(targetWaitPrint); + // } + // else + // { + // waititem.PrintType =PrintTypeEnum.ReplenishPrint; + // } } #endregion } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml index b89c4e8..c653a68 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml @@ -1800,7 +1800,7 @@ 错误信息前缀 - + 构造函数 diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/PrintTypeEnum.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/PrintTypeEnum.cs index 6d50148..6742fd1 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/PrintTypeEnum.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/PrintTypeEnum.cs @@ -13,7 +13,7 @@ namespace WY.NewJit.PrintTable [Description("顺序打印")] OrderPrint = 1, - [Description("空")] + [Description("补账打印")] ReplenishPrint = 2, } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs index 54b1b02..52f47ea 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs @@ -18,7 +18,7 @@ namespace WY.NewJit.MsgCheck private readonly IRepository _waitPrintRepository; private ILogger _logger; private readonly LogRemindDomainService _logRemindDomainService; - public static List _billNumberRecordCaches= new List() ; + public static List _billNumberRecordCaches= new List() ;//记录内存 public BillNumberRecordDomainService( IRepository billNumberRepository, @@ -38,7 +38,11 @@ namespace WY.NewJit.MsgCheck { _billNumberRecordCaches.Clear(); } - + /// + /// 获取和更新记录和内存 + /// + /// + /// public async Task GetOrUpDateBillNumberRecordCache(bool isupdate) { ObjectResultDto ret = new ObjectResultDto(true, null); @@ -78,8 +82,14 @@ namespace WY.NewJit.MsgCheck var recordcache= _billNumberRecordCaches.FirstOrDefault(r=>r.ProductLine==productLine); if (recordcache == null) { - _logger.LogDebug("缓存记录为空无法解析!"); - throw new BusinessException("1001", "缓存记录为空无法解析!"); + recordcache = new BillNumberRecord(); + recordcache.RecordNumber = 0; + recordcache.RoundNumber = 1; + recordcache.RecordNumber = 0; + recordcache.ProductLine = productLine; + _billNumberRecordCaches.Add(recordcache); + //_logger.LogDebug("缓存记录为空无法解析!"); + //throw new BusinessException("1001", "缓存记录为空无法解析!"); } int recordNumber = recordcache.RecordNumber;//记录号 int roundNumber = recordcache.RoundNumber; //记录轮数