package com.railway.business.baseinfo.mapper;

import com.github.pagehelper.Page;
import com.railway.business.baseinfo.domain.BaseStation;
import com.railway.business.baseinfo.domain.vo.BaseStationQuery;
import com.railway.business.baseinfo.domain.vo.BaseStationVo;
import com.railway.business.catenary.domain.vo.JcebQueryVo;
import com.railway.business.catenary.domain.vo.JcebStationVo;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * primary key (station_id) using
 *
 * @author author
 * @date 2021/10/16
 */
@Mapper
@Repository
public interface BaseStationMapper {

  /**
   * 新增
   */
  int insert(BaseStation baseStation);

  /**
   * 删除
   */
  int delete(@Param("stationId") Long stationId);

  /**
   * 更新
   */
  int update(BaseStation baseStation);

  /**
   * 获取单个
   */
  BaseStationVo getInfo(@Param("stationId") Long stationId);

  /**
   * 查询列表
   */
  Page<BaseStationVo> getList(BaseStationQuery query);

  /**
   * 查询列表
   */
  Page<BaseStation> getStationList(BaseStationQuery query);

  /**
   * 查询筛选车间列表
   * @param query 查询条件
   * @return 车间列表
   */
  List<JcebStationVo> listStation(JcebQueryVo query);

  /**
   * 查询车间领导ID
   * @param deptStationId 车间ID
   * @return 领导ID列表
   */
  List<Long> getStationLeaderId(@Param("deptStationId") Long deptStationId);

}
