skyouc
2025-04-10 4523802a2f7037c2133331a504cea171c91ccb88
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package com.vincent.rsf.server.manager.entity;
 
 
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.vincent.rsf.server.manager.service.LocService;
import com.vincent.rsf.server.manager.service.WarehouseService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.vincent.rsf.framework.common.Cools;
import com.vincent.rsf.framework.common.SpringUtils;
import com.vincent.rsf.server.system.service.UserService;
import com.vincent.rsf.server.system.entity.User;
import lombok.experimental.Accessors;
 
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
 
@Data
@Accessors(chain = true)
@TableName("man_loc_type_rela")
public class LocTypeRela implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
 
    /**
     * 库位
     */
    @ApiModelProperty(value= "库位")
    private Long locId;
 
    /**
     * 库位类型
     */
    @ApiModelProperty(value= "库位类型")
    private Long typeId;
 
    public LocTypeRela() {}
 
    public LocTypeRela(Long locId,Long typeId) {
        this.locId = locId;
        this.typeId = typeId;
    }
 
//    /**
//     * @author Ryan
//     * @description 获取库位
//     * @param
//     * @return
//     * @time 2025/3/24 10:28
//     */
//    public String getLocId$() {
//        if (this.warehouseId == null) { return null; }
//        WarehouseService warehouseService = SpringUtils.getBean(WarehouseService.class);
//        Warehouse warehouse = warehouseService.getById(this.warehouseId);
//        if (Objects.isNull(warehouse)) {
//            return null;
//        }
//        return warehouse.getName();
//    }
 
    /**
     * @author Ryan
     * @description 获取库区名称
     * @param
     * @return
     * @time 2025/3/24 10:27
     */
    public String getAreaId$() {
        if (this.locId == null) { return null; }
        LocService locService = SpringUtils.getBean(LocService.class);
        Loc byId = locService.getById(this.locId);
        if (Objects.isNull(byId)) {
            return null;
        }
        return  byId.getCode();
    }
 
 
}