From 59fe188c6c01d265d3a273e31f3929d63cd83da1 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Wed, 29 Nov 2023 14:02:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=AF=BC=E5=85=A5=E6=96=AD?= =?UTF-8?q?=E5=8F=B7=E6=97=B6=EF=BC=8C=20=E6=89=93=E5=8D=B0=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=3D=E8=A1=A5=E6=89=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MsgCheck/Services/M100CheckDomainService.cs | 8 ++++---- .../MsgCheck/Services/M100DomainService.cs | 14 ++++++++++++-- .../Properties/launchSettings.json | 16 +++++++++++++--- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100CheckDomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100CheckDomainService.cs index c1bcc94..2ea9ab4 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100CheckDomainService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100CheckDomainService.cs @@ -271,7 +271,7 @@ namespace WY.NewJit.MsgCheck #endregion } - bool isMatch = DoMatchAssembly(m100Bill); + bool isMatch = DoMatchAssembly(m100Bill, false, false, true); if (isMatch) { #region 判断是否断号 @@ -521,7 +521,7 @@ namespace WY.NewJit.MsgCheck } } - public bool DoMatchAssembly(BillM100 m100Bill, bool isBillUpdate = false, bool isUnknowAssembly = false) + public bool DoMatchAssembly(BillM100 m100Bill, bool isBillUpdate = false, bool isUnknowAssembly = false, bool isBatchImportBreakNum = false) { bool ret = false; try @@ -554,7 +554,7 @@ namespace WY.NewJit.MsgCheck else { //succObj = _billM100Repository.InsertAsync(m100Bill, true).GetAwaiter().GetResult(); - succObj = _m100DomainService.InsertM100(m100Bill, true).GetAwaiter().GetResult(); + succObj = _m100DomainService.InsertM100(m100Bill, true, isBatchImportBreakNum).GetAwaiter().GetResult(); } if (succObj == null) @@ -618,7 +618,7 @@ namespace WY.NewJit.MsgCheck else { //succObj = _billM100Repository.InsertAsync(m100Bill, true).GetAwaiter().GetResult(); - succObj = _m100DomainService.InsertM100(m100Bill, true).GetAwaiter().GetResult(); + succObj = _m100DomainService.InsertM100(m100Bill, true, isBatchImportBreakNum).GetAwaiter().GetResult(); } if (succObj == null) 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 1b6adfa..c91e8b2 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 @@ -43,8 +43,9 @@ namespace WY.NewJit.MsgCheck _billNumRecDomainSrv = billNumRecDomainSrv; } - public async Task InsertM100(BillM100 m100Obj, bool autoSave = false) + public async Task InsertM100(BillM100 m100Obj, bool autoSave = false, bool isBatchImportBreakNum = false) { + BillM100 m100Ret = null; //调用HostSN2方法 BillNumberRecord billNumRec = await _billNumRecDomainSrv.GetBillNumber(m100Obj.HostSN.TryToIntNotNull(), m100Obj.ProductLine); var normalObj = billNumRec.Datas.FirstOrDefault(itm => itm.BillNumberType == BillNumberTypeEnum.正常); @@ -66,6 +67,16 @@ namespace WY.NewJit.MsgCheck WaitPrint mbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.MenBan); wpArr = new WaitPrint[1] { mbRec }; } + if (isBatchImportBreakNum) //批量导入断号模块调用 + { + foreach (var wp in wpArr) + { + wp.PrintType = PrintTypeEnum.ReplenishPrint; + } + m100Ret = await _billM100Repository.InsertAsync(m100Obj, autoSave); //插入M100 + await _waitPrintRepository.InsertManyAsync(wpArr, autoSave); //插入未打印表 + return m100Ret; + } //处理断号 if (breakNumLst.Count > 0) @@ -100,7 +111,6 @@ namespace WY.NewJit.MsgCheck await _waitPrintRepository.InsertManyAsync(waitPrintBreakNumLst, autoSave); //插入断号 } //处理正常、迟到 - BillM100 m100Ret = null; if (normalObj != null) //正常 { m100Ret = await _billM100Repository.InsertAsync(m100Obj, autoSave); //插入M100 diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/Properties/launchSettings.json b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/Properties/launchSettings.json index 33504c9..191be47 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/Properties/launchSettings.json +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/Properties/launchSettings.json @@ -1,8 +1,18 @@ +//{ +// "profiles": { +// "WSL": { +// "commandName": "WSL2", +// "distributionName": "" +// } +// } +//} { "profiles": { - "WSL": { - "commandName": "WSL2", - "distributionName": "" + "WY.NewJit.Job.ConsoleApp": { + "commandName": "Project", + "environmentVariables": { + "environmentVariable": "Development" + } } } } \ No newline at end of file