|
|
@@ -0,0 +1,164 @@
|
|
|
+package com.jeesite.modules.mes.entity;
|
|
|
+
|
|
|
+import com.jeesite.common.entity.DataEntity;
|
|
|
+import com.jeesite.common.mybatis.annotation.Column;
|
|
|
+import com.jeesite.common.mybatis.annotation.JoinTable;
|
|
|
+import com.jeesite.common.mybatis.annotation.Table;
|
|
|
+import com.jeesite.common.mybatis.mapper.query.QueryType;
|
|
|
+import com.jeesite.modules.sys.entity.User;
|
|
|
+
|
|
|
+import javax.validation.constraints.NotBlank;
|
|
|
+import javax.validation.constraints.Size;
|
|
|
+
|
|
|
+@Table(name="js_sys_employee", alias="a", label="员工信息", columns={
|
|
|
+ @Column(name="emp_code", attrName="empCode", label="员工编码", isPK=true),
|
|
|
+ @Column(name="emp_name", attrName="empName", label="员工姓名", queryType=QueryType.LIKE),
|
|
|
+ @Column(name="emp_name_en", attrName="empNameEn", label="员工英文名"),
|
|
|
+ @Column(name="emp_no", attrName="empNo", label="员工工号", queryType=QueryType.LIKE),
|
|
|
+ @Column(name="office_code", attrName="officeCode", label="机构编码"),
|
|
|
+ @Column(name="office_name", attrName="officeName", label="机构名称", queryType=QueryType.LIKE),
|
|
|
+ @Column(name="company_code", attrName="companyCode", label="公司编码"),
|
|
|
+ @Column(name="company_name", attrName="companyName", label="公司名称"),
|
|
|
+ @Column(name="status", attrName="status", label="状态", isUpdate=false),
|
|
|
+ @Column(name="create_by", attrName="createBy", label="创建者", isUpdate=false, isQuery=false),
|
|
|
+ @Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false, isUpdateForce=true),
|
|
|
+ @Column(name="update_by", attrName="updateBy", label="更新者", isQuery=false),
|
|
|
+ @Column(name="update_date", attrName="updateDate", label="更新时间", isQuery=false, isUpdateForce=true),
|
|
|
+ @Column(name="remarks", attrName="remarks", label="备注信息", queryType=QueryType.LIKE),
|
|
|
+ @Column(name="corp_code", attrName="corpCode", label="租户代码", isQuery=false),
|
|
|
+ @Column(name="corp_name", attrName="corpName", label="租户名称", isQuery=false),
|
|
|
+ }, joinTable={
|
|
|
+ @JoinTable(type=JoinTable.Type.LEFT_JOIN, entity= User.class, attrName="this", alias="u",
|
|
|
+ on="u.ref_code = a.emp_code AND u.user_type = 'employee' AND u.status <> '1'",
|
|
|
+ columns={
|
|
|
+ @Column(name="user_code", attrName="userCode", label="用户编码"),
|
|
|
+ @Column(name="login_code", attrName="loginCode", label="登录账号"),
|
|
|
+ @Column(name="status", attrName="userStatus", label="账号状态"),
|
|
|
+ }),
|
|
|
+ }, orderBy="a.update_date DESC"
|
|
|
+)
|
|
|
+public class MesEmployee extends DataEntity<MesEmployee> {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ private String empCode;
|
|
|
+ private String empName;
|
|
|
+ private String empNameEn;
|
|
|
+ private String empNo;
|
|
|
+ private String officeCode;
|
|
|
+ private String officeName;
|
|
|
+ private String companyCode;
|
|
|
+ private String companyName;
|
|
|
+ private String userCode;
|
|
|
+ private String loginCode;
|
|
|
+ private String userStatus;
|
|
|
+
|
|
|
+ public MesEmployee() {
|
|
|
+ this(null);
|
|
|
+ }
|
|
|
+
|
|
|
+ public MesEmployee(String empCode) {
|
|
|
+ super(empCode);
|
|
|
+ this.empCode = empCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ @NotBlank(message="员工姓名不能为空")
|
|
|
+ @Size(min=0, max=100, message="员工姓名长度不能超过 100 个字符")
|
|
|
+ public String getEmpName() {
|
|
|
+ return empName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setEmpName(String empName) {
|
|
|
+ this.empName = empName;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Size(min=0, max=64, message="员工编码长度不能超过 64 个字符")
|
|
|
+ public String getEmpCode() {
|
|
|
+ return empCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setEmpCode(String empCode) {
|
|
|
+ this.empCode = empCode;
|
|
|
+ this.id = empCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Size(min=0, max=100, message="员工英文名长度不能超过 100 个字符")
|
|
|
+ public String getEmpNameEn() {
|
|
|
+ return empNameEn;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setEmpNameEn(String empNameEn) {
|
|
|
+ this.empNameEn = empNameEn;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Size(min=0, max=100, message="员工工号长度不能超过 100 个字符")
|
|
|
+ public String getEmpNo() {
|
|
|
+ return empNo;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setEmpNo(String empNo) {
|
|
|
+ this.empNo = empNo;
|
|
|
+ }
|
|
|
+
|
|
|
+ @NotBlank(message="归属机构不能为空")
|
|
|
+ @Size(min=0, max=64, message="机构编码长度不能超过 64 个字符")
|
|
|
+ public String getOfficeCode() {
|
|
|
+ return officeCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOfficeCode(String officeCode) {
|
|
|
+ this.officeCode = officeCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ @NotBlank(message="归属机构名称不能为空")
|
|
|
+ @Size(min=0, max=100, message="机构名称长度不能超过 100 个字符")
|
|
|
+ public String getOfficeName() {
|
|
|
+ return officeName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOfficeName(String officeName) {
|
|
|
+ this.officeName = officeName;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Size(min=0, max=64, message="公司编码长度不能超过 64 个字符")
|
|
|
+ public String getCompanyCode() {
|
|
|
+ return companyCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCompanyCode(String companyCode) {
|
|
|
+ this.companyCode = companyCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Size(min=0, max=200, message="公司名称长度不能超过 200 个字符")
|
|
|
+ public String getCompanyName() {
|
|
|
+ return companyName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCompanyName(String companyName) {
|
|
|
+ this.companyName = companyName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getUserCode() {
|
|
|
+ return userCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setUserCode(String userCode) {
|
|
|
+ this.userCode = userCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getLoginCode() {
|
|
|
+ return loginCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setLoginCode(String loginCode) {
|
|
|
+ this.loginCode = loginCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getUserStatus() {
|
|
|
+ return userStatus;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setUserStatus(String userStatus) {
|
|
|
+ this.userStatus = userStatus;
|
|
|
+ }
|
|
|
+}
|