From 9a10576b8af059905f887d32dddf8943cf01efa8 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Wed, 6 Nov 2024 12:09:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E8=B5=84=E6=A0=91=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bonus/common/biz/domain/TreeSelect.java | 6 ++- .../bonus/material/ma/mapper/TypeMapper.java | 4 +- .../ma/service/impl/TypeServiceImpl.java | 4 +- .../mapper/material/ma/TypeMapper.xml | 44 ++++++++++++++++++- 4 files changed, 51 insertions(+), 7 deletions(-) diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TreeSelect.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TreeSelect.java index 30a74855..f89bc980 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TreeSelect.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TreeSelect.java @@ -30,6 +30,9 @@ public class TreeSelect implements Serializable { /** 公司id */ private String companyId; + /** 仓库id */ + private Long houseId; + /** 子节点集合 */ @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children; @@ -38,9 +41,10 @@ public class TreeSelect implements Serializable { } - public TreeSelect(Long id, String label, Integer level, Long parentId, List children) { + public TreeSelect(Long id, String label, Long houseId, Integer level, Long parentId, List children) { this.id = id; this.label = label; + this.houseId = houseId; this.level = level; this.parentId = parentId; this.children = children; diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java index 508cbed8..ebdcc70d 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java @@ -47,9 +47,9 @@ public interface TypeMapper { /** * 物资类型树形结构 - * @param level 排除层级 + */ - List selectMaTypeTree(@Param("level") Integer level); + List selectMaTypeTree(); /** * 查询物资类型列表 diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java index f835869b..5efa5a31 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java @@ -319,7 +319,7 @@ public class TypeServiceImpl implements ITypeService { @Override public List getMaTypeTree(String typeName, String parentId) { - List maTypes = typeMapper.selectMaTypeTree(TYPE_MIN_LEVEL); + List maTypes = typeMapper.selectMaTypeTree(); List builtMaTypeList = buildMaTypeTree(maTypes); // 查询顶级节点的仓库配置信息 @@ -374,7 +374,7 @@ public class TypeServiceImpl implements ITypeService { .filter(Objects::nonNull) .map(this::convertToTreeSelect) .collect(Collectors.toList()); - return new TreeSelect(type.getTypeId(), type.getTypeName(),Integer.valueOf(type.getLevel()),type.getParentId(), children); + return new TreeSelect(type.getTypeId(), type.getTypeName(), type.getHouseId(), Integer.valueOf(type.getLevel()),type.getParentId(), children); } /** diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml index 03db2353..76a2e965 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml @@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -273,10 +274,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + + + + + +