wangmengzhao
2023-12-13 d8228730095cdcaccb40dd2dc290fc44779e340a
wumei-smart-master/springboot/wumei-iot/src/main/java/com/ruoyi/iot/service/IDeviceService.java
@@ -11,15 +11,14 @@
/**
 * 设备Service接口
 *
 *
 * @author kerwincui
 * @date 2021-12-16
 */
public interface IDeviceService
{
public interface IDeviceService {
    /**
     * 查询设备
     *
     *
     * @param deviceId 设备主键
     * @return 设备
     */
@@ -39,6 +38,33 @@
     * @return 设备
     */
    public Device selectDeviceBySerialNumber(String serialNumber);
    /**
     * 查询总设备数(台)
     *
     * @param id
     * @return
     * @throws Exception
     */
    public AjaxResult selectDeviceCount(int id) throws Exception;
    /**
     * 根据登录用户的id查询设备的使用人数
     *
     * @param id
     * @return
     * @throws Exception
     */
    public int selectUserDeviceByCount(int id) throws Exception;
    /**
     * 查询所有的设备
     *
     * @return
     * @throws Exception
     */
    public List<Device> selectDeviceAll() throws Exception;
    /**
     * 根据设备编号查询简介设备
@@ -66,14 +92,15 @@
    /**
     * 上报设备的物模型
     *
     * @param input
     * @return
     */
    public int reportDeviceThingsModelValue(ThingsModelValuesInput input,int type,boolean isShadow);
    public int reportDeviceThingsModelValue(ThingsModelValuesInput input, int type, boolean isShadow);
    /**
     * 查询设备列表
     *
     *
     * @param device 设备
     * @return 设备集合
     */
@@ -108,11 +135,11 @@
     * @param device 设备
     * @return 设备集合
     */
    public List<DeviceShortOutput> selectDeviceShortList(Device device);
    public List<DeviceShortOutput> selectDeviceShortList(Device device, boolean repairFlag);
    /**
     * 新增设备
     *
     *
     * @param device 设备
     * @return 结果
     */
@@ -131,10 +158,11 @@
     *
     * @return 结果
     */
    public int insertDeviceAuto(String serialNumber,Long userId,Long productId);
    public int insertDeviceAuto(String serialNumber, Long userId, Long productId);
    /**
     * 获取设备设置的影子
     *
     * @param device
     * @return
     */
@@ -142,7 +170,7 @@
    /**
     * 修改设备
     *
     *
     * @param device 设备
     * @return 结果
     */
@@ -150,13 +178,15 @@
    /**
     * 更新设备状态和定位
     *
     * @param device 设备
     * @return 结果
     */
    public int updateDeviceStatusAndLocation(Device device,String ipAddress);
    public int updateDeviceStatusAndLocation(Device device, String ipAddress);
    /**
     * 更新设备状态
     *
     * @param device 设备
     * @return 结果
     */
@@ -164,14 +194,17 @@
    /**
     * 上报设备信息
     *
     * @param device 设备
     * @return 结果
     */
    public int reportDevice(Device device,Device deviceentity);
    public int reportDevice(Device device, Device deviceentity);
    //int updateDeviceUserBySN(List<String> snList, Long userId);
    /**
     * 删除设备
     *
     *
     * @param deviceId 需要删除的设备主键集合
     * @return 结果
     */
@@ -180,15 +213,30 @@
    /**
     * 生成设备唯一编号
     *
     * @return 结果
     */
    public String generationDeviceNum();
    /**
     * 重置设备状态
     *
     * @return 结果
     */
    public int resetDeviceStatus(String deviceNum);
    /**
     * 重置设备状态-出厂分派设备
     *
     * @return 结果
     */
    public int updateDeviceBySN(List<String> snList, Long tenantId);
    /**
     * 重置设备状态-用户绑定设备
     *
     * @return 结果
     */
    public int updateDeviceUserBySN(List<String> snList, Long userId);
}