Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skreceive
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
db72f82c
由
张雷
编写于
2023-02-09 16:59:50 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
人员定位模拟数据
1 个父辈
03ee6fa8
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
25 行增加
和
2 行删除
src/main/java/com/jkdata/controller/ThirdController.java
src/main/java/com/jkdata/service/IThirdService.java
src/main/java/com/jkdata/service/impl/IThirdServiceImpl.java
src/main/java/com/jkdata/tool/CommonConstant.java
src/main/java/com/jkdata/controller/ThirdController.java
查看文件 @
db72f82
...
...
@@ -116,7 +116,8 @@ public class ThirdController {
@GetMapping
(
"/positionByDeviceId"
)
public
Result
<
List
<
HistoryPoint
>>
getPositionByDeviceId
(
String
deviceId
,
String
startTime
,
String
endTime
)
{
Result
<
List
<
HistoryPoint
>>
result
=
new
Result
<
List
<
HistoryPoint
>>();
List
<
HistoryPoint
>
list
=
thirdService
.
getPositionByDeviceId
(
deviceId
,
startTime
,
endTime
);
// List<HistoryPoint> list = thirdService.getPositionByDeviceId(deviceId, startTime, endTime);
List
<
HistoryPoint
>
list
=
thirdService
.
getPositionByDeviceIdTest
(
deviceId
);
//模拟数据
result
.
setSuccess
(
true
);
result
.
setResult
(
list
);
return
result
;
...
...
src/main/java/com/jkdata/service/IThirdService.java
查看文件 @
db72f82
...
...
@@ -25,4 +25,6 @@ public interface IThirdService {
List
<
SafeArea
>
getSafeArea
();
List
<
SafeArea
>
getSafeAreaNew
();
List
<
HistoryPoint
>
getPositionByDeviceIdTest
(
String
deviceId
);
}
...
...
src/main/java/com/jkdata/service/impl/IThirdServiceImpl.java
查看文件 @
db72f82
...
...
@@ -266,5 +266,25 @@ public class IThirdServiceImpl implements IThirdService {
return
list
;
}
@Override
public
List
<
HistoryPoint
>
getPositionByDeviceIdTest
(
String
deviceId
)
{
List
<
HistoryPoint
>
list
=
new
ArrayList
<>();
String
historyPointStr
=
"1500.12,1500.96;1510.01,1560.56;1580.01,1580.56;1800.01,1810.56;1910.01,2010.56;"
+
"2510.21,2557.56;3510.01,3510.56;5510.01,5515.56;7512.01,7510.56;8514.01,8610.56;"
;
String
[]
pointHistoryArr
=
historyPointStr
.
split
(
";"
);
for
(
int
i
=
0
;
i
<
pointHistoryArr
.
length
;
i
++)
{
System
.
out
.
println
(
pointHistoryArr
[
i
]);
String
[]
pointArr
=
pointHistoryArr
[
i
].
split
(
","
);
HistoryPoint
historyPoint
=
new
HistoryPoint
();
historyPoint
.
setId
(
i
+
1
);
historyPoint
.
setBuildingId
(
"10"
);
historyPoint
.
setDeviceId
(
deviceId
);
historyPoint
.
setX
(
Double
.
valueOf
(
pointArr
[
0
]));
historyPoint
.
setY
(
Double
.
valueOf
(
pointArr
[
1
]));
list
.
add
(
historyPoint
);
}
return
list
;
}
}
...
...
src/main/java/com/jkdata/tool/CommonConstant.java
查看文件 @
db72f82
...
...
@@ -37,6 +37,6 @@ public interface CommonConstant {
String
HISTORY_URL
=
CMCC_IP
+
"/api/positionByDeviceId.shtml"
;
//历史轨迹
String
ALARM_URL
=
CMCC_IP
+
"/api/v1/alarmListByCount.shtml"
;
//告警信息
String
WEEK_ALARM_URL
=
CMCC_IP
+
"/api/v1/weekAlarmState.shtml"
;
//获取最近7天的告警统计数据
String
SAFE_AREA_URL
=
CMCC_IP
+
"/
riskArea/all
.shtml"
;
//安全区域
String
SAFE_AREA_URL
=
CMCC_IP
+
"/
client/listMonitoringAreaByBuildingId
.shtml"
;
//安全区域
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论