|
@@ -40,6 +40,7 @@ import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
|
@Service
|
|
@Service
|
|
@@ -189,19 +190,17 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
String apiUrl = ptlCrawlerApiService.getApiUrl(insAreaCompany.getAgreementId(), PtlCrawlerApiType.API_6);
|
|
String apiUrl = ptlCrawlerApiService.getApiUrl(insAreaCompany.getAgreementId(), PtlCrawlerApiType.API_6);
|
|
|
//组装参数
|
|
//组装参数
|
|
|
CrawlerBaseRequest crawlerBaseRequest = new CrawlerBaseRequest(insAreaCompany.getInsOrderNo());
|
|
CrawlerBaseRequest crawlerBaseRequest = new CrawlerBaseRequest(insAreaCompany.getInsOrderNo());
|
|
|
- CrawlerPolicyPrintResponse request = 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 (request.getCode() != 200) {
|
|
|
|
|
- throw new SystemException(request.getMessage());
|
|
|
|
|
|
|
+ if (response.getCode() != 200) {
|
|
|
|
|
+ throw new SystemException(response.getMessage());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
CrawlerPolicyPrintVo crawlerPolicyPrintVo = new CrawlerPolicyPrintVo();
|
|
CrawlerPolicyPrintVo crawlerPolicyPrintVo = new CrawlerPolicyPrintVo();
|
|
|
- crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicy(request.getJqxFlagUrl(), licensePlate + "-交强险标志.pdf", licensePlate));
|
|
|
|
|
- crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicy(request.getJqxPolicyUrl(), licensePlate + "-交强险保单.pdf", licensePlate));
|
|
|
|
|
- crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicy(request.getSyxPolicyUrl(), licensePlate + "-商业险保单.pdf", licensePlate));
|
|
|
|
|
- crawlerPolicyPrintVo.getJyxInfoList().forEach(
|
|
|
|
|
- x -> x.setJyxPolicyUrl(gainCarInsPolicy(request.getJyxPolicyUrl(), licensePlate + "-" + x.getApplication() + "-非车险保单.pdf", licensePlate))
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicy(response.getJqxFlagUrl(), licensePlate + "-交强险标志.pdf", licensePlate));
|
|
|
|
|
+ crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicy(response.getJqxPolicyUrl(), licensePlate + "-交强险保单.pdf", licensePlate));
|
|
|
|
|
+ crawlerPolicyPrintVo.setSyxPolicyUrl(gainCarInsPolicy(response.getSyxPolicyUrl(), licensePlate + "-商业险保单.pdf", licensePlate));
|
|
|
|
|
+ crawlerPolicyPrintVo.setJyxInfoList(response.getJyxInfoList().stream().map(CrawlerPolicyPrintVo.JyxInfoListDTO::new).collect(Collectors.toList()));
|
|
|
return HttpResult.ok(crawlerPolicyPrintVo);
|
|
return HttpResult.ok(crawlerPolicyPrintVo);
|
|
|
}
|
|
}
|
|
|
|
|
|