package com.steerinfo.meterwork.meterworkrailwayactfirst.service;

import com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight;
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.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.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 IMeterWorkRailwayActFirstService extends IBaseService<MeterWorkRailwayActFirst, String>{
    RESTfulResult checkandadd(MeterWorkRailwayActFirst model);

    int checkandupdate(MeterWorkRailwayActFirst model);

    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<String> distinctRailwayNo(String railwayTypeNo, String lcNo, String railwayNo, String startTime, String endTime, String baseSpotNo,String matterName, String predictionNo,String forwardingUnitName,String receivingUintName,String valueFlag);

    List<String> distinctLcNo(String railwayTypeNo, String startTime, String endTime);

    RESTfulResult distinctLcNoAndRailwayNo(String railwayTypeNo, String startTime, String endTime, String railwayNo, String baseSpotName, String matterName, String predictionNo,String valueFlag);

    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);

    String doAddWf(MeterWorkRailwayActFirst firstRail, MeterWorkRailwayActual netRail);

    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 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 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 doAddRailAINetWf(List<MeterWorkRailwayMotorialReceived> grossModels, List<MeterBaseRailwayAiweight> tareModels);

    RESTfulResult selfServiceMeasurement(MeterWorkRailwayActFirst first);
    RESTfulResult batchUpdateLcNo(List<MeterWorkRailwayActFirst> models);
}

