package com.steerinfo.meterwork.meterworkcaractual.service;

import com.jisco.dynamicweight.dynamicworkupdata.dto.CalNewCokeDto;
import com.steerinfo.framework.controller.RESTfulResult;
import com.steerinfo.framework.service.IBaseService;
import com.steerinfo.framework.service.pagehelper.PageList;
import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActualTHJCompare;
import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
import com.steerinfo.util.CommonPage;
import io.micrometer.core.instrument.Meter;
import org.apache.shiro.crypto.hash.Hash;

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

/**
 * MeterWorkCarActual服务接口：
 * @author generator
 * @version 1.0-SNAPSHORT 2020-09-17 11:03
 * 类描述
 * 修订历史：
 * 日期：2020-09-17
 * 作者：generator
 * 参考：
 * 描述：MeterWorkCarActual服务接口
 * @see null
 * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
 */
public interface IMeterWorkCarActualService extends IBaseService<MeterWorkCarActual, String>{

    int checkandadd(MeterWorkCarActual model);

    int checkandadditional(MeterWorkCarActual model);

    RESTfulResult supplementaryData(MeterWorkCarActual model);

    int audit(MeterWorkCarActual model);

    int unaudit(MeterWorkCarActual model);

    int publish(MeterWorkCarActual model);

    int revocation(MeterWorkCarActual model);

    int updateCar(MeterWorkCarActual model);

    int cancel(MeterWorkCarActual model);

    int manualInput (MeterWorkCarActual model);

    RESTfulResult matchPrediction(String actualNo, String predictionNo, String note);
    RESTfulResult localMatchPrediction(String actualNo, String predictionNo,String updateManNo, String updateManName, String note);

    MeterWorkCarActual cleanPrediction(MeterWorkCarActual model);
    MeterWorkCarActual localRemovePrediction(MeterWorkCarActual model);

    PageList<MeterWorkCarActual> selectView(Map<Objects,String> parmas,Integer pageNum, Integer pageSize);

    MeterWorkCarActual clean(String actualFirstNo, String dataNo, String predictionNo, String note);

    int remove(List<MeterWorkCarActual> models);

    public int removeButNotEntrust(List<MeterWorkCarActual> models);

    RESTfulResult specialRemove(HashMap map);
    RESTfulResult commonRemove(HashMap map);
    RESTfulResult localCommonRemove(HashMap map);

    MeterWorkCarActual termclean(String actualFirstNo, String dataNo);

    RESTfulResult doQueryWf(CommonPage<MeterWorkCarActual> oci);

    RESTfulResult dataConversionOfCar();

    /*按合同号，新增单包计量/驻外检测数据*/
    MeterWorkCarActual insertByNotice(MeterWorkCarActual actual);

    /*转换火车实绩到汽车实绩表中*/
    MeterWorkCarActual conversionTrainToCar(String predictionNo, String actualNo);

    /*按预报编号，新增单包计量/驻外检测数据*/
    MeterWorkCarActual insertByScale(MeterWorkCarActual actual);

    //批量修改单包计量数据
    int updateByDanBao(List<MeterWorkCarActual> models);

    //批量修改驻外检测的计量数据
    int updateByZhuWai(List<MeterWorkCarActual> models);

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

    // 根据传入的一次计量数据和结净数据实体进行结净操作
    MeterWorkCarActual clientClean(MeterWorkCarActualFirst first, MeterWorkCarActual net);
    //根据实绩id获取一次计量信息和委托信息
    RESTfulResult firstAndEntrustById(String actualNo);

    PageList<MeterWorkCarActual> likeByDesc(HashMap<String, Object> params, Integer pageNum, Integer pageSize);
    List<MeterWorkCarActual> likeByValueFlag(HashMap<String, Object> params);
    List<MeterWorkCarActual> carActualDataDetail(HashMap<String, Object> params);

    RESTfulResult abolish(List<MeterWorkCarActual> models);

    RESTfulResult selectByMap(HashMap<String, Object> params);
    RESTfulResult findPictureByActualNo(String actualNo);

    //根据时间查询所有秤点的结净已匹配、结净未匹配、结净已上传、结净未上传、结净已作废
    List<HashMap> countAllSpotSate(HashMap params);
    PageList<HashMap> netWeightAndTheoryAmount(HashMap params);
    List<MeterWorkCarActualTHJCompare> findCommonAndInnerDouble(HashMap params);
    PageList<MeterWorkCarActual> smallAndNegativeNetWeightRatio(HashMap<String, Object> params, Integer pageNum, Integer pageSize);

    RESTfulResult updateNote(List<MeterWorkCarActual> models);

    PageList<HashMap> getNetFilterCheck(HashMap params);

    PageList<HashMap> getNetFilterCheckWeightReversal(HashMap params);

    int batchCommonRemove();

}
