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
5c9d1dc1
Commit
5c9d1dc1
authored
Nov 15, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交直流中心统计接口
parent
ed5a85ad
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
117 additions
and
3 deletions
+117
-3
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+11
-0
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+4
-0
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+2
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+36
-1
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+64
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
5c9d1dc1
...
@@ -902,4 +902,15 @@ public class FireFightingSystemController extends AbstractBaseController {
...
@@ -902,4 +902,15 @@ public class FireFightingSystemController extends AbstractBaseController {
public
Object
getSystemAlarmInfoList
(
@RequestParam
(
required
=
false
)
String
startDate
,
@RequestParam
(
required
=
false
)
String
endDate
)
throws
Exception
{
public
Object
getSystemAlarmInfoList
(
@RequestParam
(
required
=
false
)
String
startDate
,
@RequestParam
(
required
=
false
)
String
endDate
)
throws
Exception
{
return
fireFightingSystemService
.
getSystemAlarmInfoList
(
startDate
,
endDate
);
return
fireFightingSystemService
.
getSystemAlarmInfoList
(
startDate
,
endDate
);
}
}
/**
* 获取消防系统总体运行情况
* @throws Exception
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取消防系统告警状态信息"
,
notes
=
"获取消防系统告警状态信息"
)
@GetMapping
(
value
=
"/running/info"
)
public
Object
getSystemRunningInfoList
()
throws
Exception
{
return
fireFightingSystemService
.
getSystemRunningInfoList
();
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
5c9d1dc1
...
@@ -617,4 +617,8 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
...
@@ -617,4 +617,8 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
List
<
Map
<
String
,
Object
>>
getSystemInfoList
();
List
<
Map
<
String
,
Object
>>
getSystemInfoList
();
List
<
Map
<
String
,
Object
>>
getSystemAlarmInfoList
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
List
<
Map
<
String
,
Object
>>
getSystemAlarmInfoList
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
List
<
Map
<
String
,
Object
>>
getSystemCountInfo
();
Map
<
String
,
Object
>
getSystemRunningInfoList
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
5c9d1dc1
...
@@ -293,4 +293,6 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
...
@@ -293,4 +293,6 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
List
<
Map
<
String
,
Object
>>
getSystemInfoList
();
List
<
Map
<
String
,
Object
>>
getSystemInfoList
();
List
<
Map
<
String
,
Object
>>
getSystemAlarmInfoList
(
String
startDate
,
String
endDate
);
List
<
Map
<
String
,
Object
>>
getSystemAlarmInfoList
(
String
startDate
,
String
endDate
);
List
<
Map
<
String
,
Object
>>
getSystemRunningInfoList
();
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
5c9d1dc1
...
@@ -2028,7 +2028,11 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -2028,7 +2028,11 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
List
<
Map
<
String
,
Object
>>
list1
=
new
ArrayList
();
List
<
Map
<
String
,
Object
>>
list1
=
new
ArrayList
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
x
.
get
(
"status"
));
map
.
put
(
"name"
,
x
.
get
(
"status"
));
map
.
put
(
"level"
,
"success"
);
if
(
"正常"
.
equals
(
String
.
valueOf
(
x
.
get
(
"status"
))))
{
map
.
put
(
"level"
,
"success"
);
}
else
{
map
.
put
(
"level"
,
"failure"
);
}
list1
.
add
(
map
);
list1
.
add
(
map
);
x
.
put
(
"status"
,
list1
);
x
.
put
(
"status"
,
list1
);
});
});
...
@@ -2040,4 +2044,35 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -2040,4 +2044,35 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
public
List
<
Map
<
String
,
Object
>>
getSystemAlarmInfoList
(
String
startDate
,
String
endDate
)
{
public
List
<
Map
<
String
,
Object
>>
getSystemAlarmInfoList
(
String
startDate
,
String
endDate
)
{
return
fireFightingSystemMapper
.
getSystemAlarmInfoList
(
startDate
,
endDate
);
return
fireFightingSystemMapper
.
getSystemAlarmInfoList
(
startDate
,
endDate
);
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
getSystemRunningInfoList
()
{
List
<
Map
<
String
,
Object
>>
list
=
fireFightingSystemMapper
.
getSystemCountInfo
();
Map
<
String
,
Object
>
alarmNumMap
=
fireFightingSystemMapper
.
getSystemRunningInfoList
();
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
if
(
0
<
list
.
size
())
{
list
.
forEach
(
x
->
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
if
(
SystemTypeEnum
.
fireWaterSys
.
getCode
().
equals
(
String
.
valueOf
(
x
.
get
(
"systemTypeCode"
))))
{
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireWaterSys
.
getDesc
());
resultMap
.
put
(
"total"
,
x
.
get
(
"sysTotalNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"waterSysNum"
));
}
else
if
(
SystemTypeEnum
.
fireCAFSSys
.
getCode
().
equals
(
String
.
valueOf
(
x
.
get
(
"systemTypeCode"
))))
{
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireCAFSSys
.
getDesc
());
resultMap
.
put
(
"total"
,
x
.
get
(
"sysTotalNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"cafsSysNum"
));
}
else
if
(
SystemTypeEnum
.
fireAlarmSys
.
getCode
().
equals
(
String
.
valueOf
(
x
.
get
(
"systemTypeCode"
))))
{
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireAlarmSys
.
getDesc
());
resultMap
.
put
(
"total"
,
x
.
get
(
"sysTotalNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"fireAlarmSysNum"
));
}
else
{
resultMap
.
put
(
"name"
,
SystemTypeEnum
.
fireONLSys
.
getDesc
());
resultMap
.
put
(
"total"
,
x
.
get
(
"sysTotalNum"
));
resultMap
.
put
(
"alarmNum"
,
alarmNumMap
.
get
(
"onlSysNum"
));
}
resultList
.
add
(
resultMap
);
});
}
return
resultList
;
}
}
}
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
5c9d1dc1
...
@@ -5213,7 +5213,69 @@
...
@@ -5213,7 +5213,69 @@
) AS `value`
) AS `value`
FROM
FROM
`f_fire_fighting_system` `fs`
`f_fire_fighting_system` `fs`
-- where
where
-- fs.system_type_code IS NOT NULL
fs.system_type_code IS NOT NULL
</select>
<select
id=
"getSystemCountInfo"
resultType=
"java.util.Map"
>
SELECT
fs.`name`,
fs.system_type_code AS systemTypeCode,
COUNT(1) AS sysNum
FROM
`f_fire_fighting_system` `fs`
WHERE fs.system_type_code IS NOT NULL AND fs.system_type_code IN ('fireWaterSys', 'fireCAFSSys', 'fireAlarmSys', 'fireONLSys')
GROUP BY fs.system_type_code
</select>
<select
id=
"getSystemRunningInfoList"
resultType=
"java.util.Map"
>
SELECT
(
SELECT
COUNT( DISTINCT fs.id )
FROM
`f_fire_fighting_system` `fs`
LEFT JOIN `wl_equipment_specific` `wes` ON 0
<![CDATA[<>]]>
find_in_set( `fs`.`id`, `wes`.`system_id` )
LEFT JOIN `wl_equipment_specific_index` `wesi` ON wesi.equipment_specific_id = wes.id
WHERE
fs.system_type_code IS NOT NULL
AND fs.system_type_code = 'fireWaterSys'
AND ( wesi.is_alarm = 1 AND wesi.`value` = 'true' OR wesi.is_alarm = 0 AND wesi.`value` = 'false' )
) waterSysNum,
(
SELECT
COUNT( DISTINCT fs.id )
FROM
`f_fire_fighting_system` `fs`
LEFT JOIN `wl_equipment_specific` `wes` ON 0
<![CDATA[<>]]>
find_in_set( `fs`.`id`, `wes`.`system_id` )
LEFT JOIN `wl_equipment_specific_index` `wesi` ON wesi.equipment_specific_id = wes.id
WHERE
fs.system_type_code IS NOT NULL
AND fs.system_type_code = 'fireCAFSSys'
AND ( wesi.is_alarm = 1 AND wesi.`value` = 'true' OR wesi.is_alarm = 0 AND wesi.`value` = 'false' )
) cafsSysNum,
(
SELECT
COUNT( DISTINCT fs.id )
FROM
`f_fire_fighting_system` `fs`
LEFT JOIN `wl_equipment_specific` `wes` ON 0
<![CDATA[<>]]>
find_in_set( `fs`.`id`, `wes`.`system_id` )
LEFT JOIN `wl_equipment_specific_index` `wesi` ON wesi.equipment_specific_id = wes.id
WHERE
fs.system_type_code IS NOT NULL
AND fs.system_type_code = 'fireAlarmSys'
AND ( wesi.is_alarm = 1 AND wesi.`value` = 'true' OR wesi.is_alarm = 0 AND wesi.`value` = 'false' )
) fireAlarmSysNum,
(
SELECT
COUNT( DISTINCT fs.id )
FROM
`f_fire_fighting_system` `fs`
LEFT JOIN `wl_equipment_specific` `wes` ON 0
<![CDATA[<>]]>
find_in_set( `fs`.`id`, `wes`.`system_id` )
LEFT JOIN `wl_equipment_specific_index` `wesi` ON wesi.equipment_specific_id = wes.id
WHERE
fs.system_type_code IS NOT NULL
AND fs.system_type_code = 'fireONLSys'
AND ( wesi.is_alarm = 1 AND wesi.`value` = 'true' OR wesi.is_alarm = 0 AND wesi.`value` = 'false' )
) onlSysNum
</select>
</select>
</mapper>
</mapper>
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