李林
2024-03-05 a1966e119c4d249f0a1051951ff2904b19198218
inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardMethodListServiceImpl.java
@@ -1,5 +1,6 @@
package com.yuanchu.mom.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanchu.mom.pojo.StandardMethodList;
import com.yuanchu.mom.service.StandardMethodListService;
@@ -7,6 +8,7 @@
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
@@ -38,6 +40,30 @@
        }catch (Exception e){}
        return standardMethodListMapper.insert(list);
    }
    @Override
    public List<StandardMethodList> selectsStandardMethodByFLSSM(String tree) {
        String[] trees = tree.split(" - ");
        List<StandardMethodList> standardMethodLists = null;
        switch (trees.length){
            case 5:
                standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],trees[2],trees[3],trees[4]);
                break;
            case 4:
                standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],trees[2],trees[3],null);
                break;
            case 3:
                standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],trees[2],null,null);
                break;
            case 2:
                standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],trees[1],null,null,null);
                break;
            case 1:
                standardMethodLists = standardMethodListMapper.selectStandardMethodLists(trees[0],null,null,null,null);
                break;
        }
        return standardMethodLists;
    }
}