面谈/面试
This commit is contained in:
@@ -75,6 +75,7 @@ public enum ErrorCodeEnum {
|
|||||||
MOBILE_EXIST(500015, "此手机号码已存在,请修改后重试", null),
|
MOBILE_EXIST(500015, "此手机号码已存在,请修改后重试", null),
|
||||||
INVESTMENT_MANAGER_NOT_EXIST(500016, "当前招商经理不存在", null),
|
INVESTMENT_MANAGER_NOT_EXIST(500016, "当前招商经理不存在", null),
|
||||||
PARTNER_MOBILE_EXIST_0(500017, "手机号码已存在", null),
|
PARTNER_MOBILE_EXIST_0(500017, "手机号码已存在", null),
|
||||||
|
TIME_OCCUPIED(500018, "预约时间被占用", null),
|
||||||
|
|
||||||
|
|
||||||
INTERVIEW_ENTER_FAIL(1021101, "进入面试间失败", null),
|
INTERVIEW_ENTER_FAIL(1021101, "进入面试间失败", null),
|
||||||
|
|||||||
@@ -21,7 +21,9 @@ public enum InterviewTypeEnum {
|
|||||||
|
|
||||||
MEET(0, "面谈", 120, 8, 19),
|
MEET(0, "面谈", 120, 8, 19),
|
||||||
|
|
||||||
INTERVIEW(1, "面试", 30, 9, 18),
|
INTERVIEW(1, "一面", 30, 9, 18),
|
||||||
|
|
||||||
|
SECOND_INTERVIEW(2, "二面", 30, 9, 18),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -69,6 +71,7 @@ public enum InterviewTypeEnum {
|
|||||||
case MEET:
|
case MEET:
|
||||||
return getTimeSlots(localDate, InterviewTypeEnum.MEET);
|
return getTimeSlots(localDate, InterviewTypeEnum.MEET);
|
||||||
case INTERVIEW:
|
case INTERVIEW:
|
||||||
|
case SECOND_INTERVIEW:
|
||||||
return getTimeSlots(localDate, InterviewTypeEnum.INTERVIEW);
|
return getTimeSlots(localDate, InterviewTypeEnum.INTERVIEW);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ import java.util.stream.Collectors;
|
|||||||
public enum WorkflowStageEnum {
|
public enum WorkflowStageEnum {
|
||||||
|
|
||||||
INTENT("1","意向申请阶段"),
|
INTENT("1","意向申请阶段"),
|
||||||
RESERVATION("2","预约面试阶段"),
|
STORE("2","新店进展"),
|
||||||
INTERVIEW("3","合格资格面试"),
|
|
||||||
;
|
;
|
||||||
|
|
||||||
private String code;
|
private String code;
|
||||||
@@ -27,45 +26,6 @@ public enum WorkflowStageEnum {
|
|||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 每个大节点对应的子节点最后一个流程
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static final HashMap<String,String> getWorkflowStageMap(){
|
|
||||||
HashMap<String, String> result = new HashMap<>();
|
|
||||||
result.put(INTENT.getCode(),WorkflowStatusEnum.INTENT_3.getCode());
|
|
||||||
result.put(RESERVATION.getCode(),WorkflowStatusEnum.RESERVATION_7.getCode());
|
|
||||||
result.put(INTERVIEW.getCode(),WorkflowStatusEnum.INTERVIEW_7.getCode());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 所有大阶段俞小阶段状态对应
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static final HashMap<String, List<WorkflowStatusEnum>> getWorkflowStatusMap(){
|
|
||||||
HashMap<String, List<WorkflowStatusEnum>> result = new HashMap<>();
|
|
||||||
result.put(INTENT.getCode(),Arrays.asList(WorkflowStatusEnum.INTENT_0,WorkflowStatusEnum.INTENT_1,WorkflowStatusEnum.INTENT_2,WorkflowStatusEnum.INTENT_3));
|
|
||||||
result.put(RESERVATION.getCode(),Arrays.asList(WorkflowStatusEnum.RESERVATION_0,WorkflowStatusEnum.RESERVATION_1,WorkflowStatusEnum.RESERVATION_7,WorkflowStatusEnum.RESERVATION_8));
|
|
||||||
result.put(INTERVIEW.getCode(),Arrays.asList(WorkflowStatusEnum.INTERVIEW_2,WorkflowStatusEnum.INTERVIEW_3,WorkflowStatusEnum.INTERVIEW_4,
|
|
||||||
WorkflowStatusEnum.INTERVIEW_5,WorkflowStatusEnum.INTERVIEW_6,WorkflowStatusEnum.INTERVIEW_7));
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 会销能报名的阶段
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static final HashMap<String, List<String>> getExhibitionSignUpMap(){
|
|
||||||
HashMap<String, List<String>> map = new HashMap<>();
|
|
||||||
map.put(WorkflowStageEnum.INTENT.getCode(), Arrays.asList(WorkflowStatusEnum.INTENT_0.getCode(),WorkflowStatusEnum.INTENT_1.getCode(),WorkflowStatusEnum.INTENT_2.getCode()));
|
|
||||||
map.put(WorkflowStageEnum.RESERVATION.getCode(),Arrays.asList(WorkflowStatusEnum.RESERVATION_0.getCode()));
|
|
||||||
map.put(WorkflowStageEnum.INTERVIEW.getCode(),new ArrayList<>());
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String getCode() {
|
public String getCode() {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package com.cool.store.dao;
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||||
import com.cool.store.entity.LineCalendarsEventDO;
|
import com.cool.store.entity.LineCalendarsEventDO;
|
||||||
import com.cool.store.mapper.LineCalendarsEventMapper;
|
import com.cool.store.mapper.LineCalendarsEventMapper;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -17,6 +19,7 @@ import java.util.Objects;
|
|||||||
* @Description:
|
* @Description:
|
||||||
* @date 2024-03-15 16:00
|
* @date 2024-03-15 16:00
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Repository
|
@Repository
|
||||||
public class LineCalendarsEventDAO {
|
public class LineCalendarsEventDAO {
|
||||||
|
|
||||||
@@ -36,4 +39,31 @@ public class LineCalendarsEventDAO {
|
|||||||
}
|
}
|
||||||
return lineCalendarsEventMapper.getRegionLineCalendarsEvent(regionId, localDate.toString());
|
return lineCalendarsEventMapper.getRegionLineCalendarsEvent(regionId, localDate.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断时间是否被占用
|
||||||
|
* @param interviewType
|
||||||
|
* @param regionId
|
||||||
|
* @param interviewer
|
||||||
|
* @param startTime
|
||||||
|
* @param endTime
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Boolean isOccupied(Integer interviewType, Long regionId, String interviewer, String startTime, String endTime){
|
||||||
|
return lineCalendarsEventMapper.getOccupiedCount(interviewType, regionId, interviewer, startTime, endTime) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增日历事件
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long addCalendarsEvent(LineCalendarsEventDO param){
|
||||||
|
if(Objects.nonNull(param.getRegionId()) || Objects.nonNull(param.getLineId()) || Objects.nonNull(param.getPartnerId()) || Objects.nonNull(param.getStartTime()) || Objects.nonNull(param.getEndTime())){
|
||||||
|
log.error("新增日历事件失败:{}",JSONObject.toJSONString(param));
|
||||||
|
}
|
||||||
|
lineCalendarsEventMapper.insertSelective(param);
|
||||||
|
return param.getId();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.LineInfoDO;
|
||||||
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: LineInfoDAO
|
||||||
|
* @Description:
|
||||||
|
* @date 2024-03-19 10:49
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class LineInfoDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private LineInfoMapper lineInfoMapper;
|
||||||
|
|
||||||
|
|
||||||
|
public LineInfoDO getLineInfo(Long lineId) {
|
||||||
|
return lineInfoMapper.selectByPrimaryKey(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer updateLineStage(Long lineId){
|
||||||
|
return lineInfoMapper.updateByPrimaryKeySelective(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.cool.store.dao;
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.LineInterviewDO;
|
||||||
|
import com.cool.store.enums.InterviewTypeEnum;
|
||||||
import com.cool.store.mapper.LineInterviewMapper;
|
import com.cool.store.mapper.LineInterviewMapper;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhangchenbiao
|
* @author zhangchenbiao
|
||||||
@@ -17,4 +20,20 @@ public class LineInterviewDAO {
|
|||||||
@Resource
|
@Resource
|
||||||
private LineInterviewMapper lineInterviewMapper;
|
private LineInterviewMapper lineInterviewMapper;
|
||||||
|
|
||||||
|
public LineInterviewDO getInterviewInfo(Long lineId, InterviewTypeEnum interviewType){
|
||||||
|
if(Objects.isNull(lineId) || Objects.isNull(interviewType)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return lineInterviewMapper.getInterviewInfo(lineId, interviewType.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer updateInterviewInfo(LineInterviewDO interview){
|
||||||
|
return lineInterviewMapper.updateByPrimaryKeySelective(interview);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long addInterviewInfo(LineInterviewDO interview){
|
||||||
|
lineInterviewMapper.insertSelective(interview);
|
||||||
|
return interview.getId();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,4 +12,16 @@ public interface LineCalendarsEventMapper extends Mapper<LineCalendarsEventDO> {
|
|||||||
|
|
||||||
List<LineCalendarsEventDO> getRegionLineCalendarsEvent(@Param("regionId")Long regionId, @Param("interviewDate")String interviewDate);
|
List<LineCalendarsEventDO> getRegionLineCalendarsEvent(@Param("regionId")Long regionId, @Param("interviewDate")String interviewDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 被占用次数
|
||||||
|
* @param interviewType
|
||||||
|
* @param regionId
|
||||||
|
* @param interviewer
|
||||||
|
* @param startTime
|
||||||
|
* @param endTime
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getOccupiedCount(@Param("interviewType") Integer interviewType, @Param("regionId") Long regionId, @Param("interviewer") String interviewer, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.LineInfoDO;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||||
|
}
|
||||||
@@ -1,7 +1,17 @@
|
|||||||
package com.cool.store.mapper;
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
import com.cool.store.entity.LineInterviewDO;
|
import com.cool.store.entity.LineInterviewDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
public interface LineInterviewMapper extends Mapper<LineInterviewDO> {
|
public interface LineInterviewMapper extends Mapper<LineInterviewDO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取面试信息
|
||||||
|
* @param lineId
|
||||||
|
* @param interviewType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
LineInterviewDO getInterviewInfo(@Param("lineId") Long lineId, @Param("interviewType") Integer interviewType);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -24,4 +24,21 @@
|
|||||||
<select id="getRegionLineCalendarsEvent" resultMap="BaseResultMap">
|
<select id="getRegionLineCalendarsEvent" resultMap="BaseResultMap">
|
||||||
select start_time, end_time from xfsg_line_calendars_event where interview_date = #{interviewDate} and region_id = #{regionId} and interview_type = '1'
|
select start_time, end_time from xfsg_line_calendars_event where interview_date = #{interviewDate} and region_id = #{regionId} and interview_type = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getOccupiedCount" resultType="integer">
|
||||||
|
select
|
||||||
|
count(1)
|
||||||
|
from
|
||||||
|
xfsg_line_calendars_event
|
||||||
|
where
|
||||||
|
((start_time between #{startTime} and #{endTime}) or (end_time between #{startTime} and #{endTime}))
|
||||||
|
and
|
||||||
|
interview_type = #{interviewType}
|
||||||
|
<if test="interviewType == 0">
|
||||||
|
and interviewer = #{interviewer}
|
||||||
|
</if>
|
||||||
|
<if test="regionId == 1">
|
||||||
|
and region_id = #{regionId}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?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="com.cool.store.mapper.LineInfoMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.LineInfoDO">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
||||||
|
<result column="region_id" jdbcType="BIGINT" property="regionId" />
|
||||||
|
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
||||||
|
<result column="username" jdbcType="VARCHAR" property="username" />
|
||||||
|
<result column="sex" jdbcType="VARCHAR" property="sex" />
|
||||||
|
<result column="want_shop_area_id" jdbcType="VARCHAR" property="wantShopAreaId" />
|
||||||
|
<result column="live_address" jdbcType="VARCHAR" property="liveAddress" />
|
||||||
|
<result column="workflow_stage" jdbcType="TINYINT" property="workflowStage" />
|
||||||
|
<result column="workflow_sub_stage" jdbcType="TINYINT" property="workflowSubStage" />
|
||||||
|
<result column="workflow_sub_stage_status" jdbcType="TINYINT" property="workflowSubStageStatus" />
|
||||||
|
<result column="select_site_num" jdbcType="INTEGER" property="selectSiteNum" />
|
||||||
|
<result column="prepare_shop_num" jdbcType="INTEGER" property="prepareShopNum" />
|
||||||
|
<result column="open_shop_num" jdbcType="INTEGER" property="openShopNum" />
|
||||||
|
<result column="line_source" jdbcType="TINYINT" property="lineSource" />
|
||||||
|
<result column="investment_manager" jdbcType="VARCHAR" property="investmentManager" />
|
||||||
|
<result column="development_manager" jdbcType="VARCHAR" property="developmentManager" />
|
||||||
|
<result column="first_interviewer" jdbcType="VARCHAR" property="firstInterviewer" />
|
||||||
|
<result column="second_interviewer" jdbcType="VARCHAR" property="secondInterviewer" />
|
||||||
|
<result column="user_portrait" jdbcType="VARCHAR" property="userPortrait" />
|
||||||
|
<result column="is_join" jdbcType="BIT" property="isJoin" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||||
|
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||||
|
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
<result column="line_id" jdbcType="BIGINT" property="lineId" />
|
<result column="line_id" jdbcType="BIGINT" property="lineId" />
|
||||||
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
|
||||||
|
<result column="region_id" jdbcType="BIGINT" property="regionId" />
|
||||||
<result column="interview_date" jdbcType="DATE" property="interviewDate" />
|
<result column="interview_date" jdbcType="DATE" property="interviewDate" />
|
||||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||||
@@ -24,4 +25,8 @@
|
|||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getInterviewInfo" resultMap="BaseResultMap">
|
||||||
|
select * from xfsg_line_interview where line_id = #{lineId} and interview_type = #{interviewType} and deleted = '0'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -4,5 +4,5 @@ jdbc.user= coolstore
|
|||||||
jdbc.password = CSCErYcXniNYm7bT
|
jdbc.password = CSCErYcXniNYm7bT
|
||||||
|
|
||||||
table.name = xfsg_line_interview
|
table.name = xfsg_line_interview
|
||||||
table.object.class = LineInterview
|
table.object.class = LineInterviewDO
|
||||||
table.mapper = LineInterviewMapper
|
table.mapper = LineInterviewMapper
|
||||||
@@ -0,0 +1,608 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_line_info")
|
||||||
|
public class LineInfoDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* partner_user_info.partner_id
|
||||||
|
*/
|
||||||
|
@Column(name = "partner_id")
|
||||||
|
private String partnerId;
|
||||||
|
|
||||||
|
@Column(name = "region_id")
|
||||||
|
private Long regionId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人姓名
|
||||||
|
*/
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别0未选,1男,2女
|
||||||
|
*/
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 意向开店区域
|
||||||
|
*/
|
||||||
|
@Column(name = "want_shop_area_id")
|
||||||
|
private String wantShopAreaId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 居住地址
|
||||||
|
*/
|
||||||
|
@Column(name = "live_address")
|
||||||
|
private String liveAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程阶段:1意向加盟;2新店进展;
|
||||||
|
*/
|
||||||
|
@Column(name = "workflow_stage")
|
||||||
|
private Integer workflowStage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程子阶段
|
||||||
|
*/
|
||||||
|
@Column(name = "workflow_sub_stage")
|
||||||
|
private Integer workflowSubStage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程子阶段状态
|
||||||
|
*/
|
||||||
|
@Column(name = "workflow_sub_stage_status")
|
||||||
|
private Integer workflowSubStageStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待选址铺位
|
||||||
|
*/
|
||||||
|
@Column(name = "select_site_num")
|
||||||
|
private Integer selectSiteNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 筹备中铺位
|
||||||
|
*/
|
||||||
|
@Column(name = "prepare_shop_num")
|
||||||
|
private Integer prepareShopNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业中铺位
|
||||||
|
*/
|
||||||
|
@Column(name = "open_shop_num")
|
||||||
|
private Integer openShopNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 线索来源
|
||||||
|
*/
|
||||||
|
@Column(name = "line_source")
|
||||||
|
private Integer lineSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 招商经理
|
||||||
|
*/
|
||||||
|
@Column(name = "investment_manager")
|
||||||
|
private String investmentManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拓展经理
|
||||||
|
*/
|
||||||
|
@Column(name = "development_manager")
|
||||||
|
private String developmentManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 一审面试官
|
||||||
|
*/
|
||||||
|
@Column(name = "first_interviewer")
|
||||||
|
private String firstInterviewer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二审面试官
|
||||||
|
*/
|
||||||
|
@Column(name = "second_interviewer")
|
||||||
|
private String secondInterviewer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户画像
|
||||||
|
*/
|
||||||
|
@Column(name = "user_portrait")
|
||||||
|
private String userPortrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是加盟商:0.否 1.是
|
||||||
|
*/
|
||||||
|
@Column(name = "is_join")
|
||||||
|
private Boolean isJoin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@Column(name = "create_user_id")
|
||||||
|
private String createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@Column(name = "update_user_id")
|
||||||
|
private String updateUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除:0.否 1.是
|
||||||
|
*/
|
||||||
|
private Boolean deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取partner_user_info.partner_id
|
||||||
|
*
|
||||||
|
* @return partner_id - partner_user_info.partner_id
|
||||||
|
*/
|
||||||
|
public String getPartnerId() {
|
||||||
|
return partnerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置partner_user_info.partner_id
|
||||||
|
*
|
||||||
|
* @param partnerId partner_user_info.partner_id
|
||||||
|
*/
|
||||||
|
public void setPartnerId(String partnerId) {
|
||||||
|
this.partnerId = partnerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getRegionId() {
|
||||||
|
return regionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegionId(Long regionId) {
|
||||||
|
this.regionId = regionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取手机号
|
||||||
|
*
|
||||||
|
* @return mobile - 手机号
|
||||||
|
*/
|
||||||
|
public String getMobile() {
|
||||||
|
return mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置手机号
|
||||||
|
*
|
||||||
|
* @param mobile 手机号
|
||||||
|
*/
|
||||||
|
public void setMobile(String mobile) {
|
||||||
|
this.mobile = mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取申请人姓名
|
||||||
|
*
|
||||||
|
* @return username - 申请人姓名
|
||||||
|
*/
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置申请人姓名
|
||||||
|
*
|
||||||
|
* @param username 申请人姓名
|
||||||
|
*/
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取性别0未选,1男,2女
|
||||||
|
*
|
||||||
|
* @return sex - 性别0未选,1男,2女
|
||||||
|
*/
|
||||||
|
public String getSex() {
|
||||||
|
return sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置性别0未选,1男,2女
|
||||||
|
*
|
||||||
|
* @param sex 性别0未选,1男,2女
|
||||||
|
*/
|
||||||
|
public void setSex(String sex) {
|
||||||
|
this.sex = sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取意向开店区域
|
||||||
|
*
|
||||||
|
* @return want_shop_area_id - 意向开店区域
|
||||||
|
*/
|
||||||
|
public String getWantShopAreaId() {
|
||||||
|
return wantShopAreaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置意向开店区域
|
||||||
|
*
|
||||||
|
* @param wantShopAreaId 意向开店区域
|
||||||
|
*/
|
||||||
|
public void setWantShopAreaId(String wantShopAreaId) {
|
||||||
|
this.wantShopAreaId = wantShopAreaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取居住地址
|
||||||
|
*
|
||||||
|
* @return live_address - 居住地址
|
||||||
|
*/
|
||||||
|
public String getLiveAddress() {
|
||||||
|
return liveAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置居住地址
|
||||||
|
*
|
||||||
|
* @param liveAddress 居住地址
|
||||||
|
*/
|
||||||
|
public void setLiveAddress(String liveAddress) {
|
||||||
|
this.liveAddress = liveAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流程阶段:1意向加盟;2新店进展;
|
||||||
|
*
|
||||||
|
* @return workflow_stage - 流程阶段:1意向加盟;2新店进展;
|
||||||
|
*/
|
||||||
|
public Integer getWorkflowStage() {
|
||||||
|
return workflowStage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置流程阶段:1意向加盟;2新店进展;
|
||||||
|
*
|
||||||
|
* @param workflowStage 流程阶段:1意向加盟;2新店进展;
|
||||||
|
*/
|
||||||
|
public void setWorkflowStage(Integer workflowStage) {
|
||||||
|
this.workflowStage = workflowStage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流程子阶段
|
||||||
|
*
|
||||||
|
* @return workflow_sub_stage - 流程子阶段
|
||||||
|
*/
|
||||||
|
public Integer getWorkflowSubStage() {
|
||||||
|
return workflowSubStage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置流程子阶段
|
||||||
|
*
|
||||||
|
* @param workflowSubStage 流程子阶段
|
||||||
|
*/
|
||||||
|
public void setWorkflowSubStage(Integer workflowSubStage) {
|
||||||
|
this.workflowSubStage = workflowSubStage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取流程子阶段状态
|
||||||
|
*
|
||||||
|
* @return workflow_sub_stage_status - 流程子阶段状态
|
||||||
|
*/
|
||||||
|
public Integer getWorkflowSubStageStatus() {
|
||||||
|
return workflowSubStageStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置流程子阶段状态
|
||||||
|
*
|
||||||
|
* @param workflowSubStageStatus 流程子阶段状态
|
||||||
|
*/
|
||||||
|
public void setWorkflowSubStageStatus(Integer workflowSubStageStatus) {
|
||||||
|
this.workflowSubStageStatus = workflowSubStageStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取待选址铺位
|
||||||
|
*
|
||||||
|
* @return select_site_num - 待选址铺位
|
||||||
|
*/
|
||||||
|
public Integer getSelectSiteNum() {
|
||||||
|
return selectSiteNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置待选址铺位
|
||||||
|
*
|
||||||
|
* @param selectSiteNum 待选址铺位
|
||||||
|
*/
|
||||||
|
public void setSelectSiteNum(Integer selectSiteNum) {
|
||||||
|
this.selectSiteNum = selectSiteNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取筹备中铺位
|
||||||
|
*
|
||||||
|
* @return prepare_shop_num - 筹备中铺位
|
||||||
|
*/
|
||||||
|
public Integer getPrepareShopNum() {
|
||||||
|
return prepareShopNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置筹备中铺位
|
||||||
|
*
|
||||||
|
* @param prepareShopNum 筹备中铺位
|
||||||
|
*/
|
||||||
|
public void setPrepareShopNum(Integer prepareShopNum) {
|
||||||
|
this.prepareShopNum = prepareShopNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取营业中铺位
|
||||||
|
*
|
||||||
|
* @return open_shop_num - 营业中铺位
|
||||||
|
*/
|
||||||
|
public Integer getOpenShopNum() {
|
||||||
|
return openShopNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置营业中铺位
|
||||||
|
*
|
||||||
|
* @param openShopNum 营业中铺位
|
||||||
|
*/
|
||||||
|
public void setOpenShopNum(Integer openShopNum) {
|
||||||
|
this.openShopNum = openShopNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取线索来源
|
||||||
|
*
|
||||||
|
* @return line_source - 线索来源
|
||||||
|
*/
|
||||||
|
public Integer getLineSource() {
|
||||||
|
return lineSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置线索来源
|
||||||
|
*
|
||||||
|
* @param lineSource 线索来源
|
||||||
|
*/
|
||||||
|
public void setLineSource(Integer lineSource) {
|
||||||
|
this.lineSource = lineSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取招商经理
|
||||||
|
*
|
||||||
|
* @return investment_manager - 招商经理
|
||||||
|
*/
|
||||||
|
public String getInvestmentManager() {
|
||||||
|
return investmentManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置招商经理
|
||||||
|
*
|
||||||
|
* @param investmentManager 招商经理
|
||||||
|
*/
|
||||||
|
public void setInvestmentManager(String investmentManager) {
|
||||||
|
this.investmentManager = investmentManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取拓展经理
|
||||||
|
*
|
||||||
|
* @return development_manager - 拓展经理
|
||||||
|
*/
|
||||||
|
public String getDevelopmentManager() {
|
||||||
|
return developmentManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置拓展经理
|
||||||
|
*
|
||||||
|
* @param developmentManager 拓展经理
|
||||||
|
*/
|
||||||
|
public void setDevelopmentManager(String developmentManager) {
|
||||||
|
this.developmentManager = developmentManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取一审面试官
|
||||||
|
*
|
||||||
|
* @return first_interviewer - 一审面试官
|
||||||
|
*/
|
||||||
|
public String getFirstInterviewer() {
|
||||||
|
return firstInterviewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置一审面试官
|
||||||
|
*
|
||||||
|
* @param firstInterviewer 一审面试官
|
||||||
|
*/
|
||||||
|
public void setFirstInterviewer(String firstInterviewer) {
|
||||||
|
this.firstInterviewer = firstInterviewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取二审面试官
|
||||||
|
*
|
||||||
|
* @return second_interviewer - 二审面试官
|
||||||
|
*/
|
||||||
|
public String getSecondInterviewer() {
|
||||||
|
return secondInterviewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置二审面试官
|
||||||
|
*
|
||||||
|
* @param secondInterviewer 二审面试官
|
||||||
|
*/
|
||||||
|
public void setSecondInterviewer(String secondInterviewer) {
|
||||||
|
this.secondInterviewer = secondInterviewer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户画像
|
||||||
|
*
|
||||||
|
* @return user_portrait - 用户画像
|
||||||
|
*/
|
||||||
|
public String getUserPortrait() {
|
||||||
|
return userPortrait;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置用户画像
|
||||||
|
*
|
||||||
|
* @param userPortrait 用户画像
|
||||||
|
*/
|
||||||
|
public void setUserPortrait(String userPortrait) {
|
||||||
|
this.userPortrait = userPortrait;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取是否是加盟商:0.否 1.是
|
||||||
|
*
|
||||||
|
* @return is_join - 是否是加盟商:0.否 1.是
|
||||||
|
*/
|
||||||
|
public Boolean getIsJoin() {
|
||||||
|
return isJoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置是否是加盟商:0.否 1.是
|
||||||
|
*
|
||||||
|
* @param isJoin 是否是加盟商:0.否 1.是
|
||||||
|
*/
|
||||||
|
public void setIsJoin(Boolean isJoin) {
|
||||||
|
this.isJoin = isJoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return create_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return update_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updateTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建人
|
||||||
|
*
|
||||||
|
* @return create_user_id - 创建人
|
||||||
|
*/
|
||||||
|
public String getCreateUserId() {
|
||||||
|
return createUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建人
|
||||||
|
*
|
||||||
|
* @param createUserId 创建人
|
||||||
|
*/
|
||||||
|
public void setCreateUserId(String createUserId) {
|
||||||
|
this.createUserId = createUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新人
|
||||||
|
*
|
||||||
|
* @return update_user_id - 更新人
|
||||||
|
*/
|
||||||
|
public String getUpdateUserId() {
|
||||||
|
return updateUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新人
|
||||||
|
*
|
||||||
|
* @param updateUserId 更新人
|
||||||
|
*/
|
||||||
|
public void setUpdateUserId(String updateUserId) {
|
||||||
|
this.updateUserId = updateUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取是否删除:0.否 1.是
|
||||||
|
*
|
||||||
|
* @return deleted - 是否删除:0.否 1.是
|
||||||
|
*/
|
||||||
|
public Boolean getDeleted() {
|
||||||
|
return deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置是否删除:0.否 1.是
|
||||||
|
*
|
||||||
|
* @param deleted 是否删除:0.否 1.是
|
||||||
|
*/
|
||||||
|
public void setDeleted(Boolean deleted) {
|
||||||
|
this.deleted = deleted;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: AppointmentTimeRequest
|
||||||
|
* @Description:预约时间
|
||||||
|
* @date 2024-03-19 9:57
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppointmentTimeRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("线索id")
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("面试类型:0面谈,1一审,2二审")
|
||||||
|
private Integer interviewType;
|
||||||
|
|
||||||
|
@NotNull(message = "开始时间不能为空")
|
||||||
|
@ApiModelProperty("开始时间 yyyy-MM-dd HH:mm:ss")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@NotNull(message = "结束时间不能为空")
|
||||||
|
@ApiModelProperty("结束时间 yyyy-MM-dd HH:mm:ss")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.request.AppointmentTimeRequest;
|
||||||
import com.cool.store.vo.interview.AppointmentTimeVO;
|
import com.cool.store.vo.interview.AppointmentTimeVO;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@@ -21,4 +22,11 @@ public interface LineInterviewService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<AppointmentTimeVO> getAppointmentTime(Long lineId, Integer interviewType, LocalDate appointmentDate);
|
List<AppointmentTimeVO> getAppointmentTime(Long lineId, Integer interviewType, LocalDate appointmentDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 面试预约
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean appointmentTime(AppointmentTimeRequest request);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,27 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
import com.cool.store.dao.LineCalendarsEventDAO;
|
import com.cool.store.dao.LineCalendarsEventDAO;
|
||||||
|
import com.cool.store.dao.LineInfoDAO;
|
||||||
import com.cool.store.dao.LineInterviewDAO;
|
import com.cool.store.dao.LineInterviewDAO;
|
||||||
import com.cool.store.entity.LineCalendarsEventDO;
|
import com.cool.store.entity.LineCalendarsEventDO;
|
||||||
|
import com.cool.store.entity.LineInfoDO;
|
||||||
|
import com.cool.store.entity.LineInterviewDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.InterviewTypeEnum;
|
import com.cool.store.enums.InterviewTypeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.request.AppointmentTimeRequest;
|
||||||
import com.cool.store.service.LineInterviewService;
|
import com.cool.store.service.LineInterviewService;
|
||||||
|
import com.cool.store.utils.UUIDUtils;
|
||||||
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
import com.cool.store.vo.interview.AppointmentTimeVO;
|
import com.cool.store.vo.interview.AppointmentTimeVO;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhangchenbiao
|
* @author zhangchenbiao
|
||||||
@@ -22,6 +32,8 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
public class LineInterviewServiceImpl implements LineInterviewService {
|
public class LineInterviewServiceImpl implements LineInterviewService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private LineInfoDAO lineInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private LineInterviewDAO lineInterviewDAO;
|
private LineInterviewDAO lineInterviewDAO;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -32,13 +44,69 @@ public class LineInterviewServiceImpl implements LineInterviewService {
|
|||||||
InterviewTypeEnum interviewTypeEnum = InterviewTypeEnum.match(interviewType);
|
InterviewTypeEnum interviewTypeEnum = InterviewTypeEnum.match(interviewType);
|
||||||
List<Pair<String, Boolean>> timeSlots = InterviewTypeEnum.getTimeSlots(interviewTypeEnum, appointmentDate);
|
List<Pair<String, Boolean>> timeSlots = InterviewTypeEnum.getTimeSlots(interviewTypeEnum, appointmentDate);
|
||||||
List<LineCalendarsEventDO> eventList = null;
|
List<LineCalendarsEventDO> eventList = null;
|
||||||
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||||
|
if(Objects.isNull(lineInfo)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||||
|
}
|
||||||
//如果是面谈 获取招商经理的时间 如果是面试 获取大区的时间
|
//如果是面谈 获取招商经理的时间 如果是面试 获取大区的时间
|
||||||
if(InterviewTypeEnum.MEET.equals(interviewTypeEnum)){
|
if(InterviewTypeEnum.MEET.equals(interviewTypeEnum)){
|
||||||
eventList = lineCalendarsEventDAO.getInterviewerLineCalendarsEvent("1", appointmentDate);
|
eventList = lineCalendarsEventDAO.getInterviewerLineCalendarsEvent(lineInfo.getInvestmentManager(), appointmentDate);
|
||||||
}else{
|
}else{
|
||||||
eventList = lineCalendarsEventDAO.getRegionLineCalendarsEvent(1L, appointmentDate);
|
eventList = lineCalendarsEventDAO.getRegionLineCalendarsEvent(lineInfo.getRegionId(), appointmentDate);
|
||||||
}
|
}
|
||||||
List<AppointmentTimeVO> resultList = AppointmentTimeVO.getAppointmentTime(appointmentDate, timeSlots, eventList);
|
List<AppointmentTimeVO> resultList = AppointmentTimeVO.getAppointmentTime(appointmentDate, timeSlots, eventList);
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean appointmentTime(AppointmentTimeRequest request) {
|
||||||
|
//查询线索信息
|
||||||
|
//如果是面谈获取招商经理 如果是面试获取大区经理
|
||||||
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||||
|
if(Objects.isNull(lineInfo)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||||
|
}
|
||||||
|
InterviewTypeEnum interviewType = InterviewTypeEnum.match(request.getInterviewType());
|
||||||
|
String interviewer = InterviewTypeEnum.MEET.equals(interviewType) ? lineInfo.getInvestmentManager() : InterviewTypeEnum.INTERVIEW.equals(interviewType) ? lineInfo.getFirstInterviewer() : lineInfo.getSecondInterviewer();
|
||||||
|
Boolean occupied = lineCalendarsEventDAO.isOccupied(request.getInterviewType(), lineInfo.getRegionId(), interviewer, request.getStartTime(), request.getEndTime());
|
||||||
|
if(occupied){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.TIME_OCCUPIED);
|
||||||
|
}
|
||||||
|
Date startTime = DateUtils.strToDate(request.getStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||||
|
Date endTime = DateUtils.strToDate(request.getEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||||
|
LineCalendarsEventDO calendarsEvent = new LineCalendarsEventDO();
|
||||||
|
calendarsEvent.setRegionId(lineInfo.getRegionId());
|
||||||
|
calendarsEvent.setLineId(lineInfo.getId());
|
||||||
|
calendarsEvent.setPartnerId(lineInfo.getPartnerId());
|
||||||
|
calendarsEvent.setEventTitle(lineInfo.getUsername() + " " + (InterviewTypeEnum.MEET.equals(interviewType) ? "面谈" :"面审"));
|
||||||
|
calendarsEvent.setInterviewType(request.getInterviewType());
|
||||||
|
calendarsEvent.setStartTime(startTime);
|
||||||
|
calendarsEvent.setEndTime(endTime);
|
||||||
|
calendarsEvent.setInterviewer(interviewer);
|
||||||
|
Long eventId = lineCalendarsEventDAO.addCalendarsEvent(calendarsEvent);
|
||||||
|
//跟新线索状态为已预约
|
||||||
|
lineInfoDAO.updateLineStage(request.getLineId());
|
||||||
|
LineInterviewDO interviewInfo = lineInterviewDAO.getInterviewInfo(lineInfo.getId(), interviewType);
|
||||||
|
if(Objects.isNull(interviewInfo)){
|
||||||
|
LineInterviewDO addInterview = new LineInterviewDO();
|
||||||
|
addInterview.setLineId(lineInfo.getId());
|
||||||
|
addInterview.setPartnerId(lineInfo.getPartnerId());
|
||||||
|
addInterview.setRegionId(lineInfo.getRegionId());
|
||||||
|
addInterview.setInterviewDate(startTime);
|
||||||
|
addInterview.setStartTime(startTime);
|
||||||
|
addInterview.setEndTime(endTime);
|
||||||
|
addInterview.setRoomId(UUIDUtils.get8UUID());
|
||||||
|
addInterview.setInterviewer(interviewer);
|
||||||
|
addInterview.setInterviewType(interviewType.getCode());
|
||||||
|
addInterview.setCalendarsEventId(eventId);
|
||||||
|
lineInterviewDAO.addInterviewInfo(addInterview);
|
||||||
|
return Boolean.FALSE;
|
||||||
|
}
|
||||||
|
interviewInfo.setInterviewDate(startTime);
|
||||||
|
interviewInfo.setCalendarsEventId(eventId);
|
||||||
|
interviewInfo.setStartTime(startTime);
|
||||||
|
interviewInfo.setEndTime(endTime);
|
||||||
|
lineInterviewDAO.updateInterviewInfo(interviewInfo);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.controller.webc;
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.cool.store.request.AppointmentTimeRequest;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.LineInterviewService;
|
import com.cool.store.service.LineInterviewService;
|
||||||
import com.cool.store.vo.interview.AppointmentTimeVO;
|
import com.cool.store.vo.interview.AppointmentTimeVO;
|
||||||
@@ -9,10 +10,8 @@ import io.swagger.annotations.ApiImplicitParams;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@@ -47,4 +46,10 @@ public class LineInterviewController {
|
|||||||
return ResponseResult.success(lineInterviewService.getAppointmentTime(lineId, interviewType, appointmentDate));
|
return ResponseResult.success(lineInterviewService.getAppointmentTime(lineId, interviewType, appointmentDate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("预约时间")
|
||||||
|
@PostMapping("/appointment/time")
|
||||||
|
public ResponseResult<Boolean> appointmentTime(@RequestBody @Validated AppointmentTimeRequest request) {
|
||||||
|
return ResponseResult.success(lineInterviewService.appointmentTime(request));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user