|
@@ -2,6 +2,7 @@ package com.jzg.commons.entity.agreement.vo;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.jzg.commons.core.base.PageRequest;
|
|
import com.jzg.commons.core.base.PageRequest;
|
|
|
|
|
+import com.jzg.commons.entity.agreement.po.PtlCrawlerApi;
|
|
|
import com.jzg.commons.entity.agreement.po.PtlInsAttributionTemplate;
|
|
import com.jzg.commons.entity.agreement.po.PtlInsAttributionTemplate;
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
@@ -10,17 +11,21 @@ import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@Data
|
|
@Data
|
|
|
-public class PtlInsAttributionTemplateVo extends PageRequest {
|
|
|
|
|
|
|
+public class PtlInsAttributionTemplateVo{
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
private String id;
|
|
private String id;
|
|
|
|
|
|
|
|
|
|
+ private String title;
|
|
|
|
|
+
|
|
|
|
|
+ private String name;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* api类型(1、api对接,2、python对接)
|
|
* api类型(1、api对接,2、python对接)
|
|
|
*/
|
|
*/
|
|
|
- private Integer apiType;
|
|
|
|
|
|
|
+ private String apiType;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 保险公司ID
|
|
* 保险公司ID
|
|
@@ -37,6 +42,36 @@ public class PtlInsAttributionTemplateVo extends PageRequest {
|
|
|
*/
|
|
*/
|
|
|
private List<Field> fields;
|
|
private List<Field> fields;
|
|
|
|
|
|
|
|
|
|
+ private List<PtlCrawlerApi> api;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @Schema(description = "归属配置")
|
|
|
|
|
+ private String attributionConfig;
|
|
|
|
|
+
|
|
|
|
|
+ @Schema(description = "报价")
|
|
|
|
|
+ private String quotation;
|
|
|
|
|
+
|
|
|
|
|
+ @Schema(description = "影像上传")
|
|
|
|
|
+ private String imageUpload;
|
|
|
|
|
+
|
|
|
|
|
+ @Schema(description = "核保")
|
|
|
|
|
+ private String insurance;
|
|
|
|
|
+
|
|
|
|
|
+ @Schema(description = "缴费查询")
|
|
|
|
|
+ private String paymentQuery;
|
|
|
|
|
+
|
|
|
|
|
+ @Schema(description = "保单下载")
|
|
|
|
|
+ private String policyDownload;
|
|
|
|
|
+
|
|
|
|
|
+ @Schema(description = "非车险查询")
|
|
|
|
|
+ private String nonCarInsurance;
|
|
|
|
|
+
|
|
|
|
|
+ @Schema(description = "人工核保状态刷新")
|
|
|
|
|
+ private String manualStatusRefresh;
|
|
|
|
|
+
|
|
|
|
|
+ @Schema(description = "撤销订单")
|
|
|
|
|
+ private String revokeOrder;
|
|
|
|
|
+
|
|
|
@Data
|
|
@Data
|
|
|
public static class Field{
|
|
public static class Field{
|
|
|
@Schema(description = "字段类型")
|
|
@Schema(description = "字段类型")
|
|
@@ -63,14 +98,52 @@ public class PtlInsAttributionTemplateVo extends PageRequest {
|
|
|
vo.setApiType(ptlInsAttributionTemplate.getApiType());
|
|
vo.setApiType(ptlInsAttributionTemplate.getApiType());
|
|
|
vo.setInsCompanyId(ptlInsAttributionTemplate.getInsCompanyId());
|
|
vo.setInsCompanyId(ptlInsAttributionTemplate.getInsCompanyId());
|
|
|
vo.setInsCompanyName(ptlInsAttributionTemplate.getInsCompanyName());
|
|
vo.setInsCompanyName(ptlInsAttributionTemplate.getInsCompanyName());
|
|
|
|
|
+ vo.setTitle(ptlInsAttributionTemplate.getTitle());
|
|
|
|
|
+ vo.setName(ptlInsAttributionTemplate.getName());
|
|
|
List<Field> fields = new ArrayList<>();
|
|
List<Field> fields = new ArrayList<>();
|
|
|
- ptlInsAttributionTemplate.getFields().forEach(field->{
|
|
|
|
|
- fields.add(JSONObject.parseObject(field.toString(), Field.class));
|
|
|
|
|
- });
|
|
|
|
|
- vo.setFields(fields);
|
|
|
|
|
- vos.add(vo);
|
|
|
|
|
|
|
+ if(ptlInsAttributionTemplate.getFields() != null) {
|
|
|
|
|
+ ptlInsAttributionTemplate.getFields().forEach(field -> {
|
|
|
|
|
+ fields.add(JSONObject.parseObject(field.toString(), Field.class));
|
|
|
|
|
+ });
|
|
|
|
|
+ vo.setFields(fields);
|
|
|
|
|
+ vos.add(vo);
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
return vos;
|
|
return vos;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public void setApi(List<PtlCrawlerApi> ptlCrawlerApiList){
|
|
|
|
|
+ ptlCrawlerApiList.forEach(ptlCrawlerApi -> {
|
|
|
|
|
+ switch(ptlCrawlerApi.getApiType()){
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ this.attributionConfig = ptlCrawlerApi.getUrl();
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 2:
|
|
|
|
|
+ this.quotation = ptlCrawlerApi.getUrl();
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 3:
|
|
|
|
|
+ this.imageUpload = ptlCrawlerApi.getUrl();
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 4:
|
|
|
|
|
+ this.insurance = ptlCrawlerApi.getUrl();
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 5:
|
|
|
|
|
+ this.paymentQuery = ptlCrawlerApi.getUrl();
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 6:
|
|
|
|
|
+ this.policyDownload = ptlCrawlerApi.getUrl();
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 7:
|
|
|
|
|
+ this.nonCarInsurance = ptlCrawlerApi.getUrl();
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 8:
|
|
|
|
|
+ this.manualStatusRefresh = ptlCrawlerApi.getUrl();
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 9:
|
|
|
|
|
+ this.revokeOrder = ptlCrawlerApi.getUrl();
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|