From c46d1d8c3b9875f051a6ec3c4a1d3fa7bd32e5db Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期四, 15 五月 2025 17:15:21 +0800 Subject: [PATCH] 新增库存管理 新增库存明细 --- rsf-server/src/main/java/com/vincent/rsf/server/manager/entity/Loc.java | 65 ++++++++++++++++++++++++++------ 1 files changed, 53 insertions(+), 12 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 8781760..59ad309 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,18 +1,27 @@ package com.vincent.rsf.server.manager.entity; import com.baomidou.mybatisplus.annotation.*; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.fasterxml.jackson.annotation.JsonFormat; 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; import com.vincent.rsf.server.system.service.UserService; 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) @@ -52,6 +61,10 @@ @ApiModelProperty(value= "搴撲綅绫诲瀷(*) H: 楂樺簱浣� M: 涓簱浣� L: 浣庡簱浣� ") @TableField("`type`") private String type; + + @ApiModelProperty("搴撲綅绫诲瀷(*)[man_loc_type]") + @TableField(exist = false) + private List<Long> typeIds; /** * 铏氭嫙搴撲綅 @@ -95,13 +108,18 @@ */ @ApiModelProperty(value= "瀹�") private Double width; - /** * 鎺� */ @ApiModelProperty(value= "鎺�") @TableField("`row`") private Integer row; + + /** + * 璁惧鍙� + */ + @ApiModelProperty(value= "璁惧鍙�") + private Integer deviceNo; /** * 鍒� @@ -163,7 +181,6 @@ * 鏄惁鍒犻櫎 1: 鏄� 0: 鍚� */ @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄� 0: 鍚� ") - @TableLogic private Integer deleted; /** @@ -183,6 +200,7 @@ */ @ApiModelProperty(value= "娣诲姞鏃堕棿") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date createTime; /** @@ -196,6 +214,7 @@ */ @ApiModelProperty(value= "淇敼鏃堕棿") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date updateTime; /** @@ -268,18 +287,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$(){ @@ -302,6 +323,26 @@ } } + public String getWarehouseId$(){ + if (null == this.warehouseId){ return null; } + WarehouseService service = SpringUtils.getBean(WarehouseService.class); + Warehouse warehouse = service.getById(this.warehouseId); + if (!Cools.isEmpty(warehouse)){ + return String.valueOf(warehouse.getName()); + } + return null; + } + + public String getAreaId$(){ + if (null == this.areaId){ return null; } + WarehouseAreasService service = SpringUtils.getBean(WarehouseAreasService.class); + WarehouseAreas warehouseAreas = service.getById(this.areaId); + if (!Cools.isEmpty(warehouseAreas)){ + return String.valueOf(warehouseAreas.getName()); + } + return null; + } + public String getStatus$(){ if (null == this.status){ return null; } switch (this.status){ -- Gitblit v1.9.1