|
|
@@ -1,6 +1,7 @@
|
|
|
package com.ydtech.modules.order.entity.api.zm.request;
|
|
|
|
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
import com.ydtech.modules.ins.vo.CarInfoVo;
|
|
|
import com.ydtech.modules.ins.vo.CustomerInfoVo;
|
|
|
@@ -13,7 +14,9 @@ import com.ydtech.modules.order.entity.api.zm.constants.TimeConstants;
|
|
|
import com.ydtech.modules.order.entity.api.zm.constants.TransCode;
|
|
|
import com.ydtech.modules.order.entity.api.zm.constants.enums.ContractEnum;
|
|
|
import com.ydtech.modules.order.entity.api.zm.response.ModelsQueryResponse;
|
|
|
+import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
|
|
|
import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
|
|
|
+import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
|
|
|
import com.ydtech.utils.StringUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
@@ -42,13 +45,11 @@ public class QuotedPriceRequest extends BaseRequest {
|
|
|
|
|
|
private static final long serialVersionUID = 751466864923522868L;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
@JsonProperty("businessData")
|
|
|
private BusinessDataDTO businessData;
|
|
|
|
|
|
- public QuotedPriceRequest(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO) {
|
|
|
- this.businessData = new BusinessDataDTO(baseQuoteInfoVo, simpleStadarCarDTO);
|
|
|
+ public QuotedPriceRequest(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO, AccidentalDrivingVo accidentalDrivingVo) {
|
|
|
+ this.businessData = new BusinessDataDTO(baseQuoteInfoVo, simpleStadarCarDTO, accidentalDrivingVo);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -80,9 +81,9 @@ public class QuotedPriceRequest extends BaseRequest {
|
|
|
|
|
|
// 驾意险
|
|
|
@JsonProperty("accident")
|
|
|
- private List<Object> accident;
|
|
|
+ private List<AccidentDTO> accident;
|
|
|
|
|
|
- public BusinessDataDTO(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO) {
|
|
|
+ public BusinessDataDTO(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO, AccidentalDrivingVo accidentalDrivingVo) {
|
|
|
CarInfoVo carInfo = baseQuoteInfoVo.getCarInfo();
|
|
|
List<RiskInfoVo> riskList = baseQuoteInfoVo.getRiskList();
|
|
|
List<KindInfoVo> kindList = baseQuoteInfoVo.getKindList();
|
|
|
@@ -98,7 +99,22 @@ public class QuotedPriceRequest extends BaseRequest {
|
|
|
this.contract = new ContractDTO().getContract(riskList, kindList, i - 1);
|
|
|
// 客户信息
|
|
|
this.customer = new CustomerDTO().getCustomers(ownerInfo, policyHolderInfo, insuredPersonInfo);
|
|
|
+ // 驾意险
|
|
|
+ if(ObjectUtil.isNotEmpty(accidentalDrivingVo)){
|
|
|
+ this.accident = Collections.singletonList(new AccidentDTO(accidentalDrivingVo.getRideRiskCode(), accidentalDrivingVo.getQuantity()));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ @AllArgsConstructor
|
|
|
+ @NoArgsConstructor
|
|
|
+ @Data
|
|
|
+ public static class AccidentDTO {
|
|
|
+ // 方案代码
|
|
|
+ @JsonProperty("rideRiskCode")
|
|
|
+ private String rideRiskCode;
|
|
|
+ // 投保份数
|
|
|
+ @JsonProperty("quantity")
|
|
|
+ private int quantity;
|
|
|
}
|
|
|
|
|
|
|