|
|
@@ -44,18 +44,16 @@ import com.ydtech.modules.ins.model.ya.ExtendInfoDto;
|
|
|
import com.ydtech.modules.ins.model.ya.ResponseDataC2;
|
|
|
import com.ydtech.modules.inv.utils.EasyExcelUtils;
|
|
|
import com.ydtech.modules.order.dao.InsOrdersMapper;
|
|
|
-import com.ydtech.modules.order.entity.BasePageResult;
|
|
|
-import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
-import com.ydtech.modules.order.entity.InsOrders;
|
|
|
-import com.ydtech.modules.order.entity.InsOrdersTrack;
|
|
|
+import com.ydtech.modules.order.entity.*;
|
|
|
import com.ydtech.modules.order.entity.crawler.response.CrawlerVerifyPaymentResponse;
|
|
|
import com.ydtech.modules.order.entity.dto.DrivingInsuranceDto;
|
|
|
import com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto;
|
|
|
import com.ydtech.modules.order.entity.vo.*;
|
|
|
+import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
|
|
|
+import com.ydtech.modules.order.entity.vo.guoren.GuorenAccidentalDrivingVo;
|
|
|
import com.ydtech.modules.order.entity.vo.ya.YaExtendInfoDto;
|
|
|
-import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
|
-import com.ydtech.modules.order.service.InsOrdersService;
|
|
|
-import com.ydtech.modules.order.service.InsOrdersTrackService;
|
|
|
+import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
|
|
|
+import com.ydtech.modules.order.service.*;
|
|
|
import com.ydtech.modules.protocol.entity.constants.PtlApiType;
|
|
|
import com.ydtech.modules.protocol.entity.dto.PtlAgreementInsCompanyDto;
|
|
|
import com.ydtech.modules.protocol.service.PtlAgreementService;
|
|
|
@@ -130,6 +128,9 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
@Autowired
|
|
|
private PtlAgreementProductCostsNewService ptlAgreementProductCostsNewService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private InsAreaCompanyAccidentalDrivingService insAreaCompanyAccidentalDrivingService;
|
|
|
+
|
|
|
@Value("${upload.file.path}")
|
|
|
private String uploadFilePath;
|
|
|
|
|
|
@@ -151,6 +152,8 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
@Autowired
|
|
|
private SysUserIsDialService sysUserIsDialService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private InsDrivingIntentionInsuranceService insDrivingIntentionInsuranceService;
|
|
|
|
|
|
public InsOrdersServiceImpl(OrderComponents orderComponents, SysUserService sysUserService,
|
|
|
SysUserRoleService sysUserRoleService,
|
|
|
@@ -627,6 +630,20 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
orderAndAreaCompany.setOwnerinfo(setNewIdentifyType(orderAndAreaCompany.getOwnerinfo()));
|
|
|
orderAndAreaCompany.setApplyinfo(setNewIdentifyType(orderAndAreaCompany.getApplyinfo()));
|
|
|
orderAndAreaCompany.setInsureinfo(setNewIdentifyType(orderAndAreaCompany.getInsureinfo()));
|
|
|
+
|
|
|
+ InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = insAreaCompanyAccidentalDrivingService.getByCompanyId(companyId);
|
|
|
+ if (insAreaCompanyAccidentalDriving != null) {
|
|
|
+ List<InsDrivingIntentionInsuranceSon> insDrivingIntentionInsuranceSon = insDrivingIntentionInsuranceService.getInsDrivingIntentionInsuranceSon(
|
|
|
+ orderAndAreaCompany.getCompanyId(),
|
|
|
+ insAreaCompanyAccidentalDriving.getRideRiskCode());
|
|
|
+ if(insDrivingIntentionInsuranceSon.size() == 1 && insDrivingIntentionInsuranceSon.get(0).getPremium() == null)
|
|
|
+ {
|
|
|
+ insDrivingIntentionInsuranceSon.get(0).setPremium(orderAndAreaCompany.getJypremium().toString());
|
|
|
+ }
|
|
|
+ JSONArray accidentInfo = JSON.parseArray(JSON.toJSONString(insDrivingIntentionInsuranceSon));
|
|
|
+ orderAndAreaCompany.setAccidentInfo(accidentInfo);
|
|
|
+ }
|
|
|
+
|
|
|
return HttpResult.ok("success", orderAndAreaCompany);
|
|
|
}
|
|
|
/**
|
|
|
@@ -934,10 +951,12 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
if (null == orderAndAreaCompany.getFeeStatus()) orderAndAreaCompany.setFeeStatus("0");
|
|
|
|
|
|
//获取出单员地区信息
|
|
|
+
|
|
|
//add by hxl 添加手机号只显示最后四位
|
|
|
orderAndAreaCompany.setOwnerinfo(setNewPhone(orderAndAreaCompany.getOwnerinfo()));
|
|
|
orderAndAreaCompany.setApplyinfo(setNewPhone(orderAndAreaCompany.getApplyinfo()));
|
|
|
orderAndAreaCompany.setInsureinfo(setNewPhone(orderAndAreaCompany.getInsureinfo()));
|
|
|
+
|
|
|
//add by hxl 处理特殊情况返回信息 身份证信息变为01时前台返回身份证信息
|
|
|
orderAndAreaCompany.setOwnerinfo(setNewIdentifyType(orderAndAreaCompany.getOwnerinfo()));
|
|
|
orderAndAreaCompany.setApplyinfo(setNewIdentifyType(orderAndAreaCompany.getApplyinfo()));
|
|
|
@@ -947,7 +966,9 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
SysUserIsDial userIsDial = sysUserIsDialService.getOne(new LambdaQueryWrapper<SysUserIsDial>().eq(SysUserIsDial::getUserId, userId));
|
|
|
if (userIsDial == null) {
|
|
|
orderAndAreaCompany.setIsDial("0");
|
|
|
+
|
|
|
}else {
|
|
|
+ //如果拨号权限则显示完整手机号
|
|
|
orderAndAreaCompany.setIsDial(userIsDial.getIsDial());
|
|
|
orderAndAreaCompany.setDialUserName(userIsDial.getDialUserName());
|
|
|
orderAndAreaCompany.setDialPassWord(userIsDial.getDialPassWord());
|
|
|
@@ -972,4 +993,161 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
}
|
|
|
return ownerinfo;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 转换非车
|
|
|
+ */
|
|
|
+ public BaseQuoteVo convertDriving(BaseQuoteVo<QuoteAccidentalDrivingVo> baseQuoteVo){
|
|
|
+
|
|
|
+ //国任
|
|
|
+ if(baseQuoteVo.getCompanyId().equals("XDCX1000000")){
|
|
|
+ GuoRenQuoteVo<GuorenAccidentalDrivingVo> guoRenBaseQuoteVo = new GuoRenQuoteVo<>();
|
|
|
+ BeanUtils.copyProperties(baseQuoteVo,guoRenBaseQuoteVo);
|
|
|
+ if(baseQuoteVo.getAccidentalDrivingVo() != null) {
|
|
|
+ guoRenBaseQuoteVo.setAccidentalDrivingVo(new GuorenAccidentalDrivingVo());
|
|
|
+
|
|
|
+ if (baseQuoteVo.getAccidentalDrivingVo().getSumAmount() != null) {
|
|
|
+ guoRenBaseQuoteVo.getAccidentalDrivingVo().setAmount(baseQuoteVo.getAccidentalDrivingVo().getSumAmount());
|
|
|
+ }
|
|
|
+ if (baseQuoteVo.getAccidentalDrivingVo().getSumPremium() != null) {
|
|
|
+ guoRenBaseQuoteVo.getAccidentalDrivingVo().setPremium(baseQuoteVo.getAccidentalDrivingVo().getSumPremium());
|
|
|
+ }
|
|
|
+ guoRenBaseQuoteVo.getAccidentalDrivingVo().setProdCode(baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ guoRenBaseQuoteVo.getAccidentalDrivingVo().setGoodsCode(baseQuoteVo.getAccidentalDrivingVo().getParentCode());
|
|
|
+ guoRenBaseQuoteVo.getAccidentalDrivingVo().setGoodsName(baseQuoteVo.getAccidentalDrivingVo().getParentName());
|
|
|
+ InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(), baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ guoRenBaseQuoteVo.getAccidentalDrivingVo().setRiskCode(byProjectCode.getRiskCode());
|
|
|
+ guoRenBaseQuoteVo.getAccidentalDrivingVo().setQuantity(baseQuoteVo.getAccidentalDrivingVo().getQuantity());
|
|
|
+ }
|
|
|
+ return guoRenBaseQuoteVo;
|
|
|
+ }else if(baseQuoteVo.getCompanyId().equals("ZAPA1000000")){
|
|
|
+ //众安
|
|
|
+ BaseQuoteVo<Object> zhongAnBaseQuoteVo = new BaseQuoteVo<>();
|
|
|
+ BeanUtils.copyProperties(baseQuoteVo,zhongAnBaseQuoteVo);
|
|
|
+ if(baseQuoteVo.getAccidentalDrivingVo() != null) {
|
|
|
+ JSONObject accidentalDrivingVo = new JSONObject();
|
|
|
+ InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(), baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ accidentalDrivingVo.put("insuredFlag", "1");
|
|
|
+ accidentalDrivingVo.put("combination", baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ accidentalDrivingVo.put("productCode", byProjectCode.getRiskCode());
|
|
|
+ accidentalDrivingVo.put("name", baseQuoteVo.getAccidentalDrivingVo().getProjectName());
|
|
|
+ accidentalDrivingVo.put("quantity", baseQuoteVo.getAccidentalDrivingVo().getQuantity());
|
|
|
+ zhongAnBaseQuoteVo.setAccidentalDrivingVo(accidentalDrivingVo);
|
|
|
+ }
|
|
|
+ return zhongAnBaseQuoteVo;
|
|
|
+ }else if(baseQuoteVo.getCompanyId().equals("TPBX1000000")){
|
|
|
+ //安盛
|
|
|
+ BaseQuoteVo<Object> anShengBaseQuoteVo = new BaseQuoteVo<>();
|
|
|
+ BeanUtils.copyProperties(baseQuoteVo,anShengBaseQuoteVo);
|
|
|
+ if(baseQuoteVo.getAccidentalDrivingVo() != null) {
|
|
|
+ JSONObject accidentalDrivingVo = new JSONObject();
|
|
|
+ accidentalDrivingVo.put("personFlag", "1");
|
|
|
+ accidentalDrivingVo.put("planCode", baseQuoteVo.getAccidentalDrivingVo().getParentCode());
|
|
|
+ InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(), baseQuoteVo.getAccidentalDrivingVo().getParentCode());
|
|
|
+ accidentalDrivingVo.put("planSeries", byProjectCode.getRiskCode());
|
|
|
+ accidentalDrivingVo.put("planChineseName", baseQuoteVo.getAccidentalDrivingVo().getParentName());
|
|
|
+ accidentalDrivingVo.put("productCode", baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ accidentalDrivingVo.put("productName", baseQuoteVo.getAccidentalDrivingVo().getProjectName());
|
|
|
+ accidentalDrivingVo.put("quantity",baseQuoteVo.getAccidentalDrivingVo().getQuantity());
|
|
|
+ anShengBaseQuoteVo.setAccidentalDrivingVo(accidentalDrivingVo);
|
|
|
+ }
|
|
|
+ return anShengBaseQuoteVo;
|
|
|
+ }else if(baseQuoteVo.getCompanyId().equals("AICS1000000")){
|
|
|
+ //永诚
|
|
|
+ BaseQuoteVo<AccidentalDrivingVo> yongChengBaseQuoteVo = new BaseQuoteVo<>();
|
|
|
+ BeanUtils.copyProperties(baseQuoteVo,yongChengBaseQuoteVo);
|
|
|
+ if(baseQuoteVo.getAccidentalDrivingVo() != null) {
|
|
|
+ AccidentalDrivingVo accidentalDrivingVo = new AccidentalDrivingVo();
|
|
|
+ accidentalDrivingVo.setRideRiskCode(baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ accidentalDrivingVo.setRideRiskName(baseQuoteVo.getAccidentalDrivingVo().getProjectName());
|
|
|
+ accidentalDrivingVo.setQuantity(baseQuoteVo.getAccidentalDrivingVo().getQuantity());
|
|
|
+ yongChengBaseQuoteVo.setAccidentalDrivingVo(accidentalDrivingVo);
|
|
|
+ }
|
|
|
+ return yongChengBaseQuoteVo;
|
|
|
+ }else if(baseQuoteVo.getCompanyId().equals("ZMBX1000000")){
|
|
|
+ //中煤
|
|
|
+ BaseQuoteVo<AccidentalDrivingVo> zhongMeiBaseQuoteVo = new BaseQuoteVo<>();
|
|
|
+ BeanUtils.copyProperties(baseQuoteVo,zhongMeiBaseQuoteVo);
|
|
|
+ AccidentalDrivingVo accidentalDrivingVo = new AccidentalDrivingVo();
|
|
|
+ accidentalDrivingVo.setRideRiskName(baseQuoteVo.getAccidentalDrivingVo().getProjectName());
|
|
|
+ accidentalDrivingVo.setRideRiskCode(baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ accidentalDrivingVo.setQuantity(baseQuoteVo.getAccidentalDrivingVo().getQuantity());
|
|
|
+ zhongMeiBaseQuoteVo.setAccidentalDrivingVo(accidentalDrivingVo);
|
|
|
+ return zhongMeiBaseQuoteVo;
|
|
|
+ }else if(baseQuoteVo.getCompanyId().equals("GPIC1000000")){
|
|
|
+ //人寿
|
|
|
+ BaseQuoteVo<AccidentalDrivingVo> renShouBaseQuoteVo = new BaseQuoteVo<>();
|
|
|
+ BeanUtils.copyProperties(baseQuoteVo,renShouBaseQuoteVo);
|
|
|
+ AccidentalDrivingVo accidentalDrivingVo = new AccidentalDrivingVo();
|
|
|
+ accidentalDrivingVo.setId(baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ accidentalDrivingVo.setQuantity(baseQuoteVo.getAccidentalDrivingVo().getQuantity());
|
|
|
+ renShouBaseQuoteVo.setAccidentalDrivingVo(accidentalDrivingVo);
|
|
|
+ return renShouBaseQuoteVo;
|
|
|
+ }else if(baseQuoteVo.getCompanyId().equals("HBIC1000000")){
|
|
|
+ //恒邦
|
|
|
+ BaseQuoteVo<Object> hengBangBaseQuoteVo = new BaseQuoteVo<>();
|
|
|
+ BeanUtils.copyProperties(baseQuoteVo,hengBangBaseQuoteVo);
|
|
|
+ InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(),baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ hengBangBaseQuoteVo.setAccidentalDrivingVo(JSONObject.parseObject(byProjectCode.getRequestData()));
|
|
|
+ return hengBangBaseQuoteVo;
|
|
|
+ }else if(baseQuoteVo.getCompanyId().equals("TPIC1000000")){
|
|
|
+ //太平
|
|
|
+ BaseQuoteVo<Object> taiPingBaseQuoteVo = new BaseQuoteVo<>();
|
|
|
+ BeanUtils.copyProperties(baseQuoteVo,taiPingBaseQuoteVo);
|
|
|
+ InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(),baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ taiPingBaseQuoteVo.setAccidentalDrivingVo(JSONObject.parseObject(byProjectCode.getRequestData()));
|
|
|
+ return taiPingBaseQuoteVo;
|
|
|
+ }else if(baseQuoteVo.getCompanyId().equals("HNIC1000000")){
|
|
|
+ //华农
|
|
|
+ BaseQuoteVo<Object> huaNongBaseQuoteVo = new BaseQuoteVo<>();
|
|
|
+ BeanUtils.copyProperties(baseQuoteVo,huaNongBaseQuoteVo);
|
|
|
+ InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(),baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(byProjectCode.getRequestData());
|
|
|
+ jsonObject.put("allQuantity",baseQuoteVo.getAccidentalDrivingVo().getQuantity());
|
|
|
+ jsonObject.put("accidentType",jsonObject.getString("planCode"));
|
|
|
+ huaNongBaseQuoteVo.setAccidentalDrivingVo(jsonObject);
|
|
|
+ return huaNongBaseQuoteVo;
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 转换紫金驾意险
|
|
|
+ * @param baseQuoteVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public BaseQuoteVo<List<ZjQuoteAccidentVo>> converDrivingZijin(BaseQuoteVo<List<QuoteAccidentalDrivingVo>> baseQuoteVo){
|
|
|
+ List<QuoteAccidentalDrivingVo> accidentalDrivingVo = baseQuoteVo.getAccidentalDrivingVo();
|
|
|
+ List<ZjQuoteAccidentVo> zjQuoteAccidentVos = new ArrayList<>();
|
|
|
+ accidentalDrivingVo.forEach(item->{
|
|
|
+ ZjQuoteAccidentVo zjQuoteAccidentVo = new ZjQuoteAccidentVo();
|
|
|
+ zjQuoteAccidentVo.setSumAmount(item.getSumAmount());
|
|
|
+ zjQuoteAccidentVo.setSumPremium(item.getSumPremium());
|
|
|
+ InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(),item.getProjectCode());
|
|
|
+ zjQuoteAccidentVo.setRiskCode(byProjectCode.getRiskCode());
|
|
|
+ zjQuoteAccidentVo.setRiskName(item.getProjectName());
|
|
|
+ zjQuoteAccidentVo.setProjectCode(item.getProjectCode());
|
|
|
+ zjQuoteAccidentVo.setQuantity(String.valueOf(item.getQuantity()));
|
|
|
+ zjQuoteAccidentVos.add(zjQuoteAccidentVo);
|
|
|
+ });
|
|
|
+ BaseQuoteVo<List<ZjQuoteAccidentVo>> zjBaseQuoteVo = new BaseQuoteVo<>();
|
|
|
+ BeanUtils.copyProperties(baseQuoteVo,zjBaseQuoteVo);
|
|
|
+ zjBaseQuoteVo.setAccidentalDrivingVo(zjQuoteAccidentVos);
|
|
|
+ return zjBaseQuoteVo;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String getMobileByOrderNo(String orderNo,String type) {
|
|
|
+ InsOrders insOrders = baseMapper.selectOne(new LambdaQueryWrapper<InsOrders>().eq(InsOrders::getOrderno, orderNo));
|
|
|
+ if(insOrders != null) {
|
|
|
+ if (type.equals("ownerinfo"))
|
|
|
+ return insOrders.getOwnerinfo().getString("mobile");
|
|
|
+ if (type.equals("applyinfo"))
|
|
|
+ return insOrders.getApplyinfo().getString("mobile");
|
|
|
+ if (type.equals("insureinfo"))
|
|
|
+ return insOrders.getInsureinfo().getString("mobile");
|
|
|
+ }
|
|
|
+ return "";
|
|
|
+ }
|
|
|
}
|