|
@@ -25,6 +25,7 @@ import com.ydtech.modules.protocol.entity.constants.PtlCrawlerApiType;
|
|
|
import com.ydtech.modules.protocol.entity.dto.PtlAgreementAttributionDto;
|
|
import com.ydtech.modules.protocol.entity.dto.PtlAgreementAttributionDto;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
|
|
|
import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
|
|
import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
|
|
|
|
|
+import com.ydtech.modules.protocol.service.PtlAgreementService;
|
|
|
import com.ydtech.modules.protocol.service.PtlCrawlerApiService;
|
|
import com.ydtech.modules.protocol.service.PtlCrawlerApiService;
|
|
|
import com.ydtech.modules.protocol.utils.AssertionUtils;
|
|
import com.ydtech.modules.protocol.utils.AssertionUtils;
|
|
|
import com.ydtech.utils.CalculateUtils;
|
|
import com.ydtech.utils.CalculateUtils;
|
|
@@ -53,6 +54,8 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
private final InsTaskImagesService insTaskImagesService;
|
|
private final InsTaskImagesService insTaskImagesService;
|
|
|
private final InsOrdersService insOrdersService;
|
|
private final InsOrdersService insOrdersService;
|
|
|
|
|
|
|
|
|
|
+ private final PtlAgreementService ptlAgreementService;
|
|
|
|
|
+
|
|
|
@Value("${upload.file.path}")
|
|
@Value("${upload.file.path}")
|
|
|
private String uploadFilePath;
|
|
private String uploadFilePath;
|
|
|
|
|
|
|
@@ -62,13 +65,14 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
@Value("${api.url}")
|
|
@Value("${api.url}")
|
|
|
private String apiUrl;
|
|
private String apiUrl;
|
|
|
|
|
|
|
|
- public InsCrawlerOrderServiceImpl(PtlCrawlerApiService ptlCrawlerApiService, InsCrawlerOrderComponents insCrawlerOrderComponents, PtlAgreementAttributionService ptlAgreementAttributionService, InsAreaCompanyService insAreaCompanyService, InsTaskImagesService insTaskImagesService, InsOrdersService insOrdersService) {
|
|
|
|
|
|
|
+ public InsCrawlerOrderServiceImpl(PtlCrawlerApiService ptlCrawlerApiService, InsCrawlerOrderComponents insCrawlerOrderComponents, PtlAgreementAttributionService ptlAgreementAttributionService, InsAreaCompanyService insAreaCompanyService, InsTaskImagesService insTaskImagesService, InsOrdersService insOrdersService, PtlAgreementService ptlAgreementService) {
|
|
|
this.ptlCrawlerApiService = ptlCrawlerApiService;
|
|
this.ptlCrawlerApiService = ptlCrawlerApiService;
|
|
|
this.insCrawlerOrderComponents = insCrawlerOrderComponents;
|
|
this.insCrawlerOrderComponents = insCrawlerOrderComponents;
|
|
|
this.ptlAgreementAttributionService = ptlAgreementAttributionService;
|
|
this.ptlAgreementAttributionService = ptlAgreementAttributionService;
|
|
|
this.insAreaCompanyService = insAreaCompanyService;
|
|
this.insAreaCompanyService = insAreaCompanyService;
|
|
|
this.insTaskImagesService = insTaskImagesService;
|
|
this.insTaskImagesService = insTaskImagesService;
|
|
|
this.insOrdersService = insOrdersService;
|
|
this.insOrdersService = insOrdersService;
|
|
|
|
|
+ this.ptlAgreementService = ptlAgreementService;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -101,7 +105,6 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
if (response.getCode() != 200) {
|
|
if (response.getCode() != 200) {
|
|
|
throw new SystemException(response.getMessage());
|
|
throw new SystemException(response.getMessage());
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
QuoteRespVo quoteRespVo = getQuoteRespVo(response, quoteInfoVo);
|
|
QuoteRespVo quoteRespVo = getQuoteRespVo(response, quoteInfoVo);
|
|
|
return responseOrder(response, quoteRespVo, ptlAgreementAttribution);
|
|
return responseOrder(response, quoteRespVo, ptlAgreementAttribution);
|
|
|
}
|
|
}
|
|
@@ -237,6 +240,8 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
quoteRespVo.setKindList(kindList1);
|
|
quoteRespVo.setKindList(kindList1);
|
|
|
quoteRespVo.setJqPremium(jqPremium);
|
|
quoteRespVo.setJqPremium(jqPremium);
|
|
|
quoteRespVo.setSyPremium(syPremium);
|
|
quoteRespVo.setSyPremium(syPremium);
|
|
|
|
|
+ // 交叉销售
|
|
|
|
|
+ quoteRespVo.setJyPremium(response.getCrossSellingPremium());
|
|
|
quoteRespVo.setCiSumPermium(CalculateUtils.add(response.getForceCarInsureRisk(), response.getCarInsureShipTax()));//交强险和车船税合计
|
|
quoteRespVo.setCiSumPermium(CalculateUtils.add(response.getForceCarInsureRisk(), response.getCarInsureShipTax()));//交强险和车船税合计
|
|
|
quoteRespVo.setSumPermium(response.getCarInsureMain());//保费合计
|
|
quoteRespVo.setSumPermium(response.getCarInsureMain());//保费合计
|
|
|
quoteRespVo.setTaxAmount(response.getCarInsureShipTax());//车船税
|
|
quoteRespVo.setTaxAmount(response.getCarInsureShipTax());//车船税
|
|
@@ -260,6 +265,7 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
|
|
|
private HttpResult<QuoteRespVo> responseOrder(CrawlerQuoteResponse response, QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution) {
|
|
private HttpResult<QuoteRespVo> responseOrder(CrawlerQuoteResponse response, QuoteRespVo quoteRespVo, PtlAgreementAttribution ptlAgreementAttribution) {
|
|
|
//保存订单信息
|
|
//保存订单信息
|
|
|
InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
|
|
InsAreaCompany insAreaCompany = new InsAreaCompany(quoteRespVo, ptlAgreementAttribution);
|
|
|
|
|
+
|
|
|
insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(quoteRespVo.getTaxArrears())));
|
|
insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(quoteRespVo.getTaxArrears())));
|
|
|
|
|
|
|
|
// 此单是否需要验车
|
|
// 此单是否需要验车
|