mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
人员管理添加家庭成员
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package cn.lihongjie.coal.employee.entity;
|
||||
|
||||
import jakarta.persistence.Embeddable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Data
|
||||
@Embeddable
|
||||
public class EmpFamilyMemberVO {
|
||||
|
||||
private String name;
|
||||
|
||||
@Comment("关系")
|
||||
private String relation;
|
||||
|
||||
@Formula(
|
||||
"(select i.name\n"
|
||||
+ "from t_dictionary d,\n"
|
||||
+ " t_dictionary_item i\n"
|
||||
+ "where d.id = i.dictionary_id\n"
|
||||
+ " and d.code = 'emp.familyMember.relation'\n"
|
||||
+ " and i.code = relation)")
|
||||
private String relationName;
|
||||
|
||||
|
||||
private String phone;
|
||||
|
||||
|
||||
private String remarks;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import cn.lihongjie.coal.base.entity.OrgCommonEntity;
|
||||
import cn.lihongjie.coal.department.entity.DepartmentEntity;
|
||||
import cn.lihongjie.coal.file.entity.FileEntity;
|
||||
|
||||
import jakarta.persistence.ElementCollection;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.OneToMany;
|
||||
@@ -138,4 +139,10 @@ public class EmployeeEntity extends OrgCommonEntity {
|
||||
+ " and d.code = 'emp.status'\n"
|
||||
+ " and i.code = emp_status)")
|
||||
private String empStatusName;
|
||||
|
||||
|
||||
|
||||
@ElementCollection
|
||||
@Comment("家庭成员")
|
||||
private List<EmpFamilyMemberVO> familyMembers;
|
||||
}
|
||||
|
||||
@@ -58,4 +58,11 @@ public class EmployeeRecordEntity extends OrgCommonEntity {
|
||||
+ " and d.code = 'archiveStatus'\n"
|
||||
+ " and i.code = archive_status)")
|
||||
private String archiveStatusName;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user