package com.xinelu.mobile.mapper.homepage;

import com.xinelu.manage.domain.patienttaskexecuterecord.PatientTaskExecuteRecord;
import com.xinelu.manage.vo.signpatientmanageroute.PhonePush;
import com.xinelu.mobile.vo.homepage.HealthLog;
import com.xinelu.mobile.vo.homepage.MessageTabulationVO;
import com.xinelu.mobile.vo.homepage.NodeExecuteStatus;
import com.xinelu.mobile.vo.myfollowup.MyFollowUpVO;
import com.xinelu.mobile.vo.satisfactionquestionnaire.SatisfactionQuestionnaire;
import com.xinelu.mobile.vo.wechatofficialaccountcallback.PatientVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description 院后小程序首页Mapper层
 * @Author zh
 * @Date 2024-04-18
 */
public interface HomePageMapper {

    /**
     * 我的随访列表
     *
     * @param myFollowUp 用户信息
     * @return TableDataInfo
     */
    List<MyFollowUpVO> selectManageRouteNode(MyFollowUpVO myFollowUp);

    /**
     * 健康日志
     *
     * @param residentId        用户id
     * @param nodeExecuteStatus 节点状态
     * @return PatientTaskExecuteRecord
     */
    List<HealthLog> selectTaskExecuteRecordByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus);

    /**
     * 根据居民查询满意度问卷
     *
     * @param residentId 居民id
     * @return SatisfactionQuestionnaire
     */
    List<SatisfactionQuestionnaire> satisfactionQuestionnaireByResidentId(@Param("residentId") Long residentId, @Param("questionType") String questionType, @Param("questionnaireStatus") String questionnaireStatus);

    /**
     * 微信小程序订阅消息记录表
     *
     * @param subscribeStatus 状态
     * @param templateId      模版
     * @return PatientVO
     */
    List<PatientVO> selectResidentAndSubscribeMessageRecord(@Param("subscribeStatus") String subscribeStatus, @Param("templateId") String templateId);

    /**
     * 患者节点表
     *
     * @param patientId 患者id
     * @return PatientVO
     */
    List<PatientVO> selectSignPatientManageRouteNode(@Param("patientId") List<Long> patientId);

    /**
     * 查询个人任务消息
     *
     * @param residentId        用户id
     * @param nodeExecuteStatus 状态
     * @return SignPatientManageRouteNode
     */
    List<MessageTabulationVO> selectManageRouteByResidentId(@Param("residentId") Long residentId, @Param("nodeExecuteStatus") String nodeExecuteStatus);

    /**
     * 查询患者管理任务执行记录表
     *
     * @param manageRouteNodeId id
     * @return PatientTaskExecuteRecord
     */
    PatientTaskExecuteRecord selectPatientManageRouteByManageRouteNodeId(Long manageRouteNodeId);

    /**
     * 话术类型代办处理详情
     */
    PhonePush selectPhoneNodeContent(Long patientTaskExecuteRecordId);

    /**
     * 任务完成情况
     *
     * @param manageRouteNodeId 节点id
     * @return AjaxResult
     */
    NodeExecuteStatus nodeExecuteStatus(Long manageRouteNodeId);
}