package cn.com.taiji.beidou.ship.status.mapper;

import cn.com.taiji.beidou.ship.status.domain.OfflineShipStatistics;
import cn.com.taiji.beidou.ship.status.domain.ShipStatusReq;
import cn.com.taiji.beidou.ship.status.domain.ShipStatusResult;
import cn.com.taiji.beidou.ship.status.domain.StasisShipStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author CHEN
 * @Date 2022/11/12 14:52
 */
@Mapper
public interface ShipStatusMapper {

    /**
     * 获取船舶状态的列表 长停或者离线
     * @param shipStatusReq
     * @return
     */
    List<ShipStatusResult> selectShipStatusList(ShipStatusReq shipStatusReq);

    /**
     * 详情
     * @param devideNo
     * @param isOnline
     * @param isStasis
     * @return
     */
    ShipStatusResult selectById(@Param("devideNo") String devideNo,
                                @Param("isOnline")String isOnline,
                                @Param("isStasis")String isStasis);


    /**
     * 长停船舶统计
     * @param shipId
     * @param deptId
     * @return
     */
    StasisShipStatistics stasisShipTotal(@Param("shipId")String shipId,@Param("deptId")String deptId);

    /**
     * 离线船舶统计
     * @param shipId
     * @param deptId
     * @return
     */
    OfflineShipStatistics offlineShipTotal(@Param("shipId")String shipId, @Param("deptId")String deptId);


    int updateMark(@Param("mark")String mark,@Param("devideNo")String devideNo);
}
