|
@@ -2,7 +2,7 @@ package com.ydtech.modules.order.entity.vo.telemarketing;
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.ydtech.modules.fee.entity.po.InsFeeOrderNewHistory;
|
|
import com.ydtech.modules.fee.entity.po.InsFeeOrderNewHistory;
|
|
|
-import com.ydtech.modules.order.entity.vo.FeeOrderNewVo;
|
|
|
|
|
|
|
+import com.ydtech.modules.fee.entity.po.InsFeeTelemarketing;
|
|
|
import com.ydtech.modules.protocols.entity.po.InsFeeOrderNew;
|
|
import com.ydtech.modules.protocols.entity.po.InsFeeOrderNew;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
@@ -13,6 +13,7 @@ import java.io.Serializable;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
|
|
@Data
|
|
@Data
|
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
@@ -24,23 +25,88 @@ public class TelemarketingAuditOrderEditVo implements Serializable {
|
|
|
@ApiModelProperty("出口费用")
|
|
@ApiModelProperty("出口费用")
|
|
|
private List<ExportFeeDTO> exportFee;
|
|
private List<ExportFeeDTO> exportFee;
|
|
|
|
|
|
|
|
- public TelemarketingAuditOrderEditVo(InsFeeOrderNew insFeeOrderNew) {
|
|
|
|
|
|
|
+ public TelemarketingAuditOrderEditVo(InsFeeOrderNew insFeeOrderNew, InsFeeOrderNewHistory insFeeOrderNewHistory, InsFeeTelemarketing insFeeTelemarketing) {
|
|
|
List<ExportFeeDTO> exportFeeDTOS = new ArrayList<>();
|
|
List<ExportFeeDTO> exportFeeDTOS = new ArrayList<>();
|
|
|
- ExportFeeDTO jqExportFee = new ExportFeeDTO("交强险", insFeeOrderNew.getJqPremium(), insFeeOrderNew.getJqCostsExportProportion(),
|
|
|
|
|
- insFeeOrderNew.getJqExportOtherCostsProportion(),
|
|
|
|
|
- insFeeOrderNew.getJqExportSuperviseCostsPremiums(), insFeeOrderNew.getJqExportOtherCostsPremiums());
|
|
|
|
|
- exportFeeDTOS.add(jqExportFee);
|
|
|
|
|
- ExportFeeDTO syExportFee = new ExportFeeDTO("商业险",
|
|
|
|
|
- insFeeOrderNew.getSyPremium(), insFeeOrderNew.getSyCostsExportProportion(),
|
|
|
|
|
- insFeeOrderNew.getSyExportOtherCostsProportion(),
|
|
|
|
|
- insFeeOrderNew.getSyExportSuperviseCostsPremiums(), insFeeOrderNew.getSyExportOtherCostsPremiums()
|
|
|
|
|
- );
|
|
|
|
|
- exportFeeDTOS.add(syExportFee);
|
|
|
|
|
- ExportFeeDTO noExportFee = new ExportFeeDTO("非车险",
|
|
|
|
|
- insFeeOrderNew.getNoPremium(), insFeeOrderNew.getNoCostsExportProportion(),
|
|
|
|
|
- insFeeOrderNew.getNoExportOtherCostsProportion(),
|
|
|
|
|
- insFeeOrderNew.getNoExportSuperviseCostsPremiums(), insFeeOrderNew.getNoExportOtherCostsPremiums());
|
|
|
|
|
- exportFeeDTOS.add(noExportFee);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if(!Objects.isNull(insFeeTelemarketing) && !Objects.isNull(insFeeTelemarketing.getFirstJqTotalProportion())){
|
|
|
|
|
+ ExportFeeDTO jqExportFee = new ExportFeeDTO("交强险", insFeeOrderNew.getJqPremium(), insFeeOrderNew.getJqCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getJqExportOtherCostsProportion(),
|
|
|
|
|
+ insFeeOrderNew.getJqExportSuperviseCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNew.getJqExportOtherCostsPremiums(),
|
|
|
|
|
+ insFeeTelemarketing.getFirstJqTotalProportion(),
|
|
|
|
|
+ BigDecimal.ZERO
|
|
|
|
|
+ );
|
|
|
|
|
+ exportFeeDTOS.add(jqExportFee);
|
|
|
|
|
+ ExportFeeDTO syExportFee = new ExportFeeDTO("商业险",
|
|
|
|
|
+ insFeeOrderNew.getSyPremium(), insFeeOrderNew.getSyCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getSyExportOtherCostsProportion(),
|
|
|
|
|
+ insFeeOrderNew.getSyExportSuperviseCostsPremiums(), insFeeOrderNew.getSyExportOtherCostsPremiums(),
|
|
|
|
|
+ insFeeTelemarketing.getFirstSyTotalProportion(),
|
|
|
|
|
+ BigDecimal.ZERO
|
|
|
|
|
+ );
|
|
|
|
|
+ exportFeeDTOS.add(syExportFee);
|
|
|
|
|
+ ExportFeeDTO noExportFee = new ExportFeeDTO("非车险",
|
|
|
|
|
+ insFeeOrderNew.getNoPremium(), insFeeOrderNew.getNoCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getNoExportOtherCostsProportion(),
|
|
|
|
|
+ insFeeOrderNew.getNoExportSuperviseCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNew.getNoExportOtherCostsPremiums(),
|
|
|
|
|
+ insFeeTelemarketing.getFirstNoTotalProportion(),
|
|
|
|
|
+ BigDecimal.ZERO
|
|
|
|
|
+ );
|
|
|
|
|
+ exportFeeDTOS.add(noExportFee);
|
|
|
|
|
+ } else if (!Objects.isNull(insFeeOrderNewHistory)) {
|
|
|
|
|
+ ExportFeeDTO jqExportFee = new ExportFeeDTO("交强险", insFeeOrderNew.getJqPremium(), insFeeOrderNew.getJqCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getJqExportOtherCostsProportion(),
|
|
|
|
|
+ insFeeOrderNew.getJqExportSuperviseCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNew.getJqExportOtherCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNewHistory.getJqCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNewHistory.getJqExportOtherCostsProportion()
|
|
|
|
|
+ );
|
|
|
|
|
+ exportFeeDTOS.add(jqExportFee);
|
|
|
|
|
+ ExportFeeDTO syExportFee = new ExportFeeDTO("商业险",
|
|
|
|
|
+ insFeeOrderNew.getSyPremium(), insFeeOrderNew.getSyCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getSyExportOtherCostsProportion(),
|
|
|
|
|
+ insFeeOrderNew.getSyExportSuperviseCostsPremiums(), insFeeOrderNew.getSyExportOtherCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNewHistory.getSyCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNewHistory.getSyExportOtherCostsProportion()
|
|
|
|
|
+ );
|
|
|
|
|
+ exportFeeDTOS.add(syExportFee);
|
|
|
|
|
+ ExportFeeDTO noExportFee = new ExportFeeDTO("非车险",
|
|
|
|
|
+ insFeeOrderNew.getNoPremium(), insFeeOrderNew.getNoCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getNoExportOtherCostsProportion(),
|
|
|
|
|
+ insFeeOrderNew.getNoExportSuperviseCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNew.getNoExportOtherCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNewHistory.getNoCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNewHistory.getNoExportOtherCostsProportion()
|
|
|
|
|
+ );
|
|
|
|
|
+ exportFeeDTOS.add(noExportFee);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ ExportFeeDTO jqExportFee = new ExportFeeDTO("交强险", insFeeOrderNew.getJqPremium(), insFeeOrderNew.getJqCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getJqExportOtherCostsProportion(),
|
|
|
|
|
+ insFeeOrderNew.getJqExportSuperviseCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNew.getJqExportOtherCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNew.getJqCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getJqExportOtherCostsProportion()
|
|
|
|
|
+ );
|
|
|
|
|
+ exportFeeDTOS.add(jqExportFee);
|
|
|
|
|
+ ExportFeeDTO syExportFee = new ExportFeeDTO("商业险",
|
|
|
|
|
+ insFeeOrderNew.getSyPremium(), insFeeOrderNew.getSyCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getSyExportOtherCostsProportion(),
|
|
|
|
|
+ insFeeOrderNew.getSyExportSuperviseCostsPremiums(), insFeeOrderNew.getSyExportOtherCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNew.getSyCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getSyExportOtherCostsProportion()
|
|
|
|
|
+ );
|
|
|
|
|
+ exportFeeDTOS.add(syExportFee);
|
|
|
|
|
+ ExportFeeDTO noExportFee = new ExportFeeDTO("非车险",
|
|
|
|
|
+ insFeeOrderNew.getNoPremium(), insFeeOrderNew.getNoCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getNoExportOtherCostsProportion(),
|
|
|
|
|
+ insFeeOrderNew.getNoExportSuperviseCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNew.getNoExportOtherCostsPremiums(),
|
|
|
|
|
+ insFeeOrderNew.getNoCostsExportProportion(),
|
|
|
|
|
+ insFeeOrderNew.getNoExportOtherCostsProportion()
|
|
|
|
|
+ );
|
|
|
|
|
+ exportFeeDTOS.add(noExportFee);
|
|
|
|
|
+ }
|
|
|
this.exportFee = exportFeeDTOS;
|
|
this.exportFee = exportFeeDTOS;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -55,23 +121,33 @@ public class TelemarketingAuditOrderEditVo implements Serializable {
|
|
|
@ApiModelProperty("保费")
|
|
@ApiModelProperty("保费")
|
|
|
private BigDecimal premium;
|
|
private BigDecimal premium;
|
|
|
|
|
|
|
|
|
|
+ @ApiModelProperty("初始总比例")
|
|
|
|
|
+ private BigDecimal firstTotalProportion;
|
|
|
|
|
+
|
|
|
@ApiModelProperty("总比例")
|
|
@ApiModelProperty("总比例")
|
|
|
private BigDecimal totalProportion;
|
|
private BigDecimal totalProportion;
|
|
|
|
|
|
|
|
@ApiModelProperty("总费用")
|
|
@ApiModelProperty("总费用")
|
|
|
private BigDecimal totalAmount;
|
|
private BigDecimal totalAmount;
|
|
|
|
|
|
|
|
|
|
+ @ApiModelProperty("扣减比例")
|
|
|
|
|
+ private BigDecimal subProportion;
|
|
|
|
|
+
|
|
|
public ExportFeeDTO(String title,
|
|
public ExportFeeDTO(String title,
|
|
|
BigDecimal premium,
|
|
BigDecimal premium,
|
|
|
BigDecimal superviseCostsProportion,
|
|
BigDecimal superviseCostsProportion,
|
|
|
BigDecimal otherCostsProportion,
|
|
BigDecimal otherCostsProportion,
|
|
|
BigDecimal superviseCostsPremiums,
|
|
BigDecimal superviseCostsPremiums,
|
|
|
- BigDecimal otherCostsPremiums) {
|
|
|
|
|
|
|
+ BigDecimal otherCostsPremiums,
|
|
|
|
|
+ BigDecimal firstSuperviseCostsProportion,
|
|
|
|
|
+ BigDecimal firstOtherCostsProportion) {
|
|
|
|
|
|
|
|
this.insuranceType = title;
|
|
this.insuranceType = title;
|
|
|
//保费
|
|
//保费
|
|
|
this.premium = premium;
|
|
this.premium = premium;
|
|
|
//总比例
|
|
//总比例
|
|
|
|
|
+ this.firstTotalProportion = firstSuperviseCostsProportion.add(firstOtherCostsProportion);
|
|
|
|
|
+ //总比例
|
|
|
this.totalProportion = superviseCostsProportion.add(otherCostsProportion);
|
|
this.totalProportion = superviseCostsProportion.add(otherCostsProportion);
|
|
|
//总费用
|
|
//总费用
|
|
|
this.totalAmount = superviseCostsPremiums.add(otherCostsPremiums);
|
|
this.totalAmount = superviseCostsPremiums.add(otherCostsPremiums);
|