面试查询时间修改

This commit is contained in:
苏竹红
2023-07-03 14:07:11 +08:00
parent 3ac68fbba7
commit 099f219850
8 changed files with 58 additions and 10 deletions

View File

@@ -6,12 +6,15 @@ import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@@ -89,5 +92,17 @@ public class HyPartnerInterviewPlanDAO {
return hyPartnerInterviewPlanMapper.selectInterviewIdByLineId(lineId);
}
/**
* 根据线索表ID查询
* @param lindIds
* @return
*/
public List<HyPartnerInterviewPlanDO> getHyPartnerInterviewPlanByLineIds(List<Long> lindIds){
if (CollectionUtils.isEmpty(lindIds)){
return Lists.newArrayList();
}
return hyPartnerInterviewPlanMapper.getHyPartnerInterviewPlanByLineIds(lindIds);
}
}

View File

@@ -106,9 +106,16 @@ public interface HyPartnerInterviewPlanMapper {
*/
List<HyPartnerInterviewPlanDO> selectBySelective(@Param("record") HyPartnerInterviewPlanDO record);
/**
* 根据线索
* @param lindIds
* @return
*/
List<HyPartnerInterviewPlanDO> getHyPartnerInterviewPlanByLineIds(List<Long> lindIds);
/**
* 批量软删面试计划
* @param record
* @param interviewIds
* @return
*/
void batchDeleteInterviewPlans(@Param("interviewPlanIds")List<Long> interviewIds);

View File

@@ -463,6 +463,21 @@
select id from hy_partner_interview_plan where partner_line_id = #{lineId} and deleted = '0'
</select>
<select id="getHyPartnerInterviewPlanByLineIds" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from hy_partner_interview_plan
where deleted = 0
<if test="lindIds!=null and lindIds.size>0">
<foreach collection="lindIds" item="lindId" open="and partner_line_id in (" close=")" separator=",">
#{lindId}
</foreach>
</if>
</select>
<!-- 查询用户基本信息 -->
<select id="getEnterpriseUserBaseInfo" resultType="com.cool.store.vo.EnterpriseUserBaseInfoVO">
select name, mobile

View File

@@ -479,21 +479,20 @@
hpuinfo.accept_adjust_type as acceptAdjustType,
hpuinfo.username as partnerUserName,
hpuinfo.mobile as partnerUserPhone,
hpuinfo.shop_code as storeCode,
hpuinfo.shop_name as storeName,
hpuinfo.recommend_partner_name as recommendPartnerName,
hpuinfo.recommend_partner_mobile as recommendPartnerMobile,
eu.name as investmentManagerName,
eu.mobile as investmentManagerMobile,
hpip.id as interviewPlanId,
hpip.start_time as startTime
eu.mobile as investmentManagerMobile
FROM
hy_partner_line_info hpli
LEFT JOIN hy_partner_intent_info hpii ON hpli.id = hpii.partner_line_id
LEFT JOIN hy_partner_user_info hpuinfo ON hpli.partner_id = hpuinfo.partner_id
LEFT JOIN enterprise_user eu ON hpli.investment_manager = eu.user_id
LEFT JOIN hy_partner_interview_plan hpip on hpli.id = hpip.partner_line_id
LEFT JOIN hy_open_area_info hoai ON hoai.id = hpuinfo.want_shop_area
WHERE hpli.line_status in (1,2)
AND ( hpli.deleted IS NULL OR hpli.deleted = 0 ) and (hpip.deleted is null or hpip.deleted=0)
AND ( hpli.deleted IS NULL OR hpli.deleted = 0 )
<if test="keyword!=null and keyword!='' and keywordType!=null and keywordType=='name'">
AND (eu.name like concat('%',#{keyword},'%') or hpuinfo.username like concat('%',#{keyword},'%'))
</if>

View File

@@ -75,4 +75,6 @@ public class PrivateSeaLineDTO {
private String investmentManagerMobile;
private String recommendPartnerMobile;
}

View File

@@ -2,6 +2,7 @@ package com.cool.store.vo;
import cn.hutool.core.date.DateUtil;
import com.cool.store.dto.partner.PrivateSeaLineDTO;
import com.cool.store.entity.HyPartnerInterviewPlanDO;
import com.cool.store.utils.CoolDateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -83,6 +84,8 @@ public class PrivateSeaLineListVo {
@ApiModelProperty("推荐加盟商名称")
private String recommendPartnerName;
private String recommendPartnerMobile;
private Long interviewPlanId;
private Date startTime;
@@ -90,7 +93,7 @@ public class PrivateSeaLineListVo {
private String investmentManagerMobile;
public static List<PrivateSeaLineListVo> convertList(List<PrivateSeaLineDTO> list, Map<String, String> finalDevManagerMap, Map<String, String> wantShopAreaNameMap){
public static List<PrivateSeaLineListVo> convertList(List<PrivateSeaLineDTO> list, Map<String, String> finalDevManagerMap, Map<String, String> wantShopAreaNameMap,Map<Long, HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOMap){
List<PrivateSeaLineListVo> resultList = new ArrayList<>();
for (PrivateSeaLineDTO x : list) {
PrivateSeaLineListVo privateSeaLineListVo = new PrivateSeaLineListVo();
@@ -112,15 +115,17 @@ public class PrivateSeaLineListVo {
String updateTime = DateUtil.format(x.getUpdateTime(), CoolDateUtils.DATE_FORMAT_SEC_2);
privateSeaLineListVo.setUpdateTime(updateTime);
privateSeaLineListVo.setRecommendPartnerId(x.getRecommendPartnerId());
privateSeaLineListVo.setRecommendPartnerMobile(x.getRecommendPartnerId());
privateSeaLineListVo.setWantShopArea(x.getWantShopArea());
privateSeaLineListVo.setWantShopAreaName(wantShopAreaNameMap.get(x.getWantShopArea()));
privateSeaLineListVo.setInvestmentManager(x.getInvestmentManager());
privateSeaLineListVo.setRecommendPartnerName(x.getRecommendPartnerName());
privateSeaLineListVo.setRecommendPartnerMobile(x.getRecommendPartnerMobile());
privateSeaLineListVo.setWorkflowStage(x.getWorkflowStage());
privateSeaLineListVo.setInterviewPlanId(x.getInterviewPlanId());
privateSeaLineListVo.setWantShopArea(x.getWantShopArea());
privateSeaLineListVo.setWorkflowStage(x.getWorkflowStage());
privateSeaLineListVo.setStartTime(x.getStartTime());
privateSeaLineListVo.setStartTime(hyPartnerInterviewPlanDOMap.getOrDefault(x.getLineId(),new HyPartnerInterviewPlanDO()).getStartTime());
privateSeaLineListVo.setInterviewPlanId(hyPartnerInterviewPlanDOMap.getOrDefault(x.getLineId(),new HyPartnerInterviewPlanDO()).getId());
privateSeaLineListVo.setDevelopmentManagerName(finalDevManagerMap.get(x.getDevelopmentManager()));
resultList.add(privateSeaLineListVo);
}

View File

@@ -200,6 +200,7 @@ public class FlowServiceImpl implements FlowService {
hyPartnerInterviewDO.setRecorder(operator.getUserId());
hyPartnerInterviewDO.setRecordTime(new Date());
hyPartnerInterviewDO.setSummary(request.getSummary());
hyPartnerInterviewDO.setApproveTime(new Date());
hyPartnerInterviewDO.setAuthCode(authCode);
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);

View File

@@ -486,6 +486,10 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
if (CollectionUtils.isEmpty(list)){
return new PageInfo<>();
}
List<Long> lindIds = list.stream().map(PrivateSeaLineDTO::getLineId).collect(Collectors.toList());
List<HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOS = hyPartnerInterviewPlanDAO.getHyPartnerInterviewPlanByLineIds(lindIds);
Map<Long, HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOMap = hyPartnerInterviewPlanDOS.stream().collect(Collectors.toMap(HyPartnerInterviewPlanDO::getPartnerLineId, data -> data));
Map<String, String> devManagerMap = new HashMap<>();
List<String> devManagerIdList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getDevelopmentManager())).map(PrivateSeaLineDTO::getDevelopmentManager).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(devManagerIdList)){
@@ -494,7 +498,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
}
List<Long> wantShopAreaList = list.stream().filter(x->StringUtils.isNotEmpty(x.getWantShopArea())).map(PrivateSeaLineDTO::getWantShopArea).map(Long::parseLong).distinct().collect(Collectors.toList());
Map<String, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList);
List<PrivateSeaLineListVo> result = PrivateSeaLineListVo.convertList(list, devManagerMap, wantShopAreaNameMap);
List<PrivateSeaLineListVo> result = PrivateSeaLineListVo.convertList(list, devManagerMap, wantShopAreaNameMap,hyPartnerInterviewPlanDOMap);
privateLineList.setList(result);
return privateLineList;
}