Przeglądaj źródła

驾意险、保险公司配置

xuqiang 1 rok temu
rodzic
commit
6c8b89a430
30 zmienionych plików z 1966 dodań i 0 usunięć
  1. 47 0
      commons/src/main/java/com/jzg/commons/entity/dto/EsmInsCompanyAdd.java
  2. 51 0
      commons/src/main/java/com/jzg/commons/entity/dto/EsmInsCompanyEnd.java
  3. 67 0
      commons/src/main/java/com/jzg/commons/entity/dto/JyxConfigAdd.java
  4. 70 0
      commons/src/main/java/com/jzg/commons/entity/dto/JyxConfigEnd.java
  5. 18 0
      commons/src/main/java/com/jzg/commons/entity/dto/JyxConfigParam.java
  6. 48 0
      commons/src/main/java/com/jzg/commons/entity/po/EsmInsCompany.java
  7. 31 0
      commons/src/main/java/com/jzg/commons/entity/po/JyxBlame.java
  8. 39 0
      commons/src/main/java/com/jzg/commons/entity/po/JyxConfig.java
  9. 29 0
      commons/src/main/java/com/jzg/commons/entity/po/jyxSetting.java
  10. 24 0
      commons/src/main/java/com/jzg/commons/entity/vo/EsmInsCompanyReq.java
  11. 46 0
      commons/src/main/java/com/jzg/commons/entity/vo/EsmInsCompanyResVo.java
  12. 60 0
      commons/src/main/java/com/jzg/commons/entity/vo/EsmInsCompanyVo.java
  13. 56 0
      commons/src/main/java/com/jzg/commons/entity/vo/JyxConfigVo.java
  14. 50 0
      commons/src/main/java/com/jzg/commons/util/ConvertUtils.java
  15. 324 0
      platform/src/main/java/com/jzg/controller/EsmInsCompanyController.java
  16. 73 0
      platform/src/main/java/com/jzg/controller/JyxConfigController.java
  17. 65 0
      platform/src/main/java/com/jzg/mapper/EsmInsCompanyMapper.java
  18. 10 0
      platform/src/main/java/com/jzg/mapper/JyxBlameMapper.java
  19. 19 0
      platform/src/main/java/com/jzg/mapper/JyxConfigMapper.java
  20. 9 0
      platform/src/main/java/com/jzg/mapper/jyxSettingMapper.java
  21. 114 0
      platform/src/main/java/com/jzg/service/EsmInsCompanyService.java
  22. 7 0
      platform/src/main/java/com/jzg/service/JyxBlameService.java
  23. 26 0
      platform/src/main/java/com/jzg/service/JyxConfigService.java
  24. 239 0
      platform/src/main/java/com/jzg/service/impl/EsmInsCompanyServiceImpl.java
  25. 11 0
      platform/src/main/java/com/jzg/service/impl/JyxBlameServiceImpl.java
  26. 136 0
      platform/src/main/java/com/jzg/service/impl/JyxConfigServiceImpl.java
  27. 11 0
      platform/src/main/java/com/jzg/service/impl/jyxSettingServiceImpl.java
  28. 7 0
      platform/src/main/java/com/jzg/service/jyxSettingService.java
  29. 215 0
      platform/src/main/resources/mapper/EsmInsCompanyMapper.xml
  30. 64 0
      platform/src/main/resources/mapper/JyxConfigMapper.xml

+ 47 - 0
commons/src/main/java/com/jzg/commons/entity/dto/EsmInsCompanyAdd.java

@@ -0,0 +1,47 @@
+package com.jzg.commons.entity.dto;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+@Data
+@Schema(description = "保险公司基本信息新增dto")
+public class EsmInsCompanyAdd {
+
+    @Schema(description = "编码")
+    @NotNull(message = "编码不能为空")
+    private String code;
+
+    @Schema(description = "保险公司代码")
+    @NotNull(message = "保险公司代码不能为空")
+    private String companyCode;
+
+    @Schema(description = "名称")
+    @NotNull(message = "名称不能为空")
+    private String name;
+
+    @Schema(description = "父编号")
+    private String parentId;
+
+    @Schema(description = "名称简称")
+    @NotNull(message = "名称简称不能为空")
+    private String nameSimple;
+
+    @Schema(description = "备注")
+    private String remark;
+
+    @Schema(description = "排序")
+    private int orderNum;
+
+    @Schema(description = "拼音")
+    private String cnName;
+
+    @Schema(description = "保司类型(1 - 财险、2 - 寿险、0 - 渠道)")
+    @NotNull(message = "保司类型不能为空")
+    private int type;
+
+    @Schema(description = "保险公司logo")
+    private String logo;
+
+}

+ 51 - 0
commons/src/main/java/com/jzg/commons/entity/dto/EsmInsCompanyEnd.java

@@ -0,0 +1,51 @@
+package com.jzg.commons.entity.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+
+@Data
+@Schema(description = "保险公司基本信息修改dto")
+public class EsmInsCompanyEnd {
+
+    @Schema(description = "ID")
+    @NotNull(message = "ID不能为空")
+    private String id;
+
+    @Schema(description = "编码")
+    @NotNull(message = "编码不能为空")
+    private String code;
+
+    @Schema(description = "保险公司代码")
+    @NotNull(message = "保险公司代码不能为空")
+    private String companyCode;
+
+    @Schema(description = "名称")
+    @NotNull(message = "名称不能为空")
+    private String name;
+
+    @Schema(description = "父编号")
+    private String parentId;
+
+    @Schema(description = "名称简称")
+    @NotNull(message = "名称简称不能为空")
+    private String nameSimple;
+
+    @Schema(description = "备注")
+    private String remark;
+
+    @Schema(description = "排序")
+    private int orderNum;
+
+    @Schema(description = "拼音")
+    private String cnName;
+
+    @Schema(description = "保司类型(1 - 财险、2 - 寿险、0 - 渠道)")
+    @NotNull(message = "保司类型不能为空")
+    private int type;
+
+    @Schema(description = "保险公司logo")
+    private String logo;
+
+}

+ 67 - 0
commons/src/main/java/com/jzg/commons/entity/dto/JyxConfigAdd.java

@@ -0,0 +1,67 @@
+package com.jzg.commons.entity.dto;
+
+
+import com.jzg.commons.entity.po.JyxBlame;
+import com.jzg.commons.entity.po.jyxSetting;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@Schema(description = "驾意险配置")
+public class JyxConfigAdd {
+
+    @Schema(description = "产品类型")
+    @NotNull(message = "产品类型不能为空")
+    private String productType;
+
+    @Schema(description = "上级产品")
+    @NotNull(message = "上级产品不能为空")
+    private String parentId;
+
+    @Schema(description = " 产品名称")
+    @NotNull(message = "产品名称不能为空")
+    private String productName;
+
+    @Schema(description = "别名")
+    @NotNull(message = "别名不能为空")
+    private String alias;
+
+    @Schema(description = "保险公司")
+    @NotNull(message = "保险公司不能为空")
+    private String company;
+
+    @Schema(description = "产品编码")
+    @NotNull(message = "产品编码不能为空")
+    private String productCode;
+
+    @Schema(description = "对接方式")
+    @NotNull(message = "对接方式不能为空")
+    private String connectionMethod;
+
+    @Schema(description = "保费设置")
+    @NotNull(message = "保费设置不能为空")
+    private String premiumSetting;
+
+    @Schema(description = "总保额")
+    @NotNull(message = "总保额不能为空")
+    private  String coverage;
+
+    @Schema(description = "总保费")
+    @NotNull(message = "总保费不能为空")
+    private String premium;
+
+    @Schema(description = "租户编码")
+    private String systemCode;
+
+    @Schema(description = "保险责任")
+    @NotNull(message = "保险责任不能为空")
+    private List<JyxBlame> blameList;
+
+    @Schema(description = "驾意险保费设置")
+    @NotNull(message = "驾意险保费设置不能为空")
+    private List<jyxSetting> settingList;
+
+}

+ 70 - 0
commons/src/main/java/com/jzg/commons/entity/dto/JyxConfigEnd.java

@@ -0,0 +1,70 @@
+package com.jzg.commons.entity.dto;
+
+import com.jzg.commons.entity.po.JyxBlame;
+import com.jzg.commons.entity.po.jyxSetting;
+import io.swagger.v3.oas.annotations.media.Schema;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@Schema(description = "驾意险配置修改DTO")
+public class JyxConfigEnd {
+
+    @Schema(description = "id")
+    @NotNull(message = "产品ID不能为空")
+    private String id;
+
+    @Schema(description = "产品类型")
+    @NotNull(message = "产品类型不能为空")
+    private String productType;
+
+    @Schema(description = "上级产品")
+    @NotNull(message = "上级产品不能为空")
+    private String parentId;
+
+    @Schema(description = " 产品名称")
+    @NotNull(message = "产品名称不能为空")
+    private String productName;
+
+    @Schema(description = "别名")
+    @NotNull(message = "别名不能为空")
+    private String alias;
+
+    @Schema(description = "保险公司")
+    @NotNull(message = "保险公司不能为空")
+    private String company;
+
+    @Schema(description = "产品编码")
+    @NotNull(message = "产品编码不能为空")
+    private String productCode;
+
+    @Schema(description = "对接方式")
+    @NotNull(message = "对接方式不能为空")
+    private String connectionMethod;
+
+    @Schema(description = "保费设置")
+    @NotNull(message = "保费设置不能为空")
+    private String premiumSetting;
+
+    @Schema(description = "总保额")
+    @NotNull(message = "总保额不能为空")
+    private  String coverage;
+
+    @Schema(description = "总保费")
+    @NotNull(message = "总保费不能为空")
+    private String premium;
+
+    @Schema(description = "租户编码")
+    private String systemCode;
+
+    @Schema(description = "保险责任")
+    @NotNull(message = "保险责任不能为空")
+    private List<JyxBlame> blameList;
+
+    @Schema(description = "驾意险保费设置")
+    @NotNull(message = "驾意险保费设置不能为空")
+    private List<jyxSetting> settingList;
+
+}

+ 18 - 0
commons/src/main/java/com/jzg/commons/entity/dto/JyxConfigParam.java

@@ -0,0 +1,18 @@
+package com.jzg.commons.entity.dto;
+
+
+import com.jzg.commons.core.base.PageRequest;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+@Data
+@Schema(description = "驾意险配置查询DTO")
+public class JyxConfigParam extends PageRequest {
+
+    @Schema(description = "查询参数 输入产品名称,别名查找")
+    private String params;
+
+    @Schema(description = "查询参数 输入座位数")
+    private String seats;
+
+}

+ 48 - 0
commons/src/main/java/com/jzg/commons/entity/po/EsmInsCompany.java

@@ -0,0 +1,48 @@
+package com.jzg.commons.entity.po;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jzg.commons.core.base.BaseModel;
+import lombok.Data;
+
+import java.util.List;
+
+
+@TableName(value = "esm_ins_company")
+@Data
+public class EsmInsCompany extends BaseModel {
+
+    @TableId(type = IdType.ASSIGN_ID)
+    private String id;
+
+    private String code;
+
+    private String companyCode;
+
+    private String name;
+
+    private String parentId;
+
+    private String nameSimple;
+
+    private String remark;
+
+    private int orderNum;
+
+    private String cnName;
+
+    //保司类型(1 - 财险、2 - 寿险、0 - 渠道)
+    private int type;
+
+    private String logo;
+
+    @TableField(exist = false)
+    private List<EsmInsCompany> children;
+
+}
+
+
+

+ 31 - 0
commons/src/main/java/com/jzg/commons/entity/po/JyxBlame.java

@@ -0,0 +1,31 @@
+package com.jzg.commons.entity.po;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.jzg.commons.core.base.BaseModel;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+@Schema(description = "驾意险责任配置")
+public class JyxBlame extends BaseModel {
+
+    @TableId(type = IdType.ASSIGN_ID)
+    private String id;
+
+    private String jyxConfigId;
+
+    private String blame;
+
+    private String blameCode;
+
+    private BigDecimal blameCoverage;
+
+    private BigDecimal blamePremium;
+
+    private String systemCode;
+
+}

+ 39 - 0
commons/src/main/java/com/jzg/commons/entity/po/JyxConfig.java

@@ -0,0 +1,39 @@
+package com.jzg.commons.entity.po;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.jzg.commons.core.base.BaseModel;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+@Data
+@Schema(description = "驾意险配置")
+public class JyxConfig extends BaseModel {
+
+    @TableId(type = IdType.ASSIGN_ID)
+    private String id;
+
+    private String productType;
+
+    private String parentId;
+
+    private String productName;
+
+    private String alias;
+
+    private String company;
+
+    private String productCode;
+
+    private String connectionMethod;
+
+    private String premiumSetting;
+
+    private  String coverage;
+
+    private String premium;
+
+    private String systemCode;
+
+}

+ 29 - 0
commons/src/main/java/com/jzg/commons/entity/po/jyxSetting.java

@@ -0,0 +1,29 @@
+package com.jzg.commons.entity.po;
+
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.jzg.commons.core.base.BaseModel;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+@Schema(description = "驾意险保费设置")
+public class jyxSetting extends BaseModel {
+
+    @TableId(type = IdType.ASSIGN_ID)
+    private String id;
+
+    private String jyxConfigId;
+
+    private int seats;
+
+    private BigDecimal coverage;
+
+    private BigDecimal premium;
+
+    private String systemCode;
+
+}

+ 24 - 0
commons/src/main/java/com/jzg/commons/entity/vo/EsmInsCompanyReq.java

@@ -0,0 +1,24 @@
+package com.jzg.commons.entity.vo;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+@Schema(description = "保险公司")
+public class EsmInsCompanyReq implements Serializable {
+
+    private static final long serialVersionUID = 5367510320703511519L;
+
+    @Schema(description = "名称")
+    private String name;
+
+    @Schema(description = "供应商类型")
+    private String type;
+
+}
+
+
+

+ 46 - 0
commons/src/main/java/com/jzg/commons/entity/vo/EsmInsCompanyResVo.java

@@ -0,0 +1,46 @@
+package com.jzg.commons.entity.vo;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import java.io.Serializable;
+
+@Data
+@Schema(description = "保险公司基本信息响应")
+public class EsmInsCompanyResVo implements Serializable {
+
+    private static final long serialVersionUID = 5367510320703511519L;
+
+    @Schema(description = "ID")
+    private String id;
+
+    @Schema(description = "编号")
+    private String code;
+
+    @Schema(description = "编号")
+    private String companyCode;
+
+    @Schema(description = "名称")
+    private String name;
+
+    @Schema(description = "父编号")
+    private String parentId;
+
+    @Schema(description = "名称简称")
+    private String nameSimple;
+
+    @Schema(description = "备注")
+    private String remark;
+
+    @Schema(description = "排序")
+    private Integer orderNum;
+
+    @Schema(description = "拼音")
+    private String cnName;
+
+
+
+}
+
+
+

+ 60 - 0
commons/src/main/java/com/jzg/commons/entity/vo/EsmInsCompanyVo.java

@@ -0,0 +1,60 @@
+package com.jzg.commons.entity.vo;
+
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.jzg.commons.core.base.BaseModel;
+import com.jzg.commons.entity.po.SysUploadFiles;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@Schema(description = "保险公司基本信息响应")
+public class EsmInsCompanyVo extends BaseModel {
+
+    @Schema(description = "ID")
+    private String id;
+
+    @Schema(description = "编码")
+    private String code;
+
+    @Schema(description = "编码")
+    private String companyCode;
+
+    @Schema(description = "名称")
+    private String name;
+
+    @Schema(description = "父编号")
+    private String parentId;
+
+    @Schema(description = "父名称")
+    private String parentName;
+
+    @Schema(description = "名称简称")
+    private String nameSimple;
+
+    @Schema(description = "备注")
+    private String remark;
+
+    @Schema(description = "排序")
+    private int orderNum;
+
+    @Schema(description = "拼音")
+    private String cnName;
+
+    @Schema(description = "保司类型(1 - 财险、2 - 寿险、0 - 渠道)")
+    private int type;
+
+    @Schema(description = "保险公司logo")
+    private String logo;
+
+    @Schema(description = "文件预览、下载地址")
+    private String downloadUrl;
+
+    private SysUploadFiles logoFile;
+
+    @Schema(description = "子级")
+    private List<EsmInsCompanyVo> children;
+
+}

+ 56 - 0
commons/src/main/java/com/jzg/commons/entity/vo/JyxConfigVo.java

@@ -0,0 +1,56 @@
+package com.jzg.commons.entity.vo;
+
+
+import com.jzg.commons.entity.po.JyxBlame;
+import com.jzg.commons.entity.po.jyxSetting;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import java.util.List;
+
+@Data
+@Schema(description = "驾意险配置VO")
+public class JyxConfigVo {
+
+    @Schema(description = "ID")
+    private Long id;
+
+    @Schema(description = "产品类型")
+    private String productType;
+
+    @Schema(description = "上级产品")
+    private String parentId;
+
+    @Schema(description = " 产品名称")
+    private String productName;
+
+    @Schema(description = "别名")
+    private String alias;
+
+    @Schema(description = "保险公司")
+    private String company;
+
+    @Schema(description = "产品编码")
+    private String productCode;
+
+    @Schema(description = "对接方式")
+    private String connectionMethod;
+
+    @Schema(description = "保费设置")
+    private String premiumSetting;
+
+    @Schema(description = "总保额")
+    private  String coverage;
+
+    @Schema(description = "总保费")
+    private String premium;
+
+    @Schema(description = "租户编码")
+    private String systemCode;
+
+    @Schema(description = "保险责任")
+    private List<JyxBlame> blameList;
+
+    @Schema(description = "驾意险保费设置")
+    private List<jyxSetting> settingList;
+
+}

+ 50 - 0
commons/src/main/java/com/jzg/commons/util/ConvertUtils.java

@@ -0,0 +1,50 @@
+package com.jzg.commons.util;
+
+import lombok.extern.slf4j.Slf4j;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+@Slf4j
+public class ConvertUtils {
+
+    /**
+     * @Description 主要解决查询时前端传参为空值 ("")
+     * BeanUtils.copyProperties会把空值带入目标对象中
+     * 使用目标对象作为查询对象到mybatisPlus进行查询会导致没有匹配数据;
+     * 使用该方法将 空值 转换为 null,避免copy时带入到查询对象
+     **/
+    public static <T> void emptyToNull(T obj){
+        Class<? extends Object> clazz = obj.getClass();
+        // 获取实体类的所有属性,返回Field数组
+        Field[] fields = clazz.getDeclaredFields();
+        for (Field field : fields) {
+            // 可访问私有变量
+            field.setAccessible(true);
+            // 获取属性类型
+            String type = field.getGenericType().toString();
+            // 如果type是类类型,则前面包含"class ",后面跟类名
+            if ("class java.lang.String".equals(type)) {
+                // 将属性的首字母大写
+                String methodName = field.getName().replaceFirst(field.getName().substring(0, 1),
+                        field.getName().substring(0, 1).toUpperCase());
+
+                try {
+                    Method methodGet = clazz.getMethod("get" + methodName);
+                    // 调用getter方法获取属性值
+                    String str = (String) methodGet.invoke(obj);
+                    //属性为null结束循环
+                    if (str == null) {
+                        continue;
+                    }
+                    if ("".equals(str)) {
+                        // 为空 设置为null
+                        field.set(obj, null);
+                    }
+                } catch (Exception e) {
+                    log.error("emptyToNull 方法属性转换异常: {}",e.getMessage());
+                }
+            }
+        }
+    }
+}

+ 324 - 0
platform/src/main/java/com/jzg/controller/EsmInsCompanyController.java

@@ -0,0 +1,324 @@
+package com.jzg.controller;
+
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.jzg.commons.core.page.HttpResult;
+import com.jzg.commons.entity.dto.EsmInsCompanyAdd;
+import com.jzg.commons.entity.dto.EsmInsCompanyEnd;
+import com.jzg.commons.entity.vo.EsmInsCompanyReq;
+import com.jzg.commons.entity.vo.EsmInsCompanyResVo;
+import com.jzg.commons.entity.vo.EsmInsCompanyVo;
+import com.jzg.commons.exception.SystemException;
+import com.jzg.commons.util.AssertionUtils;
+import com.jzg.commons.util.ConvertUtils;
+import com.jzg.commons.util.StringUtils;
+import com.jzg.constants.ManagementSourceEnum;
+import com.jzg.service.EsmInsCompanyService;
+import io.swagger.v3.oas.annotations.Operation;
+import com.jzg.commons.core.base.BaseController;
+import com.jzg.commons.entity.po.EsmInsCompany;
+import com.jzg.commons.request.RequestSingleParam;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * ---------------------------
+ * 保险公司管理 (EsmInsCompanyController)
+ * ---------------------------
+ * 作者:
+ * ---------------------------
+ */
+@Tag(name = "保险公司管理")
+@RestController
+@RequestMapping("esmInsCompany")
+public class EsmInsCompanyController extends BaseController {
+
+    @Autowired
+    private EsmInsCompanyService esmInsCompanyService;
+
+
+    @PostMapping("leftList")
+    @Operation(summary = "获取顶级保险公司列表")
+    public HttpResult<List<EsmInsCompanyResVo>> leftList(@RequestBody EsmInsCompanyReq req) {
+        List<EsmInsCompanyResVo> list = esmInsCompanyService.leftList(req);
+        return HttpResult.ok(list);
+    }
+
+
+    @PostMapping("/findLeftInsTree")
+    @Operation(summary = "查询左侧树")
+    public HttpResult<List<EsmInsCompany>> findLeftInsTree(@RequestSingleParam("type") String type) {
+        LambdaQueryWrapper<EsmInsCompany> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(StringUtils.isNotEmpty(type), EsmInsCompany::getType, type);
+        List<EsmInsCompany> lst = esmInsCompanyService.list(wrapper);
+        return HttpResult.ok(lst);
+    }
+
+    @PostMapping("/findTree")
+    @Operation(summary = "获取树结构")
+    public HttpResult<List<EsmInsCompanyVo>> findTree(@RequestBody EsmInsCompanyReq req) {
+        return HttpResult.ok(esmInsCompanyService.findTree(req));
+    }
+
+    @PostMapping(value = "/saveInsCompany")
+    @Operation(summary = "保存信息")
+    public HttpResult<Object> save(@Validated  @RequestBody EsmInsCompanyAdd companyAdd) {
+        ConvertUtils.emptyToNull(companyAdd);
+        LambdaQueryWrapper<EsmInsCompany> lqw = new LambdaQueryWrapper<>();
+        lqw.eq(EsmInsCompany::getCompanyCode, companyAdd.getCompanyCode());
+        AssertionUtils.isFail(esmInsCompanyService.count(lqw) > 0, "供应商编码重复");
+        EsmInsCompany esmInsCompany = BeanUtil.copyProperties(companyAdd, EsmInsCompany.class);
+        return esmInsCompanyService.save(esmInsCompany) ?HttpResult.ok("保存成功") : HttpResult.error("保存失败");
+    }
+
+    @PostMapping(value = "/editInsCompany")
+    @Operation(summary = "修改信息")
+    public HttpResult<Object> update(@Validated @RequestBody EsmInsCompanyEnd companyEnd) {
+        ConvertUtils.emptyToNull(companyEnd);
+        LambdaQueryWrapper<EsmInsCompany> lqw = new LambdaQueryWrapper<>();
+        lqw.eq(EsmInsCompany::getCompanyCode, companyEnd.getCompanyCode());
+        lqw.ne(EsmInsCompany::getId, companyEnd.getId());
+        AssertionUtils.isFail(esmInsCompanyService.count(lqw) > 1, "供应商编码重复");
+        EsmInsCompany esmInsCompany = BeanUtil.copyProperties(companyEnd, EsmInsCompany.class);
+        return esmInsCompanyService.updateById(esmInsCompany) ? HttpResult.ok("修改成功") : HttpResult.error("修改失败");
+    }
+
+    /**
+     * 查询下级机构列表
+     *
+     * @param parentid
+     * @return
+     */
+    @Operation(summary = "查询下级机构列表")
+    @PostMapping(value = "/selectList")
+    public HttpResult<List<EsmInsCompany>> selectList(@RequestParam String parentid) {
+        if (StringUtils.isEmpty(parentid)) parentid = "0";
+        LambdaQueryWrapper<EsmInsCompany> lqw = new LambdaQueryWrapper<>();
+        lqw.eq(EsmInsCompany::getParentId, parentid);
+        List<EsmInsCompany> selectList = esmInsCompanyService.list(lqw);
+        return HttpResult.ok(selectList);
+    }
+
+    /**
+     * 根据主键查询
+     *
+     * @param id
+     * @return
+     */
+    @Operation(summary = "根据主键查询")
+    @GetMapping(value = "/findById")
+    public HttpResult<EsmInsCompany> findById(@RequestParam String id) {
+        return HttpResult.ok(esmInsCompanyService.getById(id));
+    }
+
+    /**
+     * 基础分页查询
+     *
+     * @param pageRequest
+     * @return
+     */
+//    @PostMapping(value = "/findPage")
+//    public HttpResult findPage(@RequestBody PageRequest pageRequest) {
+//
+//        String id = PageRequest.getColumnFilterValue(pageRequest, "id");
+//        String name = PageRequest.getColumnFilterValue(pageRequest, "name");
+//        String parentId = PageRequest.getColumnFilterValue(pageRequest, "parentId");
+//
+//        Page<EsmInsCompany> p = PageRequest.buildPageRequest(pageRequest);
+//
+//        LambdaQueryWrapper<EsmInsCompany> lqw = new LambdaQueryWrapper<>();
+//        lqw.eq(StringUtils.isNotEmpty(id), EsmInsCompany::getId, id);
+//        lqw.like(StringUtils.isNotEmpty(name), EsmInsCompany::getName, name);
+//        lqw.eq(StringUtils.isNotEmpty(parentId), EsmInsCompany::getParentId, parentId);
+//
+//        IPage<EsmInsCompany> pResult = esmInsCompanyService.page(p, lqw);
+//        //传入查询条件
+//        PageResult<EsmInsCompany> pageResult = PageResult.buildPageResult(pResult);
+//        return HttpResult.ok(pageResult);
+//
+//
+//    }
+
+//    /**
+//     * 删除公司信息
+//     *
+//     * @param idList
+//     * @return
+//     */
+//    @PostMapping(value = "/deleteInsCompany")
+//    public HttpResult delete(@RequestParam List<String> idList) {
+//        Integer result = 0;
+//        String msg = "删除成功";
+//
+//        if (idList != null && idList.size() > 0) {
+////            result = esmInsCompanyService.delete(idList);
+//            esmInsCompanyService.removeByIds(idList);
+//
+////            esmInsCompanyService.allowQuote(null,idList);
+//            return HttpResult.ok(msg);
+//
+//        } else {
+//            msg = "编码不能为空";
+//            return HttpResult.ok(msg, result);
+//        }
+//    }
+
+
+    /**
+     * 批量逻辑删除
+     *
+     * @author: lig
+     * @date: 2023年04月14日 0014
+     */
+//    @Operation(value = "批量删除操作")
+//    @DeleteMapping(value = "/idBatch")
+//    public HttpResult<Object> deleteBatch(@RequestParam List<String> idList) {
+//
+//        LambdaUpdateWrapper<EsmInsCompany> lqw = new LambdaUpdateWrapper<>();
+//        lqw.in(EsmInsCompany::getId, idList);
+//        esmInsCompanyService.remove(lqw);
+//
+//        return HttpResult.ok("操作成功");
+//
+//    }
+    @Operation(summary = "删除操作")
+    @GetMapping(value = "/{id}")
+    public HttpResult<Object> delete(@PathVariable("id") String id) {
+        EsmInsCompany esmInsCompany = esmInsCompanyService.isExists(id);
+        if ("0".equals(esmInsCompany.getParentId()) && !ManagementSourceEnum.MS_01.getCode().equals(esmInsCompany.getType())) {
+            throw new SystemException("财险,寿险,一级保险公司无法删除");
+        }
+
+        List<EsmInsCompany> list = esmInsCompanyService.list(new LambdaQueryWrapper<EsmInsCompany>().eq(EsmInsCompany::getParentId, id));
+        AssertionUtils.isSucceed(list.isEmpty(), "此公司还有下级公司无法删除");
+
+        esmInsCompanyService.removeById(id);
+        return HttpResult.ok("操作成功");
+
+    }
+
+//    @Operation(value = "恢复删除操作")
+//    @GetMapping(value = "/{id}")
+//    public HttpResult rollBackDelete(@PathVariable("id") String id) {
+//
+//        EsmInsCompany eic = esmInsCompanyService.getById(id);
+//        if (null == eic) return HttpResult.error("对象不存在");
+//
+//        eic.setDelFlag(0);
+//        esmInsCompanyService.updateById(eic);
+//
+//        return HttpResult.ok("操作成功");
+//
+//    }
+
+
+//    @Operation(value = "获取允许报价的保险公司列表")
+//    @GetMapping(value = "/gainAllowQuoteList")
+//    public HttpResult gainAllowQuoteList() {
+//        LambdaQueryWrapper<EsmInsCompany> lqw = new LambdaQueryWrapper<>();
+//        lqw.eq(EsmInsCompany::getDelFlag, 0);
+//        lqw.eq(EsmInsCompany::getOpenQuote, 1);
+//        lqw.eq(EsmInsCompany::getParentId, "0");
+//        List<EsmInsCompany> list = esmInsCompanyService.list(lqw);
+//        return HttpResult.ok(list);
+//
+//    }
+
+
+    @Operation(summary = "获取顶级保险公司列表")
+    @GetMapping(value = "/gainTopList")
+    public HttpResult<List<EsmInsCompanyResVo>> gainTopList(@RequestParam String type) {
+        LambdaQueryWrapper<EsmInsCompany> lqw = new LambdaQueryWrapper<>();
+        lqw.eq(EsmInsCompany::getParentId, "0");
+        lqw.orderByAsc(EsmInsCompany::getOrderNum);
+        lqw.eq(StringUtils.isNotEmpty(type), EsmInsCompany::getType, type);
+        List<EsmInsCompany> list = esmInsCompanyService.list(lqw);
+        List<EsmInsCompanyResVo> esmInsCompanyResVos = BeanUtil.copyToList(list, EsmInsCompanyResVo.class);
+        return HttpResult.ok(esmInsCompanyResVos);
+    }
+
+    @Operation(summary = "获取顶级保险公司和协议子集列表")
+    @GetMapping(value = "/gainTopAgreementList")
+    public HttpResult<List<EsmInsCompanyResVo>> gainTopAgreementList(@RequestParam String type) {
+        LambdaQueryWrapper<EsmInsCompany> lqw = new LambdaQueryWrapper<>();
+        lqw.eq(EsmInsCompany::getParentId, "0");
+        lqw.orderByAsc(EsmInsCompany::getOrderNum);
+        lqw.eq(StringUtils.isNotEmpty(type), EsmInsCompany::getType, type);
+        List<EsmInsCompany> list = esmInsCompanyService.list(lqw);
+        List<EsmInsCompanyResVo> esmInsCompanyResVos = BeanUtil.copyToList(list, EsmInsCompanyResVo.class);
+//        for (EsmInsCompanyResVo esmInsCompany : esmInsCompanyResVos) {
+//            PtlAgreementPageVo ptlAgreementPageVo = new PtlAgreementPageVo();
+//            ptlAgreementPageVo.setPartnerCompaniesId(esmInsCompany.getId());
+//            HttpResult<List<PtlAgreement>> agreement = ptlAgreementService.listAgreement(ptlAgreementPageVo);
+//            List<PtlAgreement> agreementList = agreement.getData();
+//            for (PtlAgreement ptlAgreement : agreementList) {
+//                ptlAgreement.setName(ptlAgreement.getAgreementName() +
+//                        (StringUtils.isBlank(ptlAgreement.getJobDescription())? "" : "-"+ptlAgreement.getJobDescription()) +
+//                        (StringUtils.isBlank(ptlAgreement.getBusinessDescription())? "" : "-"+ptlAgreement.getBusinessDescription()));
+//            }
+//            esmInsCompany.setAgreementList(agreementList);
+//        }
+        return HttpResult.ok(esmInsCompanyResVos);
+    }
+
+    @Operation(summary = "查询保司机构下级")
+    @GetMapping(value = "/queryListByParentId/{parentId}")
+    public HttpResult<List<EsmInsCompany>> queryListByParentId(@PathVariable("parentId") String parentId) {
+        if(parentId==null || "".equals(parentId)) {
+            return HttpResult.error("parentId父级id不能为空");
+        }
+        List<EsmInsCompany> esmInsCompanyList = esmInsCompanyService.queryListByParentId(parentId);
+        return HttpResult.ok(esmInsCompanyList);
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/9/20 16:22
+     *  @Description: 查询子订单中的保险公司列表
+     */
+    @Operation(summary = "查询子订单中的保险公司列表")
+    @GetMapping(value = "/findOrderCompanyList")
+    public HttpResult<List<EsmInsCompanyResVo>> findOrderCompanyList() {
+        List<EsmInsCompanyResVo> esmInsCompanyList = esmInsCompanyService.findOrderCompanyList();
+        return HttpResult.ok(esmInsCompanyList);
+    }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/12/12 14:29
+     *  @Description:  获取外部协议的保险公司的集合
+     */
+    @PostMapping("/getExternalAgreementCompanyList")
+    @Operation(summary= "获取外部协议的保险公司的集合")
+    public HttpResult<List<EsmInsCompanyResVo>> getExternalAgreementCompanyList(@RequestSingleParam("name") String name) {
+        List<EsmInsCompanyResVo> lst = esmInsCompanyService.getExternalAgreementCompanyList(name);
+        return HttpResult.ok(lst);
+    }
+
+
+    @Operation(summary = "查找存在协议的保险公司列表")
+    @GetMapping(value = "/liveCompanyList")
+    public HttpResult liveCompanyList(){
+        List<EsmInsCompanyResVo> list = esmInsCompanyService.liveCompanyList();
+        return HttpResult.ok(list);
+    }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/1/18 15:26
+     *  @Description:  查询子订单的合作公司列表
+     */
+    @Operation(summary = "查询子订单中的合作公司列表")
+    @GetMapping(value = "/findOrderPartnerCompanyList")
+    public HttpResult<List<EsmInsCompanyResVo>> findOrderPartnerCompanyList() {
+        List<EsmInsCompanyResVo> esmInsCompanyList = esmInsCompanyService.findOrderPartnerCompanyList();
+        return HttpResult.ok(esmInsCompanyList);
+    }
+}

+ 73 - 0
platform/src/main/java/com/jzg/controller/JyxConfigController.java

@@ -0,0 +1,73 @@
+package com.jzg.controller;
+
+
+import com.jzg.commons.core.page.HttpResult;
+import com.jzg.commons.entity.dto.JyxConfigAdd;
+import com.jzg.commons.entity.dto.JyxConfigEnd;
+import com.jzg.commons.entity.dto.JyxConfigParam;
+import com.jzg.service.JyxConfigService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.concurrent.TimeUnit;
+
+@Tag(name="驾意险配置")
+@RestController
+@RequestMapping("/jyxConfig")
+public class JyxConfigController {
+
+
+    @Autowired
+    private JyxConfigService jyxConfigService;
+
+    @PostMapping("saveAll")
+    @Operation(summary = "保存驾意险配置")
+    public HttpResult saveAll(@Validated @RequestBody JyxConfigAdd configAdd){
+        return jyxConfigService.saveAll(configAdd);
+    }
+
+    @GetMapping("/print")
+    public String print() {
+        System.out.println(Thread.currentThread());
+        return "ok";
+    }
+
+    @GetMapping("/demo")
+    public String demo() throws InterruptedException {
+        TimeUnit.SECONDS.sleep(2);
+        return "ok";
+    }
+
+
+    @PostMapping("jyxList")
+    @Operation(summary = "查询驾意险配置列表")
+    public HttpResult jyxList(@RequestBody JyxConfigParam configParam){
+        return HttpResult.ok(jyxConfigService.jyxList(configParam));
+    }
+
+
+    @GetMapping("getById")
+    @Operation(summary = "根据id查询驾意险配置")
+    public HttpResult getById(@RequestParam Long id){
+        return jyxConfigService.selectById(id);
+    }
+
+
+    @PostMapping("updateById")
+    @Operation(summary = "根据id修改驾意险配置")
+    public HttpResult updateById(@RequestBody JyxConfigEnd configEnd){
+        return jyxConfigService.updateById(configEnd);
+    }
+
+
+
+    @GetMapping("deleteById")
+    @Operation(summary = "根据id删除驾意险配置")
+    public HttpResult deleteById(@RequestParam String id){
+        return jyxConfigService.deleteById(id);
+    }
+
+}

+ 65 - 0
platform/src/main/java/com/jzg/mapper/EsmInsCompanyMapper.java

@@ -0,0 +1,65 @@
+package com.jzg.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import com.jzg.commons.entity.po.EsmInsCompany;
+import com.jzg.commons.entity.vo.EsmInsCompanyReq;
+import com.jzg.commons.entity.vo.EsmInsCompanyResVo;
+import com.jzg.commons.entity.vo.EsmInsCompanyVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+@Mapper
+public interface EsmInsCompanyMapper extends BaseMapper<EsmInsCompany> {
+
+
+    List<String> getByLowerId80(String companyId);
+
+    List<String> getByLowerId57(String companyId);
+
+    @Select("select version()")
+    String getVersion();
+
+    default List<String> getByLowerId(String companyId) {
+        String version = getVersion();
+        if (version.contains("5.7")) {
+            return getByLowerId57(companyId);
+        } else {
+            return getByLowerId80(companyId);
+        }
+    }
+
+
+    List<EsmInsCompany> queryListByParentId( @Param("parentId") String parentId);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/9/20 16:24
+     *  @Description: 查询订单下的保险公司列表
+     */
+    List<EsmInsCompanyResVo> findOrderCompanyList();
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/12/12 14:34
+     *  @Description:  获取外部协议的公司列表
+     */
+    List<EsmInsCompanyResVo> getExternalAgreementCompanyList( @Param("name")  String name);
+
+
+    List<EsmInsCompanyResVo> liveCompanyList();
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/1/18 15:29
+     *  @Description: 查询子订单的合作公司的列表
+     */
+    List<EsmInsCompanyResVo> findOrderPartnerCompanyList();
+
+    List<EsmInsCompanyResVo> leftList(EsmInsCompanyReq req);
+
+    List<EsmInsCompanyVo> findTree(EsmInsCompanyReq req);
+}

+ 10 - 0
platform/src/main/java/com/jzg/mapper/JyxBlameMapper.java

@@ -0,0 +1,10 @@
+package com.jzg.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jzg.commons.entity.po.JyxBlame;
+import org.apache.ibatis.annotations.Mapper;
+
+
+@Mapper
+public interface JyxBlameMapper extends BaseMapper<JyxBlame> {
+}

+ 19 - 0
platform/src/main/java/com/jzg/mapper/JyxConfigMapper.java

@@ -0,0 +1,19 @@
+package com.jzg.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jzg.commons.entity.dto.JyxConfigParam;
+import com.jzg.commons.entity.po.JyxConfig;
+import com.jzg.commons.entity.vo.JyxConfigVo;
+import org.apache.ibatis.annotations.*;
+
+import java.util.List;
+
+@Mapper
+public interface JyxConfigMapper extends BaseMapper<JyxConfig> {
+
+
+    List<JyxConfigVo> jyxList(JyxConfigParam configParam);
+
+
+}

+ 9 - 0
platform/src/main/java/com/jzg/mapper/jyxSettingMapper.java

@@ -0,0 +1,9 @@
+package com.jzg.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jzg.commons.entity.po.jyxSetting;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface jyxSettingMapper extends BaseMapper<jyxSetting> {
+}

+ 114 - 0
platform/src/main/java/com/jzg/service/EsmInsCompanyService.java

@@ -0,0 +1,114 @@
+package com.jzg.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.jzg.commons.entity.po.EsmInsCompany;
+import com.jzg.commons.entity.vo.EsmInsCompanyReq;
+import com.jzg.commons.entity.vo.EsmInsCompanyResVo;
+import com.jzg.commons.entity.vo.EsmInsCompanyVo;
+
+
+import java.util.List;
+
+public interface EsmInsCompanyService extends IService<EsmInsCompany> {
+
+//    /**
+//     *  redis操作允许报价信息
+//     *
+//     * @author: lig
+//     * @date: 2023年03月14日 0014
+//     */
+//    void allowQuote(EsmInsCompany record, List<String> ids);
+
+//    /**
+//     * 判断保险公司是否开启
+//     *
+//     * @param companyId 保险公司id
+//     * @return
+//     */
+//    EsmInsCompany isOpen(String companyId);
+
+
+    List<EsmInsCompanyVo> findTree(EsmInsCompanyReq req);
+
+    /**
+     * 验证保险公司是否存在
+     * @param companyId
+     * @return
+     */
+    EsmInsCompany isExists(String companyId);
+
+    EsmInsCompany findInsCompanyByName(String companyName);
+
+    /**
+     * 通过子公司id获取保险公司
+     *
+     * @param subsidiaryId 子公司
+     * @return EsmInsCompany
+     */
+    EsmInsCompany getBySubsidiary(String subsidiaryId);
+
+    /**
+     * 通过保险公司id查询下级id及本级id;
+     *
+     * @param companyId 下级id
+     * @return List<String>
+     */
+    List<String> getByLowerId(String companyId);
+
+    /**
+     * 根据保险公司ID查询本级+所有上级
+     * @param companyId
+     * @return
+     */
+    List<String> getAllRelationCompanyId(String companyId);
+
+    /**
+     * 获取指定保险公司的下一级保司列表,入参为空时,直接返回顶层保司
+     * @param companyId
+     * @return
+     */
+    List<String> getInsCompanyNextLevel(String companyId);
+
+    List<EsmInsCompany> queryListByParentId(String parentId);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/9/20 16:23
+     *  @Description:  查询子订单中的保险公司列表
+     */
+    List<EsmInsCompanyResVo> findOrderCompanyList();
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/10/12 15:46
+     *  @Description:  通过保险公司名称或简称查询
+     */
+    public EsmInsCompany findInsCompanyByNameOrNamesimple(String companyName);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/12/12 14:32
+     *  @Description:  获取外部协议的保险公司列表
+     */
+    List<EsmInsCompanyResVo> getExternalAgreementCompanyList(String name);
+
+    /**
+     * 获取已经存在协议的保险公司列表
+     * @return
+     */
+    public List<EsmInsCompanyResVo> liveCompanyList();
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/1/18 15:27
+     *  @Description:  查詢子订单的合作公司列表
+     */
+    List<EsmInsCompanyResVo> findOrderPartnerCompanyList();
+
+    List<EsmInsCompanyResVo> leftList(EsmInsCompanyReq req);
+}
+
+
+

+ 7 - 0
platform/src/main/java/com/jzg/service/JyxBlameService.java

@@ -0,0 +1,7 @@
+package com.jzg.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.jzg.commons.entity.po.JyxBlame;
+
+public interface JyxBlameService extends IService<JyxBlame> {
+}

+ 26 - 0
platform/src/main/java/com/jzg/service/JyxConfigService.java

@@ -0,0 +1,26 @@
+package com.jzg.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.jzg.commons.core.page.HttpResult;
+import com.jzg.commons.entity.dto.JyxConfigAdd;
+import com.jzg.commons.entity.dto.JyxConfigEnd;
+import com.jzg.commons.entity.dto.JyxConfigParam;
+import com.jzg.commons.entity.po.JyxConfig;
+import com.jzg.commons.entity.vo.JyxConfigVo;
+
+import java.util.List;
+
+public interface JyxConfigService extends IService<JyxConfig> {
+
+
+    HttpResult saveAll(JyxConfigAdd configAdd);
+
+    HttpResult selectById(Long id);
+
+    HttpResult updateById(JyxConfigEnd configEnd);
+
+    List<JyxConfigVo> jyxList(JyxConfigParam configParam);
+
+    HttpResult deleteById(String id);
+
+}

+ 239 - 0
platform/src/main/java/com/jzg/service/impl/EsmInsCompanyServiceImpl.java

@@ -0,0 +1,239 @@
+package com.jzg.service.impl;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import com.jzg.commons.entity.po.EsmInsCompany;
+import com.jzg.commons.entity.po.SysUploadFiles;
+import com.jzg.commons.entity.vo.EsmInsCompanyReq;
+import com.jzg.commons.entity.vo.EsmInsCompanyResVo;
+import com.jzg.commons.entity.vo.EsmInsCompanyVo;
+import com.jzg.commons.util.AssertionUtils;
+import com.jzg.commons.util.MinioUtils;
+import com.jzg.commons.util.StringUtils;
+import com.jzg.mapper.EsmInsCompanyMapper;
+import com.jzg.service.EsmInsCompanyService;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.ObjectUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Collectors;
+
+
+@Service
+public class EsmInsCompanyServiceImpl extends ServiceImpl<EsmInsCompanyMapper, EsmInsCompany>
+        implements EsmInsCompanyService {
+
+//    @Override
+//    public EsmInsCompany isOpen(String company) {
+//        LambdaQueryWrapper<EsmInsCompany> wrapper = new LambdaQueryWrapper<>();
+//        wrapper.eq(EsmInsCompany::getId, company)
+//                .eq(EsmInsCompany::getDelFlag, "0")
+//                .eq(EsmInsCompany::getOpenQuote, "1");
+//        EsmInsCompany esmInsCompanies = baseMapper.selectOne(wrapper);
+//        if (ObjectUtils.isEmpty(esmInsCompanies)) {
+//            throw new SystemException("报价公司未开启, 请联系团队长配置。");
+//        }
+//        return esmInsCompanies;
+//    }
+
+    @Override
+    public List<EsmInsCompanyVo> findTree(EsmInsCompanyReq req) {
+        List<EsmInsCompanyVo> allList  = baseMapper.findTree(req);
+        if (CollectionUtils.isEmpty(allList)){
+            return new ArrayList<>(0);
+        }
+        List<EsmInsCompanyVo> list;
+        list = allList.stream().filter(r -> r.getParentId().equalsIgnoreCase("0")).collect(Collectors.toList());
+        findChildren(list, allList);
+        return list;
+    }
+
+
+    @Override
+    public EsmInsCompany isExists(String companyId) {
+        EsmInsCompany esmInsCompany = baseMapper.selectById(companyId);
+        AssertionUtils.isEmpty(esmInsCompany, "保险公司不存在");
+        return esmInsCompany;
+    }
+
+    @Override
+    public EsmInsCompany findInsCompanyByName(String companyName) {
+        LambdaQueryWrapper<EsmInsCompany> lqw = new LambdaQueryWrapper<>();
+        lqw.eq(EsmInsCompany::getName, companyName);
+        List<EsmInsCompany> list = list(lqw);
+        if (null != list && !list.isEmpty()) {
+            return list.get(0);
+        }
+        return null;
+    }
+
+    private void findChildren(List<EsmInsCompanyVo> list, List<EsmInsCompanyVo> allList) {
+        for (EsmInsCompanyVo l : list) {
+            l.setDownloadUrl(getFileUrl(l.getLogoFile()));
+            List<EsmInsCompanyVo> children = new ArrayList<>();
+            for (EsmInsCompanyVo esmInsCompany : allList) {
+                if (l.getId().equals(esmInsCompany.getParentId())) {
+                    esmInsCompany.setParentName(l.getName());
+                    children.add(esmInsCompany);
+                }
+                l.setDownloadUrl(getFileUrl(l.getLogoFile()));
+            }
+            l.setChildren(children);
+            findChildren(children, allList);
+        }
+    }
+
+    public String getFileUrl(SysUploadFiles files){
+        if (!ObjectUtils.isEmpty(files)){
+            if (StringUtils.isNotEmpty(files.getFileName()) && StringUtils.isNotEmpty(files.getBucketName())){
+                return MinioUtils.getPresignedObjectUrl(files.getBucketName(), files.getFileName());
+            }
+        }
+        return null;
+    }
+
+    private boolean exists(List<EsmInsCompany> insCompanyList, EsmInsCompany insCompany) {
+        AtomicBoolean exist = new AtomicBoolean(false);
+        insCompanyList.stream().forEach(a -> {
+            if (a.getId().equals(insCompany.getId())) {
+                exist.set(true);
+            }
+        });
+
+        return exist.get();
+    }
+
+    @Override
+    public EsmInsCompany getBySubsidiary(String subsidiaryId) {
+        String companyId = subsidiaryId.replaceAll("[^A-Za-z]", "");
+        String code = "1000000";
+        AssertionUtils.isFail(StringUtils.isEmpty(companyId), "保险公司不存在");
+        EsmInsCompany esmInsCompany = getById(companyId + code);
+        AssertionUtils.isEmpty(esmInsCompany, "保险公司不存在");
+        return esmInsCompany;
+    }
+
+    @Override
+    public List<String> getByLowerId(String companyId) {
+        return baseMapper.getByLowerId(companyId);
+    }
+
+    @Override
+    public List<String> getAllRelationCompanyId(String companyId){
+//        //获取本级和下级
+//        List result=getByLowerId(companyId);
+        //调整为查本级和上级
+        List<String> result=new ArrayList<>();
+        //放入本级
+        result.add(companyId);
+        //取出本级机构信息
+        EsmInsCompany insCompany=getById(companyId);
+        //放入上级
+        while (!"0".equals(insCompany.getParentId())){
+            LambdaQueryWrapper<EsmInsCompany> lqw1 = new LambdaQueryWrapper<>();
+            lqw1.eq(EsmInsCompany::getId, insCompany.getParentId());
+            List<EsmInsCompany> list = list(lqw1);
+            if (null != list && !list.isEmpty()) {
+                insCompany=list.get(0);
+                result.add(insCompany.getId());
+            }
+        }
+        return result;
+    }
+
+    @Override
+    public List<String> getInsCompanyNextLevel(String companyId){
+        List<String> result=new ArrayList<>();
+        LambdaQueryWrapper<EsmInsCompany> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(EsmInsCompany::getType,"1");
+        if(StringUtils.isNotEmpty(companyId)){
+            //不为空时,需要找选定机构的下一层
+            wrapper.eq(EsmInsCompany::getParentId,companyId);
+        }else{
+            //为空时,直接查询顶层保险公司机构  parentid=0
+            wrapper.eq(EsmInsCompany::getParentId,"0");
+        }
+        List<EsmInsCompany> allList = list(wrapper);
+        allList.forEach(item -> {
+             result.add(item.getId());
+        });
+        return result;
+    }
+
+    @Override
+    public List<EsmInsCompany> queryListByParentId(String parentId) {
+        List<EsmInsCompany>  resultList=baseMapper.queryListByParentId(parentId);
+        return resultList;
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/9/20 16:23
+     *  @Description: 查询子订单中的保险公司列表
+     */
+    @Override
+    public List<EsmInsCompanyResVo> findOrderCompanyList() {
+        return baseMapper.findOrderCompanyList();
+    }
+
+
+   /**
+    *  @version
+    *  @author: hxl
+    *  @Date: 2024/10/12 15:42
+    *  @Description: 通过名称或简称查询
+    */
+    @Override
+    public EsmInsCompany findInsCompanyByNameOrNamesimple(String companyName) {
+        LambdaQueryWrapper<EsmInsCompany> lqw = new LambdaQueryWrapper<>();
+        lqw.eq(EsmInsCompany::getName, companyName).or().eq(EsmInsCompany::getNameSimple, companyName);
+        List<EsmInsCompany> list = list(lqw);
+        if (null != list && !list.isEmpty()) {
+            return list.get(0);
+        }
+        return null;
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/12/12 14:33
+     *  @Description: 获取外部协议的保险公司列表
+     */
+    @Override
+    public List<EsmInsCompanyResVo> getExternalAgreementCompanyList(String name) {
+        return baseMapper.getExternalAgreementCompanyList(name);
+    }
+
+    /**
+     * 获取已经存在协议的保险公司列表
+     * @return
+     */
+    @Override
+    public List<EsmInsCompanyResVo> liveCompanyList() {
+        return baseMapper.liveCompanyList();
+    }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2025/1/18 15:28
+     *  @Description: 查询子订单的合作公司的列表页面
+     */
+    @Override
+    public List<EsmInsCompanyResVo> findOrderPartnerCompanyList() {
+        return baseMapper.findOrderPartnerCompanyList();
+    }
+
+    @Override
+    public List<EsmInsCompanyResVo> leftList(EsmInsCompanyReq req) {
+        return  baseMapper.leftList(req);
+    }
+}
+
+
+

+ 11 - 0
platform/src/main/java/com/jzg/service/impl/JyxBlameServiceImpl.java

@@ -0,0 +1,11 @@
+package com.jzg.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jzg.commons.entity.po.JyxBlame;
+import com.jzg.mapper.JyxBlameMapper;
+import com.jzg.service.JyxBlameService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class JyxBlameServiceImpl extends ServiceImpl<JyxBlameMapper, JyxBlame> implements JyxBlameService {
+}

+ 136 - 0
platform/src/main/java/com/jzg/service/impl/JyxConfigServiceImpl.java

@@ -0,0 +1,136 @@
+package com.jzg.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jzg.commons.core.page.HttpResult;
+import com.jzg.commons.entity.dto.JyxConfigAdd;
+import com.jzg.commons.entity.dto.JyxConfigEnd;
+import com.jzg.commons.entity.dto.JyxConfigParam;
+import com.jzg.commons.entity.po.JyxBlame;
+import com.jzg.commons.entity.po.JyxConfig;
+import com.jzg.commons.entity.po.jyxSetting;
+import com.jzg.commons.entity.vo.JyxConfigVo;
+import com.jzg.mapper.JyxConfigMapper;
+import com.jzg.service.JyxBlameService;
+import com.jzg.service.JyxConfigService;
+import com.jzg.service.jyxSettingService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+
+
+@Service
+public class JyxConfigServiceImpl extends ServiceImpl<JyxConfigMapper, JyxConfig> implements JyxConfigService {
+
+    @Autowired
+    private JyxConfigMapper jyxConfigMapper;
+
+    @Autowired
+    private jyxSettingService settingService;
+
+    @Autowired
+    private JyxBlameService blameService;
+
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public HttpResult saveAll(JyxConfigAdd configAdd) {
+        try {
+            List<JyxBlame> blameList = configAdd.getBlameList();
+            if (CollectionUtils.isEmpty(blameList)){
+                return HttpResult.error("请添加保险责任");
+            }
+            List<jyxSetting> settingList = configAdd.getSettingList();
+            if (CollectionUtils.isEmpty(settingList)){
+                return HttpResult.error("请添加保费设置");
+            }
+            JyxConfig jyxConfig = BeanUtil.copyProperties(configAdd, JyxConfig.class);
+            int insert = jyxConfigMapper.insert(jyxConfig);
+            blameList.stream().forEach(blame -> {
+                blame.setJyxConfigId(jyxConfig.getId());
+            });
+            settingList.stream().forEach(setting -> {
+                setting.setJyxConfigId(jyxConfig.getId());
+            });
+            blameService.saveBatch(blameList);
+            settingService.saveBatch(settingList);
+            return insert > 0 ? HttpResult.ok("添加成功") : HttpResult.error("添加失败");
+        }catch (Exception e){
+            return HttpResult.error("添加失败" + e.getMessage());
+        }
+    }
+
+    @Override
+    public HttpResult selectById(Long id) {
+        JyxConfig config = jyxConfigMapper.selectById(id);
+        if (config == null){
+            return HttpResult.error("查询失败");
+        }
+        JyxConfigVo jyxConfigVo = BeanUtil.copyProperties(config, JyxConfigVo.class);
+        jyxConfigVo.setBlameList(selectBlameList(id));
+        jyxConfigVo.setSettingList(selectSettingList(id));
+        return HttpResult.ok(jyxConfigVo);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public HttpResult updateById(JyxConfigEnd configEnd) {
+       try {
+           JyxConfig jyxConfig = BeanUtil.copyProperties(configEnd, JyxConfig.class);
+           if (jyxConfigMapper.updateById(jyxConfig) > 0){
+               configEnd.getBlameList().stream().forEach(blame -> {
+                   blame.setJyxConfigId(jyxConfig.getId());
+               });
+               configEnd.getSettingList().stream().forEach(setting -> {
+                   setting.setJyxConfigId(jyxConfig.getId());
+               });
+               blameService.saveOrUpdateBatch(configEnd.getBlameList());
+               settingService.saveOrUpdateBatch(configEnd.getSettingList());
+               return  HttpResult.ok("修改成功");
+           }
+           return HttpResult.error("修改失败");
+       }catch (Exception e){
+           return HttpResult.error("修改失败" + e.getMessage());
+       }
+    }
+
+    @Override
+    public List<JyxConfigVo> jyxList(JyxConfigParam configParam) {
+        return jyxConfigMapper.jyxList(configParam);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public HttpResult deleteById(String id) {
+        try {
+            JyxConfig config = jyxConfigMapper.selectById(id);
+            if (config == null){
+                return HttpResult.error("该驾意险配置不存在");
+            }
+            config.setIsDelete(1);
+            int i = jyxConfigMapper.updateById(config);
+            if (i > 0){
+                blameService.lambdaUpdate().eq(JyxBlame::getJyxConfigId, id).set(JyxBlame::getIsDelete, 1).update();
+                settingService.lambdaUpdate().eq(jyxSetting::getJyxConfigId, id).set(jyxSetting::getIsDelete, 1).update();
+                return HttpResult.ok("删除成功");
+            }
+            return HttpResult.error("删除失败");
+        }catch (Exception e){
+            return HttpResult.error("删除失败" + e.getMessage());
+        }
+    }
+
+
+    public List<JyxBlame> selectBlameList(Long id){
+        return blameService.lambdaQuery().eq(JyxBlame::getJyxConfigId, id).list();
+    }
+
+    public List<jyxSetting> selectSettingList(Long id){
+        return settingService.lambdaQuery().eq(jyxSetting::getJyxConfigId, id).list();
+    }
+
+
+}

+ 11 - 0
platform/src/main/java/com/jzg/service/impl/jyxSettingServiceImpl.java

@@ -0,0 +1,11 @@
+package com.jzg.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jzg.commons.entity.po.jyxSetting;
+import com.jzg.mapper.jyxSettingMapper;
+import com.jzg.service.jyxSettingService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class jyxSettingServiceImpl extends ServiceImpl<jyxSettingMapper, jyxSetting> implements jyxSettingService {
+}

+ 7 - 0
platform/src/main/java/com/jzg/service/jyxSettingService.java

@@ -0,0 +1,7 @@
+package com.jzg.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.jzg.commons.entity.po.jyxSetting;
+
+public interface jyxSettingService extends IService<jyxSetting> {
+}

+ 215 - 0
platform/src/main/resources/mapper/EsmInsCompanyMapper.xml

@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jzg.mapper.EsmInsCompanyMapper">
+
+    <resultMap id="BaseResultMap" type="com.jzg.commons.entity.po.EsmInsCompany">
+        <id property="id" column="id" jdbcType="VARCHAR"/>
+        <result property="code" column="code" jdbcType="VARCHAR"/>
+        <result property="companyCode" column="company_code" jdbcType="VARCHAR"/>
+        <result property="name" column="name" jdbcType="VARCHAR"/>
+        <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
+        <result property="nameSimple" column="name_simple" jdbcType="VARCHAR"/>
+        <result property="remark" column="remark" jdbcType="VARCHAR"/>
+        <result property="orderNum" column="order_num" jdbcType="INTEGER"/>
+        <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="cnName" column="cn_name" jdbcType="VARCHAR"/>
+        <result property="type" column="type" jdbcType="TINYINT"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,code,name,company_code,
+        parent_id,name_simple,remark,
+        order_num,create_by,create_time,
+        update_by,update_time,open_quote,
+        cn_name,type,logo
+    </sql>
+
+    <select id="getByLowerId80" resultType="java.lang.String">
+        with recursive temp as (select id
+                                from esm_ins_company
+                                where id = #{companyId}
+                                union all
+                                select t.id
+                                from esm_ins_company t
+                                         inner join temp t2 on t2.id = t.parent_id)
+        select id
+        from temp
+    </select>
+
+    <select id="getByLowerId57" resultType="java.lang.String">
+        SELECT id
+        FROM (SELECT * FROM esm_ins_company ORDER BY parent_id, id) products_sorted,
+             (SELECT @pv := #{companyId}) initialisation
+        WHERE find_in_set(parent_id, @pv)
+          AND length(
+                @pv := concat(@pv, ',', id))
+        UNION
+        SELECT id
+        FROM esm_ins_company
+        WHERE id = #{companyId}
+    </select>
+
+    <select id="queryListByParentId" resultType="com.jzg.commons.entity.po.EsmInsCompany">
+        select
+            a.name as "name",
+            a.id as "id"
+        from
+            esm_ins_company   a
+        <where>
+            <if test="parentId  !=null  and  parentId  !=''">
+                a.parent_id=#{parentId}
+            </if>
+        </where>
+
+
+    </select>
+    <select id="findOrderCompanyList" resultType="com.jzg.commons.entity.vo.EsmInsCompanyResVo">
+        SELECT DISTINCT
+            ins.company_id AS id,
+            eic.name_simple AS NAME
+        FROM
+            ins_area_company ins
+                LEFT JOIN esm_ins_company eic ON ins.company_id = eic.id
+        WHERE
+            IFNULL( ins.company_id, '' )!= ''
+	        AND IFNULL( eic.id, '' )!= ''
+        GROUP BY
+            ins.company_id,
+            ins.inscompany
+    </select>
+
+    <select id="getExternalAgreementCompanyList" resultType="com.jzg.commons.entity.vo.EsmInsCompanyResVo">
+        SELECT DISTINCT
+            insurance_company_id AS id,
+            insurance_company AS NAME
+        FROM
+            ptl_agreement
+        <where>
+            is_external = '1'
+            <if test="name != null and name != ''">
+                and insurance_company like  concat('%',#{name},'%')
+            </if>
+
+        </where>
+        GROUP BY
+            insurance_company_id,
+            insurance_company
+    </select>
+    <select id="liveCompanyList" resultType="com.jzg.commons.entity.vo.EsmInsCompanyResVo">
+        SELECT
+            eic.id,
+            eic.name,
+            eic.name_simple,
+            eic.remark
+        FROM
+            ptl_agreement pa
+                LEFT JOIN esm_ins_company eic ON pa.insurance_company_id = eic.id
+        where
+            pa.is_external = 0
+        GROUP BY
+            eic.id
+    </select>
+    <select id="findOrderPartnerCompanyList"
+            resultType="com.jzg.commons.entity.vo.EsmInsCompanyResVo">
+        SELECT DISTINCT
+            agree.partner_companies_id AS id,
+            company.name_simple AS NAME
+        FROM
+            ins_area_company iac
+                left join
+            ptl_agreement agree on iac.agreement_id= agree.id
+                left join
+            esm_ins_company company on agree.partner_companies_id= company.id
+        WHERE
+            IFNULL( agree.partner_companies_id, '' )!= ''
+        GROUP BY
+            agree.partner_companies_id,
+            company.name_simple
+    </select>
+
+
+    <select id="leftList" resultType="com.jzg.commons.entity.vo.EsmInsCompanyResVo">
+        SELECT
+            eic.id,
+            eic.name,
+            eic.name_simple,
+            eic.company_code,
+            eic.remark,
+            eic.parent_id,
+            eic.order_num,
+            eic.cn_name,
+            eic.type,
+            eic.logo
+        FROM
+            esm_ins_company eic
+        WHERE
+            1=1
+        <if test="name != null and name != ''">
+            and eic.name like  concat('%',#{name},'%')
+        </if>
+    </select>
+
+
+    <resultMap id="EsmInsCompanyVo" type="com.jzg.commons.entity.vo.EsmInsCompanyVo">
+        <id property="id" column="id" jdbcType="VARCHAR"/>
+        <result property="code" column="code" jdbcType="VARCHAR"/>
+        <result property="companyCode" column="company_code" jdbcType="VARCHAR"/>
+        <result property="name" column="name" jdbcType="VARCHAR"/>
+        <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
+        <result property="nameSimple" column="name_simple" jdbcType="VARCHAR"/>
+        <result property="remark" column="remark" jdbcType="VARCHAR"/>
+        <result property="orderNum" column="order_num" jdbcType="INTEGER"/>
+        <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="cnName" column="cn_name" jdbcType="VARCHAR"/>
+        <result property="type" column="type" jdbcType="TINYINT"/>
+        <association property="logoFile" javaType="com.jzg.commons.entity.po.SysUploadFiles">
+            <id property="id" column="logo"/>
+            <result property="id" column="logoFileId"/>
+            <result property="fileName" column="file_name"/>
+            <result property="fileType" column="file_type"/>
+            <result property="bucketName" column="bucket_name"/>
+            <result property="etag" column="etag"/>
+        </association>
+    </resultMap>
+
+    <select id="findTree" resultMap="EsmInsCompanyVo">
+        SELECT
+            eic.id,
+            eic.code,
+            eic.name,
+            eic.name_simple,
+            eic.remark,
+            eic.company_code,
+            eic.parent_id,
+            eic.order_num,
+            eic.cn_name,
+            eic.type,
+            eic.logo,
+            suf.id logoFileId,
+            suf.file_name,
+            suf.file_type,
+            suf.bucket_name,
+            suf.etag
+        FROM
+            esm_ins_company eic
+        left join sys_upload_files suf on eic.logo = suf.id
+        WHERE
+            is_delete = 0
+        <if test="name != null and name != ''">
+            and eic.name like  concat('%',#{name},'%')
+        </if>
+        <if test="type != null and type != ''">
+            and eic.type = #{type}
+        </if>
+    </select>
+
+
+</mapper>

+ 64 - 0
platform/src/main/resources/mapper/JyxConfigMapper.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jzg.mapper.JyxConfigMapper">
+
+    <resultMap id="jyxConfigVo" type="com.jzg.commons.entity.vo.JyxConfigVo">
+        <id column="id" property="id"/>
+        <result column="product_type" property="productType"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="product_name" property="productName"/>
+        <result column="alias" property="alias"/>
+        <result column="company" property="company"/>
+        <result column="product_code" property="productCode"/>
+        <result column="connection_method" property="connectionMethod"/>
+        <result column="premium_setting" property="premiumSetting"/>
+        <result column="jsCoverage" property="coverage"/>
+        <result column="jsPremium" property="premium"/>
+        <result column="system_code" property="systemCode"/>
+        <collection property="blameList" ofType="com.jzg.commons.entity.po.JyxBlame">
+            <id column="blame_id" property="id"/>
+            <result column="blame" property="blame"/>
+            <result column="blame_code" property="blameCode"/>
+            <result column="blame_coverage" property="blameCoverage"/>
+            <result column="blame_premium" property="blamePremium"/>
+            <result column="blame_system_code" property="systemCode"/>
+            <result column="blame_jyx_config_id" property="jyxConfigId"/>
+        </collection>
+        <collection property="settingList" ofType="com.jzg.commons.entity.po.jyxSetting">
+                <id column="setting_id" property="id"/>
+                <result column="seats" property="seats"/>
+                <result column="setting_coverage" property="coverage"/>
+                <result column="setting_premium" property="premium"/>
+                <result column="setting_system_code" property="systemCode"/>
+                <result column="setting_jyx_config_id" property="jyxConfigId"/>
+        </collection>
+    </resultMap>
+
+
+    <sql id="params">
+       jc.`id`, jc.`product_type`,jc.`parent_id`, jc.`product_name`,jc.`alias`,jc.`company`, jc.`product_code`,jc.`connection_method`,jc.`premium_setting`, jc.`coverage` as jsCoverage, jc.`premium` as jsPremium, jc.`system_code`
+    </sql>
+
+    <select id="jyxList" resultMap="jyxConfigVo">
+        select
+        <include refid="params"/> ,
+            jb.id as blame_id,jb.blame,jb.blame_code,jb.blame_coverage,jb.blame_premium,jb.system_code as blame_system_code,jb.jyx_config_id as blame_jyx_config_id,
+            js.id as setting_id,js.seats,js.coverage as setting_coverage,js.premium as setting_premium,js.system_code as setting_system_code,js.jyx_config_id as setting_jyx_config_id
+            from jyx_config jc
+            left join jyx_blame jb on jc.id = jb.jyx_config_id
+            left join jyx_setting js on jc.id = js.jyx_config_id
+        <where>
+                is_delete = 0
+            <if test="params != null and params != ''">
+                and (jc.product_name like concat('%',#{params},'%') or jc.alias like concat('%',#{params},'%') or jc.product_code like concat('%',#{params},'%'))
+            </if>
+            <if test="seats != null and seats != ''">
+                and js.seats = #{seats}
+            </if>
+        </where>
+        order by jc.create_time desc
+    </select>
+
+</mapper>