Commit afd2cb4c authored by alex yao's avatar alex yao

feat[AI人力]:简历-查询简历新增模糊匹配

parent 10f82465
......@@ -75,7 +75,6 @@ public interface HumanResourceService {
*/
List<HumanResourcePositionBaseInfo> listPositions(Long userId, PagingInfo pagingInfo) throws Exception;
/**
* 查询职位详情
*
......@@ -140,6 +139,18 @@ public interface HumanResourceService {
List<BizHumanResourceResumeEntity> listResumes(Long userId, Long positionId, PagingInfo pagingInfo)
throws Exception;
/**
* 查询简历列表
*
* @param userId
* @param positionId
* @param query
* @param pagingInfo
*/
List<BizHumanResourceResumeEntity> listResumes(Long userId, Long positionId, String query, PagingInfo pagingInfo)
throws Exception;
/**
* 查询简历详情
*
......
package cn.com.poc.human_resources.aggregate.impl;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import cn.com.gsst.dify_client.DifyChatClient;
import cn.com.gsst.dify_client.DifyClientFactory;
import cn.com.gsst.dify_client.callback.ChatStreamCallback;
......@@ -13,6 +27,7 @@ import cn.com.gsst.dify_client.model.chat.ChatMessage;
import cn.com.gsst.dify_client.model.chat.ChatMessageResponse;
import cn.com.gsst.dify_client.model.file.FileInfo;
import cn.com.poc.common.constant.CommonConstant;
import cn.com.poc.common.utils.DocumentLoad;
import cn.com.poc.common.utils.JsonUtils;
import cn.com.poc.common.utils.SSEUtil;
import cn.com.poc.common.utils.StringUtils;
......@@ -20,6 +35,7 @@ import cn.com.poc.human_resources.aggregate.HumanResourceService;
import cn.com.poc.human_resources.constant.HumanResourcePositionConstant;
import cn.com.poc.human_resources.convert.BizHumanResourceResumeConvert;
import cn.com.poc.human_resources.entity.BizHumanResourcePositionEntity;
import cn.com.poc.human_resources.entity.BizHumanResourceResumeContentEntity;
import cn.com.poc.human_resources.entity.BizHumanResourceResumeEntity;
import cn.com.poc.human_resources.entity.HumanResourcePositionBaseInfo;
import cn.com.poc.human_resources.entity.position.BaseInfo;
......@@ -28,7 +44,11 @@ import cn.com.poc.human_resources.entity.position.Por;
import cn.com.poc.human_resources.entity.resume.Resume;
import cn.com.poc.human_resources.query.PositionListQueryCondition;
import cn.com.poc.human_resources.query.PositionListQueryItem;
import cn.com.poc.human_resources.query.ResumeContentQueryItem;
import cn.com.poc.human_resources.query.ResumeQueryCondition;
import cn.com.poc.human_resources.query.ResumeQueryItem;
import cn.com.poc.human_resources.service.BizHumanResourcePositionService;
import cn.com.poc.human_resources.service.BizHumanResourceResumeContentService;
import cn.com.poc.human_resources.service.BizHumanResourceResumeService;
import cn.com.poc.thirdparty.resource.demand.ai.entity.largemodel.LargeModelDemandResult;
import cn.com.yict.framemax.core.exception.BusinessException;
......@@ -41,14 +61,6 @@ import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
* @author alex.yao
* @date 2025/9/28
......@@ -64,6 +76,9 @@ public class HumanResourceServiceImpl implements HumanResourceService {
@Resource
private BizHumanResourceResumeService bizHumanResourceResumeService;
@Resource
private BizHumanResourceResumeContentService bizHumanResourceResumeContentService;
@Override
@Retryable(value = Exception.class, maxAttempts = 2, backoff = @Backoff(delay = 1000, multiplier = 2))
public Resume uploadResume(String fileURL, Long positionId, Long userId) throws Exception {
......@@ -102,10 +117,16 @@ public class HumanResourceServiceImpl implements HumanResourceService {
if (resume == null) {
throw new BusinessException("提取简历异常");
}
BizHumanResourceResumeEntity bizHumanResourceResumeEntity =
this.saveResume(userId, fileURL, positionId, resume);
if (bizHumanResourceResumeEntity == null) {
throw new BusinessException("保存简历信息失败");
}
this.saveResumeContent(fileURL, positionId, bizHumanResourceResumeEntity.getId());
return resume;
}
@Override
public void positionAssistant(String demand, String type, String fileInfos, String jobInformation, String question,
String dialoguesId, Long userId)
......@@ -306,12 +327,35 @@ public class HumanResourceServiceImpl implements HumanResourceService {
@Override
public List<BizHumanResourceResumeEntity> listResumes(Long userId, Long positionId, PagingInfo pagingInfo)
throws Exception {
BizHumanResourceResumeEntity bizHumanResourceResumeEntity = new BizHumanResourceResumeEntity();
bizHumanResourceResumeEntity.setMemberId(userId);
bizHumanResourceResumeEntity.setPosition(positionId);
bizHumanResourceResumeEntity.setIsDeleted(CommonConstant.IsDeleted.N);
return bizHumanResourceResumeService.findByExample(bizHumanResourceResumeEntity, pagingInfo).stream()
.sorted(Comparator.comparing(BizHumanResourceResumeEntity::getCreatedTime).reversed())
ResumeQueryCondition condition = new ResumeQueryCondition();
condition.setPositionId(positionId);
condition.setMemberId(userId);
List<ResumeQueryItem> resumeQueryItems = bizHumanResourceResumeService.resumeQuery(condition, pagingInfo);
return resumeQueryItems.stream().map(BizHumanResourceResumeConvert::resumeQueryItemToEntity)
.collect(Collectors.toList());
}
@Override
public List<BizHumanResourceResumeEntity> listResumes(Long userId, Long positionId, String query,
PagingInfo pagingInfo) throws Exception {
if (StringUtils.isBlank(query)) {
return listResumes(userId, positionId, pagingInfo);
}
List<ResumeContentQueryItem> resumeContentQueryItems =
bizHumanResourceResumeContentService.searchByResumeContent(query, positionId);
if (CollectionUtils.isEmpty(resumeContentQueryItems)) {
return Collections.emptyList();
}
List<Long> ids =
resumeContentQueryItems.stream().map(ResumeContentQueryItem::getResumeId).collect(Collectors.toList());
ResumeQueryCondition condition = new ResumeQueryCondition();
condition.setIds(ids);
condition.setPositionId(positionId);
condition.setMemberId(userId);
List<ResumeQueryItem> resumeQueryItems = bizHumanResourceResumeService.resumeQuery(condition, pagingInfo);
return resumeQueryItems.stream().map(BizHumanResourceResumeConvert::resumeQueryItemToEntity)
.collect(Collectors.toList());
}
......@@ -345,4 +389,16 @@ public class HumanResourceServiceImpl implements HumanResourceService {
}
}
}
private void saveResumeContent(String fileURL, Long positionId, Long resumeId) throws Exception {
File file = DocumentLoad.downloadURLDocument(fileURL);
String resumeContent = DocumentLoad.documentToText(file);
BizHumanResourceResumeContentEntity bizHumanResourceResumeContentEntity =
new BizHumanResourceResumeContentEntity();
bizHumanResourceResumeContentEntity.setResumeId(resumeId);
bizHumanResourceResumeContentEntity.setPositionId(positionId);
bizHumanResourceResumeContentEntity.setResumeContent(resumeContent);
bizHumanResourceResumeContentService.save(bizHumanResourceResumeContentEntity);
file.delete();
}
}
package cn.com.poc.human_resources.convert;
import cn.com.poc.human_resources.model.BizHumanResourceResumeContentModel;
import cn.com.poc.human_resources.entity.BizHumanResourceResumeContentEntity;
import cn.com.poc.human_resources.dto.BizHumanResourceResumeContentDto;
import cn.com.poc.human_resources.query.ResumeContentQueryItem;
public class BizHumanResourceResumeContentConvert {
public static BizHumanResourceResumeContentEntity modelToEntity(BizHumanResourceResumeContentModel model) {
BizHumanResourceResumeContentEntity entity = new BizHumanResourceResumeContentEntity();
entity.setId(model.getId());
entity.setResumeId(model.getResumeId());
entity.setPositionId(model.getPositionId());
entity.setResumeContent(model.getResumeContent());
entity.setIsDeleted(model.getIsDeleted());
entity.setCreator(model.getCreator());
entity.setCreatedTime(model.getCreatedTime());
entity.setModifier(model.getModifier());
entity.setModifiedTime(model.getModifiedTime());
entity.setSysVersion(model.getSysVersion());
return entity;
}
public static BizHumanResourceResumeContentModel entityToModel(BizHumanResourceResumeContentEntity entity) {
BizHumanResourceResumeContentModel model = new BizHumanResourceResumeContentModel();
model.setId(entity.getId());
model.setResumeId(entity.getResumeId());
model.setPositionId(entity.getPositionId());
model.setResumeContent(entity.getResumeContent());
model.setIsDeleted(entity.getIsDeleted());
model.setCreator(entity.getCreator());
model.setCreatedTime(entity.getCreatedTime());
model.setModifier(entity.getModifier());
model.setModifiedTime(entity.getModifiedTime());
model.setSysVersion(entity.getSysVersion());
return model;
}
public static BizHumanResourceResumeContentDto entityToDto(BizHumanResourceResumeContentEntity entity) {
BizHumanResourceResumeContentDto dto = new BizHumanResourceResumeContentDto();
dto.setId(entity.getId());
dto.setResumeId(entity.getResumeId());
dto.setPositionId(entity.getPositionId());
dto.setResumeContent(entity.getResumeContent());
dto.setIsDeleted(entity.getIsDeleted());
dto.setCreator(entity.getCreator());
dto.setCreatedTime(entity.getCreatedTime());
dto.setModifier(entity.getModifier());
dto.setModifiedTime(entity.getModifiedTime());
dto.setSysVersion(entity.getSysVersion());
return dto;
}
public static BizHumanResourceResumeContentEntity dtoToEntity(BizHumanResourceResumeContentDto dto) {
BizHumanResourceResumeContentEntity entity = new BizHumanResourceResumeContentEntity();
entity.setId(dto.getId());
entity.setResumeId(dto.getResumeId());
entity.setPositionId(dto.getPositionId());
entity.setResumeContent(dto.getResumeContent());
entity.setIsDeleted(dto.getIsDeleted());
entity.setCreator(dto.getCreator());
entity.setCreatedTime(dto.getCreatedTime());
entity.setModifier(dto.getModifier());
entity.setModifiedTime(dto.getModifiedTime());
entity.setSysVersion(dto.getSysVersion());
return entity;
}
public static BizHumanResourceResumeContentEntity itemToEntity(ResumeContentQueryItem item) {
BizHumanResourceResumeContentEntity bizHumanResourceResumeContentEntity =
new BizHumanResourceResumeContentEntity();
bizHumanResourceResumeContentEntity.setId(item.getId());
bizHumanResourceResumeContentEntity.setResumeId(item.getResumeId());
bizHumanResourceResumeContentEntity.setPositionId(item.getPositionId());
bizHumanResourceResumeContentEntity.setResumeContent(item.getResumeContent());
bizHumanResourceResumeContentEntity.setIsDeleted(item.getIsDeleted());
bizHumanResourceResumeContentEntity.setCreator(item.getCreator());
bizHumanResourceResumeContentEntity.setCreatedTime(item.getCreatedTime());
bizHumanResourceResumeContentEntity.setModifier(item.getModifier());
bizHumanResourceResumeContentEntity.setModifiedTime(item.getModifiedTime());
bizHumanResourceResumeContentEntity.setSysVersion(item.getSysVersion());
return bizHumanResourceResumeContentEntity;
}
}
\ No newline at end of file
......@@ -9,6 +9,7 @@ import cn.com.poc.human_resources.entity.resume.Info;
import cn.com.poc.human_resources.entity.resume.Resume;
import cn.com.poc.human_resources.entity.resume.Tag;
import cn.com.poc.human_resources.model.BizHumanResourceResumeModel;
import cn.com.poc.human_resources.query.ResumeQueryItem;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.type.TypeReference;
......@@ -16,7 +17,6 @@ import com.fasterxml.jackson.core.type.TypeReference;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.stream.Collectors;
public class BizHumanResourceResumeConvert {
......@@ -215,4 +215,33 @@ public class BizHumanResourceResumeConvert {
bizHumanResourceResumeEntity.setMatchedDegree(Long.valueOf(resume.getTag().getMatchedDegree()));
return bizHumanResourceResumeEntity;
}
public static BizHumanResourceResumeEntity resumeQueryItemToEntity(ResumeQueryItem resumeQueryItem) {
BizHumanResourceResumeEntity bizHumanResourceResumeEntity = new BizHumanResourceResumeEntity();
bizHumanResourceResumeEntity.setId(resumeQueryItem.getId());
bizHumanResourceResumeEntity.setPosition(resumeQueryItem.getPosition());
bizHumanResourceResumeEntity.setName(resumeQueryItem.getName());
bizHumanResourceResumeEntity.setFileUrl(resumeQueryItem.getFileUrl());
bizHumanResourceResumeEntity.setCurrentPosition(resumeQueryItem.getCurrentPosition());
bizHumanResourceResumeEntity.setCoreSkills(resumeQueryItem.getCoreSkills());
bizHumanResourceResumeEntity.setEducationLevel(resumeQueryItem.getEducationLevel());
bizHumanResourceResumeEntity.setEducationBackground(resumeQueryItem.getEducationBackground());
bizHumanResourceResumeEntity.setEducationExperience(resumeQueryItem.getEducationExperience());
bizHumanResourceResumeEntity.setGenderAndAge(resumeQueryItem.getGenderAndAge());
bizHumanResourceResumeEntity.setOccupationalHistory(resumeQueryItem.getOccupationalHistory());
bizHumanResourceResumeEntity.setOther(resumeQueryItem.getOther());
bizHumanResourceResumeEntity.setWorkExperience(resumeQueryItem.getWorkExperience());
bizHumanResourceResumeEntity.setWorkLocation(resumeQueryItem.getWorkLocation());
bizHumanResourceResumeEntity.setLabel(resumeQueryItem.getLabel());
bizHumanResourceResumeEntity.setEvaluate(resumeQueryItem.getEvaluate());
bizHumanResourceResumeEntity.setMatchedDegree(resumeQueryItem.getMatchedDegree());
bizHumanResourceResumeEntity.setMemberId(resumeQueryItem.getMemberId());
bizHumanResourceResumeEntity.setIsDeleted(resumeQueryItem.getIsDeleted());
bizHumanResourceResumeEntity.setCreator(resumeQueryItem.getCreator());
bizHumanResourceResumeEntity.setCreatedTime(resumeQueryItem.getCreatedTime());
bizHumanResourceResumeEntity.setModifier(resumeQueryItem.getModifier());
bizHumanResourceResumeEntity.setModifiedTime(resumeQueryItem.getModifiedTime());
bizHumanResourceResumeEntity.setSysVersion(resumeQueryItem.getSysVersion());
return bizHumanResourceResumeEntity;
}
}
package cn.com.poc.human_resources.dto;
public class BizHumanResourceResumeContentDto {
private static final long serialVersionUID = 1L;
/** id
*主键id
*/
private java.lang.Long id;
public java.lang.Long getId(){
return this.id;
}
public void setId(java.lang.Long id){
this.id = id;
}
/** resume_id
*resource_resume 主键关联
*/
private java.lang.Long resumeId;
public java.lang.Long getResumeId(){
return this.resumeId;
}
public void setResumeId(java.lang.Long resumeId){
this.resumeId = resumeId;
}
/** position_id
*职位关联
*/
private java.lang.Long positionId;
public java.lang.Long getPositionId(){
return this.positionId;
}
public void setPositionId(java.lang.Long positionId){
this.positionId = positionId;
}
/** resume_content
*简历文本
*/
private java.lang.String resumeContent;
public java.lang.String getResumeContent(){
return this.resumeContent;
}
public void setResumeContent(java.lang.String resumeContent){
this.resumeContent = resumeContent;
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
private java.lang.String isDeleted;
public java.lang.String getIsDeleted(){
return this.isDeleted;
}
public void setIsDeleted(java.lang.String isDeleted){
this.isDeleted = isDeleted;
}
/** CREATOR
*创建人
*/
private java.lang.String creator;
public java.lang.String getCreator(){
return this.creator;
}
public void setCreator(java.lang.String creator){
this.creator = creator;
}
/** CREATED_TIME
*创建时间
*/
private java.util.Date createdTime;
public java.util.Date getCreatedTime(){
return this.createdTime;
}
public void setCreatedTime(java.util.Date createdTime){
this.createdTime = createdTime;
}
/** MODIFIER
*修改人
*/
private java.lang.String modifier;
public java.lang.String getModifier(){
return this.modifier;
}
public void setModifier(java.lang.String modifier){
this.modifier = modifier;
}
/** MODIFIED_TIME
*修改时间
*/
private java.util.Date modifiedTime;
public java.util.Date getModifiedTime(){
return this.modifiedTime;
}
public void setModifiedTime(java.util.Date modifiedTime){
this.modifiedTime = modifiedTime;
}
/** SYS_VERSION
*乐观锁,版本号
*/
private java.lang.Integer sysVersion;
public java.lang.Integer getSysVersion(){
return this.sysVersion;
}
public void setSysVersion(java.lang.Integer sysVersion){
this.sysVersion = sysVersion;
}
}
\ No newline at end of file
package cn.com.poc.human_resources.entity;
public class BizHumanResourceResumeContentEntity {
private static final long serialVersionUID = 1L;
/** id
*主键id
*/
private java.lang.Long id;
public java.lang.Long getId(){
return this.id;
}
public void setId(java.lang.Long id){
this.id = id;
}
/** resume_id
*resource_resume 主键关联
*/
private java.lang.Long resumeId;
public java.lang.Long getResumeId(){
return this.resumeId;
}
public void setResumeId(java.lang.Long resumeId){
this.resumeId = resumeId;
}
/** position_id
*职位关联
*/
private java.lang.Long positionId;
public java.lang.Long getPositionId(){
return this.positionId;
}
public void setPositionId(java.lang.Long positionId){
this.positionId = positionId;
}
/** resume_content
*简历文本
*/
private java.lang.String resumeContent;
public java.lang.String getResumeContent(){
return this.resumeContent;
}
public void setResumeContent(java.lang.String resumeContent){
this.resumeContent = resumeContent;
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
private java.lang.String isDeleted;
public java.lang.String getIsDeleted(){
return this.isDeleted;
}
public void setIsDeleted(java.lang.String isDeleted){
this.isDeleted = isDeleted;
}
/** CREATOR
*创建人
*/
private java.lang.String creator;
public java.lang.String getCreator(){
return this.creator;
}
public void setCreator(java.lang.String creator){
this.creator = creator;
}
/** CREATED_TIME
*创建时间
*/
private java.util.Date createdTime;
public java.util.Date getCreatedTime(){
return this.createdTime;
}
public void setCreatedTime(java.util.Date createdTime){
this.createdTime = createdTime;
}
/** MODIFIER
*修改人
*/
private java.lang.String modifier;
public java.lang.String getModifier(){
return this.modifier;
}
public void setModifier(java.lang.String modifier){
this.modifier = modifier;
}
/** MODIFIED_TIME
*修改时间
*/
private java.util.Date modifiedTime;
public java.util.Date getModifiedTime(){
return this.modifiedTime;
}
public void setModifiedTime(java.util.Date modifiedTime){
this.modifiedTime = modifiedTime;
}
/** SYS_VERSION
*乐观锁,版本号
*/
private java.lang.Integer sysVersion;
public java.lang.Integer getSysVersion(){
return this.sysVersion;
}
public void setSysVersion(java.lang.Integer sysVersion){
this.sysVersion = sysVersion;
}
}
\ No newline at end of file
package cn.com.poc.human_resources.model;
import java.io.Serializable;
import cn.com.yict.framemax.data.model.BaseModelClass;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Id;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Version;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
/**
* Model class for biz_human_resource_resume_content
* 简历全文
*/
@Entity
@Table(name = "biz_human_resource_resume_content")
@DynamicInsert
@DynamicUpdate
public class BizHumanResourceResumeContentModel extends BaseModelClass implements Serializable {
private static final long serialVersionUID = 1L;
/** id
*主键id
*/
private java.lang.Long id;
@Column(name = "id",length = 19)
@Id @GeneratedValue(strategy = GenerationType.AUTO)
public java.lang.Long getId(){
return this.id;
}
public void setId(java.lang.Long id){
this.id = id;
super.addValidField("id");
}
/** resume_id
*resource_resume 主键关联
*/
private java.lang.Long resumeId;
@Column(name = "resume_id",length = 19)
public java.lang.Long getResumeId(){
return this.resumeId;
}
public void setResumeId(java.lang.Long resumeId){
this.resumeId = resumeId;
super.addValidField("resumeId");
}
/** position_id
*职位关联
*/
private java.lang.Long positionId;
@Column(name = "position_id",length = 19)
public java.lang.Long getPositionId(){
return this.positionId;
}
public void setPositionId(java.lang.Long positionId){
this.positionId = positionId;
super.addValidField("positionId");
}
/** resume_content
*简历文本
*/
private java.lang.String resumeContent;
@Column(name = "resume_content",length = 2147483647)
public java.lang.String getResumeContent(){
return this.resumeContent;
}
public void setResumeContent(java.lang.String resumeContent){
this.resumeContent = resumeContent;
super.addValidField("resumeContent");
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
private java.lang.String isDeleted;
@Column(name = "is_deleted",length = 1)
public java.lang.String getIsDeleted(){
return this.isDeleted;
}
public void setIsDeleted(java.lang.String isDeleted){
this.isDeleted = isDeleted;
super.addValidField("isDeleted");
}
/** CREATOR
*创建人
*/
private java.lang.String creator;
@Column(name = "CREATOR",length = 225)
public java.lang.String getCreator(){
return this.creator;
}
public void setCreator(java.lang.String creator){
this.creator = creator;
super.addValidField("creator");
}
/** CREATED_TIME
*创建时间
*/
private java.util.Date createdTime;
@Column(name = "CREATED_TIME",length = 19)
public java.util.Date getCreatedTime(){
return this.createdTime;
}
public void setCreatedTime(java.util.Date createdTime){
this.createdTime = createdTime;
super.addValidField("createdTime");
}
/** MODIFIER
*修改人
*/
private java.lang.String modifier;
@Column(name = "MODIFIER",length = 225)
public java.lang.String getModifier(){
return this.modifier;
}
public void setModifier(java.lang.String modifier){
this.modifier = modifier;
super.addValidField("modifier");
}
/** MODIFIED_TIME
*修改时间
*/
private java.util.Date modifiedTime;
@Column(name = "MODIFIED_TIME",length = 19)
public java.util.Date getModifiedTime(){
return this.modifiedTime;
}
public void setModifiedTime(java.util.Date modifiedTime){
this.modifiedTime = modifiedTime;
super.addValidField("modifiedTime");
}
/** SYS_VERSION
*乐观锁,版本号
*/
private java.lang.Integer sysVersion;
@Column(name = "SYS_VERSION",length = 10)
@Version
public java.lang.Integer getSysVersion(){
return this.sysVersion;
}
public void setSysVersion(java.lang.Integer sysVersion){
this.sysVersion = sysVersion;
super.addValidField("sysVersion");
}
}
\ No newline at end of file
select
id,
resume_id,
position_id,
resume_content,
is_deleted,
CREATOR,
CREATED_TIME,
MODIFIER,
MODIFIED_TIME,
SYS_VERSION
from
biz_human_resource_resume_content
where is_deleted = 'N'
<< and LOCATE(:query,resume_content) >>
<< and position_id = :positionId >>
\ No newline at end of file
package cn.com.poc.human_resources.query;
import java.io.Serializable;
/**
* Query Condition class for ResumeContentQuery
*/
public class ResumeContentQueryCondition implements Serializable{
private static final long serialVersionUID = 1L;
private java.lang.String query;
public java.lang.String getQuery(){
return this.query;
}
public void setQuery(java.lang.String query){
this.query = query;
}
private java.lang.Long positionId;
public java.lang.Long getPositionId(){
return this.positionId;
}
public void setPositionId(java.lang.Long positionId){
this.positionId = positionId;
}
}
\ No newline at end of file
package cn.com.poc.human_resources.query;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import cn.com.yict.framemax.data.model.BaseItemClass;
/**
* Query Item class for ResumeContentQuery
*/
@Entity
public class ResumeContentQueryItem extends BaseItemClass implements Serializable{
private static final long serialVersionUID = 1L;
/** id
*id
*/
private java.lang.Long id;
@Column(name = "id")
public java.lang.Long getId(){
return this.id;
}
public void setId(java.lang.Long id){
this.id = id;
}
/** resume_id
*resume_id
*/
private java.lang.Long resumeId;
@Column(name = "resume_id")
public java.lang.Long getResumeId(){
return this.resumeId;
}
public void setResumeId(java.lang.Long resumeId){
this.resumeId = resumeId;
}
/** position_id
*position_id
*/
private java.lang.Long positionId;
@Column(name = "position_id")
public java.lang.Long getPositionId(){
return this.positionId;
}
public void setPositionId(java.lang.Long positionId){
this.positionId = positionId;
}
/** resume_content
*resume_content
*/
private java.lang.String resumeContent;
@Column(name = "resume_content")
public java.lang.String getResumeContent(){
return this.resumeContent;
}
public void setResumeContent(java.lang.String resumeContent){
this.resumeContent = resumeContent;
}
/** is_deleted
*is_deleted
*/
private java.lang.String isDeleted;
@Column(name = "is_deleted")
public java.lang.String getIsDeleted(){
return this.isDeleted;
}
public void setIsDeleted(java.lang.String isDeleted){
this.isDeleted = isDeleted;
}
/** CREATOR
*CREATOR
*/
private java.lang.String creator;
@Column(name = "CREATOR")
public java.lang.String getCreator(){
return this.creator;
}
public void setCreator(java.lang.String creator){
this.creator = creator;
}
/** CREATED_TIME
*CREATED_TIME
*/
private java.util.Date createdTime;
@Column(name = "CREATED_TIME")
public java.util.Date getCreatedTime(){
return this.createdTime;
}
public void setCreatedTime(java.util.Date createdTime){
this.createdTime = createdTime;
}
/** MODIFIER
*MODIFIER
*/
private java.lang.String modifier;
@Column(name = "MODIFIER")
public java.lang.String getModifier(){
return this.modifier;
}
public void setModifier(java.lang.String modifier){
this.modifier = modifier;
}
/** MODIFIED_TIME
*MODIFIED_TIME
*/
private java.util.Date modifiedTime;
@Column(name = "MODIFIED_TIME")
public java.util.Date getModifiedTime(){
return this.modifiedTime;
}
public void setModifiedTime(java.util.Date modifiedTime){
this.modifiedTime = modifiedTime;
}
/** SYS_VERSION
*SYS_VERSION
*/
private java.lang.Integer sysVersion;
@Column(name = "SYS_VERSION")
public java.lang.Integer getSysVersion(){
return this.sysVersion;
}
public void setSysVersion(java.lang.Integer sysVersion){
this.sysVersion = sysVersion;
}
}
\ No newline at end of file
select
id,
`position`,
name,
file_url,
current_position,
core_skills,
education_level,
education_background,
education_experience,
gender_and_age,
occupational_history,
other,
work_experience,
work_location,
label,
evaluate,
matched_degree,
member_id,
is_deleted,
CREATOR,
CREATED_TIME,
MODIFIER,
MODIFIED_TIME,
SYS_VERSION
from
biz_human_resource_resume
where is_deleted = 'N'
<< and id in (:ids) >>
<< and member_id = :memberId >>
<< and `position` = :positionId >>
order by created_time desc
\ No newline at end of file
package cn.com.poc.human_resources.query;
import java.io.Serializable;
import java.util.List;
/**
* Query Condition class for ResumeQuery
*/
public class ResumeQueryCondition implements Serializable {
private static final long serialVersionUID = 1L;
private List<Long> ids;
public List<Long> getIds() {
return ids;
}
public void setIds(List<Long> ids) {
this.ids = ids;
}
private java.lang.Long memberId;
public java.lang.Long getMemberId() {
return this.memberId;
}
public void setMemberId(java.lang.Long memberId) {
this.memberId = memberId;
}
private java.lang.Long positionId;
public java.lang.Long getPositionId() {
return this.positionId;
}
public void setPositionId(java.lang.Long positionId) {
this.positionId = positionId;
}
}
\ No newline at end of file
package cn.com.poc.human_resources.query;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import cn.com.yict.framemax.data.model.BaseItemClass;
/**
* Query Item class for ResumeQuery
*/
@Entity
public class ResumeQueryItem extends BaseItemClass implements Serializable{
private static final long serialVersionUID = 1L;
/** id
*id
*/
private java.lang.Long id;
@Column(name = "id")
public java.lang.Long getId(){
return this.id;
}
public void setId(java.lang.Long id){
this.id = id;
}
/** position
*position
*/
private java.lang.Long position;
@Column(name = "position")
public java.lang.Long getPosition(){
return this.position;
}
public void setPosition(java.lang.Long position){
this.position = position;
}
/** name
*name
*/
private java.lang.String name;
@Column(name = "name")
public java.lang.String getName(){
return this.name;
}
public void setName(java.lang.String name){
this.name = name;
}
/** file_url
*file_url
*/
private java.lang.String fileUrl;
@Column(name = "file_url")
public java.lang.String getFileUrl(){
return this.fileUrl;
}
public void setFileUrl(java.lang.String fileUrl){
this.fileUrl = fileUrl;
}
/** current_position
*current_position
*/
private java.lang.String currentPosition;
@Column(name = "current_position")
public java.lang.String getCurrentPosition(){
return this.currentPosition;
}
public void setCurrentPosition(java.lang.String currentPosition){
this.currentPosition = currentPosition;
}
/** core_skills
*core_skills
*/
private java.lang.String coreSkills;
@Column(name = "core_skills")
public java.lang.String getCoreSkills(){
return this.coreSkills;
}
public void setCoreSkills(java.lang.String coreSkills){
this.coreSkills = coreSkills;
}
/** education_level
*education_level
*/
private java.lang.Integer educationLevel;
@Column(name = "education_level")
public java.lang.Integer getEducationLevel(){
return this.educationLevel;
}
public void setEducationLevel(java.lang.Integer educationLevel){
this.educationLevel = educationLevel;
}
/** education_background
*education_background
*/
private java.lang.String educationBackground;
@Column(name = "education_background")
public java.lang.String getEducationBackground(){
return this.educationBackground;
}
public void setEducationBackground(java.lang.String educationBackground){
this.educationBackground = educationBackground;
}
/** education_experience
*education_experience
*/
private java.lang.String educationExperience;
@Column(name = "education_experience")
public java.lang.String getEducationExperience(){
return this.educationExperience;
}
public void setEducationExperience(java.lang.String educationExperience){
this.educationExperience = educationExperience;
}
/** gender_and_age
*gender_and_age
*/
private java.lang.String genderAndAge;
@Column(name = "gender_and_age")
public java.lang.String getGenderAndAge(){
return this.genderAndAge;
}
public void setGenderAndAge(java.lang.String genderAndAge){
this.genderAndAge = genderAndAge;
}
/** occupational_history
*occupational_history
*/
private java.lang.String occupationalHistory;
@Column(name = "occupational_history")
public java.lang.String getOccupationalHistory(){
return this.occupationalHistory;
}
public void setOccupationalHistory(java.lang.String occupationalHistory){
this.occupationalHistory = occupationalHistory;
}
/** other
*other
*/
private java.lang.String other;
@Column(name = "other")
public java.lang.String getOther(){
return this.other;
}
public void setOther(java.lang.String other){
this.other = other;
}
/** work_experience
*work_experience
*/
private java.lang.String workExperience;
@Column(name = "work_experience")
public java.lang.String getWorkExperience(){
return this.workExperience;
}
public void setWorkExperience(java.lang.String workExperience){
this.workExperience = workExperience;
}
/** work_location
*work_location
*/
private java.lang.String workLocation;
@Column(name = "work_location")
public java.lang.String getWorkLocation(){
return this.workLocation;
}
public void setWorkLocation(java.lang.String workLocation){
this.workLocation = workLocation;
}
/** label
*label
*/
private java.lang.String label;
@Column(name = "label")
public java.lang.String getLabel(){
return this.label;
}
public void setLabel(java.lang.String label){
this.label = label;
}
/** evaluate
*evaluate
*/
private java.lang.String evaluate;
@Column(name = "evaluate")
public java.lang.String getEvaluate(){
return this.evaluate;
}
public void setEvaluate(java.lang.String evaluate){
this.evaluate = evaluate;
}
/** matched_degree
*matched_degree
*/
private java.lang.Long matchedDegree;
@Column(name = "matched_degree")
public java.lang.Long getMatchedDegree(){
return this.matchedDegree;
}
public void setMatchedDegree(java.lang.Long matchedDegree){
this.matchedDegree = matchedDegree;
}
/** member_id
*member_id
*/
private java.lang.Long memberId;
@Column(name = "member_id")
public java.lang.Long getMemberId(){
return this.memberId;
}
public void setMemberId(java.lang.Long memberId){
this.memberId = memberId;
}
/** is_deleted
*is_deleted
*/
private java.lang.String isDeleted;
@Column(name = "is_deleted")
public java.lang.String getIsDeleted(){
return this.isDeleted;
}
public void setIsDeleted(java.lang.String isDeleted){
this.isDeleted = isDeleted;
}
/** CREATOR
*CREATOR
*/
private java.lang.String creator;
@Column(name = "CREATOR")
public java.lang.String getCreator(){
return this.creator;
}
public void setCreator(java.lang.String creator){
this.creator = creator;
}
/** CREATED_TIME
*CREATED_TIME
*/
private java.util.Date createdTime;
@Column(name = "CREATED_TIME")
public java.util.Date getCreatedTime(){
return this.createdTime;
}
public void setCreatedTime(java.util.Date createdTime){
this.createdTime = createdTime;
}
/** MODIFIER
*MODIFIER
*/
private java.lang.String modifier;
@Column(name = "MODIFIER")
public java.lang.String getModifier(){
return this.modifier;
}
public void setModifier(java.lang.String modifier){
this.modifier = modifier;
}
/** MODIFIED_TIME
*MODIFIED_TIME
*/
private java.util.Date modifiedTime;
@Column(name = "MODIFIED_TIME")
public java.util.Date getModifiedTime(){
return this.modifiedTime;
}
public void setModifiedTime(java.util.Date modifiedTime){
this.modifiedTime = modifiedTime;
}
/** SYS_VERSION
*SYS_VERSION
*/
private java.lang.Integer sysVersion;
@Column(name = "SYS_VERSION")
public java.lang.Integer getSysVersion(){
return this.sysVersion;
}
public void setSysVersion(java.lang.Integer sysVersion){
this.sysVersion = sysVersion;
}
}
\ No newline at end of file
package cn.com.poc.human_resources.repository;
import cn.com.yict.framemax.data.repository.Repository;
import cn.com.poc.human_resources.model.BizHumanResourceResumeContentModel;
public interface BizHumanResourceResumeContentRepository extends Repository<BizHumanResourceResumeContentModel,java.lang.Long> {
}
\ No newline at end of file
......@@ -87,8 +87,10 @@ public interface HumanResourceRest extends BaseRest {
* 查询简历列表
*
* @param positionId 岗位ID
* @param query 查询
*/
List<ResumeDto> listResumes(@RequestParam Long positionId, PagingInfo pagingInfo) throws Exception;
List<ResumeDto> listResumes(@RequestParam Long positionId, @RequestParam(required = false) String query,
PagingInfo pagingInfo) throws Exception;
/**
* 查询简历详情
......
......@@ -9,7 +9,6 @@ import cn.com.poc.human_resources.dto.*;
import cn.com.poc.human_resources.entity.BizHumanResourcePositionEntity;
import cn.com.poc.human_resources.entity.HumanResourcePositionBaseInfo;
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.data.model.PagingInfo;
import org.springframework.stereotype.Component;
......@@ -146,8 +145,8 @@ public class HumanResourceRestImpl implements HumanResourceRest {
}
@Override
public List<ResumeDto> listResumes(Long positionId, PagingInfo pagingInfo) throws Exception {
return humanResourceService.listResumes(BlContext.getCurrentUser().getUserId(), positionId, pagingInfo)
public List<ResumeDto> listResumes(Long positionId, String query, PagingInfo pagingInfo) throws Exception {
return humanResourceService.listResumes(BlContext.getCurrentUser().getUserId(), positionId, query, pagingInfo)
.stream()
.map(BizHumanResourceResumeConvert::entityToResumeDto)
.collect(Collectors.toList());
......
package cn.com.poc.human_resources.scheduler;
import javax.annotation.Resource;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import cn.com.poc.common.constant.CommonConstant;
import cn.com.poc.common.utils.DocumentLoad;
import cn.com.poc.human_resources.entity.BizHumanResourceResumeContentEntity;
import cn.com.poc.human_resources.entity.BizHumanResourceResumeEntity;
import cn.com.poc.human_resources.service.BizHumanResourceResumeContentService;
import cn.com.poc.human_resources.service.BizHumanResourceResumeService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* AI人力-定时任务
*
* @author alex.yao
* @date 2025/12/24
*/
@Component
public class HumanResourceScheduler {
@Resource
private BizHumanResourceResumeService bizHumanResourceResumeService;
@Resource
private BizHumanResourceResumeContentService bizHumanResourceResumeContentService;
/**
* 简历内容补全
* 对 biz_human_resource_resume_content 内容补全,30分钟一次,用于第一次发布
*/
@Scheduled(fixedDelay = 10000 * 30)
public void resumeContentComplete() throws Exception {
BizHumanResourceResumeEntity bizHumanResourceResumeEntity = new BizHumanResourceResumeEntity();
bizHumanResourceResumeEntity.setIsDeleted(CommonConstant.IsDeleted.N);
List<BizHumanResourceResumeEntity> resourceResumeEntities =
bizHumanResourceResumeService.findByExample(bizHumanResourceResumeEntity, null);
if (resourceResumeEntities == null) {
return;
}
BizHumanResourceResumeContentEntity bizHumanResourceResumeContentEntity =
new BizHumanResourceResumeContentEntity();
bizHumanResourceResumeContentEntity.setIsDeleted(CommonConstant.IsDeleted.N);
List<BizHumanResourceResumeContentEntity> resourceResumeContentEntities =
bizHumanResourceResumeContentService.findByExample(bizHumanResourceResumeContentEntity, null);
List<BizHumanResourceResumeContentEntity> saveResumeContentEntities = new ArrayList<>();
for (BizHumanResourceResumeEntity resourceResumeEntity : resourceResumeEntities) {
Long resumeId = resourceResumeEntity.getId();
Long positionId = resourceResumeEntity.getPosition();
boolean match = resourceResumeContentEntities.stream()
.anyMatch(v -> v.getResumeId().equals(resumeId) && v.getPositionId().equals(positionId));
if (!match) {
String fileUrl = resourceResumeEntity.getFileUrl();
File file = DocumentLoad.downloadURLDocument(fileUrl);
String resumeContent = DocumentLoad.documentToText(file);
BizHumanResourceResumeContentEntity saveEntity = new BizHumanResourceResumeContentEntity();
saveEntity.setResumeId(resumeId);
saveEntity.setPositionId(positionId);
saveEntity.setResumeContent(resumeContent);
saveResumeContentEntities.add(saveEntity);
}
}
if (CollectionUtils.isNotEmpty(saveResumeContentEntities)) {
for (BizHumanResourceResumeContentEntity saveResumeContentEntity : saveResumeContentEntities) {
bizHumanResourceResumeContentService.save(saveResumeContentEntity);
}
}
}
}
package cn.com.poc.human_resources.service;
import cn.com.poc.human_resources.query.ResumeContentQueryItem;
import cn.com.yict.framemax.core.service.BaseService;
import cn.com.poc.human_resources.entity.BizHumanResourceResumeContentEntity;
import cn.com.yict.framemax.data.model.PagingInfo;
import java.util.Collection;
import java.util.List;
public interface BizHumanResourceResumeContentService extends BaseService {
BizHumanResourceResumeContentEntity get(java.lang.Long id) throws Exception;
List<BizHumanResourceResumeContentEntity> findByExample(BizHumanResourceResumeContentEntity example,
PagingInfo pagingInfo) throws Exception;
BizHumanResourceResumeContentEntity save(BizHumanResourceResumeContentEntity entity) throws Exception;
BizHumanResourceResumeContentEntity update(BizHumanResourceResumeContentEntity entity) throws Exception;
void deletedById(java.lang.Long id) throws Exception;
/**
* 根据简历内容查询
*
* @param query 查询文本
* @param positionId 职位ID
*/
List<ResumeContentQueryItem> searchByResumeContent(String query, Long positionId);
}
\ No newline at end of file
package cn.com.poc.human_resources.service;
import cn.com.yict.framemax.core.service.BaseService;
import java.util.List;
import cn.com.poc.human_resources.entity.BizHumanResourceResumeEntity;
import cn.com.poc.human_resources.query.ResumeQueryCondition;
import cn.com.poc.human_resources.query.ResumeQueryItem;
import cn.com.yict.framemax.core.service.BaseService;
import cn.com.yict.framemax.data.model.PagingInfo;
import java.util.Collection;
import java.util.List;
public interface BizHumanResourceResumeService extends BaseService {
BizHumanResourceResumeEntity get(java.lang.Long id) throws Exception;
List<BizHumanResourceResumeEntity> findByExample(BizHumanResourceResumeEntity example,PagingInfo pagingInfo) throws Exception;
List<BizHumanResourceResumeEntity> findByExample(BizHumanResourceResumeEntity example, PagingInfo pagingInfo)
throws Exception;
BizHumanResourceResumeEntity save(BizHumanResourceResumeEntity entity) throws Exception;
......@@ -18,4 +21,6 @@ public interface BizHumanResourceResumeService extends BaseService {
void deletedById(java.lang.Long id) throws Exception;
List<ResumeQueryItem> resumeQuery(ResumeQueryCondition condition, PagingInfo pagingInfo) throws Exception;
}
\ No newline at end of file
package cn.com.poc.human_resources.service.impl;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import cn.com.poc.human_resources.convert.BizHumanResourceResumeContentConvert;
import cn.com.poc.human_resources.entity.BizHumanResourceResumeContentEntity;
import cn.com.poc.human_resources.model.BizHumanResourceResumeContentModel;
import cn.com.poc.human_resources.query.ResumeContentQueryCondition;
import cn.com.poc.human_resources.query.ResumeContentQueryItem;
import cn.com.poc.human_resources.repository.BizHumanResourceResumeContentRepository;
import cn.com.poc.human_resources.service.BizHumanResourceResumeContentService;
import cn.com.yict.framemax.core.service.impl.BaseServiceImpl;
import cn.com.yict.framemax.data.model.PagingInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
@Service
public class BizHumanResourceResumeContentServiceImpl extends BaseServiceImpl
implements BizHumanResourceResumeContentService {
@Resource
private BizHumanResourceResumeContentRepository repository;
public BizHumanResourceResumeContentEntity get(java.lang.Long id) throws Exception {
Assert.notNull(id);
BizHumanResourceResumeContentModel model = this.repository.get(id);
if (model == null) {
return null;
}
if ("Y".equals(model.getIsDeleted())) {
return null;
}
return BizHumanResourceResumeContentConvert.modelToEntity(model);
}
public List<BizHumanResourceResumeContentEntity> findByExample(BizHumanResourceResumeContentEntity example,
PagingInfo pagingInfo) throws Exception {
List<BizHumanResourceResumeContentEntity> result = new ArrayList<BizHumanResourceResumeContentEntity>();
BizHumanResourceResumeContentModel model = new BizHumanResourceResumeContentModel();
if (example != null) {
model = BizHumanResourceResumeContentConvert.entityToModel(example);
}
model.setIsDeleted("N");
List<BizHumanResourceResumeContentModel> models = this.repository.findByExample(model, pagingInfo);
if (CollectionUtils.isNotEmpty(models)) {
result = models.stream().map(BizHumanResourceResumeContentConvert::modelToEntity)
.collect(Collectors.toList());
}
return result;
}
public BizHumanResourceResumeContentEntity save(BizHumanResourceResumeContentEntity entity) throws Exception {
Assert.notNull(entity);
entity.setId(null);
entity.setIsDeleted("N");
BizHumanResourceResumeContentModel model = BizHumanResourceResumeContentConvert.entityToModel(entity);
BizHumanResourceResumeContentModel saveModel = this.repository.save(model);
return BizHumanResourceResumeContentConvert.modelToEntity(saveModel);
}
public BizHumanResourceResumeContentEntity update(BizHumanResourceResumeContentEntity entity) throws Exception {
Assert.notNull(entity);
Assert.notNull(entity.getId(), "update pk can not be null");
BizHumanResourceResumeContentModel model = this.repository.get(entity.getId());
if (entity.getResumeId() != null) {
model.setResumeId(entity.getResumeId());
}
if (entity.getPositionId() != null) {
model.setPositionId(entity.getPositionId());
}
if (entity.getResumeContent() != null) {
model.setResumeContent(entity.getResumeContent());
}
if (entity.getIsDeleted() != null) {
model.setIsDeleted(entity.getIsDeleted());
}
if (entity.getCreator() != null) {
model.setCreator(entity.getCreator());
}
if (entity.getCreatedTime() != null) {
model.setCreatedTime(entity.getCreatedTime());
}
if (entity.getModifier() != null) {
model.setModifier(entity.getModifier());
}
if (entity.getModifiedTime() != null) {
model.setModifiedTime(entity.getModifiedTime());
}
if (entity.getSysVersion() != null) {
model.setSysVersion(entity.getSysVersion());
}
BizHumanResourceResumeContentModel saveModel = this.repository.save(model);
return BizHumanResourceResumeContentConvert.modelToEntity(saveModel);
}
public void deletedById(java.lang.Long id) throws Exception {
Assert.notNull(id);
BizHumanResourceResumeContentModel model = this.repository.get(id);
if (model != null) {
if ("N".equals(model.getIsDeleted())) {
model.setIsDeleted("Y");
this.repository.save(model);
}
}
}
@Override
public List<ResumeContentQueryItem> searchByResumeContent(String query, Long positionId) {
ResumeContentQueryCondition resumeContentQueryCondition = new ResumeContentQueryCondition();
resumeContentQueryCondition.setQuery(query);
resumeContentQueryCondition.setPositionId(positionId);
return this.sqlDao.query(resumeContentQueryCondition, ResumeContentQueryItem.class);
}
}
\ No newline at end of file
package cn.com.poc.human_resources.service.impl;
import cn.com.poc.human_resources.query.ResumeQueryCondition;
import cn.com.poc.human_resources.query.ResumeQueryItem;
import cn.com.yict.framemax.core.service.impl.BaseServiceImpl;
import cn.com.poc.human_resources.service.BizHumanResourceResumeService;
import cn.com.poc.human_resources.model.BizHumanResourceResumeModel;
......@@ -38,7 +40,8 @@ public class BizHumanResourceResumeServiceImpl extends BaseServiceImpl
}
public List<BizHumanResourceResumeEntity> findByExample(BizHumanResourceResumeEntity example, PagingInfo pagingInfo) throws Exception {
public List<BizHumanResourceResumeEntity> findByExample(BizHumanResourceResumeEntity example, PagingInfo pagingInfo)
throws Exception {
List<BizHumanResourceResumeEntity> result = new ArrayList<BizHumanResourceResumeEntity>();
BizHumanResourceResumeModel model = new BizHumanResourceResumeModel();
if (example != null) {
......@@ -144,4 +147,8 @@ public class BizHumanResourceResumeServiceImpl extends BaseServiceImpl
}
}
@Override
public List<ResumeQueryItem> resumeQuery(ResumeQueryCondition condition, PagingInfo pagingInfo) throws Exception {
return this.sqlDao.query(condition, ResumeQueryItem.class, pagingInfo);
}
}
\ No newline at end of file
......@@ -2,6 +2,8 @@ package cn.com.poc.humanResource;
import cn.com.poc.common.utils.BlContext;
import cn.com.poc.human_resources.aggregate.HumanResourceService;
import cn.com.poc.human_resources.query.ResumeContentQueryItem;
import cn.com.poc.human_resources.service.BizHumanResourceResumeContentService;
import cn.com.yict.framemax.core.spring.SingleContextInitializer;
import org.junit.Test;
import org.junit.runner.RunWith;
......@@ -10,6 +12,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import javax.annotation.Resource;
import java.util.List;
/**
* @author alex.yao
......@@ -23,6 +26,9 @@ public class HumanResourceTest {
@Resource
private HumanResourceService humanResourceService;
@Resource
private BizHumanResourceResumeContentService bizHumanResourceResumeContentService;
@Test
public void test_uploadResume() throws Exception {
String fileURL = "https://gsst-modellink-prod.gz.bcebos.com/data/20250928/1759049361707.pdf";
......@@ -30,4 +36,14 @@ public class HumanResourceTest {
Long userId = 0L;
System.out.println(humanResourceService.uploadResume(fileURL, 1L, userId));
}
@Test
public void test_searchByResumeContent() {
Long positionId = 8L;
String query = "Java";
List<ResumeContentQueryItem> resumeContentQueryItems =
bizHumanResourceResumeContentService.searchByResumeContent(query, positionId);
System.out.println(resumeContentQueryItems.size());
}
}
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