package com.pqs9900.service.configuration;


import com.njcn.pojo.commons.AddResult;
import com.njcn.pojo.commons.device.*;
import com.njcn.pojo.configuration.*;
import com.njcn.pojo.data.OfflLog;
import com.njcn.pojo.user.Depts;
import com.pqs9900.pojo.DataInfo.TranslateState;
import com.pqs9900.util.TranslateThread.data;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Date;
import java.util.List;


public interface ManaDeviceService {
    int updateDevice(Integer name, Integer devflag);

    public AddResult saveProjectInfo(String projectName);

    public AddResult saveProInfo(String proName, Long projectIndex);

    public AddResult saveGdInfo(String gdName,Long proIndex);

    public AddResult saveSubInfo(String subName, String gdIndex, Float longitude, Float latitude, String scale);

    public AddResult saveDevInfo(DeviceInfo device) throws Exception;

    public String updateDeviceInfo(DeviceInfo device, List<String> funcindexs);

    public String delDeviceInfo(Long devIndex);

    public AddResult saveSubvInfo(String subvName, String gdIndex, String subIndex, String devIndex, int subvnum, String scale, Long subvModel);

    public List<DicData> getdicdata(String dictypeName);

    public DeviceInfo loadDevice(Long devIndex) throws Exception;

    public List<NodeInformation> getNodeInfo();

    public Province loadPro(Long proIndex);

    public String updatePro(Long proIndex, String name);

    public String delPro(Long proIndex);

    public Project loadProj(Long projIndex);

    public String updateProj(Long projIndex, String name);

    public String delProj(Long projIndex);

    public GDInformation loadGd(Long gdIndex);

    public String updateGd(Long proIndex, Long gdIndex, String name);

    public String delGd(Long gdIndex,String ip);

    public SubInfo loadSub(Long subIndex);

    public String updateSub(Long gdIndex, Long subIndex, String name, Float longitude, Float latitude, String mapIndex, String scale);

    public String delSub(Long subIndex);

    public SubVoltage loadSubv(Long subvIndex);

    public String updateSubv(String subvName, Long gdIndex, Long subIndex, Long devIndex, Long subvIndex, int subvnum, String scale, Long subvModel);

    public String delSubv(Long subvIndex);

    public AddResult saveLineInfo(Line line, String dept,  int lineNum, String monitorID,String pttype,String loadType,int interval,String objName,Integer statFlag,
                                  String businessType,
                                  Integer powerId,
                                  String powerSubstationName,
                                  Integer isGridPoint
    );

    public String delLine(Long lineIndex,String ip);

    public LineDetailInfo loadLine(Long lineIndex);

    public String updateLine(Line line, LineDetail detail,String voltage,String uvoltage,String ip);

    String updateLine(Integer lineId, String lineName);

    public LineInfo loadLineInfo(Long lineIndex);

    public List<Depts> loadDept(Long proIndex);

    void insertOFFlog(OfflLog offlLog);

    List<data> getDataInfo();

    void updateOFFlog(Date startTime, Date endTime, String year, int state, String name, int id, Date updateTime, int allCount, int realCount, String offlDescribe);

    int getCount(int id, String fileName, Integer state);

    List<TranslateState> getTranslateState(Date start, Date end);

    void export(OutputStream outputStream) throws IOException;

    void downDevPloy(OutputStream outputStream) throws IOException;

    List<TranslateState> judgetranslate(Date time);

    void deleteTranslate(String guid);

    TranslateState queryimportLoading();

    public void updateAllLimit();


    /**
     * 重新计算限值
     */
    Integer reCalOverLimit();

    /**
     * PMS_MONITOR数据入库
     */
    int addMonitor(String monitorId);

    String findMaxDeviceName(Long gdIndex);

}
