Kaynağa Gözat

修改驾意险查询

Qchen 1 yıl önce
ebeveyn
işleme
17f2820d79

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

@@ -2,8 +2,6 @@ package com.ydtech.modules.order.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ydtech.modules.order.entity.InsBusinessInsurance;
-import com.ydtech.modules.order.entity.InsDrivingIntentionInsurance;
-import com.ydtech.modules.scheme.entity.vo.InsDrivingIntentionInsuranceInfoVo;
 
 import java.util.List;
 
@@ -18,5 +16,4 @@ public interface InsBusinessInsuranceService extends IService<InsBusinessInsuran
      */
     List<InsBusinessInsurance> getBusinessInsurance();
 
-    List<InsDrivingIntentionInsurance> getDrivingInfo(InsDrivingIntentionInsuranceInfoVo insuranceInfoVo);
 }

+ 1 - 32
src/main/java/com/ydtech/modules/order/service/impl/InsBusinessInsuranceServiceImpl.java

@@ -4,14 +4,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ydtech.modules.order.dao.InsBusinessInsuranceMapper;
 import com.ydtech.modules.order.entity.*;
 import com.ydtech.modules.order.service.*;
-import com.ydtech.modules.scheme.entity.vo.InsDrivingIntentionInsuranceInfoVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
+
 
 /**
  * 驾意险服务实现类
@@ -27,32 +24,4 @@ public class InsBusinessInsuranceServiceImpl extends ServiceImpl<InsBusinessInsu
         return baseMapper.getBusinessInsurance();
     }
 
-    @Override
-    public List<InsDrivingIntentionInsurance> getDrivingInfo(InsDrivingIntentionInsuranceInfoVo insuranceInfoVo) {
-        // 获取所有记录
-        List<InsDrivingIntentionInsurance> allRecords = insDrivingIntentionInsuranceService.list();
-
-        // 使用parentId对记录进行分组
-        Map<Integer, List<InsDrivingIntentionInsurance>> groupedByParent = allRecords.stream()
-                .collect(Collectors.groupingBy(InsDrivingIntentionInsurance::getParentId));
-
-        // 创建一个新的List来存储最终的结果
-        List<InsDrivingIntentionInsurance> resultList = new ArrayList<>();
-
-        // 过滤出所有的顶级记录(parentId为null或0)
-        List<InsDrivingIntentionInsurance> topLevelRecords = allRecords.stream()
-                .filter(item -> item.getParentId() == null || item.getParentId() == 0)
-                .collect(Collectors.toList());
-
-        // 设置每个顶级记录的子记录
-        for (InsDrivingIntentionInsurance item : topLevelRecords) {
-            // 根据顶级记录的id来查找子记录
-            item.setInsDrivingIntentionInsurances(groupedByParent.getOrDefault(item.getId(), new ArrayList<>()));
-        }
-
-        // 将顶级记录添加到结果集中
-        resultList.addAll(topLevelRecords);
-
-        return resultList;
-    }
 }

+ 3 - 0
src/main/java/com/ydtech/modules/scheme/entity/vo/DrivingIntentionQueryVo.java

@@ -14,6 +14,9 @@ public class DrivingIntentionQueryVo {
     @ApiModelProperty("产品名称")
     private String productName;
 
+    @ApiModelProperty("产品名称")
+    private String projectName;
+
     @ApiModelProperty("保险公司id")
     private String companyId;
     @ApiModelProperty("保险公司名称")

+ 3 - 0
src/main/resources/mapper/modules/order/InsDrivingIntentionInsuranceMapper.xml

@@ -103,6 +103,9 @@
         <if test="param.companyName != null and param.companyName != ''">
             and company.name like concat('%',#{param.companyName},'%')
         </if>
+        <if test="param.projectName != null and param.projectName != ''">
+            and idii.project_name like concat('%',#{param.projectName},'%')
+        </if>
         <if test="param.drivingIntentionIds != null and param.drivingIntentionIds != ''">
             and idii.id in
             <foreach item="id" collection="param.drivingIntentionIds" open="(" separator="," close=")">