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


import com.baomidou.mybatisplus.extension.service.IService;
import com.yuchen.saas.park.api.dto.park.IoTEvent;
import com.yuchen.saas.park.api.entity.pldoor.PlDoorInoutRecode;
import com.yuchen.saas.park.api.vo.door.PlDoorPointInOutVO;
import com.yuchen.saas.park.api.vo.pldoor.*;

import java.util.List;

/**
 * <p>
 * 门禁出入记录 服务类
 * </p>
 *
 * @author miaoqs
 * @since 2024-04-12
 */
public interface PlDoorInoutRecodeService extends IService<PlDoorInoutRecode> {

    /**
     * 接收到的iot上报设备事件
     * @param jsonObjectContent
     * @return
     * @throws Exception
     */
    boolean receiveIotEvent(String jsonObjectContent) throws Exception;

    /**
     * 进出记录保存更新
     * @param ioTEvent
     */
    void saveOpenDoorUpload(IoTEvent ioTEvent);

    /**
     * 根据门禁点id查询门禁点进出数据 UE显示
     * @param pointId
     * @return
     */
    PlDoorPointInOutVO getPointInOutByPointId(Long pointId);

    /**
     * 今日通行数量统计
     * @param parkId
     * @return
     */
    PlDoorPassedTodayCountVO todayPassCount(Long parkId);

    /**
     * 通行时段统计 根据parkId 7天
     * @param parkId
     * @param userType
     * @return
     */
    List<PlDoorPassedTimeFrameCountVO> passedTimeFrameCount(Long parkId, String userType);

    /**
     * 按通行方式统计 根据parkId
     * @param parkId
     * @param userType
     * @return
     */
    PlDoorPassedTypeCountVO passedTypeCount(Long parkId, String userType);

    /**
     * 按人员类型统计 根据parkId
     * @param parkId
     * @return
     */
    List<PlDoorPassedUserTypeVO> userTypeCount(Long parkId);

    /**
     * 访客日期类型统计
     * @param parkId
     * @return
     */
    PlDoorVistorDateTypeCountVO visitorDateTypeCount(Long parkId);

    /**
     * 访客人数统计-本月
     * @param parkId
     * @return
     */
    List<PlDoorPassedTimeFrameCountVO> getDaysOfCurrentMonth(Long parkId);

    /**
     * 访客人数统计-近12月
     * @param parkId
     * @return
     */
    List<PlDoorPassedTimeFrameCountVO> getMonthsOfCurrentYear(Long parkId);

    /**
     * 按小时统计 根据parkId
     * @param parkId
     * @return
     */
    List<PlDoorPassedTimeFrameCountVO> getHourOfDay(Long parkId);

    /**
     * 智慧访客-系统分析-访客多时间纬度分析
     * @param parkId
     * @param type 1：人数 2：预约
     * @return
     */
    PlVistorByTypeCountVO vistorCountByType(Long parkId, String type);

    /**
     * 铁军语音播报
     * @param voiceStr
     */
    boolean tiejunVoice(String voiceStr, Long parkId, Long pointId);
}
