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
2ee8fac5
Commit
2ee8fac5
authored
Nov 18, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询管网压力最高最低阈值
parent
b336bb18
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
1 deletion
+35
-1
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+9
-1
EquipmentSpecificMapper.java
...m/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
+2
-0
IEquipmentSpecificSerivce.java
...eejoin/equipmanage/service/IEquipmentSpecificSerivce.java
+2
-0
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+4
-0
EquipmentSpecificMapper.xml
...uip/src/main/resources/mapper/EquipmentSpecificMapper.xml
+18
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
2ee8fac5
...
...
@@ -54,6 +54,9 @@ public class SupervisionConfigureController extends AbstractBaseController {
@Autowired
private
IEquipmentSpecificIndexSerivce
equipmentSpecificIndexService
;
@Autowired
private
IEquipmentSpecificSerivce
equipmentSpecificService
;
@Autowired
private
IEquipmentSpecificAlarmService
equipmentSpecificAlarmService
;
...
...
@@ -628,12 +631,15 @@ public class SupervisionConfigureController extends AbstractBaseController {
Map
<
String
,
Object
>
map
=
fireFightingSystemMapper
.
selectEquipmentSpecificById
(
equipmentSpecificId
);
String
name
=
""
;
String
code
=
""
;
String
type
=
""
;
if
(
String
.
valueOf
(
map
.
get
(
"equipment_code"
)).
indexOf
(
"92011000"
)
!=
-
1
)
{
name
=
"管网压力"
;
code
=
"gwyl"
;
type
=
"PipePressure"
;
}
else
if
(
String
.
valueOf
(
map
.
get
(
"equipment_code"
)).
indexOf
(
"92011100"
)
!=
-
1
)
{
name
=
"水池液位"
;
code
=
"scyw"
;
type
=
"PoolLevel"
;
}
if
(
ObjectUtils
.
isEmpty
(
map
)
||
ObjectUtils
.
isEmpty
(
map
.
get
(
"iot_code"
)))
{
return
CommonResponseUtil
.
success
(
null
);
...
...
@@ -688,11 +694,13 @@ public class SupervisionConfigureController extends AbstractBaseController {
// }
// return item;
// }).collect(Collectors.toList());
List
<
Map
<
String
,
Object
>>
resList
=
new
ArrayList
<>();
Map
<
String
,
Object
>
threshold
=
equipmentSpecificService
.
getThreshold
(
type
,
equipmentSpecificId
);
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"name"
,
name
);
map1
.
put
(
"xData"
,
res
.
stream
().
map
(
x
->
x
.
get
(
"time"
)).
collect
(
Collectors
.
toList
()));
map1
.
put
(
"yData"
,
res
.
stream
().
map
(
x
->
x
.
get
(
"value"
)).
collect
(
Collectors
.
toList
()));
map1
.
put
(
"threshold"
,
threshold
);
Map
<
String
,
Object
>
resMap
=
new
HashMap
<>();
resMap
.
put
(
code
,
map1
);
return
CommonResponseUtil
.
success
(
resMap
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/EquipmentSpecificMapper.java
View file @
2ee8fac5
...
...
@@ -346,4 +346,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
Integer
selectEquipmentCountBySystemId
(
@Param
(
"systemId"
)
Long
systemId
);
Map
<
String
,
Object
>
getThreshold
(
@Param
(
"type"
)
String
type
,
@Param
(
"equipmentSpecificId"
)
String
equipmentSpecificId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IEquipmentSpecificSerivce.java
View file @
2ee8fac5
...
...
@@ -329,4 +329,6 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
Page
<
Map
<
String
,
Object
>>
getFireEquipListByDefineCode
(
String
code
,
String
equipStatus
,
String
bizOrgCode
,
Page
<
Map
<
String
,
Object
>>
pageBean
);
void
updateCarStatus
(
String
status
,
String
carId
);
Map
<
String
,
Object
>
getThreshold
(
String
type
,
String
equipmentSpecificId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
2ee8fac5
...
...
@@ -2306,4 +2306,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
return
pageBean
;
}
@Override
public
Map
<
String
,
Object
>
getThreshold
(
String
type
,
String
equipmentSpecificId
)
{
return
equipmentSpecificMapper
.
getThreshold
(
type
,
equipmentSpecificId
);
}
}
amos-boot-system-equip/src/main/resources/mapper/EquipmentSpecificMapper.xml
View file @
2ee8fac5
...
...
@@ -2999,4 +2999,21 @@
</if>
</select>
<select
id=
"getThreshold"
resultType=
"java.util.Map"
>
SELECT
<if
test=
"type == 'PipePressure'"
>
MAX( CASE WHEN b.field_name = 'maxPressure' THEN b.field_value END ) AS maxThreshold,
MAX( CASE WHEN b.field_name = 'minPressure' THEN b.field_value END ) AS minThreshold
</if>
<if
test=
"type == 'PoolLevel'"
>
MAX( CASE WHEN b.field_name = 'maxLevel' THEN b.field_value END ) AS maxThreshold,
MAX( CASE WHEN b.field_name = 'minLevel' THEN b.field_value END ) AS minThreshold
</if>
FROM
wl_equipment_specific AS a
LEFT JOIN wl_form_instance_equip b ON a.id = b.instance_id
WHERE
a.id = #{equipmentSpecificId}
</select>
</mapper>
\ No newline at end of file
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