af31f0a78ec1932cec1a7e99482e7d850e60576e..03a3edee9ff27fa9bb4b32dcda08e279c7c094c8
2025-11-28 heheng
功能修改
03a3ed 对比 | 目录
2025-11-28 heheng
功能修改
6d5fc7 对比 | 目录
已修改18个文件
133 ■■■■ 文件已修改
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/ProcessInspectionController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/TemplateController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/domain/Catalogue.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/domain/ProjectDocument.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/domain/StandardizedTemplate.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/domain/req/CatalogueProjectDocumentReq.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/mapper/ProcessInspectionMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/mapper/ProjectDocumentMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/mapper/StandardizedTemplateMapper.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/service/ProcessInspectionService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/service/ProjectDocumentService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/service/StandardizedTemplateService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/service/impl/ProcessInspectionServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/service/impl/ProjectDocumentServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/service/impl/StandardizedTemplateServiceImpl.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/resources/mapper/system/ProjectDocumentMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/resources/mapper/system/StandardizedTemplateMapper.xml 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/ProcessInspectionController.java
@@ -30,12 +30,13 @@
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司iD"),
            @ApiImplicitParam(paramType = "query", name = "type", dataType = "int", required = true, value = "类型1过程检验2最终检验"),
            @ApiImplicitParam(paramType = "query", name = "itemId", dataType = "int", required = false, value = "项目iD"),
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = true, value = "页码"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = true, value = "每页数量")
    })
    @GetMapping("/inspection/list")
    public CommonResult selectProcessInspectionList(Integer companyId, @RequestParam("type") Integer templateType){
        return CommonResult.success(processInspectionService.selectProcessInspectionList(companyId, templateType));
    public CommonResult selectProcessInspectionList(Integer companyId, @RequestParam("type") Integer templateType,Integer itemId){
        return CommonResult.success(processInspectionService.selectProcessInspectionList(companyId, templateType, itemId));
    }
    /**
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/TemplateController.java
@@ -27,7 +27,6 @@
    /**
     * 行业模版
     * @param companyId
     * @return
     */
    @ApiOperation(value = "标准化模版(分页)")
@@ -35,11 +34,13 @@
            @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司iD"),
            @ApiImplicitParam(paramType = "query", name = "templateType", dataType = "int", required = true, value = "类型1体系标准2技术标准3应用标准4程序文件5作业指导书6记录及表单7技术类8生产类9其他知识产权"),
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = true, value = "页码"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = true, value = "每页数量")
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = true, value = "每页数量"),
            @ApiImplicitParam(paramType = "query", name = "sort", dataType = "int", required = true, value = "排序类型1正序2倒序"),
            @ApiImplicitParam(paramType = "query", name = "templateName", dataType = "string", required = false, value = "模板名称")
    })
    @GetMapping("/standardizedTemplate/list")
    public CommonResult selectStandardizedTemplateList(Integer companyId, @RequestParam("templateType") Integer templateType){
        return CommonResult.success(standardizedTemplateService.selectStandardizedTemplateList(companyId, templateType));
    public CommonResult selectStandardizedTemplateList(StandardizedTemplate standardizedTemplate){
        return CommonResult.success(standardizedTemplateService.selectStandardizedTemplateList(standardizedTemplate));
    }
    /**
multi-system/src/main/java/com/gkhy/exam/system/domain/Catalogue.java
@@ -38,7 +38,7 @@
    @TableField(value = "mess")
    private String mess;
    @ApiModelProperty("目录名称 (1范围目录 2技术类 3项目类  4组织环境目录  5领导作业目录  6策划目录  7支持目录  8运行目录  9绩效评价目录  10改进目录)")
    @ApiModelProperty("目录名称 (1范围目录 2技术类 3项目类  4组织环境目录  5领导作业目录  6策划目录  7支持目录  8运行目录  9绩效评价目录  10改进目录 11项目策划目录12生产过程目录13不合格品目录)")
    @TableField(value = "type")
    private Integer type;
multi-system/src/main/java/com/gkhy/exam/system/domain/ProjectDocument.java
@@ -30,14 +30,18 @@
    @TableField("item_id")
    private Integer itemId;
    @ApiModelProperty(value = "项目id")
    @ApiModelProperty(value = "附件名称")
    @TableField("file_name")
    private String fileName;
    @ApiModelProperty(value = "项目id")
    @ApiModelProperty(value = "附件地址")
    @TableField("file_path")
    private String filePath;
    @ApiModelProperty(value = "文档类型 3涉及开发过程11项目策划目录12生产过程目录13不合格品目录")
    @TableField("document_type")
    private Integer documentType;
    private Integer del_flag;
multi-system/src/main/java/com/gkhy/exam/system/domain/StandardizedTemplate.java
@@ -93,5 +93,8 @@
    @TableField("update_time")
    private LocalDateTime updateTime;
    @ApiModelProperty("排序1正序2倒序")
    @TableField(exist = false)
    private Integer sort;
}
multi-system/src/main/java/com/gkhy/exam/system/domain/req/CatalogueProjectDocumentReq.java
@@ -1,14 +1,20 @@
package com.gkhy.exam.system.domain.req;
import com.baomidou.mybatisplus.annotation.TableField;
import com.gkhy.exam.system.domain.ProjectDocument;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel(value = "CatalogueProjectDocumentReq",description = "项目文档")
public class CatalogueProjectDocumentReq {
    private Integer companyId;
    private Integer catalogueId;
    private Integer itemId;
    @ApiModelProperty(value = "文档类型3涉及开发过程11项目策划目录12生产过程目录13不合格品目录")
    private Integer type;
    private List<ProjectDocument> projectDocuments;
}
multi-system/src/main/java/com/gkhy/exam/system/mapper/ProcessInspectionMapper.java
@@ -9,5 +9,6 @@
@Mapper
public interface ProcessInspectionMapper extends BaseMapper<ProcessInspection> {
    List<ProcessInspection> selectByCompanyidAndTypeList(@Param("companyId") Integer companyId, @Param("templateType") Integer templateType);
    List<ProcessInspection> selectByCompanyidAndTypeList(@Param("companyId") Integer companyId, @Param("templateType") Integer templateType
            , @Param("itemId") Integer itemId);
}
multi-system/src/main/java/com/gkhy/exam/system/mapper/ProjectDocumentMapper.java
@@ -11,5 +11,6 @@
public interface ProjectDocumentMapper extends BaseMapper<ProjectDocument> {
    Integer insertBaths(@Param("projectDocuments") List<ProjectDocument> projectDocuments);
    List<ProjectDocument> selectDocumentList(@Param("companyId") Integer companyId, @Param("itemId") Integer itemId, @Param("catalogueId") Integer catalogueId);
    List<ProjectDocument> selectDocumentList(@Param("companyId") Integer companyId, @Param("itemId") Integer itemId,
                                             @Param("catalogueId") Integer catalogueId,@Param("documentType") Integer documentType);
}
multi-system/src/main/java/com/gkhy/exam/system/mapper/StandardizedTemplateMapper.java
@@ -3,15 +3,22 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gkhy.exam.system.domain.CompanyIndustryTemplate;
import com.gkhy.exam.system.domain.StandardizedTemplate;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;
import java.util.List;
@Mapper
public interface StandardizedTemplateMapper extends BaseMapper<StandardizedTemplate> {
    List<StandardizedTemplate> selectStandardizedTemplateList(Integer companyId, Integer templateType);
//    List<StandardizedTemplate> selectStandardizedTemplateList(@Param("companyId") Integer companyId, @Param("templateType") Integer templateType ,@Param("sort") Integer sort);
//
//    List<StandardizedTemplate> selectStandardizedTemplateListV2(@Param("companyId")Integer companyId, @Param("templateType")Integer templateType,
//                                                                @Param("industryTypeId")Integer industryTypeId,@Param("sort") Integer sort);
    List<StandardizedTemplate> selectStandardizedTemplateListV2(Integer companyId, Integer templateType, Integer industryTypeId);
    List<StandardizedTemplate> selectStandardizedTemplateList(StandardizedTemplate  template);
    List<StandardizedTemplate> selectStandardizedTemplateListV2(StandardizedTemplate  template);
    int updateStandardizedTemplateById(StandardizedTemplate template);
}
multi-system/src/main/java/com/gkhy/exam/system/service/ProcessInspectionService.java
@@ -6,7 +6,7 @@
import com.gkhy.exam.system.domain.ProcessInspection;
public interface ProcessInspectionService extends IService<ProcessInspection> {
    CommonPage selectProcessInspectionList(Integer companyId, Integer templateType);
    CommonPage selectProcessInspectionList(Integer companyId, Integer templateType,Integer itemId);
    CommonResult insertProcessInspection(ProcessInspection processInspection);
multi-system/src/main/java/com/gkhy/exam/system/service/ProjectDocumentService.java
@@ -10,7 +10,7 @@
public interface ProjectDocumentService extends IService<ProjectDocument> {
    CommonResult insertprojectDocument(CatalogueProjectDocumentReq projectDocument);
    List<ProjectDocument> selectList(Integer companyId, Integer itemId, Integer catalogueId);
    List<ProjectDocument> selectList(Integer companyId, Integer itemId, Integer catalogueId,Integer documentType);
    CommonResult updateprojectDocument(CatalogueProjectDocumentReq projectDocument);
}
multi-system/src/main/java/com/gkhy/exam/system/service/StandardizedTemplateService.java
@@ -8,7 +8,7 @@
import com.gkhy.exam.system.domain.StandardizedTemplate;
public interface StandardizedTemplateService extends IService<StandardizedTemplate> {
    CommonPage selectStandardizedTemplateList(Integer companyId,Integer templateType);
    CommonPage selectStandardizedTemplateList(StandardizedTemplate standardizedTemplate);
    CommonResult insertStandardizedTemplate(StandardizedTemplate standardizedTemplate);
multi-system/src/main/java/com/gkhy/exam/system/service/impl/CatalogueServiceImpl.java
@@ -269,7 +269,7 @@
    public CommonResult selectCatalogueDocumentList(CatalogueReq catalogueReq) {
        List<CatalogueVo> catalogueVos = catalogueMapper.selectCatalogueList(catalogueReq);
        for (CatalogueVo catalogueVo : catalogueVos) {
            List<ProjectDocument> projectDocuments = projectDocumentService.selectList(catalogueVo.getCompanyId(), catalogueReq.getItemId(), catalogueVo.getId());
            List<ProjectDocument> projectDocuments = projectDocumentService.selectList(catalogueVo.getCompanyId(), catalogueReq.getItemId(), catalogueVo.getId(),catalogueReq.getType());
            catalogueVo.setProjectDocuments(projectDocuments);
        }
multi-system/src/main/java/com/gkhy/exam/system/service/impl/ProcessInspectionServiceImpl.java
@@ -21,14 +21,14 @@
    private ProcessInspectionMapper processInspectionMapper;
    @Override
    public CommonPage selectProcessInspectionList(Integer companyId, Integer templateType) {
    public CommonPage selectProcessInspectionList(Integer companyId, Integer templateType,Integer itemId) {
        boolean admin = SecurityUtils.adminUser();
        if (!admin){
            if (companyId==null){
                companyId = SecurityUtils.getCompanyId().intValue();
            }
        }
        List<ProcessInspection> processInspections = processInspectionMapper.selectByCompanyidAndTypeList(companyId, templateType);
        List<ProcessInspection> processInspections = processInspectionMapper.selectByCompanyidAndTypeList(companyId, templateType, itemId);
        return CommonPage.restPage(processInspections);
    }
multi-system/src/main/java/com/gkhy/exam/system/service/impl/ProjectDocumentServiceImpl.java
@@ -25,6 +25,7 @@
    public CommonResult insertprojectDocument(CatalogueProjectDocumentReq projectDocument) {
        List<ProjectDocument> projectDocuments = projectDocument.getProjectDocuments();
        for (ProjectDocument document : projectDocuments) {
            document.setDocumentType(projectDocument.getType());
            document.setCompanyId(projectDocument.getCompanyId());
            document.setCatalogueId(projectDocument.getCatalogueId());
            document.setItemId(projectDocument.getItemId());
@@ -34,8 +35,8 @@
    }
    @Override
    public List<ProjectDocument> selectList(Integer companyId, Integer itemId, Integer catalogueId) {
        return projectDocumentMapper.selectDocumentList(companyId,itemId,catalogueId);
    public List<ProjectDocument> selectList(Integer companyId, Integer itemId, Integer catalogueId,Integer documentType) {
        return projectDocumentMapper.selectDocumentList(companyId,itemId,catalogueId,documentType);
    }
    @Override
@@ -50,6 +51,7 @@
        }
        List<ProjectDocument> projectDocuments = projectDocument.getProjectDocuments();
        for (ProjectDocument document : projectDocuments) {
            document.setDocumentType(projectDocument.getType());
            document.setCompanyId(projectDocument.getCompanyId());
            document.setCatalogueId(projectDocument.getCatalogueId());
            document.setItemId(projectDocument.getItemId());
multi-system/src/main/java/com/gkhy/exam/system/service/impl/StandardizedTemplateServiceImpl.java
@@ -49,8 +49,10 @@
    @Autowired
    private CustomerService customerService;
    @Override
    public CommonPage selectStandardizedTemplateList(Integer companyId, Integer templateType) {
    public CommonPage selectStandardizedTemplateList(StandardizedTemplate standardizedTemplate) {
        boolean admin = SecurityUtils.adminUser();
        Integer companyId = standardizedTemplate.getCompanyId();
        Integer templateType = standardizedTemplate.getTemplateType();
        if (!admin){
            if (companyId==null){
                companyId = SecurityUtils.getCompanyId().intValue();
@@ -58,10 +60,11 @@
        }
        PageUtils.startPage();
        List<StandardizedTemplate> standardizedTemplates =new ArrayList<>();
        if (templateType==2 || templateType==10 || templateType == 3){
            standardizedTemplates = standardizedTemplateMapper.selectStandardizedTemplateListV2(companyId, templateType, null);
        //templateType==2 || templateType==10 ||
        if ( templateType == 3){
            standardizedTemplates = standardizedTemplateMapper.selectStandardizedTemplateListV2(standardizedTemplate);
        }else {
            standardizedTemplates = standardizedTemplateMapper.selectStandardizedTemplateList(companyId, templateType);
            standardizedTemplates = standardizedTemplateMapper.selectStandardizedTemplateList(standardizedTemplate);
        }
        return CommonPage.restPage(standardizedTemplates);
@@ -183,7 +186,11 @@
    public CommonResult getStandardizedQualityByCompanyId(Integer companyId) {
        Map<String, Object> map = new HashMap<>();
        //程序文件
        List<StandardizedTemplate> companyIndustryTemplates = standardizedTemplateMapper.selectStandardizedTemplateList(companyId, 4);
        StandardizedTemplate programFile = new StandardizedTemplate();
        programFile.setTemplateType(4);
        programFile.setCompanyId(companyId);
        programFile.setSort(1);
        List<StandardizedTemplate> companyIndustryTemplates = standardizedTemplateMapper.selectStandardizedTemplateList(programFile);
        //职能分配
        List<SysFunctionalDistribution> sysFunctionalDistributions = sysFunctionalDistributionMapper.selectListVo(companyId.longValue());
        //部门
multi-system/src/main/resources/mapper/system/ProjectDocumentMapper.xml
@@ -4,10 +4,10 @@
    <insert id="insertBaths">
        INSERT INTO `project_document`
            (`company_id`, `catalogue_id`, `item_id`, `file_name`, `file_path` )
            (`company_id`, `catalogue_id`, `item_id`, `file_name`, `file_path`,document_type )
        VALUES
            <foreach collection="projectDocuments" separator="," item="item">
                ( #{item.companyId}, #{item.catalogueId}, #{item.itemId}, #{item.fileName}, #{item.filePath} )
                ( #{item.companyId}, #{item.catalogueId}, #{item.itemId}, #{item.fileName}, #{item.filePath}, #{item.documentType} )
            </foreach>
    </insert>
@@ -19,12 +19,14 @@
            `item_id`,
            `file_name`,
            `file_path`,
            `del_flag`
            `del_flag`,
            `document_type`
        FROM
            `project_document`
        where del_flag = 1
        and company_id = #{companyId}
        and catalogue_id = #{catalogueId}
        and item_id = #{itemId}
        and document_type = #{documentType}
    </select>
</mapper>
multi-system/src/main/resources/mapper/system/StandardizedTemplateMapper.xml
@@ -56,7 +56,7 @@
        where id = #{id}
    </update>
    <select id="selectStandardizedTemplateList" resultType="com.gkhy.exam.system.domain.StandardizedTemplate">
    <select id="selectStandardizedTemplateList" resultType="com.gkhy.exam.system.domain.StandardizedTemplate" parameterType="com.gkhy.exam.system.domain.StandardizedTemplate">
        SELECT
            st.`id`,
            st.`company_id`,
@@ -83,12 +83,27 @@
        <if test="companyId!=null and companyId!=''">
            and st.company_id = #{companyId}
        </if>
        ORDER BY
            st.create_time DESC
        <if test="templateName!=null and templateName!=''">
            and st.template_name like concat('%',#{templateName},'%')
        </if>
        <if test="sort!=null and sort==1">
            ORDER BY
            st.template_name asc
        </if>
        <if test="sort!=null and sort==2">
            ORDER BY
            st.template_name desc
        </if>
        <if test="sort ==null or sort== '' or sort == 0">
            ORDER BY
            st.create_time desc
        </if>
    </select>
    <select id="selectStandardizedTemplateListV2" resultType="com.gkhy.exam.system.domain.StandardizedTemplate">
    <select id="selectStandardizedTemplateListV2" resultType="com.gkhy.exam.system.domain.StandardizedTemplate" parameterType="com.gkhy.exam.system.domain.StandardizedTemplate">
        SELECT
        st.`id`,
        st.`company_id`,
@@ -122,8 +137,21 @@
        <if test="industryTypeId!=null ">
            and st.industry_type_id = #{industryTypeId}
        </if>
        ORDER BY
        st.create_time DESC
        <if test="templateName!=null and templateName!=''">
            and st.template_name like concat('%',#{templateName},'%')
        </if>
        <if test="sort!=null and sort==1">
            ORDER BY
            st.template_name asc
        </if>
        <if test="sort!=null and sort==2">
            ORDER BY
            st.template_name desc
        </if>
        <if test="sort ==null or sort== '' or sort == 0">
            ORDER BY
            st.create_time desc
        </if>
    </select>
</mapper>