Commit 5f6a3e70 by 叶立庆

Merge remote-tracking branch 'origin/master' into v5.6.0

# Conflicts:
#	rpc-dj-staff-api/pom.xml
#	rpc-dj-staff/pom.xml
#	rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/common/QWManager.java
2 parents 5383e589 280aeefd
Showing 43 changed files with 2473 additions and 298 deletions
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<dependency> <dependency>
<groupId>cn.com.glsx.dj</groupId> <groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-staff-api</artifactId> <artifactId>rpc-dj-staff-api</artifactId>
<version>5.3.0-SNAPSHOT</version> <version>5.5.3-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</plugin> </plugin>
......
...@@ -19,25 +19,45 @@ public class RecruitmentDemandDTO extends RecruitmentDemand { ...@@ -19,25 +19,45 @@ public class RecruitmentDemandDTO extends RecruitmentDemand {
@ApiModelProperty(notes = "待处理数量") @ApiModelProperty(notes = "待处理数量")
private Integer waitProcessCount; private Integer waitProcessCount;
@ApiModelProperty(notes = "待技术督导处理数量")
private Integer waitTSProcessCount;
@ApiModelProperty(notes = "待技术督导审核数量")
private Integer waitTSCheckCount;
@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;
} }
...@@ -4,6 +4,7 @@ import cn.com.glsx.dj.staff.model.RecruitmentDemand; ...@@ -4,6 +4,7 @@ import cn.com.glsx.dj.staff.model.RecruitmentDemand;
import cn.com.glsx.dj.staff.model.RecruitmentDemandOperationLog; import cn.com.glsx.dj.staff.model.RecruitmentDemandOperationLog;
import cn.com.glsx.dj.staff.model.RecruitmentOnboardingPlan; import cn.com.glsx.dj.staff.model.RecruitmentOnboardingPlan;
import cn.com.glsx.dj.staff.model.RecruitmentResume; import cn.com.glsx.dj.staff.model.RecruitmentResume;
import cn.com.glsx.dj.staff.model.RecruitmentTrialOnboarding;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -35,6 +36,9 @@ public class RecruitmentDemandDetailDTO extends RecruitmentDemand { ...@@ -35,6 +36,9 @@ public class RecruitmentDemandDetailDTO extends RecruitmentDemand {
@ApiModelProperty(notes = "入职计划") @ApiModelProperty(notes = "入职计划")
private List<RecruitmentOnboardingPlan> onboardingPlans; private List<RecruitmentOnboardingPlan> onboardingPlans;
@ApiModelProperty(notes = "试岗计划")
private List<RecruitmentTrialOnboarding> trialOnboardings;
@ApiModelProperty(notes = "操作记录") @ApiModelProperty(notes = "操作记录")
private List<RecruitmentDemandOperationLog> logs; private List<RecruitmentDemandOperationLog> logs;
......
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,16 @@ public class RecruitmentDemandExportDTO implements Serializable { ...@@ -81,6 +82,16 @@ public class RecruitmentDemandExportDTO implements Serializable {
*/ */
private int processedOfResume; private int processedOfResume;
/**
* 试岗人数
*/
private Integer allOfTrialOnboarding;
/**
* 需求描述
*/
private String requirementDescription;
/** /**
* 基础信息 * 基础信息
*/ */
......
...@@ -41,4 +41,10 @@ public class RecruitmentDemandPageRecordDTO extends RecruitmentDemand { ...@@ -41,4 +41,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 = 0;
} }
...@@ -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.dto.recruitment;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 招聘需求处理结果DTO
* 用于收集处理过程中的简历变更信息
*/
@Data
public class RecruitmentProcessResultDTO {
/**
* 是否有新增简历
*/
@ApiModelProperty(notes = "是否有新增简历")
private boolean hasNewResume = false;
/**
* 是否有简历处理(处理结果变更)
*/
@ApiModelProperty(notes = "是否有简历处理")
private boolean hasResumeProcess = false;
/**
* 是否有面试结果变更
*/
@ApiModelProperty(notes = "是否有面试结果变更")
private boolean hasInterviewResult = false;
}
package cn.com.glsx.dj.staff.dto.recruitment;
import cn.com.glsx.dj.staff.model.RecruitmentTrialOnboarding;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@ToString(callSuper = true)
@Data
public class RecruitmentTrialOnboardingDTO extends RecruitmentTrialOnboarding {
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes="试岗人数")
private Integer trialOnboardingCount;
}
...@@ -2,21 +2,29 @@ package cn.com.glsx.dj.staff.enums; ...@@ -2,21 +2,29 @@ package cn.com.glsx.dj.staff.enums;
public enum RecruitmentDemandStatusEnum { public enum RecruitmentDemandStatusEnum {
/** /**
* 待人事确认 * 0-待人事确认
*/ */
WAIT_HUMAN_CONFIRM((byte)0,"待人事确认"), WAIT_HUMAN_CONFIRM((byte)0,"待人事确认"),
/** /**
* 招聘中 * 1-招聘中
*/ */
RECRUITING((byte)1,"招聘中"), RECRUITING((byte)1,"招聘中"),
/** /**
* 已完成 * 2-已完成
*/ */
COMPLETED((byte)2,"已完成"), COMPLETED((byte)2,"已完成"),
/** /**
* 已驳回 * 3-已驳回
*/ */
REJECTED((byte)3,"已驳回"), REJECTED((byte)3,"已驳回"),
/**
* 4-待督导确认
*/
WAIT_SUPERVISOR_CONFIRM((byte)4,"待督导确认"),
; ;
private byte value; private byte value;
......
...@@ -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;
......
package cn.com.glsx.dj.staff.enums;
public enum RecruitmentResumeStatusEnum {
/**
* 待处理
*/
NOT_PROCESS((byte)0,"待处理"),
/**
* 已完成
*/
FINISHED((byte)1,"已完成")
;
private byte value;
private String displayName;
RecruitmentResumeStatusEnum(Byte value, String displayName) {
this.value = value;
this.displayName = displayName;
}
public byte getValue() {
return value;
}
public String getDisplayName() {
return displayName;
}
public static RecruitmentResumeStatusEnum getByValue(Byte value){
if (value != null) {
for (RecruitmentResumeStatusEnum temp : RecruitmentResumeStatusEnum.values()) {
if (temp.getValue() == value.byteValue()) {
return temp;
}
}
}
return null;
}
}
package cn.com.glsx.dj.staff.enums.recruitment;
/**
* 招聘需求 业务类型 枚举
*/
public enum RecruitmentDemandBusinessTypeEnum {
/**
* 1-延保
*/
EXTENDED_WARRANTY("1", "延保"),
/**
* 2-权益
*/
RIGHTS("2", "权益"),
/**
* 3-轻改
*/
LIGHT_MODIFICATION("3", "轻改"),
/**
* 4-窗膜技师
*/
WINDOW_FILM_TECHNICIAN("4", "窗膜技师"),
/**
* 5-权益+延保
*/
RIGHTS_EXTENDED_WARRANTY("5", "权益+延保"),
/**
* 6-三膜技师
*/
THREE_FILM_TECHNICIAN("6", "三膜技师"),
/**
* 7-车衣技师
*/
CAR_WRAP_TECHNICIAN("7", "车衣技师"),
/**
* 8-精品技师
*/
ACCESSORIES_TECHNICIAN("8", "精品技师"),
/**
* 9-二手车验车专员
*/
USED_CAR_INSPECTOR("9", "二手车验车专员"),
;
private String value;
private String displayName;
RecruitmentDemandBusinessTypeEnum(String value, String displayName) {
this.value = value;
this.displayName = displayName;
}
public String getValue() {
return value;
}
public String getDisplayName() {
return displayName;
}
public static RecruitmentDemandBusinessTypeEnum getByValue(String value) {
if (value != null) {
for (RecruitmentDemandBusinessTypeEnum temp : RecruitmentDemandBusinessTypeEnum.values()) {
if (temp.getValue().equals(value)) {
return temp;
}
}
}
return null;
}
/**
* 判断是否需要技术督导
* 窗膜技师、三膜技师、车衣技师、精品技师需要技术督导
*/
public static boolean needsTechnicalSupervisor(String businessType) {
if (businessType == null) {
return false;
}
return WINDOW_FILM_TECHNICIAN.getValue().equals(businessType)
|| THREE_FILM_TECHNICIAN.getValue().equals(businessType)
|| CAR_WRAP_TECHNICIAN.getValue().equals(businessType)
|| ACCESSORIES_TECHNICIAN.getValue().equals(businessType);
}
/**
* 判断是否需要推送新增招聘需求消息
* 延保、权益、轻改、权益+延保、二手车验车专员需要推送消息
*/
public static boolean needsNewDemandMessage(String businessType) {
if (businessType == null) {
return false;
}
return EXTENDED_WARRANTY.getValue().equals(businessType)
|| RIGHTS.getValue().equals(businessType)
|| LIGHT_MODIFICATION.getValue().equals(businessType)
|| RIGHTS_EXTENDED_WARRANTY.getValue().equals(businessType)
|| USED_CAR_INSPECTOR.getValue().equals(businessType);
}
/**
* 判断是否需要推送给区域运营的消息
* 延保、权益、轻改、权益+延保业务类型需要推送给区域运营
*/
public static boolean needsRegionOperationMessage(String businessType) {
if (businessType == null) {
return false;
}
return EXTENDED_WARRANTY.getValue().equals(businessType)
|| RIGHTS.getValue().equals(businessType)
|| LIGHT_MODIFICATION.getValue().equals(businessType)
|| RIGHTS_EXTENDED_WARRANTY.getValue().equals(businessType);
}
/**
* 判断是否需要推送给技术督导的消息
* 窗膜技师、三膜技师、车衣技师、精品技师业务类型需要推送给技术督导
*/
public static boolean needsTechnicalSupervisorMessage(String businessType) {
return needsTechnicalSupervisor(businessType);
}
/**
* 判断是否需要推送给总部人员(创建人)的消息
* 二手车验车专员业务类型需要推送给创建人
*/
public static boolean needsHeadquartersMessage(String businessType) {
if (businessType == null) {
return false;
}
return USED_CAR_INSPECTOR.getValue().equals(businessType);
}
}
...@@ -2,7 +2,7 @@ package cn.com.glsx.dj.staff.enums.recruitment; ...@@ -2,7 +2,7 @@ package cn.com.glsx.dj.staff.enums.recruitment;
/** /**
* 招聘需求 操作记录-操作类型 枚举 * 招聘需求 操作记录-操作类型 枚举
* 操作类型,1-创建 2-人事确认 3-驳回 4-新增简历 5-编辑简历 6-新增入职 7-完成 * 操作类型,1-创建 2-人事确认 3-驳回 4-新增简历 5-编辑简历 6-新增入职 7-完成 8-处理 9-督导确认
*/ */
public enum RecruitmentDemandLogOperationTypeEnum { public enum RecruitmentDemandLogOperationTypeEnum {
/** /**
...@@ -37,6 +37,10 @@ public enum RecruitmentDemandLogOperationTypeEnum { ...@@ -37,6 +37,10 @@ public enum RecruitmentDemandLogOperationTypeEnum {
* 8-处理 * 8-处理
*/ */
PROCESS((byte)8,"处理"), PROCESS((byte)8,"处理"),
/**
* 9-督导确认
*/
SUPERVISOR_CONFIRM((byte)9,"督导确认"),
; ;
private byte value; private byte value;
......
...@@ -109,6 +109,20 @@ public class RecruitmentDemand implements Serializable { ...@@ -109,6 +109,20 @@ public class RecruitmentDemand implements Serializable {
private String recruiterPhone; private String recruiterPhone;
/** /**
* 技术督导姓名
*/
@ApiModelProperty(notes = "技术督导姓名")
@Column(name = "technical_supervisor_name")
private String technicalSupervisorName;
/**
* 技术督导手机号
*/
@ApiModelProperty(notes = "技术督导手机号")
@Column(name = "technical_supervisor_phone")
private String technicalSupervisorPhone;
/**
* 驳回原因 * 驳回原因
*/ */
@Column(name = "recall_reason") @Column(name = "recall_reason")
...@@ -121,19 +135,41 @@ public class RecruitmentDemand implements Serializable { ...@@ -121,19 +135,41 @@ public class RecruitmentDemand implements Serializable {
private String provinceCity; private String provinceCity;
/** /**
* 状态, 0-待人事确认 1-招聘中 2-已完成 3-已驳回 * 状态, 0-待人事确认 1-招聘中 2-已完成 3-已驳回 4-待督导确认
*/ */
@ApiModelProperty(notes = "状态, 0-待人事确认 1-招聘中 2-已完成 3-已驳回") @ApiModelProperty(notes = "状态, 0-待人事确认 1-招聘中 2-已完成 3-已驳回 4-待督导确认")
@Column(name = "`status`") @Column(name = "`status`")
private Byte status; private Byte status;
/** /**
* 是否急招,0-非急招 1-急招,默认0
*/
@ApiModelProperty(notes = "是否急招,0-非急招 1-急招")
@Column(name = "urgent")
private Byte urgent;
/**
* 开始招聘(进入招聘中状态)的时间
*/
@ApiModelProperty(notes = "开始招聘时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Column(name = "start_time")
private Date startTime;
/**
* 确认flag,N-未确认 Y-已确认 * 确认flag,N-未确认 Y-已确认
*/ */
@Column(name = "confirm_flag") @Column(name = "confirm_flag")
private String confirmFlag; private String confirmFlag;
/** /**
* 创建人手机号
*/
@Column(name = "created_phone")
private String createdPhone;
/**
* 创建人 * 创建人
*/ */
@ApiModelProperty(notes = "创建人") @ApiModelProperty(notes = "创建人")
......
...@@ -142,6 +142,19 @@ public class RecruitmentOnboardingPlan implements Serializable { ...@@ -142,6 +142,19 @@ public class RecruitmentOnboardingPlan implements Serializable {
private String channelName; private String channelName;
/** /**
* 技能标签,json格式如[{name1:value1},{name2:value2}]
*/
@ApiModelProperty(notes = "技能标签")
@Column(name = "skill_tags")
private String skillTags;
/**
* 确认flag,N-未确认 Y-已确认
*/
@Column(name = "confirm_flag")
private String confirmFlag;
/**
* 创建人 * 创建人
*/ */
@Column(name = "created_by") @Column(name = "created_by")
......
...@@ -32,24 +32,11 @@ public class RecruitmentResume implements Serializable { ...@@ -32,24 +32,11 @@ public class RecruitmentResume implements Serializable {
private Integer id; private Integer id;
/** /**
* 综合结果,0-待处理 1-人员不匹配 2 面试通过 3 面试不通过
*/
@ApiModelProperty(notes = "综合结果,0-待处理 1-人员不匹配 2 面试通过 3 面试不通过")
@Column(name = "mix_result")
private Byte mixResult;
/**
* 招聘需求id * 招聘需求id
*/ */
@Column(name = "demand_id") @Column(name = "demand_id")
private Integer demandId; private Integer demandId;
/**
* 状态, 0-待处理 1-已完成
*/
@ApiModelProperty(notes = "状态, 0-待处理 1-已完成")
@Column(name = "status")
private Byte status;
/** /**
* 人员姓名 * 人员姓名
...@@ -80,32 +67,25 @@ public class RecruitmentResume implements Serializable { ...@@ -80,32 +67,25 @@ public class RecruitmentResume implements Serializable {
private String resumeFileName; private String resumeFileName;
/** /**
* 处理结果,1-人员不匹配 2-已完成面试 * 处理结果,1-人员不匹配 2-人员匹配
*/ */
@ApiModelProperty(notes = "处理结果,1-人员不匹配 2-已完成面试") @ApiModelProperty(notes = "处理结果,1-人员不匹配 2-人员匹配")
@Column(name = "process_result") @Column(name = "process_result")
private Byte processResult; private Byte processResult;
/** /**
* 面试时间 * 预计面试时间
*/ */
@ApiModelProperty(notes = "面试时间") @ApiModelProperty(notes = "预计面试时间")
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@Column(name = "interview_time") @Column(name = "expected_interview_time")
private Date interviewTime; private Date expectedInterviewTime;
/**
* 面试结果,0-不通过 1-通过
*/
@ApiModelProperty(notes = "面试结果,0-不通过 1-通过")
@Column(name = "interview_result")
private Byte interviewResult;
/** /**
* 说明 * 处理说明
*/ */
@ApiModelProperty(notes = "说明") @ApiModelProperty(notes = "处理说明")
@Column(name = "description") @Column(name = "description")
private String description; private String description;
...@@ -126,6 +106,45 @@ public class RecruitmentResume implements Serializable { ...@@ -126,6 +106,45 @@ public class RecruitmentResume implements Serializable {
private Date processTime; private Date processTime;
/** /**
* 面试结果,0-不通过 1-通过
*/
@ApiModelProperty(notes = "面试结果,0-不通过 1-通过")
@Column(name = "interview_result")
private Byte interviewResult;
/**
* 面试时间
*/
@ApiModelProperty(notes = "面试时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@Column(name = "interview_time")
private Date interviewTime;
/**
* 面试反馈说明
*/
@ApiModelProperty(notes = "面试反馈说明")
@Column(name = "interview_explanation")
private String interviewExplanation;
/**
* 面试反馈处理人名称
*/
@ApiModelProperty(notes = "面试反馈处理人名称")
@Column(name = "interview_processor_name")
private String interviewProcessorName;
/**
* 面试反馈处理时间
*/
@ApiModelProperty(notes = "面试反馈处理时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
@Column(name = "interview_process_time")
private Date interviewProcessTime;
/**
* 招聘渠道类型值 * 招聘渠道类型值
*/ */
@ApiModelProperty(notes = "招聘渠道类型值") @ApiModelProperty(notes = "招聘渠道类型值")
......
package cn.com.glsx.dj.staff.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
* 招聘试岗人员表
*/
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data
@Table(name = "dj_car_life_recruitment_trial_onboarding")
public class RecruitmentTrialOnboarding implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ApiModelProperty(notes = "主键id")
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 招聘需求id
*/
@ApiModelProperty(notes = "招聘需求id")
@Column(name = "demand_id")
private Integer demandId;
/**
* 人员姓名
*/
@ApiModelProperty(notes = "人员姓名")
@Column(name = "person_name")
private String personName;
/**
* 手机号
*/
@ApiModelProperty(notes = "手机号")
@Column(name = "phone_number")
private String phoneNumber;
/**
* 试岗时间
*/
@ApiModelProperty(notes = "试岗时间 yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@Column(name = "trial_time")
private Date trialTime;
/**
* 招聘渠道类型值
*/
@ApiModelProperty(notes = "招聘渠道类型值")
@Column(name = "channel_type")
private String channelType;
/**
* 招聘渠道类型名
*/
@ApiModelProperty(notes = "招聘渠道类型名")
@Column(name = "channel_name")
private String channelName;
/**
* 确认flag,N-未确认 Y-已确认
*/
@Column(name = "confirm_flag")
private String confirmFlag;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@ApiModelProperty(notes = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
package cn.com.glsx.dj.staff.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
* 技术督导省份映射配置表
*/
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@Data
@Table(name = "dj_car_life_recruitment_technical_supervisor_mapping")
public class TechnicalSupervisorMapping implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ApiModelProperty(notes = "主键id")
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 省份
*/
@ApiModelProperty(notes = "省份")
@Column(name = "province")
private String province;
/**
* 技术督导姓名
*/
@ApiModelProperty(notes = "技术督导姓名")
@Column(name = "supervisor_name")
private String supervisorName;
/**
* 技术督导手机号
*/
@ApiModelProperty(notes = "技术督导手机号")
@Column(name = "supervisor_phone")
private String supervisorPhone;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@ApiModelProperty(notes = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Column(name = "created_date")
private Date createdDate;
/**
* 修改人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
...@@ -48,6 +48,10 @@ ...@@ -48,6 +48,10 @@
<artifactId>rpc-scrm-entmicro-api</artifactId> <artifactId>rpc-scrm-entmicro-api</artifactId>
<version>3.25.9-SNAPSHOT</version> <version>3.25.9-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.oreframework.boot</groupId>
<artifactId>ore-boot-starter-elasticjob</artifactId>
</dependency>
<dependency> <dependency>
<groupId>cn.com.glsx</groupId> <groupId>cn.com.glsx</groupId>
......
package cn.com.glsx.dj.staff.job;
import cn.com.glsx.dj.staff.service.recruitment.RecruitmentDemandService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Title: RecruitmentDemandNoResumeReminderJob
* @Description: 招聘需求72小时未投递简历提醒 任务
* @Author xiehx
* @Date 2025/01/06
**/
@Service
@Slf4j
@ElasticJobConf(name = "RecruitmentDemandNoResumeReminderJob", cron = "32 * * * * ?", description = "招聘需求72小时未投递简历提醒 任务", overwrite = false)
public class RecruitmentDemandNoResumeReminderJob implements SimpleJob {
@Autowired
private RecruitmentDemandService recruitmentDemandService;
@Override
public void execute(ShardingContext shardingContext) {
log.info("招聘需求72小时未投递简历提醒任务开始");
try {
recruitmentDemandService.checkAndRemindNoResumeIn72Hours();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
log.info("招聘需求72小时未投递简历提醒任务结束");
}
}
package cn.com.glsx.dj.staff.job;
import cn.com.glsx.dj.staff.service.recruitment.RecruitmentDemandService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Title: RecruitmentResume24HoursUnprocessedReminderForHeadquartersJob
* @Description: 招聘需求24小时未处理简历提醒-总部人员 任务
* @Author xiehx
* @Date 2025/01/06
**/
@Service
@Slf4j
@ElasticJobConf(name = "RecruitmentResume24HoursUnprocessedReminderForHeadquartersJob", cron = "32 * * * * ?", description = "招聘需求24小时未处理简历提醒-总部人员 任务", overwrite = false)
public class RecruitmentResume24HoursUnprocessedReminderForHeadquartersJob implements SimpleJob {
@Autowired
private RecruitmentDemandService recruitmentDemandService;
@Override
public void execute(ShardingContext shardingContext) {
log.info("招聘需求24小时未处理简历提醒-总部人员任务开始");
try {
recruitmentDemandService.checkAndRemindUnprocessedResumeIn24HoursForHeadquarters();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
log.info("招聘需求24小时未处理简历提醒-总部人员任务结束");
}
}
package cn.com.glsx.dj.staff.job;
import cn.com.glsx.dj.staff.service.recruitment.RecruitmentDemandService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Title: RecruitmentResume24HoursUnprocessedReminderForSupervisorJob
* @Description: 招聘需求24小时未处理简历提醒-技术督导 任务
* @Author xiehx
* @Date 2025/01/06
**/
@Service
@Slf4j
@ElasticJobConf(name = "RecruitmentResume24HoursUnprocessedReminderForSupervisorJob", cron = "32 * * * * ?", description = "招聘需求24小时未处理简历提醒-技术督导 任务", overwrite = false)
public class RecruitmentResume24HoursUnprocessedReminderForSupervisorJob implements SimpleJob {
@Autowired
private RecruitmentDemandService recruitmentDemandService;
@Override
public void execute(ShardingContext shardingContext) {
log.info("招聘需求24小时未处理简历提醒-技术督导任务开始");
try {
recruitmentDemandService.checkAndRemindUnprocessedResumeIn24HoursForSupervisor();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
log.info("招聘需求24小时未处理简历提醒-技术督导任务结束");
}
}
package cn.com.glsx.dj.staff.job;
import cn.com.glsx.dj.staff.service.recruitment.RecruitmentDemandService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Title: RecruitmentResume24HoursUnprocessedReminderJob
* @Description: 招聘需求24小时未处理简历提醒 任务
* @Author xiehx
* @Date 2025/01/06
**/
@Service
@Slf4j
@ElasticJobConf(name = "RecruitmentResume24HoursUnprocessedReminderJob", cron = "32 * * * * ?", description = "面向区域运营-招聘需求24小时未处理简历提醒 任务", overwrite = false)
public class RecruitmentResume24HoursUnprocessedReminderJob implements SimpleJob {
@Autowired
private RecruitmentDemandService recruitmentDemandService;
@Override
public void execute(ShardingContext shardingContext) {
log.info("招聘需求24小时未处理简历提醒任务开始");
try {
recruitmentDemandService.checkAndRemindUnprocessedResumeIn24Hours();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
log.info("招聘需求24小时未处理简历提醒任务结束");
}
}
package cn.com.glsx.dj.staff.job;
import cn.com.glsx.dj.staff.service.recruitment.RecruitmentDemandService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Title: RecruitmentResume48HoursUnprocessedReminderForHeadquartersJob
* @Description: 招聘需求48小时未处理简历提醒-总部人员 任务
* @Author xiehx
* @Date 2025/01/06
**/
@Service
@Slf4j
@ElasticJobConf(name = "RecruitmentResume48HoursUnprocessedReminderForHeadquartersJob", cron = "32 * * * * ?", description = "招聘需求48小时未处理简历提醒-总部人员 任务", overwrite = false)
public class RecruitmentResume48HoursUnprocessedReminderForHeadquartersJob implements SimpleJob {
@Autowired
private RecruitmentDemandService recruitmentDemandService;
@Override
public void execute(ShardingContext shardingContext) {
log.info("招聘需求48小时未处理简历提醒-总部人员任务开始");
try {
recruitmentDemandService.checkAndRemindUnprocessedResumeIn48HoursForHeadquarters();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
log.info("招聘需求48小时未处理简历提醒-总部人员任务结束");
}
}
package cn.com.glsx.dj.staff.job;
import cn.com.glsx.dj.staff.service.recruitment.RecruitmentDemandService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Title: RecruitmentResume48HoursUnprocessedReminderForSupervisorJob
* @Description: 招聘需求48小时未处理简历提醒-技术督导 任务
* @Author xiehx
* @Date 2025/01/06
**/
@Service
@Slf4j
@ElasticJobConf(name = "RecruitmentResume48HoursUnprocessedReminderForSupervisorJob", cron = "32 * * * * ?", description = "招聘需求48小时未处理简历提醒-技术督导 任务", overwrite = false)
public class RecruitmentResume48HoursUnprocessedReminderForSupervisorJob implements SimpleJob {
@Autowired
private RecruitmentDemandService recruitmentDemandService;
@Override
public void execute(ShardingContext shardingContext) {
log.info("招聘需求48小时未处理简历提醒-技术督导任务开始");
try {
recruitmentDemandService.checkAndRemindUnprocessedResumeIn48HoursForSupervisor();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
log.info("招聘需求48小时未处理简历提醒-技术督导任务结束");
}
}
package cn.com.glsx.dj.staff.job;
import cn.com.glsx.dj.staff.service.recruitment.RecruitmentDemandService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Title: RecruitmentResume48HoursUnprocessedReminderJob
* @Description: 招聘需求48小时未处理简历提醒 任务
* @Author xiehx
* @Date 2025/01/06
**/
@Service
@Slf4j
@ElasticJobConf(name = "RecruitmentResume48HoursUnprocessedReminderJob", cron = "32 * * * * ?", description = "面向区域运营-招聘需求48小时未处理简历提醒 任务", overwrite = false)
public class RecruitmentResume48HoursUnprocessedReminderJob implements SimpleJob {
@Autowired
private RecruitmentDemandService recruitmentDemandService;
@Override
public void execute(ShardingContext shardingContext) {
log.info("招聘需求48小时未处理简历提醒任务开始");
try {
recruitmentDemandService.checkAndRemindUnprocessedResumeIn48Hours();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
log.info("招聘需求48小时未处理简历提醒任务结束");
}
}
package cn.com.glsx.dj.staff.job;
import cn.com.glsx.dj.staff.service.recruitment.RecruitmentDemandService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.elasticjob.annotation.ElasticJobConf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Title: RegionOperationUnprocessedResumeStatJob
* @Description: 区域运营超时未处理简历统计提醒任务
* @Author xiehx
* @Date 2025/01/06
**/
@Service
@Slf4j
@ElasticJobConf(name = "RegionOperationUnprocessedResumeStatJob", cron = "0 0 9 * * ?", description = "区域运营超时未处理简历统计提醒任务", overwrite = false)
public class RegionOperationUnprocessedResumeStatJob implements SimpleJob {
@Autowired
private RecruitmentDemandService recruitmentDemandService;
@Override
public void execute(ShardingContext shardingContext) {
log.info("区域运营超时未处理简历统计提醒任务开始");
try {
recruitmentDemandService.statAndRemindRegionOperationUnprocessedResumes();
} catch (Exception e) {
log.error(e.getMessage(), e);
}
log.info("区域运营超时未处理简历统计提醒任务结束");
}
}
...@@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper; import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List; import java.util.List;
import java.util.Map;
@Mapper @Mapper
public interface RecruitmentDemandMapper extends OreMapper<RecruitmentDemand> { public interface RecruitmentDemandMapper extends OreMapper<RecruitmentDemand> {
...@@ -15,4 +16,58 @@ public interface RecruitmentDemandMapper extends OreMapper<RecruitmentDemand> { ...@@ -15,4 +16,58 @@ public interface RecruitmentDemandMapper extends OreMapper<RecruitmentDemand> {
List<RecruitmentDemandDTO> listRecruitmentDemand(RecruitmentDemandDTO dto); List<RecruitmentDemandDTO> listRecruitmentDemand(RecruitmentDemandDTO dto);
List<RecruitmentDemandPageRecordDTO> recruitmentDemandWebPage(RecruitmentDemandPageRecordDTO dto); List<RecruitmentDemandPageRecordDTO> recruitmentDemandWebPage(RecruitmentDemandPageRecordDTO dto);
/**
* 查询正好72小时未投递简历的招聘需求
* @return 招聘需求列表
*/
List<RecruitmentDemand> find72HoursNoResumeDemands();
/**
* 查询24小时未处理简历的招聘需求
* @return 招聘需求列表
*/
List<RecruitmentDemand> find24HoursUnprocessedResumeDemands();
/**
* 查询48小时未处理简历的招聘需求
* @return 招聘需求列表
*/
List<RecruitmentDemand> find48HoursUnprocessedResumeDemands();
/**
* 查询24小时未处理简历的招聘需求(技术督导)
* 业务类型=窗膜技师、4、三膜技师、6、车衣技师、7、精品技师、8
* @return 招聘需求列表
*/
List<RecruitmentDemand> find24HoursUnprocessedResumeDemandsForSupervisor();
/**
* 查询48小时未处理简历的招聘需求(技术督导)
* 业务类型=窗膜技师、4、三膜技师、6、车衣技师、7、精品技师、8
* @return 招聘需求列表
*/
List<RecruitmentDemand> find48HoursUnprocessedResumeDemandsForSupervisor();
/**
* 查询24小时未处理简历的招聘需求(总部人员)
* 业务类型=二手车验车专员、9
* @return 招聘需求列表
*/
List<RecruitmentDemand> find24HoursUnprocessedResumeDemandsForHeadquarters();
/**
* 查询48小时未处理简历的招聘需求(总部人员)
* 业务类型=二手车验车专员、9
* @return 招聘需求列表
*/
List<RecruitmentDemand> find48HoursUnprocessedResumeDemandsForHeadquarters();
/**
* 统计区域运营超时未处理简历情况
* 普通需求:超过48小时未处理
* 加急需求:超过24小时未处理
* @return 区域运营统计列表 Map<String, Object> {regionOperationId, regionOperationName, unprocessedCount}
*/
List<Map<String, Object>> statRegionOperationUnprocessedResumes();
} }
\ No newline at end of file \ No newline at end of file
...@@ -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;
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 org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
@Mapper
public interface RecruitmentTrialOnboardingMapper extends OreMapper<RecruitmentTrialOnboarding> {
/**
* 统计每个招聘需求的试岗人数
* @param demandIdList
* @return
*/
List<RecruitmentDemandPageRecordDTO> countTotalGroupByDemandId(@Param("demandIdList") List<Integer> demandIdList);
RecruitmentTrialOnboardingDTO statRecruitmentTrialOnboarding(RecruitmentTrialOnboardingDTO dto);
List<RecruitmentTrialOnboardingDTO> listRecruitmentTrialOnboarding(RecruitmentTrialOnboardingDTO dto);
int updateConfirmFlagToConfirmed(RecruitmentTrialOnboardingDTO trialOnboardingDTO);
}
package cn.com.glsx.dj.staff.mapper;
import cn.com.glsx.dj.staff.model.TechnicalSupervisorMapping;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface TechnicalSupervisorMappingMapper extends OreMapper<TechnicalSupervisorMapping> {
}
package cn.com.glsx.dj.staff.remote; package cn.com.glsx.dj.staff.remote;
import cn.com.glsx.dj.staff.dto.recruitment.*; import cn.com.glsx.dj.staff.dto.recruitment.*;
import cn.com.glsx.dj.staff.enums.RecruitmentDemandStatusEnum;
import cn.com.glsx.dj.staff.enums.recruitment.RecruitmentDemandBusinessTypeEnum;
import cn.com.glsx.dj.staff.enums.recruitment.RecruitmentDemandLogOperationTypeEnum;
import cn.com.glsx.dj.staff.model.RecruitmentDemand;
import cn.com.glsx.dj.staff.model.RecruitmentResume; import cn.com.glsx.dj.staff.model.RecruitmentResume;
import cn.com.glsx.dj.staff.service.recruitment.RecruitmentDemandService; import cn.com.glsx.dj.staff.service.recruitment.RecruitmentDemandService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination; import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
...@@ -71,8 +75,28 @@ public class RecruitmentDemandRemoteImpl implements RecruitmentDemandRemote{ ...@@ -71,8 +75,28 @@ public class RecruitmentDemandRemoteImpl implements RecruitmentDemandRemote{
@Override @Override
public RpcResponse<String> recruitmentDemandStatusUpdate(RecruitmentDemandDTO dto) { public RpcResponse<String> recruitmentDemandStatusUpdate(RecruitmentDemandDTO dto) {
try{ try{
RecruitmentDemandDTO demand = recruitmentDemandService.getRecruitmentDemand(dto.getId());
Byte oldStatus = demand.getStatus();
recruitmentDemandService.recruitmentDemandStatusUpdate(dto); recruitmentDemandService.recruitmentDemandStatusUpdate(dto);
RecruitmentDemandDTO currentDemand = recruitmentDemandService.getRecruitmentDemand(dto.getId());
Byte currStatus = currentDemand.getStatus();
// 技术督导确认后推送企微消息给招聘负责人
if (currStatus.compareTo(RecruitmentDemandStatusEnum.RECRUITING.getValue()) == 0
&& Objects.equals(oldStatus, RecruitmentDemandStatusEnum.WAIT_SUPERVISOR_CONFIRM.getValue())) {
recruitmentDemandService.sendRecruitmentQWTextMessage(
currentDemand.getRecruiterPhone(),
"新增招聘需求提醒",
"您有新的招聘需求待跟进,请及时前往saas+增值业务运营平台查看处理。",
currentDemand.getId(),
currentDemand.getRecruiterName()
);
}
return RpcResponse.success("success"); return RpcResponse.success("success");
}catch(RpcServiceException e){
log.error(e.getMessage(),e);
return RpcResponse.error(e);
}catch(Exception e){ }catch(Exception e){
log.error(e.getMessage(),e); log.error(e.getMessage(),e);
return RpcResponse.error(e); return RpcResponse.error(e);
...@@ -82,25 +106,55 @@ public class RecruitmentDemandRemoteImpl implements RecruitmentDemandRemote{ ...@@ -82,25 +106,55 @@ public class RecruitmentDemandRemoteImpl implements RecruitmentDemandRemote{
@Override @Override
public RpcResponse<String> recruitmentDemandProcess(RecruitmentDemandDetailDTO dto) { public RpcResponse<String> recruitmentDemandProcess(RecruitmentDemandDetailDTO dto) {
try{ try{
boolean hasNewResume = false; RecruitmentProcessResultDTO processResult = new RecruitmentProcessResultDTO();
List<RecruitmentResume> resumesAll = dto.getResumes(); recruitmentDemandService.recruitmentDemandProcess(dto, processResult);
if (processResult.isHasResumeProcess() || processResult.isHasInterviewResult()) {
// 推送企微消息给招聘负责人
Integer id = dto.getId(); Integer id = dto.getId();
if (CollectionUtils.isEmpty(resumesAll)) { RecruitmentDemand currentDemand = recruitmentDemandService.getRecruitmentDemand(id);
log.info("招聘需求id{} 无简历", id); recruitmentDemandService.sendRecruitmentQWTextMessage(
resumesAll = new ArrayList<>(); currentDemand.getRecruiterPhone(),
"招聘需求进度提醒",
"您的招聘需求的简历状态更新,请及时前往saas+增值业务运营平台查看处理。",
currentDemand.getId(),
currentDemand.getRecruiterName()
);
} }
List<RecruitmentResume> resumesNew = resumesAll.stream().filter(resume -> Objects.isNull(resume.getId())).collect(Collectors.toList()); if (processResult.isHasNewResume()) {
if (CollectionUtils.isNotEmpty(resumesNew)) { Integer id = dto.getId();
hasNewResume = true; RecruitmentDemand currentDemand = recruitmentDemandService.getRecruitmentDemand(id);
log.info("招聘需求id{} 有新增简历", id); if (RecruitmentDemandBusinessTypeEnum.needsRegionOperationMessage(currentDemand.getBusinessType())) {
} else { // 推送区域运营(延保、权益、轻改、权益+延保)
log.info("招聘需求id{} 无新增简历", id); recruitmentDemandService.sendRegionOperationQWMessage(
dto.getId(),
"招聘进度提醒",
"您的招聘需求有新的简历投递,请点击查看处理。",
"新增简历推送区域运营"
);
}
// 推送技术督导(窗膜技师、三膜技师、车衣技师、精品技师)
if (RecruitmentDemandBusinessTypeEnum.needsTechnicalSupervisorMessage(currentDemand.getBusinessType())) {
recruitmentDemandService.sendTechnicalSupervisorQWMessage(
dto.getId(),
"招聘进度提醒",
"您的招聘需求有新的简历投递,请点击查看处理。",
"新增简历推送技术督导"
);
}
// 推送总部人员(创建人)(二手车验车专员)
if (RecruitmentDemandBusinessTypeEnum.needsHeadquartersMessage(currentDemand.getBusinessType())) {
recruitmentDemandService.sendHeadquartersQWMessage(
dto.getId(),
"招聘进度提醒",
"您的招聘需求有新的简历投递,请及时前往saas+增值业务运营平台查看处理。",
"新增简历推送总部人员"
);
} }
recruitmentDemandService.recruitmentDemandProcess(dto);
if (hasNewResume) {
recruitmentDemandService.newResumeQWMessage(dto);
} }
return RpcResponse.success("success"); return RpcResponse.success("success");
}catch(RpcServiceException e){ }catch(RpcServiceException e){
...@@ -159,8 +213,28 @@ public class RecruitmentDemandRemoteImpl implements RecruitmentDemandRemote{ ...@@ -159,8 +213,28 @@ public class RecruitmentDemandRemoteImpl implements RecruitmentDemandRemote{
public RpcResponse<RecruitmentDemandDTO> recruitmentDemandAdd(RecruitmentDemandDTO dto) { public RpcResponse<RecruitmentDemandDTO> recruitmentDemandAdd(RecruitmentDemandDTO dto) {
try{ try{
RecruitmentDemandDTO result = recruitmentDemandService.recruitmentDemandAdd(dto); RecruitmentDemandDTO result = recruitmentDemandService.recruitmentDemandAdd(dto);
// 异步推送企微消息
recruitmentDemandService.newDemandQWMessage(result); // 推送给招聘负责人(延保、权益、轻改、权益+延保、二手车验车专员)
if (RecruitmentDemandBusinessTypeEnum.needsNewDemandMessage(result.getBusinessType())) {
recruitmentDemandService.sendRecruitmentQWTextMessage(
result.getRecruiterPhone(),
"新增招聘需求提醒",
"您有新的招聘需求待跟进,请及时前往saas+增值业务运营平台查看处理。",
result.getId(),
result.getRecruiterName()
);
}
// 推送给技术督导(窗膜技师、三膜技师、车衣技师、精品技师)
if (RecruitmentDemandBusinessTypeEnum.needsTechnicalSupervisorMessage(result.getBusinessType())) {
recruitmentDemandService.sendTechnicalSupervisorQWMessage(
result.getId(),
"招聘进度提醒",
"您有新的招聘需求待跟进,请点击查看处理。",
"新增招聘需求推送技术督导"
);
}
return RpcResponse.success(result); return RpcResponse.success(result);
}catch(Exception e){ }catch(Exception e){
log.error(e.getMessage(),e); log.error(e.getMessage(),e);
......
...@@ -31,6 +31,12 @@ public class QWManager { ...@@ -31,6 +31,12 @@ public class QWManager {
@Resource @Resource
private EntmicroStaffRemote entmicroStaffRemote; private EntmicroStaffRemote entmicroStaffRemote;
/**
* 通过http请求发送企微应用消息
*
* @param sendWorkWechatMessageRequestDTO
* @return
*/
public SendWorkWechatMessageResponseDTO sendMessage(SendWorkWechatMessageRequestDTO sendWorkWechatMessageRequestDTO) { public SendWorkWechatMessageResponseDTO sendMessage(SendWorkWechatMessageRequestDTO sendWorkWechatMessageRequestDTO) {
log.info("发送企微应用消息:{}", JSON.toJSONString(sendWorkWechatMessageRequestDTO)); log.info("发送企微应用消息:{}", JSON.toJSONString(sendWorkWechatMessageRequestDTO));
SendWorkWechatMessageResponseDTO responseDTO=null; SendWorkWechatMessageResponseDTO responseDTO=null;
......
...@@ -10,6 +10,7 @@ import cn.com.glsx.dj.staff.dto.recruitment.*; ...@@ -10,6 +10,7 @@ import cn.com.glsx.dj.staff.dto.recruitment.*;
import cn.com.glsx.dj.staff.enums.FlagEnum; import cn.com.glsx.dj.staff.enums.FlagEnum;
import cn.com.glsx.dj.staff.enums.RecruitmentDemandStatusEnum; import cn.com.glsx.dj.staff.enums.RecruitmentDemandStatusEnum;
import cn.com.glsx.dj.staff.enums.RpcErrorEnum; import cn.com.glsx.dj.staff.enums.RpcErrorEnum;
import cn.com.glsx.dj.staff.enums.recruitment.RecruitmentDemandBusinessTypeEnum;
import cn.com.glsx.dj.staff.enums.recruitment.RecruitmentDemandLogOperationTypeEnum; import cn.com.glsx.dj.staff.enums.recruitment.RecruitmentDemandLogOperationTypeEnum;
import cn.com.glsx.dj.staff.mapper.*; import cn.com.glsx.dj.staff.mapper.*;
import cn.com.glsx.dj.staff.model.*; import cn.com.glsx.dj.staff.model.*;
...@@ -74,6 +75,8 @@ public class RecruitmentDemandService { ...@@ -74,6 +75,8 @@ public class RecruitmentDemandService {
private RecruitmentResumeService recruitmentResumeService; private RecruitmentResumeService recruitmentResumeService;
@Autowired @Autowired
private RecruitmentOnboardingPlanService recruitmentOnboardingPlanService; private RecruitmentOnboardingPlanService recruitmentOnboardingPlanService;
@Autowired
private RecruitmentTrialOnboardingService recruitmentTrialOnboardingService;
@Autowired @Autowired
private RecruitmentOnboardingPlanMapper planMapper; private RecruitmentOnboardingPlanMapper planMapper;
...@@ -105,6 +108,12 @@ public class RecruitmentDemandService { ...@@ -105,6 +108,12 @@ public class RecruitmentDemandService {
@Autowired @Autowired
private QWManager qwManager; private QWManager qwManager;
@Autowired
private RecruitmentTrialOnboardingMapper recruitmentTrialOnboardingMapper;
@Autowired
private TechnicalSupervisorMappingMapper technicalSupervisorMappingMapper;
/** /**
* 招聘需求统计 * 招聘需求统计
* *
...@@ -150,18 +159,19 @@ public class RecruitmentDemandService { ...@@ -150,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);
...@@ -173,8 +183,19 @@ public class RecruitmentDemandService { ...@@ -173,8 +183,19 @@ public class RecruitmentDemandService {
public RecruitmentDemandDTO recruitmentDemandAdd(RecruitmentDemandDTO dto) { public RecruitmentDemandDTO recruitmentDemandAdd(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");
String recruiterName = dto.getRecruiterName();
if (StringUtils.isBlank(recruiterName)) { // 二手车验车专员,从配置读取招聘负责人
String businessType = dto.getBusinessType();
if (RecruitmentDemandBusinessTypeEnum.USED_CAR_INSPECTOR.getValue().equals(businessType)) {
String defaultRecruiterConfig = env.getProperty("used.car.validate.business.default.recruiter");
if (StringUtils.isNotBlank(defaultRecruiterConfig) && defaultRecruiterConfig.contains(":")) {
String[] recruiterInfo = defaultRecruiterConfig.split(":");
if (recruiterInfo.length == 2) {
dto.setRecruiterName(recruiterInfo[0]);
dto.setRecruiterPhone(recruiterInfo[1]);
}
}
} else {
String regionOperationName = dto.getRegionOperationName(); String regionOperationName = dto.getRegionOperationName();
Example ohRelationExample = new Example(RecruitmentRegionOperationHrbpRelation.class); Example ohRelationExample = new Example(RecruitmentRegionOperationHrbpRelation.class);
ohRelationExample.createCriteria() ohRelationExample.createCriteria()
...@@ -189,6 +210,7 @@ public class RecruitmentDemandService { ...@@ -189,6 +210,7 @@ public class RecruitmentDemandService {
// 查询门店省市信息 // 查询门店省市信息
String merchantId = dto.getMerchantId(); String merchantId = dto.getMerchantId();
String provinceName = null;
if (StringUtils.isNotBlank(merchantId)) { if (StringUtils.isNotBlank(merchantId)) {
RpcPagination<ListMerchantRequest> merchantPagination = new RpcPagination<>(); RpcPagination<ListMerchantRequest> merchantPagination = new RpcPagination<>();
merchantPagination.setPageNum(1); merchantPagination.setPageNum(1);
...@@ -210,6 +232,7 @@ public class RecruitmentDemandService { ...@@ -210,6 +232,7 @@ public class RecruitmentDemandService {
String provinceCity = ""; String provinceCity = "";
if (StringUtils.isNotBlank(merchant.getProvinceName())) { if (StringUtils.isNotBlank(merchant.getProvinceName())) {
provinceCity = merchant.getProvinceName(); provinceCity = merchant.getProvinceName();
provinceName = merchant.getProvinceName();
} }
if (StringUtils.isNotBlank(merchant.getCityName())) { if (StringUtils.isNotBlank(merchant.getCityName())) {
provinceCity += merchant.getCityName(); provinceCity += merchant.getCityName();
...@@ -222,6 +245,26 @@ public class RecruitmentDemandService { ...@@ -222,6 +245,26 @@ public class RecruitmentDemandService {
} }
} }
// 根据省份查询技术督导(仅针对特定业务类型:窗膜技师、三膜技师、车衣技师、精品技师)
if (StringUtils.isNotBlank(provinceName) && RecruitmentDemandBusinessTypeEnum.needsTechnicalSupervisor(businessType)) {
Example supervisorExample = new Example(TechnicalSupervisorMapping.class);
supervisorExample.createCriteria()
.andEqualTo("deletedFlag", BaseModel.DeletedFlagEnum.N.name())
.andEqualTo("province", provinceName);
TechnicalSupervisorMapping supervisorMapping = technicalSupervisorMappingMapper.selectOneByExample(supervisorExample);
if (Objects.nonNull(supervisorMapping)) {
dto.setTechnicalSupervisorName(supervisorMapping.getSupervisorName());
dto.setTechnicalSupervisorPhone(supervisorMapping.getSupervisorPhone());
}
}
// 根据业务类型设置初始状态:窗膜技师、三膜技师、车衣技师、精品技师为“待督导确认”,其他为“待人事确认”
if (RecruitmentDemandBusinessTypeEnum.needsTechnicalSupervisor(businessType)) {
dto.setStatus(RecruitmentDemandStatusEnum.WAIT_SUPERVISOR_CONFIRM.getValue());
} else {
dto.setStatus(RecruitmentDemandStatusEnum.WAIT_HUMAN_CONFIRM.getValue());
}
Date now = new Date(); Date now = new Date();
dto.setCreatedBy(dto.getUpdatedBy()); dto.setCreatedBy(dto.getUpdatedBy());
dto.setCreatedDate(now); dto.setCreatedDate(now);
...@@ -247,7 +290,13 @@ public class RecruitmentDemandService { ...@@ -247,7 +290,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 +315,13 @@ public class RecruitmentDemandService { ...@@ -266,8 +315,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;
} }
...@@ -306,6 +360,14 @@ public class RecruitmentDemandService { ...@@ -306,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;
...@@ -351,13 +413,20 @@ public class RecruitmentDemandService { ...@@ -351,13 +413,20 @@ public class RecruitmentDemandService {
.andEqualTo("demandId", demandId); .andEqualTo("demandId", demandId);
logExample.orderBy("id").asc(); logExample.orderBy("id").asc();
List<RecruitmentDemandOperationLog> logs = logMapper.selectByExample(logExample); List<RecruitmentDemandOperationLog> logs = logMapper.selectByExample(logExample);
//查询试岗列表
Example trialOnboardingExample = new Example(RecruitmentTrialOnboarding.class);
trialOnboardingExample.createCriteria()
.andEqualTo("deletedFlag", BaseModel.DeletedFlagEnum.N.name())
.andEqualTo("demandId", demandId);
trialOnboardingExample.orderBy("trialTime").desc();
List<RecruitmentTrialOnboarding> trialOnboardings = recruitmentTrialOnboardingMapper.selectByExample(trialOnboardingExample);
RecruitmentDemandDetailDTO detailDTO = BeanUtil.copyProperties(demand, RecruitmentDemandDetailDTO.class); RecruitmentDemandDetailDTO detailDTO = BeanUtil.copyProperties(demand, RecruitmentDemandDetailDTO.class);
detailDTO.setSalesVolume(salesVolume); detailDTO.setSalesVolume(salesVolume);
detailDTO.setResumes(resumes); detailDTO.setResumes(resumes);
detailDTO.setOnboardingPlans(plans); detailDTO.setOnboardingPlans(plans);
detailDTO.setLogs(logs); detailDTO.setLogs(logs);
detailDTO.setTrialOnboardings(trialOnboardings);
// 查询门店信息(地址) // 查询门店信息(地址)
String merchantId = demand.getMerchantId(); String merchantId = demand.getMerchantId();
RpcPagination<ListMerchantRequest> merchantPagination = new RpcPagination<>(); RpcPagination<ListMerchantRequest> merchantPagination = new RpcPagination<>();
...@@ -456,7 +525,7 @@ public class RecruitmentDemandService { ...@@ -456,7 +525,7 @@ public class RecruitmentDemandService {
} }
/** /**
* 更新招聘需求状态(操作:确认、驳回、完成) * 更新招聘需求状态(操作:确认、驳回、完成、督导确认)
* *
* @param dto * @param dto
*/ */
...@@ -465,54 +534,81 @@ public class RecruitmentDemandService { ...@@ -465,54 +534,81 @@ public class RecruitmentDemandService {
public void recruitmentDemandStatusUpdate(RecruitmentDemandDTO dto) { public void recruitmentDemandStatusUpdate(RecruitmentDemandDTO dto) {
Byte status = dto.getStatus(); Byte status = dto.getStatus();
byte operationType; byte operationType;
RecruitmentDemand currentDemand = recruitmentDemandMapper.selectByPrimaryKey(dto.getId());
if (currentDemand == null) {
log.error("招聘需求不存在,id:{}", dto.getId());
throw new RpcServiceException(RpcErrorEnum.BUSINESS_ERROR, "招聘需求不存在");
}
RecruitmentDemandDTO updateDTO = new RecruitmentDemandDTO();
updateDTO.setId(dto.getId());
// 判断操作类型
Byte currentStatus = currentDemand.getStatus();
if (status.compareTo(RecruitmentDemandStatusEnum.RECRUITING.getValue()) == 0) { if (status.compareTo(RecruitmentDemandStatusEnum.RECRUITING.getValue()) == 0) {
updateDTO.setStartTime(new Date());
if (Objects.equals(currentStatus, RecruitmentDemandStatusEnum.WAIT_SUPERVISOR_CONFIRM.getValue())) {
operationType = RecruitmentDemandLogOperationTypeEnum.SUPERVISOR_CONFIRM.getValue();
} else if (Objects.equals(currentStatus, RecruitmentDemandStatusEnum.WAIT_HUMAN_CONFIRM.getValue())) {
operationType = RecruitmentDemandLogOperationTypeEnum.CONFIRM.getValue(); operationType = RecruitmentDemandLogOperationTypeEnum.CONFIRM.getValue();
} else {
log.error("数据状态已变更 currentStatus:{}", currentStatus);
throw new RpcServiceException(RpcErrorEnum.BUSINESS_ERROR, "需求状态已过期,请确认后重新操作。");
}
} else if (status.compareTo(RecruitmentDemandStatusEnum.COMPLETED.getValue()) == 0) { } else if (status.compareTo(RecruitmentDemandStatusEnum.COMPLETED.getValue()) == 0) {
operationType = RecruitmentDemandLogOperationTypeEnum.FINISH.getValue(); operationType = RecruitmentDemandLogOperationTypeEnum.FINISH.getValue();
} else if (status.compareTo(RecruitmentDemandStatusEnum.REJECTED.getValue()) == 0) { } else if (status.compareTo(RecruitmentDemandStatusEnum.REJECTED.getValue()) == 0) {
if (!Objects.equals(currentStatus, RecruitmentDemandStatusEnum.WAIT_HUMAN_CONFIRM.getValue())
&& !Objects.equals(currentStatus, RecruitmentDemandStatusEnum.WAIT_SUPERVISOR_CONFIRM.getValue())) {
log.error("数据状态已变更 currentStatus:{}", currentStatus);
throw new RpcServiceException(RpcErrorEnum.BUSINESS_ERROR, "需求状态已过期,请确认后重新操作。");
}
operationType = RecruitmentDemandLogOperationTypeEnum.REJECT.getValue(); operationType = RecruitmentDemandLogOperationTypeEnum.REJECT.getValue();
} else { } else {
log.error("状态值非法 status:{}", status); log.error("状态值非法 status:{}", status);
throw new RpcServiceException("状态值非法"); throw new RpcServiceException(RpcErrorEnum.BUSINESS_ERROR, "状态值非法");
} }
// TODO 添加状态顺序校验
RecruitmentDemandDTO updateDTO = new RecruitmentDemandDTO();
updateDTO.setId(dto.getId());
updateDTO.setStatus(status); updateDTO.setStatus(status);
updateDTO.setRecallReason(dto.getRecallReason()); updateDTO.setRecallReason(dto.getRecallReason());
updateDTO.setUpdatedBy(dto.getUpdatedBy()); updateDTO.setUpdatedBy(dto.getUpdatedBy());
updateDTO.setUpdatedDate(new Date()); updateDTO.setUpdatedDate(new Date());
recruitmentDemandMapper.updateByPrimaryKeySelective(updateDTO); recruitmentDemandMapper.updateByPrimaryKeySelective(updateDTO);
RecruitmentDemandOperationLog log = new RecruitmentDemandOperationLog(); RecruitmentDemandOperationLog opLog = new RecruitmentDemandOperationLog();
log.setDemandId(dto.getId()); opLog.setDemandId(dto.getId());
log.setOperationType(operationType); opLog.setOperationType(operationType);
log.setCreatedBy(dto.getUpdatedBy()); opLog.setCreatedBy(dto.getUpdatedBy());
log.setCreatedDate(new Date()); opLog.setCreatedDate(new Date());
log.setUpdatedBy(dto.getUpdatedBy()); opLog.setUpdatedBy(dto.getUpdatedBy());
log.setUpdatedDate(new Date()); opLog.setUpdatedDate(new Date());
logMapper.insertSelective(log); logMapper.insertSelective(opLog);
} }
/** /**
* 处理招聘需求 * 处理招聘需求
* *
* @param dto * @param dto
* @param processResult 处理结果收集器,用于收集处理过程中的简历变更信息
*/ */
@GlsxDistributeLockable(name="'RecruitmentDemandService_recruitmentDemandProcess_' + #dto.id", timeoutException=RpcServiceException.class) @GlsxDistributeLockable(name="'RecruitmentDemandService_recruitmentDemandProcess_' + #dto.id", timeoutException=RpcServiceException.class)
@Transactional @Transactional
public void recruitmentDemandProcess(RecruitmentDemandDetailDTO dto) { public void recruitmentDemandProcess(RecruitmentDemandDetailDTO dto, RecruitmentProcessResultDTO processResult) {
List<RecruitmentResume> resumesAll = dto.getResumes(); List<RecruitmentResume> resumesAll = dto.getResumes();
List<RecruitmentOnboardingPlan> plansAll = dto.getOnboardingPlans(); List<RecruitmentOnboardingPlan> plansAll = dto.getOnboardingPlans();
if (CollectionUtils.isNotEmpty(resumesAll) && resumesAll.size() > 100 || CollectionUtils.isNotEmpty(plansAll) && plansAll.size() > 100) { List<RecruitmentTrialOnboarding> trialsAll = dto.getTrialOnboardings();
log.error("简历数量限定100以内、入职数量限定30以内"); if (CollectionUtils.isNotEmpty(resumesAll) && resumesAll.size() > 98
throw new RpcServiceException(RpcErrorEnum.BUSINESS_ERROR, "简历数量限定100以内、入职数量限定30以内"); || CollectionUtils.isNotEmpty(plansAll) && plansAll.size() > 20
|| CollectionUtils.isNotEmpty(trialsAll) && trialsAll.size() > 20) {
log.error("简历数量限定98以内、入职数量限定20以内、试岗人数限定20以内");
throw new RpcServiceException(RpcErrorEnum.BUSINESS_ERROR, "简历数量限定98以内、入职数量限定20以内、试岗人数限定20以内");
} }
recruitmentResumeService.processResumes(dto); recruitmentResumeService.processResumes(dto, processResult);
recruitmentOnboardingPlanService.processPlans(dto); recruitmentOnboardingPlanService.processPlans(dto);
recruitmentTrialOnboardingService.processTrials(dto);
RecruitmentDemandOperationLog log = new RecruitmentDemandOperationLog(); RecruitmentDemandOperationLog log = new RecruitmentDemandOperationLog();
log.setDemandId(dto.getId()); log.setDemandId(dto.getId());
...@@ -525,16 +621,19 @@ public class RecruitmentDemandService { ...@@ -525,16 +621,19 @@ public class RecruitmentDemandService {
} }
/** /**
* 新增招聘需求推送企微应用消息 * 通用推送企微文本消息方法
* 广联赛讯-嘀加企微管家 * 广联赛讯-嘀加企微管家
* *
* @param dto * @param recruiterPhone 招聘负责人手机号
* @param title 推送标题
* @param content 推送内容
* @param demandId 招聘需求ID(用于日志记录)
* @param recruiterName 招聘负责人姓名(用于日志记录)
*/ */
@Async @Async
public void newDemandQWMessage(RecruitmentDemandDTO dto) { public void sendRecruitmentQWTextMessage(String recruiterPhone, String title, String content, Integer demandId, String recruiterName) {
try { try {
String phone = dto.getRecruiterPhone(); if (StringUtils.isBlank(recruiterPhone)) {
if (StringUtils.isBlank(phone)) {
log.warn("招聘负责人手机号为空,无法推送企微消息"); log.warn("招聘负责人手机号为空,无法推送企微消息");
return; return;
} }
...@@ -542,13 +641,13 @@ public class RecruitmentDemandService { ...@@ -542,13 +641,13 @@ public class RecruitmentDemandService {
Integer merchantId = env.getProperty("new.demand.qw.message.merchant.id", Integer.class, 44211276); Integer merchantId = env.getProperty("new.demand.qw.message.merchant.id", Integer.class, 44211276);
String agentId = env.getProperty("new.demand.qw.message.agentId"); String agentId = env.getProperty("new.demand.qw.message.agentId");
if (StringUtils.isBlank(agentId)) { if (StringUtils.isBlank(agentId)) {
log.error("新增招聘需求推送企微消息参数缺失"); log.error("推送企微消息参数缺失");
return; return;
} }
String qwUserId = qwManager.getUserId(merchantId, phone); String qwUserId = qwManager.getUserId(merchantId, recruiterPhone);
if (StringUtils.isBlank(qwUserId)) { if (StringUtils.isBlank(qwUserId)) {
log.error("查询招聘负责人企微标识为空,手机号:{}", phone); log.error("查询招聘负责人企微标识为空,手机号:{}", recruiterPhone);
return; return;
} }
...@@ -559,30 +658,212 @@ public class RecruitmentDemandService { ...@@ -559,30 +658,212 @@ public class RecruitmentDemandService {
sendWorkWechatMessageRequestDTO.setAgentId(StringUtils.isBlank(agentId)? "1000136": agentId); sendWorkWechatMessageRequestDTO.setAgentId(StringUtils.isBlank(agentId)? "1000136": agentId);
WorkWechatTextMessageDTO text = new WorkWechatTextMessageDTO(); WorkWechatTextMessageDTO text = new WorkWechatTextMessageDTO();
text.setContent("新增招聘需求提醒\n您有新的招聘需求待跟进,请及时前往saas+增值业务运营平台查看处理。"); text.setContent(title + "\n" + content);
sendWorkWechatMessageRequestDTO.setText(text); sendWorkWechatMessageRequestDTO.setText(text);
SendWorkWechatMessageResponseDTO response = qwManager.sendMessage(sendWorkWechatMessageRequestDTO); SendWorkWechatMessageResponseDTO response = qwManager.sendMessage(sendWorkWechatMessageRequestDTO);
if (response != null && response.isSuccess()) { if (response != null && response.isSuccess()) {
log.info("新增招聘需求推送企微消息成功,招聘需求ID:{}, 招聘负责人:{}", dto.getId(), dto.getRecruiterName()); log.info("推送企微消息成功,招聘需求ID:{}, 招聘负责人:{}, 标题:{}", demandId, recruiterName, title);
} else { } else {
log.error("新增招聘需求推送企微消息失败,招聘需求ID:{}, response:{}", dto.getId(), JSON.toJSONString(response)); log.error("推送企微消息失败,招聘需求ID:{}, response:{}", demandId, JSON.toJSONString(response));
} }
} catch (Exception e) { } catch (Exception e) {
log.error("发送新增招聘需求企微应用消息异常", e); log.error("发送招聘企微应用消息异常,招聘需求ID:{}", demandId, e);
} }
} }
/** /**
* 新增简历推送企微应用消息 * 通用方法:给技术督导推送企微应用消息
* 嘀加智慧云-嘀加企微管家
* *
* @param dto * 场景:在后台新增招聘需求(业务类型=窗膜技师、三膜技师、车衣技师、精品技师)并成功保存后,
* 向招聘需求关联的技术督导推送消息提醒
*
* @param demandId 招聘需求ID
* @param title 消息标题
* @param description 消息描述
* @param logDesc 日志描述
*/ */
@Async @Async
public void newResumeQWMessage(RecruitmentDemandDetailDTO dto) { public void sendTechnicalSupervisorQWMessage(Integer demandId, String title, String description, String logDesc) {
try { try {
Integer id = dto.getId(); // 1. 查询招聘需求信息
RecruitmentDemand demand = recruitmentDemandMapper.selectByPrimaryKey(id); RecruitmentDemand demand = recruitmentDemandMapper.selectByPrimaryKey(demandId);
if (demand == null) {
log.error("{} - 招聘需求不存在,demandId:{}", logDesc, demandId);
return;
}
// 2. 判断业务类型是否需要推送(窗膜技师、三膜技师、车衣技师、精品技师)
if (!RecruitmentDemandBusinessTypeEnum.needsTechnicalSupervisorMessage(demand.getBusinessType())) {
log.info("{} - 业务类型不在推送范围内,demandId:{}, businessType:{}",
logDesc, demandId, demand.getBusinessType());
return;
}
// 3. 获取技术督导信息
String technicalSupervisorPhone = demand.getTechnicalSupervisorPhone();
String technicalSupervisorName = demand.getTechnicalSupervisorName();
if (StringUtils.isBlank(technicalSupervisorPhone)) {
log.error("{} - 招聘需求没有技术督导信息,demandId:{}", logDesc, demandId);
return;
}
log.info("{} - 技术督导:{} 手机号:{}", logDesc, technicalSupervisorName, technicalSupervisorPhone);
// 4. 查询企微用户ID
Map<String, String> sendUserIds = getSendUserIds();
if (sendUserIds == null || sendUserIds.isEmpty()) {
log.error("{} - 获取企微用户列表失败,demandId:{}", logDesc, demandId);
return;
}
String qwUserId = sendUserIds.get(technicalSupervisorPhone);
if (StringUtils.isBlank(qwUserId)) {
log.error("{} - 查询技术督导企微标识为空,demandId:{}, phone:{}", logDesc, demandId, technicalSupervisorPhone);
return;
}
// 5. 获取H5页面URL
String h5Url = env.getProperty("dj.technical.supervisor.h5.recruitment.url");
if (StringUtils.isBlank(h5Url)) {
log.error("{} - H5页面配置参数缺失,配置项:dj.technical.supervisor.h5.recruitment.url", logDesc);
return;
}
// 添加技术督导名称和手机号参数
try {
// URL编码技术督导名称,避免中文乱码
String encodedName = java.net.URLEncoder.encode(technicalSupervisorName != null ? technicalSupervisorName : "", "UTF-8");
String encodedPhone = java.net.URLEncoder.encode(technicalSupervisorPhone != null ? technicalSupervisorPhone : "", "UTF-8");
// 判断原始路径是否已包含参数
if (h5Url.contains("?")) {
h5Url = h5Url + "&name=" + encodedName + "&phone=" + encodedPhone;
} else {
h5Url = h5Url + "?name=" + encodedName + "&phone=" + encodedPhone;
}
} catch (Exception e) {
log.warn("{} - URL编码异常,使用原始参数", logDesc, e);
}
// 6. 发送H5卡片通知消息
boolean success = sendDJCloudWechatTextCardMessage(
qwUserId,
title,
description,
h5Url,
logDesc + "-demandId:" + demandId
);
if (success) {
log.info("{} - 推送成功,demandId:{}, 技术督导:{}, qwUserId:{}",
logDesc, demandId, technicalSupervisorName, qwUserId);
} else {
log.error("{} - 推送失败,demandId:{}, 技术督导:{}",
logDesc, demandId, technicalSupervisorName);
}
} catch (Exception e) {
log.error("{} - 推送异常,demandId:{}", logDesc, demandId, e);
}
}
/**
* 通用方法:给总部人员(创建人)推送企微应用消息
* 嘀加智慧云-嘀加企微管家
*
* 场景:对招聘需求(业务类型=二手车验车专员)进行处理,保存提交后,
* 若有新增的简历,则通过企业微信给对应的创建人推送提醒
*
* @param demandId 招聘需求ID
* @param title 消息标题
* @param description 消息描述
* @param logDesc 日志描述
*/
@Async
public void sendHeadquartersQWMessage(Integer demandId, String title, String description, String logDesc) {
try {
// 1. 查询招聘需求信息
RecruitmentDemand demand = recruitmentDemandMapper.selectByPrimaryKey(demandId);
if (demand == null) {
log.error("{} - 招聘需求不存在,demandId:{}", logDesc, demandId);
return;
}
// 2. 判断业务类型是否需要推送(二手车验车专员)
if (!RecruitmentDemandBusinessTypeEnum.needsHeadquartersMessage(demand.getBusinessType())) {
log.info("{} - 业务类型不在推送范围内,demandId:{}, businessType:{}",
logDesc, demandId, demand.getBusinessType());
return;
}
// 3. 获取创建人信息
String createdPhone = demand.getCreatedPhone();
if (StringUtils.isBlank(createdPhone)) {
log.error("{} - 招聘需求没有创建人手机号,demandId:{}", logDesc, demandId);
return;
}
log.info("{} - 创建人手机号:{}", logDesc, createdPhone);
String phoneNumber = createdPhone;
// 4. 查询企微用户ID
Map<String, String> sendUserIds = getSendUserIds();
if (sendUserIds == null || sendUserIds.isEmpty()) {
log.error("{} - 获取企微用户列表失败,demandId:{}", logDesc, demandId);
return;
}
String qwUserId = sendUserIds.get(phoneNumber);
if (StringUtils.isBlank(qwUserId)) {
log.error("{} - 查询创建人企微标识为空,demandId:{}, phone:{}", logDesc, demandId, phoneNumber);
return;
}
// 5. 发送文本消息
boolean success = sendDJCloudWechatTextMessage(
qwUserId,
title + "\n" + description,
logDesc + "-demandId:" + demandId
);
if (success) {
log.info("{} - 推送成功,demandId:{}, 创建人手机号:{}, qwUserId:{}",
logDesc, demandId, createdPhone, qwUserId);
} else {
log.error("{} - 推送失败,demandId:{}, 创建人手机号:{}",
logDesc, demandId, createdPhone);
}
} catch (Exception e) {
log.error("{} - 推送异常,demandId:{}", logDesc, demandId, e);
}
}
/**
* 通用方法:给区域运营推送企微应用消息
* 嘀加智慧云-嘀加企微管家
*
* 支持三种场景:
* 1. 新增简历提醒
* 2. 24小时未处理提醒
* 3. 48小时未处理提醒
*
* @param demandId 招聘需求ID
* @param title 消息标题
* @param description 消息描述
* @param logDesc 日志描述
*/
@Async
public void sendRegionOperationQWMessage(Integer demandId, String title, String description, String logDesc) {
try {
RecruitmentDemand demand = recruitmentDemandMapper.selectByPrimaryKey(demandId);
if (!RecruitmentDemandBusinessTypeEnum.needsRegionOperationMessage(demand.getBusinessType())) {
log.info("{} - 业务类型不在推送范围内,demandId:{}, businessType:{}",
logDesc, demandId, demand.getBusinessType());
return;
}
String staffUUID = demand.getRegionOperationId(); String staffUUID = demand.getRegionOperationId();
log.info("门店区域运营经理:{} 手机号查询参数:{}", demand.getRegionOperationName(), staffUUID); log.info("门店区域运营经理:{} 手机号查询参数:{}", demand.getRegionOperationName(), staffUUID);
...@@ -609,14 +890,21 @@ public class RecruitmentDemandService { ...@@ -609,14 +890,21 @@ public class RecruitmentDemandService {
sendWorkWechatMessageRequestDTO.setMsgType(WorkWechatAppMessageTypeEnum.TEXTCARD.getValue()); sendWorkWechatMessageRequestDTO.setMsgType(WorkWechatAppMessageTypeEnum.TEXTCARD.getValue());
WorkWechatTextCardMessageDTO textCard = new WorkWechatTextCardMessageDTO(); WorkWechatTextCardMessageDTO textCard = new WorkWechatTextCardMessageDTO();
textCard.setTitle("招聘进度提醒"); textCard.setTitle(title);
textCard.setDescription("您的招聘需求有新的简历投递,请点击查看处理。"); textCard.setDescription(description);
textCard.setUrl(url); textCard.setUrl(url);
sendWorkWechatMessageRequestDTO.setTextCard(textCard); sendWorkWechatMessageRequestDTO.setTextCard(textCard);
sendSingleWechatMessage(sendWorkWechatMessageRequestDTO); boolean success = sendDJCloudWechatMessage(sendWorkWechatMessageRequestDTO, logDesc);
if (success) {
log.info("{} - 推送成功,demandId:{}, 区域运营:{}, qwUserId:{}",
logDesc, demandId, demand.getRegionOperationName(), qwUserId);
} else {
log.error("{} - 推送失败,demandId:{}, 区域运营:{}",
logDesc, demandId, demand.getRegionOperationName());
}
} catch (Exception e) { } catch (Exception e) {
log.error("发送新简历推送企微应用消息异常", e); log.error("{} - 推送异常,demandId:{}", logDesc, demandId, e);
} }
} }
...@@ -630,8 +918,8 @@ public class RecruitmentDemandService { ...@@ -630,8 +918,8 @@ public class RecruitmentDemandService {
entmicroStaffRequest.setMerchantId(env.getProperty("dj.send.work.wechat.merchant.id", Integer.class, 44202977)); entmicroStaffRequest.setMerchantId(env.getProperty("dj.send.work.wechat.merchant.id", Integer.class, 44202977));
log.info("获取商户员工参数:{}", JSON.toJSONString(entmicroStaffRequest)); log.info("获取商户员工参数:{}", JSON.toJSONString(entmicroStaffRequest));
RpcResponse<List<EntmicroStaffResponse>> staffResponse = entmicroStaffRemote.findStaffByMerchantId(entmicroStaffRequest); RpcResponse<List<EntmicroStaffResponse>> staffResponse = entmicroStaffRemote.findStaffByMerchantId(entmicroStaffRequest);
log.info("获取商户员工结果:{}", JSON.toJSONString(staffResponse));
if (staffResponse.hasResult()) { if (staffResponse.hasResult()) {
log.info("获取商户员工结果成功");
List<EntmicroStaffResponse> result = staffResponse.getResult(); List<EntmicroStaffResponse> result = staffResponse.getResult();
return result.stream().filter(item ->{ return result.stream().filter(item ->{
return org.apache.commons.lang.StringUtils.isNotBlank(item.getStaffPhone()) && org.apache.commons.lang.StringUtils.isNotBlank(item.getUserId()); return org.apache.commons.lang.StringUtils.isNotBlank(item.getStaffPhone()) && org.apache.commons.lang.StringUtils.isNotBlank(item.getUserId());
...@@ -645,20 +933,100 @@ public class RecruitmentDemandService { ...@@ -645,20 +933,100 @@ public class RecruitmentDemandService {
} }
/** /**
* 发送企微文本消息 * 通用发送企微应用消息方法(通过Dubbo)
* 嘀加智慧云-嘀加企微管家
* *
* @param sendWorkWechatMessageRequestDTO 消息请求对象
* @param logDesc 日志描述
* @return 是否发送成功
*/ */
public boolean sendSingleWechatMessage(SendWorkWechatMessageRequestDTO sendWorkWechatMessageRequestDTO) { public boolean sendDJCloudWechatMessage(SendWorkWechatMessageRequestDTO sendWorkWechatMessageRequestDTO, String logDesc) {
log.info("sendMessage request:{}", JSON.toJSONString(sendWorkWechatMessageRequestDTO)); log.info("发送企微应用消息-{}, request:{}", logDesc, JSON.toJSONString(sendWorkWechatMessageRequestDTO));
RpcResponse<SendWorkWechatMessageResponseDTO> sendWorkWechatMessageResponseDTORpcResponse = workWechatMessageRemote try {
.sendMessage(sendWorkWechatMessageRequestDTO); RpcResponse<SendWorkWechatMessageResponseDTO> response = workWechatMessageRemote.sendMessage(sendWorkWechatMessageRequestDTO);
log.info("sendMessage resp:{}", JSON.toJSONString(sendWorkWechatMessageResponseDTORpcResponse)); log.info("发送企微应用消息-{}, response:{}", logDesc, JSON.toJSONString(response));
if (!sendWorkWechatMessageResponseDTORpcResponse.isSuccess()) {
log.info("发送企微消息,参数为:{},异常:{}", JSON.toJSONString(sendWorkWechatMessageRequestDTO), if (!response.isSuccess()) {
sendWorkWechatMessageResponseDTORpcResponse.getException().getMessage()); log.error("发送企微应用消息失败-{}, 参数:{}, 异常:{}",
logDesc,
JSON.toJSONString(sendWorkWechatMessageRequestDTO),
response.getException() != null ? response.getException().getMessage() : "未知异常");
return false; return false;
} }
SendWorkWechatMessageResponseDTO result = response.getResult();
if (result != null && result.getErrCode() != null && result.getErrCode() != 0) {
log.error("发送企微应用消息失败-{}, errCode:{}, errMsg:{}",
logDesc, result.getErrCode(), result.getErrMsg());
return false;
}
log.info("发送企微应用消息成功-{}", logDesc);
return true; return true;
} catch (Exception e) {
log.error("发送企微应用消息异常-{}", logDesc, e);
return false;
}
}
/**
* 发送文本类型企微应用消息
* 嘀加智慧云-嘀加企微管家
*
* @param qwUserId 企微用户ID
* @param content 文本内容
* @param logDesc 日志描述
* @return 是否发送成功
*/
public boolean sendDJCloudWechatTextMessage(String qwUserId, String content, String logDesc) {
Integer merchantId = env.getProperty("dj.send.work.wechat.merchant.id", Integer.class, 44211227);
String agentId = env.getProperty("dj.send.work.wechat.agentId");
SendWorkWechatMessageRequestDTO request = new SendWorkWechatMessageRequestDTO();
request.setToUser(qwUserId);
request.setMerchantId(merchantId);
request.setMsgType(WorkWechatAppMessageTypeEnum.TEXT.getValue());
if (StringUtils.isNotBlank(agentId)) {
request.setAgentId(agentId);
}
WorkWechatTextMessageDTO text = new WorkWechatTextMessageDTO();
text.setContent(content);
request.setText(text);
return sendDJCloudWechatMessage(request, logDesc);
}
/**
* 发送卡片类型企微应用消息(H5页面跳转)
* 嘀加智慧云-嘀加企微管家
*
* @param qwUserId 企微用户ID
* @param title 卡片标题
* @param description 卡片描述
* @param url H5页面URL
* @param logDesc 日志描述
* @return 是否发送成功
*/
public boolean sendDJCloudWechatTextCardMessage(String qwUserId, String title, String description, String url, String logDesc) {
Integer merchantId = env.getProperty("dj.send.work.wechat.merchant.id", Integer.class, 44211227);
String agentId = env.getProperty("dj.send.work.wechat.agentId");
SendWorkWechatMessageRequestDTO request = new SendWorkWechatMessageRequestDTO();
request.setToUser(qwUserId);
request.setMerchantId(merchantId);
request.setMsgType(WorkWechatAppMessageTypeEnum.TEXTCARD.getValue());
if (StringUtils.isNotBlank(agentId)) {
request.setAgentId(agentId);
}
WorkWechatTextCardMessageDTO textCard = new WorkWechatTextCardMessageDTO();
textCard.setTitle(title);
textCard.setDescription(description);
textCard.setUrl(url);
request.setTextCard(textCard);
return sendDJCloudWechatMessage(request, logDesc);
} }
/** /**
...@@ -673,7 +1041,7 @@ public class RecruitmentDemandService { ...@@ -673,7 +1041,7 @@ public class RecruitmentDemandService {
summary.setAllOfResume(0); summary.setAllOfResume(0);
summary.setProcessedOfResume(0); summary.setProcessedOfResume(0);
summary.setAllOfOnboarding(0); summary.setAllOfOnboarding(0);
summary.setAllOfTrialOnboarding(0);
List<RecruitmentDemandPageRecordDTO> demands = recruitmentDemandMapper.recruitmentDemandWebPage(dto); List<RecruitmentDemandPageRecordDTO> demands = recruitmentDemandMapper.recruitmentDemandWebPage(dto);
if (CollectionUtils.isEmpty(demands)) { if (CollectionUtils.isEmpty(demands)) {
return summary; return summary;
...@@ -698,6 +1066,13 @@ public class RecruitmentDemandService { ...@@ -698,6 +1066,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 +1170,6 @@ public class RecruitmentDemandService { ...@@ -795,7 +1170,6 @@ public class RecruitmentDemandService {
baseInfos.add(baseInfo); baseInfos.add(baseInfo);
} }
exportDTO.setStaffArrivalTime(staffArrivalTime); exportDTO.setStaffArrivalTime(staffArrivalTime);
exportDTO.setBaseInfoList(baseInfos); exportDTO.setBaseInfoList(baseInfos);
} }
...@@ -803,4 +1177,329 @@ public class RecruitmentDemandService { ...@@ -803,4 +1177,329 @@ public class RecruitmentDemandService {
return dtos; return dtos;
} }
/**
* 检查并提醒72小时未投递简历的招聘需求
*/
public void checkAndRemindNoResumeIn72Hours() {
try {
List<RecruitmentDemand> demands = recruitmentDemandMapper.find72HoursNoResumeDemands();
if (CollectionUtils.isEmpty(demands)) {
log.info("没有找到符合条件的招聘需求(正好72小时且无简历)");
return;
}
int successCount = 0;
for (RecruitmentDemand demand : demands) {
try {
log.info("开始处理招聘需求ID:{},招聘负责人:{}", demand.getId(), demand.getRecruiterName());
sendRecruitmentQWTextMessage(
demand.getRecruiterPhone(),
"招聘需求进度提醒",
"您的招聘需求已超过72小时未投递简历,请及时前往saas+增值业务运营平台查看处理。",
demand.getId(),
demand.getRecruiterName()
);
successCount++;
} catch (Exception e) {
log.error("处理招聘需求ID:{} 推送消息异常", demand.getId(), e);
}
}
log.info("检查完成,共处理 {} 条招聘需求,成功推送 {} 条", demands.size(), successCount);
} catch (Exception e) {
log.error("检查招聘需求72小时未投递简历异常", e);
}
}
/**
* 检查并提醒24小时未处理简历的招聘需求
*/
public void checkAndRemindUnprocessedResumeIn24Hours() {
try {
List<RecruitmentDemand> demands = recruitmentDemandMapper.find24HoursUnprocessedResumeDemands();
if (CollectionUtils.isEmpty(demands)) {
log.info("没有找到符合条件的招聘需求(24小时未处理简历)");
return;
}
log.info("开始处理24小时未处理简历提醒,共 {} 条招聘需求", demands.size());
int successCount = 0;
for (RecruitmentDemand demand : demands) {
try {
log.info("开始处理招聘需求ID:{},区域运营:{}", demand.getId(), demand.getRegionOperationName());
sendRegionOperationQWMessage(
demand.getId(),
"招聘进度提醒",
"您的招聘需求已超过24小时未完成简历处理,请点击查看处理。",
"24小时未处理提醒"
);
successCount++;
} catch (Exception e) {
log.error("处理招聘需求ID:{} 推送24小时未处理消息异常", demand.getId(), e);
}
}
log.info("24小时未处理简历检查完成,共处理 {} 条招聘需求,成功推送 {} 条", demands.size(), successCount);
} catch (Exception e) {
log.error("检查招聘需求24小时未处理简历异常", e);
}
}
/**
* 检查并提醒48小时未处理简历的招聘需求
*/
public void checkAndRemindUnprocessedResumeIn48Hours() {
try {
List<RecruitmentDemand> demands = recruitmentDemandMapper.find48HoursUnprocessedResumeDemands();
if (CollectionUtils.isEmpty(demands)) {
log.info("没有找到符合条件的招聘需求(48小时未处理简历)");
return;
}
log.info("开始处理48小时未处理简历提醒,共 {} 条招聘需求", demands.size());
int successCount = 0;
for (RecruitmentDemand demand : demands) {
try {
log.info("开始处理招聘需求ID:{},区域运营:{}", demand.getId(), demand.getRegionOperationName());
sendRegionOperationQWMessage(
demand.getId(),
"招聘进度提醒",
"您的招聘需求已超过48小时未完成简历处理,请点击查看处理。",
"48小时未处理提醒"
);
successCount++;
} catch (Exception e) {
log.error("处理招聘需求ID:{} 推送48小时未处理消息异常", demand.getId(), e);
}
}
log.info("48小时未处理简历检查完成,共处理 {} 条招聘需求,成功推送 {} 条", demands.size(), successCount);
} catch (Exception e) {
log.error("检查招聘需求48小时未处理简历异常", e);
}
}
/**
* 检查并提醒24小时未处理简历的招聘需求(技术督导)
*/
public void checkAndRemindUnprocessedResumeIn24HoursForSupervisor() {
try {
List<RecruitmentDemand> demands = recruitmentDemandMapper.find24HoursUnprocessedResumeDemandsForSupervisor();
if (CollectionUtils.isEmpty(demands)) {
log.info("没有找到符合条件的招聘需求(技术督导-24小时未处理简历)");
return;
}
log.info("开始处理技术督导24小时未处理简历提醒,共 {} 条招聘需求", demands.size());
int successCount = 0;
for (RecruitmentDemand demand : demands) {
try {
log.info("开始处理招聘需求ID:{},技术督导:{}", demand.getId(), demand.getTechnicalSupervisorName());
sendTechnicalSupervisorQWMessage(
demand.getId(),
"招聘进度提醒",
"您的招聘需求已超过24小时未完成简历处理,请点击查看处理。",
"24小时未处理提醒-技术督导"
);
successCount++;
} catch (Exception e) {
log.error("处理招聘需求ID:{} 推送技术督导24小时未处理消息异常", demand.getId(), e);
}
}
log.info("技术督导24小时未处理简历检查完成,共处理 {} 条招聘需求,成功推送 {} 条", demands.size(), successCount);
} catch (Exception e) {
log.error("检查技术督导招聘需求24小时未处理简历异常", e);
}
}
/**
* 检查并提醒48小时未处理简历的招聘需求(技术督导)
*/
public void checkAndRemindUnprocessedResumeIn48HoursForSupervisor() {
try {
List<RecruitmentDemand> demands = recruitmentDemandMapper.find48HoursUnprocessedResumeDemandsForSupervisor();
if (CollectionUtils.isEmpty(demands)) {
log.info("没有找到符合条件的招聘需求(技术督导-48小时未处理简历)");
return;
}
log.info("开始处理技术督导48小时未处理简历提醒,共 {} 条招聘需求", demands.size());
int successCount = 0;
for (RecruitmentDemand demand : demands) {
try {
log.info("开始处理招聘需求ID:{},技术督导:{}", demand.getId(), demand.getTechnicalSupervisorName());
sendTechnicalSupervisorQWMessage(
demand.getId(),
"招聘进度提醒",
"您的招聘需求已超过48小时未完成简历处理,请点击查看处理。",
"48小时未处理提醒-技术督导"
);
successCount++;
} catch (Exception e) {
log.error("处理招聘需求ID:{} 推送技术督导48小时未处理消息异常", demand.getId(), e);
}
}
log.info("技术督导48小时未处理简历检查完成,共处理 {} 条招聘需求,成功推送 {} 条", demands.size(), successCount);
} catch (Exception e) {
log.error("检查技术督导招聘需求48小时未处理简制历异常", e);
}
}
/**
* 检查并提醒24小时未处理简历的招聘需求(总部人员)
*/
public void checkAndRemindUnprocessedResumeIn24HoursForHeadquarters() {
try {
List<RecruitmentDemand> demands = recruitmentDemandMapper.find24HoursUnprocessedResumeDemandsForHeadquarters();
if (CollectionUtils.isEmpty(demands)) {
log.info("没有找到符合条件的招聘需求(总部人员-24小时未处理简历)");
return;
}
log.info("开始处理总部人员24小时未处理简历提醒,共 {} 条招聘需求", demands.size());
int successCount = 0;
for (RecruitmentDemand demand : demands) {
try {
log.info("开始处理招聘需求ID:{},创建人手机号:{}", demand.getId(), demand.getCreatedPhone());
sendHeadquartersQWMessage(
demand.getId(),
"招聘进度提醒",
"您的招聘需求已超过24小时未完成简历处理,请及时前往saas+增值业务运营平台查看处理。",
"24小时未处理提醒-总部人员"
);
successCount++;
} catch (Exception e) {
log.error("处理招聘需求ID:{} 推送总部人员24小时未处理消息异常", demand.getId(), e);
}
}
log.info("总部人员24小时未处理简历检查完成,共处理 {} 条招聘需求,成功推送 {} 条", demands.size(), successCount);
} catch (Exception e) {
log.error("检查总部人员招聘需求24小时未处理简历异常", e);
}
}
/**
* 检查并提醒48小时未处理简历的招聘需求(总部人员)
*/
public void checkAndRemindUnprocessedResumeIn48HoursForHeadquarters() {
try {
List<RecruitmentDemand> demands = recruitmentDemandMapper.find48HoursUnprocessedResumeDemandsForHeadquarters();
if (CollectionUtils.isEmpty(demands)) {
log.info("没有找到符合条件的招聘需求(总部人员-48小时未处理简历)");
return;
}
log.info("开始处理总部人员48小时未处理简历提醒,共 {} 条招聘需求", demands.size());
int successCount = 0;
for (RecruitmentDemand demand : demands) {
try {
log.info("开始处理招聘需求ID:{},创建人手机号:{}", demand.getId(), demand.getCreatedPhone());
sendHeadquartersQWMessage(
demand.getId(),
"招聘进度提醒",
"您的招聘需求已超过48小时未完成简历处理,请及时前往saas+增值业务运营平台查看处理。",
"48小时未处理提醒-总部人员"
);
successCount++;
} catch (Exception e) {
log.error("处理招聘需求ID:{} 推送总部人员48小时未处理消息异常", demand.getId(), e);
}
}
log.info("总部人员48小时未处理简历检查完成,共处理 {} 条招聘需求,成功推送 {} 条", demands.size(), successCount);
} catch (Exception e) {
log.error("检查总部人员招聘需求48小时未处理简历异常", e);
}
}
/**
* 统计并提醒区域运营超时未处理简历情况
* 每天上午9点统计,普通需求超过48小时,加急需求超过24小时
* 推送给指定管理人员
*/
public void statAndRemindRegionOperationUnprocessedResumes() {
try {
List<Map<String, Object>> statList = recruitmentDemandMapper.statRegionOperationUnprocessedResumes();
if (CollectionUtils.isEmpty(statList)) {
log.info("没有区域运营超时未处理的简历");
return;
}
log.info("开始统计区域运营超时未处理简历,共 {} 个区域运营", statList.size());
// 构建推送文案
StringBuilder content = new StringBuilder();
content.append("超过48小时(加急需求按24小时)未及时处理简历的区域运营名单\n");
for (Map<String, Object> stat : statList) {
String regionOperationName = (String) stat.get("regionOperationName");
Object countObj = stat.get("unprocessedCount");
long count = countObj instanceof Long ? (Long) countObj : ((Integer) countObj).longValue();
content.append(regionOperationName).append(":").append(count).append("\n");
log.info("区域运营:{},未处理简历数:{}", regionOperationName, count);
}
// 获取企微用户列表
Map<String, String> sendUserIds = getSendUserIds();
if (sendUserIds == null || sendUserIds.isEmpty()) {
log.error("统计提醒 - 获取企微用户列表失败");
return;
}
// 从配置中读取推送接收人手机号
String targetPhonesConfig = env.getProperty("recruitment.unprocessed.resume.stat.target.phones");
if (StringUtils.isBlank(targetPhonesConfig)) {
log.error("统计提醒 - 未配置推送接收人手机号,配置项:recruitment.unprocessed.resume.stat.target.phones");
return;
}
String[] targetPhones = targetPhonesConfig.split(",");
log.info("统计提醒 - 推送接收人手机号:{}", targetPhonesConfig);
for (String phone : targetPhones) {
phone = phone.trim(); // 去除空格
if (StringUtils.isBlank(phone)) {
continue;
}
try {
// 查询企微用户ID
String qwUserId = sendUserIds.get(phone);
if (StringUtils.isEmpty(qwUserId)) {
log.warn("统计提醒 - 未找到手机号 {} 对应的企微用户ID", phone);
continue;
}
// 发送文本消息
boolean success = sendDJCloudWechatTextMessage(
qwUserId,
"简历处理异常提醒\n" + content.toString(),
"区域运营超时简历统计提醒-" + phone
);
if (success) {
log.info("成功推送统计消息给:{}", phone);
}
} catch (Exception e) {
log.error("推送统计消息给 {} 失败", phone, e);
}
}
log.info("区域运营超时未处理简历统计完成");
} catch (Exception e) {
log.error("统计区域运营超时未处理简历异常", e);
}
}
} }
...@@ -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);
}
}
} }
...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.staff.service.recruitment; ...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.staff.service.recruitment;
import cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandDTO; import cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandDTO;
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.RecruitmentProcessResultDTO;
import cn.com.glsx.dj.staff.dto.recruitment.RecruitmentResumeDTO; import cn.com.glsx.dj.staff.dto.recruitment.RecruitmentResumeDTO;
import cn.com.glsx.dj.staff.enums.*; import cn.com.glsx.dj.staff.enums.*;
import cn.com.glsx.dj.staff.mapper.RecruitmentResumeMapper; import cn.com.glsx.dj.staff.mapper.RecruitmentResumeMapper;
...@@ -67,13 +68,15 @@ public class RecruitmentResumeService { ...@@ -67,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());
...@@ -81,12 +84,23 @@ public class RecruitmentResumeService { ...@@ -81,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 (!Objects.equals(record.getStatus(), RecruitmentResumeStatusEnum.NOT_PROCESS.getValue())) { 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) {
...@@ -102,10 +116,6 @@ public class RecruitmentResumeService { ...@@ -102,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 (!Objects.equals(record.getStatus(), RecruitmentResumeStatusEnum.NOT_PROCESS.getValue())) {
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())
...@@ -115,44 +125,22 @@ public class RecruitmentResumeService { ...@@ -115,44 +125,22 @@ 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())
.mixResult(getMixResult(dto)).status(getStatus(dto)).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;
} }
public Byte getStatus(RecruitmentResume dto) {
if (dto == null || dto.getProcessResult() == null) {
return null;
}
return RecruitmentResumeStatusEnum.FINISHED.getValue();
}
private Byte getMixResult(RecruitmentResume dto) {
if (dto == null || dto.getProcessResult() == null) {
return null;
}
if (Objects.equals(dto.getProcessResult(), RecruitmentResumeProcessResultEnum.NOT_MATCH.getValue())) {
return RecruitmentResumeMixResultEnum.NOT_MATCH.getValue();
}
if (Objects.equals(dto.getInterviewResult(), RecruitmentResumeInterviewResultEnum.PASS.getValue())) {
return RecruitmentResumeMixResultEnum.INTERVIEW_PASS.getValue();
}
if (Objects.equals(dto.getInterviewResult(), RecruitmentResumeInterviewResultEnum.FAIL.getValue())) {
return RecruitmentResumeMixResultEnum.INTERVIEW_FAIL.getValue();
}
return RecruitmentResumeMixResultEnum.NOT_PROCESS.getValue();
}
/** /**
* 处理简历List * 处理简历List
* *
* @param dto * @param dto
* @param processResult 处理结果收集器,用于收集处理过程中的简历变更信息
*/ */
@Transactional @Transactional
public void processResumes(RecruitmentDemandDetailDTO dto) { public void processResumes(RecruitmentDemandDetailDTO dto, RecruitmentProcessResultDTO processResult) {
Integer demandId = dto.getId(); Integer demandId = dto.getId();
List<RecruitmentResume> resumesAll = dto.getResumes(); List<RecruitmentResume> resumesAll = dto.getResumes();
if (CollectionUtils.isEmpty(resumesAll)) { if (CollectionUtils.isEmpty(resumesAll)) {
...@@ -168,11 +156,6 @@ public class RecruitmentResumeService { ...@@ -168,11 +156,6 @@ public class RecruitmentResumeService {
} else { } else {
resumesEdit.add(resume); resumesEdit.add(resume);
} }
if (Objects.nonNull(resume.getProcessResult())) {
resume.setProcessorName(dto.getUpdatedBy());
resume.setProcessTime(new Date());
}
} }
// 处理已有的简历(部分删除或全部删除) // 处理已有的简历(部分删除或全部删除)
...@@ -190,10 +173,21 @@ public class RecruitmentResumeService { ...@@ -190,10 +173,21 @@ public class RecruitmentResumeService {
recruitmentResumeMapper.updateByExampleSelective(resumeToDelete, resumeExampleToDel); recruitmentResumeMapper.updateByExampleSelective(resumeToDelete, resumeExampleToDel);
if (CollectionUtils.isNotEmpty(resumesAdd)) { if (CollectionUtils.isNotEmpty(resumesAdd)) {
// 收集:有新增简历,新增简历只算新增事件
processResult.setHasNewResume(true);
for (RecruitmentResume resume : resumesAdd) { for (RecruitmentResume resume : resumesAdd) {
if (Objects.nonNull(resume.getProcessResult())) {
resume.setProcessorName(dto.getUpdatedBy());
resume.setProcessTime(new Date());
}
if (Objects.nonNull(resume.getInterviewResult())) {
resume.setInterviewProcessorName(dto.getUpdatedBy());
resume.setInterviewProcessTime(new Date());
}
resume.setDemandId(demandId); resume.setDemandId(demandId);
resume.setStatus(getStatus(resume));
resume.setMixResult(getMixResult(resume));
resume.setCreatedBy(dto.getUpdatedBy()); resume.setCreatedBy(dto.getUpdatedBy());
resume.setCreatedDate(new Date()); resume.setCreatedDate(new Date());
resume.setUpdatedBy(dto.getUpdatedBy()); resume.setUpdatedBy(dto.getUpdatedBy());
...@@ -212,85 +206,96 @@ public class RecruitmentResumeService { ...@@ -212,85 +206,96 @@ public class RecruitmentResumeService {
List<RecruitmentResume> oldResumes = recruitmentResumeMapper.selectByExample(resumeExampleToUpdate); List<RecruitmentResume> oldResumes = recruitmentResumeMapper.selectByExample(resumeExampleToUpdate);
Map<Integer, RecruitmentResume> oldResumeMap = oldResumes.stream().collect(Collectors.toMap(RecruitmentResume::getId, oldResume -> oldResume, (oldResume, newResume) -> newResume)); Map<Integer, RecruitmentResume> oldResumeMap = oldResumes.stream().collect(Collectors.toMap(RecruitmentResume::getId, oldResume -> oldResume, (oldResume, newResume) -> newResume));
for (RecruitmentResume resume : resumesEdit) { for (RecruitmentResume resume : resumesEdit) {
// 更新简历时入参的更新时间必传
if (resume.getUpdatedDate() == null) {
log.error("更新简历信息时“更新时间”字段必传,简历ID: {}", resume.getId());
throw new RpcServiceException(RpcErrorEnum.BUSINESS_ERROR, "更新简历信息时“更新时间”字段必传");
}
RecruitmentResume oldResume = oldResumeMap.get(resume.getId()); RecruitmentResume oldResume = oldResumeMap.get(resume.getId());
Byte oldProcessResult = oldResume.getProcessResult(); Byte oldInterviewResult = oldResume.getInterviewResult();
if (Objects.nonNull(oldProcessResult)) { if (Objects.nonNull(oldInterviewResult)) {
continue;
} else {
if (hasUpdate(resume, oldResume)) { if (hasUpdate(resume, oldResume)) {
log.info("简历状态已过期"); log.info("简历状态已过期");
throw new RpcServiceException(RpcErrorEnum.BUSINESS_ERROR, "简历状态已过期,请确认后重新操作。"); throw new RpcServiceException(RpcErrorEnum.BUSINESS_ERROR, "简历状态已过期,请确认后重新操作。");
} else {
continue;
} }
}
Byte oldProcessResult = oldResume.getProcessResult();
if (Objects.nonNull(oldProcessResult)) {
Byte interviewResult = resume.getInterviewResult();
if (Objects.nonNull(interviewResult)) {
// 收集:有面试结果
processResult.setHasInterviewResult(true);
oldResume.setInterviewResult(interviewResult);
oldResume.setInterviewTime(resume.getInterviewTime());
oldResume.setInterviewExplanation(resume.getInterviewExplanation());
oldResume.setInterviewProcessorName(dto.getUpdatedBy());
oldResume.setInterviewProcessTime(new Date());
oldResume.setUpdatedBy(dto.getUpdatedBy());
oldResume.setUpdatedDate(new Date());
recruitmentResumeMapper.updateByPrimaryKey(oldResume);
} else { } else {
if (!hasUpdate(resume, oldResume)) {
log.info("简历无更新");
continue; continue;
} }
} } else {
oldResume.setPersonName(resume.getPersonName());
oldResume.setPhoneNumber(resume.getPhoneNumber());
oldResume.setChannelType(resume.getChannelType());
oldResume.setChannelName(resume.getChannelName());
oldResume.setResumeUrl(resume.getResumeUrl());
oldResume.setResumeFileName(resume.getResumeFileName());
oldResume.setDescription(resume.getDescription());
if (Objects.nonNull(resume.getProcessResult())) {
// 收集:有简历处理
processResult.setHasResumeProcess(true);
Byte status = getStatus(resume); oldResume.setProcessResult(resume.getProcessResult());
resume.setStatus(status); oldResume.setExpectedInterviewTime(resume.getExpectedInterviewTime());
if (Objects.isNull(status)) { oldResume.setDescription(resume.getDescription());
resume.setStatus(oldResume.getStatus()); oldResume.setProcessorName(dto.getUpdatedBy());
oldResume.setProcessTime(new Date());
} }
Byte mixResult = getMixResult(resume); if (Objects.nonNull(resume.getInterviewResult())) {
resume.setMixResult(mixResult); // 收集:有面试结果
if (Objects.isNull(mixResult)) { processResult.setHasInterviewResult(true);
resume.setMixResult(oldResume.getMixResult());
oldResume.setInterviewResult(resume.getInterviewResult());
oldResume.setInterviewTime(resume.getInterviewTime());
oldResume.setInterviewExplanation(resume.getInterviewExplanation());
oldResume.setInterviewProcessorName(dto.getUpdatedBy());
oldResume.setInterviewProcessTime(new Date());
}
oldResume.setUpdatedBy(dto.getUpdatedBy());
oldResume.setUpdatedDate(new Date());
recruitmentResumeMapper.updateByPrimaryKey(oldResume);
} }
resume.setUpdatedBy(dto.getUpdatedBy());
resume.setUpdatedDate(new Date());
resume.setDemandId(oldResume.getDemandId());
resume.setCreatedBy(oldResume.getCreatedBy());
resume.setCreatedDate(oldResume.getCreatedDate());
resume.setDeletedFlag(oldResume.getDeletedFlag());
recruitmentResumeMapper.updateByPrimaryKey(resume);
} }
} }
} }
/** /**
* 是否有更新 * 是否有更新,通过比较updatedDate判断
* *
* @param resume * @param resume
* @param oldResume * @param oldResume
* @return * @return
*/ */
private boolean hasUpdate(RecruitmentResume resume, RecruitmentResume oldResume) { private boolean hasUpdate(RecruitmentResume resume, RecruitmentResume oldResume) {
String oldPersonName = oldResume.getPersonName(); Date requestUpdatedDate = resume.getUpdatedDate();
String oldPhoneNumber = oldResume.getPhoneNumber(); Date dbUpdatedDate = oldResume.getUpdatedDate();
String oldResumeUrl = oldResume.getResumeUrl();
Date oldInterviewTime = oldResume.getInterviewTime();
Byte oldInterviewResult = oldResume.getInterviewResult();
String oldDescription = oldResume.getDescription();
Byte oldProcessResult = oldResume.getProcessResult();
String oldChannelType = oldResume.getChannelType();
String oldRecommendedReason = oldResume.getRecommendedReason();
String personName = resume.getPersonName(); // 如果入参更新时间与数据库中的更新时间不一致,则认为已被更新
String phoneNumber = resume.getPhoneNumber(); if (dbUpdatedDate == null) {
String resumeUrl = resume.getResumeUrl();
Date interviewTime = resume.getInterviewTime();
Byte interviewResult = resume.getInterviewResult();
String description = resume.getDescription();
Byte processResult = resume.getProcessResult();
String channelType = resume.getChannelType();
String recommendedReason = resume.getRecommendedReason();
if (!Objects.equals(personName, oldPersonName)
|| !Objects.equals(phoneNumber, oldPhoneNumber)
|| !Objects.equals(resumeUrl, oldResumeUrl)
|| !Objects.equals(interviewTime, oldInterviewTime)
|| !Objects.equals(interviewResult, oldInterviewResult)
|| !Objects.equals(description, oldDescription)
|| !Objects.equals(processResult, oldProcessResult)
|| !Objects.equals(channelType, oldChannelType)
|| !Objects.equals(recommendedReason, oldRecommendedReason)
) {
return true;
} else {
return false; return false;
} }
return !Objects.equals(requestUpdatedDate, dbUpdatedDate);
} }
} }
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.RecruitmentTrialOnboardingDTO;
import cn.com.glsx.dj.staff.mapper.RecruitmentTrialOnboardingMapper;
import cn.com.glsx.dj.staff.model.RecruitmentTrialOnboarding;
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.util.RpcAssert;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@Slf4j
@Service
@Transactional(propagation = Propagation.SUPPORTS, rollbackFor = RpcServiceException.class)
public class RecruitmentTrialOnboardingService {
@Autowired
private RecruitmentTrialOnboardingMapper recruitmentTrialOnboardingMapper;
/**
* 处理试岗人员List
*
* @param dto
*/
@Transactional
public void processTrials(RecruitmentDemandDetailDTO dto) {
Integer demandId = dto.getId();
List<RecruitmentTrialOnboarding> trialsAll = dto.getTrialOnboardings();
if (CollectionUtils.isEmpty(trialsAll)) {
log.info("无试岗人员");
trialsAll = new ArrayList<>();
}
List<RecruitmentTrialOnboarding> trialsAdd = new ArrayList<>();
List<RecruitmentTrialOnboarding> trialsEdit = new ArrayList<>();
for (RecruitmentTrialOnboarding trial : trialsAll) {
if (trial.getId() == null) {
trialsAdd.add(trial);
} else {
trialsEdit.add(trial);
}
}
// 删除已有的试岗人员(部分删除或全部删除)
RecruitmentTrialOnboarding trialToDelete = new RecruitmentTrialOnboarding();
trialToDelete.setDeletedFlag(BaseModel.DeletedFlagEnum.D.name());
trialToDelete.setUpdatedBy(dto.getUpdatedBy());
trialToDelete.setUpdatedDate(new Date());
Example trialExampleToDel = new Example(RecruitmentTrialOnboarding.class);
Example.Criteria trialCriteriaToDel = trialExampleToDel.createCriteria();
trialCriteriaToDel.andEqualTo("demandId", demandId).andEqualTo("deletedFlag", BaseModel.DeletedFlagEnum.N.name());
if (CollectionUtils.isNotEmpty(trialsEdit)) {
trialCriteriaToDel.andNotIn("id", trialsEdit.stream().map(RecruitmentTrialOnboarding::getId).collect(Collectors.toList()));
}
recruitmentTrialOnboardingMapper.updateByExampleSelective(trialToDelete, trialExampleToDel);
if (CollectionUtils.isNotEmpty(trialsAdd)) {
for (RecruitmentTrialOnboarding trial : trialsAdd) {
trial.setDemandId(demandId);
trial.setCreatedBy(dto.getUpdatedBy());
trial.setCreatedDate(new Date());
trial.setUpdatedBy(dto.getUpdatedBy());
trial.setUpdatedDate(new Date());
recruitmentTrialOnboardingMapper.insertSelective(trial);
}
}
if (CollectionUtils.isNotEmpty(trialsEdit)) {
for (RecruitmentTrialOnboarding trial : trialsEdit) {
trial.setDemandId(null);
trial.setCreatedBy(null);
trial.setCreatedDate(null);
trial.setDeletedFlag(null);
trial.setUpdatedBy(dto.getUpdatedBy());
trial.setUpdatedDate(new Date());
recruitmentTrialOnboardingMapper.updateByPrimaryKeySelective(trial);
}
}
}
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);
}
}
}
...@@ -18,10 +18,15 @@ ...@@ -18,10 +18,15 @@
<result column="requirement_description" property="requirementDescription" jdbcType="VARCHAR" /> <result column="requirement_description" property="requirementDescription" jdbcType="VARCHAR" />
<result column="recruiter_name" property="recruiterName" jdbcType="VARCHAR" /> <result column="recruiter_name" property="recruiterName" jdbcType="VARCHAR" />
<result column="recruiter_phone" property="recruiterPhone" jdbcType="VARCHAR" /> <result column="recruiter_phone" property="recruiterPhone" jdbcType="VARCHAR" />
<result column="technical_supervisor_name" property="technicalSupervisorName" jdbcType="VARCHAR" />
<result column="technical_supervisor_phone" property="technicalSupervisorPhone" jdbcType="VARCHAR" />
<result column="recall_reason" property="recallReason" jdbcType="VARCHAR" /> <result column="recall_reason" property="recallReason" jdbcType="VARCHAR" />
<result column="province_city" property="provinceCity" jdbcType="VARCHAR" /> <result column="province_city" property="provinceCity" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="TINYINT" /> <result column="status" property="status" jdbcType="TINYINT" />
<result column="urgent" property="urgent" jdbcType="TINYINT" />
<result column="start_time" property="startTime" jdbcType="TIMESTAMP" />
<result column="confirm_flag" property="confirmFlag" jdbcType="CHAR" /> <result column="confirm_flag" property="confirmFlag" jdbcType="CHAR" />
<result column="created_phone" property="createdPhone" jdbcType="VARCHAR" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" /> <result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" /> <result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" /> <result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
...@@ -30,6 +35,8 @@ ...@@ -30,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>
...@@ -39,39 +46,76 @@ ...@@ -39,39 +46,76 @@
--> -->
id, merchant_name, merchant_id, region_operation_id, region_operation_name, business_type, id, merchant_name, merchant_id, region_operation_id, region_operation_name, business_type,
business_type_name, recruitment_quantity, recruitment_type, recruitment_type_name, business_type_name, recruitment_quantity, recruitment_type, recruitment_type_name,
requirement_description, recruiter_name, recruiter_phone, recall_reason, province_city, status, requirement_description, recruiter_name, recruiter_phone, technical_supervisor_name,
confirm_flag, created_by, created_date, updated_by, updated_date, deleted_flag technical_supervisor_phone, recall_reason, province_city, status, urgent, start_time,
confirm_flag, created_phone, created_by, created_date, updated_by, updated_date, deleted_flag
</sql> </sql>
<select id="statRecruitmentDemand" resultType="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandDTO"> <select id="statRecruitmentDemand" resultType="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandDTO">
select count(if((a.status in (2, 3) and a.confirm_flag = 'N') or (a.status = 1 and a.min_dclrr_status = 0), a.id, select
count(if((a.status in (2, 3) and a.confirm_flag = 'N')
or (a.status = 1 and
(a.resume_wait_confirm_count > 0 or trial_wait_confirm_count > 0 or
onboarding_wait_confirm_count > 0)),
a.id,
null)) as waitProcessCount, null)) as waitProcessCount,
count(if(a.status = 1 and a.resume_wait_confirm_count > 0, a.id, null)) as waitTSProcessCount,
count(if(a.status = 4, a.id, null)) as waitTSCheckCount,
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(dclrr.status) as min_dclrr_status (select count(*)
from dj_car_life_recruitment_resume dclrr
where dclrr.demand_id = dclrd.id and dclrr.deleted_flag = 'N'
and (dclrr.process_result is null
or (dclrr.process_result = 2 and dclrr.interview_result is null))) as resume_wait_confirm_count,
(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') as trial_wait_confirm_count,
(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') 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'
<where> <where>
dclrd.deleted_flag = 'N' dclrd.deleted_flag = 'N'
<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; ) a
</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.status = 0), 0) as wait_process_resume_count and (dclrr2.process_result is null or (dclrr2.process_result = 2 and dclrr2.interview_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'
...@@ -81,23 +125,57 @@ ...@@ -81,23 +125,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(
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 or (dclrr.process_result = 2 and dclrr.interview_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( 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.status = 0))) and (dclrr.process_result is null or (dclrr.process_result = 2 and dclrr.interview_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>
...@@ -137,8 +215,196 @@ ...@@ -137,8 +215,196 @@
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 FIELD(status, 0,4,1,2,3) asc, created_date desc
</select>
<select id="find72HoursNoResumeDemands" resultMap="BaseResultMap">
SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
d.province_city, d.status, d.urgent, d.start_time, d.confirm_flag,
d.created_phone, d.created_by, d.created_date, d.updated_by, d.updated_date, d.deleted_flag
FROM dj_car_life_recruitment_demand d
WHERE d.status = 1
AND d.deleted_flag = 'N'
AND d.start_time IS NOT NULL
AND TIMESTAMPDIFF(MINUTE, d.start_time, NOW()) = 4320
AND NOT EXISTS (
SELECT 1
FROM dj_car_life_recruitment_resume r
WHERE r.demand_id = d.id
AND r.deleted_flag = 'N'
)
ORDER BY d.id DESC
</select>
<select id="find24HoursUnprocessedResumeDemands" resultMap="BaseResultMap">
SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
d.province_city, d.status, d.urgent, d.start_time, d.confirm_flag,
d.created_phone, d.created_by, d.created_date, d.updated_by, d.updated_date, d.deleted_flag
FROM dj_car_life_recruitment_demand d
WHERE d.status = 1
AND d.deleted_flag = 'N'
AND d.business_type IN ('1', '2', '3', '5')
AND EXISTS (
SELECT 1
FROM dj_car_life_recruitment_resume r
WHERE r.demand_id = d.id
AND r.deleted_flag = 'N'
AND r.process_result IS NULL
AND TIMESTAMPDIFF(MINUTE, r.created_date, NOW()) = 1440
)
ORDER BY d.id DESC
</select>
<select id="find48HoursUnprocessedResumeDemands" resultMap="BaseResultMap">
SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
d.province_city, d.status, d.urgent, d.start_time, d.confirm_flag,
d.created_phone, d.created_by, d.created_date, d.updated_by, d.updated_date, d.deleted_flag
FROM dj_car_life_recruitment_demand d
WHERE d.status = 1
AND d.deleted_flag = 'N'
AND d.business_type IN ('1', '2', '3', '5')
AND EXISTS (
SELECT 1
FROM dj_car_life_recruitment_resume r
WHERE r.demand_id = d.id
AND r.deleted_flag = 'N'
AND r.process_result IS NULL
AND TIMESTAMPDIFF(MINUTE, r.created_date, NOW()) = 2880
)
ORDER BY d.id DESC
</select>
<select id="find24HoursUnprocessedResumeDemandsForSupervisor" resultMap="BaseResultMap">
SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
d.province_city, d.status, d.urgent, d.start_time, d.confirm_flag,
d.created_phone, d.created_by, d.created_date, d.updated_by, d.updated_date, d.deleted_flag
FROM dj_car_life_recruitment_demand d
WHERE d.status = 1
AND d.deleted_flag = 'N'
AND d.business_type IN ('4', '6', '7', '8')
AND EXISTS (
SELECT 1
FROM dj_car_life_recruitment_resume r
WHERE r.demand_id = d.id
AND r.deleted_flag = 'N'
AND r.process_result IS NULL
AND TIMESTAMPDIFF(MINUTE, r.created_date, NOW()) = 1440
)
ORDER BY d.id DESC
</select>
<select id="find48HoursUnprocessedResumeDemandsForSupervisor" resultMap="BaseResultMap">
SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
d.province_city, d.status, d.urgent, d.start_time, d.confirm_flag,
d.created_phone, d.created_by, d.created_date, d.updated_by, d.updated_date, d.deleted_flag
FROM dj_car_life_recruitment_demand d
WHERE d.status = 1
AND d.deleted_flag = 'N'
AND d.business_type IN ('4', '6', '7', '8')
AND EXISTS (
SELECT 1
FROM dj_car_life_recruitment_resume r
WHERE r.demand_id = d.id
AND r.deleted_flag = 'N'
AND r.process_result IS NULL
AND TIMESTAMPDIFF(MINUTE, r.created_date, NOW()) = 2880
)
ORDER BY d.id DESC
</select>
<select id="find24HoursUnprocessedResumeDemandsForHeadquarters" resultMap="BaseResultMap">
SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
d.province_city, d.status, d.urgent, d.start_time, d.confirm_flag,
d.created_phone, d.created_by, d.created_date, d.updated_by, d.updated_date, d.deleted_flag
FROM dj_car_life_recruitment_demand d
WHERE d.status = 1
AND d.deleted_flag = 'N'
AND d.business_type = '9'
AND EXISTS (
SELECT 1
FROM dj_car_life_recruitment_resume r
WHERE r.demand_id = d.id
AND r.deleted_flag = 'N'
AND r.process_result IS NULL
AND TIMESTAMPDIFF(MINUTE, r.created_date, NOW()) = 1440
)
ORDER BY d.id DESC
</select>
<select id="find48HoursUnprocessedResumeDemandsForHeadquarters" resultMap="BaseResultMap">
SELECT
d.id, d.merchant_name, d.merchant_id, d.region_operation_id, d.region_operation_name,
d.business_type, d.business_type_name, d.recruitment_quantity, d.recruitment_type,
d.recruitment_type_name, d.requirement_description, d.recruiter_name, d.recruiter_phone,
d.technical_supervisor_name, d.technical_supervisor_phone, d.recall_reason,
d.province_city, d.status, d.urgent, d.start_time, d.confirm_flag,
d.created_phone, d.created_by, d.created_date, d.updated_by, d.updated_date, d.deleted_flag
FROM dj_car_life_recruitment_demand d
WHERE d.status = 1
AND d.deleted_flag = 'N'
AND d.business_type = '9'
AND EXISTS (
SELECT 1
FROM dj_car_life_recruitment_resume r
WHERE r.demand_id = d.id
AND r.deleted_flag = 'N'
AND r.process_result IS NULL
AND TIMESTAMPDIFF(MINUTE, r.created_date, NOW()) = 2880
)
ORDER BY d.id DESC
</select>
<!-- 统计区域运营超时未处理简历情况 -->
<select id="statRegionOperationUnprocessedResumes" resultType="java.util.HashMap">
SELECT
d.region_operation_id AS regionOperationId,
d.region_operation_name AS regionOperationName,
COUNT(DISTINCT r.id) AS unprocessedCount
FROM dj_car_life_recruitment_demand d
INNER JOIN dj_car_life_recruitment_resume r ON d.id = r.demand_id
WHERE d.status = 1
AND d.deleted_flag = 'N'
AND d.business_type IN ('1', '2', '3', '5')
AND d.region_operation_id IS NOT NULL
AND d.region_operation_name IS NOT NULL
AND r.deleted_flag = 'N'
AND r.process_result IS NULL
AND (
(d.urgent = 0 AND TIMESTAMPDIFF(HOUR, r.created_date, NOW()) >= 48)
OR
(d.urgent = 1 AND TIMESTAMPDIFF(HOUR, r.created_date, NOW()) >= 24)
)
GROUP BY d.region_operation_id, d.region_operation_name
HAVING COUNT(DISTINCT r.id) > 0
ORDER BY unprocessedCount DESC, d.region_operation_name
</select> </select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
<result column="position_match_degree_name" property="positionMatchDegreeName" jdbcType="VARCHAR" /> <result column="position_match_degree_name" property="positionMatchDegreeName" jdbcType="VARCHAR" />
<result column="channel_type" property="channelType" jdbcType="VARCHAR" /> <result column="channel_type" property="channelType" jdbcType="VARCHAR" />
<result column="channel_name" property="channelName" jdbcType="VARCHAR" /> <result column="channel_name" property="channelName" jdbcType="VARCHAR" />
<result column="skill_tags" property="skillTags" jdbcType="VARCHAR" />
<result column="confirm_flag" property="confirmFlag" jdbcType="CHAR" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" /> <result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" /> <result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" /> <result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
...@@ -38,7 +40,7 @@ ...@@ -38,7 +40,7 @@
id, demand_id, person_name, phone_number, onboarding_date, personality_type, personality_name, id, demand_id, person_name, phone_number, onboarding_date, personality_type, personality_name,
ability_performance_type, ability_performance_name, education_level_type, education_level_name, ability_performance_type, ability_performance_name, education_level_type, education_level_name,
appearance_type, appearance_name, position_match_degree_type, position_match_degree_name, appearance_type, appearance_name, position_match_degree_type, position_match_degree_name,
channel_type, channel_name, created_by, created_date, updated_by, updated_date, deleted_flag channel_type, channel_name, skill_tags, confirm_flag, created_by, created_date, updated_by, updated_date, deleted_flag
</sql> </sql>
<sql id="list_condition" > <sql id="list_condition" >
where dclobp.deleted_flag = 'N' where dclobp.deleted_flag = 'N'
...@@ -51,7 +53,7 @@ ...@@ -51,7 +53,7 @@
dclobp.id, dclobp.demand_id, dclobp.person_name, dclobp.phone_number, dclobp.onboarding_date, dclobp.personality_type, dclobp.personality_name, dclobp.id, dclobp.demand_id, dclobp.person_name, dclobp.phone_number, dclobp.onboarding_date, dclobp.personality_type, dclobp.personality_name,
dclobp.ability_performance_type, dclobp.ability_performance_name, dclobp.education_level_type, dclobp.education_level_name, dclobp.ability_performance_type, dclobp.ability_performance_name, dclobp.education_level_type, dclobp.education_level_name,
dclobp.appearance_type, dclobp.appearance_name, dclobp.position_match_degree_type, dclobp.position_match_degree_name, dclobp.appearance_type, dclobp.appearance_name, dclobp.position_match_degree_type, dclobp.position_match_degree_name,
dclobp.channel_type, dclobp.channel_name, dclobp.created_by, dclobp.created_date, dclobp.updated_by, dclobp.updated_date, dclobp.deleted_flag dclobp.channel_type, dclobp.channel_name, dclobp.skill_tags, dclobp.created_by, dclobp.created_date, dclobp.updated_by, dclobp.updated_date, dclobp.deleted_flag
from dj_car_life_recruitment_onboarding_plan dclobp from dj_car_life_recruitment_onboarding_plan dclobp
<include refid="list_condition"/> <include refid="list_condition"/>
order by onboarding_date order by onboarding_date
...@@ -63,4 +65,13 @@ ...@@ -63,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
...@@ -7,18 +7,20 @@ ...@@ -7,18 +7,20 @@
--> -->
<id column="id" property="id" jdbcType="INTEGER" /> <id column="id" property="id" jdbcType="INTEGER" />
<result column="demand_id" property="demandId" jdbcType="INTEGER" /> <result column="demand_id" property="demandId" jdbcType="INTEGER" />
<result column="mix_result" property="mixResult" jdbcType="TINYINT" />
<result column="status" property="status" jdbcType="TINYINT" />
<result column="person_name" property="personName" jdbcType="VARCHAR" /> <result column="person_name" property="personName" jdbcType="VARCHAR" />
<result column="phone_number" property="phoneNumber" jdbcType="VARCHAR" /> <result column="phone_number" property="phoneNumber" jdbcType="VARCHAR" />
<result column="resume_url" property="resumeUrl" jdbcType="VARCHAR" /> <result column="resume_url" property="resumeUrl" jdbcType="VARCHAR" />
<result column="resume_file_name" property="resumeFileName" jdbcType="VARCHAR" /> <result column="resume_file_name" property="resumeFileName" jdbcType="VARCHAR" />
<result column="process_result" property="processResult" jdbcType="TINYINT" /> <result column="process_result" property="processResult" jdbcType="TINYINT" />
<result column="interview_time" property="interviewTime" jdbcType="TIMESTAMP" /> <result column="expected_interview_time" property="expectedInterviewTime" jdbcType="TIMESTAMP" />
<result column="interview_result" property="interviewResult" jdbcType="TINYINT" />
<result column="description" property="description" jdbcType="VARCHAR" /> <result column="description" property="description" jdbcType="VARCHAR" />
<result column="processor_name" property="processorName" jdbcType="VARCHAR" /> <result column="processor_name" property="processorName" jdbcType="VARCHAR" />
<result column="process_time" property="processTime" jdbcType="TIMESTAMP" /> <result column="process_time" property="processTime" jdbcType="TIMESTAMP" />
<result column="interview_result" property="interviewResult" jdbcType="TINYINT" />
<result column="interview_time" property="interviewTime" jdbcType="TIMESTAMP" />
<result column="interview_explanation" property="interviewExplanation" jdbcType="VARCHAR" />
<result column="interview_processor_name" property="interviewProcessorName" jdbcType="VARCHAR" />
<result column="interview_process_time" property="interviewProcessTime" jdbcType="TIMESTAMP" />
<result column="channel_type" property="channelType" jdbcType="VARCHAR" /> <result column="channel_type" property="channelType" jdbcType="VARCHAR" />
<result column="channel_name" property="channelName" jdbcType="VARCHAR" /> <result column="channel_name" property="channelName" jdbcType="VARCHAR" />
<result column="recommended_reason" property="recommendedReason" jdbcType="VARCHAR" /> <result column="recommended_reason" property="recommendedReason" jdbcType="VARCHAR" />
...@@ -35,8 +37,10 @@ ...@@ -35,8 +37,10 @@
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
--> -->
id, demand_id, mix_result, status, person_name, phone_number, resume_url, resume_file_name, process_result, interview_time, id, demand_id, person_name, phone_number, resume_url, resume_file_name,
interview_result, description, processor_name, process_time, channel_type, channel_name, recommended_reason, created_by, created_date, process_result, expected_interview_time, description, processor_name, process_time,
interview_result, interview_time, interview_explanation, interview_processor_name, interview_process_time,
channel_type, channel_name, recommended_reason, created_by, created_date,
updated_by, updated_date, deleted_flag updated_by, updated_date, deleted_flag
</sql> </sql>
<sql id="list_condition"> <sql id="list_condition">
...@@ -50,17 +54,17 @@ ...@@ -50,17 +54,17 @@
<select id="listRecruitmentResume" resultMap="DTOResultMap"> <select id="listRecruitmentResume" resultMap="DTOResultMap">
select select
dclrr.id, dclrr.demand_id, dclrr.mix_result, dclrr.status, dclrr.person_name, dclrr.phone_number, dclrr.resume_url, dclrr.process_result, dclrr.id, dclrr.demand_id, dclrr.person_name, dclrr.phone_number, dclrr.resume_url, dclrr.process_result,
dclrr.interview_time, dclrr.interview_result, dclrr.description, dclrr.processor_name, dclrr.process_time, dclrr.recommended_reason, dclrr.interview_time, dclrr.interview_result, dclrr.description, dclrr.processor_name, dclrr.process_time, dclrr.recommended_reason,
dclrr.created_by, dclrr.created_date, dclrr.updated_by, dclrr.updated_date, dclrr.deleted_flag dclrr.created_by, dclrr.created_date, dclrr.updated_by, dclrr.updated_date, dclrr.deleted_flag
from dj_car_life_recruitment_resume dclrr from dj_car_life_recruitment_resume dclrr
<include refid="list_condition"/> <include refid="list_condition"/>
order by dclrr.status, dclrr.id order by IF(dclrr.process_result is null, 0, 1),dclrr.id
</select> </select>
<select id="statRecruitmentResume" resultType="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentResumeDTO"> <select id="statRecruitmentResume" resultType="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentResumeDTO">
select select
ifnull(count(if(dclrr.status = 1, 1, null)), 0) as processResumeCount, ifnull(count(if(dclrr.process_result is not null, 1, null)), 0) as processResumeCount,
ifnull(count(*),0) as resumeCount ifnull(count(*),0) as resumeCount
from dj_car_life_recruitment_resume dclrr from dj_car_life_recruitment_resume dclrr
<include refid="list_condition"/> <include refid="list_condition"/>
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.com.glsx.dj.staff.mapper.RecruitmentTrialOnboardingMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.RecruitmentTrialOnboarding" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="demand_id" property="demandId" jdbcType="INTEGER" />
<result column="person_name" property="personName" jdbcType="VARCHAR" />
<result column="phone_number" property="phoneNumber" jdbcType="VARCHAR" />
<result column="trial_time" property="trialTime" jdbcType="TIMESTAMP" />
<result column="channel_type" property="channelType" jdbcType="VARCHAR" />
<result column="channel_name" property="channelName" jdbcType="VARCHAR" />
<result column="confirm_flag" property="confirmFlag" jdbcType="CHAR" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.staff.dto.recruitment.RecruitmentTrialOnboardingDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
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
</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" >
<!--
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 dj_car_life_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>
<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>
order by dclrto.trial_time, dclrto.id
</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>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.com.glsx.dj.staff.mapper.TechnicalSupervisorMappingMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.staff.model.TechnicalSupervisorMapping" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="province" property="province" jdbcType="VARCHAR" />
<result column="supervisor_name" property="supervisorName" jdbcType="VARCHAR" />
<result column="supervisor_phone" property="supervisorPhone" jdbcType="VARCHAR" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
id, province, supervisor_name, supervisor_phone, created_by, created_date,
updated_by, updated_date, deleted_flag
</sql>
</mapper>
...@@ -65,23 +65,20 @@ public class RecruitmentDemandServiceTest extends BaseServiceTest { ...@@ -65,23 +65,20 @@ public class RecruitmentDemandServiceTest extends BaseServiceTest {
@Test @Test
public void testRecruitmentDemandSummary() { public void testRecruitmentDemandSummary() {
RecruitmentDemandPageRecordDTO condition = new RecruitmentDemandPageRecordDTO(); RecruitmentDemandPageRecordDTO condition = new RecruitmentDemandPageRecordDTO();
condition.setMerchantName("明明崇文4s店A"); //condition.setMerchantName("明明崇文4s店A");
condition.setBusinessType("9");
RecruitmentDemandSummaryDTO summary = recruitmentDemandService.recruitmentDemandSummary(condition); RecruitmentDemandSummaryDTO summary = recruitmentDemandService.recruitmentDemandSummary(condition);
System.out.println(JSON.toJSONString(summary)); System.out.println(JSON.toJSONString(summary));
} }
@Test @Test
public void testNewResumeQWMessage() { public void testNewResumeQWMessage() {
RecruitmentDemandDetailDTO dto = new RecruitmentDemandDetailDTO(); recruitmentDemandService.sendRegionOperationQWMessage(
dto.setId(84); 84,
"招聘进度提醒",
ArrayList<RecruitmentResume> resumes = Lists.newArrayList(); "您的招聘需求有新的简历投递,请点击查看处理。",
RecruitmentResume e = new RecruitmentResume(); "场景1-新增简历推送"
e.setProcessorName("test"); );
resumes.add(e);
dto.setResumes(resumes);
recruitmentDemandService.newResumeQWMessage(dto);
} }
@Test @Test
...@@ -101,8 +98,15 @@ public class RecruitmentDemandServiceTest extends BaseServiceTest { ...@@ -101,8 +98,15 @@ public class RecruitmentDemandServiceTest extends BaseServiceTest {
@Test @Test
public void testNewDemandQWMessage() { public void testNewDemandQWMessage() {
RecruitmentDemandDTO dto = new RecruitmentDemandDTO(); RecruitmentDemandDTO dto = new RecruitmentDemandDTO();
dto.setId(1);
dto.setRecruiterPhone("13603070903"); dto.setRecruiterPhone("13603070903");
dto.setRecruiterName("xiehx"); dto.setRecruiterName("xiehx");
recruitmentDemandService.newDemandQWMessage(dto); recruitmentDemandService.sendRecruitmentQWTextMessage(
dto.getRecruiterPhone(),
"新增招聘需求提醒",
"您有新的招聘需求待跟进,请及时前往saas+增值业务运营平台查看处理。",
dto.getId(),
dto.getRecruiterName()
);
} }
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!