package com.huimv.eartag.service;

import com.alibaba.fastjson.JSONObject;
import com.huimv.eartag.vo.Result;

import java.text.ParseException;

/**
 * @Project : huimv.shiwan
 * @Package : com.huimv.biosafety.uface.controller
 * @Description : TODO
 * @Version : 1.0
 * @Author : ZhuoNing
 * @Create : 2020-12-25
 **/
public interface IDeviceManageService {
    //
    Result getNowAllStatus(String farmId) throws ParseException;

    //显示前N天记录
    Result listManyDaysAllStatus(String farmId, Integer days) throws ParseException;

    //显示在线设备
    Result listOnlineDevice(String farmId, String date) throws ParseException;

    //
    Result getDeviceRegisterByDeviceCode(String deviceCode) throws ParseException;

    //查询单个设备N天在线记录
    Result listDeviceOnlineCountByDeviceCode(String deviceCode, Integer pastDays) throws ParseException;

    //查询设备在线状态
    Result listDeviceOnlineStatusByDeviceCode(String deviceCode, Integer pastDays) throws ParseException;

    //查询设备关联的在线耳标统计
    Result listDeviceEartagOnlineCountByDeviceCode(String deviceCode) throws ParseException;

//    void remoteProcessFarmAllStatus(String farmId) throws ParseException;

//    void remoteProcessFarmAllStatus2(String farmId) throws ParseException;

    //查询在线设备
    Result listOnlineDevice(String farmId, String deviceCode, String alias, String addDate, Integer pageNo, Integer pageSize) throws ParseException;

    //查询设备环境温度
    Result listDeviceEnvtempByDeviceCode(String deviceCode) throws ParseException;

    //用分页方式
    Result listDeviceEartagOnlineCountByDeviceCodeInPager(String deviceCode, String earmark, String addDate, Integer pageNo, Integer pageSize) throws ParseException;

    //显示设备心跳
    Result listHeartbeatByDeviceCodeAndDateInPager(String deviceCode, String addDate, Integer pageNo, Integer pageSize) throws ParseException;

    //分页查询设备温度
    Result listDeviceEnvtempByDeviceCodeInPager(String deviceCode, String addDate, Integer pageNo, Integer pageSize) throws ParseException;

    //分页查询列表
    Result listDeviceRegisterInPager(String farmId, String deviceCode, String alias, String startDate, String endDate, Integer activeStatus, Integer liveStatus, Integer pageNo, Integer pageSize) throws ParseException;

    //单个耳标指定
    Result listDeviceOnlineCountByDeviceCodeInPager(String deviceCode, String startDate, String endDate, Integer pageNo, Integer pageSize) throws ParseException;

    //同步设备注册信息
    void countEffectiveDeviceTotal(JSONObject deviceRegister);

    //计算总状态信息
//    void countFarmAllStatus(JSONObject deviceRegisterJo) throws ParseException;

    //
    Result listDeviceEartagOnlineStatusByDeviceCodeAndDate(String deviceCode, String earmark, String addDate);
}
