|
@@ -11,7 +11,9 @@ import com.ruoyi.common.log.annotation.Log;
|
|
import com.ruoyi.common.log.enums.BusinessType;
|
|
import com.ruoyi.common.log.enums.BusinessType;
|
|
import com.sooka.sponest.monitor.remoteapi.service.center.system.RemoteService;
|
|
import com.sooka.sponest.monitor.remoteapi.service.center.system.RemoteService;
|
|
import com.sooka.sponest.monitor.uav.domain.CentermonitorTUav;
|
|
import com.sooka.sponest.monitor.uav.domain.CentermonitorTUav;
|
|
|
|
+import com.sooka.sponest.monitor.uav.domain.CentermonitorTUavFile;
|
|
import com.sooka.sponest.monitor.uav.domain.dto.CentermonitorTUavDTO;
|
|
import com.sooka.sponest.monitor.uav.domain.dto.CentermonitorTUavDTO;
|
|
|
|
+import com.sooka.sponest.monitor.uav.mapper.CentermonitorTUavFileMapper;
|
|
import com.sooka.sponest.monitor.uav.service.ICentermonitorTUavService;
|
|
import com.sooka.sponest.monitor.uav.service.ICentermonitorTUavService;
|
|
import com.sooka.sponest.monitor.websocket.WebSocketUsers;
|
|
import com.sooka.sponest.monitor.websocket.WebSocketUsers;
|
|
import org.apache.http.HttpEntity;
|
|
import org.apache.http.HttpEntity;
|
|
@@ -35,10 +37,12 @@ import javax.annotation.Resource;
|
|
import javax.net.ssl.SSLContext;
|
|
import javax.net.ssl.SSLContext;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.websocket.*;
|
|
import javax.websocket.*;
|
|
-import java.io.IOException;
|
|
|
|
import java.net.URI;
|
|
import java.net.URI;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.charset.StandardCharsets;
|
|
-import java.util.*;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.LinkedHashMap;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
import java.util.concurrent.CountDownLatch;
|
|
import java.util.concurrent.CountDownLatch;
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
@@ -58,6 +62,9 @@ public class CentermonitorTUavController extends BaseController {
|
|
@Resource
|
|
@Resource
|
|
private RemoteService remoteService;
|
|
private RemoteService remoteService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private CentermonitorTUavFileMapper centermonitorTUavFileMapper;
|
|
|
|
+
|
|
private static final Logger log = LoggerFactory.getLogger(CentermonitorTUavController.class);
|
|
private static final Logger log = LoggerFactory.getLogger(CentermonitorTUavController.class);
|
|
|
|
|
|
@Value("${sooka.uav_server.username}")
|
|
@Value("${sooka.uav_server.username}")
|
|
@@ -684,7 +691,7 @@ public class CentermonitorTUavController extends BaseController {
|
|
log.error("发生未知异常", e);
|
|
log.error("发生未知异常", e);
|
|
}
|
|
}
|
|
//todo websocket
|
|
//todo websocket
|
|
- WebSocketUsers.sendMessageToUsersByText(JSON.toJSONString(AjaxResult.success("10002",new ArrayList<>())));
|
|
|
|
|
|
+ WebSocketUsers.sendMessageToUsersByText(JSON.toJSONString(AjaxResult.success("10002", new ArrayList<>())));
|
|
return AjaxResult.success("操作成功,暂无数据");
|
|
return AjaxResult.success("操作成功,暂无数据");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -747,7 +754,7 @@ public class CentermonitorTUavController extends BaseController {
|
|
*/
|
|
*/
|
|
//todo 未测试接口连通性
|
|
//todo 未测试接口连通性
|
|
@GetMapping("/getHangarRealTimeData")
|
|
@GetMapping("/getHangarRealTimeData")
|
|
- public String getHangarRealTimeData(@RequestParam(value = "copterSn") String copterSn,@RequestParam(value = "boxSn") String boxSn) {
|
|
|
|
|
|
+ public String getHangarRealTimeData(@RequestParam(value = "copterSn") String copterSn, @RequestParam(value = "boxSn") String boxSn) {
|
|
final CountDownLatch latch = new CountDownLatch(1);
|
|
final CountDownLatch latch = new CountDownLatch(1);
|
|
final StringBuilder response = new StringBuilder();
|
|
final StringBuilder response = new StringBuilder();
|
|
try {
|
|
try {
|
|
@@ -782,7 +789,7 @@ public class CentermonitorTUavController extends BaseController {
|
|
*/
|
|
*/
|
|
//todo 未测试接口连通性
|
|
//todo 未测试接口连通性
|
|
@GetMapping("/getHangarLog")
|
|
@GetMapping("/getHangarLog")
|
|
- public String getHangarLog(@RequestParam(value = "copterSn") String copterSn,@RequestParam(value = "boxSn") String boxSn) {
|
|
|
|
|
|
+ public String getHangarLog(@RequestParam(value = "copterSn") String copterSn, @RequestParam(value = "boxSn") String boxSn) {
|
|
final CountDownLatch latch = new CountDownLatch(1);
|
|
final CountDownLatch latch = new CountDownLatch(1);
|
|
final StringBuilder response = new StringBuilder();
|
|
final StringBuilder response = new StringBuilder();
|
|
try {
|
|
try {
|
|
@@ -912,4 +919,17 @@ public class CentermonitorTUavController extends BaseController {
|
|
return AjaxResult.success(centermonitorTUavService.selectUavByUavId(uavId));
|
|
return AjaxResult.success(centermonitorTUavService.selectUavByUavId(uavId));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 无人机有VR采集数据推送接口
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/uavVrResourcePush")
|
|
|
|
+ public void uavDataPush(@RequestBody cn.hutool.json.JSONObject json) {
|
|
|
|
+ log.info("uavVrResourcePush: " + json.toString());
|
|
|
|
+ CentermonitorTUavFile saveVo = new CentermonitorTUavFile();
|
|
|
|
+ Map<String,Object> map = (Map<String, Object>) json.get("result");
|
|
|
|
+ saveVo.setFileUrl(map.get("fileUrl").toString());
|
|
|
|
+ centermonitorTUavFileMapper.insertCentermonitorTUavFile(saveVo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|