package com.panzhihua.service_community.dao; import java.util.List; import com.panzhihua.common.model.dtos.PageBaseDTO; import com.panzhihua.common.model.vos.community.ComActQuestnaireVO; import com.panzhihua.common.model.vos.community.StatisticsCommVO; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.PageQuestnaireDTO; import com.panzhihua.common.model.dtos.community.questnaire.StatisticsSummaryDTO; import com.panzhihua.common.model.vos.community.ComActQuestnaireAppVO; import com.panzhihua.common.model.vos.community.questnaire.*; import com.panzhihua.service_community.model.dos.ComActQuestnaireDO; /** * @Author: llming * @Description: 调查问卷 问卷表 */ @Mapper public interface ComActQuestnaireDAO extends BaseMapper { @Select("") IPage selectPageList(Page page, @Param("pageQuestnaireDTO") PageQuestnaireDTO pageQuestnaireDTO); @Select("") IPage selectPageListAdmin(Page page, @Param("pageQuestnaireDTO") PageQuestnaireDTO pageQuestnaireDTO); @Select("select count(id) from com_act_questnaire_user where user_id = #{userId} and questnaire_id = #{questnaireId}") Integer getNoRemindCount(@Param("userId") Long userId, @Param("questnaireId") Long questnaireId); @Select("SELECT " + " id, " + " title, " + " remark, " + " is_cover, " + " for_masses, " + " for_party, " + " for_volunteer, " + " is_force, " + " adver_position_popup, " + " adver_position_top, " + " adver_position_application, " + " project_key " + "FROM " + " com_act_questnaire " + "WHERE " + " end_time >= now() " + " AND now() >= start_time " + " and community_id = ${communityId} " + " and adver_position_top = 1 " + " and state = 2") List getIndexTopQuestnaireList(@Param("communityId") Long communityId); @Select("SELECT " + " id, " + " title, " + " remark, " + " for_masses, " + " for_party, " + " for_volunteer, " + " is_cover, " + " is_force, " + " adver_position_popup, " + " adver_position_top, " + " adver_position_application, " + " project_key " + "FROM " + " com_act_questnaire " + "WHERE " + " end_time >= now() " + " AND now() >= start_time " + " and community_id = ${communityId} " + " and adver_position_application = 1 " + " and state = 2") List getIndexApplicationQuestnaireList(@Param("communityId") Long communityId); Integer getAdvPopupCount(@Param("communityId") Long communityId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("id") Long id); void deleteQuesSubAll(@Param("queId") Long queId); void deleteQuesSubAll2(@Param("queId") Long queId); QuestnaireDetailAdminVO getQuesDetailAdmin(@Param("queId") Long queId); /** * 小程序-问卷调查详情 * * @param userId * 用户id * @param questId * 问卷id * @return 问卷调查详情 */ QuestnaireDetailAdminVO getQuesDetail(@Param("questId") Long questId, @Param("userId") Long userId); /** * 问卷调查统计汇总 * * @param summaryDTO * 请求参数 * @return 统计汇总 */ IPage getStatisticsSummaryAdmin(Page page, @Param("summaryDTO") StatisticsSummaryDTO summaryDTO); /** * 问卷调查统计汇总导出数据查询 * * @param questId * 调查问卷id * @return 调查统计汇总导出数据 */ List getStatisticsSummaryExcelAdmin(@Param("questId") Long questId); /** * 问卷调查统计汇总表头统计 * * @param questId * 调查问卷id * @return 问卷调查统计汇总表头统计数据 */ QuestnaireStatisticsSummaryHeaderAdminVO statisticsSummaryHeader(@Param("questId") Long questId, @Param("communityId") Long communityId); void addNoNotice(@Param("questId") Long questId, @Param("userId") Long userId); /** * 首页大屏二级页面-社区问卷基础数据 * @param communityId * @return */ BigScreenQuestionnaireStatisticsInfo getIndexQuestionnaireBaseData(@Param("communityId") Long communityId); List getQuestionnaireAddPolylineData(@Param("communityId") Long communityId); StatisticsCommVO getQuestionnaireTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date); /** * 大屏问卷展示列表 * @param page * @param pageBaseDTO * @return */ IPage selectQuestionnaireDisplayList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO); }