|
@@ -11,6 +11,7 @@ import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.ins.model.vo.*;
|
|
import com.ydtech.modules.ins.model.vo.*;
|
|
|
import com.ydtech.modules.order.components.InsCrawlerOrderComponents;
|
|
import com.ydtech.modules.order.components.InsCrawlerOrderComponents;
|
|
|
import com.ydtech.modules.order.components.InsImagesUploadCacheComponents;
|
|
import com.ydtech.modules.order.components.InsImagesUploadCacheComponents;
|
|
|
|
|
+import com.ydtech.modules.order.components.huatai.HuaTaiUploadImageComponents;
|
|
|
import com.ydtech.modules.order.constants.QuoteNumberConstant;
|
|
import com.ydtech.modules.order.constants.QuoteNumberConstant;
|
|
|
import com.ydtech.modules.order.constants.UnderwritingStatus;
|
|
import com.ydtech.modules.order.constants.UnderwritingStatus;
|
|
|
import com.ydtech.modules.order.dao.SysQuoteRecordMapper;
|
|
import com.ydtech.modules.order.dao.SysQuoteRecordMapper;
|
|
@@ -20,6 +21,7 @@ import com.ydtech.modules.order.entity.crawler.constants.CrawlerVerifyPaymentCon
|
|
|
import com.ydtech.modules.order.entity.crawler.request.*;
|
|
import com.ydtech.modules.order.entity.crawler.request.*;
|
|
|
import com.ydtech.modules.order.entity.crawler.response.*;
|
|
import com.ydtech.modules.order.entity.crawler.response.*;
|
|
|
import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
|
|
import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
|
|
|
|
|
+import com.ydtech.modules.order.entity.dto.InsUploadImagesDto;
|
|
|
import com.ydtech.modules.order.entity.dto.ReadPdfUrlListDto;
|
|
import com.ydtech.modules.order.entity.dto.ReadPdfUrlListDto;
|
|
|
import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
|
|
import com.ydtech.modules.order.entity.po.InsTaskImagesBase64;
|
|
|
import com.ydtech.modules.order.entity.po.SysQuoteRecord;
|
|
import com.ydtech.modules.order.entity.po.SysQuoteRecord;
|
|
@@ -95,6 +97,9 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private SysQuoteRedisService sysQuoteRedisService;
|
|
private SysQuoteRedisService sysQuoteRedisService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private HuaTaiUploadImageComponents huaTaiUploadImageComponents;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void isLogin(PtlAgreementAttributionDto attribution, String companyId, String insCompanyName) {
|
|
public void isLogin(PtlAgreementAttributionDto attribution, String companyId, String insCompanyName) {
|
|
|
|
|
|
|
@@ -139,8 +144,11 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 系统类型
|
|
// 系统类型
|
|
|
- List<PtlAttributionTemplateDto> ptlAttributionTemplateDtos = ptlAgreementAttribution.getFields().toJavaList(PtlAttributionTemplateDto.class);
|
|
|
|
|
- List<PtlAttributionTemplateDto> collect = ptlAttributionTemplateDtos.stream().filter(x -> "form".equals(x.getField())).collect(Collectors.toList());
|
|
|
|
|
|
|
+ List<PtlAttributionTemplateDto> ptlAttributionTemplateDtos = ptlAgreementAttribution.getFields()
|
|
|
|
|
+ .toJavaList(PtlAttributionTemplateDto.class);
|
|
|
|
|
+ List<PtlAttributionTemplateDto> collect = ptlAttributionTemplateDtos.stream()
|
|
|
|
|
+ .filter(x -> "form".equals(x.getField()))
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
if (!collect.isEmpty()) {
|
|
if (!collect.isEmpty()) {
|
|
|
PtlAttributionTemplateDto ptlAttributionTemplateDto = collect.get(0);
|
|
PtlAttributionTemplateDto ptlAttributionTemplateDto = collect.get(0);
|
|
|
String value = ptlAttributionTemplateDto.getValue();
|
|
String value = ptlAttributionTemplateDto.getValue();
|
|
@@ -154,21 +162,27 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
|
|
|
|
|
//判断错误订单是否是重复投保
|
|
//判断错误订单是否是重复投保
|
|
|
InsOrderStatusEnum insOrderStatusEnum = InsOrderStatusEnum.QUOTE_FAILED;
|
|
InsOrderStatusEnum insOrderStatusEnum = InsOrderStatusEnum.QUOTE_FAILED;
|
|
|
- if(response.getMessage().contains("重复投保")){
|
|
|
|
|
|
|
+ if (response.getMessage()
|
|
|
|
|
+ .contains("重复投保")) {
|
|
|
insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
|
|
insOrderStatusEnum = InsOrderStatusEnum.REPEAT_INSURE;
|
|
|
}
|
|
}
|
|
|
- String subOrderNo = insOrdersService.responseFailedOrder(t,quoteInfoVo, ptlAgreementAttribution, order, response.getMessage(), insOrderStatusEnum);
|
|
|
|
|
- if(!Objects.isNull(response.getOther().getMaxQuoteNum())) {
|
|
|
|
|
- int quoteNum = maxQuoteNum - Integer.parseInt(response.getOther().getMaxQuoteNum());
|
|
|
|
|
|
|
+ String subOrderNo = insOrdersService.responseFailedOrder(t, quoteInfoVo, ptlAgreementAttribution, order, response.getMessage(), insOrderStatusEnum);
|
|
|
|
|
+ if (!Objects.isNull(response.getOther()
|
|
|
|
|
+ .getMaxQuoteNum())) {
|
|
|
|
|
+ int quoteNum = maxQuoteNum - Integer.parseInt(response.getOther()
|
|
|
|
|
+ .getMaxQuoteNum());
|
|
|
for (int i = 0; i < quoteNum; i++) {
|
|
for (int i = 0; i < quoteNum; i++) {
|
|
|
- SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(quoteInfoVo.getUserid(),t.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
|
|
|
|
|
- QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
|
|
|
|
|
|
|
+ SysQuoteRecord sysQuoteRecord = new SysQuoteRecord(quoteInfoVo.getUserid(), t.getCompanyId(), quoteInfoVo.getCarInfo()
|
|
|
|
|
+ .getLicenseNo(),
|
|
|
|
|
+ QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode()
|
|
|
|
|
+ .toString(), QuoteNumberConstant.QuoteResult.FAIL.getCode()
|
|
|
|
|
+ .toString());
|
|
|
sysQuoteRecords.add(sysQuoteRecord);
|
|
sysQuoteRecords.add(sysQuoteRecord);
|
|
|
}
|
|
}
|
|
|
sysQuoteRecords.forEach(item -> {
|
|
sysQuoteRecords.forEach(item -> {
|
|
|
item.setSubOrderNo(subOrderNo);
|
|
item.setSubOrderNo(subOrderNo);
|
|
|
});
|
|
});
|
|
|
- if(sysQuoteRecords.size() > 0) {
|
|
|
|
|
|
|
+ if (sysQuoteRecords.size() > 0) {
|
|
|
sysQuoteRecordMapper.insertBatch(sysQuoteRecords);
|
|
sysQuoteRecordMapper.insertBatch(sysQuoteRecords);
|
|
|
//刷新redis中的报价次数
|
|
//刷新redis中的报价次数
|
|
|
sysQuoteRedisService.refreshQuoteNum(t.getCompanyId(), quoteInfoVo.getUserid(), sysQuoteRecords);
|
|
sysQuoteRedisService.refreshQuoteNum(t.getCompanyId(), quoteInfoVo.getUserid(), sysQuoteRecords);
|
|
@@ -182,17 +196,24 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = new InsAreaCompanyAccidentalDriving();
|
|
InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = new InsAreaCompanyAccidentalDriving();
|
|
|
insAreaCompanyAccidentalDriving.convertCrawler(t);
|
|
insAreaCompanyAccidentalDriving.convertCrawler(t);
|
|
|
//如果是太平 将id 设置为 riskcode
|
|
//如果是太平 将id 设置为 riskcode
|
|
|
- if (t.getAccidentalDrivingVo() != null && t.getCompanyId().equals("TPIC1000000")) {
|
|
|
|
|
- JSONObject jsonObject = JSON.parseObject(t.getAccidentalDrivingVo().toString());
|
|
|
|
|
- insAreaCompanyAccidentalDriving.setRideRiskCode(jsonObject.get("id").toString());
|
|
|
|
|
- } else if (t.getAccidentalDrivingVo() != null && t.getCompanyId().equals("TKIC1000000")) {
|
|
|
|
|
- JSONObject jsonObject = JSON.parseObject(t.getAccidentalDrivingVo().toString());
|
|
|
|
|
|
|
+ if (t.getAccidentalDrivingVo() != null && t.getCompanyId()
|
|
|
|
|
+ .equals("TPIC1000000")) {
|
|
|
|
|
+ JSONObject jsonObject = JSON.parseObject(t.getAccidentalDrivingVo()
|
|
|
|
|
+ .toString());
|
|
|
|
|
+ insAreaCompanyAccidentalDriving.setRideRiskCode(jsonObject.get("id")
|
|
|
|
|
+ .toString());
|
|
|
|
|
+ } else if (t.getAccidentalDrivingVo() != null && t.getCompanyId()
|
|
|
|
|
+ .equals("TKIC1000000")) {
|
|
|
|
|
+ JSONObject jsonObject = JSON.parseObject(t.getAccidentalDrivingVo()
|
|
|
|
|
+ .toString());
|
|
|
insAreaCompanyAccidentalDriving.setRideRiskCode(jsonObject.getString("planCode"));
|
|
insAreaCompanyAccidentalDriving.setRideRiskCode(jsonObject.getString("planCode"));
|
|
|
insAreaCompanyAccidentalDriving.setRideRiskName(jsonObject.getString("planName"));
|
|
insAreaCompanyAccidentalDriving.setRideRiskName(jsonObject.getString("planName"));
|
|
|
insAreaCompanyAccidentalDriving.setCompanyId("TKIC1000000");
|
|
insAreaCompanyAccidentalDriving.setCompanyId("TKIC1000000");
|
|
|
insAreaCompanyAccidentalDriving.setQuantity(1);
|
|
insAreaCompanyAccidentalDriving.setQuantity(1);
|
|
|
- } else if (t.getAccidentalDrivingVo() != null && t.getCompanyId().equals("DJPC1000000")) {
|
|
|
|
|
- JSONObject jsonObject = JSON.parseObject(t.getAccidentalDrivingVo().toString());
|
|
|
|
|
|
|
+ } else if (t.getAccidentalDrivingVo() != null && t.getCompanyId()
|
|
|
|
|
+ .equals("DJPC1000000")) {
|
|
|
|
|
+ JSONObject jsonObject = JSON.parseObject(t.getAccidentalDrivingVo()
|
|
|
|
|
+ .toString());
|
|
|
InsDrivingIntentionInsurance one = insDrivingIntentionInsuranceService.getOne(new LambdaQueryWrapper<InsDrivingIntentionInsurance>()
|
|
InsDrivingIntentionInsurance one = insDrivingIntentionInsuranceService.getOne(new LambdaQueryWrapper<InsDrivingIntentionInsurance>()
|
|
|
.eq(InsDrivingIntentionInsurance::getCompanyId, t.getCompanyId())
|
|
.eq(InsDrivingIntentionInsurance::getCompanyId, t.getCompanyId())
|
|
|
.eq(InsDrivingIntentionInsurance::getProjectCode, jsonObject.getString("planId")));
|
|
.eq(InsDrivingIntentionInsurance::getProjectCode, jsonObject.getString("planId")));
|
|
@@ -203,17 +224,25 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//处理订单信息
|
|
//处理订单信息
|
|
|
- QuoteRespVo responseVo = responseOrder(response, quoteRespVo, ptlAgreementAttribution, insAreaCompanyAccidentalDriving,quoteInfoVo);
|
|
|
|
|
- if(!Objects.isNull(response.getOther().getMaxQuoteNum())) {
|
|
|
|
|
- int quoteNum = maxQuoteNum - Integer.parseInt(response.getOther().getMaxQuoteNum());
|
|
|
|
|
|
|
+ QuoteRespVo responseVo = responseOrder(response, quoteRespVo, ptlAgreementAttribution, insAreaCompanyAccidentalDriving, quoteInfoVo);
|
|
|
|
|
+ if (!Objects.isNull(response.getOther()
|
|
|
|
|
+ .getMaxQuoteNum())) {
|
|
|
|
|
+ int quoteNum = maxQuoteNum - Integer.parseInt(response.getOther()
|
|
|
|
|
+ .getMaxQuoteNum());
|
|
|
for (int i = 0; i < quoteNum; i++) {
|
|
for (int i = 0; i < quoteNum; i++) {
|
|
|
SysQuoteRecord sysQuoteRecord;
|
|
SysQuoteRecord sysQuoteRecord;
|
|
|
if (i == quoteNum - 1) {
|
|
if (i == quoteNum - 1) {
|
|
|
- sysQuoteRecord = new SysQuoteRecord(quoteInfoVo.getUserid(),t.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
|
|
|
|
|
- QuoteNumberConstant.QuoteAction.QUOTE_SUCCESS.getCode().toString(),QuoteNumberConstant.QuoteResult.SUCCESS.getCode().toString());
|
|
|
|
|
- }else{
|
|
|
|
|
- sysQuoteRecord = new SysQuoteRecord(quoteInfoVo.getUserid(),t.getCompanyId(),quoteInfoVo.getCarInfo().getLicenseNo(),
|
|
|
|
|
- QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode().toString(),QuoteNumberConstant.QuoteResult.FAIL.getCode().toString());
|
|
|
|
|
|
|
+ sysQuoteRecord = new SysQuoteRecord(quoteInfoVo.getUserid(), t.getCompanyId(), quoteInfoVo.getCarInfo()
|
|
|
|
|
+ .getLicenseNo(),
|
|
|
|
|
+ QuoteNumberConstant.QuoteAction.QUOTE_SUCCESS.getCode()
|
|
|
|
|
+ .toString(), QuoteNumberConstant.QuoteResult.SUCCESS.getCode()
|
|
|
|
|
+ .toString());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ sysQuoteRecord = new SysQuoteRecord(quoteInfoVo.getUserid(), t.getCompanyId(), quoteInfoVo.getCarInfo()
|
|
|
|
|
+ .getLicenseNo(),
|
|
|
|
|
+ QuoteNumberConstant.QuoteAction.QUOTE_FAILED.getCode()
|
|
|
|
|
+ .toString(), QuoteNumberConstant.QuoteResult.FAIL.getCode()
|
|
|
|
|
+ .toString());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
sysQuoteRecords.add(sysQuoteRecord);
|
|
sysQuoteRecords.add(sysQuoteRecord);
|
|
@@ -231,7 +260,8 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
@Override
|
|
@Override
|
|
|
public HttpResult<Object> submitImage(String subOrderNo) {
|
|
public HttpResult<Object> submitImage(String subOrderNo) {
|
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getById(subOrderNo);
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getById(subOrderNo);
|
|
|
- if (insAreaCompany.getCompanyId().equals("TKIC1000000")) {
|
|
|
|
|
|
|
+ if (insAreaCompany.getCompanyId()
|
|
|
|
|
+ .equals("TKIC1000000")) {
|
|
|
//泰康
|
|
//泰康
|
|
|
return HttpResult.ok("上传成功");
|
|
return HttpResult.ok("上传成功");
|
|
|
}
|
|
}
|
|
@@ -253,12 +283,19 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
if (response.getCode() != 200) {
|
|
if (response.getCode() != 200) {
|
|
|
throw new SystemException(response.getMessage());
|
|
throw new SystemException(response.getMessage());
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // 上传的影像存入redis
|
|
|
|
|
- insImagesUploadCacheComponents.setUploadImageCache(subOrderNo, insTaskImagesBase64s);
|
|
|
|
|
|
|
+ if (insAreaCompany.getCompanyId().equals("HTIC1000000")) {
|
|
|
|
|
+ //爬虫方式进行图片上传
|
|
|
|
|
+ List<InsUploadImagesDto> insUploadImagesDtoList = insTaskImagesService.findImageByOrderNo(insAreaCompany.getOrderno(),
|
|
|
|
|
+ insAreaCompany.getId());
|
|
|
|
|
+ huaTaiUploadImageComponents.uploadImage(subOrderNo, response.getUrl(), insUploadImagesDtoList);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 上传的影像存入redis
|
|
|
|
|
+ insImagesUploadCacheComponents.setUploadImageCache(subOrderNo, insTaskImagesBase64s);
|
|
|
|
|
+ }
|
|
|
return HttpResult.ok("上传成功");
|
|
return HttpResult.ok("上传成功");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public HttpResult<Object> audit(String subOrderNo) {
|
|
public HttpResult<Object> audit(String subOrderNo) {
|
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getById(subOrderNo);
|
|
InsAreaCompany insAreaCompany = insAreaCompanyService.getById(subOrderNo);
|
|
@@ -277,7 +314,7 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
if (StringUtils.isNotEmpty(crawlerAuditResponse.getManual())) {
|
|
if (StringUtils.isNotEmpty(crawlerAuditResponse.getManual())) {
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
insAreaCompany.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
|
|
insAreaCompany.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_AUDIT.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.WAIT_AUDIT.getCode(), "1");
|
|
|
//insAreaCompany.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
|
|
//insAreaCompany.setUnderwritingStatus(UnderwritingStatus.US_2.getCode());
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_AUDIT.getCode());
|
|
|
String message = crawlerAuditResponse.getMessage();
|
|
String message = crawlerAuditResponse.getMessage();
|
|
@@ -285,7 +322,7 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
return HttpResult.error(crawlerAuditResponse.getMessage());
|
|
return HttpResult.error(crawlerAuditResponse.getMessage());
|
|
|
}
|
|
}
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_PAY.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.WAIT_PAY.getCode(), "1");
|
|
|
// 投保单号
|
|
// 投保单号
|
|
|
insAreaCompany.setPaymentLink(crawlerAuditResponse.getPayUrl());
|
|
insAreaCompany.setPaymentLink(crawlerAuditResponse.getPayUrl());
|
|
|
insAreaCompany.setJqapplyno(crawlerAuditResponse.getJqPolicy());
|
|
insAreaCompany.setJqapplyno(crawlerAuditResponse.getJqPolicy());
|
|
@@ -318,7 +355,7 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsurances)));
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsurances)));
|
|
|
|
|
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(), "1");
|
|
|
|
|
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());//已承保
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());//已承保
|
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
|
|
@@ -348,7 +385,8 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
|
|
|
|
|
// 支付时间
|
|
// 支付时间
|
|
|
if (StringUtils.isNotEmpty(response.getPaytime())) {
|
|
if (StringUtils.isNotEmpty(response.getPaytime())) {
|
|
|
- insAreaCompany.setPayDate(LocalDateTime.parse(response.getPaytime().trim(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
|
|
|
|
|
+ insAreaCompany.setPayDate(LocalDateTime.parse(response.getPaytime()
|
|
|
|
|
+ .trim(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
|
insAreaCompanyService.updateById(insAreaCompany);
|
|
insAreaCompanyService.updateById(insAreaCompany);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -356,13 +394,16 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicy(response.getJqxFlagUrl(), licensePlate + "-交强险标志.pdf", insAreaCompany.getId()));
|
|
crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicy(response.getJqxFlagUrl(), licensePlate + "-交强险标志.pdf", insAreaCompany.getId()));
|
|
|
crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicy(response.getJqxPolicyUrl(), licensePlate + "-交强险保单.pdf", insAreaCompany.getId()));
|
|
crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicy(response.getJqxPolicyUrl(), licensePlate + "-交强险保单.pdf", insAreaCompany.getId()));
|
|
|
crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicy(response.getSyxPolicyUrl(), licensePlate + "-商业险保单.pdf", insAreaCompany.getId()));
|
|
crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicy(response.getSyxPolicyUrl(), licensePlate + "-商业险保单.pdf", insAreaCompany.getId()));
|
|
|
- crawlerPolicyPrintVo.setJyxInfoList(response.getJyxInfoList().stream().map(x -> {
|
|
|
|
|
- CrawlerPolicyPrintVo.JyxInfoListDTO jyxInfoListDTO = new CrawlerPolicyPrintVo.JyxInfoListDTO();
|
|
|
|
|
- jyxInfoListDTO.setApplication(x.getApplication());
|
|
|
|
|
- jyxInfoListDTO.setJyxPolicyUrl(gainCarInsPolicy(x.getJyxPolicyUrl(), licensePlate + "-" + x.getApplication() + "-非车险保单.pdf",
|
|
|
|
|
- insAreaCompany.getId()));
|
|
|
|
|
- return jyxInfoListDTO;
|
|
|
|
|
- }).collect(Collectors.toList()));
|
|
|
|
|
|
|
+ crawlerPolicyPrintVo.setJyxInfoList(response.getJyxInfoList()
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .map(x -> {
|
|
|
|
|
+ CrawlerPolicyPrintVo.JyxInfoListDTO jyxInfoListDTO = new CrawlerPolicyPrintVo.JyxInfoListDTO();
|
|
|
|
|
+ jyxInfoListDTO.setApplication(x.getApplication());
|
|
|
|
|
+ jyxInfoListDTO.setJyxPolicyUrl(gainCarInsPolicy(x.getJyxPolicyUrl(), licensePlate + "-" + x.getApplication() + "-非车险保单.pdf",
|
|
|
|
|
+ insAreaCompany.getId()));
|
|
|
|
|
+ return jyxInfoListDTO;
|
|
|
|
|
+ })
|
|
|
|
|
+ .collect(Collectors.toList()));
|
|
|
return HttpResult.ok(crawlerPolicyPrintVo);
|
|
return HttpResult.ok(crawlerPolicyPrintVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -396,22 +437,28 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
if (map.get(kindInfoVo.getKindCode()) != null) {
|
|
if (map.get(kindInfoVo.getKindCode()) != null) {
|
|
|
kind.setCoveragePremium(map.get(kindInfoVo.getKindCode()));
|
|
kind.setCoveragePremium(map.get(kindInfoVo.getKindCode()));
|
|
|
kind.setUnitAmount(kindInfoVo.getUnitAmount());
|
|
kind.setUnitAmount(kindInfoVo.getUnitAmount());
|
|
|
- if(!Objects.isNull(kindInfoVo.getServiceTimes())){
|
|
|
|
|
|
|
+ if (!Objects.isNull(kindInfoVo.getServiceTimes())) {
|
|
|
kind.setServiceTimes(String.valueOf(kindInfoVo.getServiceTimes()));
|
|
kind.setServiceTimes(String.valueOf(kindInfoVo.getServiceTimes()));
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
kind.setServiceTimes(String.valueOf(kindInfoVo.getServiceTimes()));
|
|
kind.setServiceTimes(String.valueOf(kindInfoVo.getServiceTimes()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (InsurKind.A.getCode().equals(kindInfoVo.getKindCode())) {
|
|
|
|
|
|
|
+ if (InsurKind.A.getCode()
|
|
|
|
|
+ .equals(kindInfoVo.getKindCode())) {
|
|
|
kind.setAmount(map.get("A_amount"));
|
|
kind.setAmount(map.get("A_amount"));
|
|
|
} else {
|
|
} else {
|
|
|
kind.setAmount(kindInfoVo.getAmount());
|
|
kind.setAmount(kindInfoVo.getAmount());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (InsurKind.SY_WBDWGZ.getCode().equals(kindInfoVo.getKindCode())){
|
|
|
|
|
- KindInfoVo aKind = kindList.stream().filter(x -> x.getKindCode().equals(InsurKind.A.getCode())).findFirst().orElse(null);
|
|
|
|
|
- if(aKind != null) {
|
|
|
|
|
|
|
+ if (InsurKind.SY_WBDWGZ.getCode()
|
|
|
|
|
+ .equals(kindInfoVo.getKindCode())) {
|
|
|
|
|
+ KindInfoVo aKind = kindList.stream()
|
|
|
|
|
+ .filter(x -> x.getKindCode()
|
|
|
|
|
+ .equals(InsurKind.A.getCode()))
|
|
|
|
|
+ .findFirst()
|
|
|
|
|
+ .orElse(null);
|
|
|
|
|
+ if (aKind != null) {
|
|
|
kind.setAmount(map.get("A_amount"));
|
|
kind.setAmount(map.get("A_amount"));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -461,7 +508,10 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
quoteRespVo.setInitialProposalDiscount(other.getHopeDiscount());
|
|
quoteRespVo.setInitialProposalDiscount(other.getHopeDiscount());
|
|
|
|
|
|
|
|
if (!ObjectUtils.isEmpty(other.getPredictInfo())) {
|
|
if (!ObjectUtils.isEmpty(other.getPredictInfo())) {
|
|
|
- quoteRespVo.setPredictInfo(other.getPredictInfo().stream().map(QuoteRespVo.PreUnderwritingInfoDTO::new).collect(Collectors.toList()));
|
|
|
|
|
|
|
+ quoteRespVo.setPredictInfo(other.getPredictInfo()
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .map(QuoteRespVo.PreUnderwritingInfoDTO::new)
|
|
|
|
|
+ .collect(Collectors.toList()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 起保日期和终保日期
|
|
// 起保日期和终保日期
|
|
@@ -484,9 +534,11 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
|
|
|
|
|
quoteRespVo.setWarnMessageList(strings);
|
|
quoteRespVo.setWarnMessageList(strings);
|
|
|
|
|
|
|
|
- List<String> infoList = response.getOther().getInfoList();
|
|
|
|
|
|
|
+ List<String> infoList = response.getOther()
|
|
|
|
|
+ .getInfoList();
|
|
|
if (!ObjectUtils.isEmpty(infoList)) {
|
|
if (!ObjectUtils.isEmpty(infoList)) {
|
|
|
- quoteRespVo.getWarnMessageList().addAll(infoList);
|
|
|
|
|
|
|
+ quoteRespVo.getWarnMessageList()
|
|
|
|
|
+ .addAll(infoList);
|
|
|
}
|
|
}
|
|
|
// 交强是否续保
|
|
// 交强是否续保
|
|
|
quoteRespVo.setJqRenewal(other.getJqRenewalFlag());
|
|
quoteRespVo.setJqRenewal(other.getJqRenewalFlag());
|
|
@@ -514,17 +566,27 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(quoteRespVo.getTaxArrears())));
|
|
insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(quoteRespVo.getTaxArrears())));
|
|
|
|
|
|
|
|
// 此单是否需要验车
|
|
// 此单是否需要验车
|
|
|
- if (CrawlerQuoteResponse.QuoteGreenWayEnum.Q_1.getCode().equals(response.getOther().getIsQuoteGreenWay())) {
|
|
|
|
|
|
|
+ if (CrawlerQuoteResponse.QuoteGreenWayEnum.Q_1.getCode()
|
|
|
|
|
+ .equals(response.getOther()
|
|
|
|
|
+ .getIsQuoteGreenWay())) {
|
|
|
quoteRespVo.setTips(CrawlerQuoteResponse.QuoteGreenWayEnum.Q_1.getDesc());
|
|
quoteRespVo.setTips(CrawlerQuoteResponse.QuoteGreenWayEnum.Q_1.getDesc());
|
|
|
- quoteRespVo.setWarnMessageList(response.getOther().getErrorCodeMap());
|
|
|
|
|
|
|
+ quoteRespVo.setWarnMessageList(response.getOther()
|
|
|
|
|
+ .getErrorCodeMap());
|
|
|
}
|
|
}
|
|
|
// 验车支付链接
|
|
// 验车支付链接
|
|
|
- insAreaCompany.setVehicleInspectionUrl(response.getOther().getUpimageUrl());
|
|
|
|
|
- quoteRespVo.setVehicleInspectionUrl(response.getOther().getUpimageUrl());
|
|
|
|
|
-
|
|
|
|
|
- if(response.getOther().getCiMessage() != null && !response.getOther().getCiMessage().equals("")){
|
|
|
|
|
- quoteRespVo.setCiMessage(response.getOther().getCiMessage());
|
|
|
|
|
- insAreaCompany.setCiMessage(response.getOther().getCiMessage());
|
|
|
|
|
|
|
+ insAreaCompany.setVehicleInspectionUrl(response.getOther()
|
|
|
|
|
+ .getUpimageUrl());
|
|
|
|
|
+ quoteRespVo.setVehicleInspectionUrl(response.getOther()
|
|
|
|
|
+ .getUpimageUrl());
|
|
|
|
|
+
|
|
|
|
|
+ if (response.getOther()
|
|
|
|
|
+ .getCiMessage() != null && !response.getOther()
|
|
|
|
|
+ .getCiMessage()
|
|
|
|
|
+ .equals("")) {
|
|
|
|
|
+ quoteRespVo.setCiMessage(response.getOther()
|
|
|
|
|
+ .getCiMessage());
|
|
|
|
|
+ insAreaCompany.setCiMessage(response.getOther()
|
|
|
|
|
+ .getCiMessage());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//太平绿黄红区
|
|
//太平绿黄红区
|
|
@@ -535,8 +597,8 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
if (matcher.find()) {
|
|
if (matcher.find()) {
|
|
|
|
|
|
|
|
String tpColorScore = item.replace("小货车鼓励承保业务", "绿区")
|
|
String tpColorScore = item.replace("小货车鼓励承保业务", "绿区")
|
|
|
- .replace("小货车一般承保业务", "黄区")
|
|
|
|
|
- .replace("小货车谨慎承保业务", "红区");
|
|
|
|
|
|
|
+ .replace("小货车一般承保业务", "黄区")
|
|
|
|
|
+ .replace("小货车谨慎承保业务", "红区");
|
|
|
|
|
|
|
|
insAreaCompany.setTpColorScore(tpColorScore);
|
|
insAreaCompany.setTpColorScore(tpColorScore);
|
|
|
break;
|
|
break;
|
|
@@ -578,14 +640,14 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
// 200 成功出码 500 审核中 400 核保退回
|
|
// 200 成功出码 500 审核中 400 核保退回
|
|
|
if (crawlerAuditResponse.getCode() == CrawlerAuditStatus.CAS_500.getCode()) {
|
|
if (crawlerAuditResponse.getCode() == CrawlerAuditStatus.CAS_500.getCode()) {
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.TO_BACK.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.TO_BACK.getCode(), "1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.TO_BACK.getCode());
|
|
|
String message = crawlerAuditResponse.getMessage();
|
|
String message = crawlerAuditResponse.getMessage();
|
|
|
insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, message);
|
|
insAreaCompanyService.updateCompanyAndOrdersMessage(insAreaCompany, message);
|
|
|
return HttpResult.error(crawlerAuditResponse.getMessage());
|
|
return HttpResult.error(crawlerAuditResponse.getMessage());
|
|
|
} else if (crawlerAuditResponse.getCode() == CrawlerAuditStatus.CAS_200.getCode()) {
|
|
} else if (crawlerAuditResponse.getCode() == CrawlerAuditStatus.CAS_200.getCode()) {
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.WAIT_PAY.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.WAIT_PAY.getCode(), "1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
|
|
|
} else {
|
|
} else {
|
|
|
throw new SystemException(crawlerAuditResponse.getMessage());
|
|
throw new SystemException(crawlerAuditResponse.getMessage());
|
|
@@ -624,7 +686,7 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
List<CrawlerVerifyPaymentResponse.DrivingInsurancesDTO> drivingInsurances = crawlerAuditResponse.getDrivingInsurancesDto();
|
|
List<CrawlerVerifyPaymentResponse.DrivingInsurancesDTO> drivingInsurances = crawlerAuditResponse.getDrivingInsurancesDto();
|
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsurances)));
|
|
insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(drivingInsurances)));
|
|
|
// add by hxl 添加自动更新状态
|
|
// add by hxl 添加自动更新状态
|
|
|
- insSubOrderUpdateDetailService.insertData(insAreaCompany,insAreaCompany.getOrderstatus(),InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(),"1");
|
|
|
|
|
|
|
+ insSubOrderUpdateDetailService.insertData(insAreaCompany, insAreaCompany.getOrderstatus(), InsOrderStatusEnum.ACCEPT_INSURANCE.getCode(), "1");
|
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());//已承保
|
|
insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());//已承保
|
|
|
insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
|
|
insAreaCompanyService.updateCompanyAndOrdersNew(insAreaCompany);
|
|
|
}
|
|
}
|
|
@@ -659,27 +721,31 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @version
|
|
|
|
|
- * @author: hxl
|
|
|
|
|
- * @Date: 2024/10/16 16:20
|
|
|
|
|
- * @Description: 获取保单路径
|
|
|
|
|
|
|
+ * @version
|
|
|
|
|
+ * @author: hxl
|
|
|
|
|
+ * @Date: 2024/10/16 16:20
|
|
|
|
|
+ * @Description: 获取保单路径
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public ReadPdfUrlListDto getPolicyByCompanyIdPdfList(InsAreaCompany insAreaCompany, InsOrders insOrders,boolean flag) {
|
|
|
|
|
- CrawlerPolicyPrintVo vo=null;
|
|
|
|
|
- try{
|
|
|
|
|
- vo = getPdfUrl(insAreaCompany, insOrders,flag);
|
|
|
|
|
- }catch(Exception e){
|
|
|
|
|
- throw new SystemException(e.getMessage());
|
|
|
|
|
|
|
+ public ReadPdfUrlListDto getPolicyByCompanyIdPdfList(InsAreaCompany insAreaCompany, InsOrders insOrders, boolean flag) {
|
|
|
|
|
+ CrawlerPolicyPrintVo vo = null;
|
|
|
|
|
+ try {
|
|
|
|
|
+ vo = getPdfUrl(insAreaCompany, insOrders, flag);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ throw new SystemException(e.getMessage());
|
|
|
}
|
|
}
|
|
|
- String jyPath = (vo.getJyxInfoList()!=null && !vo.getJyxInfoList().isEmpty())?vo.getJyxInfoList().get(0).getJyxPolicyUrl():null;
|
|
|
|
|
- InsAreaCompanyExternalPolicy insAreaCompanyExternalPolicy =new InsAreaCompanyExternalPolicy(insAreaCompany.getId(),vo.getJqxPolicyUrl(),vo.getSyxPolicyUrl(),jyPath,vo.getJqxFlagUrl());
|
|
|
|
|
- return new ReadPdfUrlListDto(insAreaCompanyExternalPolicy,insAreaCompany,null);
|
|
|
|
|
|
|
+ String jyPath = (vo.getJyxInfoList() != null && !vo.getJyxInfoList()
|
|
|
|
|
+ .isEmpty()) ? vo.getJyxInfoList()
|
|
|
|
|
+ .get(0)
|
|
|
|
|
+ .getJyxPolicyUrl() : null;
|
|
|
|
|
+ InsAreaCompanyExternalPolicy insAreaCompanyExternalPolicy = new InsAreaCompanyExternalPolicy(insAreaCompany.getId(), vo.getJqxPolicyUrl(), vo.getSyxPolicyUrl(), jyPath, vo.getJqxFlagUrl());
|
|
|
|
|
+ return new ReadPdfUrlListDto(insAreaCompanyExternalPolicy, insAreaCompany, null);
|
|
|
}
|
|
}
|
|
|
- public CrawlerPolicyPrintVo getPdfUrl(InsAreaCompany insAreaCompany, InsOrders insOrders,boolean flag) {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public CrawlerPolicyPrintVo getPdfUrl(InsAreaCompany insAreaCompany, InsOrders insOrders, boolean flag) {
|
|
|
CrawlerPolicyPrintVo crawlerPolicyPrintVo = new CrawlerPolicyPrintVo();
|
|
CrawlerPolicyPrintVo crawlerPolicyPrintVo = new CrawlerPolicyPrintVo();
|
|
|
//文件前缀
|
|
//文件前缀
|
|
|
- String pathPrefix = insAreaCompany.getInscompany()+"-"+insOrders.getLicenseno()+"-"+ insAreaCompany.getId()+"-";
|
|
|
|
|
|
|
+ String pathPrefix = insAreaCompany.getInscompany() + "-" + insOrders.getLicenseno() + "-" + insAreaCompany.getId() + "-";
|
|
|
// 请求地址
|
|
// 请求地址
|
|
|
String apiUrl = ptlCrawlerApiService.getApiUrl(insAreaCompany.getAgreementId(), PtlCrawlerApiType.API_6);
|
|
String apiUrl = ptlCrawlerApiService.getApiUrl(insAreaCompany.getAgreementId(), PtlCrawlerApiType.API_6);
|
|
|
//组装参数
|
|
//组装参数
|
|
@@ -687,40 +753,44 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
CrawlerPolicyPrintResponse response = insCrawlerOrderComponents.request(apiUrl, insAreaCompany.getCompanyId(), PtlCrawlerApiType.API_6.getDesc(), crawlerBaseRequest, CrawlerPolicyPrintResponse.class);
|
|
CrawlerPolicyPrintResponse response = insCrawlerOrderComponents.request(apiUrl, insAreaCompany.getCompanyId(), PtlCrawlerApiType.API_6.getDesc(), crawlerBaseRequest, CrawlerPolicyPrintResponse.class);
|
|
|
if (response.getCode() == 200) {
|
|
if (response.getCode() == 200) {
|
|
|
//交强险标志地址
|
|
//交强险标志地址
|
|
|
- if(StringUtils.isNotBlank(response.getJqxFlagUrl())){
|
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(response.getJqxFlagUrl())) {
|
|
|
crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicyNew(response.getJqxFlagUrl(), pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBZ.getDesc(), insAreaCompany.getId(), flag));
|
|
crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicyNew(response.getJqxFlagUrl(), pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBZ.getDesc(), insAreaCompany.getId(), flag));
|
|
|
}
|
|
}
|
|
|
//交强险保单地址
|
|
//交强险保单地址
|
|
|
- if(StringUtils.isNotBlank(response.getJqxPolicyUrl())){
|
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(response.getJqxPolicyUrl())) {
|
|
|
crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicyNew(response.getJqxPolicyUrl(), pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBD.getDesc(), insAreaCompany.getId(), flag));
|
|
crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicyNew(response.getJqxPolicyUrl(), pathPrefix + insAreaCompany.getJqpolicyno() + "-" + InsuranceOrderPdf.JQBD.getDesc(), insAreaCompany.getId(), flag));
|
|
|
}
|
|
}
|
|
|
- if(StringUtils.isNotBlank(response.getSyxPolicyUrl())){
|
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(response.getSyxPolicyUrl())) {
|
|
|
crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicyNew(response.getSyxPolicyUrl(), pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.SYBD.getDesc(), insAreaCompany.getId(), flag));
|
|
crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicyNew(response.getSyxPolicyUrl(), pathPrefix + insAreaCompany.getSypolicyno() + "-" + InsuranceOrderPdf.SYBD.getDesc(), insAreaCompany.getId(), flag));
|
|
|
}
|
|
}
|
|
|
- if(response.getJyxInfoList()!=null && !response.getJyxInfoList().isEmpty()){
|
|
|
|
|
- crawlerPolicyPrintVo.setJyxInfoList(response.getJyxInfoList().stream().map(x -> {
|
|
|
|
|
- CrawlerPolicyPrintVo.JyxInfoListDTO jyxInfoListDTO = new CrawlerPolicyPrintVo.JyxInfoListDTO();
|
|
|
|
|
- jyxInfoListDTO.setApplication(x.getApplication());
|
|
|
|
|
- jyxInfoListDTO.setJyxPolicyUrl(gainCarInsPolicyNew(x.getJyxPolicyUrl(), pathPrefix + insAreaCompany.getJyPolicyNo() + "-" + InsuranceOrderPdf.JYBD.getDesc(), insAreaCompany.getId(), flag));
|
|
|
|
|
- return jyxInfoListDTO;
|
|
|
|
|
- }).collect(Collectors.toList()));
|
|
|
|
|
|
|
+ if (response.getJyxInfoList() != null && !response.getJyxInfoList()
|
|
|
|
|
+ .isEmpty()) {
|
|
|
|
|
+ crawlerPolicyPrintVo.setJyxInfoList(response.getJyxInfoList()
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .map(x -> {
|
|
|
|
|
+ CrawlerPolicyPrintVo.JyxInfoListDTO jyxInfoListDTO = new CrawlerPolicyPrintVo.JyxInfoListDTO();
|
|
|
|
|
+ jyxInfoListDTO.setApplication(x.getApplication());
|
|
|
|
|
+ jyxInfoListDTO.setJyxPolicyUrl(gainCarInsPolicyNew(x.getJyxPolicyUrl(), pathPrefix + insAreaCompany.getJyPolicyNo() + "-" + InsuranceOrderPdf.JYBD.getDesc(), insAreaCompany.getId(), flag));
|
|
|
|
|
+ return jyxInfoListDTO;
|
|
|
|
|
+ })
|
|
|
|
|
+ .collect(Collectors.toList()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
throw new SystemException(response.getMessage());
|
|
throw new SystemException(response.getMessage());
|
|
|
}
|
|
}
|
|
|
return crawlerPolicyPrintVo;
|
|
return crawlerPolicyPrintVo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @version
|
|
|
|
|
- * @author: hxl
|
|
|
|
|
- * @Date: 2024/10/18 9:37
|
|
|
|
|
- * @Description: 新路径
|
|
|
|
|
|
|
+ * @version
|
|
|
|
|
+ * @author: hxl
|
|
|
|
|
+ * @Date: 2024/10/18 9:37
|
|
|
|
|
+ * @Description: 新路径
|
|
|
*/
|
|
*/
|
|
|
- public String gainCarInsPolicyNew(String url, String fileName, String subOrderId,boolean flag) {
|
|
|
|
|
|
|
+ public String gainCarInsPolicyNew(String url, String fileName, String subOrderId, boolean flag) {
|
|
|
String dir = "carInsPolicyNew/" + subOrderId + "/";
|
|
String dir = "carInsPolicyNew/" + subOrderId + "/";
|
|
|
- return FileUtil.netUrlToFileNew(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl,flag);
|
|
|
|
|
|
|
+ return FileUtil.netUrlToFileNew(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl, flag);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|