Browse Source

添加 非车默认选项

785834757 2 năm trước cách đây
mục cha
commit
2a20a4b7d6
27 tập tin đã thay đổi với 406 bổ sung99 xóa
  1. 1 0
      src/main/java/com/ydtech/modules/admin/service/SysUserIsDialService.java
  2. 6 0
      src/main/java/com/ydtech/modules/admin/service/impl/SysUserIsDialServiceImpl.java
  3. 0 4
      src/main/java/com/ydtech/modules/fnc/controller/CarSettleController.java
  4. 16 7
      src/main/java/com/ydtech/modules/order/controller/GuoRenOrderApiController.java
  5. 12 2
      src/main/java/com/ydtech/modules/order/controller/InsCrawlerOrderController.java
  6. 25 1
      src/main/java/com/ydtech/modules/order/controller/InsOrdersController.java
  7. 7 6
      src/main/java/com/ydtech/modules/order/controller/YongChengOrderApiController.java
  8. 8 3
      src/main/java/com/ydtech/modules/order/controller/ZhongMeiOrderApiController.java
  9. 9 7
      src/main/java/com/ydtech/modules/order/controller/ZijinOrderApiController.java
  10. 3 0
      src/main/java/com/ydtech/modules/order/entity/InsDrivingIntentionInsurance.java
  11. 3 0
      src/main/java/com/ydtech/modules/order/entity/InsDrivingIntentionInsuranceSon.java
  12. 1 1
      src/main/java/com/ydtech/modules/order/entity/vo/AccidentalDrivingVo.java
  13. 1 1
      src/main/java/com/ydtech/modules/order/entity/vo/InsDrivingIntentionInsuranceVo.java
  14. 3 0
      src/main/java/com/ydtech/modules/order/entity/vo/NoCarInsuranceQueryVo.java
  15. 17 14
      src/main/java/com/ydtech/modules/order/entity/vo/QuoteAccidentalDrivingVo.java
  16. 13 12
      src/main/java/com/ydtech/modules/order/entity/vo/guoren/GuoRenQuoteVo.java
  17. 2 5
      src/main/java/com/ydtech/modules/order/service/GuorenOrderApiService.java
  18. 16 0
      src/main/java/com/ydtech/modules/order/service/InsDrivingIntentionInsuranceService.java
  19. 24 0
      src/main/java/com/ydtech/modules/order/service/InsOrdersService.java
  20. 2 2
      src/main/java/com/ydtech/modules/order/service/impl/GuorenOrderApiServiceImpl.java
  21. 3 0
      src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java
  22. 1 0
      src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java
  23. 37 6
      src/main/java/com/ydtech/modules/order/service/impl/InsDrivingIntentionInsuranceServiceImpl.java
  24. 185 7
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java
  25. 4 3
      src/main/java/com/ydtech/modules/order/service/impl/ZijinOrderApiServiceImpl.java
  26. 1 1
      src/main/java/com/ydtech/modules/protocol/service/impl/PtlAgreementServiceImpl.java
  27. 6 17
      src/main/java/com/ydtech/modules/protocols/service/impl/PtlAgreementProductCostsNewServiceImpl.java

+ 1 - 0
src/main/java/com/ydtech/modules/admin/service/SysUserIsDialService.java

@@ -5,4 +5,5 @@ import com.ydtech.modules.admin.model.po.SysUserIsDial;
 
 public interface SysUserIsDialService extends IService<SysUserIsDial> {
 
+    SysUserIsDial getByUserId(String userId);
 }

+ 6 - 0
src/main/java/com/ydtech/modules/admin/service/impl/SysUserIsDialServiceImpl.java

@@ -1,5 +1,6 @@
 package com.ydtech.modules.admin.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ydtech.modules.admin.dao.SysUserIsDialMapper;
 import com.ydtech.modules.admin.model.po.SysUserIsDial;
@@ -10,4 +11,9 @@ import org.springframework.stereotype.Service;
 public class SysUserIsDialServiceImpl extends ServiceImpl<SysUserIsDialMapper, SysUserIsDial> implements SysUserIsDialService {
 
 
+    @Override
+    public SysUserIsDial getByUserId(String userId) {
+        SysUserIsDial sysUserIsDial = baseMapper.selectOne(new LambdaQueryWrapper<SysUserIsDial>().eq(SysUserIsDial::getUserId, userId));
+        return sysUserIsDial;
+    }
 }

+ 0 - 4
src/main/java/com/ydtech/modules/fnc/controller/CarSettleController.java

@@ -65,10 +65,6 @@ public class CarSettleController extends BaseController {
                 .eq(StringUtils.isNotEmpty(orderNo),"orderno",orderNo)
                 .eq("orderstatus","3").list();//3已承保
 
-//        List<InsAreaCompany> areaList = insAreaCompanyService.query()
-//                .eq("orderno", orderNo)
-//                .and(wrapper -> wrapper.eq("orderstatus", "3").or().eq("orderstatus", "2"))
-//                .list();//3已承保
         if(areaList!=null && !areaList.isEmpty()){
             return insOrdersService.getByCompanyId(areaList.get(0).getId(),"accountingUser");
         }else{

+ 16 - 7
src/main/java/com/ydtech/modules/order/controller/GuoRenOrderApiController.java

@@ -8,14 +8,16 @@ import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.entity.api.guoren.constants.GoodsClassifyList;
+import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
-import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
-import com.ydtech.modules.order.entity.vo.guoren.GuoRenSpecialAgreement;
-import com.ydtech.modules.order.entity.vo.guoren.NonAutoInsuranceList;
-import com.ydtech.modules.order.entity.vo.guoren.NonAutoInsuranceQueryVo;
+import com.ydtech.modules.order.entity.vo.QuoteAccidentalDrivingVo;
+import com.ydtech.modules.order.entity.vo.guoren.*;
 import com.ydtech.modules.order.service.GuorenOrderApiService;
+import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.utils.StringUtils;
 import io.swagger.annotations.*;
+import org.springframework.beans.BeanUtils;
+import org.springframework.context.annotation.Bean;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
@@ -34,8 +36,11 @@ public class GuoRenOrderApiController {
 
     private final GuorenOrderApiService guorenOrderApiService;
 
-    public GuoRenOrderApiController(GuorenOrderApiService guorenOrderApiService) {
+    private final InsOrdersService insOrdersService;
+
+    public GuoRenOrderApiController(GuorenOrderApiService guorenOrderApiService,InsOrdersService insOrdersService) {
         this.guorenOrderApiService = guorenOrderApiService;
+        this.insOrdersService = insOrdersService;
     }
 
     @ApiOperation(value = "通过渠道编码获取基本信息", notes = "获取出单所需的基本信息")
@@ -61,8 +66,12 @@ public class GuoRenOrderApiController {
     @QuoteVerification("报价授权")
     @ApiOperation(value = "报价")
     @PostMapping("/quote")
-    public HttpResult quoteApi(@RequestBody GuoRenQuoteVo quoteVo) {
-        return guorenOrderApiService.quoteApi(quoteVo);
+    public HttpResult quoteApi(@RequestBody GuoRenQuoteVo<QuoteAccidentalDrivingVo> quoteVo) {
+        BaseQuoteVo<GuorenAccidentalDrivingVo> baseQuoteVo = insOrdersService.convertDriving(quoteVo);
+        GuoRenQuoteVo guoRenQuoteVo = new GuoRenQuoteVo();
+        BeanUtils.copyProperties(baseQuoteVo, guoRenQuoteVo);
+        guoRenQuoteVo.setGuoRenSpecialAgreementVo(quoteVo.getGuoRenSpecialAgreementVo());
+        return guorenOrderApiService.quoteApi(guoRenQuoteVo);
     }
 
     @ApiOperation(value = "影像上传")

+ 12 - 2
src/main/java/com/ydtech/modules/order/controller/InsCrawlerOrderController.java

@@ -11,7 +11,11 @@ import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.entity.crawler.vo.CrawlerPolicyPrintVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
+import com.ydtech.modules.order.entity.vo.QuoteAccidentalDrivingVo;
 import com.ydtech.modules.order.service.InsCrawlerOrderService;
+import com.ydtech.modules.order.service.InsOrdersService;
+import com.ydtech.modules.protocols.entity.vo.AgreementProductCosts;
+import com.ydtech.modules.protocols.service.PtlAgreementProductCostsNewService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
@@ -20,6 +24,8 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
+
 @Api(tags = "爬虫对接")
 @RequestMapping("/insurance/crawler")
 @RestController
@@ -30,19 +36,23 @@ public class InsCrawlerOrderController extends BaseController {
 
     private final InsOrdersComponents insOrdersComponents;
 
+    private final InsOrdersService insOrdersService;
+
 
     @QuoteVerification("报价授权")
     @PostMapping("/quote")
     @ApiOperation("报价")
-    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<Object> baseQuoteVo) {
+    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<QuoteAccidentalDrivingVo> baseQuoteVo) {
+        BaseQuoteVo baseQuoteVo1 = insOrdersService.convertDriving(baseQuoteVo);
         BaseQuoteInfoVo quoteInfo = this.insOrdersComponents.getQuoteInfo(baseQuoteVo.getOrderNo(), baseQuoteVo.getAgreementId());
-        return insuranceCrawlerOrderService.quote(quoteInfo, baseQuoteVo);
+        return insuranceCrawlerOrderService.quote(quoteInfo, baseQuoteVo1);
     }
 
     @PostMapping(value = "/submitImage")
     @ApiOperation(value = "提交影像信息")
     public HttpResult<Object> submitImage(@RequestSingleParam(value = "subOrderNo") String subOrderNo) {
         return insuranceCrawlerOrderService.submitImage(subOrderNo);
+//        return HttpResult.ok("ok");
     }
 
     @AuditVerification("核保")

+ 25 - 1
src/main/java/com/ydtech/modules/order/controller/InsOrdersController.java

@@ -1,10 +1,13 @@
 package com.ydtech.modules.order.controller;
 
 import cn.keking.anti_reptile.annotation.AntiReptile;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.exception.SystemException;
+import com.ydtech.modules.admin.model.po.SysUserIsDial;
+import com.ydtech.modules.admin.service.SysUserIsDialService;
 import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.ins.model.InsOrdersExcelVo;
 import com.ydtech.modules.order.components.InsOrdersComponents;
@@ -44,12 +47,16 @@ public class InsOrdersController extends BaseController {
 
     private final InsAccidentalDrivingService insAccidentalDrivingService;
 
+    private final SysUserIsDialService sysUserIsDialService;
+
     public InsOrdersController(InsAreaCompanyService insAreaCompanyService, InsOrdersService insOrdersService,
-                               InsOrdersComponents insOrdersComponents, InsAccidentalDrivingService insAccidentalDrivingService) {
+                               InsOrdersComponents insOrdersComponents, InsAccidentalDrivingService insAccidentalDrivingService,
+                               SysUserIsDialService sysUserIsDialService) {
         this.insAreaCompanyService = insAreaCompanyService;
         this.insOrdersService = insOrdersService;
         this.insOrdersComponents = insOrdersComponents;
         this.insAccidentalDrivingService = insAccidentalDrivingService;
+        this.sysUserIsDialService = sysUserIsDialService;
     }
 
     @GetMapping("/getAgreementInsCompany")
@@ -281,4 +288,21 @@ public class InsOrdersController extends BaseController {
     public HttpResult updateBatchPruductById( String subOrderId) {
         return this.insAreaCompanyService.updateBatchPruductById(subOrderId);
     }
+
+
+    @GetMapping("/getMobileByOrderNo")
+    @ApiOperation(value = "通过订单号查询手机号码")
+    public HttpResult getMobileByOrderNo(String orderNo,String type){
+        JSONObject result = new JSONObject();
+        String phone = insOrdersService.getMobileByOrderNo(orderNo,type);
+        result.put("phone",phone);
+        SysUserIsDial sysUserIsDial = sysUserIsDialService.getByUserId(getUserId());
+        if(sysUserIsDial != null) {
+            if (sysUserIsDial.getIsDial().equals("1")) {
+                result.put("username",sysUserIsDial.getDialUserName());
+                result.put("password",sysUserIsDial.getDialPassWord());
+            }
+        }
+        return HttpResult.ok(result);
+    }
 }

+ 7 - 6
src/main/java/com/ydtech/modules/order/controller/YongChengOrderApiController.java

@@ -10,11 +10,9 @@ import com.ydtech.modules.esm.model.EsmInsAttachInsure;
 import com.ydtech.modules.order.aop.AuditVerification;
 import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.entity.InsAreaCompany;
-import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
-import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
-import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
-import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
+import com.ydtech.modules.order.entity.vo.*;
 import com.ydtech.modules.order.service.InsAreaCompanyService;
+import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.order.service.YongchengOrderApiService;
 import io.swagger.annotations.*;
 import lombok.RequiredArgsConstructor;
@@ -39,6 +37,8 @@ public class YongChengOrderApiController {
 
     private final InsAreaCompanyService insAreaCompanyService;
 
+    private final InsOrdersService insOrdersService;
+
     @ApiResponses({
             @ApiResponse(code = 500, message = "出现异常"),
             @ApiResponse(code = 101, message = "转保单"),
@@ -47,8 +47,9 @@ public class YongChengOrderApiController {
     @QuoteVerification("报价授权")
     @ApiOperation(value = "永诚API方式 - 报价")
     @PostMapping("/quote")
-    public HttpResult quoteApi(@RequestBody BaseQuoteVo<AccidentalDrivingVo> quoteVo) throws JsonProcessingException {
-        return yongchengOrderApiService.quoteApi(quoteVo);
+    public HttpResult quoteApi(@RequestBody BaseQuoteVo<QuoteAccidentalDrivingVo> quoteVo) throws JsonProcessingException {
+        BaseQuoteVo<AccidentalDrivingVo> baseQuoteVo = insOrdersService.convertDriving(quoteVo);
+        return yongchengOrderApiService.quoteApi(baseQuoteVo);
     }
 
     @AuditVerification("核保")

+ 8 - 3
src/main/java/com/ydtech/modules/order/controller/ZhongMeiOrderApiController.java

@@ -15,6 +15,7 @@ import com.ydtech.modules.order.entity.api.zhongmei.request.ApprovedRequest;
 import com.ydtech.modules.order.entity.api.zhongmei.request.CoverageRequest;
 import com.ydtech.modules.order.entity.api.zhongmei.response.RideAccidentQueryResponse;
 import com.ydtech.modules.order.entity.vo.*;
+import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.order.service.ZhongMeiOrderApiService;
 import com.ydtech.modules.order.utils.AESUtilsWithDataBase;
 import io.swagger.annotations.Api;
@@ -40,11 +41,14 @@ public class ZhongMeiOrderApiController {
 
     private final ZhongmeiApiConfigurationProperties properties;
 
+    private final InsOrdersService insOrdersService;
+
     public ZhongMeiOrderApiController(ZhongMeiOrderApiService zhongMeiOrderApiService, InsOrdersComponents insOrdersComponents,
-                                      ZhongmeiApiConfigurationProperties properties) {
+                                      ZhongmeiApiConfigurationProperties properties,InsOrdersService insOrdersService) {
         this.zhongMeiOrderApiService = zhongMeiOrderApiService;
         this.insOrdersComponents = insOrdersComponents;
         this.properties = properties;
+        this.insOrdersService = insOrdersService;
     }
 
     @PostMapping(value = "/modelsQuery")
@@ -59,9 +63,10 @@ public class ZhongMeiOrderApiController {
     @QuoteVerification("报价授权")
     @PostMapping("/quote")
     @ApiOperation("报价")
-    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<AccidentalDrivingVo> zmQuoteVo) {
+    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<QuoteAccidentalDrivingVo> zmQuoteVo) {
+        BaseQuoteVo<AccidentalDrivingVo> baseQuoteVo = insOrdersService.convertDriving(zmQuoteVo);
         BaseQuoteInfoVo quoteInfo = this.insOrdersComponents.getQuoteInfo(zmQuoteVo.getOrderNo(), zmQuoteVo.getAgreementId());
-        return this.zhongMeiOrderApiService.quote(quoteInfo, zmQuoteVo);
+        return this.zhongMeiOrderApiService.quote(quoteInfo, baseQuoteVo);
     }
 
     @AuditVerification("核保")

+ 9 - 7
src/main/java/com/ydtech/modules/order/controller/ZijinOrderApiController.java

@@ -11,12 +11,10 @@ import com.ydtech.modules.order.entity.api.zijin.request.PaymentCallbacksRequest
 import com.ydtech.modules.order.entity.api.zijin.request.SubmitVerifyRequest;
 import com.ydtech.modules.order.entity.api.zijin.response.QueryClauseDataResponse;
 import com.ydtech.modules.order.entity.api.zijin.response.QueryVehicProductsResponse;
-import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
-import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
-import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
-import com.ydtech.modules.order.entity.vo.SpecialAuditVo;
+import com.ydtech.modules.order.entity.vo.*;
 import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 import com.ydtech.modules.order.entity.vo.zj.ZjVehicleProductsQueryVo;
+import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.order.service.ZijinOrderApiService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -36,9 +34,12 @@ public class ZijinOrderApiController {
 
     private final ZijinOrderApiService zijinOrderApiService;
 
-    public ZijinOrderApiController(InsOrdersComponents insOrdersComponents, ZijinOrderApiService zijinOrderApiService) {
+    private final InsOrdersService insOrdersService;
+
+    public ZijinOrderApiController(InsOrdersComponents insOrdersComponents, ZijinOrderApiService zijinOrderApiService, InsOrdersService insOrdersService) {
         this.insOrdersComponents = insOrdersComponents;
         this.zijinOrderApiService = zijinOrderApiService;
+        this.insOrdersService = insOrdersService;
     }
 
     @PostMapping("/queryVehicleProducts")
@@ -50,9 +51,10 @@ public class ZijinOrderApiController {
     @QuoteVerification("报价授权")
     @PostMapping("/quote")
     @ApiOperation("报价")
-    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<List<ZjQuoteAccidentVo>> quoteVo) {
+    public HttpResult<QuoteRespVo> quote(@RequestBody BaseQuoteVo<List<QuoteAccidentalDrivingVo>> quoteVo) {
+        BaseQuoteVo<List<ZjQuoteAccidentVo>> listBaseQuoteVo = insOrdersService.converDrivingZijin(quoteVo);
         BaseQuoteInfoVo quoteInfo = this.insOrdersComponents.getQuoteInfo(quoteVo.getOrderNo(), quoteVo.getAgreementId());
-        return this.zijinOrderApiService.quote(quoteInfo, quoteVo);
+        return this.zijinOrderApiService.quote(quoteInfo, listBaseQuoteVo);
     }
 
     @PostMapping(value = "/submitImage")

+ 3 - 0
src/main/java/com/ydtech/modules/order/entity/InsDrivingIntentionInsurance.java

@@ -70,5 +70,8 @@ public class InsDrivingIntentionInsurance implements Serializable {
     @TableField(value = "sum_premium")
     private String sumPremium;
 
+    @TableField(value = "request_data")
+    private String requestData;
+
 
 }

+ 3 - 0
src/main/java/com/ydtech/modules/order/entity/InsDrivingIntentionInsuranceSon.java

@@ -30,6 +30,9 @@ public class InsDrivingIntentionInsuranceSon implements Serializable {
     @TableField(value = "driving_code_id")
     private String drivingCodeId;
 
+    @TableField(value = "company_id")
+    private String companyId;
+
     /**
      * 产品名称
      */

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/vo/AccidentalDrivingVo.java

@@ -12,7 +12,7 @@ public class AccidentalDrivingVo implements Serializable {
 
     private static final long serialVersionUID = -3043423126789961661L;
 
-    private Integer id;
+    private String id;
 
     @ApiModelProperty(value = "驾意险编号")
     private String rideRiskCode;

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/vo/InsDrivingIntentionInsuranceVo.java

@@ -66,7 +66,7 @@ public class InsDrivingIntentionInsuranceVo {
     private Boolean isDefault;
 
     @ApiModelProperty(value = "份数")
-    private String quantity;
+    private Integer quantity;
 
     /**
      * children对象

+ 3 - 0
src/main/java/com/ydtech/modules/order/entity/vo/NoCarInsuranceQueryVo.java

@@ -15,6 +15,9 @@ public class NoCarInsuranceQueryVo {
     @ApiModelProperty(value = "公司code")
     private String companyCode;
 
+    @ApiModelProperty(value = "公司id")
+    private String companyId;
+
     @ApiModelProperty(value = "座位数")
     private String seatNum;
 

+ 17 - 14
src/main/java/com/ydtech/modules/order/entity/vo/QuoteAccidentalDrivingVo.java

@@ -9,27 +9,30 @@ import lombok.Data;
 @Data
 public class QuoteAccidentalDrivingVo {
 
-    @ApiModelProperty("parentId")
+    @ApiModelProperty("父产品id")
     private String parentId;
 
-    @ApiModelProperty("商品号")
-    private String goodsCode;
+    @ApiModelProperty(value = "父产品名称")
+    private String parentName;
 
-    @ApiModelProperty("份数")
-    private int quantity;
+    @ApiModelProperty(value = "父产品code")
+    private String parentCode;
+
+    @ApiModelProperty("产品id")
+    private String productId;
 
-    @ApiModelProperty("商品名称")
-    private String goodsName;
+    @ApiModelProperty("产品code")
+    private String projectCode;
 
-//    @ApiModelProperty("产品代码")
-//    private String prodCode;
-//
-//    @ApiModelProperty("险种代码")
-//    private String riskCode;
+    @ApiModelProperty("产品名称")
+    private String projectName;
+
+    @ApiModelProperty("份数")
+    private int quantity;
 
     @ApiModelProperty("保额")
-    private String amount;
+    private String sumAmount;
 
     @ApiModelProperty("保费")
-    private String premium;
+    private String sumPremium;
 }

+ 13 - 12
src/main/java/com/ydtech/modules/order/entity/vo/guoren/GuoRenQuoteVo.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.order.entity.vo.guoren;
 
 
+import com.ydtech.modules.order.entity.vo.BaseQuoteVo;
 import com.ydtech.modules.order.entity.vo.guoren.GuoRenSpecialAgreementVo;
 import com.ydtech.modules.order.entity.vo.guoren.GuorenAccidentalDrivingVo;
 import io.swagger.annotations.ApiModelProperty;
@@ -15,21 +16,21 @@ import java.util.List;
  * @date: 2023/11/28 18:24
  **/
 @Data
-public class GuoRenQuoteVo implements Serializable {
+public class GuoRenQuoteVo<T> extends BaseQuoteVo<T> implements Serializable {
 
     private static final long serialVersionUID = -1474563895846828537L;
 
-    @ApiModelProperty("订单号")
-    private String orderNo;
-
-    @ApiModelProperty("保险公司编号")
-    private String companyId;
-
-    @ApiModelProperty(value = "协议id", required = true)
-    private String agreementId;
-
-    @ApiModelProperty("驾意险")
-    private GuorenAccidentalDrivingVo accidentalDrivingVo;
+//    @ApiModelProperty("订单号")
+//    private String orderNo;
+//
+//    @ApiModelProperty("保险公司编号")
+//    private String companyId;
+//
+//    @ApiModelProperty(value = "协议id", required = true)
+//    private String agreementId;
+//
+//    @ApiModelProperty("驾意险")
+//    private T accidentalDrivingVo;
 
     @ApiModelProperty("特别约定")
     private List<GuoRenSpecialAgreementVo> guoRenSpecialAgreementVo;

+ 2 - 5
src/main/java/com/ydtech/modules/order/service/GuorenOrderApiService.java

@@ -4,10 +4,7 @@ import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.ins.model.guoren.CarModelResp;
 import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
-import com.ydtech.modules.order.entity.vo.guoren.GuoRenQuoteVo;
-import com.ydtech.modules.order.entity.vo.guoren.GuoRenSpecialAgreement;
-import com.ydtech.modules.order.entity.vo.guoren.NonAutoInsuranceList;
-import com.ydtech.modules.order.entity.vo.guoren.NonAutoInsuranceQueryVo;
+import com.ydtech.modules.order.entity.vo.guoren.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.List;
@@ -35,7 +32,7 @@ public interface GuorenOrderApiService {
     /**
      * 2 报价
      */
-    HttpResult quoteApi(GuoRenQuoteVo quoteVo);
+    HttpResult quoteApi(GuoRenQuoteVo<GuorenAccidentalDrivingVo> quoteVo);
 
 
     /**

+ 16 - 0
src/main/java/com/ydtech/modules/order/service/InsDrivingIntentionInsuranceService.java

@@ -3,6 +3,7 @@ package com.ydtech.modules.order.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ydtech.modules.order.entity.InsCopyFeeOrder;
 import com.ydtech.modules.order.entity.InsDrivingIntentionInsurance;
+import com.ydtech.modules.order.entity.InsDrivingIntentionInsuranceSon;
 import com.ydtech.modules.order.entity.vo.InsDrivingIntentionInsuranceVo;
 import com.ydtech.modules.order.entity.vo.NoCarInsuranceQueryVo;
 
@@ -28,4 +29,19 @@ public interface InsDrivingIntentionInsuranceService extends IService<InsDriving
     List<InsDrivingIntentionInsuranceVo> getInsDrivingIntentionInsuranceRule(NoCarInsuranceQueryVo insuranceVo);
 
     InsDrivingIntentionInsurance getByParentId(Integer parentId);
+
+    /**
+     * 根据产品code 获取信息
+     * @param projectCode
+     * @return
+     */
+    InsDrivingIntentionInsurance getByProjectCode(String companyId,String projectCode);
+
+    /**
+     * 根据 保险公司id 和 驾意险id 获取驾意险险种
+     * @param companyId
+     * @param drivingCodeId
+     * @return
+     */
+    List<InsDrivingIntentionInsuranceSon> getInsDrivingIntentionInsuranceSon(String companyId,String drivingCodeId);
 }

+ 24 - 0
src/main/java/com/ydtech/modules/order/service/InsOrdersService.java

@@ -9,6 +9,7 @@ import com.ydtech.modules.order.entity.InsAreaCompany;
 import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.modules.order.entity.dto.InsAreaCompanyQueryDto;
 import com.ydtech.modules.order.entity.vo.*;
+import com.ydtech.modules.order.entity.vo.zj.ZjQuoteAccidentVo;
 import com.ydtech.modules.protocol.entity.dto.PtlAgreementInsCompanyDto;
 
 import java.util.List;
@@ -158,4 +159,27 @@ public interface InsOrdersService extends IService<InsOrders> {
      *  @Description:  任务管理的详细信息
      */
     HttpResult<OrderVo> getTaskByCompanyId(String companyId, String userId);
+
+
+    /**
+     * 转换驾意险对象
+     * @param baseQuoteVo
+     * @return
+     */
+    BaseQuoteVo convertDriving(BaseQuoteVo<QuoteAccidentalDrivingVo> baseQuoteVo);
+
+    /**
+     * 转换紫金驾意险
+     * @param baseQuoteVo
+     * @return
+     */
+    BaseQuoteVo<List<ZjQuoteAccidentVo>> converDrivingZijin(BaseQuoteVo<List<QuoteAccidentalDrivingVo>> baseQuoteVo);
+
+    /**
+     * 通过订单号查询手机号码
+     * @param orderNo
+     * @return
+     */
+    String getMobileByOrderNo(String orderNo,String type);
+
 }

+ 2 - 2
src/main/java/com/ydtech/modules/order/service/impl/GuorenOrderApiServiceImpl.java

@@ -180,7 +180,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
      * 2 报价-
      */
     @Override
-    public HttpResult quoteApi(GuoRenQuoteVo quoteVo) {
+    public HttpResult quoteApi(GuoRenQuoteVo<GuorenAccidentalDrivingVo> quoteVo) {
         log.debug("--------报价开始,订单号:{},协议号:{}--------------", quoteVo.getOrderNo(), quoteVo.getAgreementId());
         // 获取协议配置信息
         ChannelInfoDto channelInfo = gainChannelConfigInfo(quoteVo.getAgreementId());
@@ -242,7 +242,7 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
 
 
         InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = new InsAreaCompanyAccidentalDriving();
-        insAreaCompanyAccidentalDriving.setRideRiskCode(quoteVo.getAccidentalDrivingVo().getGoodsCode());
+        insAreaCompanyAccidentalDriving.setRideRiskCode(quoteVo.getAccidentalDrivingVo().getProdCode());
         insAreaCompanyAccidentalDriving.setRideRiskName(quoteVo.getAccidentalDrivingVo().getGoodsName());
         insAreaCompanyAccidentalDriving.setQuantity(quoteVo.getAccidentalDrivingVo().getQuantity());
         insAreaCompanyService.insertCompanyAndOrders(iac,insAreaCompanyAccidentalDriving);

+ 3 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java

@@ -127,6 +127,9 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
         insAreaCompanyAccidentalDriving.forEach(item -> {
             item.setCompanyId(finalInsAreaCompany.getId());
             item.setId(IdGenerate.nextId());
+            item.setRideRiskCode(item.getRideRiskCode());
+            item.setRideRiskName(item.getRideRiskName());
+            item.setQuantity(item.getQuantity());
         });
         insAreaCompanyAccidentalDrivingService.saveBatch(insAreaCompanyAccidentalDriving);
         insOrdersTrackService.addingTrajectories(insAreaCompany);

+ 1 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java

@@ -409,6 +409,7 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
 
         // 保险公司订单号
         insAreaCompany.setInsOrderNo(response.getOrderNo());
+        insAreaCompanyAccidentalDriving.setCompanyId(ptlAgreementAttribution.getInsCompanyId());
         insAreaCompanyService.insertCompanyAndOrders(insAreaCompany, insAreaCompanyAccidentalDriving);
         quoteRespVo.setCompanyId(insAreaCompany.getId());
         return quoteRespVo;

+ 37 - 6
src/main/java/com/ydtech/modules/order/service/impl/InsDrivingIntentionInsuranceServiceImpl.java

@@ -48,10 +48,11 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
     @Override
     public List<InsDrivingIntentionInsuranceVo> getInsDrivingIntentionInsuranceVo(NoCarInsuranceQueryVo insuranceVo) {
         LambdaQueryWrapper<InsDrivingIntentionInsurance> query = new LambdaQueryWrapper<InsDrivingIntentionInsurance>();
-
+        String companyId = "";
         if(insuranceVo.getAgreementId() != null){
             PtlAgreement byAgreementIdNew = ptlAgreementService.getByAgreementIdNew(insuranceVo.getAgreementId());
             query.eq(InsDrivingIntentionInsurance::getCompanyId, byAgreementIdNew.getInsuranceCompanyId());
+            companyId = byAgreementIdNew.getInsuranceCompanyId();
         }else{
             query.eq(InsDrivingIntentionInsurance::getCompanyId, insuranceVo.getCompanyCode());
         }
@@ -60,8 +61,11 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
         }
         List<InsDrivingIntentionInsurance> insDrivingIntentionInsurances = baseMapper.selectList(query);
         List<String> collect = insDrivingIntentionInsurances.stream().map(InsDrivingIntentionInsurance::getProjectCode).collect(Collectors.toList());
-
+        if(collect.size() == 0){
+            return new ArrayList<>();
+        }
         List<InsDrivingIntentionInsuranceSon> insDrivingIntentionInsuranceSons = sonMapper.selectList(new LambdaQueryWrapper<InsDrivingIntentionInsuranceSon>()
+                .eq(InsDrivingIntentionInsuranceSon::getCompanyId, companyId)
                 .in(InsDrivingIntentionInsuranceSon::getDrivingCodeId, collect));
 
         //组装驾意险信息
@@ -69,7 +73,7 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
         List<InsDrivingIntentionInsuranceVo> insDrivingIntentionInsuranceVo = baseDriving.stream()
                 .map(InsDrivingIntentionInsuranceVo::new)
                 .collect(Collectors.toList());
-
+        insDrivingIntentionInsuranceVo.forEach(x ->x.setQuantity(1));
         insDrivingIntentionInsuranceVo.forEach(x -> {
             x.setSon(insDrivingIntentionInsuranceSons.stream().filter(y -> y.getDrivingCodeId().equals(x.getProjectCode())).collect(Collectors.toList()));
             List<InsDrivingIntentionInsurance> children = insDrivingIntentionInsurances.stream().filter(y -> y.getParentId() == x.getId()).collect(Collectors.toList());
@@ -79,6 +83,7 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
             childrenVo.forEach(y -> {
                 y.setSon(insDrivingIntentionInsuranceSons.stream().filter(z -> z.getDrivingCodeId().equals(y.getProjectCode())).collect(Collectors.toList()));
             });
+            childrenVo.forEach(k-> k.setQuantity(1));
             x.setChildren(childrenVo);
         });
 
@@ -98,7 +103,10 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
             List<String> collect = byCompanyCode.stream().map(x -> x.getId()).collect(Collectors.toList());
             query.in(PtlAgreementNonCarProductRule::getAgreementId, collect);
         }else {
-            query.eq(PtlAgreementNonCarProductRule::getAgreementId, insuranceVo.getAgreementId());
+            PtlAgreement byAgreementIdNew = ptlAgreementService.getByAgreementIdNew(insuranceVo.getAgreementId());
+            List<PtlAgreement> byCompanyCode = ptlAgreementService.getByCompanyCode(byAgreementIdNew.getInsuranceCompanyId());
+            List<String> collect = byCompanyCode.stream().map(x -> x.getId()).collect(Collectors.toList());
+            query.in(PtlAgreementNonCarProductRule::getAgreementId, collect);
         }
         query.le(PtlAgreementNonCarProductRule::getSeatNumMin, insuranceVo.getRuleSeatNum());
         query.ge(PtlAgreementNonCarProductRule::getSeatNumMax, insuranceVo.getRuleSeatNum());
@@ -115,13 +123,19 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
             insDrivingIntentionInsuranceVo.stream()
                     .filter(item -> item.getProjectCode().toString().equals(list.get(0).getParentId()))
                     .findFirst()
-                    .ifPresent(item -> item.setIsDefault(true));
+                    .ifPresent(item -> {
+                        item.setIsDefault(true);
+                        item.setQuantity(1);
+                    });
             //遍历下级
             insDrivingIntentionInsuranceVo.stream()
                     .flatMap(item -> item.getChildren().stream())
                     .filter(child -> child.getProjectCode().toString().equals(list.get(0).getProductId()))
                     .findFirst()
-                    .ifPresent(child -> child.setIsDefault(true));
+                    .ifPresent(child -> {
+                        child.setIsDefault(true);
+                        child.setQuantity(1);
+                    });
         }
         return insDrivingIntentionInsuranceVo;
     }
@@ -130,4 +144,21 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
     public InsDrivingIntentionInsurance getByParentId(Integer parentId) {
         return baseMapper.selectOne(new LambdaQueryWrapper<InsDrivingIntentionInsurance>().eq(InsDrivingIntentionInsurance::getParentId, parentId));
     }
+
+    @Override
+    public InsDrivingIntentionInsurance getByProjectCode(String companyId, String projectCode) {
+        return baseMapper.selectOne(new LambdaQueryWrapper<InsDrivingIntentionInsurance>()
+                .eq(InsDrivingIntentionInsurance::getCompanyId, companyId)
+                .eq(InsDrivingIntentionInsurance::getProjectCode, projectCode));
+    }
+
+    @Override
+    public List<InsDrivingIntentionInsuranceSon> getInsDrivingIntentionInsuranceSon(String companyId, String drivingCodeId) {
+        List<InsDrivingIntentionInsuranceSon> insDrivingIntentionInsuranceSons = sonMapper.selectList(new LambdaQueryWrapper<InsDrivingIntentionInsuranceSon>()
+                .eq(InsDrivingIntentionInsuranceSon::getCompanyId, companyId)
+                .eq(InsDrivingIntentionInsuranceSon::getCode, drivingCodeId)
+                .or()
+                .eq(InsDrivingIntentionInsuranceSon::getDrivingCodeId, drivingCodeId));
+        return insDrivingIntentionInsuranceSons;
+    }
 }

+ 185 - 7
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -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 "";
+    }
 }

+ 4 - 3
src/main/java/com/ydtech/modules/order/service/impl/ZijinOrderApiServiceImpl.java

@@ -589,9 +589,10 @@ public class ZijinOrderApiServiceImpl implements ZijinOrderApiService {
         List<InsAreaCompanyAccidentalDriving> insAreaCompanyAccidentalDrivings = new ArrayList<>();
         accidentalDrivingVo.forEach(accidentalDriving -> {
             InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = new InsAreaCompanyAccidentalDriving();
-            insAreaCompanyAccidentalDriving.setQuantity(insAreaCompanyAccidentalDriving.getQuantity());
-            insAreaCompanyAccidentalDriving.setRideRiskCode(insAreaCompanyAccidentalDriving.getRideRiskCode());
-            insAreaCompanyAccidentalDriving.setRideRiskName(insAreaCompanyAccidentalDriving.getRideRiskName());
+            insAreaCompanyAccidentalDriving.setCompanyId(insAreaCompany.getCompanyId());
+            insAreaCompanyAccidentalDriving.setQuantity(Integer.parseInt(accidentalDriving.getQuantity()));
+            insAreaCompanyAccidentalDriving.setRideRiskCode(accidentalDriving.getProjectCode());
+            insAreaCompanyAccidentalDriving.setRideRiskName(accidentalDriving.getRiskName());
             insAreaCompanyAccidentalDrivings.add(insAreaCompanyAccidentalDriving);
         });
 

+ 1 - 1
src/main/java/com/ydtech/modules/protocol/service/impl/PtlAgreementServiceImpl.java

@@ -730,7 +730,7 @@ public class PtlAgreementServiceImpl extends ServiceImpl<PtlAgreementMapper, Ptl
 
     @Override
     public List<PtlAgreement> getByCompanyCode(String companyCode) {
-        return baseMapper.selectList(new LambdaQueryWrapper<PtlAgreement>().eq(PtlAgreement::getPartnerCompaniesId, companyCode));
+        return baseMapper.selectList(new LambdaQueryWrapper<PtlAgreement>().eq(PtlAgreement::getInsuranceCompanyId, companyCode));
     }
 
     @Override

+ 6 - 17
src/main/java/com/ydtech/modules/protocols/service/impl/PtlAgreementProductCostsNewServiceImpl.java

@@ -1158,22 +1158,6 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
 
         resultFeeOrderNewVo.setDeptManagerFee(deptManagerFeeList);
 
-
-
-//        FeeOrderNewVo.ExportFee jqExportFeeConv = new FeeOrderNewVo.ExportFee();
-//        BeanUtils.copyProperties(jqExportFee,jqExportFeeConv);
-//        exportFeeList.add(jqExportFeeConv);
-//
-//        FeeOrderNewVo.ExportFee syExportFeeConv = new FeeOrderNewVo.ExportFee();
-//        BeanUtils.copyProperties(syExportFee,syExportFeeConv);
-//        exportFeeList.add(syExportFeeConv);
-//
-//        FeeOrderNewVo.ExportFee noExportFeeConv = new FeeOrderNewVo.ExportFee();
-//        BeanUtils.copyProperties(noExportFee,noExportFeeConv);
-//        exportFeeList.add(noExportFeeConv);
-//
-//        resultFeeOrderNewVo.setExportFee(exportFeeList);
-
         feeOrderNewVo.getExportFee().clear();
 
         FeeOrderNewVo.ExportFee jqExportFeeConv = new FeeOrderNewVo.ExportFee();
@@ -1358,12 +1342,17 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
         feeOrderNewVo.getDeptManagerFee().get(2).setDeptPremiumsLevelFoure(noDeptManagerFee.getDeptPremiumsLevelFoure());
         feeOrderNewVo.getDeptManagerFee().get(2).setDeptPremiumsLevelFive(noDeptManagerFee.getDeptPremiumsLevelFive());
 
+
+
         //处理交强一级机构管理费
         feeOrderNewVo.getDeptManagerFee().get(0).setDeptPremiumsLevelOne(feeOrderNewVo.getEntranceFee().get(0).getTotalAmount().subtract(
                 feeOrderNewVo.getExportFee().get(0).getTotalAmount().add(feeOrderNewVo.getDeptManagerFee().get(0).getDeptPremiumsLevelTwo())
                         .add(feeOrderNewVo.getDeptManagerFee().get(0).getDeptPremiumsLevelThree())
                         .add(feeOrderNewVo.getDeptManagerFee().get(0).getDeptPremiumsLevelFoure())
-                        .add(feeOrderNewVo.getDeptManagerFee().get(0).getDeptPremiumsLevelFive())
+                        .add(feeOrderNewVo.getDeptManagerFee().get(0).getDeptPremiumsLevelFive()
+                                .add(retailStoreFee.getRetailStoreFeeLevel1())
+                                .add(retailStoreFee.getRetailStoreFeeLevel2())
+                                .add(retailStoreFee.getRetailStoreFeeLevel3()))
         ));
 
         //处理商业一级机构管理费