Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
fmboot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
98eca395
由
张雷
编写于
2023-04-19 21:48:59 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
奥体项目实时数据接口开发
1 个父辈
42db58e6
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
77 行增加
和
6 行删除
fm-product/src/main/java/com/skua/modules/business/controller/OlympicCenterController.java
fm-product/src/main/java/com/skua/modules/business/mapper/WhatStructDataMapper.java
fm-product/src/main/java/com/skua/modules/business/mapper/xml/WhatStructDataMapper.xml
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-system/src/main/resources/application-dev.yml
fm-system/src/main/resources/application-what.yml
fm-product/src/main/java/com/skua/modules/business/controller/OlympicCenterController.java
查看文件 @
98eca39
...
...
@@ -39,6 +39,16 @@ public class OlympicCenterController {
return
result
;
}
@ApiOperation
(
value
=
"获取整体实时数据给UE"
,
notes
=
"获取整体实时数据给UE"
)
@GetMapping
(
value
=
"/getRealTimeDataToUE"
)
public
Result
<
Map
<
String
,
Object
>>
getRealTimeDataToUE
(){
Result
<
Map
<
String
,
Object
>>
result
=
new
Result
<
Map
<
String
,
Object
>>();
Map
<
String
,
Object
>
map
=
olympicCenterService
.
getRealTimeDataToUE
();
result
.
setResult
(
map
);
result
.
setSuccess
(
true
);
return
result
;
}
/**
* 获取泵站指标历史趋势曲线
* @param field ssll:瞬时流量 ljll:累计流量 rll:日流量
...
...
fm-product/src/main/java/com/skua/modules/business/mapper/WhatStructDataMapper.java
0 → 100644
查看文件 @
98eca39
package
com
.
skua
.
modules
.
business
.
mapper
;
import
com.skua.modules.business.entity.WhatStructData
;
import
java.util.List
;
/**
* 武汉奥体中心接口
*/
public
interface
WhatStructDataMapper
{
List
<
WhatStructData
>
getList
();
}
fm-product/src/main/java/com/skua/modules/business/mapper/xml/WhatStructDataMapper.xml
0 → 100644
查看文件 @
98eca39
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.skua.modules.business.mapper.WhatStructDataMapper"
>
<select
id=
"getList"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data
</select>
</mapper>
\ No newline at end of file
fm-product/src/main/java/com/skua/modules/business/service/IOlympicCenterService.java
查看文件 @
98eca39
...
...
@@ -19,4 +19,6 @@ public interface IOlympicCenterService {
List
<
EchartResult
>
getPressureChart
(
String
equipId
,
String
type
);
Map
<
String
,
Object
>
getBzRealTimeData
(
String
sourceType
);
Map
<
String
,
Object
>
getRealTimeDataToUE
();
}
...
...
fm-product/src/main/java/com/skua/modules/business/service/impl/OlympicCenterServiceImpl.java
查看文件 @
98eca39
package
com
.
skua
.
modules
.
business
.
service
.
impl
;
import
com.skua.core.service.IPgQueryService
;
import
com.skua.modules.business.entity.WhatStructData
;
import
com.skua.modules.business.mapper.WhatStructDataMapper
;
import
com.skua.modules.business.service.IOlympicCenterService
;
import
com.skua.modules.business.vo.EchartResult
;
import
com.skua.modules.business.vo.TextResult
;
import
com.skua.modules.equip.mapper.FmEquipInfoMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -18,6 +21,8 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
// @Autowired
// private IPgQueryService pgQueryService;
@Autowired
private
WhatStructDataMapper
whatStructDataMapper
;
@Override
public
Map
<
String
,
Object
>
getRealTimeData
(
String
sourceType
)
{
...
...
@@ -35,7 +40,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
TextResult
textResult
=
new
TextResult
();
textResult
.
setTitle
(
"压力表"
+(
i
+
1
));
if
(
i
==
8
){
textResult
.
setValue
(
"0.
41
"
);
textResult
.
setValue
(
"0.
04
"
);
}
else
{
textResult
.
setValue
(
"0.00"
);
}
...
...
@@ -91,7 +96,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
TextResult
textResult
=
new
TextResult
();
textResult
.
setTitle
(
"压力表"
+(
i
+
1
));
if
(
i
==
8
){
textResult
.
setValue
(
"0.41"
);
textResult
.
setValue
(
"0.
0
41"
);
}
else
{
textResult
.
setValue
(
"0.00"
);
}
...
...
@@ -258,6 +263,38 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
return
map
;
}
@Override
public
Map
<
String
,
Object
>
getRealTimeDataToUE
()
{
List
<
WhatStructData
>
list
=
whatStructDataMapper
.
getList
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
WhatStructData
>
pAtList
=
new
ArrayList
<>();
List
<
WhatStructData
>
fAtList
=
new
ArrayList
<>();
List
<
WhatStructData
>
wAtList
=
new
ArrayList
<>();
for
(
WhatStructData
whatStructData:
list
)
{
if
(
"pressure"
.
equals
(
whatStructData
.
getEquipType
())){
pAtList
.
add
(
whatStructData
);
}
else
if
(
"flow"
.
equals
(
whatStructData
.
getEquipType
())){
fAtList
.
add
(
whatStructData
);
}
else
if
(
"temperature"
.
equals
(
whatStructData
.
getEquipType
())){
wAtList
.
add
(
whatStructData
);
}
else
{
}
}
for
(
int
i
=
0
;
i
<
pAtList
.
size
();
i
++)
{
if
(
"205"
.
equals
(
pAtList
.
get
(
i
).
getId
())){
map
.
put
(
pAtList
.
get
(
i
).
getId
(),
"0.04"
);
}
else
{
map
.
put
(
pAtList
.
get
(
i
).
getId
(),
"0.00"
);
}
}
for
(
int
j
=
0
;
j
<
fAtList
.
size
();
j
++)
{
map
.
put
(
fAtList
.
get
(
j
).
getId
(),
"0.00"
);
}
for
(
int
k
=
0
;
k
<
wAtList
.
size
();
k
++)
{
map
.
put
(
wAtList
.
get
(
k
).
getId
(),
"--"
);
}
return
map
;
}
public
static
void
main
(
String
[]
args
)
{
for
(
int
i
=
0
;
i
<
24
;
i
++)
{
Calendar
date
=
Calendar
.
getInstance
();
...
...
fm-system/src/main/resources/application-dev.yml
查看文件 @
98eca39
...
...
@@ -98,9 +98,9 @@ spring:
driver-class-name
:
com.mysql.jdbc.Driver
# 多数据源配置
pg-db
:
url
:
jdbc:postgresql://
120.24.205.69
:10086/postgres?useUnicode=true&characterEncoding=UTF8
url
:
jdbc:postgresql://
47.104.99.86
:10086/postgres?useUnicode=true&characterEncoding=UTF8
username
:
postgres
password
:
Sever@3202_Jksc$
password
:
JKjnf9713xt
driver-class-name
:
org.postgresql.Driver
#redis 配置
redis
:
...
...
fm-system/src/main/resources/application-what.yml
查看文件 @
98eca39
...
...
@@ -98,8 +98,8 @@ spring:
driver-class-name
:
com.mysql.jdbc.Driver
# 多数据源配置
pg-db
:
url
:
jdbc:
mysql://192.168.21.6:13306/zhsw_modules?characterEncoding=UTF-8&useUnicode=true&useSSL=false
username
:
root
url
:
jdbc:
postgresql://192.168.21.5:10086/postgres?useUnicode=true&characterEncoding=UTF8
username
:
postgres
password
:
jkauto@123wh
driver-class-name
:
org.postgresql.Driver
#redis 配置
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论