getInterviewInfoByLineId返回会销面试相关信息

This commit is contained in:
feng.li
2023-12-08 10:26:59 +08:00
parent d32004de02
commit 444cab1efb
7 changed files with 113 additions and 10 deletions

View File

@@ -2,6 +2,7 @@ package com.cool.store.dao;
import com.cool.store.dto.exhibition.ExhibitionLineDTO;
import com.cool.store.entity.HyPartnerExhibitionDO;
import com.cool.store.entity.HyPartnerExhibitionInterviewDO;
import com.cool.store.mapper.HyPartnerExhibitionMapper;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
@@ -105,4 +106,11 @@ public class HyPartnerExhibitionDAO {
}
return hyPartnerExhibitionMapper.queryListByLineIds(lindIds);
}
public HyPartnerExhibitionInterviewDO queryPartnerExhibitionInterviewInfo(Long interviewPlanId, Long partnerLineId) {
if (interviewPlanId == null || partnerLineId == null) {
return new HyPartnerExhibitionInterviewDO();
}
return hyPartnerExhibitionMapper.queryPartnerExhibitionInterviewInfo(interviewPlanId, partnerLineId);
}
}

View File

@@ -2,6 +2,7 @@ package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerBaseInfoDO;
import com.cool.store.entity.SyncEcCustomerLabelDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -10,6 +11,7 @@ import java.util.List;
* @author zhangchenbiao
* @date 2023-05-29 03:51
*/
@Mapper
public interface HyPartnerBaseInfoMapper {
/**
*

View File

@@ -2,6 +2,7 @@ package com.cool.store.mapper;
import com.cool.store.dto.exhibition.ExhibitionLineDTO;
import com.cool.store.entity.HyPartnerExhibitionDO;
import com.cool.store.entity.HyPartnerExhibitionInterviewDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -77,4 +78,12 @@ public interface HyPartnerExhibitionMapper {
* @return
*/
List<Long> queryListByLineIds(@Param("lineIds") List<Long> lindIds);
/**
* 查询线索参加的会销面试相关信息
* @param interviewPlanId
* @param partnerLineId
* @return
*/
HyPartnerExhibitionInterviewDO queryPartnerExhibitionInterviewInfo(@Param("interviewPlanId") Long interviewPlanId, @Param("partnerLineId") Long partnerLineId);
}

View File

@@ -336,5 +336,24 @@
) t2 ON t1.exhibition_id = t2.id
WHERE closed_type = 0
</select>
<select id="queryPartnerExhibitionInterviewInfo"
resultType="com.cool.store.entity.HyPartnerExhibitionInterviewDO">
SELECT
exhibition_id AS exhibitionId,
interview_plan_id AS interviewPlanId,
exhibition_name AS exhibitionName,
start_date AS exhibitionDate
FROM (
SELECT exhibition_id, interview_plan_id
FROM hy_partner_exhibition
WHERE deleted = 0
AND partner_line_id = #{partnerLineId}
AND interview_plan_id = #{interviewPlanId}
) t1 LEFT JOIN (
SELECT id, exhibition_name, start_date
FROM hy_exhibition
WHERE deleted = 0
) t2 ON t1.exhibition_id = t2.id
</select>
</mapper>

View File

@@ -0,0 +1,26 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Fun Li 2023/12/7 18:12
* @version 1.0
* 线索参加会销面试相关信息
*/
@Data
public class HyPartnerExhibitionInterviewDO {
@ApiModelProperty("会销id")
private Integer exhibitionId;
@ApiModelProperty("会销名")
private String exhibitionName;
@ApiModelProperty("会销日期")
private String exhibitionDate;
@ApiModelProperty("面试计划id")
private Long interviewPlanId;
}

View File

@@ -136,4 +136,13 @@ public class InterviewVO {
@ApiModelProperty("该时段是否是自己预约的(不一定代表预约成功)")
private Boolean selfBooked;
@ApiModelProperty("是否是通过会销进行的面试")
private Boolean whetherExhibitionInterview;
@ApiModelProperty("参加的相应展会名称")
private String exhibitionName;
@ApiModelProperty("展会日期")
private String exhibitionDate;
}

View File

@@ -11,8 +11,11 @@ import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.HyIntendDevMappingDAO;
import com.cool.store.dao.HyInterviewDAO;
import com.cool.store.dto.calendar.*;
import com.cool.store.dto.log.*;
import com.cool.store.dao.HyPartnerExhibitionDAO;
import com.cool.store.dto.log.EntrustOthersDTO;
import com.cool.store.dto.log.LogBasicDTO;
import com.cool.store.dto.log.ModifyInterviewTimeDTO;
import com.cool.store.dto.log.ReInterviewDTO;
import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.entity.*;
import com.cool.store.enums.*;
@@ -20,9 +23,15 @@ import com.cool.store.exception.ApiException;
import com.cool.store.exception.ServiceException;
import com.cool.store.http.EventCenterHttpRequest;
import com.cool.store.http.ISVHttpRequest;
import com.cool.store.mapper.*;
import com.cool.store.mapper.HyPartnerBaseInfoMapper;
import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.cool.store.mapper.HyPartnerLineInfoMapper;
import com.cool.store.request.*;
import com.cool.store.service.*;
import com.cool.store.service.EnterpriseUserService;
import com.cool.store.service.InterviewService;
import com.cool.store.service.LogService;
import com.cool.store.service.WechatMiniAppService;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.utils.StringUtil;
import com.cool.store.utils.TRTCUtils;
@@ -81,6 +90,9 @@ public class InterviewServiceImpl implements InterviewService {
@Autowired
private HyInterviewDAO hyInterviewDAO;
@Autowired
private HyPartnerExhibitionDAO partnerExhibitionDAO;
@Autowired
private EnterpriseUserService enterpriseUserService;
// @Autowired
@@ -141,15 +153,32 @@ public class InterviewServiceImpl implements InterviewService {
//查询所属战区
String wantShopArea = hyPartnerLineInfoMapper.getAffiliationZoneIdByInterviewPlanId(interviewPlanId);
HyIntendDevelopementMappingDO hyIntendDevelopementMappingDO = hyIntendDevMappingDAO.selectByOpenAreaMappingId(Long.valueOf(wantShopArea), "dev");
if (hyIntendDevelopementMappingDO == null) {
return vo;
if (hyIntendDevelopementMappingDO != null) {
//查询开发主管
EnterpriseUserDO development = enterpriseUserService.getDevelopmentByZoneId(hyIntendDevelopementMappingDO.getMappingId());
vo.setDevelopmentDirector(development);
}
//查询开发主管
EnterpriseUserDO development = enterpriseUserService.getDevelopmentByZoneId(hyIntendDevelopementMappingDO.getMappingId());
vo.setDevelopmentDirector(development);
}
//3. 查询该时段预约情况
//3. 查询线索参加会销面试情况
//只有在面试开始阶段以后才有该信息
if (//线索在面试阶段且已开始面试
(vo.getWorkflowStage().equals(Long.parseLong(WorkflowStageEnum.INTERVIEW.getCode())) && vo.getStatus().compareTo(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_3.getCode())) >= 0)
//线索在面试阶段后
|| vo.getWorkflowStage().compareTo(Long.parseLong(WorkflowStageEnum.INTERVIEW.getCode())) >= 0) {
HyPartnerExhibitionDO partnerExhibitionDO = new HyPartnerExhibitionDO();
partnerExhibitionDO.setInterviewPlanId(Long.parseLong(vo.getInterviewPlanId()));
partnerExhibitionDO.setDeleted(Boolean.FALSE);
partnerExhibitionDO.setPartnerLineId(vo.getPartnerLineId());
HyPartnerExhibitionInterviewDO partnerExhibitionInterview = partnerExhibitionDAO.queryPartnerExhibitionInterviewInfo(Long.parseLong(vo.getInterviewPlanId()), vo.getPartnerLineId());
if (partnerExhibitionInterview != null) {
vo.setWhetherExhibitionInterview(Boolean.TRUE);
vo.setExhibitionName(partnerExhibitionInterview.getExhibitionName());
vo.setExhibitionDate(partnerExhibitionInterview.getExhibitionDate());
}
}
//4. 查询该时段预约情况
//如果还未提交预约申请就没有预约情况,面试完成以后也必要查询了
if (!vo.getStatus().equals(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_2.getCode()))
&& !vo.getStatus().equals(Integer.parseInt(WorkflowStatusEnum.INTERVIEW_3.getCode()))
@@ -163,6 +192,7 @@ public class InterviewServiceImpl implements InterviewService {
vo.setSelfBooked(Boolean.TRUE);
vo.setAppointmentCount(bookSituation.getBookingCount());
}
return vo;
}