一 用户实体类
package org.fkit.hrm.domain;
import java.io.Serializable;
import java.util.Date;
public class User implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id; // id
private String username; // 用户名
private String loginname; // 登录名
private String password; // 密码
private Integer userstatus; // 状态
private Date createDate; // 建档日期
// 无参数构造器
public User() {
super();
// TODO Auto-generated constructor stub
}
// setter和getter方法
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getLoginname() {
return loginname;
}
public void setLoginname(String loginname) {
this.loginname = loginname;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Integer getUserstatus() {
return userstatus;
}
public void setUserstatus(Integer userstatus) {
this.userstatus = userstatus;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
@Override
public String toString() {
return "User [id=" + id + ", username=" + username + ", loginname="
+ loginname + ", password=" + password + ", userstatus=" + userstatus
+ ", createDate=" + createDate + "]";
}
}
二 部门实体类
package org.fkit.hrm.domain;
import java.io.Serializable;
public class Dept implements Serializable{
private static final long serialVersionUID = 1L;
private Integer id; // id
private String name; // 部门名称
private String remark; // 详细描述
// 无参数构造器
public Dept() {
super();
}
// setter和getter方法
public void setId(Integer id){
this.id = id;
}
public Integer getId(){
return this.id;
}
public void setName(String name){
this.name = name;
}
public String getName(){
return this.name;
}
public void setRemark(String remark){
this.remark = remark;
}
public String getRemark(){
return this.remark;
}
@Override
public String toString() {
return "Dept [id=" + id + ", name=" + name + ", remark=" + remark + "]";
}
}
三 职位实体类
package org.fkit.hrm.domain;
import java.io.Serializable;
public class Job implements Serializable{
private static final long serialVersionUID = 1L;
private Integer id; // id
private String name; // 职位名称
private String remark; // 详细描述
// 无参数构造器
public Job() {
super();
// TODO Auto-generated constructor stub
}
// setter和getter方法
public void setId(Integer id){
this.id = id;
}
public Integer getId(){
return this.id;
}
public void setName(String name){
this.name = name;
}
public String getName(){
return this.name;
}
public void setRemark(String remark){
this.remark = remark;
}
public String getRemark(){
return this.remark;
}
@Override
public String toString() {
return "Job [id=" + id + ", name=" + name + ", remark=" + remark + "]";
}
}
四 雇员实体类
package org.fkit.hrm.domain;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
public class Employee implements Serializable{
private static final long serialVersionUID = 1L;
private Integer id; // id
private Dept dept; // 部门
private Job job; // 职位
private String name; // 名称
private String cardId; // 身份证
private String address; // 地址
private String postCode; // 邮政编码
private String tel; // 电话
private String phone; // 手机
private String qqNum; // qq
private String email; // 邮箱
private Integer sex; // 性别
private String party; // 政治面貌
/**
* 使用@ModelAttribute接收参数时
* form表单中有日期,Spring不知道该如何转换,
* 要在实体类的日期属性上加@DateTimeFormat(pattern="yyyy-MM-dd")注解
*/
@DateTimeFormat(pattern="yyyy-MM-dd")
private java.util.Date birthday; //生日
private String race; // 名族
private String education; // 学历
private String speciality; // 专业
private String hobby; // 爱好
private String remark; // 备注
private java.util.Date createDate; // 建档日期
// 无参数构造器
public Employee() {
super();
// TODO Auto-generated constructor stub
}
// setter和getter方法
public void setId(Integer id){
this.id = id;
}
public Integer getId(){
return this.id;
}
public Dept getDept() {
return dept;
}
public void setDept(Dept dept) {
this.dept = dept;
}
public Job getJob() {
return job;
}
public void setJob(Job job) {
this.job = job;
}
public void setName(String name){
this.name = name;
}
public String getName(){
return this.name;
}
public void setCardId(String cardId){
this.cardId = cardId;
}
public String getCardId(){
return this.cardId;
}
public void setAddress(String address){
this.address = address;
}
public String getAddress(){
return this.address;
}
public void setPostCode(String postCode){
this.postCode = postCode;
}
public String getPostCode(){
return this.postCode;
}
public void setTel(String tel){
this.tel = tel;
}
public String getTel(){
return this.tel;
}
public void setPhone(String phone){
this.phone = phone;
}
public String getPhone(){
return this.phone;
}
public void setQqNum(String qqNum){
this.qqNum = qqNum;
}
public String getQqNum(){
return this.qqNum;
}
public void setEmail(String email){
this.email = email;
}
public String getEmail(){
return this.email;
}
public void setSex(Integer sex){
this.sex = sex;
}
public Integer getSex(){
return this.sex;
}
public void setParty(String party){
this.party = party;
}
public String getParty(){
return this.party;
}
public void setBirthday(java.util.Date birthday){
this.birthday = birthday;
}
public java.util.Date getBirthday(){
return this.birthday;
}
public void setRace(String race){
this.race = race;
}
public String getRace(){
return this.race;
}
public void setEducation(String education){
this.education = education;
}
public String getEducation(){
return this.education;
}
public void setSpeciality(String speciality){
this.speciality = speciality;
}
public String getSpeciality(){
return this.speciality;
}
public void setHobby(String hobby){
this.hobby = hobby;
}
public String getHobby(){
return this.hobby;
}
public void setRemark(String remark){
this.remark = remark;
}
public String getRemark(){
return this.remark;
}
public void setCreateDate(java.util.Date createDate){
this.createDate = createDate;
}
public java.util.Date getCreateDate(){
return this.createDate;
}
@Override
public String toString() {
return "Employee [id=" + id + ", dept=" + dept + ", job=" + job
+ ", name=" + name + ", cardId=" + cardId + ", address="
+ address + ", postCode=" + postCode + ", tel=" + tel
+ ", phone=" + phone + ", qqNum=" + qqNum + ", email=" + email
+ ", sex=" + sex + ", party=" + party + ", birthday="
+ birthday + ", race=" + race + ", education=" + education
+ ", speciality=" + speciality +
", hobby=" + hobby + ", remark=" + remark + ", createDate="
+ createDate + "]";
}
}
五 通知实体类
package org.fkit.hrm.domain;
import java.io.Serializable;
public class Notice implements Serializable{
private static final long serialVersionUID = 1L;
private Integer id; // 编号
private String title; // 标题
private String content; // 内容
private java.util.Date createDate; // 发布日期
private User user; // 发布人
// 无参数构造器
public Notice() {
super();
// TODO Auto-generated constructor stub
}
// setter和getter方法
public void setId(Integer id){
this.id = id;
}
public Integer getId(){
return this.id;
}
public void setTitle(String title){
this.title = title;
}
public String getTitle(){
return this.title;
}
public void setContent(String content){
this.content = content;
}
public String getContent(){
return this.content;
}
public void setCreateDate(java.util.Date createDate){
this.createDate = createDate;
}
public java.util.Date getCreateDate(){
return this.createDate;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
@Override
public String toString() {
return "Notice [id=" + id + ", title=" + title + ", content=" + content
+ ", createDate=" + createDate + ", user=" + user + "]";
}
}
六 文档实体类
package org.fkit.hrm.domain;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
public class Document implements Serializable{
private static final long serialVersionUID = 1L;
private int id; // 编号
private String title; // 标题
private String fileName; // 文件名
private MultipartFile file; // 文件
private String remark; // 描述
private java.util.Date createDate; // 上传时间
private User user; // 上传人
// 无参数构造器
public Document() {
super();
// TODO Auto-generated constructor stub
}
// setter和getter方法
public void setId(int id){
this.id = id;
}
public int getId(){
return this.id;
}
public void setTitle(String title){
this.title = title;
}
public String getTitle(){
return this.title;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public MultipartFile getFile() {
return file;
}
public void setFile(MultipartFile file) {
this.file = file;
}
public void setRemark(String remark){
this.remark = remark;
}
public String getRemark(){
return this.remark;
}
public void setCreateDate(java.util.Date createDate){
this.createDate = createDate;
}
public java.util.Date getCreateDate(){
return this.createDate;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
@Override
public String toString() {
return "Document [id=" + id + ", title=" + title + ", fileName="
+ fileName + ", file=" + file + ", remark=" + remark
+ ", createDate=" + createDate + ", user=" + user + "]";
}
}