|
|
@@ -4,11 +4,14 @@ import com.alibaba.fastjson.annotation.JSONField;
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
import com.ydtech.modules.ins.model.vo.CustomerInfoVo;
|
|
|
+import com.ydtech.modules.order.entity.api.guoren.constants.GuoRenRiskCode;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
|
+import com.ydtech.modules.order.entity.vo.guoren.GuoRenSpecialAgreementVo;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 投保单保存 入参
|
|
|
@@ -30,6 +33,7 @@ public class InsuranceSlipReq {
|
|
|
@JsonProperty(value = "biPrptenages")
|
|
|
@JSONField(name = "biPrptenages")
|
|
|
private List<PremiumResp.DataDTO.BiPrptenagesDTO> biPrptenages;
|
|
|
+
|
|
|
@JsonProperty(value = "ciPrptenages")
|
|
|
@JSONField(name = "ciPrptenages")
|
|
|
private List<PremiumResp.DataDTO.CiPrptenagesDTO> ciPrptenages;
|
|
|
@@ -41,7 +45,10 @@ public class InsuranceSlipReq {
|
|
|
* 构造请求参数
|
|
|
*/
|
|
|
@JsonIgnore
|
|
|
- public static InsuranceSlipReq buildParam(BaseQuoteInfoVo yaQuoteInfoVo, String carPriceNum, String orderCode, PremiumResp.DataDTO premiumResult) {
|
|
|
+ public static InsuranceSlipReq buildParam(BaseQuoteInfoVo yaQuoteInfoVo,
|
|
|
+ String carPriceNum,
|
|
|
+ String orderCode,
|
|
|
+ List<GuoRenSpecialAgreementVo> specialAgreementVo) {
|
|
|
//投保人
|
|
|
CustomerInfoVo policyHolderInfo = yaQuoteInfoVo.getPolicyHolderInfo();
|
|
|
//被保人
|
|
|
@@ -86,8 +93,19 @@ public class InsuranceSlipReq {
|
|
|
|
|
|
req.setOrder(orderCode);
|
|
|
req.setPrpTinsured(prpTinsured);
|
|
|
- req.setBiPrptenages(premiumResult.getBiPrptenages());
|
|
|
- req.setCiPrptenages(premiumResult.getCiPrptenages());
|
|
|
+
|
|
|
+ List<PremiumResp.DataDTO.CiPrptenagesDTO> ciPrptenages = specialAgreementVo.stream()
|
|
|
+ .filter(x -> GuoRenRiskCode.R_0507.getCode().equals(x.getRiskCode()))
|
|
|
+ .map(PremiumResp.DataDTO.CiPrptenagesDTO::new)
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ List<PremiumResp.DataDTO.BiPrptenagesDTO> biPrptenages = specialAgreementVo.stream()
|
|
|
+ .filter(x -> GuoRenRiskCode.R_0518.getCode().equals(x.getRiskCode()))
|
|
|
+ .map(PremiumResp.DataDTO.BiPrptenagesDTO::new)
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ req.setBiPrptenages(biPrptenages);
|
|
|
+ req.setCiPrptenages(ciPrptenages);
|
|
|
return req;
|
|
|
|
|
|
}
|