|
|
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
import com.jzg.commons.entity.quote.vo.AccidentalDrivingVo;
|
|
|
import com.jzg.commons.entity.quote.vo.KindInfoVo;
|
|
|
import com.jzg.commons.entity.quote.vo.QuoteVo;
|
|
|
+import com.jzg.commons.entity.quote.vo.RiskInfoVo;
|
|
|
import com.jzg.quotation.commons.utils.DateUtil;
|
|
|
import com.jzg.quotation.hengbang.crawler.entity.response.HbCrawlerRecordResponse;
|
|
|
import lombok.Data;
|
|
|
@@ -80,6 +81,11 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
|
|
|
List<KindInfoVo> kindInfoVoList = quoteVo.getKindInfoVo();
|
|
|
this.risktype = "0";
|
|
|
this.begintimeBi = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
|
|
|
+ if (Objects.nonNull(quoteVo.getCiRiskInfoVo())) {
|
|
|
+ this.begintimeCi = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
|
|
|
+ this.begintimeAccident = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
|
|
|
+ this.risktype = "1";
|
|
|
+ }
|
|
|
if (CollUtil.isNotEmpty(kindInfoVoList)) {
|
|
|
this.epersonliabilityList = getEpersonliabilityList(kindInfoVoList);
|
|
|
this.begintimeBi = DateUtil.toUtcDateTime(quoteVo.getBiRiskInfoVo().getStartDate());
|
|
|
@@ -89,11 +95,6 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
|
|
|
// this.begintimeBi = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
|
|
|
this.epersonliabilityList = new ArrayList<>();
|
|
|
}
|
|
|
- if (Objects.nonNull(quoteVo.getCiRiskInfoVo())) {
|
|
|
- this.begintimeCi = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
|
|
|
- this.begintimeAccident = DateUtil.toUtcDateTime(quoteVo.getCiRiskInfoVo().getStartDate());
|
|
|
- this.risktype = "1";
|
|
|
- }
|
|
|
this.plyappno = plyappno;
|
|
|
this.ecarshiptaxPart = "投保人";
|
|
|
this.taxonomyCode = "02";
|
|
|
@@ -101,11 +102,11 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
|
|
|
this.endtimeBi = "";
|
|
|
this.endtimeCi = "";
|
|
|
this.expdisc = "";
|
|
|
- this.accidentEpolicyFlag = "";
|
|
|
+ this.accidentEpolicyFlag = "Y";
|
|
|
this.effectfLag = null;
|
|
|
this.ecarChargingPosts = new ArrayList<>();
|
|
|
this.carInsureDevices = new ArrayList<>();
|
|
|
- this.accidentInsuranceList = getAccidentInsuranceList(quoteVo.getAccidentalDrivings());
|
|
|
+ this.accidentInsuranceList = getAccidentInsuranceList(quoteVo.getBiRiskInfoVo(), quoteVo.getAccidentalDrivings());
|
|
|
}
|
|
|
|
|
|
public List<EpersonliabilityDTO> getEpersonliabilityList(List<KindInfoVo> kindInfoVoList) {
|
|
|
@@ -122,31 +123,36 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
|
|
|
return epersonliabilityDTOList;
|
|
|
}
|
|
|
|
|
|
- public List<AccidentInsuranceDTO> getAccidentInsuranceList(List<AccidentalDrivingVo> accidentalDrivings) {
|
|
|
+ public List<AccidentInsuranceDTO> getAccidentInsuranceList(RiskInfoVo biRiskInfoVo, List<AccidentalDrivingVo> accidentalDrivings) {
|
|
|
if (accidentalDrivings == null || accidentalDrivings.isEmpty()) {
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
List<AccidentInsuranceDTO> accidentInsuranceList = new ArrayList<>();
|
|
|
for (AccidentalDrivingVo vo : accidentalDrivings) {
|
|
|
- accidentInsuranceList.add(convertToAccidentInsuranceDTO(vo));
|
|
|
+ accidentInsuranceList.add(convertToAccidentInsuranceDTO(biRiskInfoVo, vo));
|
|
|
}
|
|
|
return accidentInsuranceList;
|
|
|
}
|
|
|
|
|
|
- public static AccidentInsuranceDTO convertToAccidentInsuranceDTO(AccidentalDrivingVo vo) {
|
|
|
+ public static AccidentInsuranceDTO convertToAccidentInsuranceDTO(RiskInfoVo biRiskInfoVo, AccidentalDrivingVo vo) {
|
|
|
AccidentInsuranceDTO dto = new AccidentInsuranceDTO();
|
|
|
dto.setNonriskcode(vo.getProductCode().split("_")[1]);
|
|
|
dto.setProgramcode(vo.getProductCode());
|
|
|
dto.setProgramname(vo.getProductName());
|
|
|
+ dto.setBegintime(DateUtil.toUtcDateTime(biRiskInfoVo.getStartDate()));
|
|
|
+ dto.setEndtime(DateUtil.toUtcDateTime(biRiskInfoVo.getEndDate()));
|
|
|
dto.setCompanycode("0107");
|
|
|
- dto.setSuminsured(vo.getSumAmount());
|
|
|
- dto.setSumgrosspremium(vo.getSumPremium());
|
|
|
+ dto.setRelationcarowner("a");
|
|
|
+ dto.setSuminsured("525000");
|
|
|
+ dto.setSumgrosspremium(vo.getPremium());
|
|
|
dto.setIfdefault(true);
|
|
|
dto.setBuynum(vo.getQuantity());
|
|
|
dto.setGgriskprogramclauselist(getGgriskprogramclauseList(vo.getProductCode().split("_")[1], vo.getProductCode()));
|
|
|
dto.setGgriskprogramdetailslist(getGgriskprogramdetailsList(vo.getProductCode().split("_")[1], vo.getProductCode()));
|
|
|
dto.setGgriskprogramdeductiblelist(new ArrayList<>());
|
|
|
- dto.setGgriskprogramparamlist(new ArrayList<>());
|
|
|
+ List<GgriskprogramparamlDTO> ggriskprogramparamlist = new ArrayList<>();
|
|
|
+ ggriskprogramparamlist.add(new GgriskprogramparamlDTO("2021-05-19T07:00:00.000+0000", "subsidy", "99.9", "0107_1119_003", "2021-05-19T07:00:00.000+0000", "1"));
|
|
|
+ dto.setGgriskprogramparamlist(ggriskprogramparamlist);
|
|
|
return dto;
|
|
|
}
|
|
|
|
|
|
@@ -219,10 +225,10 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
|
|
|
detail1.setSerialno(1);
|
|
|
detail1.setKindcode("1119066");
|
|
|
detail1.setKindname("机动车辆驾乘意外伤害保险意外身故保险责任(2024款)");
|
|
|
- detail1.setKindrate("0.225");
|
|
|
- detail1.setKindunitinsured("30000");
|
|
|
- detail1.setKindsuminsured("240000");
|
|
|
- detail1.setKindunitpremium("6.75");
|
|
|
+ detail1.setKindrate("0.098");
|
|
|
+ detail1.setKindunitinsured("50000");
|
|
|
+ detail1.setKindsuminsured("250000");
|
|
|
+ detail1.setKindunitpremium("4.9");
|
|
|
detail1.setKindgrosspremium("54");
|
|
|
list.add(detail1);
|
|
|
|
|
|
@@ -322,13 +328,13 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
|
|
|
private List<GgriskprogramclauseDTO> ggriskprogramclauselist;
|
|
|
private List<Object> ggriskprogramdeductiblelist;
|
|
|
private List<GgriskprogramdetailsDTO> ggriskprogramdetailslist;
|
|
|
- private List<Object> ggriskprogramparamlist;
|
|
|
+ private List<GgriskprogramparamlDTO> ggriskprogramparamlist;
|
|
|
private String familyinsureitem;
|
|
|
private String gasinsureitem;
|
|
|
private String risk1205field;
|
|
|
private String risk1283items;
|
|
|
private String drivingtype;
|
|
|
- private String relationcarowner;
|
|
|
+ private String relationcarowner = "a";
|
|
|
}
|
|
|
|
|
|
@Data
|
|
|
@@ -347,6 +353,28 @@ public class HbCrawlerCalculationRequest extends HbBaseRequest {
|
|
|
private String serialno;
|
|
|
}
|
|
|
|
|
|
+ @Data
|
|
|
+ public static class GgriskprogramparamlDTO implements Serializable {
|
|
|
+ @Serial
|
|
|
+ private static final long serialVersionUID = -9183755801236888529L;
|
|
|
+
|
|
|
+ private String createtime;
|
|
|
+ private String paramname;
|
|
|
+ private String paramvalue;
|
|
|
+ private String programcode;
|
|
|
+ private String updatetime;
|
|
|
+ private String validind;
|
|
|
+
|
|
|
+ public GgriskprogramparamlDTO(String createtime, String paramname, String paramvalue, String programcode, String updatetime, String validind) {
|
|
|
+ this.createtime = createtime;
|
|
|
+ this.updatetime = updatetime;
|
|
|
+ this.paramname = paramname;
|
|
|
+ this.paramvalue = paramvalue;
|
|
|
+ this.programcode = programcode;
|
|
|
+ this.validind = validind;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Data
|
|
|
public static class GgriskprogramdetailsDTO implements Serializable {
|
|
|
@Serial
|