rop-dj-staff-miniprogram

* dj.api.staff.miniprogram.recruitment.page
  * waitConfirmTypes 待查看内容类型列表(1.试岗记录2.入职记录)
  * urgent 是否急招, 0非急招 1急招
* dj.api.staff.miniprogram.recruitment.demand.add
  * 入参新增 urgent 是0非急招, 0非急招 1急招
* dj.api.staff.miniprogram.recruitment.demand.detail
  * 返参新增 trialOnboardingPlans 试岗计划列表、是否急招、技术督导信息
  * 统计数据新增试岗人数
  * 删除status mixstatus
* 新增接口
  * 招聘需求统计 dj.api.staff.h5.recruitment.demand.technicalSupervisor.stat
  * 招聘需求分页查询 dj.api.staff.h5.recruitment.demand.technicalSupervisor.page
  * 招聘需求详情 dj.api.staff.h5.recruitment.demand.technicalSupervisor.demand.detail
  * 招聘需求待审核详情 dj.api.staff.h5.recruitment.demand.technicalSupervisor.demand.checkDetail
  * 招聘需求-确认/驳回 dj.api.staff.h5.recruitment.demand.technicalSupervisor.status.update
  * 简历处理 dj.api.staff.h5.recruitment.resume.technicalSupervisor.process
1 parent ed92eb6c
...@@ -21,25 +21,42 @@ public class RecruitmentDemandDTO extends RecruitmentDemand { ...@@ -21,25 +21,42 @@ public class RecruitmentDemandDTO extends RecruitmentDemand {
@ApiModelProperty(notes = "待处理数量") @ApiModelProperty(notes = "待处理数量")
private Integer waitProcessCount; private Integer waitProcessCount;
@ApiModelProperty(notes = "待审核数量")
private Integer waitCheckCount;
@ApiModelProperty(notes = "全部数量") @ApiModelProperty(notes = "全部数量")
private Integer totalCount; private Integer totalCount;
@ApiModelProperty(notes="待处理简历数量") @ApiModelProperty(notes = "待处理简历数量")
private Integer waitProcessResumeCount; private Integer waitProcessResumeCount;
@ApiModelProperty(notes="是否只查待处理") @ApiModelProperty(notes = "待确认入职计划数量")
private Integer onboardingWaitConfirmCount;
@ApiModelProperty(notes = "待确认试岗计划数量")
private Integer trialWaitConfirmCount;
@ApiModelProperty(notes = "是否只查待处理")
private Boolean onlyWaiting; private Boolean onlyWaiting;
@ApiModelProperty(notes="投递简历数") @ApiModelProperty(notes = "是否只查技术督导待处理")
private Boolean onlyTSWaiting;
@ApiModelProperty(notes = "投递简历数")
private Integer resumeCount; private Integer resumeCount;
@ApiModelProperty(notes="处理简历数") @ApiModelProperty(notes = "处理简历数")
private Integer processResumeCount; private Integer processResumeCount;
@ApiModelProperty(notes="入职人数") @ApiModelProperty(notes = "入职人数")
private Integer entryCount; private Integer entryCount;
@ApiModelProperty(notes="试岗人数")
private Integer trialOnboardingCount;
private List<RecruitmentResumeDTO> resumes; private List<RecruitmentResumeDTO> resumes;
private List<RecruitmentOnboardingPlanDTO> onboardingPlans; private List<RecruitmentOnboardingPlanDTO> onboardingPlans;
private List<RecruitmentTrialOnboardingDTO> trialOnboardingPlans;
} }
package cn.com.glsx.dj.staff.dto.recruitment; package cn.com.glsx.dj.staff.dto.recruitment;
import cn.com.glsx.dj.staff.model.RecruitmentTrialOnboarding; import cn.com.glsx.dj.staff.model.RecruitmentTrialOnboarding;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString; import lombok.ToString;
import lombok.experimental.SuperBuilder;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true) @ToString(callSuper = true)
@Data @Data
public class RecruitmentTrialOnboardingDTO extends RecruitmentTrialOnboarding { public class RecruitmentTrialOnboardingDTO extends RecruitmentTrialOnboarding {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(notes="试岗人数")
private Integer trialOnboardingCount;
} }
...@@ -6,9 +6,9 @@ public enum RecruitmentResumeProcessResultEnum { ...@@ -6,9 +6,9 @@ public enum RecruitmentResumeProcessResultEnum {
*/ */
NOT_MATCH((byte)1,"人员不匹配"), NOT_MATCH((byte)1,"人员不匹配"),
/** /**
* 已完成面试 * 人员匹配
*/ */
FINISHED_INTERVIEW((byte)2,"已完成面试"), MATCH((byte)2,"人员匹配"),
; ;
private byte value; private byte value;
......
...@@ -2,7 +2,10 @@ package cn.com.glsx.dj.staff.model; ...@@ -2,7 +2,10 @@ package cn.com.glsx.dj.staff.model;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*; import javax.persistence.*;
...@@ -12,6 +15,9 @@ import java.util.Date; ...@@ -12,6 +15,9 @@ import java.util.Date;
/** /**
* 招聘试岗人员表 * 招聘试岗人员表
*/ */
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data @Data
@Table(name = "dj_car_life_recruitment_trial_onboarding") @Table(name = "dj_car_life_recruitment_trial_onboarding")
public class RecruitmentTrialOnboarding implements Serializable { public class RecruitmentTrialOnboarding implements Serializable {
......
...@@ -12,4 +12,6 @@ public interface RecruitmentOnboardingPlanMapper extends OreMapper<RecruitmentOn ...@@ -12,4 +12,6 @@ public interface RecruitmentOnboardingPlanMapper extends OreMapper<RecruitmentOn
List<RecruitmentOnboardingPlanDTO> listRecruitmentOnboardingPlan(RecruitmentOnboardingPlanDTO dto); List<RecruitmentOnboardingPlanDTO> listRecruitmentOnboardingPlan(RecruitmentOnboardingPlanDTO dto);
RecruitmentOnboardingPlanDTO statRecruitmentOnboardingPlan(RecruitmentOnboardingPlanDTO dto); RecruitmentOnboardingPlanDTO statRecruitmentOnboardingPlan(RecruitmentOnboardingPlanDTO dto);
int updateConfirmFlagToConfirmed(RecruitmentOnboardingPlanDTO planDTO);
} }
\ No newline at end of file \ No newline at end of file
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.dto.recruitment.RecruitmentDemandPageRecordDTO;
import cn.com.glsx.dj.staff.dto.recruitment.RecruitmentTrialOnboardingDTO;
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.apache.ibatis.annotations.Param;
...@@ -17,4 +18,9 @@ public interface RecruitmentTrialOnboardingMapper extends OreMapper<RecruitmentT ...@@ -17,4 +18,9 @@ public interface RecruitmentTrialOnboardingMapper extends OreMapper<RecruitmentT
*/ */
List<RecruitmentDemandPageRecordDTO> countTotalGroupByDemandId(@Param("demandIdList") List<Integer> demandIdList); List<RecruitmentDemandPageRecordDTO> countTotalGroupByDemandId(@Param("demandIdList") List<Integer> demandIdList);
RecruitmentTrialOnboardingDTO statRecruitmentTrialOnboarding(RecruitmentTrialOnboardingDTO dto);
List<RecruitmentTrialOnboardingDTO> listRecruitmentTrialOnboarding(RecruitmentTrialOnboardingDTO dto);
int updateConfirmFlagToConfirmed(RecruitmentTrialOnboardingDTO trialOnboardingDTO);
} }
...@@ -159,18 +159,19 @@ public class RecruitmentDemandService { ...@@ -159,18 +159,19 @@ public class RecruitmentDemandService {
* @author caiym * @author caiym
* @date 2025年10月20日 15:18:00 * @date 2025年10月20日 15:18:00
*/ */
@Transactional(propagation= Propagation.REQUIRED,rollbackFor=RpcServiceException.class)
public Boolean updateConfirmFlagToConfirmed(RecruitmentDemandDTO dto){ public Boolean updateConfirmFlagToConfirmed(RecruitmentDemandDTO dto){
RpcAssert.assertNotNull(dto, DefaultErrorEnum.DATA_NULL,"dto not be null"); RpcAssert.assertNotNull(dto, DefaultErrorEnum.DATA_NULL,"dto not be null");
RpcAssert.assertNotEmpty(dto.getUpdatedBy(), DefaultErrorEnum.DATA_NULL,"dto.getUpdatedBy() not be empty"); RpcAssert.assertNotEmpty(dto.getUpdatedBy(), DefaultErrorEnum.DATA_NULL,"dto.getUpdatedBy() not be empty");
RecruitmentDemand record = recruitmentDemandMapper.selectByPrimaryKey(dto.getId()); RpcAssert.assertNotNull(dto.getId(), DefaultErrorEnum.DATA_NULL,"dto.getId() not be null");
RpcAssert.assertNotNull(record, DefaultErrorEnum.DATA_NOT_EXIST,"recruitmentDemand not exist");
if (!Arrays.asList(RecruitmentDemandStatusEnum.COMPLETED.getValue(), RecruitmentDemandStatusEnum.REJECTED.getValue()).contains(record.getStatus())) {
throw new RpcServiceException(RpcErrorEnum.DATA_INVALID_WITH_SPECIFIC_MSG, "仅已完成/驳回状态的招聘需求可以标记为已确认");
}
try{ try{
RecruitmentDemand updateRecord = RecruitmentDemand.builder().id(dto.getId()).confirmFlag(FlagEnum.Y.getValue()) RecruitmentDemand updateRecord = RecruitmentDemand.builder().id(dto.getId()).confirmFlag(FlagEnum.Y.getValue())
.updatedBy(dto.getUpdatedBy()).updatedDate(new Date()).build(); .updatedBy(dto.getUpdatedBy()).updatedDate(new Date()).build();
recruitmentDemandMapper.updateByPrimaryKeySelective(updateRecord); recruitmentDemandMapper.updateByPrimaryKeySelective(updateRecord);
RecruitmentTrialOnboardingDTO trialOnboardingDTO = RecruitmentTrialOnboardingDTO.builder().demandId(dto.getId()).updatedBy(dto.getUpdatedBy()).build();
recruitmentTrialOnboardingService.updateConfirmFlagToConfirmed(trialOnboardingDTO);
RecruitmentOnboardingPlanDTO planDTO = RecruitmentOnboardingPlanDTO.builder().demandId(dto.getId()).updatedBy(dto.getUpdatedBy()).build();
recruitmentOnboardingPlanService.updateConfirmFlagToConfirmed(planDTO);
return true; return true;
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
...@@ -359,6 +360,14 @@ public class RecruitmentDemandService { ...@@ -359,6 +360,14 @@ public class RecruitmentDemandService {
record.setEntryCount(onboardingPlanStat.getEntryCount()); record.setEntryCount(onboardingPlanStat.getEntryCount());
} }
record.setOnboardingPlans(recruitmentOnboardingPlanService.listRecruitmentOnboardingPlan(onboardingPlanCondition)); record.setOnboardingPlans(recruitmentOnboardingPlanService.listRecruitmentOnboardingPlan(onboardingPlanCondition));
// 试岗计划
RecruitmentTrialOnboardingDTO trialOnboardingCondition = RecruitmentTrialOnboardingDTO.builder().demandId(dto.getId()).build();
record.setTrialOnboardingCount(0);
RecruitmentTrialOnboardingDTO trialOnboardingStat = recruitmentTrialOnboardingService.statRecruitmentTrialOnboarding(trialOnboardingCondition);
if (trialOnboardingStat != null) {
record.setTrialOnboardingCount(trialOnboardingStat.getTrialOnboardingCount());
}
record.setTrialOnboardingPlans(recruitmentTrialOnboardingService.listRecruitmentTrialOnboarding(trialOnboardingCondition));
return record; return record;
}catch (RpcServiceException rpcServiceException){ }catch (RpcServiceException rpcServiceException){
throw rpcServiceException; throw rpcServiceException;
......
...@@ -7,6 +7,7 @@ import cn.com.glsx.dj.staff.model.RecruitmentOnboardingPlan; ...@@ -7,6 +7,7 @@ import cn.com.glsx.dj.staff.model.RecruitmentOnboardingPlan;
import cn.com.glsx.framework.core.beans.BaseModel; import cn.com.glsx.framework.core.beans.BaseModel;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum; import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.core.util.RpcAssert;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -105,4 +106,18 @@ public class RecruitmentOnboardingPlanService { ...@@ -105,4 +106,18 @@ public class RecruitmentOnboardingPlanService {
} }
} }
} }
@Transactional(propagation= Propagation.REQUIRED,rollbackFor=RpcServiceException.class)
public void updateConfirmFlagToConfirmed(RecruitmentOnboardingPlanDTO planDTO) {
RpcAssert.assertNotNull(planDTO, DefaultErrorEnum.DATA_NULL,"planDTO not be null");
RpcAssert.assertNotNull(planDTO.getDemandId(), DefaultErrorEnum.DATA_NULL,"planDTO.getDemandId() not be null");
RpcAssert.assertNotEmpty(planDTO.getUpdatedBy(), DefaultErrorEnum.DATA_NULL,"planDTO.getUpdatedBy() not be empty");
try{
recruitmentOnboardingPlanMapper.updateConfirmFlagToConfirmed(planDTO);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR);
}
}
} }
...@@ -68,13 +68,15 @@ public class RecruitmentResumeService { ...@@ -68,13 +68,15 @@ public class RecruitmentResumeService {
RpcAssert.assertNotNull(dto, DefaultErrorEnum.DATA_NULL,"dto not be null"); RpcAssert.assertNotNull(dto, DefaultErrorEnum.DATA_NULL,"dto not be null");
RpcAssert.assertNotNull(dto.getId(), DefaultErrorEnum.DATA_NULL,"dto.getId() not be null"); RpcAssert.assertNotNull(dto.getId(), DefaultErrorEnum.DATA_NULL,"dto.getId() not be null");
RpcAssert.assertNotEmpty(dto.getUpdatedBy(), DefaultErrorEnum.DATA_NULL,"dto.getUpdatedBy() not be empty"); RpcAssert.assertNotEmpty(dto.getUpdatedBy(), DefaultErrorEnum.DATA_NULL,"dto.getUpdatedBy() not be empty");
if (Objects.equals(dto.getProcessResult(), RecruitmentResumeProcessResultEnum.FINISHED_INTERVIEW.getValue())) { if (Objects.equals(dto.getProcessResult(), RecruitmentResumeProcessResultEnum.MATCH.getValue())) {
RpcAssert.assertNotNull(dto.getInterviewResult(), DefaultErrorEnum.DATA_NULL,"dto.getInterviewResult() not be null"); RpcAssert.assertNotNull(dto.getExpectedInterviewTime(), DefaultErrorEnum.DATA_NULL,"dto.getExpectedInterviewTime() not be null");
RpcAssert.assertNotNull(dto.getInterviewTime(), DefaultErrorEnum.DATA_NULL,"dto.getInterviewTime() not be null");
} }
if (Objects.equals(dto.getProcessResult(), RecruitmentResumeProcessResultEnum.NOT_MATCH.getValue()) if (Objects.equals(dto.getProcessResult(), RecruitmentResumeProcessResultEnum.NOT_MATCH.getValue())
&& (dto.getInterviewResult() != null || dto.getInterviewTime() != null)) { && (dto.getInterviewResult() != null || dto.getInterviewTime() != null || dto.getExpectedInterviewTime() != null)) {
throw new RpcServiceException(DefaultErrorEnum.DATA_INVALID, "处理结果为人员不匹配时,面试结果和面试时间必须为空"); throw new RpcServiceException(DefaultErrorEnum.DATA_INVALID, "处理结果为人员不匹配时,预期面试时间、面试结果和面试时间必须为空");
}
if (dto.getInterviewResult() != null && dto.getInterviewTime() == null) {
throw new RpcServiceException(DefaultErrorEnum.DATA_INVALID, "面试结果为通过时,面试时间不能为空");
} }
try{ try{
RecruitmentResume record = recruitmentResumeMapper.selectByPrimaryKey(dto.getId()); RecruitmentResume record = recruitmentResumeMapper.selectByPrimaryKey(dto.getId());
...@@ -82,12 +84,23 @@ public class RecruitmentResumeService { ...@@ -82,12 +84,23 @@ public class RecruitmentResumeService {
log.error("不存在的招聘简历信息,id:{}", dto.getId()); log.error("不存在的招聘简历信息,id:{}", dto.getId());
throw new RpcServiceException(RpcErrorEnum.DATA_INVALID_WITH_SPECIFIC_MSG, "简历状态已过期,请确认后重新操作"); throw new RpcServiceException(RpcErrorEnum.DATA_INVALID_WITH_SPECIFIC_MSG, "简历状态已过期,请确认后重新操作");
} }
if (record.getProcessResult() != null) { if ((dto.getProcessResult() != null && record.getProcessResult() != null)
log.error("简历状态不是未处理状态,id:{}", dto.getId()); || (dto.getInterviewResult() != null && record.getInterviewResult() != null)) {
log.error("简历状态已过期,id:{}", dto.getId());
throw new RpcServiceException(RpcErrorEnum.DATA_INVALID_WITH_SPECIFIC_MSG, "简历状态已过期,请确认后重新操作"); throw new RpcServiceException(RpcErrorEnum.DATA_INVALID_WITH_SPECIFIC_MSG, "简历状态已过期,请确认后重新操作");
} }
dto.setDemandId(record.getDemandId()); dto.setDemandId(record.getDemandId());
return thiz.executeProcessResume(dto); Boolean result = thiz.executeProcessResume(dto);
RecruitmentDemandDTO recruitmentDemand = recruitmentDemandService.getRecruitmentDemand(dto.getDemandId());
// 在小程序或后台或企业微信进行简历处理并成功保存后,向招聘需求关联的招聘负责人推送消息提醒
recruitmentDemandService.sendRecruitmentQWTextMessage(
recruitmentDemand.getRecruiterPhone(),
"招聘需求进度提醒",
"您的招聘需求的简历状态更新,请及时前往saas+增值业务运营平台查看处理。",
recruitmentDemand.getId(),
recruitmentDemand.getRecruiterName()
);
return result;
}catch (RpcServiceException rpcServiceException){ }catch (RpcServiceException rpcServiceException){
throw rpcServiceException; throw rpcServiceException;
}catch (Exception e) { }catch (Exception e) {
...@@ -103,10 +116,6 @@ public class RecruitmentResumeService { ...@@ -103,10 +116,6 @@ public class RecruitmentResumeService {
log.error("不存在的招聘简历信息,id:{}", dto.getId()); log.error("不存在的招聘简历信息,id:{}", dto.getId());
throw new RpcServiceException(RpcErrorEnum.DATA_INVALID_WITH_SPECIFIC_MSG, "简历状态已过期,请确认后重新操作"); throw new RpcServiceException(RpcErrorEnum.DATA_INVALID_WITH_SPECIFIC_MSG, "简历状态已过期,请确认后重新操作");
} }
if (record.getProcessResult() != null) {
log.error("简历状态不是未处理状态,id:{}", dto.getId());
throw new RpcServiceException(RpcErrorEnum.DATA_INVALID_WITH_SPECIFIC_MSG, "简历状态已过期,请确认后重新操作");
}
RecruitmentDemandDTO recruitmentDemand = recruitmentDemandService.getRecruitmentDemand(dto.getDemandId()); RecruitmentDemandDTO recruitmentDemand = recruitmentDemandService.getRecruitmentDemand(dto.getDemandId());
if (recruitmentDemand == null if (recruitmentDemand == null
|| StringUtils.equals(BaseModel.DeletedFlagEnum.D.name(), recruitmentDemand.getDeletedFlag()) || StringUtils.equals(BaseModel.DeletedFlagEnum.D.name(), recruitmentDemand.getDeletedFlag())
...@@ -116,8 +125,8 @@ public class RecruitmentResumeService { ...@@ -116,8 +125,8 @@ public class RecruitmentResumeService {
} }
Date now = new Date(); Date now = new Date();
RecruitmentResume updateRecord = RecruitmentResume.builder().id(dto.getId()) RecruitmentResume updateRecord = RecruitmentResume.builder().id(dto.getId())
.processResult(dto.getProcessResult()) .processResult(dto.getProcessResult()).expectedInterviewTime(dto.getExpectedInterviewTime())
.interviewResult(dto.getInterviewResult()).interviewTime(dto.getInterviewTime()) .interviewResult(dto.getInterviewResult()).interviewTime(dto.getInterviewTime()).interviewExplanation(dto.getInterviewExplanation())
.description(dto.getDescription()).processorName(dto.getProcessorName()).processTime(now) .description(dto.getDescription()).processorName(dto.getProcessorName()).processTime(now)
.updatedBy(dto.getUpdatedBy()).updatedDate(now).build(); .updatedBy(dto.getUpdatedBy()).updatedDate(now).build();
return recruitmentResumeMapper.updateByPrimaryKeySelective(updateRecord) > 0; return recruitmentResumeMapper.updateByPrimaryKeySelective(updateRecord) > 0;
......
package cn.com.glsx.dj.staff.service.recruitment; package cn.com.glsx.dj.staff.service.recruitment;
import cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandDetailDTO; import cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandDetailDTO;
import cn.com.glsx.dj.staff.dto.recruitment.RecruitmentTrialOnboardingDTO;
import cn.com.glsx.dj.staff.mapper.RecruitmentTrialOnboardingMapper; import cn.com.glsx.dj.staff.mapper.RecruitmentTrialOnboardingMapper;
import cn.com.glsx.dj.staff.model.RecruitmentTrialOnboarding; import cn.com.glsx.dj.staff.model.RecruitmentTrialOnboarding;
import cn.com.glsx.framework.core.beans.BaseModel; import cn.com.glsx.framework.core.beans.BaseModel;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException; import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.core.util.RpcAssert;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -85,4 +88,35 @@ public class RecruitmentTrialOnboardingService { ...@@ -85,4 +88,35 @@ public class RecruitmentTrialOnboardingService {
} }
} }
} }
public RecruitmentTrialOnboardingDTO statRecruitmentTrialOnboarding(RecruitmentTrialOnboardingDTO dto) {
try{
return recruitmentTrialOnboardingMapper.statRecruitmentTrialOnboarding(dto);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR);
}
}
public List<RecruitmentTrialOnboardingDTO> listRecruitmentTrialOnboarding(RecruitmentTrialOnboardingDTO dto) {
try{
return recruitmentTrialOnboardingMapper.listRecruitmentTrialOnboarding(dto);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR);
}
}
@Transactional(propagation= Propagation.REQUIRED,rollbackFor=RpcServiceException.class)
public void updateConfirmFlagToConfirmed(RecruitmentTrialOnboardingDTO trialOnboardingDTO) {
RpcAssert.assertNotNull(trialOnboardingDTO, DefaultErrorEnum.DATA_NULL,"trialOnboardingDTO not be null");
RpcAssert.assertNotNull(trialOnboardingDTO.getDemandId(), DefaultErrorEnum.DATA_NULL,"trialOnboardingDTO.getDemandId() not be null");
RpcAssert.assertNotEmpty(trialOnboardingDTO.getUpdatedBy(), DefaultErrorEnum.DATA_NULL,"trialOnboardingDTO.getUpdatedBy() not be empty");
try{
recruitmentTrialOnboardingMapper.updateConfirmFlagToConfirmed(trialOnboardingDTO);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new RpcServiceException(DefaultErrorEnum.DATABASE_ERROR);
}
}
} }
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
</resultMap> </resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandDTO" extends="BaseResultMap"> <resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandDTO" extends="BaseResultMap">
<result column="wait_process_resume_count" property="waitProcessResumeCount" jdbcType="INTEGER" /> <result column="wait_process_resume_count" property="waitProcessResumeCount" jdbcType="INTEGER" />
<result column="trial_wait_confirm_count" property="trialWaitConfirmCount" jdbcType="INTEGER" />
<result column="onboarding_wait_confirm_count" property="onboardingWaitConfirmCount" jdbcType="INTEGER" />
</resultMap> </resultMap>
<resultMap id="webPageRecordDTOMap" type="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandPageRecordDTO" extends="BaseResultMap"> <resultMap id="webPageRecordDTOMap" type="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandPageRecordDTO" extends="BaseResultMap">
</resultMap> </resultMap>
...@@ -54,19 +56,22 @@ ...@@ -54,19 +56,22 @@
or (a.status = 1 and (a.min_dclrr_status = 0 or trial_wait_confirm_count > 0 or onboarding_wait_confirm_count > 0)), or (a.status = 1 and (a.min_dclrr_status = 0 or trial_wait_confirm_count > 0 or onboarding_wait_confirm_count > 0)),
a.id, a.id,
null)) as waitProcessCount, null)) as waitProcessCount,
<if test="technicalSupervisorPhone != null and technicalSupervisorPhone != ''">
count(if(a.status = 4, a.id, null)) as waitCheckCount,
</if>
count(*) as totalCount count(*) as totalCount
from (select dclrd.id, from (select dclrd.id,
dclrd.status, dclrd.status,
dclrd.confirm_flag, dclrd.confirm_flag,
min(ifnull(dclrr.process_result, 0)) as min_dclrr_status, min(ifnull(dclrr.process_result, 0)) as min_dclrr_status,
(select count(*) from dj_car_life_recruitment_trial dclrt (select count(*) from dj_car_life_recruitment_trial_onboarding dclrt
where dclrt.demand_id = dclrd.id and dclrt.deleted_flag = 'N' where dclrt.demand_id = dclrd.id and dclrt.deleted_flag = 'N'
and dclrt.confirm_flag = 'N' and dclrt.confirm_flag = 'N'
) as trial_wait_confirm_count, ) as trial_wait_confirm_count,
(select count(*) from dj_car_life_recruitment_onboarding_plan dclrop (select count(*) from dj_car_life_recruitment_onboarding_plan dclrop
where dclrop.demand_id = dclrd.id where dclrop.demand_id = dclrd.id
and dclrop.deleted_flag = 'N' and dclrop.confirm_flag = 'N' and dclrop.deleted_flag = 'N' and dclrop.confirm_flag = 'N'
) as onboarding_wait_confirm_count, ) as onboarding_wait_confirm_count
from dj_car_life_recruitment_demand dclrd from dj_car_life_recruitment_demand dclrd
left join dj_car_life_recruitment_resume dclrr on dclrd.id = dclrr.demand_id and dclrr.deleted_flag = 'N' left join dj_car_life_recruitment_resume dclrr on dclrd.id = dclrr.demand_id and dclrr.deleted_flag = 'N'
<where> <where>
...@@ -74,20 +79,34 @@ ...@@ -74,20 +79,34 @@
<if test="regionOperationId != null and regionOperationId != ''"> <if test="regionOperationId != null and regionOperationId != ''">
and dclrd.region_operation_id = #{regionOperationId} and dclrd.region_operation_id = #{regionOperationId}
</if> </if>
<if test="technicalSupervisorPhone != null and technicalSupervisorPhone != ''">
and dclrd.technical_supervisor_phone = #{technicalSupervisorPhone}
</if>
</where> </where>
group by dclrd.id) a; group by dclrd.id) a
(select count(*) from dj_car_life_recruitment_trial dclrt where dclrt.demand_id = dclrd.id)</select> </select>
<select id="listRecruitmentDemand" resultMap="DTOResultMap"> <select id="listRecruitmentDemand" resultMap="DTOResultMap">
select dclrd.id, dclrd.merchant_name, dclrd.merchant_id, dclrd.region_operation_id, dclrd.region_operation_name, select dclrd.id, dclrd.urgent, dclrd.merchant_name, dclrd.merchant_id, dclrd.region_operation_id, dclrd.region_operation_name,
dclrd.business_type, dclrd.business_type_name, dclrd.recruitment_quantity, dclrd.recruitment_type, dclrd.business_type, dclrd.business_type_name, dclrd.recruitment_quantity, dclrd.recruitment_type,
dclrd.recruitment_type_name, dclrd.requirement_description, dclrd.recruiter_name, dclrd.recruiter_phone, dclrd.recruitment_type_name, dclrd.requirement_description, dclrd.recruiter_name, dclrd.recruiter_phone,
dclrd.recall_reason, dclrd.status, dclrd.confirm_flag, dclrd.created_date, dclrd.recall_reason, dclrd.status, dclrd.confirm_flag, dclrd.created_date, dclrd.technical_supervisor_name,
dclrd.technical_supervisor_phone,
if(dclrd.status = 1, (select count(*) if(dclrd.status = 1, (select count(*)
from dj_car_life_recruitment_resume dclrr2 from dj_car_life_recruitment_resume dclrr2
where dclrr2.demand_id = dclrd.id where dclrr2.demand_id = dclrd.id
and dclrr2.deleted_flag = 'N' and dclrr2.deleted_flag = 'N'
and dclrr2.process_result is null), 0) as wait_process_resume_count and dclrr2.process_result is null), 0) as wait_process_resume_count,
if(dclrd.status = 1, (select count(*)
from dj_car_life_recruitment_trial_onboarding dclrt
where dclrt.demand_id = dclrd.id and dclrt.deleted_flag = 'N'
and dclrt.confirm_flag = 'N'
), 0) as trial_wait_confirm_count,
if(dclrd.status = 1, (select count(*)
from dj_car_life_recruitment_onboarding_plan dclrop
where dclrop.demand_id = dclrd.id
and dclrop.deleted_flag = 'N' and dclrop.confirm_flag = 'N'
), 0) as onboarding_wait_confirm_count
from dj_car_life_recruitment_demand dclrd from dj_car_life_recruitment_demand dclrd
<where> <where>
dclrd.deleted_flag = 'N' dclrd.deleted_flag = 'N'
...@@ -97,23 +116,57 @@ ...@@ -97,23 +116,57 @@
<if test="regionOperationId != null and regionOperationId != ''"> <if test="regionOperationId != null and regionOperationId != ''">
and dclrd.region_operation_id = #{regionOperationId} and dclrd.region_operation_id = #{regionOperationId}
</if> </if>
<if test="status != null">
and dclrd.status = #{status}
</if>
<if test="technicalSupervisorPhone != null and technicalSupervisorPhone != ''">
and dclrd.technical_supervisor_phone = #{technicalSupervisorPhone}
</if>
<if test="onlyWaiting != null and onlyWaiting"> <if test="onlyWaiting != null and onlyWaiting">
and ( and (
(dclrd.status in (2, 3) and dclrd.confirm_flag = 'N') (dclrd.status in (2, 3) and dclrd.confirm_flag = 'N')
or (dclrd.status = 1 or (dclrd.status = 1
and exists( and (exists(
select 1 select 1
from dj_car_life_recruitment_resume dclrr from dj_car_life_recruitment_resume dclrr
where dclrr.demand_id = dclrd.id where dclrr.demand_id = dclrd.id
and dclrr.deleted_flag = 'N' and dclrr.deleted_flag = 'N'
and dclrr.process_result is null))) and dclrr.process_result is null)
or exists(
select 1
from dj_car_life_recruitment_onboarding_plan t1
where t1.demand_id = dclrd.id
and t1.deleted_flag = 'N'
and t1.confirm_flag = 'N')
or exists(
select 1
from dj_car_life_recruitment_trial_onboarding t2
where t2.demand_id = dclrd.id
and t2.deleted_flag = 'N'
and t2.confirm_flag = 'N')
)))
</if>
<if test="onlyTSWaiting != null and onlyTSWaiting">
and dclrd.status = 1
and exists(
select 1
from dj_car_life_recruitment_resume dclrr
where dclrr.demand_id = dclrd.id
and dclrr.deleted_flag = 'N'
and dclrr.process_result is null)
</if> </if>
</where> </where>
<if test="onlyWaiting != null and onlyWaiting"> <if test="onlyWaiting != null and onlyWaiting">
order by dclrd.id desc order by
case when dclrd.status = 1 and wait_process_resume_count > 0 then 5
when dclrd.status = 1 and trial_wait_confirm_count > 0 then 4
when dclrd.status = 1 and onboarding_wait_confirm_count > 0 then 3
when dclrd.status = 2 then 2
when dclrd.status = 3 then 1 end desc,
dclrd.id desc
</if> </if>
<if test="onlyWaiting == null or !onlyWaiting"> <if test="onlyWaiting == null or !onlyWaiting">
order by case dclrd.status when 0 then 1 when 1 then 0 else dclrd.status end asc,dclrd.id desc order by case dclrd.status when 0 then 1 when 1 then 0 when 4 then 1 else dclrd.status end asc,dclrd.id desc
</if> </if>
</select> </select>
......
...@@ -65,4 +65,13 @@ ...@@ -65,4 +65,13 @@
from dj_car_life_recruitment_onboarding_plan dclobp from dj_car_life_recruitment_onboarding_plan dclobp
<include refid="list_condition"/> <include refid="list_condition"/>
</select> </select>
<update id="updateConfirmFlagToConfirmed">
update dj_car_life_recruitment_onboarding_plan
set confirm_flag = 'Y',
updated_by = #{updatedBy},
updated_date = now()
where demand_id = #{demandId}
and confirm_flag = 'N'
</update>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" /> <result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" /> <result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap> </resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentTrialOnboardingDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List" > <sql id="Base_Column_List" >
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
...@@ -26,7 +29,12 @@ ...@@ -26,7 +29,12 @@
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,
confirm_flag, created_by, created_date, updated_by, updated_date, deleted_flag confirm_flag, created_by, created_date, updated_by, updated_date, deleted_flag
</sql> </sql>
<sql id="listCondition">
where dclrto.deleted_flag = 'N'
<if test="demandId != null">
and dclrto.demand_id = #{demandId}
</if>
</sql>
<resultMap id="CountTotalResultMap" type="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandPageRecordDTO" > <resultMap id="CountTotalResultMap" type="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandPageRecordDTO" >
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
...@@ -48,5 +56,27 @@ ...@@ -48,5 +56,27 @@
group by demand_id group by demand_id
</select> </select>
<select id="statRecruitmentTrialOnboarding"
resultType="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentTrialOnboardingDTO">
select
ifnull(count(dclrto.id), 0) as trialOnboardingCount
from dj_car_life_recruitment_trial_onboarding dclrto
<include refid="listCondition"></include>
</select>
<select id="listRecruitmentTrialOnboarding"
resultMap="DTOResultMap">
select <include refid="Base_Column_List"></include>
from dj_car_life_recruitment_trial_onboarding dclrto
<include refid="listCondition"></include>
</select>
<update id="updateConfirmFlagToConfirmed">
update dj_car_life_recruitment_trial_onboarding
set confirm_flag = 'Y',
updated_by = #{updatedBy},
updated_date = now()
where demand_id = #{demandId}
and confirm_flag = 'N'
</update>
</mapper> </mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!