瀏覽代碼

华泰爬虫报价相关

shenweidong 1 年之前
父節點
當前提交
e4ce248ea1

+ 32 - 6
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/component/HtCrawlerRequestComponent.java

@@ -7,10 +7,7 @@ import com.jzg.quotation.commons.constant.CacheConstant;
 import com.jzg.quotation.huatai.crawler.constant.HtRequestConstant;
 import com.jzg.quotation.huatai.crawler.constant.enums.RequestUrl;
 import com.jzg.quotation.huatai.crawler.entity.Request.*;
-import com.jzg.quotation.huatai.crawler.entity.Response.HtCrawlerCarQueryResponse;
-import com.jzg.quotation.huatai.crawler.entity.Response.HtCrawlerGerUploadUrlResponse;
-import com.jzg.quotation.huatai.crawler.entity.Response.HtCrawlerLoginResponse;
-import com.jzg.quotation.huatai.crawler.entity.Response.HtCrawlerQuoteResponse;
+import com.jzg.quotation.huatai.crawler.entity.Response.*;
 import com.jzg.quotation.huatai.crawler.properties.HuaTaiCrawlerProperties;
 import com.jzg.quotation.huatai.crawler.util.HuaTaiCryptUtil;
 import lombok.RequiredArgsConstructor;
@@ -142,7 +139,36 @@ public class HtCrawlerRequestComponent {
      * @param htCrawlerGerUploadUrlRequest
      * @return
      */
-    public HtCrawlerGerUploadUrlResponse getUploadUrl(HtCrawlerGerUploadUrlRequest htCrawlerGerUploadUrlRequest) {
-        return requestComponent.objectPost(RequestUrl.GET_UPLOAD_URL.getRequestUrl(huaTaiCrawlerProperties.getBaseUrl()), htCrawlerGerUploadUrlRequest, HtCrawlerGerUploadUrlResponse.class, null).getBody();
+    public HtCrawlerGerUploadUrlResponse getUploadUrl(HtCrawlerGerUploadUrlRequest htCrawlerGerUploadUrlRequest, HttpHeaders headers) {
+        return requestComponent.objectPost(RequestUrl.GET_UPLOAD_URL.getRequestUrl(huaTaiCrawlerProperties.getBaseUrl()), htCrawlerGerUploadUrlRequest, HtCrawlerGerUploadUrlResponse.class, headers).getBody();
+    }
+
+    /**
+     * 上传影像
+     * @param htCrawlerUploadUrlRequest
+     * @return
+     */
+    public String uploadImage(HtCrawlerUploadUrlRequest htCrawlerUploadUrlRequest) {
+        return requestComponent.objectPost(RequestUrl.UPLOAD.getRequestUrl(huaTaiCrawlerProperties.getImgUrl()), htCrawlerUploadUrlRequest, String.class, null).getBody();
+    }
+
+    /**
+     * 提交核保
+     * @param htCrawlerSubmitRequest
+     * @param headers
+     * @return
+     */
+    public HtCrawlerSubmitResponse submit(HtCrawlerSubmitRequest htCrawlerSubmitRequest, HttpHeaders headers) {
+        return requestComponent.objectPost(RequestUrl.SUBMIT.getRequestUrl(huaTaiCrawlerProperties.getBaseUrl()), htCrawlerSubmitRequest, HtCrawlerSubmitResponse.class, headers).getBody();
+    }
+
+    /**
+     * 下载保单
+     * @param downloadPolicyRequest
+     * @param headers
+     * @return
+     */
+    public HtCrawlerDownloadPolicyResponse downloadPolicy(HtCrawlerDownloadPolicyRequest downloadPolicyRequest, HttpHeaders headers) {
+        return requestComponent.objectPost(RequestUrl.DOWNLOAD_POLICY.getRequestUrl(huaTaiCrawlerProperties.getBaseUrl()), downloadPolicyRequest, HtCrawlerDownloadPolicyResponse.class, headers ).getBody();
     }
 }

+ 4 - 0
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/constant/enums/RequestUrl.java

@@ -20,6 +20,10 @@ public enum RequestUrl implements CrawlerRequestUrlStandard {
 
     GET_UPLOAD_URL("/htcsp/UploadAction.do?cmd=getUploadUrl", "获取影像上传路径"),
     UPLOAD("/app/ImgFileUpload/upload.do", "影像上传"),
+
+    SUBMIT("/htcsp/checkInsAction.do?cmd=submit4ajax&SS=SS", "提交核保"),
+
+    DOWNLOAD_POLICY("/htcsp/DocumentPrintAction.do?cmd=electronicPolicyEndorseDownload", "下载保单"),
     ;
 
     private final String url;

+ 27 - 0
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/entity/Request/HtCrawlerDownloadPolicyRequest.java

@@ -0,0 +1,27 @@
+package com.jzg.quotation.huatai.crawler.entity.Request;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * @description: 华泰财险 爬虫下载保单 请求参数
+ * @author: shenwd
+ * @date: 2025/5/6 16:50
+ **/
+@Data
+public class HtCrawlerDownloadPolicyRequest implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 3353567114828578881L;
+
+    private String businessno;
+    private String riskcode;
+    private String isbzdownload;
+    private String biztype = "P";
+    private String eleSymbolDownload;
+    private String tmpbiztype = "P";
+    private String ownPrintElectronicFlag;
+    private String isbzdown;
+
+}

+ 4 - 0
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/entity/Request/HtCrawlerGerUploadUrlRequest.java

@@ -16,6 +16,10 @@ public class HtCrawlerGerUploadUrlRequest implements Serializable {
     private static final long serialVersionUID = -6005327261865381259L;
 
     private String proposalNo;
+    /**
+     * 有UP_carcheck和UP_doubleRecord
+     * 暂时默认UP_carcheck
+     */
     private String uploadType = "UP_carcheck";
     private String quotationNo;
     private String isVpn;

+ 894 - 0
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/entity/Request/HtCrawlerSubmitRequest.java

@@ -0,0 +1,894 @@
+package com.jzg.quotation.huatai.crawler.entity.Request;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.jzg.commons.entity.orders.po.InsOrdersCarUserInfo;
+import com.jzg.quotation.commons.entity.vo.aggregated.UnderwritingVo;
+import com.jzg.quotation.commons.entity.vo.underwriting.SpecialAppointmentsVo;
+import com.jzg.quotation.huatai.crawler.entity.HtCrawlerConfigureParameters;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @description: 华泰财险 提交核保 请求参数
+ * @author: shenwd
+ * @date: 2025/5/6 09:05
+ **/
+@Data
+@NoArgsConstructor
+public class HtCrawlerSubmitRequest implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 1814925768981794647L;
+
+    public HtCrawlerSubmitRequest(UnderwritingVo underwritingVo, HtCrawlerConfigureParameters parameters) {
+        //设置车主,投保人,被保人信息
+        List<InsOrdersCarUserInfo> insOrdersCarUserInfoList = underwritingVo.getInsOrdersCarUserInfoList();
+        for (InsOrdersCarUserInfo insOrdersCarUserInfo : insOrdersCarUserInfoList) {
+            switch (insOrdersCarUserInfo.getPolicyPersonType()) {
+                case 1 :
+                    this.carOwnerType = String.valueOf(insOrdersCarUserInfo.getPersonType());
+                    this.carOwnerGender = insOrdersCarUserInfo.getGender();
+                    this.ownerAddress = insOrdersCarUserInfo.getAddr();
+                    this.carOwnerName = insOrdersCarUserInfo.getName();
+                    this.carOwnerCertiType = String.valueOf(insOrdersCarUserInfo.getCerType());
+                    this.carOwnerCertiCode = insOrdersCarUserInfo.getIdentifyNumber();
+                    this.carOwnerMobile = insOrdersCarUserInfo.getMobile();
+                    this.carOwnerAge = String.valueOf(insOrdersCarUserInfo.getAge());
+                    break;
+                case 2 :
+                    break;
+                case 3 :
+                    break;
+            }
+        }
+        List<ClauseDTO> clauseDTOS = new ArrayList<>();
+        for (SpecialAppointmentsVo specialAppointmentsVo : underwritingVo.getSpecialAppointmentsVos()) {
+            ClauseDTO clauseDTO = new ClauseDTO();
+            clauseDTO.setChosedE(specialAppointmentsVo.getClauseCode());
+            clauseDTO.setClausename(specialAppointmentsVo.getClauses());
+            clauseDTO.setClauses(specialAppointmentsVo.getClausesContext());
+            clauseDTO.setRiskcode(specialAppointmentsVo.getRiskCode());
+            clauseDTO.setReadonly("1");
+            clauseDTOS.add(clauseDTO);
+        }
+        this.clauses = clauseDTOS;
+        this.fullcomcode = parameters.getComCode();
+    }
+
+    @JsonProperty("istransactor")
+    private String isTransactor;
+
+    @JsonProperty("istransactormobile")
+    private String isTransactorMobile;
+
+    @JsonProperty("telemarketFlag")
+    private String teleMarketFlag;
+
+    @JsonProperty("channelCode")
+    private String channelCode;
+
+    @JsonProperty("carMobile")
+    private String carMobile;
+
+    @JsonProperty("appliIdentifyType")
+    private String appliIdentifyType;
+
+    @JsonProperty("insuredIdentifyType")
+    private String insuredIdentifyType;
+
+    @JsonProperty("ownerIdentifyType")
+    private String ownerIdentifyType;
+
+    @JsonProperty("insured_individualBusiness")
+    private String insuredIndividualBusiness;
+
+    @JsonProperty("autonuclearFlag")
+    private String autoNuclearFlag;
+
+    @JsonProperty("isSubmitProduct")
+    private String isSubmitProduct;
+
+    @JsonProperty("recommendName")
+    private String recommendName;
+
+    @JsonProperty("checkDifferentYear")
+    private String checkDifferentYear;
+
+    @JsonProperty("carvotype")
+    private String carVoType;
+
+    @JsonProperty("insVotype")
+    private String insVoType;
+
+    @JsonProperty("areaSwitch")
+    private String areaSwitch;
+
+    @JsonProperty("bicategory")
+    private String biCategory;
+
+    @JsonProperty("cicategory")
+    private String ciCategory;
+
+    @JsonProperty("banliren")
+    private String transactors;
+
+    @JsonProperty("SHMergeSwitch")
+    private String SHMergeSwitch;
+
+    @JsonProperty("UnifiedMergeSwitch")
+    private String unifiedMergeSwitch;
+
+    @JsonProperty("stagFlag")
+    private String stagFlag;
+
+    @JsonProperty("tmppaperscrestartdate")
+    private String tmpPaperscreStartDate;
+
+    @JsonProperty("paperscrestartdate")
+    private String paperscreStartDate;
+
+    @JsonProperty("tmppapersvaliddate")
+    private String tmpPapersValidDate;
+
+    @JsonProperty("papersvaliddate")
+    private String papersValidDate;
+
+    @JsonProperty("risklevel")
+    private String riskLevel;
+
+    @JsonProperty("registration")
+    private String registration;
+
+    @JsonProperty("monitorrecord")
+    private String monitorRecord;
+
+    @JsonProperty("riskwarninfo")
+    private String riskWarnInfo;
+
+    @JsonProperty("tel")
+    private String tel;
+
+    @JsonProperty("email")
+    private String email;
+
+    @JsonProperty("community")
+    private String community;
+
+    @JsonProperty("province")
+    private String province;
+
+    @JsonProperty("city")
+    private String city;
+
+    @JsonProperty("district")
+    private String district;
+
+    @JsonProperty("street")
+    private String street;
+
+    @JsonProperty("sales_position2")
+    private String salesPosition2;
+
+    @JsonProperty("position_value2")
+    private String positionValue2;
+
+    @JsonProperty("position_name2")
+    private String positionName2;
+
+    @JsonProperty("sales_position")
+    private String salesPosition;
+
+    @JsonProperty("position")
+    private String position;
+
+    @JsonProperty("position_name")
+    private String positionName;
+
+    @JsonProperty("customerno")
+    private String customerNo;
+
+    @JsonProperty("workname")
+    private String workName;
+
+    @JsonProperty("workphone")
+    private String workPhone;
+
+    @JsonProperty("yearmoney")
+    private String yearMoney;
+
+    @JsonProperty("workaddress")
+    private String workAddress;
+
+    @JsonProperty("otherphone")
+    private String otherPhone;
+
+    @JsonProperty("otheraddress")
+    private String otherAddress;
+
+    @JsonProperty("ccontrollerName")
+    private String ccontrollerName;
+
+    @JsonProperty("ccontrollerIdentifyType")
+    private String ccontrollerIdentifyType;
+
+    @JsonProperty("ccontrollerIdentifyCode")
+    private String ccontrollerIdentifyCode;
+
+    @JsonProperty("ccontrollerStartPeriod")
+    private String ccontrollerStartPeriod;
+
+    @JsonProperty("ccontrollerValidityPeriod")
+    private String ccontrollerValidityPeriod;
+
+    @JsonProperty("beibaoren_id")
+    private String beibaorenId;
+
+    @JsonProperty("isSZteamcarReportFlag")
+    private String isSZteamcarReportFlag;
+
+    @JsonProperty("iscarowenerflag")
+    private String isCarOwenerFlag;
+
+    @JsonProperty("tmpinsuredpaperscrestartdate")
+    private String tmpInsuredPaperscreStartDate;
+
+    @JsonProperty("insuredpaperscrestartdate")
+    private String insuredPaperscreStartDate;
+
+    @JsonProperty("insuredpapersvaliddate")
+    private String insuredPapersValidDate;
+
+    @JsonProperty("insuredpapersdate")
+    private String insuredPapersDate;
+
+    @JsonProperty("insuredrisklevel")
+    private String insuredRiskLevel;
+
+    @JsonProperty("registration1")
+    private String registration1;
+
+    @JsonProperty("monitorrecord1")
+    private String monitorrecord1;
+
+    @JsonProperty("riskwarninfo1")
+    private String riskWarnInfo1;
+
+    @JsonProperty("_tel")
+    private String _tel;
+
+    @JsonProperty("b_email")
+    private String bEmail;
+
+    @JsonProperty("_community")
+    private String _community;
+
+    @JsonProperty("_province")
+    private String _province;
+
+    @JsonProperty("_city")
+    private String _city;
+
+    @JsonProperty("_district")
+    private String _district;
+
+    @JsonProperty("_street")
+    private String _street;
+
+    @JsonProperty("sales_insuredposition2")
+    private String salesInsuredPosition2;
+
+    @JsonProperty("insuredposition2")
+    private String insuredPosition2;
+
+    @JsonProperty("insuredposition_name2")
+    private String insuredPositionName2;
+
+    @JsonProperty("sales_insuredposition")
+    private String salesInsuredPosition;
+
+    @JsonProperty("insuredposition")
+    private String insuredPosition;
+
+    @JsonProperty("insuredposition_name")
+    private String insuredPositionName;
+
+    @JsonProperty("bbr_beneficiaryName")
+    private String bbrBeneficiaryName;
+
+    @JsonProperty("bbr_beneficiaryIdentifyType")
+    private String bbrBeneficiaryIdentifyType;
+
+    @JsonProperty("bbr_beneficiaryIdentifyCode")
+    private String bbrBeneficiaryIdentifyCode;
+
+    @JsonProperty("bbr_IdentifyStartPeriod")
+    private String bbrIdentifyStartPeriod;
+
+    @JsonProperty("bbr_IdentifyValidityPeriod")
+    private String bbrIdentifyValidityPeriod;
+
+    @JsonProperty("bbr_beneficiaryAddress")
+    private String bbrBeneficiaryAddress;
+
+    @JsonProperty("bbr_beneficiarymethod")
+    private String bbrBeneficiaryMethod;
+
+    @JsonProperty("bbr_beneficiaryaccountfor")
+    private String bbrBeneficiaryAccountfor;
+
+    @JsonProperty("bcontrollerName")
+    private String bcontrollerName;
+
+    @JsonProperty("bcontrollerIdentifyType")
+    private String bcontrollerIdentifyType;
+
+    @JsonProperty("bcontrollerIdentifyCode")
+    private String bcontrollerIdentifyCode;
+
+    @JsonProperty("bcontrollerStartPeriod")
+    private String bcontrollerStartPeriod;
+
+    @JsonProperty("bcontrollerValidityPeriod")
+    private String bcontrollerValidityPeriod;
+
+    @JsonProperty("bcustomerno")
+    private String bcustomerNo;
+
+    @JsonProperty("bworkname")
+    private String bworkName;
+
+    @JsonProperty("bworkphone")
+    private String bworkphone;
+
+    @JsonProperty("byearmoney")
+    private String byearmoney;
+
+    @JsonProperty("bworkaddress")
+    private String bworkAddress;
+
+    @JsonProperty("botherphone")
+    private String botherPhone;
+
+    @JsonProperty("botheraddress")
+    private String botherAddress;
+
+    @JsonProperty("i_iscarowner")
+    private String iisCarOwner;
+
+    @JsonProperty("appliBirthDay")
+    private String appliBirthDay;
+
+    @JsonProperty("transactor1_nam")
+    private String transactorNam;
+
+    @JsonProperty("transactoridentifytype1")
+    private String transactorIdentifyType1;
+
+    @JsonProperty("transtartdate1")
+    private String transtartdate1;
+
+    @JsonProperty("transtartsactorexpirydate1")
+    private String transtartsactorexpirydate1;
+
+    @JsonProperty("tranvaliddate1")
+    private String tranValidDate1;
+
+    @JsonProperty("transactorexpirydate1")
+    private String transactorExpiryDate1;
+
+    @JsonProperty("transactoridentifycode1")
+    private String transactorIdentifyCode1;
+
+    @JsonProperty("transactormobile1")
+    private String transactorMobile1;
+
+    @JsonProperty("car_owner_type")
+    private String carOwnerType;
+
+    @JsonProperty("car_owner_gender")
+    private String carOwnerGender;
+
+    @JsonProperty("owner_ecn")
+    private String ownerEcn;
+
+    @JsonProperty("owner_risk_level")
+    private String ownerRiskLevel;
+
+    @JsonProperty("owner_address")
+    private String ownerAddress;
+
+    @JsonProperty("owner_linker_name")
+    private String ownerLinkerName;
+
+    @JsonProperty("owner_linker_relation")
+    private String ownerLinkerRelation;
+
+    @JsonProperty("owner_linker_nation")
+    private String ownerLinkerNation;
+
+    @JsonProperty("owner_blr")
+    private String ownerBlr;
+
+    @JsonProperty("car_owner_name")
+    private String carOwnerName;
+
+    @JsonProperty("car_owner_certi_type")
+    private String carOwnerCertiType;
+
+    @JsonProperty("car_owner_certi_code")
+    private String carOwnerCertiCode;
+
+    @JsonProperty("car_owner_mobile")
+    private String carOwnerMobile;
+
+    @JsonProperty("car_owner_age")
+    private String carOwnerAge;
+
+    @JsonProperty("car_owner_enterprisename")
+    private String carOwnerEnterprisename;
+
+    @JsonProperty("car_owner_secrecyunitflag")
+    private String carOwnerSecrecyunitFlag;
+
+    @JsonProperty("car_owner_samid")
+    private String carOwnerSamid;
+
+    @JsonProperty("insVocode")
+    private String insVocode;
+
+    @JsonProperty("ins_type")
+    private String insType;
+
+    @JsonProperty("certi_type")
+    private String certiType;
+
+    @JsonProperty("certi_code")
+    private String certiCode;
+
+    @JsonProperty("insured_name")
+    private String insuredName;
+
+    @JsonProperty("gender")
+    private String gender;
+
+    @JsonProperty("tmpprostartdate")
+    private String tmpProStartDate;
+
+    @JsonProperty("prostartdate")
+    private String proStartDate;
+
+    @JsonProperty("tmpprovaliddate")
+    private String tmpProValidDate;
+
+    @JsonProperty("provaliddate")
+    private String proValidDate;
+
+    @JsonProperty("tAge")
+    private String tAge;
+
+    @JsonProperty("risk_level")
+    private String risk_level;
+
+    @JsonProperty("p_registration")
+    private String pRegistration;
+
+    @JsonProperty("appliUnitproperties")
+    private String appliUnitProperties;
+
+    @JsonProperty("appliHolderandcomrelation")
+    private String appliHoldeRandcomRelation;
+
+    @JsonProperty("p_monitorrecord")
+    private String pMonitorRecord;
+
+    @JsonProperty("p_riskwarninfo")
+    private String pRiskWarnInfo;
+
+    @JsonProperty("smallEnterpriseFlagName")
+    private String smallEnterpriseFlagName;
+
+    @JsonProperty("enterpriseNatureName")
+    private String enterPriseNatureName;
+
+    @JsonProperty("j_iscom")
+    private String jIscom;
+
+    @JsonProperty("j_swh")
+    private String jSwh;
+
+    @JsonProperty("j_ecn")
+    private String jEcn;
+
+    @JsonProperty("j_insured_name")
+    private String jInsuredName;
+
+    @JsonProperty("j_enter_no")
+    private String j_enter_no;
+
+    @JsonProperty("TRANSACTOR_NAME")
+    private String transactorName;
+
+    @JsonProperty("transactoridentifytype")
+    private String transactorIdentifyType;
+
+    @JsonProperty("transactoridentifycode")
+    private String transactorIdentifyCode;
+
+    @JsonProperty("transtartdate")
+    private String transtartdate;
+
+    @JsonProperty("transtartsactorexpirydate")
+    private String transtartsactorexpirydate;
+
+    @JsonProperty("tranvaliddate")
+    private String tranvaliddate;
+
+    @JsonProperty("transactorexpirydate")
+    private String transactorexpirydate;
+
+    @JsonProperty("transactormobile")
+    private String transactormobile;
+
+    @JsonProperty("c_risk_level")
+    private String c_risk_level;
+
+    @JsonProperty("c_comregistration")
+    private String c_comregistration;
+
+    @JsonProperty("unitUnitproperties")
+    private String unitUnitproperties;
+
+    @JsonProperty("unitHolderandcomrelation")
+    private String unitHolderandcomrelation;
+
+    @JsonProperty("c_commonitorrecord")
+    private String c_commonitorrecord;
+
+    @JsonProperty("c_comriskwarninfo")
+    private String c_comriskwarninfo;
+
+    @JsonProperty("t_tel")
+    private String t_tel;
+
+    @JsonProperty("t_email")
+    private String t_email;
+
+    @JsonProperty("t_community")
+    private String t_community;
+
+    @JsonProperty("t_province")
+    private String t_province;
+
+    @JsonProperty("t_city")
+    private String t_city;
+
+    @JsonProperty("tcity")
+    private String tcity;
+
+    @JsonProperty("t_district")
+    private String t_district;
+
+    @JsonProperty("tdistrict")
+    private String tdistrict;
+
+    @JsonProperty("t_street")
+    private String t_street;
+
+    @JsonProperty("sales_tposition2")
+    private String sales_tposition2;
+
+    @JsonProperty("tposition2")
+    private String tposition2;
+
+    @JsonProperty("tposition_name2")
+    private String tposition_name2;
+
+    @JsonProperty("sales_tposition")
+    private String sales_tposition;
+
+    @JsonProperty("tposition")
+    private String tposition;
+
+    @JsonProperty("tposition_name")
+    private String tposition_name;
+
+    @JsonProperty("tcustomerno")
+    private String tcustomerno;
+
+    @JsonProperty("tworkrange")
+    private String tworkrange;
+
+    @JsonProperty("tcompanymoney")
+    private String tcompanymoney;
+
+    @JsonProperty("tmoneytype")
+    private String tmoneytype;
+
+    @JsonProperty("tcompanyname")
+    private String tcompanyname;
+
+    @JsonProperty("tcompanynumber")
+    private String tcompanynumber;
+
+    @JsonProperty("tcompanylimitdate")
+    private String tcompanylimitdate;
+
+    @JsonProperty("tfzname")
+    private String tfzname;
+
+    @JsonProperty("tfztype")
+    private String tfztype;
+
+    @JsonProperty("tfzstartdate")
+    private String tfzstartdate;
+
+    @JsonProperty("tfzlimitdate")
+    private String tfzlimitdate;
+
+    @JsonProperty("tfzcode")
+    private String tfzcode;
+
+    @JsonProperty("tbr_beneficiaryName")
+    private String tbr_beneficiaryName;
+
+    @JsonProperty("tbr_beneficiaryIdentifyType")
+    private String tbr_beneficiaryIdentifyType;
+
+    @JsonProperty("tbr_beneficiaryIdentifyCode")
+    private String tbr_beneficiaryIdentifyCode;
+
+    @JsonProperty("tbr_IdentifyStartPeriod")
+    private String tbr_IdentifyStartPeriod;
+
+    @JsonProperty("tbr_IdentifyValidityPeriod")
+    private String tbr_IdentifyValidityPeriod;
+
+    @JsonProperty("tbr_beneficiaryAddress")
+    private String tbr_beneficiaryAddress;
+
+    @JsonProperty("tbr_beneficiarymethod")
+    private String tbr_beneficiarymethod;
+
+    @JsonProperty("tbr_beneficiaryaccountfor")
+    private String tbr_beneficiaryaccountfor;
+
+    @JsonProperty("tcontrollerName")
+    private String tcontrollerName;
+
+    @JsonProperty("tcontrollerIdentifyType")
+    private String tcontrollerIdentifyType;
+
+    @JsonProperty("tcontrollerIdentifyCode")
+    private String tcontrollerIdentifyCode;
+
+    @JsonProperty("tcontrollerStartPeriod")
+    private String tcontrollerStartPeriod;
+
+    @JsonProperty("tcontrollerValidityPeriod")
+    private String tcontrollerValidityPeriod;
+
+    @JsonProperty("unitproperties")
+    private String unitproperties;
+
+    @JsonProperty("holderandcomrelation")
+    private String holderandcomrelation;
+
+    @JsonProperty("itemName")
+    private String itemName;
+
+    @JsonProperty("kindName")
+    private String kindName;
+
+    @JsonProperty("chargingPostKindCode")
+    private String chargingPostKindCode;
+
+    @JsonProperty("chargingPostItemNo")
+    private String chargingPostItemNo;
+
+    @JsonProperty("chargingPostType")
+    private String chargingPostType;
+
+    @JsonProperty("chargingPostCode")
+    private String chargingPostCode;
+
+    @JsonProperty("chargingPostDate")
+    private String chargingPostDate;
+
+    @JsonProperty("chargingPostYearLimit")
+    private String chargingPostYearLimit;
+
+    @JsonProperty("chargingPostAddress")
+    private String chargingPostAddress;
+
+    @JsonProperty("polcyNo")
+    private String polcyNo;
+
+    @JsonProperty("car_check_reason")
+    private String car_check_reason;
+
+    @JsonProperty("RENEWAL_FLAG")
+    private String RENEWAL_FLAG;
+
+    @JsonProperty("car_checker")
+    private String car_checker;
+
+    @JsonProperty("car_check_time")
+    private String car_check_time;
+
+    @JsonProperty("car_check_record")
+    private String car_check_record;
+
+    @JsonProperty("car_situation")
+    private String car_situation;
+
+    @JsonProperty("isBusiness_to_not")
+    private String isBusiness_to_not;
+
+    @JsonProperty("optionsRadios3")
+    private String optionsRadios3;
+
+    @JsonProperty("SECONDHAND_CAR_FLAG")
+    private String SECONDHAND_CAR_FLAG;
+
+    @JsonProperty("SECONDHAND_CAR_PRICE")
+    private String SECONDHAND_CAR_PRICE;
+
+    @JsonProperty("RESCUE_CARD_TYPE")
+    private String RESCUE_CARD_TYPE;
+
+    @JsonProperty("LOAN_STATUS")
+    private String LOAN_STATUS;
+
+    @JsonProperty("fixed_parkiing")
+    private String fixed_parkiing;
+
+    @JsonProperty("RESCUE_CARD")
+    private String RESCUE_CARD;
+
+    @JsonProperty("AGRICULTURE_RELATED")
+    private String AGRICULTURE_RELATED;
+
+    @JsonProperty("PAY_MODE")
+    private String PAY_MODE;
+
+    @JsonProperty("AREA_CODE")
+    private String AREA_CODE;
+
+    @JsonProperty("REGISTER_AREA")
+    private String REGISTER_AREA;
+
+    @JsonProperty("ARGUESOLUTION")
+    private String ARGUESOLUTION;
+
+    @JsonProperty("ARBITBOARD_NAME")
+    private String ARBITBOARD_NAME;
+
+    @JsonProperty("firstbeneengaged")
+    private String firstbeneengaged;
+
+    @JsonProperty("t_iselec_comcode")
+    private String t_iselec_comcode;
+
+    @JsonProperty("t_iselec_comcode_hubei")
+    private String t_iselec_comcode_hubei;
+
+    @JsonProperty("t_iselec_comcode_back")
+    private String t_iselec_comcode_back;
+
+    @JsonProperty("proElecDisable")
+    private String proElecDisable;
+
+    @JsonProperty("PersonalElecInvoice")
+    private String PersonalElecInvoice;
+
+    @JsonProperty("proposaltype")
+    private String proposaltype;
+
+    @JsonProperty("ownPrintElectronicCI")
+    private String ownPrintElectronicCI;
+
+    @JsonProperty("ownPrintElectronicBI")
+    private String ownPrintElectronicBI;
+
+    @JsonProperty("printtype")
+    private String printtype;
+
+    @JsonProperty("printtype_ci")
+    private String printtype_ci;
+
+    @JsonProperty("auto_uw")
+    private String auto_uw;
+
+    @JsonProperty("promotesaleplanid")
+    private String promotesaleplanid;
+
+    @JsonProperty("APPROVER_COMMENTS")
+    private String APPROVER_COMMENTS;
+
+    @JsonProperty("remark")
+    private String remark;
+
+    @JsonProperty("visaType")
+    private String visaType;
+
+    @JsonProperty("vat_taxno")
+    private String vat_taxno;
+
+    @JsonProperty("vat_account")
+    private String vat_account;
+
+    @JsonProperty("vat_address")
+    private String vat_address;
+
+    @JsonProperty("vat_telephon")
+    private String vat_telephon;
+
+    @JsonProperty("vat_bank")
+    private String vat_bank;
+
+    @JsonProperty("vat_bankname")
+    private String vat_bankname;
+
+    @JsonProperty("vat_bankcode")
+    private String vat_bankcode;
+
+    @JsonProperty("vat_searchInput")
+    private String vat_searchInput;
+
+    @JsonProperty("codecode")
+    private String codecode;
+
+    @JsonProperty("codecname_name")
+    private String codecname_name;
+
+    @JsonProperty("vat_searchInput_astant")
+    private String vat_searchInput_astant;
+
+    private List<ClauseDTO> clauses;
+
+    @JsonProperty("quotationNo")
+    private String quotationNo;
+
+    @JsonProperty("isNext")
+    private String isNext;
+
+    @JsonProperty("fullcomcode")
+    private String fullcomcode;
+
+    @JsonProperty("riskflag")
+    private String riskflag;
+
+    @JsonProperty("qsn")
+    private String qsn;
+
+    @JsonProperty("answer")
+    private String answer;
+
+    @Data
+    public static class ClauseDTO implements Serializable {
+        @Serial
+        private static final long serialVersionUID = 8670228206559591587L;
+
+        @JsonProperty("chosedE")
+        private String chosedE;
+
+        @JsonProperty("clausename")
+        private String clausename;
+
+        @JsonProperty("riskcode")
+        private String riskcode;
+
+        @JsonProperty("isDelete")
+        private String isDelete;
+
+        @JsonProperty("clauses")
+        private String clauses;
+
+        @JsonProperty("readonly")
+        private String readonly;
+    }
+}

+ 2 - 0
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/entity/Request/HtCrawlerUploadUrlRequest.java

@@ -3,6 +3,7 @@ package com.jzg.quotation.huatai.crawler.entity.Request;
 import com.jzg.quotation.huatai.crawler.constant.HtRequestConstant;
 import lombok.Data;
 
+import java.io.File;
 import java.io.Serial;
 import java.io.Serializable;
 
@@ -16,6 +17,7 @@ public class HtCrawlerUploadUrlRequest implements Serializable {
     @Serial
     private static final long serialVersionUID = 6421518360608185005L;
 
+    private File file;
     private String token;
     private String bussModule = HtRequestConstant.BUSS_MODULE;
     private String bussNo;

+ 33 - 0
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/entity/Response/HtCrawlerDownloadPolicyResponse.java

@@ -0,0 +1,33 @@
+package com.jzg.quotation.huatai.crawler.entity.Response;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @description: 华泰财险 爬虫下载保单 返回参数
+ * @author: shenwd
+ * @date: 2025/5/6 17:08
+ **/
+@Data
+public class HtCrawlerDownloadPolicyResponse implements Serializable {
+    @Serial
+    private static final long serialVersionUID = 8724529913368120155L;
+    
+    private String error;
+
+    private List<FtpdownloadJson> ftpdownloadJson;
+
+    private String registresult;
+
+    @Data
+    public static class FtpdownloadJson implements Serializable {
+        @Serial
+        private static final long serialVersionUID = -8399579230111122420L;
+        private String bzdownurl;
+
+        private String downurl;
+    }
+}

File diff suppressed because it is too large
+ 156 - 0
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/entity/Response/HtCrawlerSubmitResponse.java


+ 51 - 8
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/service/Impl/HuaTaiCrawlerRequestImpl.java

@@ -8,19 +8,15 @@ import com.jzg.quotation.commons.constant.InsuranceCode;
 import com.jzg.quotation.commons.entity.vo.aggregated.*;
 import com.jzg.quotation.commons.entity.vo.base.LoginBase;
 import com.jzg.quotation.commons.entity.vo.base.OrderBase;
+import com.jzg.quotation.commons.entity.vo.image.InsuranceImageVo;
 import com.jzg.quotation.commons.filter.CarModelsFilterUtils;
 import com.jzg.quotation.commons.standard.conversion.ConfigureParametersConversion;
 import com.jzg.quotation.huatai.crawler.build.HuaTaiCrawlerQuoteResultsVoBuild;
 import com.jzg.quotation.huatai.crawler.component.HtCrawlerRequestComponent;
 import com.jzg.quotation.huatai.crawler.constant.HtRequestConstant;
 import com.jzg.quotation.huatai.crawler.entity.HtCrawlerConfigureParameters;
-import com.jzg.quotation.huatai.crawler.entity.Request.HtCrawlerCarQueryRequest;
-import com.jzg.quotation.huatai.crawler.entity.Request.HtCrawlerGerUploadUrlRequest;
-import com.jzg.quotation.huatai.crawler.entity.Request.HtCrawlerQuoteRequest;
-import com.jzg.quotation.huatai.crawler.entity.Request.HtCrawlerSaveOneStepRequest;
-import com.jzg.quotation.huatai.crawler.entity.Response.HtCrawlerCarQueryResponse;
-import com.jzg.quotation.huatai.crawler.entity.Response.HtCrawlerGerUploadUrlResponse;
-import com.jzg.quotation.huatai.crawler.entity.Response.HtCrawlerQuoteResponse;
+import com.jzg.quotation.huatai.crawler.entity.Request.*;
+import com.jzg.quotation.huatai.crawler.entity.Response.*;
 import com.jzg.quotation.huatai.crawler.entity.dto.LoginDTO;
 import com.jzg.quotation.huatai.crawler.entity.po.HtCrawlerOrder;
 import com.jzg.quotation.huatai.crawler.service.HtCrawlerOrderService;
@@ -29,6 +25,9 @@ import lombok.RequiredArgsConstructor;
 import org.springframework.http.HttpHeaders;
 import org.springframework.stereotype.Service;
 
+import java.io.*;
+import java.util.Base64;
+
 /**
  * @description: 华泰财险 爬虫报价
  * @author: shenwd
@@ -111,6 +110,13 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
      */
     @Override
     public UnderwritingResultsVo underwriting(UnderwritingVo underwritingVo) throws JsonProcessingException {
+        AttributionInformationVo attributionInformationVo = underwritingVo.getOrder().getAttributionInformationVo();
+        //获取配置信息
+        HtCrawlerConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(HtCrawlerConfigureParameters.class, attributionInformationVo.getConfigInfo());
+        HttpHeaders headers = htCrawlerRequestComponent.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword(), parameters.getComCode());
+
+        HtCrawlerSubmitRequest  htCrawlerSubmitRequest = new HtCrawlerSubmitRequest(underwritingVo, parameters);
+        HtCrawlerSubmitResponse htCrawlerSubmitResponse = htCrawlerRequestComponent.submit(htCrawlerSubmitRequest, headers);
         return null;
     }
 
@@ -132,12 +138,42 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
     @Override
     public void uploadImage(InsuranceUploadImageVo insuranceUploadImageVo) {
         OrderBase orderBase = insuranceUploadImageVo.getOrder();
+        AttributionInformationVo attributionInformationVo = orderBase.getAttributionInformationVo();
+        //获取配置信息
+        HtCrawlerConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(HtCrawlerConfigureParameters.class, attributionInformationVo.getConfigInfo());
+        HttpHeaders headers = htCrawlerRequestComponent.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword(), parameters.getComCode());
+
         HtCrawlerOrder htCrawlerOrder = htCrawlerOrderService.findByOrdersNo(orderBase.getOrdersNo());
         String quotationRelaNo = htCrawlerOrder.getQuotationRelaNo();
         HtCrawlerGerUploadUrlRequest htCrawlerGerUploadUrlRequest = new HtCrawlerGerUploadUrlRequest(quotationRelaNo);
-        HtCrawlerGerUploadUrlResponse uploadUrlResponse = htCrawlerRequestComponent.getUploadUrl(htCrawlerGerUploadUrlRequest);
+        HtCrawlerGerUploadUrlResponse uploadUrlResponse = htCrawlerRequestComponent.getUploadUrl(htCrawlerGerUploadUrlRequest, headers);
         if (HtRequestConstant.GET_UPLOAD_URL_SUCCESS.equals(uploadUrlResponse.getFlag())) {
             String token = uploadUrlResponse.getUrl().substring(uploadUrlResponse.getUrl().lastIndexOf("=") + 1);
+            for (InsuranceImageVo insuranceImageVo : insuranceUploadImageVo.getImageVoList()) {
+                for (InsuranceImageVo.ImageDTO imageDTO : insuranceImageVo.getImageBase64List()) {
+                    HtCrawlerUploadUrlRequest htCrawlerUploadUrlRequest = new HtCrawlerUploadUrlRequest();
+                    htCrawlerUploadUrlRequest.setToken(token);
+                    htCrawlerUploadUrlRequest.setBussNo(quotationRelaNo);
+
+                    String imageBase64Str = imageDTO.getImageBase64Str();
+                    byte[] imageBytes = Base64.getDecoder().decode(imageBase64Str);
+                    //需要设置一个临时图片路径
+                    FileOutputStream fileOutputStream = null;
+                    String filePath = "图片临时路径";
+                    try {
+                        fileOutputStream = new FileOutputStream(filePath);
+                        fileOutputStream.write(imageBytes);
+                        fileOutputStream.close();
+                    } catch (FileNotFoundException e) {
+                        throw new RuntimeException(e);
+                    } catch (IOException e) {
+                        throw new RuntimeException(e);
+                    }
+                    File file = new File(filePath);
+                    htCrawlerUploadUrlRequest.setFile(file);
+                    htCrawlerRequestComponent.uploadImage(htCrawlerUploadUrlRequest);
+                }
+            }
 
         }
     }
@@ -149,6 +185,13 @@ public class HuaTaiCrawlerRequestImpl implements HuaTaiCrawlerRequest {
      */
     @Override
     public DownloadPolicyResultVo downloadPolicy(DownloadPolicyVo downloadPolicyVo) {
+        AttributionInformationVo attributionInformationVo = downloadPolicyVo.getOrder().getAttributionInformationVo();
+        //获取配置信息
+        HtCrawlerConfigureParameters parameters = ConfigureParametersConversion.conversionEntity(HtCrawlerConfigureParameters.class, attributionInformationVo.getConfigInfo());
+        HttpHeaders headers = htCrawlerRequestComponent.getHeaders(attributionInformationVo.getUsername(), attributionInformationVo.getPassword(), parameters.getComCode());
+
+        HtCrawlerDownloadPolicyRequest downloadPolicyRequest = new HtCrawlerDownloadPolicyRequest();
+        HtCrawlerDownloadPolicyResponse htCrawlerDownloadPolicyResponse = htCrawlerRequestComponent.downloadPolicy(downloadPolicyRequest, headers);
         return null;
     }
 

File diff suppressed because it is too large
+ 8 - 0
tenant/insurance/quotation-huatai/src/main/java/com/jzg/quotation/huatai/crawler/util/HuaTaiCryptUtil.java


Some files were not shown because too many files changed in this diff