工作台面试日程列表不计算会销面试

This commit is contained in:
feng.li
2023-12-07 13:31:37 +08:00
parent 0efb9d5d3f
commit b32d3448cd
5 changed files with 48 additions and 12 deletions

View File

@@ -3,6 +3,7 @@ package com.cool.store.dao;
import com.cool.store.dto.exhibition.ExhibitionLineDTO;
import com.cool.store.entity.HyPartnerExhibitionDO;
import com.cool.store.mapper.HyPartnerExhibitionMapper;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
@@ -90,4 +91,11 @@ public class HyPartnerExhibitionDAO {
}
hyPartnerExhibitionMapper.deleteAllByLineId(partnerLineId);
}
public List<Long> queryListByInterviewPlanIds(List<Long> interviewPlanIds) {
if (ObjectUtils.isEmpty(interviewPlanIds)) {
return new ArrayList<>();
}
return hyPartnerExhibitionMapper.queryListByInterviewPlanIds(interviewPlanIds);
}
}

View File

@@ -64,4 +64,10 @@ public interface HyPartnerExhibitionMapper {
*/
void deleteAllByLineId(Long partnerLineId);
/**
* 查询在会销中进行的面试的面试计划id
* @param interviewPlanIds
* @return
*/
List<Long> queryListByInterviewPlanIds(@Param("interviewPlanIds") List<Long> interviewPlanIds);
}

View File

@@ -304,4 +304,15 @@
AND deleted = 0
</update>
<select id="queryListByInterviewPlanIds" resultType="java.lang.Long">
SELECT interview_plan_id
FROM hy_partner_exhibition
WHERE deleted = 0
AND interview_plan_id IN (
<foreach collection="interviewPlanIds" item="interviewPlanId" separator=",">
#{interviewPlanId}
</foreach>
)
</select>
</mapper>

View File

@@ -272,12 +272,14 @@
<select id="getInterviewCount" resultType="com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO">
select
ifnull(sum(if(interview_date = #{currentDate} and room_status!=2,1,0)),0) as currentDayInterviewCount,
ifnull(sum(if(start_time>#{startTime} and end_time <![CDATA[<]]> #{endTime},1,0)),0) as lastSevenDayInterviewCount
FROM hy_partner_interview_plan
ifnull(sum(if(interview_date = '2023-11-27' and room_status!=2,1,0)),0) as currentDayInterviewCount,
ifnull(sum(if(start_time &gt; '2023-11-01 00:00:00' and end_time &lt; '2023-11-30 23:59:59',1,0)),0) as lastSevenDayInterviewCount
FROM hy_partner_interview_plan t1
LEFT JOIN hy_partner_exhibition t2 ON t1.id = t2.interview_plan_id
where interviewer = #{userId}
and deleted = 0
and application_approved = 1
and t1.deleted = 0
and t1.application_approved = 1
and t2.interview_plan_id IS NULL
</select>
<select id="getInterviewPlanList" resultMap="BaseResultMap">