package com.yuchen.saas.park.service.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuchen.saas.park.api.dto.prevention.ScanPageQueryDTO;
import com.yuchen.saas.park.api.dto.prevention.ScanPreventionDTO;
import com.yuchen.saas.park.api.entity.park.ScanPrevention;
import com.yuchen.saas.park.api.request.ScanPageQueryRequest;
import com.yuchen.saas.park.api.response.ScanPreventionResponse;
import com.yuchen.saas.park.api.vo.park.prevention.*;
import org.nest.springwrap.core.mp.base.BaseService;
import org.nest.springwrap.core.mp.support.Query;
import org.nest.springwrap.core.tool.api.R;

import java.util.List;

/**
 * @author 颜艺波
 * @date 2022/6/16 16:18
 * @Description
 */
public interface ScanPreventionService extends BaseService<ScanPrevention> {

    /**
     * 健康码扫码信息上报
     * @param scanPreventionDTO
     * @return
     */
    boolean add(ScanPreventionDTO scanPreventionDTO);

    /**
     * 最新扫码防疫数据查询
     * @param parkId
     * @return
     */
    List<ScanPreventionVO> latestDataQuery(Long parkId);

    /**
     * 最新扫码防疫数据分页查询
     * @param scanPageQueryDTO
     * @param query
     * @return
     */
    IPage<ScanPreventionVO> pageQuery(ScanPageQueryDTO scanPageQueryDTO, Query query);

    /**
     * 今日健康码分布
     * @param parkId
     * @return
     */
    HealthCodeTodayVO healthCodeToday(Long parkId);

    /**
     * 今日体温分析
     * @param parkId
     * @return
     */
    TemperatureTodayVO temperatureToday(Long parkId);

    /**
     * 今日疫苗统计
     * @param parkId
     * @return
     */
    List<CoordinateVO> vaccineStatisticsToday(Long parkId);

    /**
     * 防疫检测统计
     * @param parkId
     * @return
     */
    PreventionStatisticVO preventionStatistic(Long parkId);

    /**
     * 防疫检测分页查询
     * @param scanPageQueryRequest
     * @return
     */
    R<IPage<ScanPreventionResponse>> listPage(ScanPageQueryRequest scanPageQueryRequest, Query query);

    /**
     * 历史健康码分布
     * @param parkId
     * @return
     */
    HealthCodeTodayVO healthCodeHistory(Long parkId);
}
