Commit 803209e5 by 春觉晓

招聘管理列表/导出/统计,新增技术督导字段处理逻辑

1 parent 456f611d
package cn.com.glsx.dj.staff.dto.recruitment; package cn.com.glsx.dj.staff.dto.recruitment;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -81,6 +82,12 @@ public class RecruitmentDemandExportDTO implements Serializable { ...@@ -81,6 +82,12 @@ public class RecruitmentDemandExportDTO implements Serializable {
*/ */
private int processedOfResume; private int processedOfResume;
/**
* 试岗人数
*/
private Integer allOfTrialOnboarding;
/** /**
* 基础信息 * 基础信息
*/ */
......
...@@ -39,4 +39,10 @@ public class RecruitmentDemandPageRecordDTO extends RecruitmentDemand { ...@@ -39,4 +39,10 @@ public class RecruitmentDemandPageRecordDTO extends RecruitmentDemand {
@ApiModelProperty(notes = "结束申请时间") @ApiModelProperty(notes = "结束申请时间")
private String createdDateEnd; private String createdDateEnd;
@ApiModelProperty(notes = "技术督导姓名")
private String technicalSupervisorName;
@ApiModelProperty(notes = "试岗人数")
private Integer allOfTrialOnboarding;
} }
...@@ -40,4 +40,10 @@ public class RecruitmentDemandSummaryDTO implements Serializable { ...@@ -40,4 +40,10 @@ public class RecruitmentDemandSummaryDTO implements Serializable {
@ApiModelProperty(notes = "入职人数") @ApiModelProperty(notes = "入职人数")
private Integer allOfOnboarding; private Integer allOfOnboarding;
/**
* 试岗人数
*/
@ApiModelProperty(notes = "试岗人数")
private Integer allOfTrialOnboarding;
} }
package cn.com.glsx.dj.staff.mapper; package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandPageRecordDTO;
import cn.com.glsx.dj.staff.model.RecruitmentTrialOnboarding; import cn.com.glsx.dj.staff.model.RecruitmentTrialOnboarding;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper; import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper @Mapper
public interface RecruitmentTrialOnboardingMapper extends OreMapper<RecruitmentTrialOnboarding> { public interface RecruitmentTrialOnboardingMapper extends OreMapper<RecruitmentTrialOnboarding> {
/**
* 统计每个招聘需求的试岗人数
* @param demandIdList
* @return
*/
List<RecruitmentDemandPageRecordDTO> countTotalGroupByDemandId(@Param("demandIdList") List<Integer> demandIdList);
} }
...@@ -105,6 +105,9 @@ public class RecruitmentDemandService { ...@@ -105,6 +105,9 @@ public class RecruitmentDemandService {
@Autowired @Autowired
private QWManager qwManager; private QWManager qwManager;
@Autowired
private RecruitmentTrialOnboardingMapper recruitmentTrialOnboardingMapper;
/** /**
* 招聘需求统计 * 招聘需求统计
* *
...@@ -247,7 +250,13 @@ public class RecruitmentDemandService { ...@@ -247,7 +250,13 @@ public class RecruitmentDemandService {
if (CollectionUtils.isEmpty(result)) { if (CollectionUtils.isEmpty(result)) {
return page; return page;
} }
//批量查询试岗人数
Map<Integer, Integer> countMap = new HashMap<>();
List<Integer> idList = result.stream().map(RecruitmentDemandPageRecordDTO::getId).collect(Collectors.toList());
List<RecruitmentDemandPageRecordDTO> countList = recruitmentTrialOnboardingMapper.countTotalGroupByDemandId(idList);
if (!CollectionUtils.isEmpty(countList)) {
countMap = countList.stream().collect(Collectors.toMap(RecruitmentDemandPageRecordDTO::getId, RecruitmentDemandPageRecordDTO::getAllOfTrialOnboarding));
}
for (RecruitmentDemandPageRecordDTO dto : result) { for (RecruitmentDemandPageRecordDTO dto : result) {
Integer demandId = dto.getId(); Integer demandId = dto.getId();
...@@ -266,8 +275,13 @@ public class RecruitmentDemandService { ...@@ -266,8 +275,13 @@ public class RecruitmentDemandService {
dto.setAllOfResume(resumes.size()); dto.setAllOfResume(resumes.size());
dto.setProcessedOfResume(resumes.stream().filter(resume -> Objects.nonNull(resume.getProcessResult())).collect(Collectors.toList()).size()); dto.setProcessedOfResume(resumes.stream().filter(resume -> Objects.nonNull(resume.getProcessResult())).collect(Collectors.toList()).size());
dto.setAllOfOnboarding(onboardingPlanCount); dto.setAllOfOnboarding(onboardingPlanCount);
//设置试岗人数
if (countMap.containsKey(demandId)) {
dto.setAllOfTrialOnboarding(countMap.get(demandId));
}
} }
return page; return page;
} }
...@@ -698,6 +712,13 @@ public class RecruitmentDemandService { ...@@ -698,6 +712,13 @@ public class RecruitmentDemandService {
.andIn("demandId", demandIds); .andIn("demandId", demandIds);
int allOfOnboarding = planMapper.selectCountByExample(planExample); int allOfOnboarding = planMapper.selectCountByExample(planExample);
summary.setAllOfOnboarding(allOfOnboarding); summary.setAllOfOnboarding(allOfOnboarding);
//试岗人数
Example trialOnboardingExample = new Example(RecruitmentTrialOnboarding.class);
trialOnboardingExample.createCriteria()
.andEqualTo("deletedFlag", BaseModel.DeletedFlagEnum.N.name())
.andIn("demandId", demandIds);
int allOfTrialOnboarding = recruitmentTrialOnboardingMapper.selectCountByExample(trialOnboardingExample);
summary.setAllOfTrialOnboarding(allOfTrialOnboarding);
return summary; return summary;
} }
...@@ -795,7 +816,6 @@ public class RecruitmentDemandService { ...@@ -795,7 +816,6 @@ public class RecruitmentDemandService {
baseInfos.add(baseInfo); baseInfos.add(baseInfo);
} }
exportDTO.setStaffArrivalTime(staffArrivalTime); exportDTO.setStaffArrivalTime(staffArrivalTime);
exportDTO.setBaseInfoList(baseInfos); exportDTO.setBaseInfoList(baseInfos);
} }
......
...@@ -143,7 +143,10 @@ ...@@ -143,7 +143,10 @@
and province_city like concat('%', #{provinceCity}, '%') and province_city like concat('%', #{provinceCity}, '%')
</if> </if>
<if test="dataScope != null and dataScope == 1"> <if test="dataScope != null and dataScope == 1">
and (region_operation_id = #{dsRegionOperationId} or created_by = #{dsCreatedBy} or recruiter_phone = #{dsRecruiterPhone}) and (region_operation_id = #{dsRegionOperationId} or created_by = #{dsCreatedBy} or recruiter_phone = #{dsRecruiterPhone} or technical_supervisor_phone = #{dsRecruiterPhone})
</if>
<if test="technicalSupervisorName != null and technicalSupervisorName != ''">
and technical_supervisor_name like concat('%', #{technicalSupervisorName}, '%')
</if> </if>
order by status asc, created_date desc order by status asc, created_date desc
</select> </select>
......
...@@ -25,4 +25,27 @@ ...@@ -25,4 +25,27 @@
id, demand_id, person_name, phone_number, trial_time, channel_type, channel_name, id, demand_id, person_name, phone_number, trial_time, channel_type, channel_name,
created_by, created_date, updated_by, updated_date, deleted_flag created_by, created_date, updated_by, updated_date, deleted_flag
</sql> </sql>
<resultMap id="CountTotalResultMap" type="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandPageRecordDTO" >
<!--
WARNING - @mbg.generated
-->
<id column="demand_id" property="id" jdbcType="INTEGER" />
<result column="total" property="allOfTrialOnboarding"/>
</resultMap>
<select id="countTotalGroupByDemandId" resultMap="CountTotalResultMap">
<!--
WARNING - @mbg.generated
-->
select demand_id, count(1) as total from recruitment_trial_onboarding
where demand_id in
<foreach collection="demandIdList" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
and deleted_flag = 'N'
group by demand_id
</select>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!