package com.steerinfo.meterwork.meterworkrailwayactfirst.mapper;

import com.steerinfo.framework.mapper.IBaseMapper;
import com.steerinfo.meterwork.dto.StaffPerformanceAnalysis;
import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
import com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst;
import com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.shiro.crypto.hash.Hash;

import java.util.*;

@Mapper
public interface MeterWorkRailwayActFirstMapper extends IBaseMapper<MeterWorkRailwayActFirst, String> {
    String getNewID(@Param(value="afl")String afl);
    String getFirstLcNo(@Param(value="actualFirstNo")String actualFirstNo);

    String getLcNo(@Param(value="afl")String afl, @Param(value="baseSpotNo")String baseSpotNo);

    List<MeterWorkRailwayActFirst> selectView(Map<Objects,String> map);

    List<MeterWorkRailwayActFirst> selectDiff(@Param(value = "railwayTypeNo") String railwayTypeNo, @Param(value = "railwayTypeName") String railwayTypeName);

    MeterWorkRailwayActFirst selectAndMatch(@Param(value = "actualFirstNo") String actualFirstNo, @Param(value = "predictionNo") String predictionNo);

    MeterWorkRailwayActFirst selectAndRemove(@Param(value = "actualFirstNo")String actualFirstNo);

//    List<MeterWorkRailwayActFirst> selectTa(@Param(value = "weightType")String weightType,@Param(value = "railwayTypeNo")String railwayTypeNo);

    List<MeterWorkRailwayActFirst> selectNet(@Param(value = "railwayNo")String railwayNo,@Param(value = "railwayTypeNo")String railwayTypeNo);

    List<MeterWorkRailwayActFirst> detailed(HashMap<String, Object> obj);

    List<StaffPerformanceAnalysis> analysis(HashMap<String, Object> obj);

    List<MeterWorkRailwayActFirst> selectBy(HashMap<String, Object> param);

    List<MeterWorkRailwayActFirst> batchSelect(ArrayList<String> ids);

    List<MeterWorkRailwayActFirst> selectAct(HashMap parmas);

    List<MeterWorkRailwayActFirst> selectTa(Map<String, Object> parmas);

    List<MeterWorkRailwayActFirst> selectSta(HashMap parmas);

    List<MeterWorkRailwayActFirst> likeByDesc(HashMap parmas);
    List<MeterWorkRailwayActFirst> carFirstDataDetail(Map<String, Object> params);
    List<MeterWorkRailwayActFirst> likeByDescTSDG(HashMap parmas);

    List<MeterWorkRailwayActFirst> distinctRailwayNo(HashMap<String, Object> obj);

    List<MeterWorkRailwayActFirst> distinctLcNo(HashMap<String, Object> obj);

    int getDataCount(Map<String, Object> mp);

    void repairPre(Map<String, Object> map);
    List<MeterWorkRailwayActFirst> selectById(List<String> actualNoList);
    List<HashMap> batchMatchView(HashMap params);
    List<HashMap> batchMatchFirstView(HashMap params);

    //铁水吊钩秤业务
    List<MeterWorkRailwayActFirst> distinctHookRailwayNo(HashMap<String, Object> obj);
    List<MeterWorkRailwayActFirst> hookFirstByDesc(HashMap parmas);

    List<HashMap> countDayAllState(Map<String, Object> params);

    int abolishCSharp(String railwayNo, String userId, String userName, String startTime, String endTime);

    List<String> selectRule1PredictionNos();

    List<String> selectRule2PredictionNos();

    List<String> selectRule3PredictionNos();

    List<String> selectRule4PredictionNos();

    int updateFirstByRule1(@Param("actualFirstNo") String actualFirstNo);
    int updatePredictionByRule2(@Param("predictionNo") String predictionNo);
    int updatePredictionByRule3(@Param("predictionNo") String predictionNo);
    int updatePredictionByRule4(@Param("predictionNo") String predictionNo);


}