From 9bec566884971e1241aaaa61aac5eed8bcfa0dd3 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期一, 21 四月 2025 08:01:57 +0800 Subject: [PATCH] no message --- rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Loc.java | 32 ++++++++++++++++++++++---------- 1 files changed, 22 insertions(+), 10 deletions(-) diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Loc.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Loc.java index 6c4a9ad..8593a26 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Loc.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Loc.java @@ -1,8 +1,10 @@ package com.vincent.rsf.server.manager.entity; import com.baomidou.mybatisplus.annotation.*; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.vincent.rsf.framework.common.Cools; import com.vincent.rsf.framework.common.SpringUtils; +import com.vincent.rsf.server.manager.service.LocTypeService; import com.vincent.rsf.server.manager.service.WarehouseAreasService; import com.vincent.rsf.server.manager.service.WarehouseService; import com.vincent.rsf.server.system.entity.User; @@ -10,11 +12,15 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.experimental.Accessors; +import org.apache.commons.lang3.StringUtils; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.text.SimpleDateFormat; +import java.util.Arrays; import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; @Data @Accessors(chain = true) @@ -54,6 +60,10 @@ @ApiModelProperty(value= "搴撲綅绫诲瀷(*) H: 楂樺簱浣� M: 涓簱浣� L: 浣庡簱浣� ") @TableField("`type`") private String type; + + @ApiModelProperty("搴撲綅绫诲瀷(*)[man_loc_type]") + @TableField(exist = false) + private List<Long> typeIds; /** * 铏氭嫙搴撲綅 @@ -270,18 +280,20 @@ // null // 澶囨敞 // ); - public String getType$(){ + public String getTypeIds$(){ if (null == this.type){ return null; } - switch (this.type){ - case "H": - return " 楂樺簱浣�"; - case "M": - return " 涓簱浣�"; - case "L": - return " 浣庡簱浣�"; - default: - return String.valueOf(this.type); + String[] split = this.type.split(","); + List<String> asList = Arrays.asList(split); + if (asList.isEmpty()) { + return null; } + LocTypeService locTypeService = SpringUtils.getBean(LocTypeService.class); + List<LocType> locTypes = locTypeService.list(new LambdaQueryWrapper<LocType>().in(LocType::getId, asList)); + if (locTypes.isEmpty()) { + return null; + } + List<String> strings = locTypes.stream().map(LocType::getName).collect(Collectors.toList()); + return StringUtils.join(strings, ","); } public String getUseStatus$(){ -- Gitblit v1.9.1