待处理列表

This commit is contained in:
苏竹红
2024-04-01 17:42:16 +08:00
parent e067779745
commit f9e1d01c6d
17 changed files with 432 additions and 25 deletions

View File

@@ -1,10 +1,10 @@
package com.cool.store.service;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.entity.HyPartnerLabelDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.vo.BaseInfoVO;
import com.cool.store.vo.desk.IntendPendingVO;
import com.cool.store.vo.desk.InterviewPendingVO;
import com.cool.store.vo.desk.*;
import com.github.pagehelper.PageInfo;
import java.util.List;
@@ -36,6 +36,52 @@ public interface DeskService {
*/
PageInfo<InterviewPendingVO> interviewPendingList(Integer pageNum, Integer pageSize,String userId);
/**
* 一审面试待处理
* @param pageNum
* @param pageSize
* @param user
* @return
*/
PageInfo<InterviewPendingVO> firstInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* 二审面试待处理
* @param pageNum
* @param pageSize
* @param user
* @return
*/
PageInfo<InterviewPendingVO> secondInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* payStagePendingList
* @param pageNum
* @param pageSize
* @param user
* @return
*/
PageInfo<PayStagePendingVO> payStagePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* signingPendingList
* @param pageNum
* @param pageSize
* @param user
* @return
*/
PageInfo<SigningPendingVO> signingPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* storeExperiencePendingList
* @param pageNum
* @param pageSize
* @param user
* @return
*/
PageInfo<StoreExperiencePendingVO> storeExperiencePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* convertToBaseInfoVO
* @param lineInfoDO

View File

@@ -1,24 +1,20 @@
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.context.LoginUserInfo;
import com.cool.store.dao.*;
import com.cool.store.entity.*;
import com.cool.store.enums.InterviewTypeEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.mapper.IntentAgreementMapper;
import com.cool.store.mapper.LineInterviewMapper;
import com.cool.store.mapper.TrainingExperienceMapper;
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.cool.store.vo.desk.*;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
@@ -44,11 +40,17 @@ public class DeskServiceImpl implements DeskService {
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
@Resource
LineInterviewDAO lineInterviewDAO;
@Resource
LinePayDAO linePayDAO;
@Resource
IntentAgreementMapper intentAgreementMapper;
@Resource
TrainingExperienceMapper trainingExperienceMapper;
@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());
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId, Arrays.asList(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());
@@ -68,7 +70,7 @@ public class DeskServiceImpl implements DeskService {
@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());
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId,Arrays.asList(WorkflowSubStageStatusEnum.INVITING_INTERVIEWS_20.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());
@@ -92,6 +94,155 @@ public class DeskServiceImpl implements DeskService {
return page;
}
@Override
public PageInfo<InterviewPendingVO> firstInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo userInfo) {
PageHelper.startPage(pageNum, pageSize);
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInterview(userInfo.getUserId(),InterviewTypeEnum.INTERVIEW.getCode(),
Arrays.asList(WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_35.getCode(),
WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_40.getCode(),
WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_30.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());
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
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()));
interviewPendingVO.setInterviewer(userInfo.getName());
}
list.add(interviewPendingVO);
});
page.setList(list);
return page;
}
@Override
public PageInfo<InterviewPendingVO> secondInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo userInfo) {
PageHelper.startPage(pageNum, pageSize);
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInterview(userInfo.getUserId(),InterviewTypeEnum.SECOND_INTERVIEW.getCode(),
Arrays.asList(WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_105.getCode(),
WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_110.getCode(),
WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_115.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());
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
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()));
interviewPendingVO.setInterviewer(userInfo.getName());
}
list.add(interviewPendingVO);
});
page.setList(list);
return page;
}
@Override
public PageInfo<PayStagePendingVO> payStagePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageHelper.startPage(pageNum, pageSize);
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(), Arrays.asList(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.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());
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
Map<Long, LinePayDO> payMap = linePayDAO.getLinePayByLineIds(lineIds);
List<PayStagePendingVO> list = new ArrayList<>();
lineInfoDOS.forEach(x->{
BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
PayStagePendingVO payStagePendingVO = new PayStagePendingVO(baseInfoVO);
LinePayDO linePayDO = payMap.get(x.getId());
if (linePayDO != null && linePayDO.getPayTime() != null){
payStagePendingVO.setPayTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,linePayDO.getPayTime()));
}
list.add(payStagePendingVO);
});
page.setList(list);
return page ;
}
@Override
public PageInfo<SigningPendingVO> signingPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageHelper.startPage(pageNum, pageSize);
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(),
Arrays.asList(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode(),
WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode(),
WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_80.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());
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
List<SigningBaseInfoDO> signingBaseInfoDOS = intentAgreementMapper.selectByLineIds(lineIds);
Map<Long, Date> dateMap = signingBaseInfoDOS.stream().collect(Collectors.toMap(SigningBaseInfoDO::getId, SigningBaseInfoDO::getCreateTime));
List<SigningPendingVO> list = new ArrayList<>();
lineInfoDOS.forEach(x->{
BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
SigningPendingVO signingPendingVO = new SigningPendingVO(baseInfoVO);
Date date = dateMap.get(x.getId());
if (date != null){
signingPendingVO.setSubmitTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,date));
}
list.add(signingPendingVO);
});
page.setList(list);
return page ;
}
@Override
public PageInfo<StoreExperiencePendingVO> storeExperiencePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageHelper.startPage(pageNum, pageSize);
List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(),
Arrays.asList(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode(),
WorkflowSubStageStatusEnum.STORE_EXPERIENCE_95.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());
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
Map<Long, LeaseBaseInfoDO> infoDOMap = new HashMap<>();
if (CollectionUtils.isNotEmpty(lineIds)){
List<LeaseBaseInfoDO> leaseBaseInfoDOS = trainingExperienceMapper.selectByLineIds(lineIds);
infoDOMap = leaseBaseInfoDOS.stream().collect(Collectors.toMap(LeaseBaseInfoDO::getLineId, x -> x));
}
List<StoreExperiencePendingVO> list = new ArrayList<>();
Map<Long, LeaseBaseInfoDO> finalInfoDOMap = infoDOMap;
lineInfoDOS.forEach(x->{
BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
StoreExperiencePendingVO storeExperiencePendingVO = new StoreExperiencePendingVO(baseInfoVO);
LeaseBaseInfoDO date = finalInfoDOMap.get(x.getId());
if (date != null && date.getExperienceStartTime() != null && date.getExperienceEndTime() != null){
storeExperiencePendingVO.setExperienceStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_1,date.getExperienceStartTime()));
storeExperiencePendingVO.setExperienceEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_2,date.getExperienceEndTime()));
}
list.add(storeExperiencePendingVO);
});
page.setList(list);
return page ;
}
/**
* convertToBaseInfoVO
* @param lineInfoDO

View File

@@ -31,6 +31,10 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
public static String SPECIAL_DATE_START = "yyyy年MM月dd日 HH:mm";
public static String SPECIAL_DATE_START_1 = "yyyy年MM月dd日";
public static String SPECIAL_DATE_START_2 = "dd日";
public static String SPECIAL_DATE_END = "HH:mm";
private static String[] parsePatterns = {