package com.jkcredit.invoice.mapper.calculateinfor;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jkcredit.invoice.model.entity.calculate.SelfCarCalculateInfor;
import com.jkcredit.invoice.model.vo.CompanyVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 自有车计费维护接口
 * @author mumuxigua
 */
@Repository
public interface SelfCarCalculateInforMapper extends BaseMapper<SelfCarCalculateInfor> {

    /**
     * 分页查询自有车计费列表
     * @param page
     * @param calculateInfor
     * @return
     */
    IPage<List<SelfCarCalculateInfor>> selectAllByPage(Page page, @Param("calculateInfor") SelfCarCalculateInfor calculateInfor);

    /**
     * 插入自有车计费列表
     * @param record
     * @return
     */
    @Override
    int insert(SelfCarCalculateInfor record);

    /**
     * 根据etc卡号和时间查询自有车计费信息
     * @param selfCarCalculateInfor
     * @return
     */
    SelfCarCalculateInfor selectByEtcAndTime(SelfCarCalculateInfor selfCarCalculateInfor);

    /**
     * 查询自有车计费统计信息
     * @param selfCarCalculateInfor
     * @return
     */
    List<Map<String, String>> findSelfcarCalculateInfoSta(SelfCarCalculateInfor selfCarCalculateInfor);

    /**
     * 根据公司名称更新自有车计费信息
     * @param companyVo
     * @return
     */
    int upDateCompany(CompanyVo companyVo);
}
