package com.railway.business.catenary.mapper;

import com.github.pagehelper.Page;
import com.railway.business.catenary.domain.BusJcbJcxc;
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/18
*/
@Mapper
@Repository
public interface BusJcbJcxcMapper {

    /**
    * 新增
    */
    int insert(BusJcbJcxc busJcbJcxc);

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

    /**
    * 更新
    */
    int update(BusJcbJcxc busJcbJcxc);

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

    /**
    * 查询列表
    */
    Page<BusJcbJcxc> getList(BusJcbJcxc busJcbJcxc);

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

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

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

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

}
