package com.steerinfo.meterwork.meterworkrailwayactfirst.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.meterworkrailwayactual.model.MeterWorkRailwayActual;
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.math.BigDecimal;
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 IMeterWorkRailwayActFirstService extends IBaseService<MeterWorkRailwayActFirst, String>{
    RESTfulResult checkandadd(MeterWorkRailwayActFirst model);
    RESTfulResult dynamicAdd(MeterWorkRailwayActFirst model);

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

    int audit(MeterWorkRailwayActFirst model);

    int unaudit(MeterWorkRailwayActFirst model);

    int abolish(MeterWorkRailwayActFirst model);

    int recover(MeterWorkRailwayActFirst model);

    int remove(MeterWorkRailwayActFirst model);

    MeterWorkRailwayActFirst match(String actualFirstNo, String predictionNo);

    int updateCar(MeterWorkRailwayActFirst model);

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

    PageList<MeterWorkRailwayActFirst> likeByDesc(HashMap<String, Object> parameters, Integer pageNum, Integer pageSize);
    List<MeterWorkRailwayActFirst> carFirstDataDetail(Map<String, Object> var1);
    List<MeterWorkRailwayActFirst> likeByDescNoPage(HashMap<String, Object> parameters);
    List<MeterWorkRailwayActFirst> 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<MeterWorkRailwayActFirst> selectNet(String weightType, String railwayNo, String flag);

    List<MeterWorkRailwayActFirst> selectSta(HashMap parmas);

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

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

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

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

    RESTfulResult doAddWfStatic(MeterWorkRailwayActFirst firstRail) throws Exception;

    RESTfulResult doAddWfStaticTwo(PreRailwayScale scale, MeterWorkRailwayActFirst grossModel, MeterWorkRailwayActFirst tareModel, boolean needUpload);

    String doAddWf(MeterWorkRailwayActFirst firstRail, MeterWorkRailwayActual netRail);

    @Transactional(rollbackFor = Exception.class)
    void doSaveTare(MeterWorkRailwayActFirst model);

    @Transactional(rollbackFor = Exception.class)
    void doSaveTare(MeterWorkRailwayActFirst model, String tareType);

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

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

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

    String doAddWfRecover(MeterWorkRailwayActFirst model);

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

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

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

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

    String doubleEntrustMatch(String actualNo1, String actualNo2, String predictionNo1, String predictionNo2);
    String doubleEntrustAiWeightMatch(String actualNo1, BigDecimal tareWeight, 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(MeterWorkRailwayActFirst model);
    RESTfulResult doAddRailWf(List<MeterWorkRailwayActFirst> models);
    RESTfulResult doAddRailNetWf(List<MeterWorkRailwayMotorialReceived> grossModels, List<MeterWorkRailwayActFirst> tareModels);
    RESTfulResult doNetAddMotoriaRailway(MeterWorkRailwayMotorialReceived grossModel, MeterWorkRailwayActFirst 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(MeterWorkRailwayActFirst first);
    RESTfulResult batchUpdateLcNo(List<MeterWorkRailwayActFirst> models);

    RESTfulResult doIdentifyWeight(MeterWorkRailwayActFirst model, boolean needUpload);

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

    RESTfulResult doStandardMatch(HashMap<String, Object> param);
    RESTfulResult batchMatchView(HashMap<String, Object> param);
    RESTfulResult batchMatchFirstView(HashMap<String, Object> param);
    int abolishCSharp(String carNo, String startTime, String endTime);
    //动态轨道衡衡数据处理接口
    //批量匹配AI标识皮
    RESTfulResult DynamicBatchMatchAIweight(List<MeterWorkRailwayReceived> receivedList);
    //批量匹配标准皮
    RESTfulResult DynamicBatchMatchCarriageWeight(List<MeterWorkRailwayReceived> receivedList);
    //批量匹配一次空皮
    RESTfulResult DynamicBatchMatchFirstWeight(List<MeterWorkRailwayReceived> receivedList);
    //批量匹配从表回空皮
    RESTfulResult DynamicBatchMatchReceivedWeight(List<MeterWorkRailwayReceived> receivedList);
    //批量匹配历史皮
    RESTfulResult DynamicBatchMatchHisTareWeight(List<MeterWorkRailwayReceived> receivedList);


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

    RESTfulResult saveAutoScale(CommonCombination<MeterWorkRailwayActFirst, MeterWorkRailwayActFirst, MeterWorkRailwayActual, MeterWorkRailwayScheduledHelp> com);

    //离线计量
    RESTfulResult addFirstEmergency(MeterWorkRailwayActFirst model)  throws Exception;
    RESTfulResult doNetEmergency(MeterWorkRailwayActual model)  throws Exception;

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

    RESTfulResult doRecovery(List<MeterWorkRailwayActFirst> models);

    //铁水吊钩秤web端
    List<String> distinctHookRailwayNo(HashMap<String, Object> param);
    List<MeterWorkRailwayActFirst> hookFirstByDesc(HashMap<String, Object> parameters);
    PageList<MeterWorkRailwayActFirst> hookFirstPageList(HashMap<String, Object> param, Integer pageNum, Integer pageSize);
}

