|
@ -43,8 +43,9 @@ namespace WY.NewJit.MsgCheck |
|
|
_billNumRecDomainSrv = billNumRecDomainSrv; |
|
|
_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方法
|
|
|
//调用HostSN2方法
|
|
|
BillNumberRecord billNumRec = await _billNumRecDomainSrv.GetBillNumber(m100Obj.HostSN.TryToIntNotNull(), m100Obj.ProductLine); |
|
|
BillNumberRecord billNumRec = await _billNumRecDomainSrv.GetBillNumber(m100Obj.HostSN.TryToIntNotNull(), m100Obj.ProductLine); |
|
|
var normalObj = billNumRec.Datas.FirstOrDefault(itm => itm.BillNumberType == BillNumberTypeEnum.正常); |
|
|
var normalObj = billNumRec.Datas.FirstOrDefault(itm => itm.BillNumberType == BillNumberTypeEnum.正常); |
|
@ -66,6 +67,16 @@ namespace WY.NewJit.MsgCheck |
|
|
WaitPrint mbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.MenBan); |
|
|
WaitPrint mbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.MenBan); |
|
|
wpArr = new WaitPrint[1] { mbRec }; |
|
|
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) |
|
|
if (breakNumLst.Count > 0) |
|
@ -100,7 +111,6 @@ namespace WY.NewJit.MsgCheck |
|
|
await _waitPrintRepository.InsertManyAsync(waitPrintBreakNumLst, autoSave); //插入断号
|
|
|
await _waitPrintRepository.InsertManyAsync(waitPrintBreakNumLst, autoSave); //插入断号
|
|
|
} |
|
|
} |
|
|
//处理正常、迟到
|
|
|
//处理正常、迟到
|
|
|
BillM100 m100Ret = null; |
|
|
|
|
|
if (normalObj != null) //正常
|
|
|
if (normalObj != null) //正常
|
|
|
{ |
|
|
{ |
|
|
m100Ret = await _billM100Repository.InsertAsync(m100Obj, autoSave); //插入M100
|
|
|
m100Ret = await _billM100Repository.InsertAsync(m100Obj, autoSave); //插入M100
|
|
|