添加面试安排列表查询界面
This commit is contained in:
@@ -101,6 +101,23 @@ public class CmsJobController extends BaseController
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询面试安排列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('cms:job:msyyList')")
|
||||||
|
@GetMapping("/msyyList")
|
||||||
|
public TableDataInfo msyyList(Job job,HttpServletRequest request)
|
||||||
|
{
|
||||||
|
if (RoleUtils.isCompanyAdmin()) {
|
||||||
|
Company company = companyService.queryCodeCompany(RoleUtils.getCurrentUseridCard());
|
||||||
|
if(company==null){
|
||||||
|
return getDataTable(new ArrayList<>());
|
||||||
|
}
|
||||||
|
job.setCompanyId(Objects.nonNull(company) ? company.getCompanyId() : null);
|
||||||
|
}
|
||||||
|
startPage();
|
||||||
|
List<Job> list = jobService.selectMsyyHttpJobList(job,request);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取岗位详细信息
|
* 获取岗位详细信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -77,4 +77,7 @@ public interface JobMapper extends BaseMapper<Job>
|
|||||||
|
|
||||||
@InterceptorIgnore(blockAttack = "true")
|
@InterceptorIgnore(blockAttack = "true")
|
||||||
Long delRowWork();
|
Long delRowWork();
|
||||||
|
|
||||||
|
|
||||||
|
public List<Job> selectMsyyJobList(Job job);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ public interface IJobService
|
|||||||
|
|
||||||
public List<Job> selectHttpJobList(Job job,HttpServletRequest request);
|
public List<Job> selectHttpJobList(Job job,HttpServletRequest request);
|
||||||
|
|
||||||
|
public List<Job> selectMsyyHttpJobList(Job job,HttpServletRequest request);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取微信抓取的重复数据条数
|
* 获取微信抓取的重复数据条数
|
||||||
* @param job
|
* @param job
|
||||||
|
|||||||
@@ -1583,4 +1583,66 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Job> selectMsyyHttpJobList(Job job,HttpServletRequest request)
|
||||||
|
{
|
||||||
|
List<Job> jobs = jobMapper.selectMsyyJobList(job);
|
||||||
|
if (CollectionUtils.isNotEmpty(jobs)) {
|
||||||
|
String baseFilePath = StringUtil.getFilePath(request);
|
||||||
|
baseFilePath = baseFilePath == null ? "" : baseFilePath;
|
||||||
|
|
||||||
|
List<Long> jobIds = jobs.stream().filter(Objects::nonNull)
|
||||||
|
.map(Job::getJobId).filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
//查询所有附件
|
||||||
|
List<File> allFiles = CollectionUtils.isNotEmpty(jobIds)
|
||||||
|
? Optional.ofNullable(fileMapper.selectFileListByBussinessIds(jobIds))
|
||||||
|
.orElseGet(Collections::emptyList)
|
||||||
|
: Collections.emptyList();
|
||||||
|
//查询所有联系人
|
||||||
|
List<JobContact> allJobContacts = CollectionUtils.isNotEmpty(jobIds)
|
||||||
|
? Optional.ofNullable(jobContactMapper.selectByJobIds(jobIds)).orElse(Collections.emptyList())
|
||||||
|
: Collections.emptyList();
|
||||||
|
//岗位联系人
|
||||||
|
Map<Long, List<JobContact>> jobContactGroupMap = allJobContacts.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.filter(contact -> Objects.nonNull(contact.getJobId()))
|
||||||
|
.collect(Collectors.groupingBy(
|
||||||
|
JobContact::getJobId,
|
||||||
|
Collectors.collectingAndThen(Collectors.toList(), Collections::unmodifiableList)
|
||||||
|
));
|
||||||
|
|
||||||
|
//附件分组
|
||||||
|
String finalBaseFilePath = baseFilePath;
|
||||||
|
Map<Long, List<File>> fileGroupMap = allFiles.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.filter(file -> Objects.nonNull(file.getBussinessid()))
|
||||||
|
.filter(file -> StringUtils.isNotBlank(file.getFileUrl()))
|
||||||
|
.peek(file -> {
|
||||||
|
String fileUrl = file.getFileUrl().trim();
|
||||||
|
String fullFileUrl = StringUtils.join(finalBaseFilePath, fileUrl);
|
||||||
|
file.setFileUrl(fullFileUrl);
|
||||||
|
})
|
||||||
|
.collect(Collectors.groupingBy(
|
||||||
|
File::getBussinessid,
|
||||||
|
Collectors.collectingAndThen(Collectors.toList(),Collections::unmodifiableList)
|
||||||
|
));
|
||||||
|
|
||||||
|
jobs.forEach(jobItem -> {
|
||||||
|
if (Objects.nonNull(jobItem)) {
|
||||||
|
Long jobItemId = jobItem.getJobId();
|
||||||
|
String jobIdSm4=SM4Utils.encryptEcb(SM4Constants.SM4_KET, String.valueOf(jobItemId));
|
||||||
|
List<File> jobFiles = fileGroupMap.getOrDefault(jobItemId, Collections.emptyList());
|
||||||
|
List<JobContact> jobContent = jobContactGroupMap.getOrDefault(jobItemId, Collections.emptyList());
|
||||||
|
jobItem.setFilesList(jobFiles);
|
||||||
|
jobItem.setJobContactList(jobContent);
|
||||||
|
jobItem.setEncryptJobId(jobIdSm4);
|
||||||
|
jobItem.setJobUrl(StringUtil.BASE_WW_GW+jobIdSm4);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return jobs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -436,4 +436,56 @@
|
|||||||
delete from row_work
|
delete from row_work
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectMsyyJobList" parameterType="Job" resultMap="JobResult">
|
||||||
|
select a.job_id, job_title, min_salary, max_salary, education, experience, company_name, job_location, posting_date, vacancies, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, latitude, longitude, "view", company_id , is_hot ,apply_num,is_publish, description,job_location_area_code,data_source,job_url,job_category,is_explain,explain_url,cover,job_type,job_address,region_code,staff_type,pass,pass_reason,job_status,down_time from job a
|
||||||
|
<where> del_flag = '0' and exists ( select 1 from job_apply b where a.job_id=b.job_id and b.del_flag='0' )
|
||||||
|
<if test="jobTitle != null and jobTitle != ''"> and job_title = #{jobTitle}</if>
|
||||||
|
<if test="minSalary != null "> and min_salary = #{minSalary}</if>
|
||||||
|
<if test="maxSalary != null "> and max_salary = #{maxSalary}</if>
|
||||||
|
<if test="education != null and education != ''">
|
||||||
|
and education in
|
||||||
|
<foreach collection="education.split(',')" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="experience != null and experience != ''"> and experience = #{experience}</if>
|
||||||
|
<if test="companyName != null and companyName != ''"> and company_name like concat('%', cast(#{companyName, jdbcType=VARCHAR} as varchar), '%')</if>
|
||||||
|
<if test="jobLocation != null and jobLocation != ''"> and job_location = #{jobLocation}</if>
|
||||||
|
<if test="postingDate != null and postingDate!=''"> and posting_date = #{postingDate}</if>
|
||||||
|
<if test="vacancies != null "> and vacancies = #{vacancies}</if>
|
||||||
|
<if test="latitude != null "> and latitude = #{latitude}</if>
|
||||||
|
<if test="longitude != null "> and longitude = #{longitude}</if>
|
||||||
|
<if test="view != null "> and "view" = #{view}</if>
|
||||||
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
||||||
|
<if test="isHot != null "> and is_hot = #{isHot}</if>
|
||||||
|
<if test="applyNum != null "> and apply_num = #{applyNum}</if>
|
||||||
|
<if test="code != null "> and company_id in(select company_id from company where code=#{code})</if>
|
||||||
|
<if test="jobLocationAreaCode!=null">and job_location_area_code =#{jobLocationAreaCode}</if>
|
||||||
|
<if test="isPublish != null "> and is_publish = #{isPublish}</if>
|
||||||
|
<if test="downTime!=null and downTime!='' ">and down_time >=#{downTime}</if>
|
||||||
|
<if test="dataSource!=null and dataSource!='' "> and data_source =#{dataSource}</if>
|
||||||
|
<if test="compensation!=null ">
|
||||||
|
<if test="compensation==0 ">
|
||||||
|
and min_salary < 1750
|
||||||
|
</if>
|
||||||
|
<if test="compensation==1 ">
|
||||||
|
and max_salary < 2000 and min_salary >= 1750
|
||||||
|
</if>
|
||||||
|
<if test="compensation==2 ">
|
||||||
|
and max_salary < 3000 and min_salary >= 2000
|
||||||
|
</if>
|
||||||
|
<if test="compensation==3 ">
|
||||||
|
and max_salary < 4000 and min_salary >= 3000
|
||||||
|
</if>
|
||||||
|
<if test="compensation==4 ">
|
||||||
|
and max_salary < 5000 and min_salary >= 4000
|
||||||
|
</if>
|
||||||
|
<if test="compensation==5 ">
|
||||||
|
and min_salary > 5000
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by is_publish asc,a.create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user