package com.steerinfo.meterwork.meterworkcaractual.mapper;

import com.steerinfo.framework.mapper.IBaseMapper;
import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
import feign.Param;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

@Mapper
public interface MeterWorkCarActualMapper extends IBaseMapper<MeterWorkCarActual, String> {

    List<MeterWorkCarActual> selectView(Map<Objects,String> map);
    //一次皮重结净
    MeterWorkCarActual manualAdd(@Param( value = "actualFirstNo") String actualFirstNo, @Param( value = "dataNo")String dataNo);

    //一次皮重结净
    MeterWorkCarActual manualAddPre(@Param( value = "actualFirstNo") String actualFirstNo, @Param( value = "dataNo")String dataNo, @Param( value = "predictionNo")String predictionNo);

    MeterWorkCarActual mathPredcition(@Param(value = "actualNo") String actualNo, @Param(value = "predictionNo") String predictionNo);

    MeterWorkCarActual cleanPredcition(@Param(value = "actualNo") String actualNo);

    String getNewID(@org.apache.ibatis.annotations.Param(value="afl")String afl);
    //期限皮重结净
    MeterWorkCarActual tareAdd(@Param( value = "actualFirstNo") String actualFirstNo, @Param( value = "dataNo")String dataNo);

    List<MeterWorkCarActual> selectByTime(Map<Objects,String> map);

    List<MeterWorkCarActual> selectParameters(Map<String, Object> map);

    List<MeterWorkCarActual> selectManualData(Map<String, Object> map);

    int selectCarNoCount(Map<String, Object> map);

    //查询需要
    List<MeterWorkCarActual> selectDataConversionOfCar(Map<String, Object> map);

    //查询车号今天是第几次出现
    List<MeterWorkCarActual> selectRepeatCarNO(Map<String, Object> map);

    /**
     * 根据传入时间和车号，查询给定时间段去重车号
     * @param obj
     * @return
     */
    List<MeterWorkCarActual> distinctCarNo(HashMap<String, Object> obj);

    List<MeterWorkCarActual> getCarActual(Map<String, Object> obj);

    MeterWorkCarActual selectActual(String actualFirstNo);

    List<MeterWorkCarActual> likeByDesc(Map<String, Object> params);
    List<MeterWorkCarActual> carActualDataDetail(Map<String, Object> params);

    List<MeterWorkCarActual> selectByMap(Map<String, Object> params);

    List<HashMap> selectOldAndNew(Map<String, Object> params);
    List<HashMap> doQueryFirstOldAndNew(Map<String, Object> params);
    List<HashMap> countOldAndNew(Map<String, Object> params);

    //根据时间查询所有秤点的结净已匹配、结净未匹配、结净已上传、结净未上传
    List<MeterWorkCarActual> countAllState(Map<String, Object> params);
    List<HashMap> countDayAllState(Map<String, Object> params);
    List<HashMap> netWeightAndTheoryAmount(Map<String, Object> params);

    //查询符合内倒双委托车辆在铁合金秤点用普通委托信息过磅的结净信息倒序
    List<MeterWorkCarActual> findTHJNetWeight(Map<String, Object> params);
    List<MeterWorkCarActual> findFiveNetWeight(Map<String, Object> params);

    //小洁净和负洁净重量比对核查
    List<MeterWorkCarActual> smallAndNegativeNetWeightRatio(Map<String, Object> params);

    List<HashMap> getNetFilterCheck(HashMap<String, Object> params);

    List<HashMap> getNetFilterCheckWeightReversal(HashMap<String, Object> params);

    List<MeterWorkCarActual> findCommonRemove();

    List<MeterWorkCarActual> selectByMapRe(HashMap<String, Object> actualInfoMap);

    BigDecimal selectLastUpWeightByCarNo(String carNo);

}
