|
@@ -718,7 +718,8 @@ public class QuoteVerificationAspect {
|
|
|
InsFeeOrders::setJyCommissionPremium, InsFeeOrders::setJyFollowPremium, InsFeeOrders::setJyAdditionalPremium
|
|
InsFeeOrders::setJyCommissionPremium, InsFeeOrders::setJyFollowPremium, InsFeeOrders::setJyAdditionalPremium
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
- // 7. 计算总应收、总应付并保存
|
|
|
|
|
|
|
+ // 7. 计算总应收、总应付、保存费用比例 入库
|
|
|
|
|
+ saveRatio(insFeeOrders, agreementInfoVo, jqCostType, syCostType, jyCostType);
|
|
|
calculateTotalPremium(insFeeOrders);
|
|
calculateTotalPremium(insFeeOrders);
|
|
|
insFeeOrdersService.save(insFeeOrders);
|
|
insFeeOrdersService.save(insFeeOrders);
|
|
|
}
|
|
}
|
|
@@ -829,6 +830,38 @@ public class QuoteVerificationAspect {
|
|
|
insFeeOrders.setTotalPayablePremium(totalPayable);
|
|
insFeeOrders.setTotalPayablePremium(totalPayable);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 保存比例
|
|
|
|
|
+ */
|
|
|
|
|
+ private void saveRatio(InsFeeOrders insFeeOrders, AgreementInfoVo agreementInfoVo,PtlAgreementCostTypeVo jqCostType,PtlAgreementCostTypeVo syCostType,PtlAgreementCostTypeVo jyCostType) {
|
|
|
|
|
+ // 手续费比例
|
|
|
|
|
+ insFeeOrders.setJqCommissionRatio(convertPercent(agreementInfoVo.getAgreement().getJqEntranceFeeRatio()));
|
|
|
|
|
+ insFeeOrders.setSyCommissionRatio(convertPercent(agreementInfoVo.getAgreement().getSyEntranceFeeRatio()));
|
|
|
|
|
+ insFeeOrders.setJyCommissionRatio(convertPercent(agreementInfoVo.getAgreement().getJyEntranceFeeRatio()));
|
|
|
|
|
+ // 入口比例
|
|
|
|
|
+ insFeeOrders.setJqInletRatio(convertPercent(jqCostType.getInlet()));
|
|
|
|
|
+ insFeeOrders.setSyInletRatio(convertPercent(syCostType.getInlet()));
|
|
|
|
|
+ insFeeOrders.setJyInletRatio(convertPercent(jyCostType.getInlet()));
|
|
|
|
|
+ // 跟单比例
|
|
|
|
|
+ insFeeOrders.setJqFollowRatio(calculateFollowRatio(jqCostType, agreementInfoVo.getAgreement().getJqEntranceFeeRatio()));
|
|
|
|
|
+ insFeeOrders.setSyFollowRatio(calculateFollowRatio(syCostType, agreementInfoVo.getAgreement().getSyEntranceFeeRatio()));
|
|
|
|
|
+ insFeeOrders.setJyFollowRatio(calculateFollowRatio(jyCostType, agreementInfoVo.getAgreement().getJyEntranceFeeRatio()));
|
|
|
|
|
+ // 加投比例
|
|
|
|
|
+ insFeeOrders.setJqAdditionalRatio(convertPercent(jqCostType.getAddThrow()));
|
|
|
|
|
+ insFeeOrders.setSyAdditionalRatio(convertPercent(syCostType.getAddThrow()));
|
|
|
|
|
+ insFeeOrders.setJyAdditionalRatio(convertPercent(jyCostType.getAddThrow()));
|
|
|
|
|
+ // 留点比例
|
|
|
|
|
+ insFeeOrders.setJqKeepPointRatio(convertPercent(jqCostType.getKeepPointRatio()));
|
|
|
|
|
+ insFeeOrders.setSyKeepPointRatio(convertPercent(syCostType.getKeepPointRatio()));
|
|
|
|
|
+ insFeeOrders.setJyKeepPointRatio(convertPercent(jyCostType.getKeepPointRatio()));
|
|
|
|
|
+ // 出口比例
|
|
|
|
|
+ insFeeOrders.setJqExportRatio(convertPercent(jqCostType.getExport()));
|
|
|
|
|
+ insFeeOrders.setSyExportRatio(convertPercent(syCostType.getExport()));
|
|
|
|
|
+ insFeeOrders.setJyExportRatio(convertPercent(jyCostType.getExport()));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// // 获取协议录入的 手续费比例 保留百分比
|
|
// // 获取协议录入的 手续费比例 保留百分比
|
|
|
// BigDecimal jqEntranceFeeRatio = agreementInfoVo.getAgreement().getJqEntranceFeeRatio().divide(BigDecimal.valueOf(100), 10, RoundingMode.HALF_EVEN);
|
|
// BigDecimal jqEntranceFeeRatio = agreementInfoVo.getAgreement().getJqEntranceFeeRatio().divide(BigDecimal.valueOf(100), 10, RoundingMode.HALF_EVEN);
|
|
|
// BigDecimal syEntranceFeeRatio = agreementInfoVo.getAgreement().getSyEntranceFeeRatio().divide(BigDecimal.valueOf(100), 10, RoundingMode.HALF_EVEN);
|
|
// BigDecimal syEntranceFeeRatio = agreementInfoVo.getAgreement().getSyEntranceFeeRatio().divide(BigDecimal.valueOf(100), 10, RoundingMode.HALF_EVEN);
|