吴羡
2026-10-21 3dc60e9745df6c6dc450b2091263791b3e80958c
feat: 标准维护支持按标准分类筛选

- 列表接口新增 industryId 参数,通过标准-分类关联表过滤
已修改3个文件
16 ■■■■■ 文件已修改
basic-server/src/main/java/com/ruoyi/basic/controller/StandardMethodController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/java/com/ruoyi/basic/service/StandardMethodService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardMethodServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/java/com/ruoyi/basic/controller/StandardMethodController.java
@@ -22,8 +22,9 @@
    @Operation(summary = "获取标准方法列表")
    @GetMapping("/selectStandardMethodList")
    public Result selectStandardMethodList(Page page,StandardMethod standardMethod)  {
        return Result.success(standardMethodService.selectStandardMethodList(page, standardMethod));
    public Result selectStandardMethodList(Page page, StandardMethod standardMethod,
                                           @RequestParam(value = "industryId", required = false) Integer industryId) {
        return Result.success(standardMethodService.selectStandardMethodList(page, standardMethod, industryId));
    }
    @Operation(summary = "获取标准方法枚举")
basic-server/src/main/java/com/ruoyi/basic/service/StandardMethodService.java
@@ -20,7 +20,7 @@
*/
public interface StandardMethodService extends IService<StandardMethod> {
    IPage<StandardMethod> selectStandardMethodList(Page page, StandardMethod standardMethod);
    IPage<StandardMethod> selectStandardMethodList(Page page, StandardMethod standardMethod, Integer industryId);
    List<StandardMethod> selectStandardMethods();
basic-server/src/main/java/com/ruoyi/basic/service/impl/StandardMethodServiceImpl.java
@@ -2,6 +2,7 @@
import cn.hutool.json.JSONUtil;
import cn.hutool.poi.excel.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -105,8 +106,12 @@
    }
    @Override
    public IPage<StandardMethod> selectStandardMethodList(Page page, StandardMethod standardMethod) {
        IPage<StandardMethod> result = standardMethodMapper.selectStandardMethodList(page, QueryWrappers.queryWrappers(standardMethod));
    public IPage<StandardMethod> selectStandardMethodList(Page page, StandardMethod standardMethod, Integer industryId) {
        QueryWrapper<StandardMethod> wrapper = QueryWrappers.queryWrappers(standardMethod);
        if (industryId != null) {
            wrapper.exists("select 1 from standard_method_industry smi where smi.standard_method_id = a.id and smi.industry_id = {0}", industryId);
        }
        IPage<StandardMethod> result = standardMethodMapper.selectStandardMethodList(page, wrapper);
        for (StandardMethod method : result.getRecords()) {
            method.setIndustryIds(selectIndustryIds(method.getId()));
        }