| | |
| | | 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; |
| | | |
| | |
| | | */ |
| | | @TableField("host_id") |
| | | private Long hostId; |
| | | |
| | | |
| | | /** |
| | | * 所属部门 |
| | |
| | | private String email; |
| | | |
| | | /** |
| | | * 性别 0: 男 1: 女 2: 未知 |
| | | * 性别 0: 男 1: 女 2: 未知 |
| | | */ |
| | | private Integer sex; |
| | | |
| | |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 状态 1: 启用 0: 禁用 |
| | | * 状态 1: 启用 0: 禁用 |
| | | */ |
| | | private Integer status; |
| | | |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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: |
| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | 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: |
| | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | |
| | | } |