Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
fmboot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
c2f21995
由
张雷
编写于
2023-05-09 11:26:12 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
奥体项目实时数据增加累计流量
1 个父辈
49d66248
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
66 行增加
和
6 行删除
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/impl/OlympicCenterServiceImpl.java
fm-product/src/main/java/com/skua/modules/business/mapper/WhatStructDataMapper.java
查看文件 @
c2f2199
...
...
@@ -12,5 +12,7 @@ public interface WhatStructDataMapper {
List
<
WhatStructData
>
getList
();
List
<
WhatStructData
>
getListForUE
();
WhatStructData
getOneById
(
@Param
(
"id"
)
String
id
);
}
...
...
fm-product/src/main/java/com/skua/modules/business/mapper/xml/WhatStructDataMapper.xml
查看文件 @
c2f2199
...
...
@@ -6,6 +6,10 @@
select * from what_struct_data
</select>
<select
id=
"getListForUE"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data where equip_type in ('flow','pressure','temperature')
</select>
<select
id=
"getOneById"
resultType=
"com.skua.modules.business.entity.WhatStructData"
>
select * from what_struct_data where id = #{id} limit 1
</select>
...
...
fm-product/src/main/java/com/skua/modules/business/service/impl/OlympicCenterServiceImpl.java
查看文件 @
c2f2199
...
...
@@ -39,6 +39,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
Map
<
String
,
Object
>
monitorMap
=
new
HashMap
<>();
List
<
WhatStructData
>
pybList
=
new
ArrayList
<>();
List
<
WhatStructData
>
fybList
=
new
ArrayList
<>();
List
<
WhatStructData
>
ljbList
=
new
ArrayList
<>();
List
<
WhatStructData
>
wybList
=
new
ArrayList
<>();
List
<
TextResult
>
pList
=
new
ArrayList
<>();
List
<
TextResult
>
fList
=
new
ArrayList
<>();
...
...
@@ -55,6 +56,8 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
pybList
.
add
(
whatStructData
);
}
else
if
(
"flow"
.
equals
(
whatStructData
.
getEquipType
())){
fybList
.
add
(
whatStructData
);
}
else
if
(
"flow_ljll"
.
equals
(
whatStructData
.
getEquipType
())){
ljbList
.
add
(
whatStructData
);
}
else
if
(
"temperature"
.
equals
(
whatStructData
.
getEquipType
())){
wybList
.
add
(
whatStructData
);
}
else
{
}
...
...
@@ -73,7 +76,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
if
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
())==
null
){
textResult
.
setValue
(
"--"
);
}
else
{
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
()).
toString
())/
100
0
);
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
()).
toString
())/
100
);
textResult
.
setValue
(
String
.
valueOf
(
pResult
));
}
}
else
{
...
...
@@ -97,6 +100,21 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
}
fList
.
add
(
j
,
textResult
);
}
for
(
int
k
=
0
;
k
<
8
;
k
++)
{
TextResult
textResult
=
new
TextResult
();
if
(
k
<
ljbList
.
size
()){
textResult
.
setTitle
(
ljbList
.
get
(
k
).
getId
());
if
(
monitorMap
.
get
(
ljbList
.
get
(
k
).
getMonitorId
())==
null
){
textResult
.
setValue
(
"--"
);
}
else
{
textResult
.
setValue
(
monitorMap
.
get
(
ljbList
.
get
(
k
).
getMonitorId
()).
toString
());
}
}
else
{
textResult
.
setTitle
(
"flow_ljll"
+(
k
+
1
));
textResult
.
setValue
(
"--"
);
}
fList
.
add
(
textResult
);
}
map
.
put
(
"pressure"
,
pList
);
map
.
put
(
"flow"
,
fList
);
}
else
if
(
"hot"
.
equals
(
sourceType
)){
//压力10流量4温度4;
...
...
@@ -107,7 +125,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
if
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
())==
null
){
textResult
.
setValue
(
"--"
);
}
else
{
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
()).
toString
())/
100
0
);
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
()).
toString
())/
100
);
textResult
.
setValue
(
String
.
valueOf
(
pResult
));
}
}
else
{
...
...
@@ -131,6 +149,21 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
}
fList
.
add
(
j
,
textResult
);
}
for
(
int
h
=
0
;
h
<
4
;
h
++)
{
TextResult
textResult
=
new
TextResult
();
if
(
h
<
ljbList
.
size
()){
textResult
.
setTitle
(
ljbList
.
get
(
h
).
getId
());
if
(
monitorMap
.
get
(
ljbList
.
get
(
h
).
getMonitorId
())==
null
){
textResult
.
setValue
(
"--"
);
}
else
{
textResult
.
setValue
(
monitorMap
.
get
(
ljbList
.
get
(
h
).
getMonitorId
()).
toString
());
}
}
else
{
textResult
.
setTitle
(
"flow_ljll"
+(
h
+
1
));
textResult
.
setValue
(
"--"
);
}
fList
.
add
(
textResult
);
}
for
(
int
k
=
0
;
k
<
4
;
k
++)
{
TextResult
textResult
=
new
TextResult
();
if
(
k
<
wybList
.
size
()){
...
...
@@ -157,7 +190,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
if
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
())==
null
){
textResult
.
setValue
(
"--"
);
}
else
{
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
()).
toString
())/
100
0
);
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
()).
toString
())/
100
);
textResult
.
setValue
(
String
.
valueOf
(
pResult
));
}
}
else
{
...
...
@@ -181,6 +214,21 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
}
fList
.
add
(
j
,
textResult
);
}
for
(
int
k
=
0
;
k
<
2
;
k
++)
{
TextResult
textResult
=
new
TextResult
();
if
(
k
<
ljbList
.
size
()){
textResult
.
setTitle
(
ljbList
.
get
(
k
).
getId
());
if
(
monitorMap
.
get
(
ljbList
.
get
(
k
).
getMonitorId
())==
null
){
textResult
.
setValue
(
"--"
);
}
else
{
textResult
.
setValue
(
monitorMap
.
get
(
ljbList
.
get
(
k
).
getMonitorId
()).
toString
());
}
}
else
{
textResult
.
setTitle
(
"flow_ljll"
+(
k
+
1
));
textResult
.
setValue
(
"--"
);
}
fList
.
add
(
textResult
);
}
map
.
put
(
"pressure"
,
pList
);
map
.
put
(
"flow"
,
fList
);
}
else
{
...
...
@@ -196,6 +244,12 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
textResult
.
setValue
(
"0.00"
);
fList
.
add
(
j
,
textResult
);
}
for
(
int
h
=
0
;
h
<
14
;
h
++)
{
TextResult
textResult
=
new
TextResult
();
textResult
.
setTitle
(
"flow_ljll"
+(
h
+
1
));
textResult
.
setValue
(
"0.00"
);
fList
.
add
(
h
,
textResult
);
}
for
(
int
k
=
0
;
k
<
4
;
k
++)
{
TextResult
textResult
=
new
TextResult
();
textResult
.
setTitle
(
"temperature"
+(
k
+
1
));
...
...
@@ -333,7 +387,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
EchartResult
echartResult
=
new
EchartResult
();
echartResult
.
setName
(
map
.
get
(
"time"
).
toString
());
if
(
"p"
.
equals
(
type
)){
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
map
.
get
(
whatStructData
.
getMonitorId
()).
toString
())/
100
0
);
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
map
.
get
(
whatStructData
.
getMonitorId
()).
toString
())/
100
);
echartResult
.
setValue
(
String
.
valueOf
(
pResult
));
echartResult
.
setSeries
(
"压力表"
);
}
else
if
(
"f"
.
equals
(
type
)){
...
...
@@ -463,7 +517,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
@Override
public
Map
<
String
,
Object
>
getRealTimeDataToUE
()
{
List
<
WhatStructData
>
list
=
whatStructDataMapper
.
getList
();
List
<
WhatStructData
>
list
=
whatStructDataMapper
.
getList
ForUE
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
monitorMap
=
new
HashMap
<>();
String
pgField
=
""
;
...
...
@@ -476,7 +530,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
for
(
WhatStructData
whatStructData:
list
)
{
if
(
whatStructData
.
getMonitorId
()!=
null
){
if
(
"pressure"
.
equals
(
whatStructData
.
getEquipType
())){
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
()).
toString
())/
100
0
);
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
()).
toString
())/
100
);
map
.
put
(
whatStructData
.
getId
(),
String
.
valueOf
(
pResult
));
}
else
{
map
.
put
(
whatStructData
.
getId
(),
monitorMap
.
get
(
whatStructData
.
getMonitorId
()));
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论