package com.steerinfo.meterwork.meterworkcaractualfirst.service;

import com.steerinfo.framework.controller.RESTfulResult;
import com.steerinfo.framework.service.IBaseService;
import com.steerinfo.framework.service.pagehelper.PageList;
import com.steerinfo.metermonitor.metermonitornote.model.MeterMonitorNote;
import com.steerinfo.meterwork.dto.*;
import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
import com.steerinfo.meterwork.meterworkprelink.model.MeterWorkPreLink;
import com.steerinfo.pretrack.pretrackscale.model.PreTrackScale;
import org.springframework.transaction.annotation.Transactional;

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

/**
 * MeterWorkCarActualFirst服务接口：
 * @author generator
 * @version 1.0-SNAPSHORT 2020-09-17 11:28
 * 类描述
 * 修订历史：
 * 日期：2020-09-17
 * 作者：generator
 * 参考：
 * 描述：MeterWorkCarActualFirst服务接口
 * @see null
 * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
 */
public interface IMeterWorkCarActualFirstService extends IBaseService<MeterWorkCarActualFirst, String> {
    RESTfulResult checkandadd(MeterWorkCarActualFirst model, MeterMonitorNote note)  throws Exception;

    int checkandupdate(MeterWorkCarActualFirst model);

    int checkcarandupdate(MeterWorkCarActualFirst model);

    RESTfulResult firstDataSupplement(MeterWorkCarActualFirst model);

    int audit(MeterWorkCarActualFirst model);

    int abolish(List<MeterWorkCarActualFirst> models);

    int recover(List<MeterWorkCarActualFirst> models);

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

    int remove(List<MeterWorkCarActualFirst> models);

    RESTfulResult match(String actualFirstNo, String predictionNo);

    int unaudit(MeterWorkCarActualFirst model);

    PageList<MeterWorkCarActualFirst> selectTa(Map<String, Object> parmas, String weightType,Integer pageNum, Integer pageSize);

    PageList<MeterWorkCarActualFirst> selectNet(String weightType, String carNo,Integer pageNum, Integer pageSize);

    PageList<StaffPerformanceAnalysis> analysis(String startTime, String endTime,Integer pageNum, Integer pageSize);

    PageList<UtensilDto> utensil(String startTime, String endTime,Integer pageNum, Integer pageSize);

    List<MeterTypeDto> meterType(String baseSpotNo, String startTime, String endTime);

    List<TimesDto> daily(String baseSpotNo, String startTime, String endTime);

    List<TimesDto> period(String baseSpotNo, String startTime, String endTime);

    List<MeterWorkCarActualFirst> detailed(String times, String num);

    PageList<AbnormalDto> abnormal(String baseSpotNo, String startTime, String endTime,Integer pageNum, Integer pageSize);

    PageList<MeterWorkCarActualFirst> getByAbnormal(String meterReasonNo, String meterReasonName,Integer pageNum, Integer pageSize);

    RESTfulResult doQueryWf(MeterWorkCarActualFirst oci);

    RESTfulResult queryFirst(String carNo);

    RESTfulResult doUpdateWf(MeterWorkCarActualFirst oci);

    RESTfulResult doAddNetHZHX(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb, MeterWorkCarActualFirst onceDb,MeterMonitorNote note) throws Exception;

    @Transactional(rollbackFor = Exception.class)
    void doSaveHisTare(MeterWorkCarActualFirst oci);

    @Transactional(rollbackFor = Exception.class)
    void doSaveHisTare(MeterWorkCarActualFirst oci, String tareType);

    RESTfulResult doAddInnerWf(MeterWorkCarActualFirst oci, String saveTare, MeterMonitorNote note) throws Exception;

    RESTfulResult doNetAddMuchGross(List<MeterWorkCarActualFirst> gross,MeterWorkCarActualFirst tare, MeterMonitorNote note) throws Exception;

    RESTfulResult doNetAddMuch(MeterWorkCarActualFirst actualFirst) throws Exception;

    RESTfulResult doAddNetInnerWf(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb, String saveTare,MeterMonitorNote note) throws Exception;

    RESTfulResult doAddNetNewHZHX(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb,MeterWorkCarActualFirst once, String saveTare,MeterMonitorNote note) throws Exception;

    RESTfulResult doAddNetInnerWfError(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb, String saveTare,MeterMonitorNote note) throws Exception;

    RESTfulResult doAddWf(MeterWorkCarActualFirst oci, MeterWorkPreLink link, String isLock, String saveTare, MeterMonitorNote note) throws Exception;

    RESTfulResult doAddNetWf(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb,  MeterMonitorNote note,MeterWorkPreLink link, String isLock, String saveTare) throws Exception;

    String encryption(String str) throws Exception;
    String encryptionTest(String str) throws Exception;
    RESTfulResult decryptionTest(String str) throws Exception;

    RESTfulResult doAddNetByTermWf(MeterWorkCarActualFirst one, MeterWorkCarActual two, MeterMonitorNote three);

    RESTfulResult doNetTermTare(MeterWorkCarActualFirst actualFirst, MeterWorkCarActual netDb, String saveTare) throws Exception;

    //按照时间排序
    PageList<MeterWorkCarActualFirst> queryOrderByTime(HashMap parmas, Integer pageNum, Integer pageSize);

    RESTfulResult doAddLianDaWf(MeterWorkCarActualFirst one, MeterMonitorNote two) throws Exception;

//    RESTfulResult doNetMass(MeterWorkCarActualFirst one, MeterWorkCarActual two, PreTrackScale three, PreTrackScale four) throws Exception;

    RESTfulResult doNetAddTwo(MeterWorkCarActualFirst one, MeterWorkCarActual two, PreTrackScale three, PreTrackScale four) throws Exception;

    RESTfulResult doAddNetLianDaWf(MeterWorkCarActualFirst one, MeterWorkCarActual two, MeterMonitorNote three) throws Exception;

    RESTfulResult doAddNetDouble(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb1, MeterMonitorNote note, MeterWorkCarActual netDb2) throws Exception;

    RESTfulResult doCraneDbWf(MeterWorkCarActualFirst one, MeterMonitorNote two) throws Exception;

    RESTfulResult doCraneNetDbWf(MeterWorkCarActualFirst one, MeterWorkCarActual two, MeterMonitorNote three) throws Exception;

    //根据传入时间和车号，查询给定时间段去重车号
//    List<String> distinctCarNo(String carNo, String startTime, String endTime,String baseSpotNo,String matterName,String predictionNo,String forwardingUnitName,String receivingUintName,String valueFlag);
    List<String> distinctCarNo(HashMap<String, Object> params);

    String mixedLoading(String actualNo1, String actualNo2,String actualNo3, String predictionNo1,String predictionNo2);

    String mixedDischarge(String actualNo1, String actualNo2,String actualNo3, String predictionNo1,String predictionNo2);

    RESTfulResult doubleEntrustmentMatch(String actualNo1, String actualNo2, String predictionNo1, String predictionNo2);

    RESTfulResult addEmergency(List<MeterWorkCarActualFirst> meterWorkCarActualFirsts)  throws Exception;
    RESTfulResult addFirstEmergency(MeterWorkCarActualFirst meterWorkCarActualFirsts)  throws Exception;
    RESTfulResult doNetEmergency(MeterWorkCarActual meterWorkCarActual)  throws Exception;

    PageList<MeterWorkCarActualFirst> likeByDesc(Map<String, Object> var1, Integer pageNum, Integer pageSize);
    List<MeterWorkCarActualFirst> likeByValueFlag(Map<String, Object> var1);
    List<MeterWorkCarActualFirst> carFirstDataDetail(Map<String, Object> var1);
    PageList<MeterWorkCarActualFirst> ApplikeByDesc(Map<String, Object> var1, Integer pageNum, Integer pageSize);


    List<MeterWorkCarActualFirst> queryForTimeInterval(Map<String, Object> var1);
    RESTfulResult doNetByFirst(MeterWorkCarActualFirst grossModel, MeterWorkCarActualFirst tareModel, PreTrackScale scale);

    RESTfulResult furConversion(HashMap<String, Object> params);
    RESTfulResult doNetByTermData(HashMap<String, Object> params);

    RESTfulResult doDoubleAdd(MeterWorkCarActualFirst model, PreTrackScale scale01, PreTrackScale scale02);
    RESTfulResult doTermTareNetDouble(MeterWorkCarActualFirst model, PreTrackScale scale01, PreTrackScale scale02);
    RESTfulResult doAddDoubleNet(MeterWorkCarActualFirst grossModel, MeterWorkCarActualFirst tareModel, PreTrackScale scale01, PreTrackScale scale02);
    RESTfulResult doTermTareNetDoubleRetain(MeterWorkCarActualFirst grossModel, MeterWorkCarActualFirst tareModel, PreTrackScale scale01, PreTrackScale scale02);
    RESTfulResult doAddDoubleMuchNet(List<MeterWorkCarActualFirst> grossModels, MeterWorkCarActualFirst tareModel);
    RESTfulResult countFirstByCar(HashMap<String, Object> parmas);
    RESTfulResult doNetAddMuchGrossDouble(List<MeterWorkCarActualFirst> gross,MeterWorkCarActualFirst tare, MeterMonitorNote note) throws Exception;

    PageList<MeterWorkCarActualFirst> allStateView(HashMap<String, Object> params, Integer pageNum, Integer pageSize);

    RESTfulResult localCleanByFirstNo(MeterWorkCarActual actualModel);
    RESTfulResult localRecoveryOrAbolishByFirstNo(MeterWorkCarActualFirst firstModel);
    RESTfulResult localMatch(String actualFirstNo, String predictionNo, String updateManNo, String updateManName);
    int localRemove(List<MeterWorkCarActualFirst> models);

    RESTfulResult addDj(MeterWorkCarActualFirst first, MeterMonitorNote note) throws Exception;
    RESTfulResult doAddNetDj(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb, String saveTare,MeterMonitorNote note) throws Exception;
}
