|
|
@@ -525,10 +525,10 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
for (HuaTaiInsurancePolicyPrintResponse.ElecDownLoadResultDto elecDownLoadResultDto : urlList) {
|
|
|
String url = elecDownLoadResultDto.getDownURL();
|
|
|
if (InsuranceRisk.TRAFFIC.getCode().equals(riskCode)) {
|
|
|
- crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicy(url, licensePlate + "-交强险", insAreaCompany.getId(), password) + "保单.pdf");
|
|
|
- crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicy(url, licensePlate + "-交强险", insAreaCompany.getId(), password) + "标志.pdf");
|
|
|
+ crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicy(url, licensePlate + "-交强险", insAreaCompany.getId(), password,false));
|
|
|
+ crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicy(url, licensePlate + "-交强险", insAreaCompany.getId(), password,true));
|
|
|
} else if (InsuranceRisk.BUSINESS.getCode().equals(riskCode)) {
|
|
|
- crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicy(url, licensePlate + "-商业险", insAreaCompany.getId(), password) + "保单.pdf");
|
|
|
+ crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicy(url, licensePlate + "-商业险", insAreaCompany.getId(), password,false));
|
|
|
}
|
|
|
/**
|
|
|
* 先下载到本地,然后再解压到固定路径
|
|
|
@@ -541,9 +541,9 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
return HttpResult.ok("下载成功", crawlerPolicyPrintVo);
|
|
|
}
|
|
|
|
|
|
- public String gainCarInsPolicy(String url, String fileName, String licensePlate, String password) {
|
|
|
+ public String gainCarInsPolicy(String url, String fileName, String licensePlate, String password,Boolean isBz) {
|
|
|
String dir = "carInsPolicy/" + licensePlate + "/";
|
|
|
- return FileUtil.netUrlStoreToLocal(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl, password, licensePlate);
|
|
|
+ return FileUtil.netUrlStoreToLocal(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl, password, licensePlate,isBz);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -942,10 +942,10 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
for (HuaTaiInsurancePolicyPrintResponse.ElecDownLoadResultDto elecDownLoadResultDto : urlList) {
|
|
|
String url = elecDownLoadResultDto.getDownURL();
|
|
|
if (InsuranceRisk.TRAFFIC.getCode().equals(jqFlag)) {
|
|
|
- crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBD.getDesc(), insAreaCompany.getId(), pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.JQBD.getCode(), password, flag));
|
|
|
- crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBZ.getDesc(), insAreaCompany.getId(), pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.JQBZ.getCode(), password, flag));
|
|
|
+ crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBD.getDesc(), insAreaCompany.getId(), pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.JQBD.getCode(), password, flag,false));
|
|
|
+ crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBZ.getDesc(), insAreaCompany.getId(), pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.JQBZ.getCode(), password, flag,true));
|
|
|
} else if (InsuranceRisk.BUSINESS.getCode().equals(jqFlag)) {
|
|
|
- crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.SYBD.getDesc(), insAreaCompany.getId(), pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.SYBD.getCode(), password, flag));
|
|
|
+ crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicyNew(url, pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.SYBD.getDesc(), insAreaCompany.getId(), pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.SYBD.getCode(), password, flag,false));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -965,9 +965,9 @@ public class HuaTaiOrderApiServiceImpl implements HuaTaiOrderApiService {
|
|
|
* @Date: 2024/10/18 9:37
|
|
|
* @Description: 新路径
|
|
|
*/
|
|
|
- public String gainCarInsPolicyNew(String url, String fileName, String subOrderId, String password, String path, boolean flag) {
|
|
|
+ public String gainCarInsPolicyNew(String url, String fileName, String subOrderId, String password, String path, boolean flag,Boolean isBz) {
|
|
|
String dir = "carInsPolicyNew/" + subOrderId + "/";
|
|
|
- return FileUtil.netUrlStoreToLocalNew(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl,path , password, flag);
|
|
|
+ return FileUtil.netUrlStoreToLocalNew(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl,path , password, flag,isBz);
|
|
|
}
|
|
|
|
|
|
}
|