package com.ltgk.boat.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ltgk.boat.domain.dto.*;
import com.ltgk.boat.domain.entity.DsBoatData;
import com.ltgk.boat.domain.vo.*;
import com.ltgk.system.domain.vo.DsDynamicRadarVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @Author: w1826
 * @Description: 渔船数据mapper
 * @Date: 2024/10/25 17:44
 * @Version: 1.0
 */
@Mapper
public interface DsBoatDataMapper extends BaseMapper<DsBoatData> {
    List<DsBoatData> selectByPage(@Param("params") GetBoatListReq getBoatListReq);

    Long selectBoatCount(@Param("isLocal") Integer isLocal);

    Long getBoatCredentialOverDueCount(@Param("date") Date date);

    List<BoatCredentialOverDueVo> getBoatCredentialOverDueList(GetBoatCredentialOverDueListReq getBoatCredentialOverDueListReq);

    BoatInfoByConditionVo getBoatInfoByCondition(GetBoatInfoByConditionReq getBoatInfoByConditionReq);

    /**
     * 查询当天抓拍数量
     *
     * @param beginOfDay：当天最早时间
     * @return int
     * @author Qi ChengBin
     * @date 2025/3/4
     */
    Long getCameraCount(Date beginOfDay);

    /**
     * 查询在线渔船数量
     *
     * @param beforeTwoHourDate：2h之前时间
     * @return java.lang.Long
     * @author Qi ChengBin
     * @date 2025/3/4
     */
    Long getOnlineCount(Date beforeTwoHourDate);

    List<PortBerthVo> getPortBerthList();

    List<GetBoatEnterOutVo> getBoatEnterOut(@Param("req") GetBoatEnterOutReq getBoatEnterOutReq, @Param("type") String type);

    /**
     * 所有渔船证书列表集合：
     * -- boatId
     * -- 各种证书的过期时间
     *
     * @return java.util.List<com.ltgk.boat.domain.vo.CertificateValidityVO>
     * @author Qi ChengBin
     * @date 2025/3/26
     */
    List<CertificateValidityVO> getCertificateValidityList();

    /**
     * 根据渔船功率查询AIS的渔船数据
     *
     * @param req:
     * @return java.util.List<com.ltgk.system.domain.vo.DsDynamicRadarVO>
     * @author Qi ChengBin
     * @date 2025/5/16
     */
    List<DsDynamicRadarVO> findBoatAisListByPower(@Param("params") WorkConditionsAnalysisReq req);
}
