|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
package com.xydl.cac.controller;
|
|
|
|
|
|
|
|
|
|
import com.xydl.cac.iec.IecClient;
|
|
|
|
|
import com.xydl.cac.iec.RealTimeDataService;
|
|
|
|
|
import com.xydl.cac.model.Response;
|
|
|
|
|
import com.xydl.cac.service.IcdFileConfigService;
|
|
|
|
|
import com.xydl.cac.socket.WebSocketServer;
|
|
|
|
@ -11,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@ -23,6 +26,8 @@ public class TestController extends BasicController {
|
|
|
|
|
IcdFileConfigService configService;
|
|
|
|
|
@Resource
|
|
|
|
|
WebSocketServer webSocketServer;
|
|
|
|
|
@Resource
|
|
|
|
|
RealTimeDataService realTimeDataService;
|
|
|
|
|
|
|
|
|
|
@GetMapping("compare61850")
|
|
|
|
|
@ApiOperation("比对61850的不同点")
|
|
|
|
@ -36,4 +41,10 @@ public class TestController extends BasicController {
|
|
|
|
|
public void sendMsg(String msg, Integer warningId) {
|
|
|
|
|
webSocketServer.sendMessage(msg, warningId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("realTimeMap")
|
|
|
|
|
@ApiOperation("实时订阅Map")
|
|
|
|
|
public Response<HashMap<Integer, IecClient>> realTimeMap() {
|
|
|
|
|
return Response.success(realTimeDataService.clientMap);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|