待处理 意向加盟+邀约面试
This commit is contained in:
@@ -10,11 +10,12 @@ public enum WorkflowSubStageStatusEnum {
|
|||||||
//意向申请
|
//意向申请
|
||||||
INTENT_0(0,"待提交"),
|
INTENT_0(0,"待提交"),
|
||||||
INTENT_5(5,"待审核"),
|
INTENT_5(5,"待审核"),
|
||||||
|
INTENT_7(7,"未通过"),
|
||||||
|
|
||||||
//邀约面谈
|
//邀约面谈
|
||||||
INVITING_INTERVIEWS_10(10,"待预约"),
|
INVITING_INTERVIEWS_10(10,"待预约"),
|
||||||
INVITING_INTERVIEWS_15(15,"待面谈"),
|
INVITING_INTERVIEWS_15(15,"待面谈"),
|
||||||
INVITING_INTERVIEWS_20(20,"面谈未通过"),
|
INVITING_INTERVIEWS_20(20,"待审核"),
|
||||||
|
|
||||||
//一审面试
|
//一审面试
|
||||||
FIRST_INTERVIEWS_25(25,"待预约"),
|
FIRST_INTERVIEWS_25(25,"待预约"),
|
||||||
@@ -31,6 +32,7 @@ public enum WorkflowSubStageStatusEnum {
|
|||||||
|
|
||||||
//签署意向协议
|
//签署意向协议
|
||||||
SIGN_INTENT_AGREEMENT_60(60,"待补充"),
|
SIGN_INTENT_AGREEMENT_60(60,"待补充"),
|
||||||
|
SIGN_INTENT_AGREEMENT_63(63,"待审核"),
|
||||||
SIGN_INTENT_AGREEMENT_65(65,"不通过"),
|
SIGN_INTENT_AGREEMENT_65(65,"不通过"),
|
||||||
SIGN_INTENT_AGREEMENT_70(70,"待提交"),
|
SIGN_INTENT_AGREEMENT_70(70,"待提交"),
|
||||||
SIGN_INTENT_AGREEMENT_75(75,"待OA审核"),
|
SIGN_INTENT_AGREEMENT_75(75,"待OA审核"),
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.HyPartnerLabelDO;
|
||||||
|
import com.cool.store.mapper.HyPartnerLabelMapper;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/3/26 16:39
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class HyPartnerLabelDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
HyPartnerLabelMapper hyPartnerLabelMapper;
|
||||||
|
|
||||||
|
public List<HyPartnerLabelDO> listByIds(List<Long> ids ){
|
||||||
|
if (CollectionUtils.isEmpty(ids)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return hyPartnerLabelMapper.getLabelListByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,9 +8,11 @@ import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
|||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.LineInfoMapper;
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,4 +74,12 @@ public class LineInfoDAO {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<LineInfoDO> listByInvestmentManager(String investmentManagerUserId,Integer subStageStatus) {
|
||||||
|
if (StringUtils.isBlank(investmentManagerUserId)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
List<LineInfoDO> lineInfo = lineInfoMapper.listByInvestmentManager(investmentManagerUserId,subStageStatus);
|
||||||
|
return lineInfo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ import com.cool.store.request.LineInterviewPageRequest;
|
|||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -32,6 +34,13 @@ public class LineInterviewDAO {
|
|||||||
return lineInterviewMapper.getInterviewInfo(lineId, interviewType.getCode());
|
return lineInterviewMapper.getInterviewInfo(lineId, interviewType.getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<LineInterviewDO> getInterviewByLindIds(List<Long> lineIds, InterviewTypeEnum interviewType){
|
||||||
|
if(CollectionUtils.isEmpty(lineIds) || Objects.isNull(interviewType)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return lineInterviewMapper.getInterviewByLindIds(lineIds, interviewType.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
public Integer updateInterviewInfo(LineInterviewDO interview){
|
public Integer updateInterviewInfo(LineInterviewDO interview){
|
||||||
return lineInterviewMapper.updateByPrimaryKeySelective(interview);
|
return lineInterviewMapper.updateByPrimaryKeySelective(interview);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,21 @@
|
|||||||
package com.cool.store.mapper;
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
import com.cool.store.entity.LineInfoDO;
|
import com.cool.store.entity.LineInfoDO;
|
||||||
|
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||||
LineInfoDO getByPartnerId(@Param("partnerId") String partnerId);
|
LineInfoDO getByPartnerId(@Param("partnerId") String partnerId);
|
||||||
|
|
||||||
LineInfoDO getByLineId(@Param("lineId") Long lineId);
|
LineInfoDO getByLineId(@Param("lineId") Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询招商经理待处理数据
|
||||||
|
* @param investmentManagerUserId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LineInfoDO> listByInvestmentManager(@Param("investmentManagerUserId") String investmentManagerUserId, @Param("code") Integer code);
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,8 @@ import com.github.pagehelper.Page;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface LineInterviewMapper extends Mapper<LineInterviewDO> {
|
public interface LineInterviewMapper extends Mapper<LineInterviewDO> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,6 +19,14 @@ public interface LineInterviewMapper extends Mapper<LineInterviewDO> {
|
|||||||
*/
|
*/
|
||||||
LineInterviewDO getInterviewInfo(@Param("lineId") Long lineId, @Param("interviewType") Integer interviewType);
|
LineInterviewDO getInterviewInfo(@Param("lineId") Long lineId, @Param("interviewType") Integer interviewType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getInterviewByLindIds
|
||||||
|
* @param lineIds
|
||||||
|
* @param interviewType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LineInterviewDO> getInterviewByLindIds(@Param("lineIds") List<Long> lineIds, @Param("interviewType") Integer interviewType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取面试分页
|
* 获取面试分页
|
||||||
* @param request
|
* @param request
|
||||||
|
|||||||
@@ -38,4 +38,17 @@
|
|||||||
select * from xfsg_line_info where id = #{lineId} and deleted = 0
|
select * from xfsg_line_info where id = #{lineId} and deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="listByInvestmentManager" resultMap="BaseResultMap">
|
||||||
|
select * from xfsg_line_info
|
||||||
|
where deleted = 0
|
||||||
|
and workflow_sub_stage_status = 5
|
||||||
|
<if test="investmentManagerUserId != null and investmentManagerUserId != ''">
|
||||||
|
and investment_manager = #{investmentManagerUserId}
|
||||||
|
</if>
|
||||||
|
<if test="code != null">
|
||||||
|
and workflow_sub_stage_status = #{code}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -30,6 +30,15 @@
|
|||||||
select * from xfsg_line_interview where line_id = #{lineId} and interview_type = #{interviewType} and deleted = '0'
|
select * from xfsg_line_interview where line_id = #{lineId} and interview_type = #{interviewType} and deleted = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getInterviewByLindIds" resultMap="BaseResultMap">
|
||||||
|
select * from xfsg_line_interview where interview_type = #{interviewType} and deleted = '0'
|
||||||
|
<if test="lineIds != null">
|
||||||
|
<foreach collection="lineIds" item="item" separator="," open="and line_id in (" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getInterviewerPage" resultType="com.cool.store.dto.interview.LineInterviewPageDTO">
|
<select id="getInterviewerPage" resultType="com.cool.store.dto.interview.LineInterviewPageDTO">
|
||||||
select
|
select
|
||||||
a.id as interviewId,
|
a.id as interviewId,
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/3/26 15:18
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BaseInfoVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("线索ID")
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("partnerId")
|
||||||
|
private Integer partnerId;
|
||||||
|
|
||||||
|
@ApiModelProperty("线索名称")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@ApiModelProperty("手机号")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@ApiModelProperty("意向加盟区域")
|
||||||
|
private String wantShopAreaName;
|
||||||
|
|
||||||
|
@ApiModelProperty("线索标签")
|
||||||
|
private List<LabelBaseInfoVO> userPortraitList;
|
||||||
|
|
||||||
|
@ApiModelProperty("子阶段状态")
|
||||||
|
private Integer workflowSubStageStatus;
|
||||||
|
|
||||||
|
public BaseInfoVO(){}
|
||||||
|
/**
|
||||||
|
* 写一个构造方法 参数是BaseInfoVO
|
||||||
|
* @param baseInfoVO
|
||||||
|
*/
|
||||||
|
public BaseInfoVO(BaseInfoVO baseInfoVO) {
|
||||||
|
this.lineId = baseInfoVO.getLineId();
|
||||||
|
this.partnerId = baseInfoVO.getPartnerId();
|
||||||
|
this.username = baseInfoVO.getUsername();
|
||||||
|
this.mobile = baseInfoVO.getMobile();
|
||||||
|
this.wantShopAreaName = baseInfoVO.getWantShopAreaName();
|
||||||
|
this.userPortraitList = baseInfoVO.getUserPortraitList();
|
||||||
|
this.workflowSubStageStatus = baseInfoVO.getWorkflowSubStageStatus();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/3/26 15:24
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LabelBaseInfoVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("标签ID")
|
||||||
|
private Long labelId;
|
||||||
|
|
||||||
|
@ApiModelProperty("标签名称")
|
||||||
|
private String labelName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.vo.desk;
|
||||||
|
|
||||||
|
import com.cool.store.vo.BaseInfoVO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/3/26 15:33
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IntendPendingVO extends BaseInfoVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("提交时间")
|
||||||
|
private Date joinTime;
|
||||||
|
|
||||||
|
public IntendPendingVO(){}
|
||||||
|
|
||||||
|
public IntendPendingVO(BaseInfoVO baseInfoVO) {
|
||||||
|
super(baseInfoVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.cool.store.vo.desk;
|
||||||
|
|
||||||
|
import com.cool.store.vo.BaseInfoVO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/3/27 11:36
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class InterviewPendingVO extends BaseInfoVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("面谈开始时间 2024年04月23日 16:00")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("面谈结束时间 10:00")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
public InterviewPendingVO(){};
|
||||||
|
|
||||||
|
public InterviewPendingVO(BaseInfoVO baseInfoVO) {
|
||||||
|
super(baseInfoVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.vo.desk.IntendPendingVO;
|
||||||
|
import com.cool.store.vo.desk.InterviewPendingVO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/3/26 15:15
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface DeskService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加盟申请待处理
|
||||||
|
* @param pageNum
|
||||||
|
* @param pageSize
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize,String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 面试待处理
|
||||||
|
* @param pageNum
|
||||||
|
* @param pageSize
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<InterviewPendingVO> interviewPendingList(Integer pageNum, Integer pageSize,String userId);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||||
|
import com.cool.store.dao.HyPartnerLabelDAO;
|
||||||
|
import com.cool.store.dao.LineInfoDAO;
|
||||||
|
import com.cool.store.dao.LineInterviewDAO;
|
||||||
|
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||||
|
import com.cool.store.entity.HyPartnerLabelDO;
|
||||||
|
import com.cool.store.entity.LineInfoDO;
|
||||||
|
import com.cool.store.entity.LineInterviewDO;
|
||||||
|
import com.cool.store.enums.InterviewTypeEnum;
|
||||||
|
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||||
|
import com.cool.store.mapper.LineInterviewMapper;
|
||||||
|
import com.cool.store.service.DeskService;
|
||||||
|
import com.cool.store.utils.StringUtil;
|
||||||
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
|
import com.cool.store.vo.BaseInfoVO;
|
||||||
|
import com.cool.store.vo.LabelBaseInfoVO;
|
||||||
|
import com.cool.store.vo.desk.IntendPendingVO;
|
||||||
|
import com.cool.store.vo.desk.InterviewPendingVO;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/3/26 15:15
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DeskServiceImpl implements DeskService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
LineInfoDAO lineInfoDAO;
|
||||||
|
@Resource
|
||||||
|
HyPartnerLabelDAO hyPartnerLabelDAO;
|
||||||
|
@Resource
|
||||||
|
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
||||||
|
@Resource
|
||||||
|
LineInterviewDAO lineInterviewDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize,String userId) {
|
||||||
|
PageHelper.startPage(pageNum, pageSize);
|
||||||
|
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId, WorkflowSubStageStatusEnum.INTENT_5.getCode());
|
||||||
|
PageInfo page = new PageInfo(lineInfoDOS);
|
||||||
|
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
||||||
|
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||||
|
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList = hyOpenAreaInfoDAO.selectByIds(wantShopAreaIds);
|
||||||
|
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDOList.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, HyOpenAreaInfoDO::getAreaName, (k1, k2) -> k1));
|
||||||
|
List<IntendPendingVO> list = new ArrayList<>();
|
||||||
|
lineInfoDOS.forEach(x->{
|
||||||
|
BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
||||||
|
IntendPendingVO intendPendingVO = new IntendPendingVO(baseInfoVO);
|
||||||
|
intendPendingVO.setJoinTime(new Date());
|
||||||
|
list.add(intendPendingVO);
|
||||||
|
});
|
||||||
|
|
||||||
|
page.setList(list);
|
||||||
|
return page ;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<InterviewPendingVO> interviewPendingList(Integer pageNum, Integer pageSize, String userId) {
|
||||||
|
PageHelper.startPage(pageNum, pageSize);
|
||||||
|
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId,WorkflowSubStageStatusEnum.INTENT_5.getCode());
|
||||||
|
PageInfo page = new PageInfo(lineInfoDOS);
|
||||||
|
Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
|
||||||
|
List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||||
|
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList = hyOpenAreaInfoDAO.selectByIds(wantShopAreaIds);
|
||||||
|
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDOList.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, HyOpenAreaInfoDO::getAreaName, (k1, k2) -> k1));
|
||||||
|
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
|
||||||
|
List<LineInterviewDO> interviewByLindIds = lineInterviewDAO.getInterviewByLindIds(lineIds, InterviewTypeEnum.MEET);
|
||||||
|
Map<Long, LineInterviewDO> interviewDOMap = interviewByLindIds.stream().collect(Collectors.toMap(LineInterviewDO::getLineId, x -> x, (k1, k2) -> k1));
|
||||||
|
|
||||||
|
List<InterviewPendingVO> list = new ArrayList<>();
|
||||||
|
lineInfoDOS.forEach(x->{
|
||||||
|
BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
|
||||||
|
InterviewPendingVO interviewPendingVO = new InterviewPendingVO(baseInfoVO);
|
||||||
|
LineInterviewDO lineInterviewDO = interviewDOMap.get(x.getId());
|
||||||
|
if (lineInterviewDO != null){
|
||||||
|
interviewPendingVO.setStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,lineInterviewDO.getStartTime()));
|
||||||
|
interviewPendingVO.setEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_END,lineInterviewDO.getEndTime()));
|
||||||
|
}
|
||||||
|
list.add(interviewPendingVO);
|
||||||
|
});
|
||||||
|
page.setList(list);
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* convertToBaseInfoVO
|
||||||
|
* @param lineInfoDO
|
||||||
|
* @param userPortraitMap
|
||||||
|
* @param wantShopAreaMap
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private BaseInfoVO convertToBaseInfoVO(LineInfoDO lineInfoDO, Map<Long, HyPartnerLabelDO> userPortraitMap, Map<Long,String> wantShopAreaMap){
|
||||||
|
BaseInfoVO baseInfoVO = new BaseInfoVO();
|
||||||
|
BeanUtil.copyProperties(lineInfoDO, baseInfoVO);
|
||||||
|
baseInfoVO.setLineId(lineInfoDO.getId());
|
||||||
|
String userPortrait = lineInfoDO.getUserPortrait();
|
||||||
|
List<LabelBaseInfoVO> labelBaseInfoList = new ArrayList<>();
|
||||||
|
if (StringUtil.isNotEmpty(userPortrait)){
|
||||||
|
Arrays.asList(userPortrait.split(",")).subList(1, userPortrait.split(",").length).forEach(x->{
|
||||||
|
LabelBaseInfoVO labelBaseInfoVO = new LabelBaseInfoVO();
|
||||||
|
HyPartnerLabelDO hyPartnerLabelDO = userPortraitMap.get(Long.valueOf(x));
|
||||||
|
if (hyPartnerLabelDO != null){
|
||||||
|
labelBaseInfoVO.setLabelId(userPortraitMap.getOrDefault(Long.valueOf(x), new HyPartnerLabelDO()).getId());
|
||||||
|
labelBaseInfoVO.setLabelName(userPortraitMap.getOrDefault(Long.valueOf(x),new HyPartnerLabelDO()).getLabelName());
|
||||||
|
labelBaseInfoList.add(labelBaseInfoVO);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
baseInfoVO.setUserPortraitList(labelBaseInfoList);
|
||||||
|
baseInfoVO.setWantShopAreaName(wantShopAreaMap.get(lineInfoDO.getWantShopAreaId()));
|
||||||
|
return baseInfoVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户画像MAP
|
||||||
|
* @param lineInfoDOList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Map<Long, HyPartnerLabelDO> getUserPortraitMap(List<LineInfoDO> lineInfoDOList){
|
||||||
|
List<Long> libelIds = new ArrayList<>();
|
||||||
|
lineInfoDOList.stream().forEach(x->{
|
||||||
|
if (StringUtil.isNotEmpty(x.getUserPortrait())){
|
||||||
|
List<String> list = Arrays.asList(x.getUserPortrait().split(",")).subList(1, x.getUserPortrait().split(",").length);
|
||||||
|
libelIds.addAll(list.stream().map(Long::valueOf).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
List<HyPartnerLabelDO> hyPartnerLabelDOS = hyPartnerLabelDAO.listByIds(libelIds);
|
||||||
|
return hyPartnerLabelDOS.stream().collect(Collectors.toMap(HyPartnerLabelDO::getId, x -> x));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -32,7 +32,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
LineInfoMapper lineInfoMapper;
|
LineInfoMapper lineInfoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean submit(JoinIntentionRequest request) {
|
public boolean submit(JoinIntentionRequest request) {
|
||||||
if (Objects.isNull(request)){
|
if (Objects.isNull(request)){
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
|||||||
|
|
||||||
public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
|
public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
|
||||||
|
|
||||||
|
public static String SPECIAL_DATE_START = "yyyy年MM月dd日 HH:mm";
|
||||||
|
|
||||||
|
public static String SPECIAL_DATE_END = "HH:mm";
|
||||||
|
|
||||||
private static String[] parsePatterns = {
|
private static String[] parsePatterns = {
|
||||||
"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
|
"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
|
||||||
"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
|
"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.DeskService;
|
||||||
|
import com.cool.store.vo.desk.IntendPendingVO;
|
||||||
|
import com.cool.store.vo.desk.InterviewPendingVO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/3/26 17:49
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Api(tags = "工作台接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("pc/desk")
|
||||||
|
public class DeskController {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
DeskService deskService;
|
||||||
|
|
||||||
|
@ApiOperation("待处理-加盟申请")
|
||||||
|
@GetMapping("/intendPendingList")
|
||||||
|
public ResponseResult<PageInfo<IntendPendingVO>> intendPendingList(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
|
||||||
|
@RequestParam(value = "pageSize",required = true,defaultValue = "10")Integer pageSize) {
|
||||||
|
// LoginUserInfo userInfo = CurrentUserHolder.getUser();
|
||||||
|
return ResponseResult.success(deskService.intendPendingList(pageNumber,pageSize,"055740241221153440"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("待处理-邀约面谈")
|
||||||
|
@GetMapping("/interviewPendingList")
|
||||||
|
public ResponseResult<PageInfo<InterviewPendingVO>> interviewPendingList(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
|
||||||
|
@RequestParam(value = "pageSize",required = true,defaultValue = "10")Integer pageSize) {
|
||||||
|
// LoginUserInfo userInfo = CurrentUserHolder.getUser();
|
||||||
|
return ResponseResult.success(deskService.interviewPendingList(pageNumber,pageSize,"055740241221153440"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user