Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
fmboot
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
d5379162
由
张雷
编写于
2023-06-20 17:45:56 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
奥体项目增加返回数据短数的情况判断
1 个父辈
62ce9588
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
68 行增加
和
11 行删除
fm-product/src/main/java/com/skua/modules/business/service/impl/OlympicCenterServiceImpl.java
fm-product/src/main/java/com/skua/modules/monitor/service/impl/FmPgQueryServiceImpl.java
fm-product/src/main/java/com/skua/modules/business/service/impl/OlympicCenterServiceImpl.java
查看文件 @
d537916
...
...
@@ -77,8 +77,12 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
if
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
())==
null
){
textResult
.
setValue
(
"--"
);
}
else
{
if
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
())!=
null
){
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
()).
toString
())*
Double
.
parseDouble
(
pybList
.
get
(
i
).
getMonitorZoom
()));
textResult
.
setValue
(
String
.
valueOf
(
pResult
));
}
else
{
textResult
.
setValue
(
"--"
);
}
}
}
else
{
textResult
.
setTitle
(
"pressure"
+(
i
+
1
));
...
...
@@ -537,10 +541,18 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
for
(
WhatStructData
whatStructData:
list
)
{
if
(
whatStructData
.
getMonitorId
()!=
null
){
if
(
"pressure"
.
equals
(
whatStructData
.
getEquipType
())){
if
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
())!=
null
){
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
()).
toString
())*
Double
.
parseDouble
(
whatStructData
.
getMonitorZoom
()));
map
.
put
(
whatStructData
.
getId
(),
String
.
valueOf
(
pResult
));
}
else
{
map
.
put
(
whatStructData
.
getId
(),
"--"
);
}
}
else
{
if
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
())!=
null
){
map
.
put
(
whatStructData
.
getId
(),
monitorMap
.
get
(
whatStructData
.
getMonitorId
()));
}
else
{
map
.
put
(
whatStructData
.
getId
(),
"--"
);
}
}
}
else
{
map
.
put
(
whatStructData
.
getId
(),
"--"
);
...
...
@@ -591,15 +603,19 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
if
(
monitorList
.
size
()==
1
){
monitorMap
=
monitorList
.
get
(
0
);
if
(
"feed"
.
equals
(
sourceType
)){
//压力14流量8
for
(
int
i
=
0
;
i
<
1
4
;
i
++)
{
for
(
int
i
=
0
;
i
<
1
5
;
i
++)
{
TextResult
textResult
=
new
TextResult
();
if
(
i
<
pybList
.
size
()){
textResult
.
setTitle
(
pybList
.
get
(
i
).
getId
());
if
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
())==
null
){
textResult
.
setValue
(
"--"
);
}
else
{
if
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
())!=
null
){
double
pResult
=
formatDouble
(
Double
.
parseDouble
(
monitorMap
.
get
(
pybList
.
get
(
i
).
getMonitorId
()).
toString
())*
Double
.
parseDouble
(
pybList
.
get
(
i
).
getMonitorZoom
()));
textResult
.
setValue
(
String
.
valueOf
(
pResult
));
}
else
{
textResult
.
setValue
(
"--"
);
}
}
}
else
{
textResult
.
setTitle
(
"pressure"
+(
i
+
1
));
...
...
@@ -616,7 +632,11 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
if
(
j
<
fybList
.
size
()){
flow
.
setTitle
(
fybList
.
get
(
j
).
getEquipType
());
if
(
fybList
.
get
(
j
).
getMonitorId
()!=
null
){
if
(
monitorMap
.
get
(
fybList
.
get
(
j
).
getMonitorId
())!=
null
){
flow
.
setValue
(
monitorMap
.
get
(
fybList
.
get
(
j
).
getMonitorId
()).
toString
());
}
else
{
flow
.
setValue
(
"--"
);
}
flowList
.
add
(
flow
);
String
equipCode
=
fybList
.
get
(
j
).
getEquipCode
();
int
fcount
=
0
;
...
...
@@ -625,12 +645,20 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
if
(
equipCode
.
equals
(
whatStructData
.
getEquipCode
())){
if
(
"flow_ljll"
.
equals
(
whatStructData
.
getEquipType
())){
fFlow
.
setTitle
(
whatStructData
.
getEquipType
());
if
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
())!=
null
){
fFlow
.
setValue
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
()).
toString
());
}
else
{
fFlow
.
setValue
(
"--"
);
}
flowList
.
add
(
fFlow
);
fcount
++;
}
else
if
(
"flow_rljll"
.
equals
(
whatStructData
.
getEquipType
())){
rFlow
.
setTitle
(
whatStructData
.
getEquipType
());
if
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
())!=
null
){
rFlow
.
setValue
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
()).
toString
());
}
else
{
rFlow
.
setValue
(
"--"
);
}
flowList
.
add
(
rFlow
);
fcount
++;
}
else
{}
...
...
@@ -692,7 +720,11 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
if
(
j
<
fybList
.
size
()){
flow
.
setTitle
(
fybList
.
get
(
j
).
getEquipType
());
if
(
fybList
.
get
(
j
).
getMonitorId
()!=
null
){
if
(
monitorMap
.
get
(
fybList
.
get
(
j
).
getMonitorId
())!=
null
){
flow
.
setValue
(
monitorMap
.
get
(
fybList
.
get
(
j
).
getMonitorId
()).
toString
());
}
else
{
flow
.
setValue
(
"--"
);
}
flowList
.
add
(
flow
);
String
equipCode
=
fybList
.
get
(
j
).
getEquipCode
();
int
fcount
=
0
;
...
...
@@ -701,12 +733,20 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
if
(
equipCode
.
equals
(
whatStructData
.
getEquipCode
())){
if
(
"flow_ljll"
.
equals
(
whatStructData
.
getEquipType
())){
fFlow
.
setTitle
(
whatStructData
.
getEquipType
());
if
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
())!=
null
){
fFlow
.
setValue
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
()).
toString
());
}
else
{
fFlow
.
setValue
(
"--"
);
}
flowList
.
add
(
fFlow
);
fcount
++;
}
else
if
(
"flow_rljll"
.
equals
(
whatStructData
.
getEquipType
())){
rFlow
.
setTitle
(
whatStructData
.
getEquipType
());
if
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
())!=
null
){
rFlow
.
setValue
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
()).
toString
());
}
else
{
rFlow
.
setValue
(
"--"
);
}
flowList
.
add
(
rFlow
);
fcount
++;
}
else
{}
...
...
@@ -759,7 +799,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
map
.
put
(
"flow"
,
fList
);
map
.
put
(
"temperature"
,
wList
);
}
else
if
(
"fire"
.
equals
(
sourceType
)){
//压力9流量2.
for
(
int
i
=
0
;
i
<
9
;
i
++)
{
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
TextResult
textResult
=
new
TextResult
();
if
(
i
<
pybList
.
size
()){
textResult
.
setTitle
(
pybList
.
get
(
i
).
getId
());
...
...
@@ -784,7 +824,11 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
if
(
j
<
fybList
.
size
()){
flow
.
setTitle
(
fybList
.
get
(
j
).
getEquipType
());
if
(
fybList
.
get
(
j
).
getMonitorId
()!=
null
){
if
(
monitorMap
.
get
(
fybList
.
get
(
j
).
getMonitorId
())!=
null
){
flow
.
setValue
(
monitorMap
.
get
(
fybList
.
get
(
j
).
getMonitorId
()).
toString
());
}
else
{
flow
.
setValue
(
"--"
);
}
flowList
.
add
(
flow
);
String
equipCode
=
fybList
.
get
(
j
).
getEquipCode
();
int
fcount
=
0
;
...
...
@@ -793,12 +837,20 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
if
(
equipCode
.
equals
(
whatStructData
.
getEquipCode
())){
if
(
"flow_ljll"
.
equals
(
whatStructData
.
getEquipType
())){
fFlow
.
setTitle
(
whatStructData
.
getEquipType
());
if
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
())!=
null
){
fFlow
.
setValue
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
()).
toString
());
}
else
{
fFlow
.
setValue
(
"--"
);
}
flowList
.
add
(
fFlow
);
fcount
++;
}
else
if
(
"flow_rljll"
.
equals
(
whatStructData
.
getEquipType
())){
rFlow
.
setTitle
(
whatStructData
.
getEquipType
());
if
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
())!=
null
){
rFlow
.
setValue
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
()).
toString
());
}
else
{
rFlow
.
setValue
(
"--"
);
}
flowList
.
add
(
rFlow
);
fcount
++;
}
else
{}
...
...
@@ -835,7 +887,7 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
map
.
put
(
"pressure"
,
pList
);
map
.
put
(
"flow"
,
fList
);
}
else
{
for
(
int
i
=
0
;
i
<
3
3
;
i
++)
{
for
(
int
i
=
0
;
i
<
3
5
;
i
++)
{
TextResult
textResult
=
new
TextResult
();
textResult
.
setTitle
(
"pressure"
+(
i
+
1
));
textResult
.
setValue
(
"0.00"
);
...
...
@@ -985,7 +1037,11 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
Map
<
String
,
Object
>
beanMap
=
new
HashMap
<>();
for
(
WhatStructData
bean
:
list
)
{
if
(
bean
.
getId
().
startsWith
(
fId
)){
if
(
monitorMap
.
get
(
bean
.
getMonitorId
())!=
null
){
beanMap
.
put
(
bean
.
getEquipType
(),
monitorMap
.
get
(
bean
.
getMonitorId
()));
}
else
{
beanMap
.
put
(
bean
.
getEquipType
(),
"--"
);
}
}
}
map
.
put
(
fId
,
beanMap
);
...
...
@@ -1210,7 +1266,11 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
List
<
Map
<
String
,
Object
>>
monitorList
=
fmPgQueryService
.
queryFactoryMonitorFromRealTimeData
(
AT_ID
,
pgField
);
if
(
monitorList
.
size
()==
1
){
monitorMap
=
monitorList
.
get
(
0
);
if
(
monitorMap
.
get
(
equipMap
.
get
(
"runtime"
).
toString
())!=
null
){
map
.
put
(
"runtime"
,
monitorMap
.
get
(
equipMap
.
get
(
"runtime"
).
toString
()));
}
else
{
map
.
put
(
"runtime"
,
"--"
);
}
String
equipStatus
=
"停止"
;
if
(
"2"
.
equals
(
equipMap
.
get
(
"show_model"
))){
equipStatus
=
getStatus2
(
monitorMap
,
statusList
,
pumpId
);
...
...
@@ -1264,8 +1324,12 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
map
.
put
(
"status"
,
getStatus2
(
monitorMap
,
list1
,
equipCode
));
map
.
put
(
"signal"
,
"--"
);
if
(
whatStructData
.
getMonitorId
()!=
null
){
if
(
monitorMap
.
get
(
whatStructData
.
getMonitorId
())!=
null
){
map
.
put
(
"runtime"
,
monitorMap
.
get
(
whatStructData
.
getMonitorId
()));
}
else
{
map
.
put
(
"runtime"
,
"--"
);
}
}
else
{
map
.
put
(
"runtime"
,
"--"
);
}
list
.
add
(
map
);
...
...
@@ -1547,13 +1611,6 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService {
}
else
if
(
"f"
.
equals
(
type
)){
for
(
WhatStructData
whatStructData:
wList
)
{
EchartResult
eResult
=
new
EchartResult
();
if
(
"today"
.
equals
(
timeType
)){
datatime
=
datatime
.
substring
(
11
,
16
);
}
else
if
(
"week"
.
equals
(
timeType
)){
datatime
=
datatime
.
substring
(
5
,
16
);
}
else
{
datatime
=
datatime
.
substring
(
5
,
10
);
}
eResult
.
setName
(
datatime
);
if
(
whatStructData
.
getMonitorId
()==
null
){
eResult
.
setValue
(
""
);
...
...
fm-product/src/main/java/com/skua/modules/monitor/service/impl/FmPgQueryServiceImpl.java
查看文件 @
d537916
...
...
@@ -68,7 +68,7 @@ public class FmPgQueryServiceImpl implements IFmPgQueryService {
if
(
Long
.
parseLong
(
monitorList
.
get
(
m
).
get
(
"time"
).
toString
())
>
todayTimeStemp
){
map
.
put
(
monitorList
.
get
(
m
).
get
(
"monitorId"
).
toString
(),
monitorList
.
get
(
m
).
get
(
"monitorValue"
));
}
else
{
map
.
put
(
monitorList
.
get
(
m
).
get
(
"monitorId"
).
toString
(),
0.00
);
map
.
put
(
monitorList
.
get
(
m
).
get
(
"monitorId"
).
toString
(),
null
);
}
}
result
.
add
(
map
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论