From f12f3c182b2b58b8f2889ea18d5e2705b7695319 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Fri, 3 Nov 2023 13:55:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E5=85=A5M100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +-- .../MsgCheck/Services/M100DomainService.cs | 32 +++++++++++++++++-- .../PrintTable/Entitys/AlreadyPrint.cs | 12 +++++++ .../PrintTable/Entitys/WaitPrint.cs | 1 + 4 files changed, 45 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e2a82d9..cc43e2d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ ################################################################################ /src/Shared/Win.Abp.Snowflakes/bin/Debug/netcoreapp5/Win.Abp.Snowflakes.deps.json -/src/Shared + /src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20210906.txt /src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs /.vs @@ -17,7 +17,7 @@ /src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Web/JIS_WORK /src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Web/JIS_RECEIVE /src/Modules/新版JIT或JIS系统服务端/OutPut - +/src/shared /src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.xml /src/Modules/新版JIT或JIS系统服务端/OutPut OutPut diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs index ef05ef7..39c0bf1 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs @@ -40,7 +40,7 @@ namespace WY.NewJit.MsgCheck public async Task InsertM100(BillM100 m100Obj, bool autoSave = false) { - //处理断号 + //处理断号:由生成HostSN方法提供断号数据 var m100Ret = await _billM100Repository.InsertAsync(m100Obj, autoSave); if (m100Ret != null) @@ -63,9 +63,37 @@ namespace WY.NewJit.MsgCheck return false; } + public async Task UpdateM100(BillM100 m100Obj, bool autoSave = false) + { + var m100Ret = await _billM100Repository.UpdateAsync(m100Obj, autoSave); + if (m100Ret != null) + { + if (m100Obj.ProductLine == "08") + { + WaitPrint mbRec = await _waitPrintRepository.GetAsync(itm => itm.M100Id == m100Ret.Id && itm.BusinessType == BusinessTypeEnum.MenBan); + ConvertWaitPrint(m100Ret, BusinessTypeEnum.MenBan, mbRec); + await _waitPrintRepository.UpdateAsync(mbRec); + } + else + { + WaitPrint mbRec = await _waitPrintRepository.GetAsync(itm => itm.M100Id == m100Ret.Id && itm.BusinessType == BusinessTypeEnum.MenBan); + ConvertWaitPrint(m100Ret, BusinessTypeEnum.MenBan, mbRec); + await _waitPrintRepository.UpdateAsync(mbRec); + } + return true; + } + return false; + } + private WaitPrint ConvertWaitPrint(BillM100 m100Ret, BusinessTypeEnum businessType) { WaitPrint waitPrint = new WaitPrint(GuidGenerator.Create()); + ConvertWaitPrint(m100Ret, businessType, waitPrint); + return waitPrint; + } + + private void ConvertWaitPrint(BillM100 m100Ret, BusinessTypeEnum businessType, WaitPrint waitPrint) + { waitPrint.M100Id = m100Ret.Id; waitPrint.BusinessType = businessType; waitPrint.ProductLine = m100Ret.ProductLine; @@ -91,7 +119,7 @@ namespace WY.NewJit.MsgCheck waitPrint.CreatorId = m100Ret.CreatorId; waitPrint.LastModificationTime = m100Ret.LastModificationTime; waitPrint.LastModifierId = m100Ret.LastModifierId; - return waitPrint; } + } } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/AlreadyPrint.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/AlreadyPrint.cs index 684568c..3e9d1da 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/AlreadyPrint.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/AlreadyPrint.cs @@ -109,6 +109,18 @@ namespace WY.NewJit.PrintTable /// 最后修改人 /// public Guid? LastModifierId { get; set; } + + public AlreadyPrint() + { + + } + + public AlreadyPrint(Guid id) + : base(id) + { + this.Id = id; + } + } } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/WaitPrint.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/WaitPrint.cs index 09de52f..94a04f6 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/WaitPrint.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/PrintTable/Entitys/WaitPrint.cs @@ -116,6 +116,7 @@ namespace WY.NewJit.PrintTable } public WaitPrint(Guid id) + :base(id) { this.Id = id; }