package com.steerinfo.meterwork.meterworkrailwayactfirstbak.service;

import com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight;
import com.steerinfo.baseinfo.meterbaserailwaycarriageweight.model.MeterBaseRailwayCarriageWeight;
import com.steerinfo.baseinfo.meterbaserailwayweight.model.MeterBaseRailwayWeight;
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.CommonCombination;
import com.steerinfo.meterwork.dto.StaffPerformanceAnalysis;
import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
import com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst;
import com.steerinfo.meterwork.meterworkrailwayactfirstbak.model.MeterWorkRailwayActFirstBak;
import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
import com.steerinfo.meterwork.meterworkrailwayactualbak.model.MeterWorkRailwayActualBak;
import com.steerinfo.meterwork.meterworkrailwaymotorialreceived.model.MeterWorkRailwayMotorialReceived;
import com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived;
import com.steerinfo.meterwork.meterworkrailwayscheduledhelp.model.MeterWorkRailwayScheduledHelp;
import com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale;
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;

/**
 * MeterWorkRailwayActFirst服务接口：
 * @author generator
 * @version 1.0-SNAPSHORT 2020-10-14 08:40
 * 类描述
 * 修订历史：
 * 日期：2020-10-14
 * 作者：generator
 * 参考：
 * 描述：MeterWorkRailwayActFirst服务接口
 * @see null
 * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
 */
public interface IMeterWorkRailwayActFirstBakService extends IBaseService<MeterWorkRailwayActFirstBak, String>{
    RESTfulResult checkandadd(MeterWorkRailwayActFirstBak model);
    RESTfulResult dynamicAdd(MeterWorkRailwayActFirstBak model);

    int checkandupdate(MeterWorkRailwayActFirstBak model);
    RESTfulResult updateList(List<MeterWorkRailwayActFirstBak> models);
    List<MeterWorkRailwayActFirstBak> noPage(HashMap<String, Object> params);

    int audit(MeterWorkRailwayActFirstBak model);

    int unaudit(MeterWorkRailwayActFirstBak model);

    int abolish(MeterWorkRailwayActFirstBak model);

    int recover(MeterWorkRailwayActFirstBak model);

    int remove(MeterWorkRailwayActFirstBak model);

    MeterWorkRailwayActFirstBak match(String actualFirstNo, String predictionNo);

    int updateCar(MeterWorkRailwayActFirstBak model);

    @Transactional(rollbackFor = Exception.class)
    PageList<MeterWorkRailwayActFirstBak> selectTa(Map<String, Object> parmas, Integer pageNum, Integer pageSize);

    PageList<MeterWorkRailwayActFirstBak> likeByDesc(HashMap<String, Object> parameters, Integer pageNum, Integer pageSize);
    List<MeterWorkRailwayActFirstBak> webByLikeDesc(HashMap<String, Object> parameters);

    List<String> distinctRailwayNo(HashMap<String, Object> param);
    List<String> distinctLcNo(HashMap<String, Object> param);
    RESTfulResult distinctLcNoAndRailwayNo(HashMap<String, Object> param);

    List<MeterWorkRailwayActFirstBak> selectNet(String weightType, String railwayNo, String flag);

    List<MeterWorkRailwayActFirstBak> selectSta(HashMap parmas);

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

    List<StaffPerformanceAnalysis> analysis(String startTime, String endTime);

    PageList<MeterWorkRailwayActFirstBak> selectView(HashMap parmas, Integer pageNum, Integer pageSize);

    PageList<MeterWorkRailwayActFirstBak> selectDiff(String flag, Integer pageNum, Integer pageSize);

    RESTfulResult doAddWfStatic(MeterWorkRailwayActFirstBak firstRail) throws Exception;

    RESTfulResult doAddWfStaticTwo(PreRailwayScale scale, MeterWorkRailwayActFirstBak grossModel, MeterWorkRailwayActFirstBak tareModel);

    String doAddWf(MeterWorkRailwayActFirstBak firstRail, MeterWorkRailwayActualBak netRail);

    String doAddWfAct(PreRailwayScale preRailwayScale, MeterWorkRailwayActFirstBak First, MeterBaseRailwayWeight baseRailwayWeight);

    PageList<MeterWorkRailwayActFirstBak> doQueryWf(HashMap parmas, Integer pageNum, Integer pageSize);

    List<MeterWorkRailwayActFirstBak> selectAct(HashMap parmas, Integer pageNum, Integer pageSize);

    String doAddWfRecover(MeterWorkRailwayActFirstBak model);

    //C#端轨道衡实绩静轨-复磅-更新自重
    String doUpdateSelfWeight(MeterWorkRailwayActFirstBak model);

//    PageList<MeterWorkRailwayActFirstBak> selectTa(HashMap parmas, Integer pageNum, Integer pageSize);

    RESTfulResult doAddNetHZHX(MeterWorkRailwayActFirstBak first02, MeterWorkRailwayActualBak carModel, MeterWorkRailwayActFirstBak first03,  MeterMonitorNote note);
    RESTfulResult doNetAddTwo(MeterWorkRailwayActFirstBak one, MeterWorkRailwayActualBak two, PreRailwayScale three, PreRailwayScale four);
    RESTfulResult doNetAddTwo02(List<MeterWorkRailwayActFirstBak> selectedFirsts, List<MeterWorkRailwayActFirstBak> addFirsts, List<PreRailwayScale> scales, String note);

    RESTfulResult doAddNetHZHXTwo(PreRailwayScale scale, MeterWorkRailwayActFirstBak first01, MeterWorkRailwayActFirstBak first02,  MeterMonitorNote note, String flag);
    RESTfulResult doNetAddTwoDouble(PreRailwayScale scale01, PreRailwayScale scale02,  MeterWorkRailwayActFirstBak first01, MeterWorkRailwayActFirstBak first02);

    String doubleEntrustMatch(String actualNo1, String actualNo2, String predictionNo1, String predictionNo2);
    String mixedLoading(String actualNo1, String actualNo2, String actualNo3, String predictionNo1,String predictionNo2);
    String mixedDischarge(String actualNo1, String actualNo2, String actualNo3, String predictionNo1, String predictionNo2);
    String fixedTare(String actualNo, String tareWeight, String predictionNo);
    RESTfulResult HistoricalTare(String actualNo, String predictionNo);

    RESTfulResult supplementaryData(MeterWorkRailwayActFirstBak model);
    RESTfulResult doAddRailWf(List<MeterWorkRailwayActFirstBak> models);
    RESTfulResult doAddRailNetWf(List<MeterWorkRailwayMotorialReceived> grossModels, List<MeterWorkRailwayActFirstBak> tareModels);
    RESTfulResult doNetAddMotoriaRailway(MeterWorkRailwayMotorialReceived grossModel, MeterWorkRailwayActFirstBak tareModel, PreRailwayScale scale);
    RESTfulResult doAddRailAINetWf(List<MeterWorkRailwayMotorialReceived> grossModels, List<MeterBaseRailwayAiweight> tareModels);
    RESTfulResult doAddNetInnerWf(MeterWorkRailwayMotorialReceived grossModel, MeterBaseRailwayAiweight tareModel, PreRailwayScale scale);
    RESTfulResult doAddNetWeight(MeterWorkRailwayMotorialReceived grossModel, MeterBaseRailwayCarriageWeight tareModel, PreRailwayScale scale);

    RESTfulResult selfServiceMeasurement(MeterWorkRailwayActFirstBak first);
    RESTfulResult batchUpdateLcNo(List<MeterWorkRailwayActFirstBak> models);

    RESTfulResult doIdentifyWeight(MeterWorkRailwayActFirstBak model);

    PageList<MeterWorkRailwayActFirstBak> likeByDescTSDG(HashMap<String, Object> parameters, Integer pageNum, Integer pageSize);

    RESTfulResult doStandardMatch(HashMap<String, Object> param);
    RESTfulResult batchMatchView(HashMap<String, Object> param);

    //动态轨道衡衡数据处理接口
    //批量匹配AI标识皮
    RESTfulResult DynamicBatchMatchAIweight(List<MeterWorkRailwayReceived> receivedList);
    //批量匹配标准皮
    RESTfulResult DynamicBatchMatchCarriageWeight(List<MeterWorkRailwayReceived> receivedList);
    //批量匹配一次空皮
    RESTfulResult DynamicBatchMatchFirstWeight(List<MeterWorkRailwayReceived> receivedList);
    //批量匹配历史皮
    RESTfulResult DynamicBatchMatchHisTareWeight(List<MeterWorkRailwayReceived> receivedList);


    //静态轨道衡数据处理接口
    RESTfulResult WebBatchMatchidentifyWeight(List<HashMap> models);

    RESTfulResult saveAutoScale(CommonCombination<MeterWorkRailwayActFirstBak, MeterWorkRailwayActFirstBak, MeterWorkRailwayActualBak, MeterWorkRailwayScheduledHelp> com);

    //离线计量
    RESTfulResult addFirstEmergency(MeterWorkRailwayActFirstBak model)  throws Exception;
    RESTfulResult doNetEmergency(MeterWorkRailwayActualBak model)  throws Exception;

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

    //内倒车辆复制到一次表
    RESTfulResult CopyToFirst(List<String> ids,String carNo) throws Exception;

    RESTfulResult addFirstEmergencyList(List<MeterWorkRailwayActFirstBak> lt) throws Exception;
}

