|
@ -1,9 +1,10 @@ |
|
|
package com.storeroom.controller; |
|
|
|
|
|
|
|
|
package com.storeroom.modules.storeroom3d.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.storeroom.annotaion.rest.AnonymousGetMapping; |
|
|
import com.storeroom.annotaion.rest.AnonymousGetMapping; |
|
|
import com.storeroom.annotaion.rest.AnonymousPostMapping; |
|
|
import com.storeroom.annotaion.rest.AnonymousPostMapping; |
|
|
import com.storeroom.service.ApiService; |
|
|
|
|
|
|
|
|
import com.storeroom.modules.storeroom3d.service.ApiService; |
|
|
|
|
|
import com.storeroom.modules.storeroom3d.service.PushService; |
|
|
import com.storeroom.utils.ApiResponse; |
|
|
import com.storeroom.utils.ApiResponse; |
|
|
import com.storeroom.utils.MacUtil; |
|
|
import com.storeroom.utils.MacUtil; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.Api; |
|
@ -22,7 +23,7 @@ import java.util.Set; |
|
|
public class TestApiServiceController { |
|
|
public class TestApiServiceController { |
|
|
|
|
|
|
|
|
private final ApiService apiService; |
|
|
private final ApiService apiService; |
|
|
//private final PushService pushService; |
|
|
|
|
|
|
|
|
private final PushService pushService; |
|
|
|
|
|
|
|
|
@ApiOperation("获取库房token") |
|
|
@ApiOperation("获取库房token") |
|
|
@AnonymousGetMapping("token") |
|
|
@AnonymousGetMapping("token") |
|
@ -47,14 +48,14 @@ public class TestApiServiceController { |
|
|
@AnonymousGetMapping("getcuralarm") |
|
|
@AnonymousGetMapping("getcuralarm") |
|
|
public ApiResponse<Object> getInfo() { |
|
|
public ApiResponse<Object> getInfo() { |
|
|
Object objMsg = apiService.getAllDeviceAlarm(); |
|
|
Object objMsg = apiService.getAllDeviceAlarm(); |
|
|
//pushService.pushMsgToAll(objMsg.toString()); |
|
|
|
|
|
|
|
|
pushService.pushMsgToAll(objMsg.toString()); |
|
|
return ApiResponse.success(apiService.getAllDeviceAlarm()); |
|
|
return ApiResponse.success(apiService.getAllDeviceAlarm()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ApiOperation("获取设备监控参数实时值") |
|
|
@ApiOperation("获取设备监控参数实时值") |
|
|
@AnonymousPostMapping("getrealtimedata") |
|
|
@AnonymousPostMapping("getrealtimedata") |
|
|
public ApiResponse<Object> getrealtimedata(@RequestBody Set<String> deviceIds) { |
|
|
public ApiResponse<Object> getrealtimedata(@RequestBody Set<String> deviceIds) { |
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
return ApiResponse.success(apiService.getRealTimeData(deviceIds)); |
|
|
return ApiResponse.success(apiService.getRealTimeData(deviceIds)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |