|
|
@ -113,28 +113,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
List<BBAC_CAN_SA_DETAIL> details = new List<BBAC_CAN_SA_DETAIL>(); |
|
|
|
foreach (var itm1 in ls) |
|
|
|
{ |
|
|
|
var _detailEntity = new BBAC_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm1.KeyCode, |
|
|
|
version: itm1.Version, |
|
|
|
billNum: string.Empty, |
|
|
|
settleBillNum: itm1.SettleBillNum, |
|
|
|
lU: itm1.LU, |
|
|
|
pN: itm1.PN, |
|
|
|
site: itm1.Site, |
|
|
|
qty: itm1.Qty, |
|
|
|
price: itm1.Price, |
|
|
|
category: itm1.BusinessType, |
|
|
|
isReturn: itm1.IsReturn, |
|
|
|
settleDate: itm1.SettleDate, |
|
|
|
groupNum: itm1.GroupNum, |
|
|
|
invGroupNum: string.Empty, |
|
|
|
contactid: itm1.ContractDocID, |
|
|
|
invbillnum: string.Empty, |
|
|
|
partcode: itm1.PartCode |
|
|
|
); |
|
|
|
_detailEntity.RealPartCode = itm1.RealPartCode; |
|
|
|
details.Add(_detailEntity); |
|
|
|
sum += (itm1.Qty * itm1.Price); |
|
|
|
if (sum > 10000000) |
|
|
|
{ |
|
|
@ -158,6 +136,31 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
details = new List<BBAC_CAN_SA_DETAIL>(); |
|
|
|
sum = 0; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var _detailEntity = new BBAC_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm1.KeyCode, |
|
|
|
version: itm1.Version, |
|
|
|
billNum: string.Empty, |
|
|
|
settleBillNum: itm1.SettleBillNum, |
|
|
|
lU: itm1.LU, |
|
|
|
pN: itm1.PN, |
|
|
|
site: itm1.Site, |
|
|
|
qty: itm1.Qty, |
|
|
|
price: itm1.Price, |
|
|
|
category: itm1.BusinessType, |
|
|
|
isReturn: itm1.IsReturn, |
|
|
|
settleDate: itm1.SettleDate, |
|
|
|
groupNum: itm1.GroupNum, |
|
|
|
invGroupNum: string.Empty, |
|
|
|
contactid: itm1.ContractDocID, |
|
|
|
invbillnum: string.Empty, |
|
|
|
partcode: itm1.PartCode |
|
|
|
); |
|
|
|
_detailEntity.RealPartCode = itm1.RealPartCode; |
|
|
|
details.Add(_detailEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
var billNum1 = OrderNumberGenerator.GenerateOrderNumber("N"); |
|
|
|
var bbac_sa1 = new BBAC_CAN_SA(); |
|
|
@ -270,28 +273,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
List<BBAC_CAN_SA_DETAIL> details = new List<BBAC_CAN_SA_DETAIL>(); |
|
|
|
foreach (var itm1 in ls) |
|
|
|
{ |
|
|
|
var _detailEntity = new BBAC_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm1.KeyCode, |
|
|
|
version: itm1.Version, |
|
|
|
billNum: string.Empty, |
|
|
|
settleBillNum: itm1.SettleBillNum, |
|
|
|
lU: itm1.LU, |
|
|
|
pN: itm1.PN, |
|
|
|
site: itm1.Site, |
|
|
|
qty: itm1.Qty, |
|
|
|
price: itm1.Price, |
|
|
|
category: itm1.BusinessType, |
|
|
|
isReturn: itm1.IsReturn, |
|
|
|
settleDate: itm1.SettleDate, |
|
|
|
groupNum: itm1.GroupNum, |
|
|
|
invGroupNum: string.Empty, |
|
|
|
contactid: itm1.ContractDocID, |
|
|
|
invbillnum: string.Empty, |
|
|
|
partcode: itm1.PartCode |
|
|
|
); |
|
|
|
_detailEntity.RealPartCode = itm1.RealPartCode; |
|
|
|
details.Add(_detailEntity); |
|
|
|
|
|
|
|
sum += (itm1.Qty * itm1.Price); |
|
|
|
if (sum > 10000000) |
|
|
|
{ |
|
|
@ -314,7 +296,33 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
} |
|
|
|
details = new List<BBAC_CAN_SA_DETAIL>(); |
|
|
|
sum = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var _detailEntity = new BBAC_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm1.KeyCode, |
|
|
|
version: itm1.Version, |
|
|
|
billNum: string.Empty, |
|
|
|
settleBillNum: itm1.SettleBillNum, |
|
|
|
lU: itm1.LU, |
|
|
|
pN: itm1.PN, |
|
|
|
site: itm1.Site, |
|
|
|
qty: itm1.Qty, |
|
|
|
price: itm1.Price, |
|
|
|
category: itm1.BusinessType, |
|
|
|
isReturn: itm1.IsReturn, |
|
|
|
settleDate: itm1.SettleDate, |
|
|
|
groupNum: itm1.GroupNum, |
|
|
|
invGroupNum: string.Empty, |
|
|
|
contactid: itm1.ContractDocID, |
|
|
|
invbillnum: string.Empty, |
|
|
|
partcode: itm1.PartCode |
|
|
|
); |
|
|
|
_detailEntity.RealPartCode = itm1.RealPartCode; |
|
|
|
details.Add(_detailEntity); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
var billNum1 = OrderNumberGenerator.GenerateOrderNumber("N"); |
|
|
|
var bbac_sa1 = new BBAC_CAN_SA(); |
|
|
@ -502,26 +510,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
List<HBPO_CAN_SA_DETAIL> details = new List<HBPO_CAN_SA_DETAIL>(); |
|
|
|
foreach (var itm1 in ls) |
|
|
|
{ |
|
|
|
var _detailEntity = new HBPO_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm1.KeyCode, |
|
|
|
version: itm1.Version, |
|
|
|
billNum: string.Empty, |
|
|
|
settleBillNum: itm1.SettleBillNum, |
|
|
|
lU: itm1.LU, |
|
|
|
pN: itm1.PN, |
|
|
|
site: itm1.Site, |
|
|
|
qty: itm1.Qty, |
|
|
|
price: itm1.Price, |
|
|
|
businessType: itm1.BusinessType, |
|
|
|
settleDate: itm1.SettleDate, |
|
|
|
groupNum: itm1.GroupNum, |
|
|
|
invGroupNum: string.Empty, |
|
|
|
invbillnum: string.Empty, |
|
|
|
partcode: itm1.PartCode |
|
|
|
); |
|
|
|
_detailEntity.RealPartCode = itm1.RealPartCode; |
|
|
|
details.Add(_detailEntity); |
|
|
|
|
|
|
|
sum += (itm1.Qty * itm1.Price); |
|
|
|
if (sum > 10000000) |
|
|
|
{ |
|
|
@ -545,6 +534,29 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
|
details = new List<HBPO_CAN_SA_DETAIL>(); |
|
|
|
sum = 0; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var _detailEntity = new HBPO_CAN_SA_DETAIL( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
keyCode: itm1.KeyCode, |
|
|
|
version: itm1.Version, |
|
|
|
billNum: string.Empty, |
|
|
|
settleBillNum: itm1.SettleBillNum, |
|
|
|
lU: itm1.LU, |
|
|
|
pN: itm1.PN, |
|
|
|
site: itm1.Site, |
|
|
|
qty: itm1.Qty, |
|
|
|
price: itm1.Price, |
|
|
|
businessType: itm1.BusinessType, |
|
|
|
settleDate: itm1.SettleDate, |
|
|
|
groupNum: itm1.GroupNum, |
|
|
|
invGroupNum: string.Empty, |
|
|
|
invbillnum: string.Empty, |
|
|
|
partcode: itm1.PartCode |
|
|
|
); |
|
|
|
_detailEntity.RealPartCode = itm1.RealPartCode; |
|
|
|
details.Add(_detailEntity); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
var billNum1 = OrderNumberGenerator.GenerateOrderNumber("N"); |
|
|
|