qushaowei
2023-08-19 3e79a609f2b7a46dae5085ca5050acb88fc6f0af
单位 供应商修改
已修改5个文件
467 ■■■■ 文件已修改
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/base/controller/UnitCategoryController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/base/controller/UnitController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/base/service/IUnitCategoryService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/base/service/impl/SupplierCategoryServiceImpl.java 426 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/base/service/impl/UnitCategoryServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/base/controller/UnitCategoryController.java
@@ -34,6 +34,15 @@
    @GetMapping(value="/getTree")
    public Result<List<UnitCategory>> getTreeList(){
        Result<List<UnitCategory>> resule = new Result<>();
        List<UnitCategory> list = unitCategoryService.lambdaQuery().eq(UnitCategory::getPid, "-1").list();
        if(list.size() == 0){
            UnitCategory unitCategory = new UnitCategory();
            unitCategory.setPid("-1");
            unitCategory.setCode("0");
            unitCategory.setId("0");
            unitCategory.setName("计量单位分类");
            unitCategoryService.save(unitCategory);
        }
        List<UnitCategory> treeList = unitCategoryService.getTreeList();
        resule.setResult(treeList);
        return  resule;
@@ -63,6 +72,15 @@
        Result<List<UnitCategory>> resule = new Result<>();
        //id前端传空字符串时,查询pid为-1的数据返回
        if (id == "") {
            List<UnitCategory> list = unitCategoryService.lambdaQuery().eq(UnitCategory::getPid, "-1").list();
            if(list.size() == 0){
                UnitCategory unitCategory = new UnitCategory();
                unitCategory.setPid("-1");
                unitCategory.setCode("0");
                unitCategory.setId("0");
                unitCategory.setName("计量单位分类");
                unitCategoryService.save(unitCategory);
            }
            LambdaQueryWrapper<UnitCategory> queryWrapper = new LambdaQueryWrapper<>();
            queryWrapper.eq(UnitCategory::getPid,"-1");
            List<UnitCategory> treeList = unitCategoryService.getList(unitCategoryService.getOne(queryWrapper).getId());
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/base/controller/UnitController.java
@@ -53,6 +53,7 @@
    public Result<Unit> addMomUnit(@RequestBody Unit momUnit){
        Result<Unit> result = new Result<>();
        try{
            momUnit.setDelFlag("0");
            momUnitService.saveOrUpdate(momUnit);
            result.success("操作成功");
        }catch (Exception e){
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/base/service/IUnitCategoryService.java
@@ -12,6 +12,8 @@
     */
    List<UnitCategory> getTreeList();
    public void initFristUnitCategory();
    /**
     * 查询计量单位树形列表
     * @return
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/base/service/impl/SupplierCategoryServiceImpl.java
@@ -21,226 +21,226 @@
 */
@Service
public class SupplierCategoryServiceImpl extends ServiceImpl<SupplierCategoryMapper, SupplierCategory> implements ISupplierCategoryService {
    @Override
//    @Override
//    public List<CommonGenericTree> loadTree() {
//        List<SupplierCategory> supplierCategoryList = this.lambdaQuery().eq(SupplierCategory::getDelFlag, "0").list();
//        List<CommonGenericTree> commonGenericTrees = buildTree(supplierCategoryList, "-1");
//        return commonGenericTrees;
//    }
//    private List<CommonGenericTree> buildTree(List<SupplierCategory> supplierCategoryList, String parentId) {
//        List<CommonGenericTree> treeNodes = new ArrayList<>();
//        for (SupplierCategory supplierCategory : supplierCategoryList) {
//            if (supplierCategory.getParentId().equals(parentId)) {
//                CommonGenericTree<SupplierCategory> treeNode = new CommonGenericTree<>();
//                treeNode.setKey(supplierCategory.getId());
//                treeNode.setValue(supplierCategory.getId());
//                treeNode.setTitle(supplierCategory.getNum() + "/" + supplierCategory.getName());
//                treeNode.setRField1(supplierCategory.getNum());
//                treeNode.setRField2(supplierCategory.getName());
//                treeNode.setDisabled(false);
//                treeNode.setEntity(supplierCategory);
//                List<CommonGenericTree> children = buildTree(supplierCategoryList, supplierCategory.getId());
//                if (!children.isEmpty()) {
//                    treeNode.setChildren(children);
//                }
//                treeNodes.add(treeNode);
//            }
//        }
//        return treeNodes;
//    }
        @Override
    public List<CommonGenericTree> loadTree() {
        List<SupplierCategory> supplierCategoryList = this.lambdaQuery().eq(SupplierCategory::getDelFlag, "0").list();
        List<CommonGenericTree> commonGenericTrees = buildTree(supplierCategoryList, "-1");
        List<CommonGenericTree> commonGenericTrees = loadTree(supplierCategoryList);
        return commonGenericTrees;
    }
    private List<CommonGenericTree> buildTree(List<SupplierCategory> supplierCategoryList, String parentId) {
        List<CommonGenericTree> treeNodes = new ArrayList<>();
        for (SupplierCategory supplierCategory : supplierCategoryList) {
            if (supplierCategory.getParentId().equals(parentId)) {
                CommonGenericTree<SupplierCategory> treeNode = new CommonGenericTree<>();
                treeNode.setKey(supplierCategory.getId());
                treeNode.setValue(supplierCategory.getId());
                treeNode.setTitle(supplierCategory.getNum() + "/" + supplierCategory.getName());
                treeNode.setRField1(supplierCategory.getNum());
                treeNode.setRField2(supplierCategory.getName());
                treeNode.setDisabled(false);
                treeNode.setEntity(supplierCategory);
                List<CommonGenericTree> children = buildTree(supplierCategoryList, supplierCategory.getId());
                if (!children.isEmpty()) {
                    treeNode.setChildren(children);
    @SuppressWarnings("unchecked")
    public List<CommonGenericTree> loadTree(List<SupplierCategory> supplierCategoryList) {
        @SuppressWarnings("unused")
        SupplierCategory supplierCategory = new SupplierCategory();
        List<CommonGenericTree> list = new ArrayList<>();
        Map<String, CommonGenericTree> map = new HashMap<>();
        Map<String, CommonGenericTree> map2 = new HashMap<>();
        Map<String, CommonGenericTree> map3 = new HashMap<>();
        Map<String, CommonGenericTree> map4 = new HashMap<>();
        Map<String, CommonGenericTree> map5 = new HashMap<>();
        Map<String, CommonGenericTree> map6 = new HashMap<>();
        Map<String, CommonGenericTree> map7 = new HashMap<>();
        CommonGenericTree<SupplierCategory> node = new CommonGenericTree<>();
        node.setKey("-1");
        node.setValue("-1");
        node.setTitle("供应商分类");
        node.setRField1("");
        node.setRField2("");
        node.setDisabled(false);
        node.setEntity(new SupplierCategory());
        list.add(node);
        if (CollectionUtils.isNotEmpty(list)) {
            CommonGenericTree<SupplierCategory> pcNode;
            for (SupplierCategory projectType : supplierCategoryList) {
                if (projectType.getParentId().equals("-1")) {
                    pcNode = new CommonGenericTree<>();
                    pcNode.setKey(projectType.getId());
                    pcNode.setTitle(projectType.getNum() + "/" + projectType.getName());
                    pcNode.setParentId(node.getKey());
                    pcNode.setIcon("");
                    pcNode.setType(0);
                    pcNode.setValue(projectType.getId());
                    pcNode.setDisabled(false);
                    pcNode.setRField1(projectType.getNum());
                    pcNode.setRField2(projectType.getName());
                    pcNode.setEntity(projectType);
                    node.addChildren(pcNode);
                    map.put(projectType.getId(), pcNode);
                }
                treeNodes.add(treeNode);
            }
            CommonGenericTree<SupplierCategory> childNode;
            for (SupplierCategory projectType : supplierCategoryList) {
                if (map.containsKey(projectType.getParentId())) {
                    pcNode = map.get(projectType.getParentId());
                    childNode = new CommonGenericTree<>();
                    childNode.setKey(projectType.getId());
                    childNode.setTitle(projectType.getNum() + "/" + projectType.getName());
                    childNode.setParentId(projectType.getParentId());
                    childNode.setIcon("");
                    childNode.setType(0);
                    childNode.setValue(projectType.getId());
                    childNode.setDisabled(false);
                    childNode.setRField1(projectType.getNum());
                    childNode.setRField2(projectType.getName());
                    childNode.setEntity(projectType);
                    pcNode.addChildren(childNode);
                    map2.put(projectType.getId(), childNode);
                }
            }
            if (map2.size() > 0) {
                CommonGenericTree<SupplierCategory> child2Node;
                for (SupplierCategory projectType : supplierCategoryList) {
                    if (map2.containsKey(projectType.getParentId())) {
                        pcNode = map2.get(projectType.getParentId());
                        child2Node = new CommonGenericTree<>();
                        child2Node.setKey(projectType.getId());
                        child2Node.setTitle(projectType.getNum() + "/" + projectType.getName());
                        child2Node.setParentId(projectType.getParentId());
                        child2Node.setIcon("");
                        child2Node.setType(0);
                        child2Node.setValue(projectType.getId());
                        child2Node.setDisabled(false);
                        child2Node.setRField1(projectType.getNum());
                        child2Node.setRField2(projectType.getName());
                        child2Node.setEntity(projectType);
                        pcNode.addChildren(child2Node);
                        map3.put(projectType.getId(), child2Node);
                    }
                }
                if (map3.size() > 0) {
                    CommonGenericTree<SupplierCategory> child3Node;
                    for (SupplierCategory projectType : supplierCategoryList) {
                        if (map3.containsKey(projectType.getParentId())) {
                            pcNode = map3.get(projectType.getParentId());
                            child3Node = new CommonGenericTree<>();
                            child3Node.setKey(projectType.getId());
                            child3Node.setTitle(projectType.getNum() + "/" + projectType.getName());
                            child3Node.setParentId(projectType.getParentId());
                            child3Node.setIcon("");
                            child3Node.setType(0);
                            child3Node.setValue(projectType.getId());
                            child3Node.setDisabled(false);
                            child3Node.setRField1(projectType.getNum());
                            child3Node.setRField2(projectType.getName());
                            child3Node.setEntity(projectType);
                            pcNode.addChildren(child3Node);
                            map4.put(projectType.getId(), child3Node);
                        }
                    }
                    if (map4.size() > 0) {
                        CommonGenericTree<SupplierCategory> child4Node;
                        for (SupplierCategory projectType : supplierCategoryList) {
                            if (map4.containsKey(projectType.getParentId())) {
                                pcNode = map4.get(projectType.getParentId());
                                child4Node = new CommonGenericTree<>();
                                child4Node.setKey(projectType.getId());
                                child4Node.setTitle(projectType.getNum() + "/" + projectType.getName());
                                child4Node.setParentId(projectType.getParentId());
                                child4Node.setIcon("");
                                child4Node.setType(0);
                                child4Node.setValue(projectType.getId());
                                child4Node.setDisabled(false);
                                child4Node.setRField1(projectType.getNum());
                                child4Node.setRField2(projectType.getName());
                                child4Node.setEntity(projectType);
                                pcNode.addChildren(child4Node);
                                map5.put(projectType.getId(), child4Node);
                            }
                        }
                        if (map5.size() > 0) {
                            CommonGenericTree<SupplierCategory> child5Node;
                            for (SupplierCategory projectType : supplierCategoryList) {
                                if (map5.containsKey(projectType.getParentId())) {
                                    pcNode = map5.get(projectType.getParentId());
                                    child5Node = new CommonGenericTree<>();
                                    child5Node.setKey(projectType.getId());
                                    child5Node.setTitle(projectType.getNum() + "/" + projectType.getName());
                                    child5Node.setParentId(projectType.getParentId());
                                    child5Node.setIcon("");
                                    child5Node.setType(0);
                                    child5Node.setValue(projectType.getId());
                                    child5Node.setDisabled(false);
                                    child5Node.setRField1(projectType.getNum());
                                    child5Node.setRField2(projectType.getName());
                                    child5Node.setEntity(projectType);
                                    pcNode.addChildren(child5Node);
                                    map6.put(projectType.getId(), child5Node);
                                }
                            }
                            if (map6.size() > 0) {
                                CommonGenericTree<SupplierCategory> child6Node;
                                for (SupplierCategory projectType : supplierCategoryList) {
                                    if (map6.containsKey(projectType.getParentId())) {
                                        pcNode = map6.get(projectType.getParentId());
                                        child6Node = new CommonGenericTree<>();
                                        child6Node.setKey(projectType.getId());
                                        child6Node.setTitle(projectType.getNum() + "/" + projectType.getName());
                                        child6Node.setParentId(projectType.getParentId());
                                        child6Node.setIcon("");
                                        child6Node.setType(0);
                                        child6Node.setValue(projectType.getId());
                                        child6Node.setDisabled(false);
                                        child6Node.setRField1(projectType.getNum());
                                        child6Node.setRField2(projectType.getName());
                                        child6Node.setEntity(projectType);
                                        pcNode.addChildren(child6Node);
                                        map7.put(projectType.getId(), child6Node);
                                    }
                                }
                                if (map7.size() > 0) {
                                    CommonGenericTree<SupplierCategory> child7Node;
                                    for (SupplierCategory projectType : supplierCategoryList) {
                                        if (map.containsKey(projectType.getParentId())) {
                                            pcNode = map7.get(projectType.getParentId());
                                            child7Node = new CommonGenericTree<>();
                                            child7Node.setKey(projectType.getId());
                                            child7Node.setTitle(projectType.getNum() + "/" + projectType.getName());
                                            child7Node.setParentId(projectType.getParentId());
                                            child7Node.setIcon("");
                                            child7Node.setType(0);
                                            child7Node.setValue(projectType.getId());
                                            child7Node.setDisabled(false);
                                            child7Node.setRField1(projectType.getNum());
                                            child7Node.setRField2(projectType.getName());
                                            child7Node.setEntity(projectType);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return treeNodes;
        return list;
    }
    //    @Override
//    public List<CommonGenericTree> loadTree() {
//        List<SupplierCategory> supplierCategoryList = this.lambdaQuery().eq(SupplierCategory::getDelFlag, "0").list();
//        List<CommonGenericTree> commonGenericTrees = loadTree(supplierCategoryList);
//        return commonGenericTrees;
//    }
//
//    @SuppressWarnings("unchecked")
//    public List<CommonGenericTree> loadTree(List<SupplierCategory> supplierCategoryList) {
//        @SuppressWarnings("unused")
//        SupplierCategory supplierCategory = new SupplierCategory();
//        List<CommonGenericTree> list = new ArrayList<>();
//        Map<String, CommonGenericTree> map = new HashMap<>();
//        Map<String, CommonGenericTree> map2 = new HashMap<>();
//        Map<String, CommonGenericTree> map3 = new HashMap<>();
//        Map<String, CommonGenericTree> map4 = new HashMap<>();
//        Map<String, CommonGenericTree> map5 = new HashMap<>();
//        Map<String, CommonGenericTree> map6 = new HashMap<>();
//        Map<String, CommonGenericTree> map7 = new HashMap<>();
//        CommonGenericTree<SupplierCategory> node = new CommonGenericTree<>();
//        node.setKey("-1");
//        node.setValue("-1");
//        node.setTitle("供应商分类");
//        node.setRField1("");
//        node.setRField2("");
//        node.setDisabled(false);
//        node.setEntity(new SupplierCategory());
//        list.add(node);
//        if (CollectionUtils.isNotEmpty(list)) {
//            CommonGenericTree<SupplierCategory> pcNode;
//            for (SupplierCategory projectType : supplierCategoryList) {
//                if (projectType.getParentId().equals("-1")) {
//                    pcNode = new CommonGenericTree<>();
//                    pcNode.setKey(projectType.getId());
//                    pcNode.setTitle(projectType.getNum() + "/" + projectType.getName());
//                    pcNode.setParentId(node.getKey());
//                    pcNode.setIcon("");
//                    pcNode.setType(0);
//                    pcNode.setValue(projectType.getId());
//                    pcNode.setDisabled(false);
//                    pcNode.setRField1(projectType.getNum());
//                    pcNode.setRField2(projectType.getName());
//                    pcNode.setEntity(projectType);
//                    node.addChildren(pcNode);
//                    map.put(projectType.getId(), pcNode);
//                }
//            }
//            CommonGenericTree<SupplierCategory> childNode;
//            for (SupplierCategory projectType : supplierCategoryList) {
//                if (map.containsKey(projectType.getParentId())) {
//                    pcNode = map.get(projectType.getParentId());
//                    childNode = new CommonGenericTree<>();
//                    childNode.setKey(projectType.getId());
//                    childNode.setTitle(projectType.getNum() + "/" + projectType.getName());
//                    childNode.setParentId(projectType.getParentId());
//                    childNode.setIcon("");
//                    childNode.setType(0);
//                    childNode.setValue(projectType.getId());
//                    childNode.setDisabled(false);
//                    childNode.setRField1(projectType.getNum());
//                    childNode.setRField2(projectType.getName());
//                    childNode.setEntity(projectType);
//                    pcNode.addChildren(childNode);
//                    map2.put(projectType.getId(), childNode);
//                }
//            }
//            if (map2.size() > 0) {
//                CommonGenericTree<SupplierCategory> child2Node;
//                for (SupplierCategory projectType : supplierCategoryList) {
//                    if (map2.containsKey(projectType.getParentId())) {
//                        pcNode = map2.get(projectType.getParentId());
//                        child2Node = new CommonGenericTree<>();
//                        child2Node.setKey(projectType.getId());
//                        child2Node.setTitle(projectType.getNum() + "/" + projectType.getName());
//                        child2Node.setParentId(projectType.getParentId());
//                        child2Node.setIcon("");
//                        child2Node.setType(0);
//                        child2Node.setValue(projectType.getId());
//                        child2Node.setDisabled(false);
//                        child2Node.setRField1(projectType.getNum());
//                        child2Node.setRField2(projectType.getName());
//                        child2Node.setEntity(projectType);
//                        pcNode.addChildren(child2Node);
//                        map3.put(projectType.getId(), child2Node);
//                    }
//                }
//                if (map3.size() > 0) {
//                    CommonGenericTree<SupplierCategory> child3Node;
//                    for (SupplierCategory projectType : supplierCategoryList) {
//                        if (map3.containsKey(projectType.getParentId())) {
//                            pcNode = map3.get(projectType.getParentId());
//                            child3Node = new CommonGenericTree<>();
//                            child3Node.setKey(projectType.getId());
//                            child3Node.setTitle(projectType.getNum() + "/" + projectType.getName());
//                            child3Node.setParentId(projectType.getParentId());
//                            child3Node.setIcon("");
//                            child3Node.setType(0);
//                            child3Node.setValue(projectType.getId());
//                            child3Node.setDisabled(false);
//                            child3Node.setRField1(projectType.getNum());
//                            child3Node.setRField2(projectType.getName());
//                            child3Node.setEntity(projectType);
//                            pcNode.addChildren(child3Node);
//                            map4.put(projectType.getId(), child3Node);
//                        }
//                    }
//                    if (map4.size() > 0) {
//                        CommonGenericTree<SupplierCategory> child4Node;
//                        for (SupplierCategory projectType : supplierCategoryList) {
//                            if (map4.containsKey(projectType.getParentId())) {
//                                pcNode = map4.get(projectType.getParentId());
//                                child4Node = new CommonGenericTree<>();
//                                child4Node.setKey(projectType.getId());
//                                child4Node.setTitle(projectType.getNum() + "/" + projectType.getName());
//                                child4Node.setParentId(projectType.getParentId());
//                                child4Node.setIcon("");
//                                child4Node.setType(0);
//                                child4Node.setValue(projectType.getId());
//                                child4Node.setDisabled(false);
//                                child4Node.setRField1(projectType.getNum());
//                                child4Node.setRField2(projectType.getName());
//                                child4Node.setEntity(projectType);
//                                pcNode.addChildren(child4Node);
//                                map5.put(projectType.getId(), child4Node);
//                            }
//                        }
//                        if (map5.size() > 0) {
//                            CommonGenericTree<SupplierCategory> child5Node;
//                            for (SupplierCategory projectType : supplierCategoryList) {
//                                if (map5.containsKey(projectType.getParentId())) {
//                                    pcNode = map5.get(projectType.getParentId());
//                                    child5Node = new CommonGenericTree<>();
//                                    child5Node.setKey(projectType.getId());
//                                    child5Node.setTitle(projectType.getNum() + "/" + projectType.getName());
//                                    child5Node.setParentId(projectType.getParentId());
//                                    child5Node.setIcon("");
//                                    child5Node.setType(0);
//                                    child5Node.setValue(projectType.getId());
//                                    child5Node.setDisabled(false);
//                                    child5Node.setRField1(projectType.getNum());
//                                    child5Node.setRField2(projectType.getName());
//                                    child5Node.setEntity(projectType);
//                                    pcNode.addChildren(child5Node);
//                                    map6.put(projectType.getId(), child5Node);
//                                }
//                            }
//                            if (map6.size() > 0) {
//                                CommonGenericTree<SupplierCategory> child6Node;
//                                for (SupplierCategory projectType : supplierCategoryList) {
//                                    if (map6.containsKey(projectType.getParentId())) {
//                                        pcNode = map6.get(projectType.getParentId());
//                                        child6Node = new CommonGenericTree<>();
//                                        child6Node.setKey(projectType.getId());
//                                        child6Node.setTitle(projectType.getNum() + "/" + projectType.getName());
//                                        child6Node.setParentId(projectType.getParentId());
//                                        child6Node.setIcon("");
//                                        child6Node.setType(0);
//                                        child6Node.setValue(projectType.getId());
//                                        child6Node.setDisabled(false);
//                                        child6Node.setRField1(projectType.getNum());
//                                        child6Node.setRField2(projectType.getName());
//                                        child6Node.setEntity(projectType);
//                                        pcNode.addChildren(child6Node);
//                                        map7.put(projectType.getId(), child6Node);
//                                    }
//                                }
//                                if (map7.size() > 0) {
//                                    CommonGenericTree<SupplierCategory> child7Node;
//                                    for (SupplierCategory projectType : supplierCategoryList) {
//                                        if (map.containsKey(projectType.getParentId())) {
//                                            pcNode = map7.get(projectType.getParentId());
//                                            child7Node = new CommonGenericTree<>();
//                                            child7Node.setKey(projectType.getId());
//                                            child7Node.setTitle(projectType.getNum() + "/" + projectType.getName());
//                                            child7Node.setParentId(projectType.getParentId());
//                                            child7Node.setIcon("");
//                                            child7Node.setType(0);
//                                            child7Node.setValue(projectType.getId());
//                                            child7Node.setDisabled(false);
//                                            child7Node.setRField1(projectType.getNum());
//                                            child7Node.setRField2(projectType.getName());
//                                            child7Node.setEntity(projectType);
//
//                                        }
//                                    }
//                                }
//                            }
//                        }
//                    }
//                }
//            }
//        }
//        return list;
//    }
}
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/base/service/impl/UnitCategoryServiceImpl.java
@@ -1,6 +1,7 @@
package org.jeecg.modules.base.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.base.entity.Unit;
import org.jeecg.modules.base.entity.UnitCategory;
@@ -22,6 +23,8 @@
    @Resource
    private UnitMapper unitMapper;
    // 初始化工装类别
//    private static final String initUnitCategory = "计量单位分类";
    /**
     * 查询计量单位分类树
     * @return
@@ -47,6 +50,23 @@
        return treeList;
    }
    @Override
    public void initFristUnitCategory() {
        UnitCategory unitCategory;
        List<UnitCategory> unitCategoryList = super.lambdaQuery()
                .eq(UnitCategory::getName, "计量单位分类")
                .eq(UnitCategory::getDelFlag, "0").list();
        if (unitCategoryList.size() == 0) {
            unitCategory = new UnitCategory();
            unitCategory.setCode("0");
//            unitCategory.setId("-1");
            unitCategory.setCodeName("计量单位分类");
            unitCategory.setPid("-1");
            super.save(unitCategory);
        }
    }
    /**
     * 查询计量单位树
     * @return