|
@@ -52,7 +52,10 @@ public class StatementsServiceImpl extends ServiceImpl<StatementsMapper, Stateme
|
|
|
var actualServiceMoney = statMonthInfo.getServiceMoney()
|
|
var actualServiceMoney = statMonthInfo.getServiceMoney()
|
|
|
- statMonthInfo.getDiscountAmount()
|
|
- statMonthInfo.getDiscountAmount()
|
|
|
- (int) ((statMonthInfo.getActualElecMoney() - statMonthInfo.getElecMoney()) * investorInfo.getElecLossProportion());
|
|
- (int) ((statMonthInfo.getActualElecMoney() - statMonthInfo.getElecMoney()) * investorInfo.getElecLossProportion());
|
|
|
- var splittingAmount = (int) (actualServiceMoney * investorInfo.getSplittingProportion());
|
|
|
|
|
|
|
+ // 总电损电费
|
|
|
|
|
+ var elecLossMoney = statMonthInfo.getActualElecMoney() - statMonthInfo.getElecMoney();
|
|
|
|
|
+ // 分成金额 = 实际参与分成的服务费 * 分成比例 - 电损金额 * 电损承担比例
|
|
|
|
|
+ var splittingAmount = (int) (actualServiceMoney * investorInfo.getSplittingProportion()) - (int) (elecLossMoney * investorInfo.getElecLossProportion());
|
|
|
return new Statements()
|
|
return new Statements()
|
|
|
.setAdminUserId(investorInfo.getAdminUserId())
|
|
.setAdminUserId(investorInfo.getAdminUserId())
|
|
|
.setAdminUserName(investorInfo.getAdminUserName())
|
|
.setAdminUserName(investorInfo.getAdminUserName())
|
|
@@ -65,13 +68,15 @@ public class StatementsServiceImpl extends ServiceImpl<StatementsMapper, Stateme
|
|
|
.setTotalMoney(statMonthInfo.getTotalMoney())
|
|
.setTotalMoney(statMonthInfo.getTotalMoney())
|
|
|
.setElecMoney(statMonthInfo.getElecMoney())
|
|
.setElecMoney(statMonthInfo.getElecMoney())
|
|
|
.setActualElecMoney(statMonthInfo.getActualElecMoney())// 实际抄表电费
|
|
.setActualElecMoney(statMonthInfo.getActualElecMoney())// 实际抄表电费
|
|
|
- .setElecLossMoney(statMonthInfo.getActualElecMoney() - statMonthInfo.getElecMoney()) // 电损电费(分)
|
|
|
|
|
|
|
+ .setElecLossMoney(elecLossMoney) // 电损电费(分)
|
|
|
.setServiceMoney(statMonthInfo.getServiceMoney())
|
|
.setServiceMoney(statMonthInfo.getServiceMoney())
|
|
|
.setDiscountAmount(statMonthInfo.getDiscountAmount())
|
|
.setDiscountAmount(statMonthInfo.getDiscountAmount())
|
|
|
.setServiceMoneyDiscount(statMonthInfo.getServiceMoneyDiscount())
|
|
.setServiceMoneyDiscount(statMonthInfo.getServiceMoneyDiscount())
|
|
|
.setActualServiceMoney(actualServiceMoney) // 实际参与分成的服务费(分)
|
|
.setActualServiceMoney(actualServiceMoney) // 实际参与分成的服务费(分)
|
|
|
.setSplittingProportion(investorInfo.getSplittingProportion()) // 分成比例 0.45表示45%
|
|
.setSplittingProportion(investorInfo.getSplittingProportion()) // 分成比例 0.45表示45%
|
|
|
.setSplittingAmount(splittingAmount) // 分成金额(分)
|
|
.setSplittingAmount(splittingAmount) // 分成金额(分)
|
|
|
|
|
+ .setElecLossProportion(investorInfo.getElecLossProportion()) // 电损承担比例
|
|
|
|
|
+ .setElecLossAmount((int) (elecLossMoney * investorInfo.getElecLossProportion())) // 电损承担金额
|
|
|
.setVatRate(investorInfo.getVatRate()) // 增值税率 0.06表示6%
|
|
.setVatRate(investorInfo.getVatRate()) // 增值税率 0.06表示6%
|
|
|
.setVatAmount((int) (splittingAmount * investorInfo.getVatRate())) // 增值税额(分)
|
|
.setVatAmount((int) (splittingAmount * investorInfo.getVatRate())) // 增值税额(分)
|
|
|
.setActualSplittingAmount(splittingAmount - (int) (splittingAmount * investorInfo.getVatRate())); // 实际分成金额(分)
|
|
.setActualSplittingAmount(splittingAmount - (int) (splittingAmount * investorInfo.getVatRate())); // 实际分成金额(分)
|