自动化立体仓库 - WMS系统
zhou zhou
2025-12-18 d131336c24611d905940c19b8a3f69873ffe9c79
src/main/java/com/zy/system/entity/User.java
@@ -6,6 +6,8 @@
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.asrs.entity.Department;
import com.zy.asrs.service.DepartmentService;
import com.zy.system.service.HostService;
import com.zy.system.service.RoleService;
@@ -31,7 +33,6 @@
     */
    @TableField("host_id")
    private Long hostId;
    /**
     * 所属部门
@@ -76,7 +77,7 @@
    private String email;
    /**
     * 性别 0: 男  1:  女   2:  未知
     * 性别 0: 男 1: 女 2: 未知
     */
    private Integer sex;
@@ -87,7 +88,7 @@
    private Date createTime;
    /**
     * 状态 1: 启用  0: 禁用
     * 状态 1: 启用 0: 禁用
     */
    private Integer status;
@@ -110,7 +111,7 @@
    public String getHostName() {
        HostService service = SpringUtils.getBean(HostService.class);
        Host host = service.selectById(this.hostId);
        if (!Cools.isEmpty(host)){
        if (!Cools.isEmpty(host)) {
            return host.getName();
        }
        return null;
@@ -125,11 +126,11 @@
    }
    public String getDeptName() {
//        DeptService service = SpringUtils.getBean(DeptService.class);
//        Dept dept = service.selectById(this.deptId);
//        if (!Cools.isEmpty(dept)){
//            return dept.getName();
//        }
        DepartmentService service = SpringUtils.getBean(DepartmentService.class);
        Department dept = service.selectById(this.deptId);
        if (!Cools.isEmpty(dept)) {
            return dept.getName();
        }
        return null;
    }
@@ -185,9 +186,11 @@
        return sex;
    }
    public String getSex$(){
        if (null == this.sex){ return null; }
        switch (this.sex){
    public String getSex$() {
        if (null == this.sex) {
            return null;
        }
        switch (this.sex) {
            case 0:
                return "男";
            case 1:
@@ -207,10 +210,10 @@
        return roleId;
    }
    public String getRoleName(){
    public String getRoleName() {
        RoleService service = SpringUtils.getBean(RoleService.class);
        Role role = service.selectById(this.roleId);
        if (!Cools.isEmpty(role)){
        if (!Cools.isEmpty(role)) {
            return role.getName();
        }
        return null;
@@ -224,8 +227,8 @@
        return createTime;
    }
    public String getCreateTime$(){
        if (Cools.isEmpty(this.createTime)){
    public String getCreateTime$() {
        if (Cools.isEmpty(this.createTime)) {
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
@@ -239,9 +242,11 @@
        return status;
    }
    public String getStatus$(){
        if (null == this.status){ return null; }
        switch (this.status){
    public String getStatus$() {
        if (null == this.status) {
            return null;
        }
        switch (this.status) {
            case 1:
                return "启用";
            case 0:
@@ -254,6 +259,5 @@
    public void setStatus(Integer status) {
        this.status = status;
    }
}