私海返回线索参加会销情况
This commit is contained in:
@@ -98,4 +98,11 @@ public class HyPartnerExhibitionDAO {
|
||||
}
|
||||
return hyPartnerExhibitionMapper.queryListByInterviewPlanIds(interviewPlanIds);
|
||||
}
|
||||
|
||||
public List<Long> queryListByLineIds(List<Long> lindIds) {
|
||||
if (ObjectUtils.isEmpty(lindIds)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return hyPartnerExhibitionMapper.queryListByLineIds(lindIds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,4 +70,11 @@ public interface HyPartnerExhibitionMapper {
|
||||
* @return
|
||||
*/
|
||||
List<Long> queryListByInterviewPlanIds(@Param("interviewPlanIds") List<Long> interviewPlanIds);
|
||||
|
||||
/**
|
||||
* 查询处在会销面试状态中的线索ids
|
||||
* @param lindIds
|
||||
* @return
|
||||
*/
|
||||
List<Long> queryListByLineIds(@Param("lineIds") List<Long> lindIds);
|
||||
}
|
||||
@@ -315,4 +315,26 @@
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="queryListByLineIds" resultType="java.lang.Long">
|
||||
SELECT partner_line_id
|
||||
FROM (
|
||||
SELECT partner_line_id, exhibition_id
|
||||
FROM hy_partner_exhibition
|
||||
WHERE partner_line_id IN (
|
||||
<foreach collection="lineIds" item="lineId" separator=",">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
)
|
||||
AND deleted = 0
|
||||
AND participation_status = 4
|
||||
) t1
|
||||
LEFT JOIN (
|
||||
SELECT id, closed_type
|
||||
FROM hy_exhibition
|
||||
WHERE deleted = 0
|
||||
AND closed_type = 0
|
||||
) t2 ON t1.exhibition_id = t2.id
|
||||
WHERE closed_type = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -545,6 +545,7 @@
|
||||
hpli.investment_manager as investmentManager,
|
||||
hpli.development_manager as developmentManager,
|
||||
hpli.line_status as lineStatus,
|
||||
hpli.whether_in_exhibition as whetherInExhibition,
|
||||
hpli.update_time as updateTime,
|
||||
hpuinfo.user_channel_id as userChannelId,
|
||||
hpuinfo.want_shop_area as wantShopArea,
|
||||
|
||||
@@ -63,6 +63,9 @@ public class PrivateSeaLineDTO {
|
||||
@ApiModelProperty("线索状态")
|
||||
private Integer lineStatus;
|
||||
|
||||
@ApiModelProperty("是否在会销中")
|
||||
private Boolean whetherInExhibition;
|
||||
|
||||
@ApiModelProperty("推荐加盟商ID")
|
||||
private String recommendPartnerId;
|
||||
|
||||
|
||||
@@ -83,6 +83,9 @@ public class PrivateSeaLineListRequest extends PageInfoRequest {
|
||||
@ApiModelProperty("线索id")
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("是否会销中")
|
||||
private Boolean whetherInExhibition;
|
||||
|
||||
/**
|
||||
* deadline 截至时间
|
||||
* updateTime 更新时间
|
||||
|
||||
@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
|
||||
@@ -84,6 +85,12 @@ public class PrivateSeaLineListVo {
|
||||
@ApiModelProperty("线索状态")
|
||||
private Integer lineStatus;
|
||||
|
||||
@ApiModelProperty("是否在会销中")
|
||||
private Boolean whetherInExhibition;
|
||||
|
||||
@ApiModelProperty("是否处于会销面试中")
|
||||
private Boolean whetherExhibitionInterview;
|
||||
|
||||
@ApiModelProperty("推荐加盟商ID")
|
||||
private String recommendPartnerId;
|
||||
|
||||
@@ -108,12 +115,14 @@ public class PrivateSeaLineListVo {
|
||||
|
||||
|
||||
public static List<PrivateSeaLineListVo> convertList(List<PrivateSeaLineDTO> list, Map<String, String> finalDevManagerMap, Map<String, String> wantShopAreaNameMap,
|
||||
Map<Long, HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOMap,Map<Integer, String> channelMap,Map<Long, String> userPortraitMap){
|
||||
Map<Long, HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOMap,Map<Integer, String> channelMap,Map<Long, String> userPortraitMap,
|
||||
List<Long> exhibitionInterviewLines){
|
||||
List<PrivateSeaLineListVo> resultList = new ArrayList<>();
|
||||
for (PrivateSeaLineDTO x : list) {
|
||||
PrivateSeaLineListVo privateSeaLineListVo = new PrivateSeaLineListVo();
|
||||
privateSeaLineListVo.setLineId(x.getLineId());
|
||||
privateSeaLineListVo.setLineStatus(x.getLineStatus());
|
||||
privateSeaLineListVo.setWhetherInExhibition(x.getWhetherInExhibition());
|
||||
privateSeaLineListVo.setPartnerId(x.getPartnerId());
|
||||
privateSeaLineListVo.setWorkflowStatus(x.getWorkflowStatus());
|
||||
String deadLine = DateUtil.format(x.getDeadline(), CoolDateUtils.DATE_FORMAT_SEC_2);
|
||||
@@ -161,6 +170,13 @@ public class PrivateSeaLineListVo {
|
||||
}
|
||||
}
|
||||
}
|
||||
//在会销面试中的线索
|
||||
privateSeaLineListVo.setWhetherExhibitionInterview(Boolean.FALSE);
|
||||
if (privateSeaLineListVo.getWhetherInExhibition()
|
||||
&& ObjectUtils.isNotEmpty(exhibitionInterviewLines)
|
||||
&& exhibitionInterviewLines.contains(x.getLineId())) {
|
||||
privateSeaLineListVo.setWhetherExhibitionInterview(Boolean.TRUE);
|
||||
}
|
||||
privateSeaLineListVo.setUserPortraitList(userPortraitList);
|
||||
resultList.add(privateSeaLineListVo);
|
||||
}
|
||||
|
||||
@@ -668,6 +668,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
return privateLineList;
|
||||
}
|
||||
List<Long> lindIds = list.stream().map(PrivateSeaLineDTO::getLineId).collect(Collectors.toList());
|
||||
//查询处在会销面试中的线索
|
||||
List<Long> exhibitionInterviewLines = partnerExhibitionDAO.queryListByLineIds(lindIds);
|
||||
List<HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOS = hyPartnerInterviewPlanDAO.getHyPartnerInterviewPlanByLineIds(lindIds);
|
||||
Map<Long, HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOMap = hyPartnerInterviewPlanDOS.stream().collect(Collectors.toMap(HyPartnerInterviewPlanDO::getPartnerLineId, data -> data));
|
||||
|
||||
@@ -686,7 +688,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait())).map(PrivateSeaLineDTO::getUserPortrait).collect(Collectors.toList());
|
||||
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
|
||||
|
||||
List<PrivateSeaLineListVo> result = PrivateSeaLineListVo.convertList(list, devManagerMap, wantShopAreaNameMap, hyPartnerInterviewPlanDOMap, channelMap, userPortraitMap);
|
||||
List<PrivateSeaLineListVo> result = PrivateSeaLineListVo.convertList(list, devManagerMap, wantShopAreaNameMap, hyPartnerInterviewPlanDOMap, channelMap, userPortraitMap, exhibitionInterviewLines);
|
||||
privateLineList.setList(result);
|
||||
return privateLineList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user