|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.ydtech.constants.enums.InsuranceRisk;
|
|
import com.ydtech.constants.enums.InsuranceRisk;
|
|
|
import com.ydtech.constants.enums.dict.agreement.ProductsType;
|
|
import com.ydtech.constants.enums.dict.agreement.ProductsType;
|
|
|
|
|
+import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.order.dao.InsDrivingIntentionInsuranceMapper;
|
|
import com.ydtech.modules.order.dao.InsDrivingIntentionInsuranceMapper;
|
|
|
import com.ydtech.modules.order.dao.InsDrivingIntentionInsuranceSonMapper;
|
|
import com.ydtech.modules.order.dao.InsDrivingIntentionInsuranceSonMapper;
|
|
|
import com.ydtech.modules.order.entity.InsDrivingIntentionInsurance;
|
|
import com.ydtech.modules.order.entity.InsDrivingIntentionInsurance;
|
|
@@ -19,6 +20,7 @@ import com.ydtech.modules.protocol.entity.po.PtlAgreement;
|
|
|
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.PtlAgreementService;
|
|
|
|
|
+import com.ydtech.utils.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
@@ -203,8 +205,34 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
|
|
|
public Map<String, List<InsDrivingIntentionInsuranceVo>> getPingAnDrivingInsuranceRule(NoCarInsuranceQueryVo insuranceVo) {
|
|
public Map<String, List<InsDrivingIntentionInsuranceVo>> getPingAnDrivingInsuranceRule(NoCarInsuranceQueryVo insuranceVo) {
|
|
|
// 添加平安的驾意险的险种信息 2024-07-18
|
|
// 添加平安的驾意险的险种信息 2024-07-18
|
|
|
PtlAgreement ptlAgreement = ptlAgreementService.getById(insuranceVo.getAgreementId());
|
|
PtlAgreement ptlAgreement = ptlAgreementService.getById(insuranceVo.getAgreementId());
|
|
|
|
|
+ //参数验证
|
|
|
|
|
+ if (StringUtils.isBlank(insuranceVo.getAgreementId())) {
|
|
|
|
|
+ new SystemException("协议id不能为空!!");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isBlank(insuranceVo.getUseAttribute())) {
|
|
|
|
|
+ new SystemException("车辆使用性质代码01-营业02-非营业不能为空!!");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isBlank(insuranceVo.getUseAttribute())) {
|
|
|
|
|
+ new SystemException("所属性质(01:机关,02:企业,03:私人 默认03:私人 车辆使用性质为01:营业时,所属性质不可以选择01:机关)不能为空!!");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isBlank(insuranceVo.getRuleSeatNum())) {
|
|
|
|
|
+ new SystemException("座位数不能为空!!");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isBlank(insuranceVo.getIsUseCombine())) {
|
|
|
|
|
+ new SystemException("是否查询组合产品不能为空!!");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isBlank(insuranceVo.getCimodelclass())) {
|
|
|
|
|
+ new SystemException("车辆种类(A0客户 、A1货车)不能为空!!");
|
|
|
|
|
+ }
|
|
|
|
|
+ //核定载质量(吨) 必填
|
|
|
|
|
+ if ("A1".equals(insuranceVo.getCimodelclass()) && StringUtils.isBlank(insuranceVo.getTonNumber())) {
|
|
|
|
|
+ new SystemException("货车(核定载质量(吨))不能为空!!");
|
|
|
|
|
+ }
|
|
|
|
|
+ if ("A0".equals(insuranceVo.getCimodelclass())) {
|
|
|
|
|
+ insuranceVo.setTonNumber(null);
|
|
|
|
|
+ }
|
|
|
//调用接口返回数据
|
|
//调用接口返回数据
|
|
|
- ProductDetailsRequest productDetailsRequest = new ProductDetailsRequest(insuranceVo.getAgreementId(), insuranceVo.getRuleUseNature(),
|
|
|
|
|
|
|
+ ProductDetailsRequest productDetailsRequest = new ProductDetailsRequest(insuranceVo.getAgreementId(), insuranceVo.getUseAttribute(),
|
|
|
insuranceVo.getOwnAttribute(), insuranceVo.getRuleSeatNum(), insuranceVo.getTonNumber(),
|
|
insuranceVo.getOwnAttribute(), insuranceVo.getRuleSeatNum(), insuranceVo.getTonNumber(),
|
|
|
insuranceVo.getIsUseCombine(), insuranceVo.getCimodelclass(), ptlAgreement.getInsuranceCompanyId());
|
|
insuranceVo.getIsUseCombine(), insuranceVo.getCimodelclass(), ptlAgreement.getInsuranceCompanyId());
|
|
|
Map<String, List<InsDrivingIntentionInsuranceVo>> insDrivingIntentionInsuranceVos = pingAnOrderApiService.productQueryList(productDetailsRequest);
|
|
Map<String, List<InsDrivingIntentionInsuranceVo>> insDrivingIntentionInsuranceVos = pingAnOrderApiService.productQueryList(productDetailsRequest);
|