Commit e246a2b6 authored by alex yao's avatar alex yao

feat[AI人力]:新增职位上下架功能

parent 97bdf635
...@@ -9,6 +9,7 @@ import cn.com.poc.human_resources.entity.position.Job; ...@@ -9,6 +9,7 @@ import cn.com.poc.human_resources.entity.position.Job;
import cn.com.poc.human_resources.entity.position.Por; import cn.com.poc.human_resources.entity.position.Por;
import cn.com.poc.human_resources.entity.resume.Resume; import cn.com.poc.human_resources.entity.resume.Resume;
import cn.com.yict.framemax.data.model.PagingInfo; import cn.com.yict.framemax.data.model.PagingInfo;
import org.springframework.web.bind.annotation.RequestParam;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
...@@ -62,7 +63,8 @@ public interface HumanResourceService { ...@@ -62,7 +63,8 @@ public interface HumanResourceService {
* @param id 职位id[更新必填] * @param id 职位id[更新必填]
* @param memberId 用户id * @param memberId 用户id
*/ */
BizHumanResourcePositionEntity saveOrUpdatePosition(BaseInfo baseInfo, Job job, Por por, Long id, Long memberId) throws Exception; BizHumanResourcePositionEntity saveOrUpdatePosition(BaseInfo baseInfo, Job job, Por por, Long id, Long memberId)
throws Exception;
/** /**
...@@ -89,6 +91,17 @@ public interface HumanResourceService { ...@@ -89,6 +91,17 @@ public interface HumanResourceService {
*/ */
void deletePositions(Long userId, Long... positionIds) throws Exception; void deletePositions(Long userId, Long... positionIds) throws Exception;
/**
* 发布职位-仅用于上架/发布职位
*/
String publishPositions(Long id, Long memberId) throws Exception;
/**
* 下架职位
*/
String unPublishPositions(Long id, Long memberId) throws Exception;
// ------------------------- 简历 -------------------------- // // ------------------------- 简历 -------------------------- //
/** /**
...@@ -100,7 +113,8 @@ public interface HumanResourceService { ...@@ -100,7 +113,8 @@ public interface HumanResourceService {
* @param resume * @param resume
* @throws Exception * @throws Exception
*/ */
BizHumanResourceResumeEntity saveResume(Long userId, String fileURL, Long positionId, Resume resume) throws Exception; BizHumanResourceResumeEntity saveResume(Long userId, String fileURL, Long positionId, Resume resume)
throws Exception;
/** /**
* 更新简历信息 * 更新简历信息
...@@ -113,7 +127,8 @@ public interface HumanResourceService { ...@@ -113,7 +127,8 @@ public interface HumanResourceService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
BizHumanResourceResumeEntity updateResume(Long id, Long userId, String fileURL, Long positionId, Resume resume) throws Exception; BizHumanResourceResumeEntity updateResume(Long id, Long userId, String fileURL, Long positionId, Resume resume)
throws Exception;
/** /**
* 查询简历列表 * 查询简历列表
...@@ -122,7 +137,8 @@ public interface HumanResourceService { ...@@ -122,7 +137,8 @@ public interface HumanResourceService {
* @param positionId * @param positionId
* @param pagingInfo * @param pagingInfo
*/ */
List<BizHumanResourceResumeEntity> listResumes(Long userId, Long positionId, PagingInfo pagingInfo) throws Exception; List<BizHumanResourceResumeEntity> listResumes(Long userId, Long positionId, PagingInfo pagingInfo)
throws Exception;
/** /**
* 查询简历详情 * 查询简历详情
......
package cn.com.poc.human_resources.constant;
/**
* @author alex.yao
* @date 2025/12/23
*/
public interface HumanResourcePositionConstant {
interface POST_STATUS {
String DRAFT = "DRAFT";
String PUBLISHED = "PUBLISHED";
}
}
...@@ -26,6 +26,7 @@ public class BizHumanResourcePositionConvert { ...@@ -26,6 +26,7 @@ public class BizHumanResourcePositionConvert {
public static BizHumanResourcePositionEntity modelToEntity(BizHumanResourcePositionModel model) { public static BizHumanResourcePositionEntity modelToEntity(BizHumanResourcePositionModel model) {
BizHumanResourcePositionEntity entity = new BizHumanResourcePositionEntity(); BizHumanResourcePositionEntity entity = new BizHumanResourcePositionEntity();
entity.setId(model.getId()); entity.setId(model.getId());
entity.setPostStatus(model.getPostStatus());
entity.setJobTitle(model.getJobTitle()); entity.setJobTitle(model.getJobTitle());
entity.setDepartment(model.getDepartment()); entity.setDepartment(model.getDepartment());
entity.setWorkLocation(model.getWorkLocation()); entity.setWorkLocation(model.getWorkLocation());
...@@ -52,6 +53,7 @@ public class BizHumanResourcePositionConvert { ...@@ -52,6 +53,7 @@ public class BizHumanResourcePositionConvert {
public static BizHumanResourcePositionModel entityToModel(BizHumanResourcePositionEntity entity) { public static BizHumanResourcePositionModel entityToModel(BizHumanResourcePositionEntity entity) {
BizHumanResourcePositionModel model = new BizHumanResourcePositionModel(); BizHumanResourcePositionModel model = new BizHumanResourcePositionModel();
model.setId(entity.getId()); model.setId(entity.getId());
model.setPostStatus(entity.getPostStatus());
model.setJobTitle(entity.getJobTitle()); model.setJobTitle(entity.getJobTitle());
model.setDepartment(entity.getDepartment()); model.setDepartment(entity.getDepartment());
model.setWorkLocation(entity.getWorkLocation()); model.setWorkLocation(entity.getWorkLocation());
...@@ -78,6 +80,7 @@ public class BizHumanResourcePositionConvert { ...@@ -78,6 +80,7 @@ public class BizHumanResourcePositionConvert {
public static BizHumanResourcePositionDto entityToDto(BizHumanResourcePositionEntity entity) { public static BizHumanResourcePositionDto entityToDto(BizHumanResourcePositionEntity entity) {
BizHumanResourcePositionDto dto = new BizHumanResourcePositionDto(); BizHumanResourcePositionDto dto = new BizHumanResourcePositionDto();
dto.setId(entity.getId()); dto.setId(entity.getId());
dto.setPostStatus(entity.getPostStatus());
dto.setJobTitle(entity.getJobTitle()); dto.setJobTitle(entity.getJobTitle());
dto.setDepartment(entity.getDepartment()); dto.setDepartment(entity.getDepartment());
dto.setWorkLocation(entity.getWorkLocation()); dto.setWorkLocation(entity.getWorkLocation());
...@@ -97,6 +100,7 @@ public class BizHumanResourcePositionConvert { ...@@ -97,6 +100,7 @@ public class BizHumanResourcePositionConvert {
public static BizHumanResourcePositionEntity dtoToEntity(BizHumanResourcePositionDto dto) { public static BizHumanResourcePositionEntity dtoToEntity(BizHumanResourcePositionDto dto) {
BizHumanResourcePositionEntity entity = new BizHumanResourcePositionEntity(); BizHumanResourcePositionEntity entity = new BizHumanResourcePositionEntity();
entity.setId(dto.getId()); entity.setId(dto.getId());
entity.setPostStatus(dto.getPostStatus());
entity.setJobTitle(dto.getJobTitle()); entity.setJobTitle(dto.getJobTitle());
entity.setDepartment(dto.getDepartment()); entity.setDepartment(dto.getDepartment());
entity.setWorkLocation(dto.getWorkLocation()); entity.setWorkLocation(dto.getWorkLocation());
...@@ -116,6 +120,8 @@ public class BizHumanResourcePositionConvert { ...@@ -116,6 +120,8 @@ public class BizHumanResourcePositionConvert {
public static HumanResourcePositionDto entityToHumanResourcePositionDto(BizHumanResourcePositionEntity positionEntity) { public static HumanResourcePositionDto entityToHumanResourcePositionDto(BizHumanResourcePositionEntity positionEntity) {
HumanResourcePositionDto resourcePositionDto = new HumanResourcePositionDto(); HumanResourcePositionDto resourcePositionDto = new HumanResourcePositionDto();
resourcePositionDto.setPostStatus(positionEntity.getPostStatus());
BaseInfo baseInfo = new BaseInfo(); BaseInfo baseInfo = new BaseInfo();
baseInfo.setJobTitle(positionEntity.getJobTitle()); baseInfo.setJobTitle(positionEntity.getJobTitle());
baseInfo.setDepartment(positionEntity.getDepartment()); baseInfo.setDepartment(positionEntity.getDepartment());
......
...@@ -18,6 +18,22 @@ public class BizHumanResourcePositionDto { ...@@ -18,6 +18,22 @@ public class BizHumanResourcePositionDto {
this.id = id; this.id = id;
} }
/**
* post_status
* 发布状态
* DRAFT-草稿
* PUBLISHED - 已发布
*/
private java.lang.String postStatus;
public String getPostStatus() {
return postStatus;
}
public void setPostStatus(String postStatus) {
this.postStatus = postStatus;
}
/** /**
* job_title * job_title
* 职位名称 * 职位名称
......
...@@ -12,12 +12,22 @@ public class HumanResourcePositionDto { ...@@ -12,12 +12,22 @@ public class HumanResourcePositionDto {
private Long id; private Long id;
private String postStatus;
private BaseInfo baseInfo; private BaseInfo baseInfo;
private Job job; private Job job;
private Por por; private Por por;
public String getPostStatus() {
return postStatus;
}
public void setPostStatus(String postStatus) {
this.postStatus = postStatus;
}
public Long getId() { public Long getId() {
return id; return id;
} }
......
...@@ -18,6 +18,22 @@ public class BizHumanResourcePositionEntity { ...@@ -18,6 +18,22 @@ public class BizHumanResourcePositionEntity {
public void setId(java.lang.Long id){ public void setId(java.lang.Long id){
this.id = id; this.id = id;
} }
/**
* post_status
* 发布状态
* DRAFT-草稿
* PUBLISHED - 已发布
*/
private java.lang.String postStatus;
public String getPostStatus() {
return postStatus;
}
public void setPostStatus(String postStatus) {
this.postStatus = postStatus;
}
/** job_title /** job_title
*职位名称 *职位名称
*/ */
......
...@@ -16,6 +16,19 @@ public class HumanResourcePositionBaseInfo { ...@@ -16,6 +16,19 @@ public class HumanResourcePositionBaseInfo {
this.id = id; this.id = id;
} }
/**
* 发布状态
*/
private String postStatus;
public String getPostStatus() {
return postStatus;
}
public void setPostStatus(String postStatus) {
this.postStatus = postStatus;
}
/** /**
* job_title * job_title
* 职位名称 * 职位名称
......
package cn.com.poc.human_resources.model; package cn.com.poc.human_resources.model;
import java.io.Serializable; import java.io.Serializable;
import cn.com.yict.framemax.data.model.BaseModelClass; import cn.com.yict.framemax.data.model.BaseModelClass;
...@@ -23,344 +23,361 @@ import javax.persistence.GenerationType; ...@@ -23,344 +23,361 @@ import javax.persistence.GenerationType;
public class BizHumanResourcePositionModel extends BaseModelClass implements Serializable { public class BizHumanResourcePositionModel extends BaseModelClass implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** id /** id
*主键 *主键
*/ */
private java.lang.Long id; private java.lang.Long id;
@Column(name = "id",length = 19) @Column(name = "id",length = 19)
@Id @GeneratedValue(strategy = GenerationType.AUTO) @Id @GeneratedValue(strategy = GenerationType.AUTO)
public java.lang.Long getId(){ public java.lang.Long getId(){
return this.id; return this.id;
} }
public void setId(java.lang.Long id){ public void setId(java.lang.Long id){
this.id = id; this.id = id;
super.addValidField("id"); super.addValidField("id");
} }
/**
* post_status
* 发布状态
* DRAFT-草稿
* PUBLISHED - 已发布
*/
private java.lang.String postStatus;
@Column(name = "post_status",length = 10)
public String getPostStatus() {
return postStatus;
}
public void setPostStatus(String postStatus) {
this.postStatus = postStatus;
super.addValidField("postStatus");
}
/** job_title /** job_title
*职位名称 *职位名称
*/ */
private java.lang.String jobTitle; private java.lang.String jobTitle;
@Column(name = "job_title",length = 100) @Column(name = "job_title",length = 100)
public java.lang.String getJobTitle(){ public java.lang.String getJobTitle(){
return this.jobTitle; return this.jobTitle;
} }
public void setJobTitle(java.lang.String jobTitle){ public void setJobTitle(java.lang.String jobTitle){
this.jobTitle = jobTitle; this.jobTitle = jobTitle;
super.addValidField("jobTitle"); super.addValidField("jobTitle");
} }
/** department /** department
*所属部门 *所属部门
*/ */
private java.lang.String department; private java.lang.String department;
@Column(name = "department",length = 100) @Column(name = "department",length = 100)
public java.lang.String getDepartment(){ public java.lang.String getDepartment(){
return this.department; return this.department;
} }
public void setDepartment(java.lang.String department){ public void setDepartment(java.lang.String department){
this.department = department; this.department = department;
super.addValidField("department"); super.addValidField("department");
} }
/** work_location /** work_location
*工作地址 *工作地址
*/ */
private java.lang.String workLocation; private java.lang.String workLocation;
@Column(name = "work_location",length = 100) @Column(name = "work_location",length = 100)
public java.lang.String getWorkLocation(){ public java.lang.String getWorkLocation(){
return this.workLocation; return this.workLocation;
} }
public void setWorkLocation(java.lang.String workLocation){ public void setWorkLocation(java.lang.String workLocation){
this.workLocation = workLocation; this.workLocation = workLocation;
super.addValidField("workLocation"); super.addValidField("workLocation");
} }
/** job_nature /** job_nature
*工作性质 *工作性质
*/ */
private java.lang.String jobNature; private java.lang.String jobNature;
@Column(name = "job_nature",length = 100) @Column(name = "job_nature",length = 100)
public java.lang.String getJobNature(){ public java.lang.String getJobNature(){
return this.jobNature; return this.jobNature;
} }
public void setJobNature(java.lang.String jobNature){ public void setJobNature(java.lang.String jobNature){
this.jobNature = jobNature; this.jobNature = jobNature;
super.addValidField("jobNature"); super.addValidField("jobNature");
} }
/** number_of_recruits /** number_of_recruits
*招聘人数 *招聘人数
*/ */
private java.lang.Integer numberOfRecruits; private java.lang.Integer numberOfRecruits;
@Column(name = "number_of_recruits",length = 10) @Column(name = "number_of_recruits",length = 10)
public java.lang.Integer getNumberOfRecruits(){ public java.lang.Integer getNumberOfRecruits(){
return this.numberOfRecruits; return this.numberOfRecruits;
} }
public void setNumberOfRecruits(java.lang.Integer numberOfRecruits){ public void setNumberOfRecruits(java.lang.Integer numberOfRecruits){
this.numberOfRecruits = numberOfRecruits; this.numberOfRecruits = numberOfRecruits;
super.addValidField("numberOfRecruits"); super.addValidField("numberOfRecruits");
} }
/** work_experience /** work_experience
*工作经验 *工作经验
*/ */
private java.lang.String workExperience; private java.lang.String workExperience;
@Column(name = "work_experience",length = 100) @Column(name = "work_experience",length = 100)
public java.lang.String getWorkExperience(){ public java.lang.String getWorkExperience(){
return this.workExperience; return this.workExperience;
} }
public void setWorkExperience(java.lang.String workExperience){ public void setWorkExperience(java.lang.String workExperience){
this.workExperience = workExperience; this.workExperience = workExperience;
super.addValidField("workExperience"); super.addValidField("workExperience");
} }
/** educational_re /** educational_re
*学历要求 *学历要求
*/ */
private java.lang.String educationalRe; private java.lang.String educationalRe;
@Column(name = "educational_re",length = 100) @Column(name = "educational_re",length = 100)
public java.lang.String getEducationalRe(){ public java.lang.String getEducationalRe(){
return this.educationalRe; return this.educationalRe;
} }
public void setEducationalRe(java.lang.String educationalRe){ public void setEducationalRe(java.lang.String educationalRe){
this.educationalRe = educationalRe; this.educationalRe = educationalRe;
super.addValidField("educationalRe"); super.addValidField("educationalRe");
} }
/** salary_range /** salary_range
*薪资要求 *薪资要求
*/ */
private java.lang.String salaryRange; private java.lang.String salaryRange;
@Column(name = "salary_range",length = 100) @Column(name = "salary_range",length = 100)
public java.lang.String getSalaryRange(){ public java.lang.String getSalaryRange(){
return this.salaryRange; return this.salaryRange;
} }
public void setSalaryRange(java.lang.String salaryRange){ public void setSalaryRange(java.lang.String salaryRange){
this.salaryRange = salaryRange; this.salaryRange = salaryRange;
super.addValidField("salaryRange"); super.addValidField("salaryRange");
} }
/** job_requirements /** job_requirements
*任职资格 *任职资格
*/ */
private java.lang.String jobRequirements; private java.lang.String jobRequirements;
@Column(name = "job_requirements",length = 2147483647) @Column(name = "job_requirements",length = 2147483647)
public java.lang.String getJobRequirements(){ public java.lang.String getJobRequirements(){
return this.jobRequirements; return this.jobRequirements;
} }
public void setJobRequirements(java.lang.String jobRequirements){ public void setJobRequirements(java.lang.String jobRequirements){
this.jobRequirements = jobRequirements; this.jobRequirements = jobRequirements;
super.addValidField("jobRequirements"); super.addValidField("jobRequirements");
} }
/** job_duties /** job_duties
*职位描述 *职位描述
*/ */
private java.lang.String jobDuties; private java.lang.String jobDuties;
@Column(name = "job_duties",length = 2147483647) @Column(name = "job_duties",length = 2147483647)
public java.lang.String getJobDuties(){ public java.lang.String getJobDuties(){
return this.jobDuties; return this.jobDuties;
} }
public void setJobDuties(java.lang.String jobDuties){ public void setJobDuties(java.lang.String jobDuties){
this.jobDuties = jobDuties; this.jobDuties = jobDuties;
super.addValidField("jobDuties"); super.addValidField("jobDuties");
} }
/** essential /** essential
*职位画像-必备项 *职位画像-必备项
*/ */
private java.lang.String essential; private java.lang.String essential;
@Column(name = "essential",length = 1073741824) @Column(name = "essential",length = 1073741824)
public java.lang.String getEssential(){ public java.lang.String getEssential(){
return this.essential; return this.essential;
} }
public void setEssential(java.lang.String essential){ public void setEssential(java.lang.String essential){
this.essential = essential; this.essential = essential;
super.addValidField("essential"); super.addValidField("essential");
} }
/** bonusPoints /** bonusPoints
*职位画像-加分项 *职位画像-加分项
*/ */
private java.lang.String bonusPoints; private java.lang.String bonusPoints;
@Column(name = "bonusPoints",length = 1073741824) @Column(name = "bonusPoints",length = 1073741824)
public java.lang.String getBonusPoints(){ public java.lang.String getBonusPoints(){
return this.bonusPoints; return this.bonusPoints;
} }
public void setBonusPoints(java.lang.String bonusPoints){ public void setBonusPoints(java.lang.String bonusPoints){
this.bonusPoints = bonusPoints; this.bonusPoints = bonusPoints;
super.addValidField("bonusPoints"); super.addValidField("bonusPoints");
} }
/** exclusion /** exclusion
*职位画像-排除项 *职位画像-排除项
*/ */
private java.lang.String exclusion; private java.lang.String exclusion;
@Column(name = "exclusion",length = 1073741824) @Column(name = "exclusion",length = 1073741824)
public java.lang.String getExclusion(){ public java.lang.String getExclusion(){
return this.exclusion; return this.exclusion;
} }
public void setExclusion(java.lang.String exclusion){ public void setExclusion(java.lang.String exclusion){
this.exclusion = exclusion; this.exclusion = exclusion;
super.addValidField("exclusion"); super.addValidField("exclusion");
} }
/** member_id /** member_id
*创建人ID *创建人ID
*/ */
private java.lang.Long memberId; private java.lang.Long memberId;
@Column(name = "member_id",length = 19) @Column(name = "member_id",length = 19)
public java.lang.Long getMemberId(){ public java.lang.Long getMemberId(){
return this.memberId; return this.memberId;
} }
public void setMemberId(java.lang.Long memberId){ public void setMemberId(java.lang.Long memberId){
this.memberId = memberId; this.memberId = memberId;
super.addValidField("memberId"); super.addValidField("memberId");
} }
/** is_deleted /** is_deleted
*是否删除 1、Y 是 2、N 否 *是否删除 1、Y 是 2、N 否
*/ */
private java.lang.String isDeleted; private java.lang.String isDeleted;
@Column(name = "is_deleted",length = 1) @Column(name = "is_deleted",length = 1)
public java.lang.String getIsDeleted(){ public java.lang.String getIsDeleted(){
return this.isDeleted; return this.isDeleted;
} }
public void setIsDeleted(java.lang.String isDeleted){ public void setIsDeleted(java.lang.String isDeleted){
this.isDeleted = isDeleted; this.isDeleted = isDeleted;
super.addValidField("isDeleted"); super.addValidField("isDeleted");
} }
/** CREATOR /** CREATOR
*创建人 *创建人
*/ */
private java.lang.String creator; private java.lang.String creator;
@Column(name = "CREATOR",length = 225) @Column(name = "CREATOR",length = 225)
public java.lang.String getCreator(){ public java.lang.String getCreator(){
return this.creator; return this.creator;
} }
public void setCreator(java.lang.String creator){ public void setCreator(java.lang.String creator){
this.creator = creator; this.creator = creator;
super.addValidField("creator"); super.addValidField("creator");
} }
/** CREATED_TIME /** CREATED_TIME
*创建时间 *创建时间
*/ */
private java.util.Date createdTime; private java.util.Date createdTime;
@Column(name = "CREATED_TIME",length = 19) @Column(name = "CREATED_TIME",length = 19)
public java.util.Date getCreatedTime(){ public java.util.Date getCreatedTime(){
return this.createdTime; return this.createdTime;
} }
public void setCreatedTime(java.util.Date createdTime){ public void setCreatedTime(java.util.Date createdTime){
this.createdTime = createdTime; this.createdTime = createdTime;
super.addValidField("createdTime"); super.addValidField("createdTime");
} }
/** MODIFIER /** MODIFIER
*修改人 *修改人
*/ */
private java.lang.String modifier; private java.lang.String modifier;
@Column(name = "MODIFIER",length = 225) @Column(name = "MODIFIER",length = 225)
public java.lang.String getModifier(){ public java.lang.String getModifier(){
return this.modifier; return this.modifier;
} }
public void setModifier(java.lang.String modifier){ public void setModifier(java.lang.String modifier){
this.modifier = modifier; this.modifier = modifier;
super.addValidField("modifier"); super.addValidField("modifier");
} }
/** MODIFIED_TIME /** MODIFIED_TIME
*修改时间 *修改时间
*/ */
private java.util.Date modifiedTime; private java.util.Date modifiedTime;
@Column(name = "MODIFIED_TIME",length = 19) @Column(name = "MODIFIED_TIME",length = 19)
public java.util.Date getModifiedTime(){ public java.util.Date getModifiedTime(){
return this.modifiedTime; return this.modifiedTime;
} }
public void setModifiedTime(java.util.Date modifiedTime){ public void setModifiedTime(java.util.Date modifiedTime){
this.modifiedTime = modifiedTime; this.modifiedTime = modifiedTime;
super.addValidField("modifiedTime"); super.addValidField("modifiedTime");
} }
/** SYS_VERSION /** SYS_VERSION
*乐观锁,版本号 *乐观锁,版本号
*/ */
private java.lang.Integer sysVersion; private java.lang.Integer sysVersion;
@Column(name = "SYS_VERSION",length = 10) @Column(name = "SYS_VERSION",length = 10)
@Version @Version
public java.lang.Integer getSysVersion(){ public java.lang.Integer getSysVersion(){
return this.sysVersion; return this.sysVersion;
} }
public void setSysVersion(java.lang.Integer sysVersion){ public void setSysVersion(java.lang.Integer sysVersion){
this.sysVersion = sysVersion; this.sysVersion = sysVersion;
super.addValidField("sysVersion"); super.addValidField("sysVersion");
} }
} }
\ No newline at end of file
select select
bhrp.id, bhrp.id,
bhrp.post_status,
bhrp.job_title, bhrp.job_title,
bhrp.work_location, bhrp.work_location,
bhrp.job_nature, bhrp.job_nature,
...@@ -12,6 +13,7 @@ left join biz_human_resource_resume bhrr on bhrr.`position` = bhrp.id and bhrr.i ...@@ -12,6 +13,7 @@ left join biz_human_resource_resume bhrr on bhrr.`position` = bhrp.id and bhrr.i
where where
bhrp.is_deleted = 'N' bhrp.is_deleted = 'N'
<< and bhrp.member_id = :memberId >> << and bhrp.member_id = :memberId >>
<< and bhrp.post_status = :postStatus >>
GROUP BY GROUP BY
bhrp.id bhrp.id
order by bhrp.CREATED_TIME desc order by bhrp.CREATED_TIME desc
\ No newline at end of file
package cn.com.poc.human_resources.query; package cn.com.poc.human_resources.query;
import java.io.Serializable; import java.io.Serializable;
...@@ -6,18 +6,27 @@ import java.io.Serializable; ...@@ -6,18 +6,27 @@ import java.io.Serializable;
* Query Condition class for PositionListQuery * Query Condition class for PositionListQuery
*/ */
public class PositionListQueryCondition implements Serializable{ public class PositionListQueryCondition implements Serializable{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private java.lang.Long memberId; private java.lang.Long memberId;
public java.lang.Long getMemberId(){ public java.lang.Long getMemberId(){
return this.memberId; return this.memberId;
} }
public void setMemberId(java.lang.Long memberId){ public void setMemberId(java.lang.Long memberId){
this.memberId = memberId; this.memberId = memberId;
} }
private java.lang.String postStatus;
public String getPostStatus() {
return postStatus;
}
public void setPostStatus(String postStatus) {
this.postStatus = postStatus;
}
} }
\ No newline at end of file
package cn.com.poc.human_resources.query; package cn.com.poc.human_resources.query;
import java.io.Serializable; import java.io.Serializable;
import javax.persistence.Column; import javax.persistence.Column;
...@@ -12,103 +12,120 @@ import cn.com.yict.framemax.data.model.BaseItemClass; ...@@ -12,103 +12,120 @@ import cn.com.yict.framemax.data.model.BaseItemClass;
public class PositionListQueryItem extends BaseItemClass implements Serializable{ public class PositionListQueryItem extends BaseItemClass implements Serializable{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** id /** id
*id *id
*/ */
private java.lang.Long id; private java.lang.Long id;
@Column(name = "id") @Column(name = "id")
public java.lang.Long getId(){ public java.lang.Long getId(){
return this.id; return this.id;
} }
public void setId(java.lang.Long id){ public void setId(java.lang.Long id){
this.id = id; this.id = id;
} }
/**
* post_status
* 发布状态
* DRAFT-草稿
* PUBLISHED - 已发布
*/
private java.lang.String postStatus;
@Column(name = "post_status")
public String getPostStatus() {
return postStatus;
}
public void setPostStatus(String postStatus) {
this.postStatus = postStatus;
}
/** job_title /** job_title
*job_title *job_title
*/ */
private java.lang.String jobTitle; private java.lang.String jobTitle;
@Column(name = "job_title") @Column(name = "job_title")
public java.lang.String getJobTitle(){ public java.lang.String getJobTitle(){
return this.jobTitle; return this.jobTitle;
} }
public void setJobTitle(java.lang.String jobTitle){ public void setJobTitle(java.lang.String jobTitle){
this.jobTitle = jobTitle; this.jobTitle = jobTitle;
} }
/** work_location /** work_location
*work_location *work_location
*/ */
private java.lang.String workLocation; private java.lang.String workLocation;
@Column(name = "work_location") @Column(name = "work_location")
public java.lang.String getWorkLocation(){ public java.lang.String getWorkLocation(){
return this.workLocation; return this.workLocation;
} }
public void setWorkLocation(java.lang.String workLocation){ public void setWorkLocation(java.lang.String workLocation){
this.workLocation = workLocation; this.workLocation = workLocation;
} }
/** job_nature /** job_nature
*job_nature *job_nature
*/ */
private java.lang.String jobNature; private java.lang.String jobNature;
@Column(name = "job_nature") @Column(name = "job_nature")
public java.lang.String getJobNature(){ public java.lang.String getJobNature(){
return this.jobNature; return this.jobNature;
} }
public void setJobNature(java.lang.String jobNature){ public void setJobNature(java.lang.String jobNature){
this.jobNature = jobNature; this.jobNature = jobNature;
} }
/** work_experience /** work_experience
*work_experience *work_experience
*/ */
private java.lang.String workExperience; private java.lang.String workExperience;
@Column(name = "work_experience") @Column(name = "work_experience")
public java.lang.String getWorkExperience(){ public java.lang.String getWorkExperience(){
return this.workExperience; return this.workExperience;
} }
public void setWorkExperience(java.lang.String workExperience){ public void setWorkExperience(java.lang.String workExperience){
this.workExperience = workExperience; this.workExperience = workExperience;
} }
/** member_id /** member_id
*member_id *member_id
*/ */
private java.lang.Long memberId; private java.lang.Long memberId;
@Column(name = "member_id") @Column(name = "member_id")
public java.lang.Long getMemberId(){ public java.lang.Long getMemberId(){
return this.memberId; return this.memberId;
} }
public void setMemberId(java.lang.Long memberId){ public void setMemberId(java.lang.Long memberId){
this.memberId = memberId; this.memberId = memberId;
} }
/** resume_count /** resume_count
*resume_count *resume_count
*/ */
private java.lang.Long resumeCount; private java.lang.Long resumeCount;
@Column(name = "resume_count") @Column(name = "resume_count")
public java.lang.Long getResumeCount(){ public java.lang.Long getResumeCount(){
return this.resumeCount; return this.resumeCount;
} }
public void setResumeCount(java.lang.Long resumeCount){ public void setResumeCount(java.lang.Long resumeCount){
this.resumeCount = resumeCount; this.resumeCount = resumeCount;
} }
} }
\ No newline at end of file
...@@ -63,6 +63,16 @@ public interface HumanResourceRest extends BaseRest { ...@@ -63,6 +63,16 @@ public interface HumanResourceRest extends BaseRest {
*/ */
void deletePositions(@RequestParam Long... positionIds) throws Exception; void deletePositions(@RequestParam Long... positionIds) throws Exception;
/**
* 发布职位-仅用于上架/发布职位
*/
String publishPositions(@RequestParam Long id) throws Exception;
/**
* 下架职位-仅用于下架职位
*/
String unPublishPositions(@RequestParam Long id) throws Exception;
// ------------------------- 简历 -------------------------- // // ------------------------- 简历 -------------------------- //
/** /**
...@@ -96,4 +106,5 @@ public interface HumanResourceRest extends BaseRest { ...@@ -96,4 +106,5 @@ public interface HumanResourceRest extends BaseRest {
* @throws Exception * @throws Exception
*/ */
void deleteResumes(@RequestParam Long... resumeIds) throws Exception; void deleteResumes(@RequestParam Long... resumeIds) throws Exception;
} }
\ No newline at end of file
...@@ -9,6 +9,7 @@ import cn.com.poc.human_resources.dto.*; ...@@ -9,6 +9,7 @@ import cn.com.poc.human_resources.dto.*;
import cn.com.poc.human_resources.entity.BizHumanResourcePositionEntity; import cn.com.poc.human_resources.entity.BizHumanResourcePositionEntity;
import cn.com.poc.human_resources.entity.HumanResourcePositionBaseInfo; import cn.com.poc.human_resources.entity.HumanResourcePositionBaseInfo;
import cn.com.poc.human_resources.rest.HumanResourceRest; import cn.com.poc.human_resources.rest.HumanResourceRest;
import cn.com.poc.support.security.oauth.entity.UserBaseEntity;
import cn.com.yict.framemax.core.exception.BusinessException; import cn.com.yict.framemax.core.exception.BusinessException;
import cn.com.yict.framemax.data.model.PagingInfo; import cn.com.yict.framemax.data.model.PagingInfo;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -82,11 +83,13 @@ public class HumanResourceRestImpl implements HumanResourceRest { ...@@ -82,11 +83,13 @@ public class HumanResourceRestImpl implements HumanResourceRest {
@Override @Override
public List<HumanResourcePositionBaseInfoDto> listPositions(PagingInfo pagingInfo) throws Exception { public List<HumanResourcePositionBaseInfoDto> listPositions(PagingInfo pagingInfo) throws Exception {
List<HumanResourcePositionBaseInfo> humanResourcePositionBaseInfos = humanResourceService.listPositions(BlContext.getCurrentUser().getUserId(), pagingInfo); List<HumanResourcePositionBaseInfo> humanResourcePositionBaseInfos =
humanResourceService.listPositions(BlContext.getCurrentUser().getUserId(), pagingInfo);
return humanResourcePositionBaseInfos.stream() return humanResourcePositionBaseInfos.stream()
.map(info -> { .map(info -> {
HumanResourcePositionBaseInfoDto dto = new HumanResourcePositionBaseInfoDto(); HumanResourcePositionBaseInfoDto dto = new HumanResourcePositionBaseInfoDto();
dto.setId(info.getId()); dto.setId(info.getId());
dto.setPostStatus(info.getPostStatus());
dto.setJobTitle(info.getJobTitle()); dto.setJobTitle(info.getJobTitle());
dto.setWorkLocation(info.getWorkLocation()); dto.setWorkLocation(info.getWorkLocation());
dto.setJobNature(info.getJobNature()); dto.setJobNature(info.getJobNature());
...@@ -99,11 +102,13 @@ public class HumanResourceRestImpl implements HumanResourceRest { ...@@ -99,11 +102,13 @@ public class HumanResourceRestImpl implements HumanResourceRest {
@Override @Override
public HumanResourcePositionDto getPositionDetail(Long positionId) throws Exception { public HumanResourcePositionDto getPositionDetail(Long positionId) throws Exception {
BizHumanResourcePositionEntity positionEntity = humanResourceService.getPositionDetail(BlContext.getCurrentUser().getUserId(), positionId); BizHumanResourcePositionEntity positionEntity =
humanResourceService.getPositionDetail(BlContext.getCurrentUser().getUserId(), positionId);
if (positionEntity == null) { if (positionEntity == null) {
throw new BusinessException("该岗位信息不存在"); throw new BusinessException("该岗位信息不存在");
} }
HumanResourcePositionDto resourcePositionDto = BizHumanResourcePositionConvert.entityToHumanResourcePositionDto(positionEntity); HumanResourcePositionDto resourcePositionDto =
BizHumanResourcePositionConvert.entityToHumanResourcePositionDto(positionEntity);
resourcePositionDto.setId(positionId); resourcePositionDto.setId(positionId);
return resourcePositionDto; return resourcePositionDto;
} }
...@@ -114,6 +119,16 @@ public class HumanResourceRestImpl implements HumanResourceRest { ...@@ -114,6 +119,16 @@ public class HumanResourceRestImpl implements HumanResourceRest {
humanResourceService.deletePositions(BlContext.getCurrentUser().getUserId(), positionIds); humanResourceService.deletePositions(BlContext.getCurrentUser().getUserId(), positionIds);
} }
@Override
public String publishPositions(Long id) throws Exception {
return humanResourceService.publishPositions(id, BlContext.getCurrentUser().getUserId());
}
@Override
public String unPublishPositions(Long id) throws Exception {
return humanResourceService.unPublishPositions(id, BlContext.getCurrentUser().getUserId());
}
@Override @Override
public void saveResume(SaveResumeDto saveResumeDto) throws Exception { public void saveResume(SaveResumeDto saveResumeDto) throws Exception {
Assert.notBlank(saveResumeDto.getFileURL(), "文件不能为空"); Assert.notBlank(saveResumeDto.getFileURL(), "文件不能为空");
...@@ -122,9 +137,11 @@ public class HumanResourceRestImpl implements HumanResourceRest { ...@@ -122,9 +137,11 @@ public class HumanResourceRestImpl implements HumanResourceRest {
Assert.notNull(saveResumeDto.getResume().getInfo(), "简历基础信息不能为空"); Assert.notNull(saveResumeDto.getResume().getInfo(), "简历基础信息不能为空");
Assert.notNull(saveResumeDto.getResume().getTag(), "简历标签信息不能为空"); Assert.notNull(saveResumeDto.getResume().getTag(), "简历标签信息不能为空");
if (saveResumeDto.getId() != null) { if (saveResumeDto.getId() != null) {
humanResourceService.updateResume(saveResumeDto.getId(), BlContext.getCurrentUser().getUserId(), saveResumeDto.getFileURL(), saveResumeDto.getPositionId(), saveResumeDto.getResume()); humanResourceService.updateResume(saveResumeDto.getId(), BlContext.getCurrentUser().getUserId(),
saveResumeDto.getFileURL(), saveResumeDto.getPositionId(), saveResumeDto.getResume());
} else { } else {
humanResourceService.saveResume(BlContext.getCurrentUser().getUserId(), saveResumeDto.getFileURL(), saveResumeDto.getPositionId(), saveResumeDto.getResume()); humanResourceService.saveResume(BlContext.getCurrentUser().getUserId(), saveResumeDto.getFileURL(),
saveResumeDto.getPositionId(), saveResumeDto.getResume());
} }
} }
...@@ -138,7 +155,8 @@ public class HumanResourceRestImpl implements HumanResourceRest { ...@@ -138,7 +155,8 @@ public class HumanResourceRestImpl implements HumanResourceRest {
@Override @Override
public ResumeDto getResumeDetail(Long resumeId) throws Exception { public ResumeDto getResumeDetail(Long resumeId) throws Exception {
return BizHumanResourceResumeConvert.entityToResumeDto(humanResourceService.getResumeDetail(BlContext.getCurrentUser().getUserId(), resumeId)); return BizHumanResourceResumeConvert.entityToResumeDto(
humanResourceService.getResumeDetail(BlContext.getCurrentUser().getUserId(), resumeId));
} }
@Override @Override
......
...@@ -11,7 +11,7 @@ import java.util.List; ...@@ -11,7 +11,7 @@ import java.util.List;
public interface BizHumanResourcePositionService extends BaseService { public interface BizHumanResourcePositionService extends BaseService {
BizHumanResourcePositionEntity get(java.lang.Long id) throws Exception; BizHumanResourcePositionEntity get(java.lang.Long id) ;
List<BizHumanResourcePositionEntity> findByExample(BizHumanResourcePositionEntity example, PagingInfo pagingInfo) throws Exception; List<BizHumanResourcePositionEntity> findByExample(BizHumanResourcePositionEntity example, PagingInfo pagingInfo) throws Exception;
......
...@@ -27,7 +27,7 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl ...@@ -27,7 +27,7 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl
@Resource @Resource
private BizHumanResourcePositionRepository repository; private BizHumanResourcePositionRepository repository;
public BizHumanResourcePositionEntity get(java.lang.Long id) throws Exception { public BizHumanResourcePositionEntity get(java.lang.Long id) {
Assert.notNull(id); Assert.notNull(id);
BizHumanResourcePositionModel model = this.repository.get(id); BizHumanResourcePositionModel model = this.repository.get(id);
if (model == null) { if (model == null) {
...@@ -40,7 +40,8 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl ...@@ -40,7 +40,8 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl
} }
public List<BizHumanResourcePositionEntity> findByExample(BizHumanResourcePositionEntity example, PagingInfo pagingInfo) throws Exception { public List<BizHumanResourcePositionEntity> findByExample(BizHumanResourcePositionEntity example,
PagingInfo pagingInfo) throws Exception {
List<BizHumanResourcePositionEntity> result = new ArrayList<BizHumanResourcePositionEntity>(); List<BizHumanResourcePositionEntity> result = new ArrayList<BizHumanResourcePositionEntity>();
BizHumanResourcePositionModel model = new BizHumanResourcePositionModel(); BizHumanResourcePositionModel model = new BizHumanResourcePositionModel();
if (example != null) { if (example != null) {
...@@ -68,6 +69,9 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl ...@@ -68,6 +69,9 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl
Assert.notNull(entity.getId(), "update pk can not be null"); Assert.notNull(entity.getId(), "update pk can not be null");
BizHumanResourcePositionModel model = this.repository.get(entity.getId()); BizHumanResourcePositionModel model = this.repository.get(entity.getId());
if (entity.getPostStatus() != null) {
model.setPostStatus(entity.getPostStatus());
}
if (entity.getJobTitle() != null) { if (entity.getJobTitle() != null) {
model.setJobTitle(entity.getJobTitle()); model.setJobTitle(entity.getJobTitle());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment