소스 검색

渤海车船税问题修改

wks 2 년 전
부모
커밋
32860299c5

+ 1 - 2
src/main/java/com/ydtech/modules/order/controller/BoHaiOrderApiController.java

@@ -70,8 +70,7 @@ public class BoHaiOrderApiController {
     @PostMapping(value = "/submitImage")
     @ApiOperation(value = "提交影像信息")
     public HttpResult<Object> submitImage(@RequestSingleParam(value = "companyId") String companyId) throws Exception {
-//        return this.boHaiOrderApiService.submitImage(companyId);
-        return HttpResult.ok();
+        return this.boHaiOrderApiService.submitImage(companyId);
     }
 
     @AuditVerification("核保")

+ 33 - 0
src/main/java/com/ydtech/modules/order/entity/vo/TaxArrearsVo.java

@@ -0,0 +1,33 @@
+package com.ydtech.modules.order.entity.vo;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+
+/**
+ * 订单查询税返回实体
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class TaxArrearsVo {
+
+    /**
+     * 欠费
+     */
+    private BigDecimal taxDefault;
+
+    /**
+     * 滞纳金
+     */
+    private BigDecimal lateFee;
+    /**
+     * 当年应交
+     */
+    private BigDecimal dayYearTax;
+
+
+}

+ 7 - 1
src/main/java/com/ydtech/modules/order/service/impl/BoHaiOrderApiServiceImpl.java

@@ -671,7 +671,13 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
 
         // 车船税
         TaxArrears taxArrears =
-                Optional.ofNullable(response.getData().getTrafficPolicy()).map(QuotationResponse.DataDTO.TrafficPolicyDTO::getVehicleTax).map(x -> new TaxArrears("往年欠税", Double.parseDouble(x.getOverdueTaxAmount()), Double.parseDouble(x.getLateFee()))).orElse(new TaxArrears());
+                Optional.ofNullable(response.getData().getTrafficPolicy())
+                        .map(QuotationResponse.DataDTO.TrafficPolicyDTO::getVehicleTax)
+                        .map(x -> new TaxArrears("往年欠税",
+                                Double.parseDouble(x.getOverdueTaxAmount()),
+                                Double.parseDouble(String.valueOf(new BigDecimal(x.getOverdueTaxAmount()).subtract(new BigDecimal(x.getLateFee()))))
+                        ))
+                        .orElse(new TaxArrears());
 
         List<TaxArrears> taxArrearsList = Collections.singletonList(taxArrears);
         insAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsList)));

+ 266 - 249
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -363,24 +363,24 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         page.setSearchCount(false).setOptimizeCountSql(false);//关闭count查询
         boolean adminFalg = false;
         //修改逻辑   add by  hxl   修改查询当前登陆人的订单   admin 可以查看所有
-        if("admin".equals(orderQueryVo.getUserId())){
-            adminFalg=true;
+        if ("admin".equals(orderQueryVo.getUserId())) {
+            adminFalg = true;
         }
         /**
-        // 领导标志
-        boolean isTeamLeader = false;
-        //是否出单员标志
-        boolean isCdy = false;
-        if (StringUtils.isNotEmpty(orderQueryVo.getUserId())) {
-            SysUserRole userRole = sysUserRoleService.selectByUserId(orderQueryVo.getUserId());
-            if (Arrays.asList(SystemConstant.getSysRoleTeamLeader()).contains(userRole.getRoleId().toString())) {
-                //团队长可查询下面所有人员订单
-                isTeamLeader = true;
-            }
-            if (19 == userRole.getRoleId()) {
-                isCdy = true;
-            }
-        }
+         // 领导标志
+         boolean isTeamLeader = false;
+         //是否出单员标志
+         boolean isCdy = false;
+         if (StringUtils.isNotEmpty(orderQueryVo.getUserId())) {
+         SysUserRole userRole = sysUserRoleService.selectByUserId(orderQueryVo.getUserId());
+         if (Arrays.asList(SystemConstant.getSysRoleTeamLeader()).contains(userRole.getRoleId().toString())) {
+         //团队长可查询下面所有人员订单
+         isTeamLeader = true;
+         }
+         if (19 == userRole.getRoleId()) {
+         isCdy = true;
+         }
+         }
          orderQueryVo.setEndDate(orderQueryVo.getEndDatePlusOneDay());
          **/
         Page<InsOrders> orderVoPage = baseMapper.queryPageOrder(page, orderQueryVo, adminFalg, null);
@@ -398,16 +398,16 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         Page<InsOrders> resultOrders;
 
         //查询未审核
-        if(orderQueryVo.getAuditStatus() == null)
+        if (orderQueryVo.getAuditStatus() == null)
             orderQueryVo.setAuditStatus("0"); //默认查询未审核
         resultOrders = insAreaCompanyService.getAuditOrders(page, orderQueryVo);
 
         //查找机构来源字典 遍历
         Map<String, DictionaryManagement> m = DictEnumConfig.getDmMap();
         DictionaryManagement organizationSource = m.get("organizationSource");
-        resultOrders.getRecords().forEach(item->{
+        resultOrders.getRecords().forEach(item -> {
             DictionaryData dictionaryData = organizationSource.getDdList().stream().filter(x -> x.getDictValue().equals(item.getManagementSource())).findFirst().orElse(null);
-            if(dictionaryData != null){
+            if (dictionaryData != null) {
                 item.setManagementSource(dictionaryData.getDictTag());
             }
         });
@@ -551,16 +551,16 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
                 .orElse(new SysUser());
 
         SysUserInfo sysUserInfo = sysUserInfoService.getById(orderAndAreaCompany.getUserid());
-        if(!ObjectUtils.isEmpty(sysUserInfo)){
-            if("M".equals(sysUserInfo.getSex())){
+        if (!ObjectUtils.isEmpty(sysUserInfo)) {
+            if ("M".equals(sysUserInfo.getSex())) {
                 orderAndAreaCompany.setSex("男");
-            }else{
+            } else {
                 orderAndAreaCompany.setSex("女");
             }
         }
         orderAndAreaCompany.setMobile(sysUser.getMobile());
         //归属信息判断是否为空  用户id是否为管理员
-        if(!sysAreas.isEmpty() && !orderAndAreaCompany.getUserid().equals("admin")){
+        if (!sysAreas.isEmpty() && !orderAndAreaCompany.getUserid().equals("admin")) {
             orderAndAreaCompany.setProvince(sysAreas.get(2).getAreaCname());
             orderAndAreaCompany.setCity(sysAreas.get(1).getAreaCname());
             orderAndAreaCompany.setPrefecture(sysAreas.get(0).getAreaCname());
@@ -569,12 +569,12 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
 
         //推荐人信息查询
         EsmUserReferrer esmUserReferrer = esmUserReferrerService.getById(orderAndAreaCompany.getUserid());
-        if(esmUserReferrer != null){
+        if (esmUserReferrer != null) {
             SysUser referrerUser = sysUserService.findByUserId(esmUserReferrer.getReferrerId());
             SysUserInfo referrerSysUserInfo = sysUserInfoService.getById(esmUserReferrer.getReferrerId());
             //处理空指针报错
-            if(referrerUser != null){
-                if(referrerSysUserInfo != null) {
+            if (referrerUser != null) {
+                if (referrerSysUserInfo != null) {
                     if ("M".equals(referrerSysUserInfo.getSex())) {
                         orderAndAreaCompany.setReferrerSex("男");
                     } else {
@@ -597,10 +597,26 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
 
         //计算今年应缴税
         JSONArray taxArrears = orderAndAreaCompany.getTaxArrears();
-        if(taxArrears != null && !taxArrears.isEmpty()) {
-            JSONObject taxArrear = taxArrears.getJSONObject(0);
-            taxArrear.put("dayYearTax", orderAndAreaCompany.getTaxamount().subtract(taxArrear.getBigDecimal("taxDefault")
-                    .subtract(taxArrear.getBigDecimal("lateFee"))));
+        if (taxArrears != null && !taxArrears.isEmpty()) {
+            TaxArrearsVo taxArrearsVo = new TaxArrearsVo();
+            List<TaxArrears> taxArrearsList = taxArrears.toJavaList(TaxArrears.class);
+            // 全年补缴
+            BigDecimal taxDefault = BigDecimal.ZERO;
+            for (TaxArrears x : taxArrearsList) {
+                taxDefault = taxDefault.add(BigDecimal.valueOf(x.getTaxDefault()));
+            }
+            taxArrearsVo.setTaxDefault(taxDefault);
+            // 滞纳金
+            BigDecimal lateFee = BigDecimal.ZERO;
+            for (TaxArrears x : taxArrearsList) {
+                lateFee = lateFee.add(BigDecimal.valueOf(x.getLateFee()));
+            }
+            taxArrearsVo.setLateFee(lateFee);
+            // 当年应交
+            BigDecimal dayYearTax = orderAndAreaCompany.getTaxamount().subtract(taxDefault).subtract(lateFee);
+            taxArrearsVo.setDayYearTax(dayYearTax);
+            List<TaxArrearsVo> taxArrearsVos = Collections.singletonList(taxArrearsVo);
+            orderAndAreaCompany.setTaxArrears(JSON.parseArray(JSON.toJSONString(taxArrearsVos)));
         }
 
         YaExtendInfoDto yaExtendInfoDto = new YaExtendInfoDto();
@@ -669,37 +685,37 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             List<InsDrivingIntentionInsuranceSon> insDrivingIntentionInsuranceSon = insDrivingIntentionInsuranceService.getInsDrivingIntentionInsuranceSon(
                     orderAndAreaCompany.getCompanyId(),
                     insAreaCompanyAccidentalDriving.getRideRiskCode());
-            if(insDrivingIntentionInsuranceSon.size() == 1 && insDrivingIntentionInsuranceSon.get(0).getPremium() == null)
-            {
+            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);
-        }else{
+        } else {
             orderAndAreaCompany.setAccidentInfo(new JSONArray());
         }
 
         //获取交强险种信息
-        if(orderAndAreaCompany.getProductid().equals(ProductsType.PT_0330.getCode()) ||
+        if (orderAndAreaCompany.getProductid().equals(ProductsType.PT_0330.getCode()) ||
                 orderAndAreaCompany.getProductid().equals(ProductsType.PT_0330034001.getCode()) ||
-                        orderAndAreaCompany.getProductid().equals(ProductsType.PT_0330034002.getCode())) {
+                orderAndAreaCompany.getProductid().equals(ProductsType.PT_0330034002.getCode())) {
             orderAndAreaCompany.setJqInsuranceType(JqInsuranceType.toJsonArray());
-        }else{
+        } else {
             orderAndAreaCompany.setJqInsuranceType(new JSONArray());
         }
         return HttpResult.ok("success", orderAndAreaCompany);
     }
+
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/5/6 11:55
-     *  @Description: 只显示手机号后4位
+     * @version
+     * @author: hxl
+     * @Date: 2024/5/6 11:55
+     * @Description: 只显示手机号后4位
      */
     private static JSONObject setNewPhone(JSONObject ownerinfo) {
-        if(ownerinfo !=null ){
-            String phone = ownerinfo.getString("mobile")==null?"": ownerinfo.getString("mobile");
+        if (ownerinfo != null) {
+            String phone = ownerinfo.getString("mobile") == null ? "" : ownerinfo.getString("mobile");
             phone = phone.replaceAll("\\d{7}(\\d{4})", "*******$1");
-            ownerinfo.put("mobile",phone);
+            ownerinfo.put("mobile", phone);
         }
         return ownerinfo;
     }
@@ -715,7 +731,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         BeanUtils.copyProperties(insOrders, insOrdersEditingVo);
 
         //如果是外部订单才回显这些数据
-        if(insAreaCompanyList.size() > 0 && insOrders.getIsExternal() == 1) {
+        if (insAreaCompanyList.size() > 0 && insOrders.getIsExternal() == 1) {
             insAreaCompanyExternalFee = insAreaCompanyExternalFeeService.getById(insAreaCompanyList.get(0).getId());
             insOrdersEditingVo.setSigningTime(insAreaCompanyList.get(0).getSigningTime());
             insOrdersEditingVo.setJqpremium(insAreaCompanyList.get(0).getJqpremium().toString());
@@ -778,23 +794,22 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         List<String> companyIds = insAreaCompanyEditingDtos.stream().map(x -> x.getCompanyId()).collect(Collectors.toList());
 
 
-
         List<InsFeeOrderNew> insFeeOrderNews = new ArrayList<>();
-        if(!companyIds.isEmpty()) {
+        if (!companyIds.isEmpty()) {
             insFeeOrderNews = insFeeOrderNewService.getInsFeeOrderNewListByCompanyId(companyIds);
         }
 
-        if(insFeeOrderNews.size() > 0  &&  insAreaCompanyExternalFee != null){
-            if(insFeeOrderNews.get(0).getJqCostsProportion().compareTo(BigDecimal.ZERO) > 0 ||
-                    insFeeOrderNews.get(0).getJqOtherCostsProportion().compareTo(BigDecimal.ZERO) > 0){
+        if (insFeeOrderNews.size() > 0 && insAreaCompanyExternalFee != null) {
+            if (insFeeOrderNews.get(0).getJqCostsProportion().compareTo(BigDecimal.ZERO) > 0 ||
+                    insFeeOrderNews.get(0).getJqOtherCostsProportion().compareTo(BigDecimal.ZERO) > 0) {
                 insOrdersEditingVo.setJqCostsProportion(insAreaCompanyExternalFee.getJqSuperviseCostsProportion().add(insAreaCompanyExternalFee.getJqOtherCostsProportion()));
             }
-            if(insFeeOrderNews.get(0).getSyCostsProportion().compareTo(BigDecimal.ZERO) > 0 ||
-                    insFeeOrderNews.get(0).getSyOtherCostsProportion().compareTo(BigDecimal.ZERO) > 0){
+            if (insFeeOrderNews.get(0).getSyCostsProportion().compareTo(BigDecimal.ZERO) > 0 ||
+                    insFeeOrderNews.get(0).getSyOtherCostsProportion().compareTo(BigDecimal.ZERO) > 0) {
                 insOrdersEditingVo.setSyCostsProportion(insAreaCompanyExternalFee.getSySuperviseCostsProportion().add(insAreaCompanyExternalFee.getSyOtherCostsProportion()));
             }
-            if(insFeeOrderNews.get(0).getNoCostsProportion().compareTo(BigDecimal.ZERO) > 0 ||
-                    insFeeOrderNews.get(0).getNoOtherCostsProportion().compareTo(BigDecimal.ZERO) > 0){
+            if (insFeeOrderNews.get(0).getNoCostsProportion().compareTo(BigDecimal.ZERO) > 0 ||
+                    insFeeOrderNews.get(0).getNoOtherCostsProportion().compareTo(BigDecimal.ZERO) > 0) {
                 insOrdersEditingVo.setNoCostsProportion(insAreaCompanyExternalFee.getNoSuperviseCostsProportion().add(insAreaCompanyExternalFee.getNoOtherCostsProportion()));
             }
         }
@@ -900,12 +915,12 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
     @Override
     public BasePageResult<InsOrders> queryPageOrderByLinkType(OrderQueryVo orderQueryVo, int type) {
         //添加收回按钮的操作
-        Boolean flag=false;
+        Boolean flag = false;
         Page<InsOrders> page = new Page<>(orderQueryVo.getPageNum(), orderQueryVo.getPageSize());
         page.setSearchCount(false).setOptimizeCountSql(false);//关闭count查询
         List<String> agentUserIds = new ArrayList<>();
         List<String> agreeIds = new ArrayList<>();
-        List<String> deptIds= new ArrayList<>();
+        List<String> deptIds = new ArrayList<>();
         //角色为需要查询下级的用户
         if (type == 1) {
             //渠道
@@ -916,8 +931,8 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             //查询所有的代理人
             //查询绑定的区域的代理人信息
             List<String> areaCodes = sysUserLinkAreaMapper.findAreaCodeByUserId(orderQueryVo.getUserId());
-            if(areaCodes!=null && !areaCodes.isEmpty()){
-                agentUserIds =sysUserLinkAreaMapper.findAreaIdsByAgentUserId(orderQueryVo.getUserId(),areaCodes);
+            if (areaCodes != null && !areaCodes.isEmpty()) {
+                agentUserIds = sysUserLinkAreaMapper.findAreaIdsByAgentUserId(orderQueryVo.getUserId(), areaCodes);
             }
         } else if (type == 3) {
             //查询用户关联的协议
@@ -932,9 +947,9 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         Long total = 0l;
         Page<InsOrders> orderVoPage = new Page<>();
         //注释逻辑给前台返回数据
-        if((agentUserIds!=null && !agentUserIds.isEmpty()) || (agreeIds!=null && !agreeIds.isEmpty())){
-            orderVoPage = baseMapper.queryPageOrderByLinkType(page, orderQueryVo, agentUserIds, agreeIds,deptIds,flag);
-            total = baseMapper.queryPageOrderByLinkTypeCount(orderQueryVo, agentUserIds, agreeIds,deptIds,flag);
+        if ((agentUserIds != null && !agentUserIds.isEmpty()) || (agreeIds != null && !agreeIds.isEmpty())) {
+            orderVoPage = baseMapper.queryPageOrderByLinkType(page, orderQueryVo, agentUserIds, agreeIds, deptIds, flag);
+            total = baseMapper.queryPageOrderByLinkTypeCount(orderQueryVo, agentUserIds, agreeIds, deptIds, flag);
         }
         orderVoPage.setTotal(total);
         return new BasePageResult<>(orderQueryVo.getPageNum(), orderQueryVo.getPageSize(), orderVoPage.getTotal(),
@@ -968,10 +983,10 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         String areaInfo = sysDeptService.queryBelongArea(orderAndAreaCompany.getDeptid());
         SysUser sysUser = sysUserService.getById(orderAndAreaCompany.getUserid());
         SysUserInfo sysUserInfo = sysUserInfoService.getById(orderAndAreaCompany.getUserid());
-        if(!ObjectUtils.isEmpty(sysUserInfo)){
-            if("M".equals(sysUserInfo.getSex())){
+        if (!ObjectUtils.isEmpty(sysUserInfo)) {
+            if ("M".equals(sysUserInfo.getSex())) {
                 orderAndAreaCompany.setSex("男");
-            }else{
+            } else {
                 orderAndAreaCompany.setSex("女");
             }
         }
@@ -979,32 +994,32 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         orderAndAreaCompany.setDeptAreaInfo(areaInfo);
         //推荐人信息查询
         EsmUserReferrer esmUserReferrer = esmUserReferrerService.getById(orderAndAreaCompany.getUserid());
-        if(esmUserReferrer != null){
+        if (esmUserReferrer != null) {
             SysUser referrerUser = sysUserService.findByUserId(esmUserReferrer.getReferrerId());
             SysUserInfo referrerSysUserInfo = sysUserInfoService.getById(esmUserReferrer.getReferrerId());
             // add by  hxl 添加非空判断  防止报错
-            if(!ObjectUtils.isEmpty(referrerSysUserInfo)){
-                if("M".equals(referrerSysUserInfo.getSex())){
+            if (!ObjectUtils.isEmpty(referrerSysUserInfo)) {
+                if ("M".equals(referrerSysUserInfo.getSex())) {
                     orderAndAreaCompany.setReferrerSex("男");
-                }else{
+                } else {
                     orderAndAreaCompany.setReferrerSex("女");
                 }
             }
             // add by  hxl 添加非空判断 防止报错
-            if(!ObjectUtils.isEmpty(referrerUser)){
+            if (!ObjectUtils.isEmpty(referrerUser)) {
                 orderAndAreaCompany.setReferrerMobile(referrerUser.getMobile());
                 orderAndAreaCompany.setReferrerNo(referrerUser.getId());
                 orderAndAreaCompany.setReferrerName(referrerUser.getName());
                 orderAndAreaCompany.setReferrerDeptId(referrerUser.getDeptId());
                 SysDept sysDept = sysDeptService.getById(referrerUser.getDeptId());
-                orderAndAreaCompany.setReferrerDeptName(sysDept!=null?sysDept.getName():null);
+                orderAndAreaCompany.setReferrerDeptName(sysDept != null ? sysDept.getName() : null);
                 orderAndAreaCompany.setReferrerDeptAreaInfo(sysDeptService.queryBelongArea(referrerUser.getDeptId()));
             }
         }
 
         //计算今年应缴税
         JSONArray taxArrears = orderAndAreaCompany.getTaxArrears();
-        if(taxArrears != null && !taxArrears.isEmpty()) {
+        if (taxArrears != null && !taxArrears.isEmpty()) {
             JSONObject taxArrear = taxArrears.getJSONObject(0);
             taxArrear.put("dayYearTax", orderAndAreaCompany.getTaxamount().subtract(taxArrear.getBigDecimal("taxDefault")
                     .subtract(taxArrear.getBigDecimal("lateFee"))));
@@ -1049,10 +1064,10 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             orderAndAreaCompany.setSumFee(sum.toString());
             List<DistributionLevelVo> distributionLevelVoList = feeRuleSchemeService.converDistrbutionData(insFeeOrderNew);
             orderAndAreaCompany.setDistributionLevelVoList(distributionLevelVoList);
-            if(ptlAgreementProductCostsNew!=null){
+            if (ptlAgreementProductCostsNew != null) {
                 // add by  hxl  2024-05-14  显示费用信息
                 List<PtlAgreementUndwrtRulesAttr> undwrtRulesAttrList = ptlAgreementUndwrtRulesAttrService.getUndwrtRulesAttrList();
-                AgreementProductCostsSave agreementProductCosts = ptlAgreementProductCostsNewService.costsGet(ptlAgreementProductCostsNew.getId(),undwrtRulesAttrList);
+                AgreementProductCostsSave agreementProductCosts = ptlAgreementProductCostsNewService.costsGet(ptlAgreementProductCostsNew.getId(), undwrtRulesAttrList);
                 orderAndAreaCompany.setAgreementProductCostsSave(agreementProductCosts);
             }
         }
@@ -1085,7 +1100,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         if (userIsDial == null) {
             orderAndAreaCompany.setIsDial("0");
 
-        }else {
+        } else {
             //如果拨号权限则显示完整手机号
             orderAndAreaCompany.setIsDial(userIsDial.getIsDial());
             orderAndAreaCompany.setDialUserName(userIsDial.getDialUserName());
@@ -1096,18 +1111,18 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
 
 
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/5/9 16:18
-     *  @Description:  处理身份证为01返回身份证
+     * @version
+     * @author: hxl
+     * @Date: 2024/5/9 16:18
+     * @Description: 处理身份证为01返回身份证
      */
     private static JSONObject setNewIdentifyType(JSONObject ownerinfo) {
-        if(ownerinfo !=null ){
+        if (ownerinfo != null) {
             String identifyType = ownerinfo.getString("identifyType");
-            if("01".equals(identifyType)){
-                identifyType="身份证";
+            if ("01".equals(identifyType)) {
+                identifyType = "身份证";
             }
-            ownerinfo.put("identifyType",identifyType);
+            ownerinfo.put("identifyType", identifyType);
         }
         return ownerinfo;
     }
@@ -1116,19 +1131,19 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
     /**
      * 转换非车
      */
-    public BaseQuoteVo convertDriving(BaseQuoteVo<QuoteAccidentalDrivingVo> baseQuoteVo){
-        if(baseQuoteVo.getCompanyId().equals("HTIC1000000")){
+    public BaseQuoteVo convertDriving(BaseQuoteVo<QuoteAccidentalDrivingVo> baseQuoteVo) {
+        if (baseQuoteVo.getCompanyId().equals("HTIC1000000")) {
             return baseQuoteVo;
         }
 
-        if(baseQuoteVo.getAccidentalDrivingVo().getProjectCode() == null){
+        if (baseQuoteVo.getAccidentalDrivingVo().getProjectCode() == null) {
             baseQuoteVo.setAccidentalDrivingVo(null);
             return baseQuoteVo;
         }
         //国任
-        if(baseQuoteVo.getCompanyId().equals("XDCX1000000")){
+        if (baseQuoteVo.getCompanyId().equals("XDCX1000000")) {
             GuoRenQuoteVo<GuorenAccidentalDrivingVo> guoRenBaseQuoteVo = new GuoRenQuoteVo<>();
-            BeanUtils.copyProperties(baseQuoteVo,guoRenBaseQuoteVo);
+            BeanUtils.copyProperties(baseQuoteVo, guoRenBaseQuoteVo);
             guoRenBaseQuoteVo.setAccidentalDrivingVo(new GuorenAccidentalDrivingVo());
             if (baseQuoteVo.getAccidentalDrivingVo().getSumAmount() != null) {
                 guoRenBaseQuoteVo.getAccidentalDrivingVo().setAmount(baseQuoteVo.getAccidentalDrivingVo().getSumAmount());
@@ -1143,10 +1158,10 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             guoRenBaseQuoteVo.getAccidentalDrivingVo().setRiskCode(byProjectCode.getRiskCode());
             guoRenBaseQuoteVo.getAccidentalDrivingVo().setQuantity(baseQuoteVo.getAccidentalDrivingVo().getQuantity());
             return guoRenBaseQuoteVo;
-        }else if(baseQuoteVo.getCompanyId().equals("ZAPA1000000")){
+        } else if (baseQuoteVo.getCompanyId().equals("ZAPA1000000")) {
             //众安
             BaseQuoteVo<Object> zhongAnBaseQuoteVo = new BaseQuoteVo<>();
-            BeanUtils.copyProperties(baseQuoteVo,zhongAnBaseQuoteVo);
+            BeanUtils.copyProperties(baseQuoteVo, zhongAnBaseQuoteVo);
             JSONObject accidentalDrivingVo = new JSONObject();
             InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(), baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
             accidentalDrivingVo.put("insuredFlag", "1");
@@ -1156,10 +1171,10 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             accidentalDrivingVo.put("quantity", baseQuoteVo.getAccidentalDrivingVo().getQuantity());
             zhongAnBaseQuoteVo.setAccidentalDrivingVo(accidentalDrivingVo);
             return zhongAnBaseQuoteVo;
-        }else if(baseQuoteVo.getCompanyId().equals("TPBX1000000")){
+        } else if (baseQuoteVo.getCompanyId().equals("TPBX1000000")) {
             //安盛
             BaseQuoteVo<Object> anShengBaseQuoteVo = new BaseQuoteVo<>();
-            BeanUtils.copyProperties(baseQuoteVo,anShengBaseQuoteVo);
+            BeanUtils.copyProperties(baseQuoteVo, anShengBaseQuoteVo);
             JSONObject accidentalDrivingVo = new JSONObject();
             accidentalDrivingVo.put("personFlag", "1");
             accidentalDrivingVo.put("planCode", baseQuoteVo.getAccidentalDrivingVo().getParentCode());
@@ -1168,74 +1183,74 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             accidentalDrivingVo.put("planChineseName", baseQuoteVo.getAccidentalDrivingVo().getParentName());
             accidentalDrivingVo.put("productCode", baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
             accidentalDrivingVo.put("productName", baseQuoteVo.getAccidentalDrivingVo().getProjectName());
-            accidentalDrivingVo.put("quantity",baseQuoteVo.getAccidentalDrivingVo().getQuantity());
+            accidentalDrivingVo.put("quantity", baseQuoteVo.getAccidentalDrivingVo().getQuantity());
             anShengBaseQuoteVo.setAccidentalDrivingVo(accidentalDrivingVo);
             return anShengBaseQuoteVo;
-        }else if(baseQuoteVo.getCompanyId().equals("AICS1000000")){
+        } else if (baseQuoteVo.getCompanyId().equals("AICS1000000")) {
             //永诚
             BaseQuoteVo<AccidentalDrivingVo> yongChengBaseQuoteVo = new BaseQuoteVo<>();
-            BeanUtils.copyProperties(baseQuoteVo,yongChengBaseQuoteVo);
+            BeanUtils.copyProperties(baseQuoteVo, yongChengBaseQuoteVo);
             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")){
+        } else if (baseQuoteVo.getCompanyId().equals("ZMBX1000000")) {
             //中煤
             BaseQuoteVo<AccidentalDrivingVo> zhongMeiBaseQuoteVo = new BaseQuoteVo<>();
-            BeanUtils.copyProperties(baseQuoteVo,zhongMeiBaseQuoteVo);
+            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")){
+        } else if (baseQuoteVo.getCompanyId().equals("GPIC1000000")) {
             //人寿
             BaseQuoteVo<AccidentalDrivingVo> renShouBaseQuoteVo = new BaseQuoteVo<>();
-            BeanUtils.copyProperties(baseQuoteVo,renShouBaseQuoteVo);
+            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")){
+        } else if (baseQuoteVo.getCompanyId().equals("HBIC1000000")) {
             //恒邦
             BaseQuoteVo<Object> hengBangBaseQuoteVo = new BaseQuoteVo<>();
-            BeanUtils.copyProperties(baseQuoteVo,hengBangBaseQuoteVo);
+            BeanUtils.copyProperties(baseQuoteVo, hengBangBaseQuoteVo);
             InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(), baseQuoteVo.getAccidentalDrivingVo().getProjectCode());
             JSONObject jsonObject = JSONObject.parseObject(byProjectCode.getRequestData());
-            jsonObject.put("quantity","1");
+            jsonObject.put("quantity", "1");
             hengBangBaseQuoteVo.setAccidentalDrivingVo(jsonObject);
             return hengBangBaseQuoteVo;
-        }else if(baseQuoteVo.getCompanyId().equals("TPIC1000000")){
+        } else if (baseQuoteVo.getCompanyId().equals("TPIC1000000")) {
             //太平
             BaseQuoteVo<Object> taiPingBaseQuoteVo = new BaseQuoteVo<>();
-            BeanUtils.copyProperties(baseQuoteVo,taiPingBaseQuoteVo);
+            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")){
+        } else if (baseQuoteVo.getCompanyId().equals("HNIC1000000")) {
             //华农
             BaseQuoteVo<Object> huaNongBaseQuoteVo = new BaseQuoteVo<>();
-            BeanUtils.copyProperties(baseQuoteVo,huaNongBaseQuoteVo);
+            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;
-        }else if(baseQuoteVo.getCompanyId().equals("TKIC1000000")){
+        } else if (baseQuoteVo.getCompanyId().equals("TKIC1000000")) {
             //泰康
             BaseQuoteVo<Object> taiKangBaseQuoteVo = new BaseQuoteVo<>();
-            BeanUtils.copyProperties(baseQuoteVo,taiKangBaseQuoteVo);
+            BeanUtils.copyProperties(baseQuoteVo, taiKangBaseQuoteVo);
             JSONObject accidentObject = JSONObject.parseObject(JSONObject.toJSONString(taiKangBaseQuoteVo.getAccidentalDrivingVo()));
             JSONObject jsonObject = new JSONObject();
-            jsonObject.put("planCode",accidentObject.getString("projectCode"));
-            jsonObject.put("planName",accidentObject.getString("projectName"));
-            jsonObject.put("sumAmount",accidentObject.getString("sumAmount"));
-            jsonObject.put("sumPremium",accidentObject.getString("sumPremium"));
+            jsonObject.put("planCode", accidentObject.getString("projectCode"));
+            jsonObject.put("planName", accidentObject.getString("projectName"));
+            jsonObject.put("sumAmount", accidentObject.getString("sumAmount"));
+            jsonObject.put("sumPremium", accidentObject.getString("sumPremium"));
             taiKangBaseQuoteVo.setAccidentalDrivingVo(jsonObject);
             return taiKangBaseQuoteVo;
         }
@@ -1244,24 +1259,25 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
 
     /**
      * 转换紫金驾意险
+     *
      * @param baseQuoteVo
      * @return
      */
-    public BaseQuoteVo<List<ZjQuoteAccidentVo>> converDrivingZijin(BaseQuoteVo<List<QuoteAccidentalDrivingVo>> baseQuoteVo){
-        if(baseQuoteVo.getAccidentalDrivingVo().isEmpty()){
+    public BaseQuoteVo<List<ZjQuoteAccidentVo>> converDrivingZijin(BaseQuoteVo<List<QuoteAccidentalDrivingVo>> baseQuoteVo) {
+        if (baseQuoteVo.getAccidentalDrivingVo().isEmpty()) {
             BaseQuoteVo<List<ZjQuoteAccidentVo>> zjBaseQuoteVo = new BaseQuoteVo<>();
             List<ZjQuoteAccidentVo> zjQuoteAccidentVos = new ArrayList<>();
-            BeanUtils.copyProperties(baseQuoteVo,zjBaseQuoteVo);
+            BeanUtils.copyProperties(baseQuoteVo, zjBaseQuoteVo);
             zjBaseQuoteVo.setAccidentalDrivingVo(zjQuoteAccidentVos);
             return zjBaseQuoteVo;
         }
         List<QuoteAccidentalDrivingVo> accidentalDrivingVo = baseQuoteVo.getAccidentalDrivingVo();
         List<ZjQuoteAccidentVo> zjQuoteAccidentVos = new ArrayList<>();
-        accidentalDrivingVo.forEach(item->{
+        accidentalDrivingVo.forEach(item -> {
             ZjQuoteAccidentVo zjQuoteAccidentVo = new ZjQuoteAccidentVo();
             zjQuoteAccidentVo.setSumAmount(item.getSumAmount());
             zjQuoteAccidentVo.setSumPremium(item.getSumPremium());
-            InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(),item.getProjectCode());
+            InsDrivingIntentionInsurance byProjectCode = insDrivingIntentionInsuranceService.getByProjectCode(baseQuoteVo.getCompanyId(), item.getProjectCode());
             zjQuoteAccidentVo.setRiskCode(byProjectCode.getRiskCode());
             zjQuoteAccidentVo.setRiskName(item.getProjectName());
             zjQuoteAccidentVo.setProjectCode(item.getProjectCode());
@@ -1269,15 +1285,15 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             zjQuoteAccidentVos.add(zjQuoteAccidentVo);
         });
         BaseQuoteVo<List<ZjQuoteAccidentVo>> zjBaseQuoteVo = new BaseQuoteVo<>();
-        BeanUtils.copyProperties(baseQuoteVo,zjBaseQuoteVo);
+        BeanUtils.copyProperties(baseQuoteVo, zjBaseQuoteVo);
         zjBaseQuoteVo.setAccidentalDrivingVo(zjQuoteAccidentVos);
         return zjBaseQuoteVo;
     }
 
     @Override
-    public String getMobileByOrderNo(String orderNo,String type) {
+    public String getMobileByOrderNo(String orderNo, String type) {
         InsOrders insOrders = baseMapper.selectOne(new LambdaQueryWrapper<InsOrders>().eq(InsOrders::getOrderno, orderNo));
-        if(insOrders != null) {
+        if (insOrders != null) {
             if (type.equals("ownerinfo"))
                 return insOrders.getOwnerinfo().getString("mobile");
             if (type.equals("applyinfo"))
@@ -1290,36 +1306,36 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
 
     @Override
     public int getExpirationInsureCount(OrderExpirationQueryVo orderExpirationQueryVo) {
-        LocalDateTime currentTime,oneMonthAgo;
+        LocalDateTime currentTime, oneMonthAgo;
         Integer isJq = 1;
-        if(orderExpirationQueryVo.getJqEndDate() != null){
-            currentTime = LocalDateTime.parse(orderExpirationQueryVo.getJqEndDate(),DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+        if (orderExpirationQueryVo.getJqEndDate() != null) {
+            currentTime = LocalDateTime.parse(orderExpirationQueryVo.getJqEndDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
             oneMonthAgo = currentTime.plus(1, ChronoUnit.MONTHS);
-        }else if(orderExpirationQueryVo.getSyEndDate() != null){
-            currentTime = LocalDateTime.parse(orderExpirationQueryVo.getSyEndDate(),DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+        } else if (orderExpirationQueryVo.getSyEndDate() != null) {
+            currentTime = LocalDateTime.parse(orderExpirationQueryVo.getSyEndDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
             oneMonthAgo = currentTime.plus(1, ChronoUnit.MONTHS);
             isJq = 2;
-        }else {
+        } else {
             currentTime = LocalDateTime.now();
             oneMonthAgo = currentTime.plus(1, ChronoUnit.MONTHS);
         }
         return baseMapper.getExpirationInsureCount(orderExpirationQueryVo.getUserid(),
                 currentTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
-                oneMonthAgo.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),isJq,orderExpirationQueryVo.getParam());
+                oneMonthAgo.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), isJq, orderExpirationQueryVo.getParam());
     }
 
     @Override
-    public Page<OrderExpirationVo> getExpirationInsure(Page page,OrderExpirationQueryVo orderExpirationQueryVo) {
-        LocalDateTime currentTime,oneMonthAgo;
+    public Page<OrderExpirationVo> getExpirationInsure(Page page, OrderExpirationQueryVo orderExpirationQueryVo) {
+        LocalDateTime currentTime, oneMonthAgo;
         Integer isJq = 1;
-        if(orderExpirationQueryVo.getJqEndDate() != null){
-            currentTime = LocalDateTime.parse(orderExpirationQueryVo.getJqEndDate(),DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+        if (orderExpirationQueryVo.getJqEndDate() != null) {
+            currentTime = LocalDateTime.parse(orderExpirationQueryVo.getJqEndDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
             oneMonthAgo = currentTime.plus(1, ChronoUnit.MONTHS);
-        }else if(orderExpirationQueryVo.getSyEndDate() != null){
-            currentTime = LocalDateTime.parse(orderExpirationQueryVo.getSyEndDate(),DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+        } else if (orderExpirationQueryVo.getSyEndDate() != null) {
+            currentTime = LocalDateTime.parse(orderExpirationQueryVo.getSyEndDate(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
             oneMonthAgo = currentTime.plus(1, ChronoUnit.MONTHS);
             isJq = 2;
-        }else {
+        } else {
             currentTime = LocalDateTime.now();
             oneMonthAgo = currentTime.plus(1, ChronoUnit.MONTHS);
         }
@@ -1327,7 +1343,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
                 currentTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
                 oneMonthAgo.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), isJq, orderExpirationQueryVo.getParam());
         List<OrderExpirationVo> records = expirationInsure.getRecords();
-        for(OrderExpirationVo record : records){
+        for (OrderExpirationVo record : records) {
             Integer difference = Integer.parseInt(record.getDifference());
             record.setDifference(String.valueOf(-difference));
         }
@@ -1336,50 +1352,50 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
     }
 
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/6/24 18:14
-     *  @Description:  通过子订单号查询询价详情信息
+     * @version
+     * @author: hxl
+     * @Date: 2024/6/24 18:14
+     * @Description: 通过子订单号查询询价详情信息
      */
     @Override
     public InquiryDetalsVo getInquiryDetalsBySubOrderIds(InquiryDetalsQueryDto inquiryDetalsDto) {
         //通过其中一个子订单id查询主订单的id
-        if(inquiryDetalsDto.getSubOrderNos()==null || inquiryDetalsDto.getSubOrderNos().size()==0){
+        if (inquiryDetalsDto.getSubOrderNos() == null || inquiryDetalsDto.getSubOrderNos().size() == 0) {
             throw new SystemException("子订单号数组为空不能比价");
         }
-        if(inquiryDetalsDto.getSubOrderNos()!=null && inquiryDetalsDto.getSubOrderNos().size()==1){
+        if (inquiryDetalsDto.getSubOrderNos() != null && inquiryDetalsDto.getSubOrderNos().size() == 1) {
             throw new SystemException("子订单号数据为一个不能比价");
         }
         String subOrderNo = inquiryDetalsDto.getSubOrderNos().get(0);
-        InsAreaCompany  insAreaCompany = insAreaCompanyService.getById(subOrderNo);
+        InsAreaCompany insAreaCompany = insAreaCompanyService.getById(subOrderNo);
         //主订单信息
         InsOrders orders = this.getById(insAreaCompany.getOrderno());
-        InsOrderVo  insOrderVo = getInsOrderVoDetals(orders);
-        List<List<PriceParityVo>>  priceList=new ArrayList<>();
-        List<PriceParityVo> companyList=new ArrayList<>();
-        List<String> companyAllList=new ArrayList<>();
-        companyList.add(new PriceParityVo("公司",false,false));
-        List<PriceParityVo> jqList=new ArrayList<>();
-        jqList.add(new PriceParityVo("交强险",false,false));
-        List<PriceParityVo> syList=new ArrayList<>();
-        syList.add(new PriceParityVo("商业险",false,false));
-        List<PriceParityVo> ccList=new ArrayList<>();
-        ccList.add(new PriceParityVo("车船税",false,false));
-        List<PriceParityVo> jyList=new ArrayList<>();
-        jyList.add(new PriceParityVo("驾意险",false,false));
-        List<PriceParityVo> zbfList=new ArrayList<>();
-        zbfList.add(new PriceParityVo("总保费",false,false));
-        List<PriceParityVo> yhjList=new ArrayList<>();
-        yhjList.add(new PriceParityVo("优惠金额",false,false));
-        List<PriceParityVo> yhhList=new ArrayList<>();
-        yhhList.add(new PriceParityVo("优惠后",false,false));
-        List<BigDecimal> yhhbjList=new ArrayList<>();
-        List<SubOrderVo> subOrderVos=new ArrayList<>();
-        String companyName="";
-        if(inquiryDetalsDto.getSubOrderNos()!=null && inquiryDetalsDto.getSubOrderNos().size()>0){
-            for(String subOrderId :inquiryDetalsDto.getSubOrderNos()){
-                BigDecimal sumyh =BigDecimal.ZERO;
-                InsAreaCompany  insAreaCompanySingle = insAreaCompanyService.getById(subOrderId);
+        InsOrderVo insOrderVo = getInsOrderVoDetals(orders);
+        List<List<PriceParityVo>> priceList = new ArrayList<>();
+        List<PriceParityVo> companyList = new ArrayList<>();
+        List<String> companyAllList = new ArrayList<>();
+        companyList.add(new PriceParityVo("公司", false, false));
+        List<PriceParityVo> jqList = new ArrayList<>();
+        jqList.add(new PriceParityVo("交强险", false, false));
+        List<PriceParityVo> syList = new ArrayList<>();
+        syList.add(new PriceParityVo("商业险", false, false));
+        List<PriceParityVo> ccList = new ArrayList<>();
+        ccList.add(new PriceParityVo("车船税", false, false));
+        List<PriceParityVo> jyList = new ArrayList<>();
+        jyList.add(new PriceParityVo("驾意险", false, false));
+        List<PriceParityVo> zbfList = new ArrayList<>();
+        zbfList.add(new PriceParityVo("总保费", false, false));
+        List<PriceParityVo> yhjList = new ArrayList<>();
+        yhjList.add(new PriceParityVo("优惠金额", false, false));
+        List<PriceParityVo> yhhList = new ArrayList<>();
+        yhhList.add(new PriceParityVo("优惠后", false, false));
+        List<BigDecimal> yhhbjList = new ArrayList<>();
+        List<SubOrderVo> subOrderVos = new ArrayList<>();
+        String companyName = "";
+        if (inquiryDetalsDto.getSubOrderNos() != null && inquiryDetalsDto.getSubOrderNos().size() > 0) {
+            for (String subOrderId : inquiryDetalsDto.getSubOrderNos()) {
+                BigDecimal sumyh = BigDecimal.ZERO;
+                InsAreaCompany insAreaCompanySingle = insAreaCompanyService.getById(subOrderId);
                 //查询费用信息
                 InsFeeOrderNew insFeeOrderNew = insFeeOrderNewService.getOne(new LambdaQueryWrapper<InsFeeOrderNew>()
                         .eq(InsFeeOrderNew::getInsOrderNo, subOrderId));
@@ -1388,7 +1404,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
                             ptlAgreementProductCostsNewService.getById(insFeeOrderNew.getCostsId());
                     FeeOrderNewVo feeOrderNewVo = feeRuleSchemeService.newConvertOrderFeeVoData(insFeeOrderNew, ptlAgreementProductCostsNew);
                     //优惠信息
-                    if(feeOrderNewVo!=null && feeOrderNewVo.getExportFee()!=null && feeOrderNewVo.getExportFee().size()>0){
+                    if (feeOrderNewVo != null && feeOrderNewVo.getExportFee() != null && feeOrderNewVo.getExportFee().size() > 0) {
                         sumyh = feeOrderNewVo.getExportFee()
                                 .stream()
                                 .map(FeeOrderNewVo.ExportFee::getTotalAmount)
@@ -1396,40 +1412,40 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
                     }
                 }
                 SubOrderVo subOrderVo = new SubOrderVo(insAreaCompanySingle.getInscompany(), insAreaCompanySingle.getJqpremium(), getJQRiskList(insAreaCompanySingle),
-                        insAreaCompanySingle.getSypremium(), insAreaCompanySingle.getKindinfo()==null?new JSONArray():insAreaCompanySingle.getKindinfo(),
+                        insAreaCompanySingle.getSypremium(), insAreaCompanySingle.getKindinfo() == null ? new JSONArray() : insAreaCompanySingle.getKindinfo(),
                         insAreaCompanySingle.getTaxamount(), insAreaCompanySingle.getJypremium(), getJYRiskList(insAreaCompanySingle), insAreaCompanySingle.getSumpremium());
                 //保险公司名称
                 companyAllList.add(insAreaCompanySingle.getInscompany());
-                companyList.add(new PriceParityVo(insAreaCompanySingle.getInscompany(),false,false));
-                jqList.add(new PriceParityVo(insAreaCompanySingle.getJqpremium().toString(),false,false));
-                syList.add(new PriceParityVo(insAreaCompanySingle.getSypremium().toString(),false,false));
-                ccList.add(new PriceParityVo(insAreaCompanySingle.getTaxamount().toString(),false,false));
-                jyList.add(new PriceParityVo(insAreaCompanySingle.getJypremium().toString(),false,false));
-                zbfList.add(new PriceParityVo(insAreaCompanySingle.getSumpremium().toString(),false,false));
-                yhjList.add(new PriceParityVo(sumyh.toString(),false,false));
+                companyList.add(new PriceParityVo(insAreaCompanySingle.getInscompany(), false, false));
+                jqList.add(new PriceParityVo(insAreaCompanySingle.getJqpremium().toString(), false, false));
+                syList.add(new PriceParityVo(insAreaCompanySingle.getSypremium().toString(), false, false));
+                ccList.add(new PriceParityVo(insAreaCompanySingle.getTaxamount().toString(), false, false));
+                jyList.add(new PriceParityVo(insAreaCompanySingle.getJypremium().toString(), false, false));
+                zbfList.add(new PriceParityVo(insAreaCompanySingle.getSumpremium().toString(), false, false));
+                yhjList.add(new PriceParityVo(sumyh.toString(), false, false));
                 //优惠后金额
                 BigDecimal sumyhh = insAreaCompanySingle.getSumpremium().subtract(sumyh);
-                yhhList.add(new PriceParityVo(sumyhh.toString(),false,false));
+                yhhList.add(new PriceParityVo(sumyhh.toString(), false, false));
                 yhhbjList.add(sumyhh);
                 subOrderVos.add(subOrderVo);
             }
             Set<BigDecimal> set = new HashSet<BigDecimal>(yhhbjList);
             //判断是否相等
-            if(set.size()==yhhbjList.size()){
+            if (set.size() == yhhbjList.size()) {
                 //最优惠公司
                 int index = getCompanyNameByMinAmount(yhhbjList);
                 companyName = companyAllList.get(index);
                 // priceList.add(getZYList(companyList,index,false));
-                index=index+1;
+                index = index + 1;
                 priceList.add(companyList);
-                priceList.add(getZYList(jqList,index,false));
-                priceList.add(getZYList(syList,index,false));
-                priceList.add(getZYList(ccList,index,false));
-                priceList.add(getZYList(jyList,index,false));
-                priceList.add(getZYList(zbfList,index,false));
-                priceList.add(getZYList(yhjList,index,false));
-                priceList.add(getZYList(yhhList,index,true));
-            }else{
+                priceList.add(getZYList(jqList, index, false));
+                priceList.add(getZYList(syList, index, false));
+                priceList.add(getZYList(ccList, index, false));
+                priceList.add(getZYList(jyList, index, false));
+                priceList.add(getZYList(zbfList, index, false));
+                priceList.add(getZYList(yhjList, index, false));
+                priceList.add(getZYList(yhhList, index, true));
+            } else {
                 priceList.add(companyList);
                 priceList.add(jqList);
                 priceList.add(syList);
@@ -1440,44 +1456,45 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
                 priceList.add(yhhList);
             }
         }
-        return new InquiryDetalsVo(insOrderVo,subOrderVos,priceList,companyName);
+        return new InquiryDetalsVo(insOrderVo, subOrderVos, priceList, companyName);
     }
+
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/6/25 16:31
-     *  @Description:  设置优惠公司数据颜色区分
+     * @version
+     * @author: hxl
+     * @Date: 2024/6/25 16:31
+     * @Description: 设置优惠公司数据颜色区分
      */
     private List<PriceParityVo> getZYList(List<PriceParityVo> companyList, int index, boolean flag) {
-           List<PriceParityVo>  newList=new ArrayList<>();
-           if(companyList !=null && companyList.size()>0){
-                for (int i = 0; i < companyList.size(); i++) {
-                    if (i==index) {
-                        PriceParityVo priceParityVo = companyList.get(i);
-                        priceParityVo.setFlag(true);
-                        priceParityVo.setYzhFlag(flag);
-                        newList.add(priceParityVo);
-                    }else{
-                        newList.add(companyList.get(i));
-                    }
+        List<PriceParityVo> newList = new ArrayList<>();
+        if (companyList != null && companyList.size() > 0) {
+            for (int i = 0; i < companyList.size(); i++) {
+                if (i == index) {
+                    PriceParityVo priceParityVo = companyList.get(i);
+                    priceParityVo.setFlag(true);
+                    priceParityVo.setYzhFlag(flag);
+                    newList.add(priceParityVo);
+                } else {
+                    newList.add(companyList.get(i));
                 }
             }
-      return newList;
+        }
+        return newList;
     }
 
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/6/25 9:47
-     *  @Description: 获取优惠后最低的公司
+     * @version
+     * @author: hxl
+     * @Date: 2024/6/25 9:47
+     * @Description: 获取优惠后最低的公司
      */
     private static int getCompanyNameByMinAmount(List<BigDecimal> yhhbjList) {
-        int minIndex=0;
-        if(yhhbjList !=null && yhhbjList.size()>0){
+        int minIndex = 0;
+        if (yhhbjList != null && yhhbjList.size() > 0) {
             BigDecimal min = yhhbjList.stream().filter(Objects::nonNull).min(BigDecimal::compareTo).orElse(new BigDecimal(0));
             for (int i = 0; i < yhhbjList.size(); i++) {
-                if(min.compareTo(yhhbjList.get(i))==0){
-                    minIndex=i;
+                if (min.compareTo(yhhbjList.get(i)) == 0) {
+                    minIndex = i;
                     break;
                 }
             }
@@ -1486,10 +1503,10 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
     }
 
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/6/25 9:13
-     *  @Description:  获取驾意险信息
+     * @version
+     * @author: hxl
+     * @Date: 2024/6/25 9:13
+     * @Description: 获取驾意险信息
      */
     private JSONArray getJYRiskList(InsAreaCompany insAreaCompanySingle) {
         InsAreaCompanyAccidentalDriving insAreaCompanyAccidentalDriving = insAreaCompanyAccidentalDrivingService.getByCompanyId(insAreaCompanySingle.getCompanyId());
@@ -1497,74 +1514,74 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
             List<InsDrivingIntentionInsuranceSon> insDrivingIntentionInsuranceSon = insDrivingIntentionInsuranceService.getInsDrivingIntentionInsuranceSon(
                     insAreaCompanySingle.getCompanyId(),
                     insAreaCompanyAccidentalDriving.getRideRiskCode());
-            if(insDrivingIntentionInsuranceSon.size() == 1 && insDrivingIntentionInsuranceSon.get(0).getPremium() == null) {
+            if (insDrivingIntentionInsuranceSon.size() == 1 && insDrivingIntentionInsuranceSon.get(0).getPremium() == null) {
                 insDrivingIntentionInsuranceSon.get(0).setPremium(insAreaCompanySingle.getJypremium().toString());
             }
             JSONArray accidentInfo = JSON.parseArray(JSON.toJSONString(insDrivingIntentionInsuranceSon));
             return accidentInfo;
-        }else{
+        } else {
             return new JSONArray();
         }
     }
 
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/6/25 9:06
-     *  @Description:  获取交强险险种列表
+     * @version
+     * @author: hxl
+     * @Date: 2024/6/25 9:06
+     * @Description: 获取交强险险种列表
      */
     private static JSONArray getJQRiskList(InsAreaCompany insAreaCompanySingle) {
-        if(insAreaCompanySingle.getProductid().equals(ProductsType.PT_0330.getCode()) ||
+        if (insAreaCompanySingle.getProductid().equals(ProductsType.PT_0330.getCode()) ||
                 insAreaCompanySingle.getProductid().equals(ProductsType.PT_0330034001.getCode()) ||
                 insAreaCompanySingle.getProductid().equals(ProductsType.PT_0330034002.getCode())) {
             return JqInsuranceType.toJsonArray();
-        }else{
+        } else {
             return new JSONArray();
         }
     }
 
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/6/24 18:58
-     *  @Description: 返回详情信息
+     * @version
+     * @author: hxl
+     * @Date: 2024/6/24 18:58
+     * @Description: 返回详情信息
      */
     private InsOrderVo getInsOrderVoDetals(InsOrders orders) {
         JSONObject carinfo = orders.getCarinfo();
         JSONObject ownerinfo = orders.getOwnerinfo();
         JSONObject applyinfo = orders.getApplyinfo();
         JSONObject insureinfo = orders.getInsureinfo();
-        InsOrderVo insOrderVo =new InsOrderVo(StringUtils.isEmpty(orders.getOrderno())?"":orders.getOrderno(),
-                StringUtils.isEmpty(orders.getFrameno())?"":orders.getFrameno(),
-                StringUtils.isEmpty(orders.getLicenseno())?"":orders.getLicenseno(),
-                StringUtils.isEmpty(carinfo.getString("brandName"))?"":carinfo.getString("brandName"),
-                StringUtils.isEmpty(carinfo.getString("engineNo"))?"":carinfo.getString("engineNo"),
-                StringUtils.isEmpty(carinfo.getString("seatCount"))?"":carinfo.getString("seatCount"),
-                StringUtils.isEmpty(ownerinfo.getString("name"))?"":ownerinfo.getString("name"),
+        InsOrderVo insOrderVo = new InsOrderVo(StringUtils.isEmpty(orders.getOrderno()) ? "" : orders.getOrderno(),
+                StringUtils.isEmpty(orders.getFrameno()) ? "" : orders.getFrameno(),
+                StringUtils.isEmpty(orders.getLicenseno()) ? "" : orders.getLicenseno(),
+                StringUtils.isEmpty(carinfo.getString("brandName")) ? "" : carinfo.getString("brandName"),
+                StringUtils.isEmpty(carinfo.getString("engineNo")) ? "" : carinfo.getString("engineNo"),
+                StringUtils.isEmpty(carinfo.getString("seatCount")) ? "" : carinfo.getString("seatCount"),
+                StringUtils.isEmpty(ownerinfo.getString("name")) ? "" : ownerinfo.getString("name"),
                 setNewIdCard(ownerinfo),
-                StringUtils.isEmpty(applyinfo.getString("name"))?"":applyinfo.getString("name"),
+                StringUtils.isEmpty(applyinfo.getString("name")) ? "" : applyinfo.getString("name"),
                 setNewIdCard(applyinfo),
-                StringUtils.isEmpty(insureinfo.getString("name"))?"":insureinfo.getString("name"),
+                StringUtils.isEmpty(insureinfo.getString("name")) ? "" : insureinfo.getString("name"),
                 setNewIdCard(insureinfo),
-                StringUtils.isEmpty(orders.getJqstartdate())?"":orders.getJqstartdate(),
-                StringUtils.isEmpty(orders.getJqenddate())?"":orders.getJqenddate(),
-                StringUtils.isEmpty(orders.getSystartdate())?"":orders.getSystartdate(),
-                StringUtils.isEmpty(orders.getSyenddate())?"": orders.getSyenddate());
-        return  insOrderVo;
+                StringUtils.isEmpty(orders.getJqstartdate()) ? "" : orders.getJqstartdate(),
+                StringUtils.isEmpty(orders.getJqenddate()) ? "" : orders.getJqenddate(),
+                StringUtils.isEmpty(orders.getSystartdate()) ? "" : orders.getSystartdate(),
+                StringUtils.isEmpty(orders.getSyenddate()) ? "" : orders.getSyenddate());
+        return insOrderVo;
     }
 
     /**
-     *  @version
-     *  @author: hxl
-     *  @Date: 2024/5/9 16:18
-     *  @Description:  处理身份证为01返回身份证
+     * @version
+     * @author: hxl
+     * @Date: 2024/5/9 16:18
+     * @Description: 处理身份证为01返回身份证
      */
     private static String setNewIdCard(JSONObject ownerinfo) {
-        String identify="";
-        if(ownerinfo !=null ){
+        String identify = "";
+        if (ownerinfo != null) {
             String identifyType = ownerinfo.getString("identifyNumber");
-            if(StringUtils.isNotBlank(identifyType)){
-                identify=identifyType.replaceAll("(\\d{4})\\d{10}(\\d{4})", "$1****$2");
+            if (StringUtils.isNotBlank(identifyType)) {
+                identify = identifyType.replaceAll("(\\d{4})\\d{10}(\\d{4})", "$1****$2");
             }
         }
         return identify;

+ 0 - 1
src/main/java/com/ydtech/modules/protocol/controller/PtlAgreementController.java

@@ -89,7 +89,6 @@ public class PtlAgreementController extends BaseController {
     @PostMapping("/batch")
     @ApiOperation("批量修改协议是否启用状态")
     public HttpResult<Object> batchRevise(@RequestBody PltAgreementBatchVo pltAgreementBatchVo) {
-        String userName = getUserName();
         List<PtlAgreement> ptlAgreements = new ArrayList<>();
         for (String agreementId : pltAgreementBatchVo.getAgreementIds()) {
             PtlAgreement ptlAgreement = new PtlAgreement();