You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
103 lines
2.2 KiB
103 lines
2.2 KiB
package com.psdc.service;
|
|
|
|
import com.psdc.entity.PsdcDevice;
|
|
import com.psdc.entity.vo.DeviceStatusVo;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
|
|
public interface IPsdcDeviceService {
|
|
|
|
/**
|
|
* 通过ID查询单条数据
|
|
*
|
|
* @param deviceId 主键
|
|
* @return 实例对象
|
|
*/
|
|
PsdcDevice queryById(Integer deviceId);
|
|
|
|
/**
|
|
* 根据用户id查询设备列表
|
|
* @return
|
|
*/
|
|
List<PsdcDevice> queryByUserId(Integer parent);
|
|
|
|
/**
|
|
* 查询所有设备状态
|
|
* @return
|
|
*/
|
|
List<DeviceStatusVo> queryDeviceStatus();
|
|
|
|
|
|
DeviceStatusVo queryDeviceStatusById(Integer deviceId);
|
|
|
|
|
|
/**
|
|
* 新增数据
|
|
*
|
|
* @param psdcDevice 实例对象
|
|
* @return 实例对象
|
|
*/
|
|
Integer insert(PsdcDevice psdcDevice);
|
|
|
|
/**
|
|
* 分页查询指定行数据
|
|
*
|
|
* @param psdcDevice 查询条件
|
|
* @return 对象列表
|
|
*/
|
|
List<PsdcDevice> queryAllByLimit(PsdcDevice psdcDevice);
|
|
|
|
/**
|
|
* 更新数据
|
|
*
|
|
* @param psdcDevice 实例对象
|
|
* @return 实例对象
|
|
*/
|
|
Integer update(PsdcDevice psdcDevice);
|
|
/**
|
|
* 通过主键删除数据
|
|
*
|
|
* @param deviceIds 主键
|
|
* @return 是否成功
|
|
*/
|
|
boolean deleteById(Long[] deviceIds);
|
|
|
|
boolean daoruDevicesData(MultipartFile file, String cjr);
|
|
|
|
/**
|
|
* 更新设备状态
|
|
* @param deviceId
|
|
* @param runStatus
|
|
* @return
|
|
*/
|
|
int updateDeviceRunStatus(Integer deviceId,Integer runStatus);
|
|
|
|
/**
|
|
* 控制设备启动停止
|
|
* @param deviceId
|
|
* @param runStatus
|
|
* @return
|
|
*/
|
|
int controlDeviceStartAndStop(Integer deviceId,Integer runStatus,String controlBy,Integer controlMethod);
|
|
|
|
/**
|
|
* 设置温度指令
|
|
*
|
|
* @param deviceId
|
|
* @param data
|
|
*/
|
|
int setTemperature(Integer deviceId, List<HashMap> data, String controlBym,Integer controlMethod);
|
|
|
|
/**
|
|
* 设置单条温度指令
|
|
* @param deviceId
|
|
* @param key
|
|
* @param value
|
|
* @param controlBym
|
|
* @param controlMethod
|
|
* @return
|
|
*/
|
|
int setTemperature(Integer deviceId, String key,String value, String controlBym,Integer controlMethod);
|
|
}
|
|
|