|
@ -40,7 +40,7 @@ namespace WY.NewJit.MsgCheck |
|
|
|
|
|
|
|
|
public async Task<bool> InsertM100(BillM100 m100Obj, bool autoSave = false) |
|
|
public async Task<bool> InsertM100(BillM100 m100Obj, bool autoSave = false) |
|
|
{ |
|
|
{ |
|
|
//处理断号
|
|
|
//处理断号:由生成HostSN方法提供断号数据
|
|
|
|
|
|
|
|
|
var m100Ret = await _billM100Repository.InsertAsync(m100Obj, autoSave); |
|
|
var m100Ret = await _billM100Repository.InsertAsync(m100Obj, autoSave); |
|
|
if (m100Ret != null) |
|
|
if (m100Ret != null) |
|
@ -63,9 +63,37 @@ namespace WY.NewJit.MsgCheck |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public async Task<bool> 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) |
|
|
private WaitPrint ConvertWaitPrint(BillM100 m100Ret, BusinessTypeEnum businessType) |
|
|
{ |
|
|
{ |
|
|
WaitPrint waitPrint = new WaitPrint(GuidGenerator.Create()); |
|
|
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.M100Id = m100Ret.Id; |
|
|
waitPrint.BusinessType = businessType; |
|
|
waitPrint.BusinessType = businessType; |
|
|
waitPrint.ProductLine = m100Ret.ProductLine; |
|
|
waitPrint.ProductLine = m100Ret.ProductLine; |
|
@ -91,7 +119,7 @@ namespace WY.NewJit.MsgCheck |
|
|
waitPrint.CreatorId = m100Ret.CreatorId; |
|
|
waitPrint.CreatorId = m100Ret.CreatorId; |
|
|
waitPrint.LastModificationTime = m100Ret.LastModificationTime; |
|
|
waitPrint.LastModificationTime = m100Ret.LastModificationTime; |
|
|
waitPrint.LastModifierId = m100Ret.LastModifierId; |
|
|
waitPrint.LastModifierId = m100Ret.LastModifierId; |
|
|
return waitPrint; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|