From 7acaebcb01438578ded72491f39105db893982ef Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期二, 01 七月 2025 16:21:32 +0800
Subject: [PATCH] 修改

---
 multi-system/src/main/java/com/gkhy/exam/system/service/impl/QualityServiceImpl.java                 |    4 
 multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java               |  200 ++++++++++
 multi-system/src/main/resources/mapper/system/CompanyIndustryTemplateMapper.xml                      |   41 +
 multi-system/src/main/resources/mapper/system/CatalogueMapper.xml                                    |  154 +++++++
 multi-system/src/main/java/com/gkhy/exam/system/domain/Catalogue.java                                |   55 ++
 multi-system/src/main/java/com/gkhy/exam/system/domain/req/CatalogueDataReq.java                     |   39 +
 multi-system/src/main/java/com/gkhy/exam/system/service/CompanyIndustryTemplateService.java          |    2 
 multi-system/src/main/java/com/gkhy/exam/system/service/impl/CompanyIndustryTemplateServiceImpl.java |    6 
 multi-system/src/main/java/com/gkhy/exam/system/domain/req/CatalogueReq.java                         |   11 
 multi-system/src/main/java/com/gkhy/exam/system/service/CatalogueService.java                        |   36 +
 multi-system/src/main/java/com/gkhy/exam/system/domain/CatalogueDataFile.java                        |   60 +++
 multi-system/src/main/java/com/gkhy/exam/system/service/SysIndustryTypeService.java                  |   20 +
 multi-system/src/main/java/com/gkhy/exam/system/mapper/CatalogueMapper.java                          |   32 +
 multi-system/src/main/java/com/gkhy/exam/system/domain/CatalogueData.java                            |   67 +++
 multi-system/src/main/java/com/gkhy/exam/system/domain/CompanyIndustryTemplate.java                  |    7 
 multi-system/src/main/java/com/gkhy/exam/system/mapper/QualityTargetMapper.java                      |    2 
 multi-system/src/main/resources/mapper/system/SysIndustryTypeMapper.xml                              |    7 
 multi-system/src/main/resources/mapper/system/QualityTargetMapper.xml                                |   13 
 multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysIndustryTypeController.java       |   73 +++
 multi-system/src/main/java/com/gkhy/exam/system/domain/vo/CatalogueDataVo.java                       |   25 +
 multi-system/src/main/java/com/gkhy/exam/system/mapper/SysIndustryTypeMapper.java                    |   15 
 multi-system/src/main/java/com/gkhy/exam/system/mapper/CompanyIndustryTemplateMapper.java            |    2 
 multi-system/src/main/java/com/gkhy/exam/system/domain/CompanyIndustryType.java                      |   45 ++
 multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/CompanyBasicController.java             |    6 
 multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysIndustryTypeServiceImpl.java         |   73 +++
 multi-system/src/main/java/com/gkhy/exam/system/domain/vo/CatalogueVo.java                           |   23 +
 multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/QualityController.java                  |  156 +++++++
 27 files changed, 1,129 insertions(+), 45 deletions(-)

diff --git a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysIndustryTypeController.java b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysIndustryTypeController.java
new file mode 100644
index 0000000..798df2a
--- /dev/null
+++ b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysIndustryTypeController.java
@@ -0,0 +1,73 @@
+package com.gkhy.exam.admin.controller.system;
+
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.system.domain.CompanyBasic;
+import com.gkhy.exam.system.domain.CompanyIndustryType;
+import com.gkhy.exam.system.service.SysIndustryTypeService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@Api(tags = "行业模版")
+@RestController
+@RequestMapping("/system/industry/type")
+public class SysIndustryTypeController{
+    @Autowired
+    private SysIndustryTypeService service;
+
+    /**
+     * 行业类型列表
+     * @return
+     */
+    @ApiOperation(value = "行业类型列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
+            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10")
+    })
+    @GetMapping("/list")
+    public CommonResult listIndustryType(){
+        return CommonResult.success(service.selectIndustryTypeList());
+    }
+
+    @GetMapping("/listAll")
+    public CommonResult listIndustryTypeAll(){
+        return CommonResult.success(service.selectList());
+    }
+
+    /**
+     * 行业类型新增
+     * @param companyIndustryType
+     * @return
+     */
+    @ApiOperation(value = "行业类型新增")
+    @PostMapping("/insert")
+    public CommonResult insertIndustryType(@RequestBody CompanyIndustryType companyIndustryType){
+        return service.insertIndustryType(companyIndustryType);
+    }
+
+    /**
+     * 行业类型修改
+     * @param companyIndustryType
+     * @return
+     */
+    @ApiOperation(value = "行业类型修改")
+    @PostMapping("/update")
+    public CommonResult updateIndustryType(@RequestBody CompanyIndustryType companyIndustryType){
+        return service.updateIndustryType(companyIndustryType);
+    }
+
+    /**
+     * 行业类型删除
+     * @param IndustryId
+     * @return
+     */
+    @ApiOperation(value = "行业类型删除")
+    @GetMapping("/deleted")
+    public CommonResult deletedIndustryType(@RequestParam("IndustryId") Integer IndustryId){
+        return service.deletedIndustryType(IndustryId);
+    }
+
+}
diff --git a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/CompanyBasicController.java b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/CompanyBasicController.java
index 5145d2a..2d623d5 100644
--- a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/CompanyBasicController.java
+++ b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/CompanyBasicController.java
@@ -280,7 +280,7 @@
 
     /**
      * 行业模版
-     * @param companyId
+     * @param companyIndustryTemplate
      * @return
      */
     @ApiOperation(value = "行业模版(分页)")
@@ -289,8 +289,8 @@
             @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"),
     })
     @GetMapping("/industryTemplate/list")
-    public CommonResult selectCompanyIndustryTemplateList(Integer companyId){
-        return CommonResult.success(companyIndustryTemplateService.selectCompanyIndustryTemplateList(companyId));
+    public CommonResult selectCompanyIndustryTemplateList(CompanyIndustryTemplate companyIndustryTemplate){
+        return CommonResult.success(companyIndustryTemplateService.selectCompanyIndustryTemplateList(companyIndustryTemplate));
     }
 
     /**
diff --git a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/QualityController.java b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/QualityController.java
index 17951ea..389b383 100644
--- a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/QualityController.java
+++ b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/QualityController.java
@@ -1,17 +1,9 @@
 package com.gkhy.exam.admin.controller.web;
 
 import com.gkhy.exam.common.api.CommonResult;
-import com.gkhy.exam.system.domain.CompanyQualityPolicy;
-import com.gkhy.exam.system.domain.Quality;
-import com.gkhy.exam.system.domain.QualityAccomplish;
-import com.gkhy.exam.system.domain.QualityDecompose;
-import com.gkhy.exam.system.domain.req.DecomposeTargetReq;
-import com.gkhy.exam.system.domain.req.QualityReq;
-import com.gkhy.exam.system.domain.req.QualityTargetReq;
-import com.gkhy.exam.system.service.QualityAccomplishService;
-import com.gkhy.exam.system.service.QualityDecomposeService;
-import com.gkhy.exam.system.service.QualityService;
-import com.gkhy.exam.system.service.QualityTargetService;
+import com.gkhy.exam.system.domain.*;
+import com.gkhy.exam.system.domain.req.*;
+import com.gkhy.exam.system.service.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -35,6 +27,9 @@
 
     @Autowired
     private QualityDecomposeService qualityDecomposeService;
+
+    @Autowired
+    private CatalogueService catalogueService;
 
 
     /**
@@ -199,4 +194,143 @@
     }
 
 
+    /**
+     * 质量管理体系运行列表
+     * @param catalogueReq
+     * @return
+     */
+    @ApiOperation(value = "质量管理体系运行列表")
+    @GetMapping("/catalogue/list")
+    public CommonResult listCatalogue(CatalogueReq catalogueReq){
+        return CommonResult.success(catalogueService.selectCatalogueList(catalogueReq));
+    }
+
+
+    /**
+     * 质量管理体系运行新增
+     * @param catalogue
+     * @return
+     */
+    @ApiOperation(value = "质量管理体系运行新增")
+    @PostMapping("/catalogue/insert")
+    public CommonResult insertCatalogue(@RequestBody Catalogue catalogue){
+        return catalogueService.insertCatalogue(catalogue);
+    }
+
+    /**
+     * 质量管理体系运行修改
+     * @param catalogue
+     * @return
+     */
+    @ApiOperation(value = "质量管理体系运行修改")
+    @PostMapping("/catalogue/update")
+    public CommonResult updateCatalogue(@RequestBody Catalogue catalogue){
+        return catalogueService.updateCatalogue(catalogue);
+    }
+
+    /**
+     * 质量管理体系运行删除
+     * @param catalogueId
+     * @return
+     */
+    @ApiOperation(value = "质量管理体系运行删除")
+    @GetMapping("/catalogue/deleted")
+    public CommonResult deletedCatalogue(@RequestParam("catalogueId") Integer catalogueId){
+        return catalogueService.deletedCatalogue(catalogueId);
+    }
+
+
+
+    /**
+     * 目录数据列表
+     * @param catalogueReq
+     * @return
+     */
+    @ApiOperation(value = "目录数据列表")
+    @GetMapping("/catalogueData/list")
+    public CommonResult listCatalogueData(CatalogueReq catalogueReq){
+        return CommonResult.success(catalogueService.selectCatalogueDataList(catalogueReq));
+    }
+
+
+    /**
+     * 目录数据新增
+     * @param catalogue
+     * @return
+     */
+    @ApiOperation(value = "目录数据新增")
+    @PostMapping("/catalogueData/insert")
+    public CommonResult insertCatalogueData(@RequestBody CatalogueDataReq catalogue){
+        return catalogueService.insertCatalogueData(catalogue);
+    }
+
+    /**
+     * 目录数据修改
+     * @param catalogue
+     * @return
+     */
+    @ApiOperation(value = "目录数据修改")
+    @PostMapping("/catalogueData/update")
+    public CommonResult updateCatalogueData(@RequestBody CatalogueDataReq catalogue){
+        return catalogueService.updateCatalogueData(catalogue);
+    }
+
+    /**
+     * 目录数据删除
+     * @param catalogueDataId
+     * @return
+     */
+    @ApiOperation(value = "目录数据删除")
+    @GetMapping("/catalogueData/deleted")
+    public CommonResult deletedCatalogueData(@RequestParam("catalogueDataId") Integer catalogueDataId){
+        return catalogueService.deletedCatalogueData(catalogueDataId);
+    }
+//
+//    /**
+//     * 目录数据文件列表
+//     * @param catalogueReq
+//     * @return
+//     */
+//    @ApiOperation(value = "目录数据文件列表")
+//    @GetMapping("/catalogueData/list")
+//    public CommonResult listCatalogueDataFile(CatalogueReq catalogueReq){
+//        return CommonResult.success(catalogueService.selectCatalogueDataList(catalogueReq));
+//    }
+
+
+    /**
+     * 目录数据文件新增
+     * @param catalogueDataFile
+     * @return
+     */
+    @ApiOperation(value = "目录数据文件新增")
+    @PostMapping("/catalogueDataFile/insert")
+    public CommonResult insertCatalogueDataFile(@RequestBody CatalogueDataFile catalogueDataFile){
+        return catalogueService.insertCatalogueDataFile(catalogueDataFile);
+    }
+
+    /**
+     * 目录数据文件修改
+     * @param catalogueDataFile
+     * @return
+     */
+    @ApiOperation(value = "目录数据文件修改")
+    @PostMapping("/catalogueDataFile/update")
+    public CommonResult updateCatalogueDataFile(@RequestBody CatalogueDataFile catalogueDataFile){
+        return catalogueService.updateCatalogueDataFile(catalogueDataFile);
+    }
+
+    /**
+     * 目录数据文件删除
+     * @param dataFileId
+     * @return
+     */
+    @ApiOperation(value = "目录数据文件删除")
+    @GetMapping("/catalogueDataFile/deleted")
+    public CommonResult deletedCatalogueDataFile(@RequestParam("dataFileId") Integer dataFileId){
+        return catalogueService.deletedCatalogueDataFile(dataFileId);
+    }
+
+
+
 }
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/Catalogue.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/Catalogue.java
new file mode 100644
index 0000000..ad746f6
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/Catalogue.java
@@ -0,0 +1,55 @@
+package com.gkhy.exam.system.domain;
+
+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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+@Getter
+@Setter
+@TableName("catalogue")
+@ApiModel(value = "catalogue",description = "质量管理体系运行目录")
+public class Catalogue implements Serializable {
+
+    @ApiModelProperty("主键")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty("序号")
+    @TableField(value = "number")
+    private String  number;
+
+    @ApiModelProperty("上级目录id")
+    @TableField(value = "parent_id")
+    private Integer parentId;
+
+    @ApiModelProperty("目录名称")
+    @TableField(value = "mess")
+    private String mess;
+
+    @ApiModelProperty("目录名称 (1范围目录 2规范性引用目录 3术语与定义目录  4组织环境目录  5领导作业目录  6策划目录  7支持目录  8运行目录  9绩效评价目录  10改进目录)")
+    @TableField(value = "type")
+    private Integer type;
+
+    @TableField(value = "del_flag")
+    private Integer delFlag;
+
+    @TableField(value = "create_by")
+    private String createBy;
+
+    @TableField(value = "create_time")
+    private LocalDate createTime;
+
+    @TableField(value = "update_by")
+    private String updateBy;
+
+    @TableField(value = "update_time")
+    private LocalDate updateTime;
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/CatalogueData.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/CatalogueData.java
new file mode 100644
index 0000000..ecde1cd
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/CatalogueData.java
@@ -0,0 +1,67 @@
+package com.gkhy.exam.system.domain;
+
+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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.util.Date;
+
+@Data
+@TableName("catalogue_data")
+@ApiModel(value = "catalogue_data",description = "质量管理体系运行目录数据")
+public class CatalogueData implements Serializable {
+
+    @ApiModelProperty("主键")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+    @TableField(value = "catalogue_id")
+    private Integer catalogueId;
+    @TableField(value = "company_id")
+    private Integer companyId;
+    @TableField(value = "content")
+    private String content;
+    @TableField(value = "analysis")
+    private String analysis;
+    @TableField(value = "del_flag")
+    private Integer delFlag;
+    @TableField(value = "create_by")
+    private String createBy;
+    @TableField(value = "create_time")
+    private LocalDate createTime;
+    @TableField(value = "update_by")
+    private String updateBy;
+    @TableField(value = "updateTime")
+    private LocalDate updateTime;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/CatalogueDataFile.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/CatalogueDataFile.java
new file mode 100644
index 0000000..61ba672
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/CatalogueDataFile.java
@@ -0,0 +1,60 @@
+package com.gkhy.exam.system.domain;
+
+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 io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+
+@Data
+@TableName("catalogue_data_file")
+@ApiModel(value = "catalogue_data_file",description = "质量管理体系运行目录")
+public class CatalogueDataFile implements Serializable {
+
+    @ApiModelProperty("主键")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField(value = "catalogue_data_id")
+    private Integer catalogueDataId;
+
+    @TableField(value = "company_id")
+    private Integer companyId;
+    @TableField(value = "catalogue_id")
+    private Integer catalogueId;
+
+    @TableField(value = "name")
+    private String name;
+
+    @TableField(value = "file_path")
+    private String filePath;
+    @TableField(value = "file_name")
+    private String fileName;
+
+    @TableField(value = "type")
+    private Integer type;
+
+    @TableField(value = "del_flag")
+    private Integer delFlag;
+
+    @TableField(value = "create_by")
+    private String createBy;
+
+    @TableField(value = "create_time")
+    private LocalDate createTime;
+
+    @TableField(value = "update_by")
+    private String updateBy;
+
+    @TableField(value = "update_time")
+    private LocalDate updateTime;
+
+
+
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/CompanyIndustryTemplate.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/CompanyIndustryTemplate.java
index 1e3b17c..6e78dbb 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/domain/CompanyIndustryTemplate.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/CompanyIndustryTemplate.java
@@ -43,11 +43,18 @@
     @NotNull(message = "行业类型不可为空")
     private Integer industryType;
 
+    @TableField(exist = false)
+    private String industryName;
+
     @ApiModelProperty(value = "文件路径")
     @TableField("file_path")
     @NotBlank(message = "文件路径不可为空")
     private String filePath;
 
+    @ApiModelProperty(value = "文件名称")
+    @TableField("file_name")
+    private String fileName;
+
     @ApiModelProperty(value = "文件格式")
     @TableField("format")
     @NotBlank(message = "文件格式不可为空")
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/CompanyIndustryType.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/CompanyIndustryType.java
new file mode 100644
index 0000000..3b3e873
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/CompanyIndustryType.java
@@ -0,0 +1,45 @@
+package com.gkhy.exam.system.domain;
+
+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.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+@Data
+@TableName("company_industry_type")
+@ApiModel(value = "company_industry_type",description = "行业类型")
+public class CompanyIndustryType implements Serializable {
+
+    @ApiModelProperty("主键")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty("行业名称")
+    @TableField(value = "name")
+    private String name;
+
+    @TableField(value = "del_flag")
+    private Integer delFlag;
+
+    @TableField(value = "create_by")
+    private String createBy;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @TableField(value = "create_time")
+    private LocalDateTime createTime;
+
+    @TableField(value = "update_by")
+    private String updateBy;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @TableField(value = "update_time")
+    private LocalDateTime updateTime;
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/req/CatalogueDataReq.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/req/CatalogueDataReq.java
new file mode 100644
index 0000000..42f0c28
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/req/CatalogueDataReq.java
@@ -0,0 +1,39 @@
+package com.gkhy.exam.system.domain.req;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.gkhy.exam.system.domain.CatalogueDataFile;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class CatalogueDataReq {
+
+    private String id;
+
+    private Integer catalogueId;
+    private Integer companyId;
+
+    private String content;
+
+    private String analysis;
+
+    private Integer delFlag;
+
+    private String createBy;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createTime;
+
+    private String updateBy;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date updateTime;
+
+//    private List<CatalogueDataFile> files;
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/req/CatalogueReq.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/req/CatalogueReq.java
new file mode 100644
index 0000000..3c18106
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/req/CatalogueReq.java
@@ -0,0 +1,11 @@
+package com.gkhy.exam.system.domain.req;
+
+import lombok.Data;
+
+@Data
+public class CatalogueReq {
+    private Integer type;
+    private String mess;
+    private Integer catalogueId;
+    private Integer companyId;
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/CatalogueDataVo.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/CatalogueDataVo.java
new file mode 100644
index 0000000..3ac0b90
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/CatalogueDataVo.java
@@ -0,0 +1,25 @@
+package com.gkhy.exam.system.domain.vo;
+
+import com.gkhy.exam.system.domain.CatalogueDataFile;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class CatalogueDataVo {
+
+
+    private String id;
+    private Integer catalogueId;
+    private Integer companyId;
+    private String companyName;
+    private String content;
+    private String analysis;
+    private Integer delFlag;
+    private String createBy;
+    private Date createTime;
+    private String updateBy;
+    private Date updateTime;
+    private List<CatalogueDataFile> files;
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/CatalogueVo.java b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/CatalogueVo.java
new file mode 100644
index 0000000..280e6f8
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/domain/vo/CatalogueVo.java
@@ -0,0 +1,23 @@
+package com.gkhy.exam.system.domain.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class CatalogueVo {
+
+    private Integer id;
+
+    private String  number;
+
+    private Integer parentId;
+
+    private String mess;
+    private Integer type;
+
+    private Integer delFlag;
+
+    private List<CatalogueVo> children;
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/mapper/CatalogueMapper.java b/multi-system/src/main/java/com/gkhy/exam/system/mapper/CatalogueMapper.java
new file mode 100644
index 0000000..37a37f0
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/mapper/CatalogueMapper.java
@@ -0,0 +1,32 @@
+package com.gkhy.exam.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gkhy.exam.system.domain.Catalogue;
+import com.gkhy.exam.system.domain.CatalogueData;
+import com.gkhy.exam.system.domain.CatalogueDataFile;
+import com.gkhy.exam.system.domain.req.CatalogueReq;
+import com.gkhy.exam.system.domain.vo.CatalogueDataVo;
+import com.gkhy.exam.system.domain.vo.CatalogueVo;
+import org.apache.ibatis.annotations.Param;
+import org.mapstruct.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface CatalogueMapper extends BaseMapper<Catalogue> {
+    List<CatalogueVo> selectCatalogueList(CatalogueReq catalogueReq);
+
+    List<CatalogueDataVo> selectCatalogueDataList(CatalogueReq catalogueReq);
+
+    Integer insertCatalogueData(CatalogueData catalogueData);
+
+    void insertCatalogueDataFile(CatalogueDataFile files);
+
+    Integer updateCatalogueData(CatalogueData catalogueData);
+
+    void updateCatalogueDataFile(CatalogueDataFile files);
+
+    List<CatalogueDataFile> selectCatalogueDataFile(@Param("companyId") Integer companyId, @Param("catalogueId") Integer catalogueId);
+
+    List<CatalogueData> selectByCompanyId(Integer companyId);
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/mapper/CompanyIndustryTemplateMapper.java b/multi-system/src/main/java/com/gkhy/exam/system/mapper/CompanyIndustryTemplateMapper.java
index 1d04dd4..68d0ba4 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/mapper/CompanyIndustryTemplateMapper.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/mapper/CompanyIndustryTemplateMapper.java
@@ -9,7 +9,7 @@
 
 @Mapper
 public interface CompanyIndustryTemplateMapper extends BaseMapper<CompanyIndustryTemplate> {
-    List<CompanyIndustryTemplate> selectCompanyIndustryTemplateList(Integer companyId);
+    List<CompanyIndustryTemplate> selectCompanyIndustryTemplateList(CompanyIndustryTemplate companyId);
 
     int updateCompanyIndustryTemplateById(CompanyIndustryTemplate template);
 }
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/mapper/QualityTargetMapper.java b/multi-system/src/main/java/com/gkhy/exam/system/mapper/QualityTargetMapper.java
index 008e21b..8b27d2a 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/mapper/QualityTargetMapper.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/mapper/QualityTargetMapper.java
@@ -15,5 +15,5 @@
 
     List<QualityTarget> selectByQualityId(Integer qualityId);
 
-    void deleteByQualityIds(@Param("collect") List<Integer> collect);
+    void deleteByQualityIds(@Param("qualityId") Integer qualityId);
 }
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/mapper/SysIndustryTypeMapper.java b/multi-system/src/main/java/com/gkhy/exam/system/mapper/SysIndustryTypeMapper.java
new file mode 100644
index 0000000..22ee536
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/mapper/SysIndustryTypeMapper.java
@@ -0,0 +1,15 @@
+package com.gkhy.exam.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.system.domain.CompanyIndustryType;
+import org.mapstruct.Mapper;
+
+import java.util.List;
+@Mapper
+public interface SysIndustryTypeMapper extends BaseMapper<CompanyIndustryType> {
+    List<CompanyIndustryType> selectIndustryTypeList();
+
+
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/CatalogueService.java b/multi-system/src/main/java/com/gkhy/exam/system/service/CatalogueService.java
new file mode 100644
index 0000000..b88fdf2
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/CatalogueService.java
@@ -0,0 +1,36 @@
+package com.gkhy.exam.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gkhy.exam.common.api.CommonPage;
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.system.domain.Catalogue;
+import com.gkhy.exam.system.domain.CatalogueDataFile;
+import com.gkhy.exam.system.domain.req.CatalogueDataReq;
+import com.gkhy.exam.system.domain.req.CatalogueReq;
+import com.gkhy.exam.system.domain.vo.CatalogueVo;
+
+import java.util.List;
+
+public interface CatalogueService extends IService<Catalogue> {
+    CommonResult selectCatalogueList(CatalogueReq catalogueReq);
+
+    CommonResult insertCatalogue(Catalogue catalogue);
+
+    CommonResult updateCatalogue(Catalogue catalogue);
+
+    CommonResult deletedCatalogue(Integer catalogueId);
+
+    CommonResult selectCatalogueDataList(CatalogueReq catalogueReq);
+
+    CommonResult insertCatalogueData(CatalogueDataReq catalogue);
+
+    CommonResult updateCatalogueData(CatalogueDataReq catalogue);
+
+    CommonResult deletedCatalogueData(Integer catalogueDataId);
+
+    CommonResult insertCatalogueDataFile(CatalogueDataFile catalogueDataFile);
+
+    CommonResult updateCatalogueDataFile(CatalogueDataFile catalogueDataFile);
+
+    CommonResult deletedCatalogueDataFile(Integer dataFileId);
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/CompanyIndustryTemplateService.java b/multi-system/src/main/java/com/gkhy/exam/system/service/CompanyIndustryTemplateService.java
index 8ae5ea7..f6c1f8d 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/CompanyIndustryTemplateService.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/CompanyIndustryTemplateService.java
@@ -7,7 +7,7 @@
 import com.gkhy.exam.system.domain.CompanyRoster;
 
 public interface CompanyIndustryTemplateService extends IService<CompanyIndustryTemplate> {
-    CommonPage selectCompanyIndustryTemplateList(Integer companyId);
+    CommonPage selectCompanyIndustryTemplateList(CompanyIndustryTemplate companyId);
 
     CommonResult insertCompanyIndustryTemplate(CompanyIndustryTemplate companyIndustryTemplate);
 
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/SysIndustryTypeService.java b/multi-system/src/main/java/com/gkhy/exam/system/service/SysIndustryTypeService.java
new file mode 100644
index 0000000..7444d61
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/SysIndustryTypeService.java
@@ -0,0 +1,20 @@
+package com.gkhy.exam.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gkhy.exam.common.api.CommonPage;
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.system.domain.CompanyIndustryType;
+
+public interface SysIndustryTypeService extends IService<CompanyIndustryType> {
+    CommonPage selectIndustryTypeList();
+
+    CommonResult insertIndustryType(CompanyIndustryType companyIndustryType);
+
+    CommonResult updateIndustryType(CompanyIndustryType companyIndustryType);
+
+    CommonResult deletedIndustryType(Integer industryId);
+
+    CommonResult selectList();
+
+
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java
new file mode 100644
index 0000000..27065f4
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java
@@ -0,0 +1,200 @@
+package com.gkhy.exam.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gkhy.exam.common.api.CommonPage;
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.common.utils.SecurityUtils;
+import com.gkhy.exam.system.domain.Catalogue;
+import com.gkhy.exam.system.domain.CatalogueData;
+import com.gkhy.exam.system.domain.CatalogueDataFile;
+import com.gkhy.exam.system.domain.SysCompany;
+import com.gkhy.exam.system.domain.req.CatalogueDataReq;
+import com.gkhy.exam.system.domain.req.CatalogueReq;
+import com.gkhy.exam.system.domain.vo.CatalogueDataVo;
+import com.gkhy.exam.system.domain.vo.CatalogueVo;
+import com.gkhy.exam.system.mapper.CatalogueMapper;
+import com.gkhy.exam.system.mapper.SysCompanyMapper;
+import com.gkhy.exam.system.service.CatalogueService;
+import com.gkhy.exam.system.service.SysCompanyService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDate;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Service
+public class CatalogueServiceImpl extends ServiceImpl<CatalogueMapper, Catalogue> implements CatalogueService {
+
+    @Autowired
+    private CatalogueMapper catalogueMapper;
+    @Autowired
+    private SysCompanyMapper sysCompanyMapper;
+
+    /**
+     * 目录管理
+     * @param catalogueReq
+     * @return
+     */
+    @Override
+    public CommonResult selectCatalogueList(CatalogueReq catalogueReq) {
+        List<CatalogueVo> catalogueVos = catalogueMapper.selectCatalogueList(catalogueReq);
+        List<CatalogueVo> collect = catalogueVos.stream().filter(catalogueVo -> catalogueVo.getParentId() == 0).collect(Collectors.toList());
+        for (CatalogueVo catalogueVo : collect) {
+            List<CatalogueVo> getchildren = getchildren(catalogueVo, catalogueVos);
+            catalogueVo.setChildren(getchildren);
+        }
+        return CommonResult.success(collect);
+    }
+
+    private List<CatalogueVo> getchildren(CatalogueVo catalogueVo, List<CatalogueVo> catalogueVos) {
+        List<CatalogueVo> catalogueCharlden = new ArrayList<>();
+        for (CatalogueVo catalogue : catalogueVos) {
+            if (catalogueVo.getId() == catalogue.getParentId()){
+                catalogueCharlden.add(catalogue);
+            }
+        }
+        for (CatalogueVo vo : catalogueCharlden) {
+            List<CatalogueVo> getchildren = getchildren(vo, catalogueVos);
+            vo.setChildren(getchildren);
+        }
+        return catalogueCharlden;
+    }
+
+    @Override
+    public CommonResult insertCatalogue(Catalogue catalogue) {
+        catalogue.setCreateBy(SecurityUtils.getUsername());
+        catalogue.setCreateTime(LocalDate.now());
+        int insert = catalogueMapper.insert(catalogue);
+        if (insert>0){
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @Override
+    public CommonResult updateCatalogue(Catalogue catalogue) {
+        catalogue.setUpdateBy(SecurityUtils.getUsername());
+        catalogue.setUpdateTime(LocalDate.now());
+        int i = catalogueMapper.updateById(catalogue);
+        if (i>0){
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @Override
+    public CommonResult deletedCatalogue(Integer catalogueId) {
+
+        CatalogueReq catalogueReq = new CatalogueReq();
+        catalogueReq.setCatalogueId(catalogueId);
+        List<CatalogueDataVo> catalogueDataVos = catalogueMapper.selectCatalogueDataList(catalogueReq);
+        if (catalogueDataVos.size()>0){
+            return CommonResult.failed("当前目录存在数据,请勿删除");
+        }
+        Catalogue catalogue = new Catalogue();
+        catalogue.setId(catalogueId);
+        catalogue.setDelFlag(2);
+        catalogue.setUpdateTime(LocalDate.now());
+        catalogue.setUpdateBy(SecurityUtils.getUsername());
+        int i = catalogueMapper.updateById(catalogue);
+        if (i>0){
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+
+    /**
+     * 目录数据管理
+     * @param catalogueReq
+     * @return
+     */
+    @Override
+    public CommonResult selectCatalogueDataList(CatalogueReq catalogueReq) {
+        List<CatalogueDataVo> catalogueData = catalogueMapper.selectCatalogueDataList(catalogueReq);
+        for (CatalogueDataVo catalogueDatum : catalogueData) {
+            List<CatalogueDataFile> catalogueDataFiles = catalogueMapper.selectCatalogueDataFile(catalogueDatum.getCompanyId(), catalogueDatum.getCatalogueId());
+            catalogueDatum.setFiles(catalogueDataFiles);
+        }
+        return CommonResult.success(catalogueData);
+    }
+
+    @Override
+    public CommonResult insertCatalogueData(CatalogueDataReq catalogue) {
+        List<CatalogueData> catalogueData1 = catalogueMapper.selectByCompanyId(catalogue.getCompanyId());
+        if (catalogueData1.size()>0){
+            return CommonResult.failed("当前企业已有数据,请勿重复添加");
+        }
+        CatalogueData catalogueData = new CatalogueData();
+        BeanUtils.copyProperties(catalogue,catalogueData);
+        Integer i = catalogueMapper.insertCatalogueData(catalogueData);
+//        List<CatalogueDataFile> files = catalogue.getFiles();
+        if (i>0){
+//            for (CatalogueDataFile file : files) {
+//                file.setCatalogueDataId(catalogueData.getId());
+//                file.setCreateBy(SecurityUtils.getUsername());
+//                file.setCreateTime(LocalDate.now());
+//                catalogueMapper.insertCatalogueDataFile(file);
+//            }
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @Override
+    public CommonResult updateCatalogueData(CatalogueDataReq catalogue) {
+        CatalogueData catalogueData = new CatalogueData();
+        BeanUtils.copyProperties(catalogue,catalogueData);
+        Integer i = catalogueMapper.updateCatalogueData(catalogueData);
+//        List<CatalogueDataFile> files = catalogue.getFiles();
+        if (i>0){
+//            catalogueMapper.updateCatalogueDataFile(files);
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @Override
+    public CommonResult deletedCatalogueData(Integer catalogueDataId) {
+        CatalogueData catalogueData = new CatalogueData();
+        catalogueData.setId(catalogueDataId);
+        catalogueData.setDelFlag(2);
+        catalogueData.setUpdateBy(SecurityUtils.getUsername());
+        catalogueData.setUpdateTime(LocalDate.now());
+        Integer i = catalogueMapper.updateCatalogueData(catalogueData);
+        if (i>9){
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @Override
+    public CommonResult insertCatalogueDataFile(CatalogueDataFile catalogueDataFile) {
+        catalogueDataFile.setCreateTime(LocalDate.now());
+        catalogueDataFile.setCreateBy(SecurityUtils.getUsername());
+        catalogueMapper.insertCatalogueDataFile(catalogueDataFile);
+        return CommonResult.success();
+    }
+
+    @Override
+    public CommonResult updateCatalogueDataFile(CatalogueDataFile catalogueDataFile) {
+        catalogueDataFile.setUpdateBy(SecurityUtils.getUsername());
+        catalogueDataFile.setUpdateTime(LocalDate.now());
+        catalogueMapper.updateCatalogueDataFile(catalogueDataFile);
+        return CommonResult.success();
+    }
+
+    @Override
+    public CommonResult deletedCatalogueDataFile(Integer dataFileId) {
+        CatalogueDataFile catalogueDataFile = new CatalogueDataFile();
+        catalogueDataFile.setId(dataFileId);
+        catalogueDataFile.setDelFlag(2);
+        catalogueDataFile.setUpdateTime(LocalDate.now());
+        catalogueDataFile.setUpdateBy(SecurityUtils.getUsername());
+        catalogueMapper.updateCatalogueDataFile(catalogueDataFile);
+        return CommonResult.success();
+    }
+}
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CompanyIndustryTemplateServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CompanyIndustryTemplateServiceImpl.java
index b5cec46..c500fe4 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CompanyIndustryTemplateServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CompanyIndustryTemplateServiceImpl.java
@@ -31,7 +31,7 @@
 
 
     @Override
-    public CommonPage selectCompanyIndustryTemplateList(Integer companyId) {
+    public CommonPage selectCompanyIndustryTemplateList(CompanyIndustryTemplate companyId) {
         boolean admin = SecurityUtils.adminUser();
         if (!admin){
             if (companyId==null){
@@ -47,7 +47,7 @@
     public CommonResult insertCompanyIndustryTemplate(CompanyIndustryTemplate companyIndustryTemplate) {
         LoginUserDetails loginUser = SecurityUtils.getLoginUser();
 
-        SysCompany sysCompany = sysCompanyService.selectCompanyById(SecurityUtils.getCompanyId());
+        SysCompany sysCompany = sysCompanyService.selectCompanyById(companyIndustryTemplate.getCompanyId()==null?SecurityUtils.getCompanyId():companyIndustryTemplate.getCompanyId());
         companyIndustryTemplate.setCompanyName(sysCompany.getName());
         companyIndustryTemplate.setCreateBy(loginUser.getUsername());
         companyIndustryTemplate.setCreateTime(LocalDateTime.now());
@@ -61,7 +61,7 @@
     @Override
     public CommonResult updateCompanyIndustryTemplate(CompanyIndustryTemplate companyIndustryTemplate) {
         LoginUserDetails loginUser = SecurityUtils.getLoginUser();
-        SysCompany sysCompany = sysCompanyService.selectCompanyById(SecurityUtils.getCompanyId());
+        SysCompany sysCompany = sysCompanyService.selectCompanyById(companyIndustryTemplate.getCompanyId()==null?SecurityUtils.getCompanyId():companyIndustryTemplate.getCompanyId());
         companyIndustryTemplate.setCompanyName(sysCompany.getName());
         companyIndustryTemplate.setUpdateBy(loginUser.getUsername());
         companyIndustryTemplate.setUpdateTime(LocalDateTime.now());
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/QualityServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/QualityServiceImpl.java
index dcd74fd..9076692 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/QualityServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/QualityServiceImpl.java
@@ -98,7 +98,7 @@
     public CommonResult updateQuality(QualityTargetReq qualityTargetReq) {
         LoginUserDetails loginUser = SecurityUtils.getLoginUser();
         List<QualityTarget> qualityTargets = qualityTargetReq.getQualityTargets();
-        List<Integer> collect = qualityTargets.stream().map(QualityTarget::getQualityId).collect(Collectors.toList());
+//        List<Integer> collect = qualityTargets.stream().map(QualityTarget::getQualityId).collect(Collectors.toList());
         Quality quality = new Quality();
         BeanUtils.copyProperties(qualityTargetReq,quality);
         //获取对应企业
@@ -107,7 +107,7 @@
         quality.setUpdateBy(loginUser.getUsername());
         quality.setUpdateTime(LocalDateTime.now());
         int insert = qualityMapper.updateQualityById(quality);
-        qualityTargetMapper.deleteByQualityIds(collect);
+        qualityTargetMapper.deleteByQualityIds(qualityTargetReq.getId());
         for (QualityTarget qualityTarget : qualityTargets) {
             qualityTarget.setQualityId(quality.getId());
             qualityTarget.setCompanyId(qualityTargetReq.getCompanyId());
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysIndustryTypeServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysIndustryTypeServiceImpl.java
new file mode 100644
index 0000000..8c80fc6
--- /dev/null
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysIndustryTypeServiceImpl.java
@@ -0,0 +1,73 @@
+package com.gkhy.exam.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gkhy.exam.common.api.CommonPage;
+import com.gkhy.exam.common.api.CommonResult;
+import com.gkhy.exam.common.domain.model.LoginUserDetails;
+import com.gkhy.exam.common.utils.PageUtils;
+import com.gkhy.exam.common.utils.SecurityUtils;
+import com.gkhy.exam.system.domain.CompanyIndustryType;
+import com.gkhy.exam.system.mapper.SysIndustryTypeMapper;
+import com.gkhy.exam.system.service.SysIndustryTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Service
+public class SysIndustryTypeServiceImpl extends ServiceImpl<SysIndustryTypeMapper, CompanyIndustryType> implements SysIndustryTypeService {
+
+    @Autowired
+    private SysIndustryTypeMapper sysIndustryTypeMapper;
+
+    @Override
+    public CommonPage selectIndustryTypeList() {
+        PageUtils.startPage();
+        List<CompanyIndustryType> companyIndustryTypes = sysIndustryTypeMapper.selectIndustryTypeList();
+        return CommonPage.restPage(companyIndustryTypes);
+    }
+
+    @Override
+    public CommonResult insertIndustryType(CompanyIndustryType companyIndustryType) {
+        LoginUserDetails loginUser = SecurityUtils.getLoginUser();
+        companyIndustryType.setCreateBy(loginUser.getUsername());
+        companyIndustryType.setCreateTime(LocalDateTime.now());
+        int insert = sysIndustryTypeMapper.insert(companyIndustryType);
+        if (insert > 0){
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @Override
+    public CommonResult updateIndustryType(CompanyIndustryType companyIndustryType) {
+        companyIndustryType.setUpdateBy(SecurityUtils.getUsername());
+        companyIndustryType.setUpdateTime(LocalDateTime.now());
+        int i = sysIndustryTypeMapper.updateById(companyIndustryType);
+        if (i>=0){
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @Override
+    public CommonResult deletedIndustryType(Integer industryId) {
+        CompanyIndustryType companyIndustryType = new CompanyIndustryType();
+        companyIndustryType.setId(industryId);
+        companyIndustryType.setDelFlag(2);
+        companyIndustryType.setUpdateBy(SecurityUtils.getUsername());
+        companyIndustryType.setUpdateTime(LocalDateTime.now());
+        int i = sysIndustryTypeMapper.updateById(companyIndustryType);
+        if (i>0){
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @Override
+    public CommonResult selectList() {
+        List<CompanyIndustryType> companyIndustryTypes = sysIndustryTypeMapper.selectIndustryTypeList();
+        return CommonResult.success(companyIndustryTypes);
+    }
+}
diff --git a/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml b/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml
new file mode 100644
index 0000000..e03a1a3
--- /dev/null
+++ b/multi-system/src/main/resources/mapper/system/CatalogueMapper.xml
@@ -0,0 +1,154 @@
+<?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.gkhy.exam.system.mapper.CatalogueMapper">
+    <insert id="insertCatalogueData" keyProperty="id" useGeneratedKeys="true">
+        INSERT INTO  `catalogue_data`
+            (  `company_id`, `catalogue_id`, `content`, `analysis`,  `create_by`, `create_time` )
+        VALUES
+            ( #{companyId}, #{catalogueId}, #{content}, #{analysis}, #{createBy}, #{createTime} )
+    </insert>
+
+    <insert id="insertCatalogueDataFile">
+        INSERT INTO `train_exam`.`catalogue_data_file`
+            ( `catalogue_id`,`company_id`, `name`, `file_path`,`file_name`, `type`, `create_by`, `create_time` )
+        VALUES
+            ( #{catalogueId},#{companyId}, #{name}, #{filePath},#{fileName}, #{type}, #{createBy}, #{createTime} )
+    </insert>
+
+    <update id="updateCatalogueData">
+        UPDATE `train_exam`.`catalogue_data`
+        SET
+            <if test="companyId!=null">
+                `company_id` = #{companyId},
+            </if>
+            <if test="catalogueId!=null">
+                `catalogue_id` = #{catalogueId},
+            </if>
+            <if test="content!=null and content!=''">
+                `content` = #{content},
+            </if>
+            <if test="analysic!=null and analysic!=''">
+                `analysis` = #{analysis},
+            </if>
+            <if test="delFlag!=null and delFlag!=''">
+                `del_flag` = #{delFlag},
+            </if>
+            <if test="updateBy!=null and update!=''">
+                `update_by` = #{updateBy},
+            </if>
+            <if test="updateTime!=null">
+                `update_time` = #{updateTime}
+            </if>
+        WHERE
+            `id` = #{id}
+    </update>
+    <update id="updateCatalogueDataFile">
+            UPDATE `train_exam`.`catalogue_data_file`
+                <if test="catalogueId!=null">
+                    `catalogue_id` = #{catalogueId},
+                </if>
+                <if test="companyId!=null">
+                    `company_id` = #{companyId},
+                </if>
+                <if test="name!=null">
+                    `name` = #{name},
+                </if>
+                <if test="filePath!=null">
+                    `file_path` = #{filePath},
+                </if>
+                <if test="fileName!=null">
+                    `file_name` = #{fileName},
+                </if>
+                <if test="type!=null">
+                    `type` = #{type},
+                </if>
+                <if test="delFlag != null and delFlag != ''" >
+                    del_flag = #{item.delFlag},
+                </if>
+                <if test="updateBy != null" >
+                    update_by = #{updateBy},
+                </if>
+                <if test="updateTime != null" >
+                    update_time = #{updateTime}
+                </if>
+            where id = #{id}
+    </update>
+
+    <select id="selectCatalogueList" resultType="com.gkhy.exam.system.domain.vo.CatalogueVo">
+        SELECT
+            `id`,
+            `parent_id`,
+            `number`,
+            `mess`,
+            `type`,
+            `del_flag`,
+            `create_by`,
+            `create_time`,
+            `update_by`,
+            `update_time`
+        FROM
+            catalogue
+        WHERE del_flag = 1
+          <if test="type!=null">
+              and type = #{type}
+          </if>
+        ORDER BY create_time ASC
+    </select>
+    <select id="selectCatalogueDataList" resultType="com.gkhy.exam.system.domain.vo.CatalogueDataVo">
+        SELECT
+            cd.`id`,
+            cd.`company_id`,
+            sc.name,
+            cd.`catalogue_id`,
+            cd.`content`,
+            cd.`analysis`,
+            cd.`del_flag`,
+            cd.`create_by`,
+            cd.`create_time`,
+            cd.`update_by`,
+            cd.`update_time`
+        FROM
+            catalogue_data cd
+        left join sys_company sc on cd.company_id = sc.id
+        WHERE
+            cd.del_flag = 1
+          <if test="catalogueId!=null">
+              and cd.catalogue_id = #{catalogueId}
+          </if>
+        <if test="companyId!=null">
+            and cd.company_id = #{companyId}
+        </if>
+    </select>
+    <select id="selectCatalogueDataFile" resultType="com.gkhy.exam.system.domain.CatalogueDataFile">
+        SELECT
+            id,
+            `catalogue_data_id`,
+            `name`,
+            `file_path`,
+            `type`,
+            `create_by`,
+            `create_time`
+        FROM
+            catalogue_data_file
+        WHERE
+            company_id = #{companyId} and catalogue_id = #{catalogueId}
+    </select>
+    <select id="selectByCompanyId" resultType="com.gkhy.exam.system.domain.CatalogueData">
+        SELECT
+            `id`,
+            `company_id`,
+            name,
+            `catalogue_id`,
+            `content`,
+            `analysis`,
+            `del_flag`,
+            `create_by`,
+            `create_time`,
+            `update_by`,
+            `update_time`
+        FROM
+            catalogue_data
+        where company_id = #{companyId} and del_flag = 1
+
+    </select>
+</mapper>
diff --git a/multi-system/src/main/resources/mapper/system/CompanyIndustryTemplateMapper.xml b/multi-system/src/main/resources/mapper/system/CompanyIndustryTemplateMapper.xml
index 5dd47f1..a8011e9 100644
--- a/multi-system/src/main/resources/mapper/system/CompanyIndustryTemplateMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/CompanyIndustryTemplateMapper.xml
@@ -19,6 +19,9 @@
             <if test="filePath != null and filePath !=''" >
                 file_path = #{filePath},
             </if>
+            <if test="fileName != null and fileName !=''" >
+                file_name = #{fileName},
+            </if>
             <if test="format != null and format !=''" >
                 format = #{format},
             </if>
@@ -43,26 +46,32 @@
 
     <select id="selectCompanyIndustryTemplateList" resultType="com.gkhy.exam.system.domain.CompanyIndustryTemplate">
         SELECT
-            `id`,
-            `company_id`,
-            `company_name`,
-            `template_name`,
-            `industry_type`,
-            `file_path`,
-            `format`,
-            `del_flag`,
-            `create_by`,
-            `create_time`,
-            `update_by`,
-            `update_time`
+            ci.`id`,
+            ci.`company_id`,
+            ci.`company_name`,
+            ci.`template_name`,
+            ci.`industry_type`,
+            cit.name as industry_name,
+            ci.`file_path`,
+            ci.`file_name`,
+            ci.`format`,
+            ci.`del_flag`,
+            ci.`create_by`,
+            ci.`create_time`,
+            ci.`update_by`,
+            ci.`update_time`
         FROM
-        company_industry_template
+        company_industry_template ci
+        left join company_industry_type cit on ci.industry_type = cit.id
         WHERE
-            del_flag = 0
+            ci.del_flag = 0
         <if test="companyId!=null and companyId!=''">
-            and company_id = #{companyId}
+            and ci.company_id = #{companyId}
+        </if>
+        <if test="industryType!=null">
+            and ci.industry_type = #{industryType}
         </if>
         ORDER BY
-            create_time DESC
+            ci.create_time DESC
     </select>
 </mapper>
diff --git a/multi-system/src/main/resources/mapper/system/QualityTargetMapper.xml b/multi-system/src/main/resources/mapper/system/QualityTargetMapper.xml
index 0f7154b..b6719b4 100644
--- a/multi-system/src/main/resources/mapper/system/QualityTargetMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/QualityTargetMapper.xml
@@ -14,6 +14,7 @@
              #{item.createBy},#{item.createTime})
         </foreach>
     </insert>
+
     <update id="updateQualityTargetById">
         <foreach collection="qualityTargets" item="item" index="index" separator=";">
             UPDATE quality_target
@@ -70,13 +71,11 @@
             where id = #{item.id}
         </foreach>
     </update>
-    <delete id="deleteByQualityIds">
-        UPDATE quality_target set del_flag =2 where quality_id in (
-        <foreach collection="collect" item="id" separator=",">
-            #{id}
-        </foreach>
-            )
-    </delete>
+
+    <update id="deleteByQualityIds">
+        UPDATE quality_target set del_flag =2 where quality_id = #{qualityId}
+    </update>
+
     <select id="selectByQualityId" resultType="com.gkhy.exam.system.domain.QualityTarget">
         select `id`,`company_id`,`quality_id`,`message`,`num`,`method`,`calculate`,`data_source`,`depart_name`,
                `frequency`,`duty_name`,`remark`,`del_flag`,`create_by`,`create_time`,`update_by`,`update_time`
diff --git a/multi-system/src/main/resources/mapper/system/SysIndustryTypeMapper.xml b/multi-system/src/main/resources/mapper/system/SysIndustryTypeMapper.xml
new file mode 100644
index 0000000..13ef3f0
--- /dev/null
+++ b/multi-system/src/main/resources/mapper/system/SysIndustryTypeMapper.xml
@@ -0,0 +1,7 @@
+<?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.gkhy.exam.system.mapper.SysIndustryTypeMapper">
+    <select id="selectIndustryTypeList" resultType="com.gkhy.exam.system.domain.CompanyIndustryType">
+        select id,name,del_flag,create_by,create_time,update_by,update_time from company_industry_type where del_flag = 1
+    </select>
+</mapper>

--
Gitblit v1.9.2