Browse Source

批量导入断号时, 打印类型=补打

master
liuyunfeng 1 year ago
parent
commit
59fe188c6c
  1. 8
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100CheckDomainService.cs
  2. 14
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs
  3. 16
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/Properties/launchSettings.json

8
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)

14
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<BillM100> InsertM100(BillM100 m100Obj, bool autoSave = false)
public async Task<BillM100> 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

16
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"
}
}
}
}
Loading…
Cancel
Save