From a30cc74a46477c1820c6114cbda7f4e11b3aaf0d Mon Sep 17 00:00:00 2001
From: jpy <812110275@qq.com>
Date: Sun, 28 May 2023 16:10:24 +0800
Subject: [PATCH] 风场sql
---
screen-api/src/main/java/com/moral/api/controller/ChartController.java | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/controller/ChartController.java b/screen-api/src/main/java/com/moral/api/controller/ChartController.java
index 2e3211a..d68dddb 100644
--- a/screen-api/src/main/java/com/moral/api/controller/ChartController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/ChartController.java
@@ -259,9 +259,9 @@
String path = applicationHome.getSource().getParentFile().toString() + "/static/tsv";
//File file = File.createTempFile("test",".tsv");
- if (!new File(path).exists()){
+ /*if (!new File(path).exists()){
new File(path).mkdir();
- }
+ }*/
File file = null;
File dir = new File(path);
file = File.createTempFile("honeycombDiagram",".tsv",dir);
@@ -270,11 +270,11 @@
OutputStreamWriter ow = new OutputStreamWriter(new FileOutputStream(file),"UTF-8");
//tsv������������������������������������������������������������������������������������������������
- ow.write("lon");
+ ow.write("lng");
ow.write(" ");
ow.write("lat");
ow.write(" ");
- ow.write("value");
+ ow.write("count");
//���������������������
ow.write("\r\n");
//���������
@@ -290,8 +290,11 @@
ow.flush();
ow.close();
+ /*String localAddr = httpServletRequest.getLocalAddr();
+ int serverPort = httpServletRequest.getServerPort();*/
+
Map<String,Object> res = new HashMap<>();
- res.put("path",file.getPath());
+ res.put("path","http://47.99.64.149:8081"+"/static/tsv/"+file.getName());
return ResultMessage.ok(res);
}
--
Gitblit v1.8.0