Browse Source

更新版本

master
zhaoxinyu 10 months ago
parent
commit
98f8d9ca5a
  1. 105
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs

105
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MakeCanSettlementService.cs

@ -136,9 +136,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
details = new List<BBAC_CAN_SA_DETAIL>(); details = new List<BBAC_CAN_SA_DETAIL>();
sum = 0; sum = 0;
} }
else var _detailEntity = new BBAC_CAN_SA_DETAIL(
{
var _detailEntity = new BBAC_CAN_SA_DETAIL(
guid: GuidGenerator.Create(), guid: GuidGenerator.Create(),
keyCode: itm1.KeyCode, keyCode: itm1.KeyCode,
version: itm1.Version, version: itm1.Version,
@ -158,9 +156,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
invbillnum: string.Empty, invbillnum: string.Empty,
partcode: itm1.PartCode partcode: itm1.PartCode
); );
_detailEntity.RealPartCode = itm1.RealPartCode; _detailEntity.RealPartCode = itm1.RealPartCode;
details.Add(_detailEntity); details.Add(_detailEntity);
}
} }
var billNum1 = OrderNumberGenerator.GenerateOrderNumber("N"); var billNum1 = OrderNumberGenerator.GenerateOrderNumber("N");
var bbac_sa1 = new BBAC_CAN_SA(); var bbac_sa1 = new BBAC_CAN_SA();
@ -274,7 +272,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
foreach (var itm1 in ls) foreach (var itm1 in ls)
{ {
sum += (itm1.Qty * itm1.Price);
if (sum > 10000000) if (sum > 10000000)
{ {
var billNum = OrderNumberGenerator.GenerateOrderNumber("N"); var billNum = OrderNumberGenerator.GenerateOrderNumber("N");
@ -296,33 +293,32 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
} }
details = new List<BBAC_CAN_SA_DETAIL>(); details = new List<BBAC_CAN_SA_DETAIL>();
sum = 0; 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);
} }
sum += (itm1.Qty * itm1.Price);
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 billNum1 = OrderNumberGenerator.GenerateOrderNumber("N");
var bbac_sa1 = new BBAC_CAN_SA(); var bbac_sa1 = new BBAC_CAN_SA();
@ -510,7 +506,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
List<HBPO_CAN_SA_DETAIL> details = new List<HBPO_CAN_SA_DETAIL>(); List<HBPO_CAN_SA_DETAIL> details = new List<HBPO_CAN_SA_DETAIL>();
foreach (var itm1 in ls) foreach (var itm1 in ls)
{ {
sum += (itm1.Qty * itm1.Price); sum += (itm1.Qty * itm1.Price);
if (sum > 10000000) if (sum > 10000000)
{ {
@ -534,30 +529,26 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
details = new List<HBPO_CAN_SA_DETAIL>(); details = new List<HBPO_CAN_SA_DETAIL>();
sum = 0; sum = 0;
} }
else var _detailEntity = new HBPO_CAN_SA_DETAIL(
{ guid: GuidGenerator.Create(),
var _detailEntity = new HBPO_CAN_SA_DETAIL( keyCode: itm1.KeyCode,
guid: GuidGenerator.Create(), version: itm1.Version,
keyCode: itm1.KeyCode, billNum: string.Empty,
version: itm1.Version, settleBillNum: itm1.SettleBillNum,
billNum: string.Empty, lU: itm1.LU,
settleBillNum: itm1.SettleBillNum, pN: itm1.PN,
lU: itm1.LU, site: itm1.Site,
pN: itm1.PN, qty: itm1.Qty,
site: itm1.Site, price: itm1.Price,
qty: itm1.Qty, businessType: itm1.BusinessType,
price: itm1.Price, settleDate: itm1.SettleDate,
businessType: itm1.BusinessType, groupNum: itm1.GroupNum,
settleDate: itm1.SettleDate, invGroupNum: string.Empty,
groupNum: itm1.GroupNum, invbillnum: string.Empty,
invGroupNum: string.Empty, partcode: itm1.PartCode
invbillnum: string.Empty, );
partcode: itm1.PartCode _detailEntity.RealPartCode = itm1.RealPartCode;
); details.Add(_detailEntity);
_detailEntity.RealPartCode = itm1.RealPartCode;
details.Add(_detailEntity);
}
} }
var billNum1 = OrderNumberGenerator.GenerateOrderNumber("N"); var billNum1 = OrderNumberGenerator.GenerateOrderNumber("N");
var bbac_sa1 = new HBPO_CAN_SA(); var bbac_sa1 = new HBPO_CAN_SA();

Loading…
Cancel
Save