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