Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
fmboot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
af6e5325
由
张雷
编写于
2023-07-21 10:58:55 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
奥体项目增加报警功能
1 个父辈
192b5a18
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
22 行增加
和
12 行删除
fm-product/src/main/java/com/skua/modules/business/controller/OlympicCenterController.java
fm-product/src/main/java/com/skua/modules/business/service/IOlympicCenterService.java
fm-product/src/main/java/com/skua/modules/business/service/impl/OlympicCenterServiceImpl.java
fm-product/src/main/java/com/skua/modules/location/service/impl/YwLocationServiceImpl.java
fm-product/src/main/java/com/skua/modules/business/controller/OlympicCenterController.java
查看文件 @
af6e532
...
...
@@ -73,9 +73,9 @@ public class OlympicCenterController {
@ApiOperation
(
value
=
"新获取整体实时数据给V3.0"
,
notes
=
"新获取整体实时数据给V3.0"
)
@GetMapping
(
value
=
"/getRealDataToUE"
)
public
Result
<
Map
<
String
,
Object
>>
getRealDataToUE
(){
public
Result
<
Map
<
String
,
Object
>>
getRealDataToUE
(
AlarmParams
alarmParams
){
Result
<
Map
<
String
,
Object
>>
result
=
new
Result
<
Map
<
String
,
Object
>>();
Map
<
String
,
Object
>
map
=
olympicCenterService
.
getRealDataToUENew
();
Map
<
String
,
Object
>
map
=
olympicCenterService
.
getRealDataToUENew
(
alarmParams
);
result
.
setResult
(
map
);
result
.
setSuccess
(
true
);
return
result
;
...
...
fm-product/src/main/java/com/skua/modules/business/service/IOlympicCenterService.java
查看文件 @
af6e532
...
...
@@ -30,7 +30,7 @@ public interface IOlympicCenterService {
Map
<
String
,
Object
>
getRealTimeDataToUENew
();
Map
<
String
,
Object
>
getRealDataToUENew
();
Map
<
String
,
Object
>
getRealDataToUENew
(
AlarmParams
alarmParams
);
List
<
Map
<
String
,
Object
>>
getFlowData
(
String
equipId
);
...
...
fm-product/src/main/java/com/skua/modules/business/service/impl/OlympicCenterServiceImpl.java
查看文件 @
af6e532
...
...
@@ -1090,20 +1090,25 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
* 获取30秒内报警数据
* @return
*/
public
Map
<
String
,
Object
>
getNowAlarmData
(){
public
Map
<
String
,
Object
>
getNowAlarmData
(
AlarmParams
alarmParams
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
int
minute
=
10
;
if
(
alarmParams
.
getMinute
()!=
0
){
minute
=
alarmParams
.
getMinute
();
}
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Date
now
=
new
Date
();
Date
before
=
new
Date
(
now
.
getTime
()
-
3
0
*
1000
);
Date
before
=
new
Date
(
now
.
getTime
()
-
minute
*
6
0
*
1000
);
JdbcTemplate
alarmDB
=
(
JdbcTemplate
)
SpringContextUtils
.
getBean
(
"mysql-alarm"
);
List
<
Map
<
String
,
Object
>>
list
=
alarmDB
.
queryForList
(
"select DISTINCT alarm_param_code as alarmCode from alert_record_history "
+
" where handle_status = 0 "
+
" and alarm_param_code like '"
+
AT_ID
+
"_%' "
+
" and record_time between '"
+
dateFormat
.
format
(
before
)+
"' and '"
+
dateFormat
.
format
(
now
)+
"' "
+
" ORDER BY record_time"
);
if
(
list
.
size
()>
0
){
for
(
Map
<
String
,
Object
>
bean
:
list
)
{
if
(
bean
.
get
(
"alarm
_param_c
ode"
)!=
null
){
map
.
put
(
bean
.
get
(
"alarm
_param_c
ode"
).
toString
(),
"abnormal"
);
if
(
bean
.
get
(
"alarm
C
ode"
)!=
null
){
map
.
put
(
bean
.
get
(
"alarm
C
ode"
).
toString
(),
"abnormal"
);
}
}
return
map
;
...
...
@@ -1113,13 +1118,15 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
}
@Override
public
Map
<
String
,
Object
>
getRealDataToUENew
()
{
public
Map
<
String
,
Object
>
getRealDataToUENew
(
AlarmParams
alarmParams
)
{
List
<
WhatStructData
>
list
=
whatStructDataMapper
.
getListForUENew
();
List
<
WhatStructData
>
fList
=
new
ArrayList
<>();
List
<
WhatStructData
>
otherList
=
new
ArrayList
<>();
// List<Map<String, Object>> alarmList = new ArrayList<>();
// alarmList = getAlarmList(alarmParams);//报警记录
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
monitorMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
alarmMap
=
getNowAlarmData
();
Map
<
String
,
Object
>
alarmMap
=
getNowAlarmData
(
alarmParams
);
String
pgField
=
""
;
for
(
WhatStructData
whatStructData:
list
)
{
pgField
=
pgField
+
","
+
whatStructData
.
getMonitorId
();
...
...
@@ -1875,7 +1882,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
@Override
public
List
<
Map
<
String
,
Object
>>
getAlarmList
(
AlarmParams
alarmParams
)
{
int
minute
=
1
;
int
minute
=
1
0
;
if
(
alarmParams
.
getMinute
()!=
0
){
minute
=
alarmParams
.
getMinute
();
}
...
...
@@ -1886,8 +1893,10 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
// System.out.println("之前的时间为:" + dateFormat.format(before));
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
JdbcTemplate
alarmDB
=
(
JdbcTemplate
)
SpringContextUtils
.
getBean
(
"mysql-alarm"
);
list
=
alarmDB
.
queryForList
(
"select alarm_content as alarmContent from alert_record_history "
+
list
=
alarmDB
.
queryForList
(
"select alarm_content as alarmContent,alarm_param_code as alarmParamCode "
+
" from alert_record_history "
+
" where handle_status = 0 "
+
" and alarm_param_code like '"
+
AT_ID
+
"_%' "
+
" and record_time between '"
+
dateFormat
.
format
(
before
)+
"' and '"
+
dateFormat
.
format
(
now
)+
"' "
+
" ORDER BY record_time"
);
return
list
;
...
...
fm-product/src/main/java/com/skua/modules/location/service/impl/YwLocationServiceImpl.java
查看文件 @
af6e532
...
...
@@ -18,7 +18,8 @@ public class YwLocationServiceImpl implements ILocationService {
private
static
final
String
username
=
"ywsjh"
;
//人员定位账号
private
static
final
String
password
=
"ywsjh@2023"
;
//人员定位密码
private
static
final
String
url
=
"http://xylie.tpddns.cn:8084/YWSJH/"
;
// private static final String url = "http://xylie.tpddns.cn:8084/YWSJH/";//代理地址
private
static
final
String
url
=
"http://10.0.210.115:8084//YWSJH/"
;
//内网
//**********************人员定位坐标***************************
private
static
final
Double
DW_X
=
3990.0
;
//定位系统层X坐标
private
static
final
Double
DW_Y
=
-
1683.0
;
//定位系统层Y坐标
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论