heheng
2025-11-19 735d0737c850cb4385d99fb18f485a5e6c7efbb4
功能修改
已修改5个文件
63 ■■■■■ 文件已修改
multi-system/src/main/java/com/gkhy/exam/system/domain/ProductItem.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/domain/StandardizedTemplate.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/mapper/StandardizedTemplateMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/service/impl/StandardizedTemplateServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/resources/mapper/system/StandardizedTemplateMapper.xml 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/domain/ProductItem.java
@@ -47,7 +47,7 @@
    @TableField("erdact")
    private String erdact;
    @ApiModelProperty(value = "数据类型  1产品    2项目")
    @ApiModelProperty(value = "数据类型  1产品  2项目 3生产")
    @TableField("type")
    private Integer type;
multi-system/src/main/java/com/gkhy/exam/system/domain/StandardizedTemplate.java
@@ -54,6 +54,13 @@
    @TableField(exist = false)
    private String deptName;
    @ApiModelProperty(value = "行业类型")
    @TableField("industry_type_id")
    private Integer industryTypeId;
    @TableField(exist = false)
    private String industryTypeName;
    @ApiModelProperty(value = "文件路径")
    @TableField("file_path")
    @NotBlank(message = "文件路径不可为空")
multi-system/src/main/java/com/gkhy/exam/system/mapper/StandardizedTemplateMapper.java
@@ -11,5 +11,7 @@
public interface StandardizedTemplateMapper extends BaseMapper<StandardizedTemplate> {
    List<StandardizedTemplate> selectStandardizedTemplateList(Integer companyId, Integer templateType);
    List<StandardizedTemplate> selectStandardizedTemplateListV2(Integer companyId, Integer templateType, Integer industryTypeId);
    int updateStandardizedTemplateById(StandardizedTemplate template);
}
multi-system/src/main/java/com/gkhy/exam/system/service/impl/StandardizedTemplateServiceImpl.java
@@ -19,6 +19,7 @@
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -56,8 +57,14 @@
            }
        }
        PageUtils.startPage();
        List<StandardizedTemplate> companyIndustryTemplates = standardizedTemplateMapper.selectStandardizedTemplateList(companyId, templateType);
        return CommonPage.restPage(companyIndustryTemplates);
        List<StandardizedTemplate> standardizedTemplates =new ArrayList<>();
        if (templateType==2){
            standardizedTemplates = standardizedTemplateMapper.selectStandardizedTemplateListV2(companyId, templateType, null);
        }else {
            standardizedTemplates = standardizedTemplateMapper.selectStandardizedTemplateList(companyId, templateType);
        }
        return CommonPage.restPage(standardizedTemplates);
    }
    @Override
multi-system/src/main/resources/mapper/system/StandardizedTemplateMapper.xml
@@ -25,6 +25,9 @@
            <if test="classify !=null">
                classify = #{classify},
            </if>
            <if test="industryTypeId !=null">
                industry_type_id = #{industryTypeId},
            </if>
            <if test="deptId !=null">
                dept_id = #{deptId},
            </if>
@@ -76,4 +79,42 @@
        ORDER BY
            st.create_time DESC
    </select>
    <select id="selectStandardizedTemplateListV2" resultType="com.gkhy.exam.system.domain.StandardizedTemplate">
        SELECT
        st.`id`,
        st.`company_id`,
        st.`company_name`,
        st.`template_name`,
        st. `template_type`,
        st. `file_path`,
        st. `format`,
        st. `classify`,
        st. `dept_id`,
        sd.`dept_name`,
        st. `del_flag`,
        st. `create_by`,
        st. `create_time`,
        st. `update_by`,
        st. `update_time`,
        st.industry_type_id,
        cit.`name` as industryTypeName
        FROM
        standardized_template st
        left join  sys_dept sd on st.dept_id =sd.dept_id
        left join  company_industry_type cit on cit.id =st.industry_type_id
        WHERE
        st.del_flag = 0 and st.template_type = #{templateType}
        <if test="companyId!=null and companyId!=''">
            and st.company_id = #{companyId}
        </if>
        <if test="industryTypeId!=null ">
            and st.industry_type_id = #{industryTypeId}
        </if>
        ORDER BY
        st.create_time DESC
    </select>
</mapper>