自动化立体仓库 - WMS系统
chen.llin
3 天以前 7692db6072ef569b5734d218cb11fa82e80171d1
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,9 +88,15 @@
    private Date createTime;
    /**
     * 状态 1: 启用  0: 禁用
     * 状态 1: 启用 0: 禁用
     */
    private Integer status;
    /**
     * AD登录 1: 启用 0: 禁用
     */
    @TableField("ad_login")
    private Integer adLogin;
    public Long getId() {
        return id;
@@ -110,7 +117,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 +132,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 +192,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 +216,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 +233,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 +248,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:
@@ -255,5 +266,26 @@
        this.status = status;
    }
    public Integer getAdLogin() {
        return adLogin;
    }
    public void setAdLogin(Integer adLogin) {
        this.adLogin = adLogin;
    }
    public String getAdLogin$() {
        if (null == this.adLogin) {
            return "禁用";
        }
        switch (this.adLogin) {
            case 1:
                return "启用";
            case 0:
                return "禁用";
            default:
                return String.valueOf(this.adLogin);
        }
    }
}