package com.railway.business.catenary.mapper;

import com.github.pagehelper.Page;
import com.railway.business.catenary.domain.BusJcbWjcxc;
import com.railway.business.catenary.domain.vo.JcebCountVo;
import com.railway.business.catenary.domain.vo.JcebQueryVo;
import com.railway.business.catenary.domain.vo.JcebRecordVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
* 检查表-无交叉线岔
* @author zcf
* @date 2021/10/19
*/
@Mapper
@Repository
public interface BusJcbWjcxcMapper {

    /**
    * 新增
    */
    int insert(BusJcbWjcxc busJcbWjcxc);

    /**
    * 删除
    */
    int delete(@Param("id") String id);

    /**
    * 更新
    */
    int update(BusJcbWjcxc busJcbWjcxc);

    /**
    * 获取单个
    */
    BusJcbWjcxc getInfo(@Param("id") String id);

    /**
    * 查询列表
    */
    Page<BusJcbWjcxc> getList(BusJcbWjcxc busJcbWjcxc);

    /**
     * 获取上次检查记录
     */
    BusJcbWjcxc getLastRecord(Long userId);

    /**
     * 查询列表
     */
    Page<BusJcbWjcxc> getJcebList(JcebQueryVo query);

    /**
     * 查询明细列表
     * @param query 查询参数
     * @return 数据记录明细
     */
    Page<JcebRecordVo> getListByType(JcebQueryVo query);

    /**
     * 查询汇总列表
     * @param query 查询参数
     * @return 汇总数据
     */
    JcebCountVo getCountByType(JcebQueryVo query);

}
