Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
ee155f3b
Commit
ee155f3b
authored
Dec 05, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中心大屏水池相关信息一一对应
parent
b5db64eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
20 deletions
+17
-20
PoolStatisticController.java
...ejoin/equipmanage/controller/PoolStatisticController.java
+16
-19
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+1
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/PoolStatisticController.java
View file @
ee155f3b
...
...
@@ -161,31 +161,17 @@ public class PoolStatisticController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取水池统计信息"
,
notes
=
"获取水池统计信息"
)
public
ResponseModel
getWaterInfo
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
List
<
Map
<
String
,
Object
>>
infoList
=
fireFightingSystemMapper
.
getWaterInfoBySuper
(
bizOrgCode
);
List
<
Map
<
String
,
Object
>>
normalList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
abNormalList
=
new
ArrayList
<>();
if
(!
infoList
.
isEmpty
())
{
for
(
Map
<
String
,
Object
>
m
:
infoList
)
{
if
(
StringUtil
.
isNotEmpty
(
IndexStatusEnum
.
getEnumByKey
(
String
.
valueOf
(
m
.
get
(
"status"
)))))
{
if
(
IndexStatusEnum
.
LOW
.
getKey
().
equals
(
String
.
valueOf
(
m
.
get
(
"status"
))))
{
abNormalList
.
add
(
m
);
}
else
if
(
IndexStatusEnum
.
HIGH
.
getKey
().
equals
(
String
.
valueOf
(
m
.
get
(
"status"
))))
{
abNormalList
.
add
(
m
);
}
else
if
(
IndexStatusEnum
.
NORMAL
.
getKey
().
equals
(
String
.
valueOf
(
m
.
get
(
"status"
))))
{
normalList
.
add
(
m
);
}
}
else
{
normalList
.
add
(
m
);
}
}
}
// List<Map<String, Object>> normalList = new ArrayList<>();
// List<Map<String, Object>> abNormalList = new ArrayList<>();
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
pool
=
getPoolInfo
(
infoList
);
Map
<
String
,
Object
>
normalMap
=
new
HashMap
<>();
normalMap
.
put
(
"key"
,
"normal"
);
normalMap
.
put
(
"name"
,
"液位正常"
);
normalMap
.
put
(
"value"
,
normalList
.
size
());
normalMap
.
put
(
"value"
,
pool
.
get
(
"normal"
)
.
size
());
Map
<
String
,
Object
>
abNormalMap
=
new
HashMap
<>();
abNormalMap
.
put
(
"key"
,
"abnormal"
);
abNormalMap
.
put
(
"name"
,
"液位异常"
);
abNormalMap
.
put
(
"value"
,
abNormalList
.
size
());
abNormalMap
.
put
(
"value"
,
infoList
.
size
()
-
pool
.
get
(
"normal"
)
.
size
());
List
<
Map
<
String
,
Object
>>
res
=
new
ArrayList
<>();
res
.
add
(
normalMap
);
res
.
add
(
abNormalMap
);
...
...
@@ -265,6 +251,17 @@ public class PoolStatisticController {
}
else
{
m
.
put
(
"levelAbs"
,
transResult
.
get
(
"abs"
));
}
if
(
StringUtil
.
isNotEmpty
(
IndexStatusEnum
.
getEnumByKey
(
String
.
valueOf
(
transResult
.
get
(
"status"
)))))
{
if
(
IndexStatusEnum
.
LOW
.
getKey
().
equals
(
String
.
valueOf
(
transResult
.
get
(
"status"
))))
{
m
.
put
(
"status"
,
"1"
);
}
else
if
(
IndexStatusEnum
.
HIGH
.
getKey
().
equals
(
String
.
valueOf
(
transResult
.
get
(
"status"
))))
{
m
.
put
(
"status"
,
"1"
);
}
else
{
m
.
put
(
"status"
,
"0"
);
}
}
else
{
m
.
put
(
"status"
,
"0"
);
}
}
page1
.
setRecords
(
res
);
}
...
...
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
ee155f3b
...
...
@@ -4923,7 +4923,7 @@
IFNULL( rp.output_flow_rate, 0 ) AS outputFlowRate,
-- IFNULL(max( CASE WHEN ei.equipment_index_key = 'FHS_FirePoolDevice_WaterLevel' or ei.equipment_index_key = 'FHS_WirelessliquidDetector_WaterLevel' THEN ei.`value` END ),'--') AS nowLevel,
IFNULL((select
avg(
ei.`value`
)
avg(
IFNULL(ei.`value`, 0)
)
from
wl_equipment_specific_index ei
where
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment