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
38bedb55
Commit
38bedb55
authored
Jun 28, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.新增接口:查询装备下的画布及设备头信息
parent
0970fef0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
16 deletions
+55
-16
ConfirmAlarmController.java
...eejoin/equipmanage/controller/ConfirmAlarmController.java
+22
-13
SourceSceneMapper.java
...ava/com/yeejoin/equipmanage/mapper/SourceSceneMapper.java
+1
-0
IConfirmAlarmService.java
...com/yeejoin/equipmanage/service/IConfirmAlarmService.java
+2
-0
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+19
-3
SourceSceneMapper.xml
...tem-equip/src/main/resources/mapper/SourceSceneMapper.xml
+11
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/ConfirmAlarmController.java
View file @
38bedb55
...
...
@@ -14,6 +14,7 @@ import org.springframework.http.MediaType;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
...
...
@@ -37,7 +38,7 @@ public class ConfirmAlarmController extends AbstractBaseController {
@GetMapping
(
value
=
"/getDetailsById"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"根据id,type查询确警页面相关数据"
)
public
Map
<
String
,
Object
>
getDetailsById
(
@RequestParam
Long
alamId
,
@RequestParam
(
required
=
false
)
Long
equipId
,
@RequestParam
(
required
=
false
)
String
type
,
@RequestParam
String
area
)
{
public
Map
<
String
,
Object
>
getDetailsById
(
@RequestParam
Long
alamId
,
@RequestParam
(
required
=
false
)
Long
equipId
,
@RequestParam
(
required
=
false
)
String
type
,
@RequestParam
String
area
)
{
return
iConfirmAlarmService
.
getDetailsById
(
alamId
,
equipId
,
type
,
area
);
}
...
...
@@ -63,30 +64,38 @@ public class ConfirmAlarmController extends AbstractBaseController {
@GetMapping
(
value
=
"/getFireAlarm"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"未处理消防告警"
)
public
Map
<
String
,
Object
>
getFireAlarm
()
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"FireAlarmNum"
,
iConfirmAlarmService
.
getFireAlarm
().
intValue
());
return
map
;
public
Map
<
String
,
Object
>
getFireAlarm
()
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"FireAlarmNum"
,
iConfirmAlarmService
.
getFireAlarm
().
intValue
());
return
map
;
}
@GetMapping
(
value
=
"/getFaultAlarm"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"未处理故障告警"
)
public
Map
<
String
,
Object
>
getFaultAlarm
()
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"FaultAlarmNum"
,
iConfirmAlarmService
.
getFaultAlarm
().
intValue
());
public
Map
<
String
,
Object
>
getFaultAlarm
()
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
map
.
put
(
"FaultAlarmNum"
,
iConfirmAlarmService
.
getFaultAlarm
().
intValue
());
return
map
;
}
@GetMapping
(
value
=
"/getMonitorEvent"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"未处理物联告警"
)
public
Map
<
String
,
Object
>
getMonitorEvent
()
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
public
Map
<
String
,
Object
>
getMonitorEvent
()
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
LambdaQueryWrapper
<
MonitorEvent
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
MonitorEvent:
:
getEventState
,
"未处理"
);
int
monitorEventNum
=
monitorEventService
.
getBaseMapper
().
selectCount
(
queryWrapper
);
map
.
put
(
"monitorEventNum"
,
monitorEventNum
);
queryWrapper
.
eq
(
MonitorEvent:
:
getEventState
,
"未处理"
);
int
monitorEventNum
=
monitorEventService
.
getBaseMapper
().
selectCount
(
queryWrapper
);
map
.
put
(
"monitorEventNum"
,
monitorEventNum
);
return
map
;
}
@GetMapping
(
value
=
"/{equipmentSpecificId}/relation"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询设备画布及关联摄像头信息"
)
public
Map
<
String
,
Object
>
getEquipSceneAndRelationVideo
(
@PathVariable
Long
equipmentSpecificId
)
{
return
iConfirmAlarmService
.
getEquipSceneAndRelationVideo
(
equipmentSpecificId
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/SourceSceneMapper.java
View file @
38bedb55
...
...
@@ -12,4 +12,5 @@ import com.yeejoin.equipmanage.common.entity.SourceScene;
public
interface
SourceSceneMapper
extends
BaseMapper
<
SourceScene
>
{
SourceScene
queryEquipmentScene
(
Long
equipmentSpecificId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IConfirmAlarmService.java
View file @
38bedb55
...
...
@@ -29,4 +29,6 @@ public interface IConfirmAlarmService extends IService<EquipmentSpecificAlarm> {
* 未处理物联告警
*/
Integer
getFaultAlarm
();
Map
<
String
,
Object
>
getEquipSceneAndRelationVideo
(
Long
equipmentSpecificId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
38bedb55
...
...
@@ -58,9 +58,6 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
@Autowired
private
ISyncDataService
syncDataService
;
@Autowired
MqttSendGateway
mqttSendGateway
;
@Autowired
...
...
@@ -109,6 +106,9 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
@Autowired
private
IFormInstanceService
instanceService
;
@Autowired
private
SourceSceneMapper
sourceSceneMapper
;
@Override
public
Map
<
String
,
Object
>
getDetailsById
(
Long
alarmId
,
Long
equipId
,
String
type
,
String
area
)
{
final
String
videoType
=
"video"
;
...
...
@@ -293,6 +293,22 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
return
confirmAlarmMapper
.
getFaultAlarm
();
}
@Override
public
Map
<
String
,
Object
>
getEquipSceneAndRelationVideo
(
Long
equipmentSpecificId
)
{
Map
<
String
,
Object
>
res
=
new
HashMap
<>();
// 设备关联的摄像头
List
<
AlamVideoVO
>
video
=
videoMapper
.
getVideoBySpeId
(
equipmentSpecificId
);
video
.
forEach
(
action
->
{
action
.
setVedioFormat
(
vedioFormat
);
action
.
setUrl
(
videoService
.
getVideoUrl
(
action
.
getName
(),
action
.
getPresetPosition
(),
action
.
getUrl
(),
action
.
getCode
()));
});
res
.
put
(
"video"
,
video
);
// 设备所在楼层画布
SourceScene
scene
=
sourceSceneMapper
.
queryEquipmentScene
(
equipmentSpecificId
);
res
.
put
(
"scene"
,
scene
);
return
res
;
}
// public void sendIotSystemAlarm(EquipmentSpecificAlarmLog ent, String userId, String appKey, String product, String token){
//// Token serverToken = remoteSecurityService.getServerToken();
// ResponseModel<List<UserDto>> responseModel = null;
...
...
amos-boot-system-equip/src/main/resources/mapper/SourceSceneMapper.xml
View file @
38bedb55
...
...
@@ -2,4 +2,15 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.equipmanage.mapper.SourceSceneMapper"
>
<select
id=
"queryEquipmentScene"
resultType=
"com.yeejoin.equipmanage.common.entity.SourceScene"
>
SELECT
sou.id,
sou.scene_id
FROM
wl_source_scene sou
WHERE
find_in_set(#{equipmentSpecificId},sou.point_in_scene)>0
and EXISTS (SELECT distinct fi.instance_id from wl_form_instance fi where fi.instance_id = sou.source_id)
limit 1
</select>
</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