Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
f56dffa2
Commit
f56dffa2
authored
May 20, 2020
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据上传保存接口
parent
84608603
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
12 deletions
+47
-12
Alarm.java
.../src/main/java/com/yeejoin/amos/fas/dao/entity/Alarm.java
+13
-0
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+7
-0
IAlarmDao.java
...m/yeejoin/amos/fas/business/dao/repository/IAlarmDao.java
+1
-1
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+4
-4
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+3
-1
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+9
-1
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+5
-5
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+5
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/Alarm.java
View file @
f56dffa2
...
...
@@ -21,54 +21,67 @@ public class Alarm extends BasicEntity {
/**
* 消防设备id
*/
@Column
(
name
=
"fire_equipment_id"
)
private
Long
fireEquipmentId
;
/**
* 消防设备名称
*/
@Column
(
name
=
"fire_equipment_name"
)
private
String
fireEquipmentName
;
/**
* 消防设备编码
*/
@Column
(
name
=
"fire_equipment_code"
)
private
String
fireEquipmentCode
;
/**
* 消防点位id
*/
@Column
(
name
=
"fire_equipment_point_id"
)
private
Long
fireEquipmentPointId
;
/**
* 消防点位名称
*/
@Column
(
name
=
"fire_equipment_point_name"
)
private
String
fireEquipmentPointName
;
/**
* 消防点位编码
*/
@Column
(
name
=
"fire_equipment_point_code"
)
private
String
fireEquipmentPointCode
;
/**
* 消防点位上传值
*/
@Column
(
name
=
"fire_equipment_point_value"
)
private
String
fireEquipmentPointValue
;
/**
* 发生频率
*/
@Column
(
name
=
"frequency"
)
private
int
frequency
=
1
;
/**
* 告警状态
*/
@Column
(
name
=
"status"
)
private
Boolean
status
=
true
;
/**
* 报警类型:alarm_type_fire(火灾报警)/alarm_type_trouble(故障告警)
*/
@Column
(
name
=
"type"
)
private
String
type
;
/**
* 创建时间
*/
@Column
(
name
=
"create_date"
)
private
Date
createDate
=
new
Date
();
/**
* 更新时间
*/
@Column
(
name
=
"update_date"
)
private
Date
updateDate
=
new
Date
();
/**
* 告警恢复时间
*/
@Column
(
name
=
"recovery_date"
)
private
Date
recoveryDate
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
f56dffa2
...
...
@@ -45,6 +45,13 @@ public interface View3dMapper extends BaseMapper{
* @return Long
*/
Long
countCheckException
(
Map
<
String
,
Object
>
param
);
/**
* 统计故障告警数量(不合格、漏检)-日期+机构
* @param param
* @return
*/
Long
countFireException
(
Map
<
String
,
Object
>
param
);
/**
* 今日安全指数详情
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IAlarmDao.java
View file @
f56dffa2
...
...
@@ -7,5 +7,5 @@ import com.yeejoin.amos.fas.dao.entity.Alarm;
@Repository
(
"iAlarmDao"
)
public
interface
IAlarmDao
extends
BaseDao
<
Alarm
,
Long
>
{
Alarm
findBy
FireEquipmentCodeAndStatusTru
e
(
String
code
);
Alarm
findBy
StatusTrueAndFireEquipmentPointCod
e
(
String
code
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
f56dffa2
...
...
@@ -457,10 +457,10 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Override
public
EquipCommunicationData
findFireEquipmentByPointCode
(
String
code
)
{
EquipCommunicationData
data
=
(
EquipCommunicationData
)
redisTemplate
.
opsForHash
().
get
(
"fireEquipData"
,
code
);
if
(
ObjectUtils
.
isEmpty
(
data
))
{
data
=
fireEquipMapper
.
findOneByPointCode
(
code
);
}
//
EquipCommunicationData data = (EquipCommunicationData) redisTemplate.opsForHash().get("fireEquipData", code);
//
if (ObjectUtils.isEmpty(data)) {
EquipCommunicationData
data
=
fireEquipMapper
.
findOneByPointCode
(
code
);
//
}
return
data
;
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
f56dffa2
...
...
@@ -848,8 +848,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
private
void
saveFireEquipmentData
(
FireEquipmentPoint
fireEquipmentPoint
,
FireEquipment
fireEquipment
,
AlarmParam
deviceData
,
String
fireEquipmentPointType
)
{
if
(
"alarm_type_fire"
.
equals
(
fireEquipmentPointType
)
||
"alarm_type_trouble"
.
equals
(
fireEquipmentPointType
)){
Alarm
alarm
=
iAlarmDao
.
findBy
FireEquipmentCodeAndStatusTru
e
(
deviceData
.
getPointCode
());
Alarm
alarm
=
iAlarmDao
.
findBy
StatusTrueAndFireEquipmentPointCod
e
(
deviceData
.
getPointCode
());
if
(
alarm
!=
null
){
alarm
.
setFireEquipmentPointValue
(
deviceData
.
getState
());
if
(
"false"
.
equals
(
deviceData
.
getState
())){
alarm
.
setRecoveryDate
(
new
Date
());
alarm
.
setStatus
(
false
);
...
...
@@ -882,6 +883,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
fireEquipmentData
.
setFireEquipmentPointId
(
fireEquipmentPoint
.
getId
());
fireEquipmentData
.
setFireEquipmentId
(
fireEquipmentPoint
.
getFireEquipmentId
());
fireEquipmentData
.
setType
(
"monitor"
);
iFireEquipmentDataDao
.
save
(
fireEquipmentData
);
Map
<
String
,
Object
>
content
=
new
HashMap
<>();
content
.
put
(
"id"
,
fireEquipmentData
.
getId
());
content
.
put
(
"label"
,
fireEquipmentData
.
getEqPointName
());
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
f56dffa2
...
...
@@ -105,6 +105,7 @@ public class View3dServiceImpl implements IView3dService {
private
IDataRefreshService
iDataRefreshService
;
@Autowired
private
RiskSourceMapper
riskSourceMapper
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -305,7 +306,7 @@ public class View3dServiceImpl implements IView3dService {
//3.统计巡检异常数量(不合格、漏检)-日期+机构
Long
checkExceptionNum
=
this
.
getCheckExceptionNum
(
orgCode
,
date
);
vo
.
setCheckExceptionNum
(
checkExceptionNum
);
//4.统计
火灾报警
数量-日期+机构
//4.统计
故障
数量-日期+机构
//TODO:待毛颖确认调整完成后继续
vo
.
setFireExceptionNum
(
0L
);
}
else
{
...
...
@@ -377,6 +378,13 @@ public class View3dServiceImpl implements IView3dService {
param
.
put
(
"date"
,
date
);
return
view3dMapper
.
countUpperRiskPoint
(
param
);
}
private
Long
getFireExceptionNum
(
String
orgCode
,
String
date
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"orgCode"
,
orgCode
);
params
.
put
(
"date"
,
date
);
return
view3dMapper
.
countFireException
(
params
);
}
private
double
changeRpnToSafetyIndex
(
BigDecimal
rpn
)
{
BigDecimal
rpnBig
=
rpn
==
null
?
new
BigDecimal
(
"0"
)
:
rpn
;
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
f56dffa2
...
...
@@ -240,7 +240,7 @@
add COLUMN `flicker_frequency` int(11) DEFAULT 0 COMMENT '闪烁频率' after `status`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"158944479291
1
-1"
>
<changeSet
author=
"maoying"
id=
"158944479291
4
-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"f_alarm"
/>
</preConditions>
...
...
@@ -251,9 +251,10 @@
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`org_code` varchar(100) NOT NULL COMMENT '机构编号',
`fire_equipment_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '消防设备id',
`fire_equipment_code` varchar(255) NOT NULL COMMENT '设备编码',
`fire_equipment_name` varchar(255) NOT NULL COMMENT '设备名称',
`fire_equpment_point_id` bigint(20) NOT NULL COMMENT '消防点位id',
`fire_equpment_point_code` varchar(255) NOT NULL COMMENT '消防点位名称',
`fire_equ
i
pment_point_id` bigint(20) NOT NULL COMMENT '消防点位id',
`fire_equ
i
pment_point_code` varchar(255) NOT NULL COMMENT '消防点位名称',
`fire_equipment_point_name` varchar(255) NOT NULL,
`fire_equipment_point_value` varchar(500) DEFAULT NULL COMMENT '报警值',
`frequency` int(10) NOT NULL DEFAULT '1' COMMENT '发生频次',
...
...
@@ -262,8 +263,7 @@
`create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`recovery_date` datetime DEFAULT NULL COMMENT '告警恢复时间',
PRIMARY KEY (`id`),
UNIQUE KEY `type_index` (`type`) USING HASH
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='报警信息表';
</sql>
</changeSet>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
f56dffa2
...
...
@@ -436,6 +436,11 @@
) pt
where #{date} BETWEEN pt.begin_date and pt.end_date
</select>
<select
id=
"countFireException"
resultType=
"long"
>
</select>
<select
id=
"getAllErrorRiskPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo"
>
SELECT
b.id,
...
...
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