|
|
@ -426,12 +426,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
var involdList= invList.Where(p => oldinvs.Contains(p.ParentInvbillNum)).ToList(); |
|
|
|
var involdname=involdList.Select(p => p.InvbillNum); |
|
|
|
var adjlist=_adjRepository.Where(p => involdname.Contains(p.InvBillNum)); |
|
|
|
|
|
|
|
|
|
|
|
if (adjlist != null && adjlist.Count() > 0) |
|
|
|
{ |
|
|
|
foreach (var itm in adjlist) |
|
|
|
{ |
|
|
|
entityList.Add(new BBAC_CAN_SA_DETAIL( |
|
|
|
var detail = new BBAC_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm.KeyCode, |
|
|
|
version: itm.Version, |
|
|
@ -449,9 +449,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
invGroupNum: itm.InvGroupNum, |
|
|
|
contactid: itm.Extend1,//生产号
|
|
|
|
invbillnum: itm.InvBillNum, |
|
|
|
partcode:itm.PartCode |
|
|
|
|
|
|
|
)); |
|
|
|
partcode: itm.PartCode); |
|
|
|
detail.ErpLoc = itm.ErpLoc; |
|
|
|
detail.RealPartCode = itm.RealPartCode; |
|
|
|
entityList.Add(detail); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -464,7 +465,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
{ |
|
|
|
foreach (var itm in adjlist) |
|
|
|
{ |
|
|
|
entityDetail.Add(new BBAC_CAN_SA_DETAIL( |
|
|
|
var detail = new BBAC_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm.KeyCode, |
|
|
|
version: itm.Version, |
|
|
@ -482,9 +483,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
invGroupNum: itm.InvGroupNum, |
|
|
|
contactid: itm.Extend1,//生产号
|
|
|
|
invbillnum: itm.InvBillNum, |
|
|
|
partcode:itm.PartCode |
|
|
|
|
|
|
|
)); |
|
|
|
partcode: itm.PartCode |
|
|
|
); |
|
|
|
detail.ErpLoc = itm.ErpLoc; |
|
|
|
detail.RealPartCode = itm.RealPartCode; |
|
|
|
entityDetail.Add(detail); |
|
|
|
} |
|
|
|
} |
|
|
|
entityList.AddRange(entityDetail); |
|
|
@ -500,12 +503,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
state: SettleBillState.客户已收票, |
|
|
|
invGroupNum: itm.InvGroupNum, |
|
|
|
site: string.Empty |
|
|
|
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
bbacmainlist.Add( bbac ); |
|
|
|
|
|
|
|
} |
|
|
|
var bbacDetail = new List<BBAC_PD_DETAIL>(); |
|
|
|
foreach (var itm in entityList) |
|
|
@ -570,8 +569,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
} |
|
|
|
newlist = p_invs.Where(p => !oldlist.Contains(p)).ToList();//不存在扣减记录的发票号
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<HBPO_CAN_SA_DETAIL> entityList = new List<HBPO_CAN_SA_DETAIL>();//结算明细
|
|
|
|
var namelist = invList.Select(p => p.InvbillNum).ToList(); |
|
|
|
if (oldlist.Count > 0) |
|
|
@ -584,24 +581,27 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
{ |
|
|
|
foreach (var itm in adjlist) |
|
|
|
{ |
|
|
|
entityList.Add(new HBPO_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm.KeyCode, |
|
|
|
version: itm.Version, |
|
|
|
billNum: itm.InvGroupNum, |
|
|
|
settleBillNum: itm.SettleBillNum, |
|
|
|
lU: itm.LU, |
|
|
|
pN: itm.PN, |
|
|
|
site: itm.Site, |
|
|
|
qty: itm.Qty, |
|
|
|
price: 0, |
|
|
|
businessType: itm.BusinessType, |
|
|
|
settleDate: itm.SettleDate, |
|
|
|
groupNum: itm.GroupNum, |
|
|
|
invGroupNum: itm.InvGroupNum, |
|
|
|
invbillnum: itm.InvBillNum, |
|
|
|
partcode:itm.PartCode |
|
|
|
)); |
|
|
|
var detail = new HBPO_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm.KeyCode, |
|
|
|
version: itm.Version, |
|
|
|
billNum: itm.InvGroupNum, |
|
|
|
settleBillNum: itm.SettleBillNum, |
|
|
|
lU: itm.LU, |
|
|
|
pN: itm.PN, |
|
|
|
site: itm.Site, |
|
|
|
qty: itm.Qty, |
|
|
|
price: 0, |
|
|
|
businessType: itm.BusinessType, |
|
|
|
settleDate: itm.SettleDate, |
|
|
|
groupNum: itm.GroupNum, |
|
|
|
invGroupNum: itm.InvGroupNum, |
|
|
|
invbillnum: itm.InvBillNum, |
|
|
|
partcode: itm.PartCode |
|
|
|
); |
|
|
|
detail.ErpLoc = itm.ErpLoc; |
|
|
|
detail.RealPartCode = itm.RealPartCode; |
|
|
|
entityList.Add(detail); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -631,8 +631,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
invGroupNum: itm.InvGroupNum, |
|
|
|
invbillnum: itm.InvBillNum, |
|
|
|
partcode: itm.PartCode); |
|
|
|
entityDetail.Add(entity |
|
|
|
); |
|
|
|
entity.ErpLoc = itm.ErpLoc;//补字段库位
|
|
|
|
entity.PartCode = itm.RealPartCode;//真实零件号
|
|
|
|
|
|
|
|
entityDetail.Add(entity); |
|
|
|
} |
|
|
|
} |
|
|
|
entityList.AddRange(entityDetail); |
|
|
@ -724,7 +726,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
{ |
|
|
|
foreach (var itm in adjlist) |
|
|
|
{ |
|
|
|
entityList.Add(new PUB_CAN_SA_DETAIL( |
|
|
|
var detail = new PUB_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm.KeyCode, |
|
|
|
version: itm.Version, |
|
|
@ -740,11 +742,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
groupNum: itm.GroupNum, |
|
|
|
invGroupNum: itm.InvGroupNum, |
|
|
|
invbillnum: itm.InvBillNum, |
|
|
|
partcode:itm.PartCode, |
|
|
|
pobillnum:string.Empty |
|
|
|
|
|
|
|
partcode: itm.PartCode, |
|
|
|
pobillnum: string.Empty |
|
|
|
); |
|
|
|
detail.RealPartCode = itm.RealPartCode;//厂内替换零件号
|
|
|
|
detail.ErpLoc = itm.ErpLoc;//ERP库位
|
|
|
|
|
|
|
|
)); |
|
|
|
entityList.Add(detail); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -757,25 +761,28 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
{ |
|
|
|
foreach (var itm in adjlist) |
|
|
|
{ |
|
|
|
entityDetail.Add(new PUB_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm.KeyCode, |
|
|
|
version: itm.Version, |
|
|
|
billNum: itm.InvGroupNum, |
|
|
|
settleBillNum: itm.SettleBillNum, |
|
|
|
lU: itm.LU, |
|
|
|
pN: itm.PN, |
|
|
|
site: itm.Site, |
|
|
|
qty: itm.Qty, |
|
|
|
price: 0, |
|
|
|
businessType: itm.BusinessType, |
|
|
|
settleDate: itm.SettleDate, |
|
|
|
groupNum: itm.GroupNum, |
|
|
|
invGroupNum: itm.InvGroupNum, |
|
|
|
invbillnum: itm.InvBillNum, |
|
|
|
partcode: itm.PartCode, |
|
|
|
pobillnum: string.Empty |
|
|
|
)); |
|
|
|
var detail = new PUB_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm.KeyCode, |
|
|
|
version: itm.Version, |
|
|
|
billNum: itm.InvGroupNum, |
|
|
|
settleBillNum: itm.SettleBillNum, |
|
|
|
lU: itm.LU, |
|
|
|
pN: itm.PN, |
|
|
|
site: itm.Site, |
|
|
|
qty: itm.Qty, |
|
|
|
price: 0, |
|
|
|
businessType: itm.BusinessType, |
|
|
|
settleDate: itm.SettleDate, |
|
|
|
groupNum: itm.GroupNum, |
|
|
|
invGroupNum: itm.InvGroupNum, |
|
|
|
invbillnum: itm.InvBillNum, |
|
|
|
partcode: itm.PartCode, |
|
|
|
pobillnum: string.Empty |
|
|
|
); |
|
|
|
detail.RealPartCode = itm.RealPartCode;//厂内替换零件号
|
|
|
|
detail.ErpLoc = itm.ErpLoc;//ERP库位
|
|
|
|
entityDetail.Add(detail); |
|
|
|
} |
|
|
|
} |
|
|
|
entityList.AddRange(entityDetail); |
|
|
|