package com.steerinfo.meterwork.meterworkcomparespot.mapper;

import com.steerinfo.framework.mapper.IBaseMapper;
import com.steerinfo.meterwork.meterworkcomparespot.model.MeterWorkCompareSpot;
import org.apache.ibatis.annotations.Mapper;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface MeterWorkCompareSpotMapper extends IBaseMapper<MeterWorkCompareSpot, String> {
    //生成流水号
    String GetNewID();

    /**
     * 判断创建时间在几个小时内是否存在
     * @param time 表示几个小时
     * @param type 表示查询类型 1：断差 2：校秤
     * @return 存在：返回最近的主键
     */
    String isExistWithinHour(Integer time,String carNo,String type);

    List<MeterWorkCompareSpot> queryAll();

    List<MeterWorkCompareSpot> queryByCompareType(String type);

    List<MeterWorkCompareSpot> selectByParametersDESC(HashMap parmas);
}