|
|
@@ -257,6 +257,10 @@ public class QuoteVerificationAspect {
|
|
|
if(Objects.nonNull(insOrdersCosts.getJqPremium()) && insOrdersCosts.getJqPremium().compareTo(BigDecimal.ZERO) == 0){
|
|
|
jqEntranceFeeRatio = BigDecimal.ZERO;
|
|
|
agreementInfoVo.getAgreement().setJqEntranceFeeRatio(jqEntranceFeeRatio);
|
|
|
+ //如果没有保费的话 所有入口和手续费也为0
|
|
|
+ if(Objects.nonNull(jqCostType)){
|
|
|
+ jqCostType.setInlet(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if(Objects.nonNull(syCostType))
|
|
|
@@ -271,6 +275,10 @@ public class QuoteVerificationAspect {
|
|
|
if(Objects.nonNull(insOrdersCosts.getSyPremium()) && insOrdersCosts.getSyPremium().compareTo(BigDecimal.ZERO) == 0){
|
|
|
syEntranceFeeRatio = BigDecimal.ZERO;
|
|
|
agreementInfoVo.getAgreement().setSyEntranceFeeRatio(syEntranceFeeRatio);
|
|
|
+ //如果没有保费的话 所有入口和手续费也为0
|
|
|
+ if(Objects.nonNull(syCostType)){
|
|
|
+ syCostType.setInlet(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if(Objects.nonNull(jyCostType)){
|
|
|
@@ -283,7 +291,11 @@ public class QuoteVerificationAspect {
|
|
|
|
|
|
if(Objects.nonNull(insOrdersCosts.getJyPremium()) && insOrdersCosts.getJyPremium().compareTo(BigDecimal.ZERO) == 0){
|
|
|
jyEntranceFeeRatio = BigDecimal.ZERO;
|
|
|
+ //如果没有保费的话 所有入口和手续费也为0
|
|
|
agreementInfoVo.getAgreement().setJyEntranceFeeRatio(jyEntranceFeeRatio);
|
|
|
+ if(Objects.nonNull(jyCostType)){
|
|
|
+ jyCostType.setInlet(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 4. 计算跟单费比例(入口比例 - 手续费比例)
|
|
|
@@ -585,21 +597,25 @@ public class QuoteVerificationAspect {
|
|
|
BigDecimal firstDistributionRatio = Optional.ofNullable(insFeeOrders.getFirstDistributionRatio()).orElse(BigDecimal.ZERO);
|
|
|
BigDecimal secondDistributionRatio = Optional.ofNullable(insFeeOrders.getSecondDistributionRatio()).orElse(BigDecimal.ZERO);
|
|
|
BigDecimal thirdDistributionRatio = Optional.ofNullable(insFeeOrders.getThirdDistributionRatio()).orElse(BigDecimal.ZERO);
|
|
|
+
|
|
|
insFeeOrders.setJqExportRatio(jqCostType == null ? BigDecimal.ZERO :
|
|
|
(jqCostType.getExport() != null && jqCostType.getExport().compareTo(BigDecimal.ZERO) > 0
|
|
|
? convertPercent(jqCostType.getExport()).subtract(convertPercent(firstDistributionRatio))
|
|
|
.subtract(convertPercent(secondDistributionRatio)).subtract(convertPercent(thirdDistributionRatio))
|
|
|
: BigDecimal.ZERO));
|
|
|
+
|
|
|
insFeeOrders.setSyExportRatio(syCostType == null ? BigDecimal.ZERO :
|
|
|
(syCostType.getExport() != null && syCostType.getExport().compareTo(BigDecimal.ZERO) > 0
|
|
|
? convertPercent(syCostType.getExport()).subtract(convertPercent(firstDistributionRatio))
|
|
|
.subtract(convertPercent(secondDistributionRatio)).subtract(convertPercent(thirdDistributionRatio))
|
|
|
: BigDecimal.ZERO));
|
|
|
+
|
|
|
insFeeOrders.setJyExportRatio(jyCostType == null ? BigDecimal.ZERO :
|
|
|
(jyCostType.getExport() != null && jyCostType.getExport().compareTo(BigDecimal.ZERO) > 0
|
|
|
? convertPercent(jyCostType.getExport()).subtract(convertPercent(firstDistributionRatio))
|
|
|
.subtract(convertPercent(secondDistributionRatio)).subtract(convertPercent(thirdDistributionRatio))
|
|
|
: BigDecimal.ZERO));
|
|
|
+
|
|
|
// 出口留点比例
|
|
|
insFeeOrders.setJqExportKeepPointRatio(jqCostType != null
|
|
|
? convertPercent(jqCostType.getExportKeepPointRatio() != null ? jqCostType.getExportKeepPointRatio() : BigDecimal.ZERO)
|
|
|
@@ -611,6 +627,34 @@ public class QuoteVerificationAspect {
|
|
|
? convertPercent(jyCostType.getExportKeepPointRatio() != null ? jyCostType.getExportKeepPointRatio() : BigDecimal.ZERO)
|
|
|
: BigDecimal.ZERO);
|
|
|
|
|
|
+
|
|
|
+ // 如果保费为0的情况 出口相关的数据都为0
|
|
|
+ if(Objects.nonNull(insFeeOrders.getJqPremium()) && insFeeOrders.getJqPremium().compareTo(BigDecimal.ZERO) == 0)
|
|
|
+ {
|
|
|
+ insFeeOrders.setJqExportRatio(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setJqExportPremium(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setJqExportKeepPointRatio(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setJqExportKeepPointPremium(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setJqKeepPointRatio(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+ if(Objects.nonNull(insFeeOrders.getSyPremium()) && insFeeOrders.getSyPremium().compareTo(BigDecimal.ZERO) == 0)
|
|
|
+ {
|
|
|
+ insFeeOrders.setSyExportRatio(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setSyExportPremium(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setSyExportKeepPointRatio(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setSyExportKeepPointPremium(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setSyKeepPointRatio(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(Objects.nonNull(insFeeOrders.getJyPremium()) && insFeeOrders.getJyPremium().compareTo(BigDecimal.ZERO) == 0)
|
|
|
+ {
|
|
|
+ insFeeOrders.setJyExportRatio(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setJyExportPremium(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setJyExportKeepPointRatio(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setJyExportKeepPointPremium(BigDecimal.ZERO);
|
|
|
+ insFeeOrders.setJyKeepPointRatio(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|