java

package com.dh.hrmanager.entity;

import com.dh.hrmanager.util.IWork;

public abstract class Employee implements IWork{
	private int userId;
	private String userName;
	private String password;
	private int roleId;
	private String empNo;
	private int departId;
	private double salary;
	
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public int getRoleId() {
		return roleId;
	}
	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}
	public String getEmpNo() {
		return empNo;
	}
	public void setEmpNo(String empNo) {
		this.empNo = empNo;
	}
	public int getDepartId() {
		return departId;
	}
	public void setDepartId(int departId) {
		this.departId = departId;
	}
	public double getSalary() {
		return salary;
	}
	public void setSalary(double salary) {
		this.salary = salary;
	}
	
	public Employee() {
		
	}
	public Employee(int userId, String empNo, String userName, String password,int departId, int roleId, double salary)
	{
		this.userId = userId;
		this.empNo = empNo;
		this.userName = userName;
		this.password = password;
		this.departId = departId;
		this.roleId = roleId;
		this.salary = salary;
	}
	
	public void displayInfo(){
		String position = null;
		if (roleId == 1) {
			position = "Staff";
		}
		if (roleId == 2) {
			position = "Manager";
		}
		if (roleId == 3) {
			position = "Admin";
		}
		
		String department = null;
		
		if (departId == 1) {
			department = "市场部";
		}
		if (departId == 2) {
			department = "开发部";
		}
		if (departId == 3) {
			department = "信息部";
		}
		System.out.println("\t\t当前用户信息\n\n");
		System.out.println("**********************************************************");
		System.out.println("\t\t雇员编号:" + empNo);
		System.out.println("\t\t姓名:" + userName);
		System.out.println("\t\t职务:" + position);
		System.out.println("\t\t部门:" + department);
		System.out.println("\t\t薪水:" + String.valueOf(salary));
		System.out.println("**********************************************************");
	}
	
	public void modifyPassword(String newPassword) {
		this.password = newPassword;
		System.out.println("密码修改成功");

	}
	public abstract void displaySalaryRange();
	
	
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值