|
@@ -37,7 +37,12 @@ import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
|
|
|
import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
|
|
import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
|
|
|
import com.ydtech.modules.order.service.*;
|
|
import com.ydtech.modules.order.service.*;
|
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
|
|
import com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution;
|
|
|
|
|
+import com.ydtech.modules.protocol.entity.po.PtlAgreementNonCarProductCosts;
|
|
|
|
|
+import com.ydtech.modules.protocol.entity.vo.PtlNonCarProductSchemeDetailVo;
|
|
|
|
|
+import com.ydtech.modules.protocol.entity.vo.PtlNonCarProductSchemeVo;
|
|
|
import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
|
|
import com.ydtech.modules.protocol.service.PtlAgreementAttributionService;
|
|
|
|
|
+import com.ydtech.modules.protocol.service.PtlAgreementNonCarProductCostsService;
|
|
|
|
|
+import com.ydtech.modules.protocol.service.PtlNonCarProductSchemeService;
|
|
|
import com.ydtech.utils.CalculateUtils;
|
|
import com.ydtech.utils.CalculateUtils;
|
|
|
import com.ydtech.utils.baidu.FileUtil;
|
|
import com.ydtech.utils.baidu.FileUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -75,6 +80,10 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
|
|
|
|
|
private final ZhongmeiRepeatInsuranceComponents zhongmeiRepeatInsuranceComponents;
|
|
private final ZhongmeiRepeatInsuranceComponents zhongmeiRepeatInsuranceComponents;
|
|
|
|
|
|
|
|
|
|
+ private final PtlAgreementNonCarProductCostsService ptlAgreementNonCarProductCostsService;
|
|
|
|
|
+
|
|
|
|
|
+ private final PtlNonCarProductSchemeService ptlNonCarProductSchemeService;
|
|
|
|
|
+
|
|
|
@Value("${upload.file.path}")
|
|
@Value("${upload.file.path}")
|
|
|
private String uploadFilePath;
|
|
private String uploadFilePath;
|
|
|
|
|
|
|
@@ -87,7 +96,8 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
public ZhongMeiOrderApiServiceImpl(InsOrdersService insOrdersService, InsAreaCompanyService insAreaCompanyService, InsTaskImagesService insTaskImagesService,
|
|
public ZhongMeiOrderApiServiceImpl(InsOrdersService insOrdersService, InsAreaCompanyService insAreaCompanyService, InsTaskImagesService insTaskImagesService,
|
|
|
ZhongmeiRequestApiComponents zhongmeiRequestApiComponents, ZhongmeiRequestComponents zhongmeiRequestComponents,
|
|
ZhongmeiRequestApiComponents zhongmeiRequestApiComponents, ZhongmeiRequestComponents zhongmeiRequestComponents,
|
|
|
ConfigureParametersComponents configureParametersComponents, PtlAgreementAttributionService ptlAgreementAttributionService,
|
|
ConfigureParametersComponents configureParametersComponents, PtlAgreementAttributionService ptlAgreementAttributionService,
|
|
|
- FeeRuleSchemeService feeRuleSchemeService, InsFeeOrderService insFeeOrderService,ZhongmeiRepeatInsuranceComponents zhongmeiRepeatInsuranceComponents) {
|
|
|
|
|
|
|
+ FeeRuleSchemeService feeRuleSchemeService, InsFeeOrderService insFeeOrderService,ZhongmeiRepeatInsuranceComponents zhongmeiRepeatInsuranceComponents,
|
|
|
|
|
+ PtlAgreementNonCarProductCostsService ptlAgreementNonCarProductCostsService,PtlNonCarProductSchemeService ptlNonCarProductSchemeService) {
|
|
|
this.insOrdersService = insOrdersService;
|
|
this.insOrdersService = insOrdersService;
|
|
|
this.insAreaCompanyService = insAreaCompanyService;
|
|
this.insAreaCompanyService = insAreaCompanyService;
|
|
|
this.insTaskImagesService = insTaskImagesService;
|
|
this.insTaskImagesService = insTaskImagesService;
|
|
@@ -98,6 +108,8 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
this.feeRuleSchemeService = feeRuleSchemeService;
|
|
this.feeRuleSchemeService = feeRuleSchemeService;
|
|
|
this.insFeeOrderService = insFeeOrderService;
|
|
this.insFeeOrderService = insFeeOrderService;
|
|
|
this.zhongmeiRepeatInsuranceComponents = zhongmeiRepeatInsuranceComponents;
|
|
this.zhongmeiRepeatInsuranceComponents = zhongmeiRepeatInsuranceComponents;
|
|
|
|
|
+ this.ptlAgreementNonCarProductCostsService=ptlAgreementNonCarProductCostsService;
|
|
|
|
|
+ this.ptlNonCarProductSchemeService=ptlNonCarProductSchemeService;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void modelInquiry(String modelName, List<ModelsQueryResponse.SimpleStadarCarDTO> simpleStadarCarDTOS) {
|
|
private void modelInquiry(String modelName, List<ModelsQueryResponse.SimpleStadarCarDTO> simpleStadarCarDTOS) {
|
|
@@ -521,6 +533,43 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 根据协议代码获取可选非车险产品方案信息
|
|
|
|
|
+ * @param reqVo
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public HttpResult<List<GeneralNonCarProductResVo>> getDrivingInsurance(GeneralNonCarProductReqVo reqVo){
|
|
|
|
|
+ List<GeneralNonCarProductResVo> resultList=new ArrayList<>();
|
|
|
|
|
+ if(StringUtils.isNotEmpty(reqVo.getAgreementId())&&StringUtils.isNotEmpty(reqVo.getSeatNum())){
|
|
|
|
|
+ List<PtlAgreementNonCarProductCosts> productList= ptlAgreementNonCarProductCostsService.getByAgreementId(reqVo.getAgreementId());
|
|
|
|
|
+ if(productList!=null&&productList.size()>0){
|
|
|
|
|
+ for(PtlAgreementNonCarProductCosts tempProductDto:productList){
|
|
|
|
|
+ GeneralNonCarProductResVo tempGeneralNonCarProductVo=new GeneralNonCarProductResVo();
|
|
|
|
|
+ tempGeneralNonCarProductVo.setProductCode(tempProductDto.getProductId());
|
|
|
|
|
+ tempGeneralNonCarProductVo.setProductName(tempProductDto.getProductName());
|
|
|
|
|
+ List<PtlNonCarProductSchemeVo> schemeList=ptlNonCarProductSchemeService.findAllProductSchemeInfo(tempProductDto.getProductId());
|
|
|
|
|
+ //处理保额信息
|
|
|
|
|
+ for(PtlNonCarProductSchemeVo schemeVo:schemeList){
|
|
|
|
|
+ double sumAmount=0.0;
|
|
|
|
|
+ List<PtlNonCarProductSchemeDetailVo> specialInfoList=schemeVo.getSpecialInfo();
|
|
|
|
|
+ for(PtlNonCarProductSchemeDetailVo detailVo:specialInfoList){
|
|
|
|
|
+ if("1".equals(detailVo.getCountType())){
|
|
|
|
|
+ sumAmount=sumAmount+Double.parseDouble(detailVo.getUnitAmount());
|
|
|
|
|
+ }else if("2".equals(detailVo.getCountType())){
|
|
|
|
|
+ sumAmount=sumAmount+(Double.parseDouble(detailVo.getUnitAmount())*Double.parseDouble(reqVo.getSeatNum()));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ schemeVo.setUnitAmount(String.valueOf(sumAmount));
|
|
|
|
|
+ //默认带出时,投保份数默认1份
|
|
|
|
|
+ schemeVo.setQuantity("1");
|
|
|
|
|
+ }
|
|
|
|
|
+ tempGeneralNonCarProductVo.setSchemeList(schemeList);
|
|
|
|
|
+ resultList.add(tempGeneralNonCarProductVo);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return HttpResult.ok(resultList);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|