package com.ltgk.crew.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ltgk.common.core.domain.AjaxResult;
import com.ltgk.common.core.domain.entity.SysUser;
import com.ltgk.crew.domain.dto.DsBoatCrewDTO;
import com.ltgk.crew.domain.entity.DsBoatCrew;
import com.ltgk.crew.domain.vo.DsBoatBindCrewInfoVO;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * 船员信息表 服务类
 * </p>
 *
 * @author songzh
 * @since 2022-06-01
 */
public interface IDsBoatCrewService extends IService<DsBoatCrew> {

    /**
     * 分页查询船员档案信息
     *
     * @param dsBoatCrew: 船员档案实体
     * @param beginTime:  开始时间
     * @param endTime:    结束时间
     * @param user:       登录用户信息
     * @param pageNum:    页码
     * @param pageSize:   页长
     * @return java.util.List<com.ltgk.crew.domain.vo.DsBoatBindCrewInfoVO>
     * @author Qi ChengBin
     * @date 2024/12/6 14:07
     */
    List<DsBoatBindCrewInfoVO> selectByPage(DsBoatCrew dsBoatCrew, String beginTime, String endTime, SysUser user, Integer pageNum, Integer pageSize);

    /**
     * 校验船员信息在船员档案中不存在
     *
     * @param crewId:   船员信息id，不能为空
     * @param crewName: 船员名称，不能为空
     * @return boolean
     * @author Qi ChengBin
     * @date 2024/12/5 11:01
     */
    boolean checkCrewNoBeExist(Long crewId, @NotNull(message = "船员名称不能为空！") String crewName);

    /**
     * 一人一档
     *
     * @param dsBoatCrew:
     * @return com.ltgk.common.core.domain.AjaxResult
     * @author Qi ChengBin
     * @date 2024/12/6 14:51
     */
    AjaxResult getBoatCrewMessage(DsBoatCrew dsBoatCrew);

    List<DsBoatCrew> selectByPageNew(DsBoatCrewDTO dsBoatCrewDTO);
}
