From 256c59555e2a5dffdd6d127a519d4f0944b80e7f Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期三, 14 五月 2025 16:29:38 +0800 Subject: [PATCH] #物料表动态字段搜索 --- rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WarehouseAreas.java | 32 ++++++++++++++++++++++++-------- 1 files changed, 24 insertions(+), 8 deletions(-) diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WarehouseAreas.java b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WarehouseAreas.java index 6efb8c0..37d3cda 100644 --- a/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WarehouseAreas.java +++ b/rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/WarehouseAreas.java @@ -3,13 +3,18 @@ import com.baomidou.mybatisplus.annotation.*; import java.text.SimpleDateFormat; -import java.util.Date; +import java.util.*; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.fasterxml.jackson.annotation.JsonFormat; import com.vincent.rsf.server.manager.service.CompanysService; import com.vincent.rsf.server.manager.service.ShipperService; import com.vincent.rsf.server.manager.service.WarehouseService; +import com.vincent.rsf.server.system.constant.DictTypeCode; +import com.vincent.rsf.server.system.entity.DictData; +import com.vincent.rsf.server.system.service.DictDataService; import io.swagger.annotations.Api; +import org.apache.commons.lang3.StringUtils; import org.springframework.format.annotation.DateTimeFormat; import java.text.SimpleDateFormat; import java.util.Date; @@ -24,7 +29,7 @@ import com.vincent.rsf.server.system.entity.User; import java.io.Serializable; import java.util.Date; -import java.util.Objects; +import java.util.stream.Collectors; @Data @TableName("man_warehouse_areas") @@ -48,7 +53,7 @@ /** * 缂栧彿 */ - @ApiModelProperty(value= "缂栧彿") + @ApiModelProperty(value= "涓氬姟绫诲瀷") private String type; /** @@ -103,7 +108,6 @@ * 鏄惁鍒犻櫎 1: 鏄� 0: 鍚� */ @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄� 0: 鍚� ") - @TableLogic private Integer deleted; /** @@ -122,7 +126,7 @@ * 娣诲姞鏃堕棿 */ @ApiModelProperty(value= "娣诲姞鏃堕棿") - @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date createTime; @@ -136,7 +140,7 @@ * 淇敼鏃堕棿 */ @ApiModelProperty(value= "淇敼鏃堕棿") - @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date updateTime; @@ -156,8 +160,8 @@ public WarehouseAreas() {} - public WarehouseAreas(String uuid,String name,String code,Long shipperId,Short supplierId,Short flagMinus,Short flagLabelMange,Short flagMix,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { - this.type = uuid; + public WarehouseAreas(String type,String name,String code,Long shipperId,Short supplierId,Short flagMinus,Short flagLabelMange,Short flagMix,Integer status,Integer deleted,Integer tenantId,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { + this.type = type; this.name = name; this.code = code; this.shipperId = shipperId; @@ -194,6 +198,18 @@ return null; } + public String getType$() { + if (Cools.isEmpty(this.type)){ + return ""; + } + DictDataService dictDataService = SpringUtils.getBean(DictDataService.class); + DictData dictData = dictDataService.getOne(new LambdaQueryWrapper<DictData>().eq(DictData::getDictTypeCode, DictTypeCode.SYS_WARE_AREAS_TYPE).eq(DictData::getValue, this.type)); + if (Objects.isNull(dictData)) { + return null; + } + return dictData.getLabel(); + } + public String getSupplierId$() { CompanysService service = SpringUtils.getBean(CompanysService.class); Companys supplier = service.getById(this.supplierId); -- Gitblit v1.9.1