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
e8fa7dd2
Commit
e8fa7dd2
authored
Feb 29, 2020
by
taabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3维点闪烁频次修改
parent
2b7d6730
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
34 deletions
+62
-34
Node3dVoMapper.java
.../yeejoin/amos/fas/business/dao/mapper/Node3dVoMapper.java
+1
-1
Node3dVoServiceImpl.java
...n/amos/fas/business/service/impl/Node3dVoServiceImpl.java
+10
-3
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+18
-2
Node3dVoService.java
...join/amos/fas/business/service/intfc/Node3dVoService.java
+1
-1
dbTemplate_node3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_node3d.xml
+32
-27
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/Node3dVoMapper.java
View file @
e8fa7dd2
...
...
@@ -19,7 +19,7 @@ public interface Node3dVoMapper extends BaseMapper {
/**
* 风险点数据同步--更新
*/
Integer
incrementalUpdateRiskSource
(
@Param
(
"rsId"
)
Long
rsId
);
Integer
incrementalUpdateRiskSource
(
@Param
(
"rsId"
)
Long
rsId
,
@Param
(
"frequency"
)
Integer
frequency
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/Node3dVoServiceImpl.java
View file @
e8fa7dd2
...
...
@@ -81,7 +81,7 @@ public class Node3dVoServiceImpl implements Node3dVoService {
result
=
node3dVoMapper
.
incrementalUpdateImpEqumt
(
null
);
break
;
case
DATATYPE_RISKSOURCE:
result
=
node3dVoMapper
.
incrementalUpdateRiskSource
(
null
);
result
=
node3dVoMapper
.
incrementalUpdateRiskSource
(
null
,
null
);
break
;
case
DATATYPE_FIRECAR:
result
=
node3dVoMapper
.
incrementalUpdateFireCar
(
null
);
...
...
@@ -119,7 +119,7 @@ public class Node3dVoServiceImpl implements Node3dVoService {
break
;
case
DATATYPE_RISKSOURCE:
result
+=
node3dVoMapper
.
incrementalCreateRiskSource
(
null
)==
null
?
0
:
node3dVoMapper
.
incrementalCreateRiskSource
(
null
);
result
+=
node3dVoMapper
.
incrementalUpdateRiskSource
(
null
)==
null
?
0
:
node3dVoMapper
.
incrementalUpdateRiskSource
(
null
);
result
+=
node3dVoMapper
.
incrementalUpdateRiskSource
(
null
,
null
)==
null
?
0
:
node3dVoMapper
.
incrementalUpdateRiskSource
(
null
,
null
);
result
+=
node3dVoMapper
.
incrementalDeleteRiskSource
(
null
)==
null
?
0
:
node3dVoMapper
.
incrementalDeleteRiskSource
(
null
);
break
;
case
DATATYPE_FIRECAR:
...
...
@@ -158,7 +158,7 @@ public class Node3dVoServiceImpl implements Node3dVoService {
//风险点
result
+=
node3dVoMapper
.
incrementalCreateRiskSource
(
null
)==
null
?
0
:
node3dVoMapper
.
incrementalCreateRiskSource
(
null
);
result
+=
node3dVoMapper
.
incrementalUpdateRiskSource
(
null
)==
null
?
0
:
node3dVoMapper
.
incrementalUpdateRiskSource
(
null
);
result
+=
node3dVoMapper
.
incrementalUpdateRiskSource
(
null
,
null
)==
null
?
0
:
node3dVoMapper
.
incrementalUpdateRiskSource
(
null
,
null
);
result
+=
node3dVoMapper
.
incrementalDeleteRiskSource
(
null
)==
null
?
0
:
node3dVoMapper
.
incrementalDeleteRiskSource
(
null
);
//消防车
...
...
@@ -182,6 +182,13 @@ public class Node3dVoServiceImpl implements Node3dVoService {
return
result
;
}
@Override
public
Integer
updateByRiskSourceId
(
Long
riskSourceId
,
Integer
frequency
)
{
Integer
result
=
0
;
result
=
node3dVoMapper
.
incrementalUpdateRiskSource
(
riskSourceId
,
frequency
);
return
result
;
}
@Async
@Override
public
Integer
syncData
(
Callable
<
Integer
>
callable
)
throws
Exception
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
e8fa7dd2
...
...
@@ -489,7 +489,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
List
<
RiskSource
>
riskSources
=
this
.
riskSourceMapper
.
queryByFireEqument
(
deviceData
.
getFireEquimentId
());
//asymbleWithParent(batchNo, riskSources, FireEquimentDataRo.class.getSimpleName(), deviceData.getFireEquimentId(), deviceData.getNodeState(), null, null);
alermContingency
(
deviceData
.
getBatchNo
(),
fireEquipment
,
equipment
);
try
{
alermContingency
(
deviceData
.
getBatchNo
(),
fireEquipment
,
equipment
);
}
catch
(
Exception
e
)
{
log
.
error
(
"调用规则失败"
,
e
);
}
}
}
...
...
@@ -1132,7 +1136,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
Object
canBeRunning
=
redisTemplate
.
opsForValue
().
get
(
cacheKeyForCanBeRunning
());
if
(
canBeRunning
==
null
)
{
alermContingency
(
batchNo
,
fireEquipment
,
equipment
);
try
{
alermContingency
(
batchNo
,
fireEquipment
,
equipment
);
}
catch
(
Exception
e
)
{
log
.
error
(
"调用规则失败"
,
e
);
}
}
else
{
redisTemplate
.
expire
(
cacheKeyForCanBeRunning
(),
24
*
60
*
60
,
TimeUnit
.
SECONDS
);
}
...
...
@@ -1652,6 +1660,14 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
riskSourceRuleRo
.
setRpni
(
rpni
);
riskSourceRuleRo
.
setLevelChangeType
(
changeType
);
riskSourceRuleRo
.
setNotifyType
(
notifyType
);
BigDecimal
rg
=
rpnr
.
subtract
(
rpni
);
Integer
frequency
=
0
;
if
(
"up"
.
equals
(
changeType
)
&&
rg
.
intValue
()
>
0
)
{
frequency
=
3
;
}
else
if
(
"no"
.
equals
(
changeType
)
&&
rg
.
intValue
()
>
0
)
{
frequency
=
1
;
}
node3dVoService
.
updateByRiskSourceId
(
riskSourceRuleRo
.
getId
(),
frequency
);
try
{
remoteRuleServer
.
fireRule
(
riskSourceRuleRo
,
"风险管控/riskSource"
);
}
catch
(
Exception
e
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/Node3dVoService.java
View file @
e8fa7dd2
...
...
@@ -50,7 +50,7 @@ public interface Node3dVoService {
*/
Integer
wholeIncremental
();
Integer
updateByRiskSourceId
(
Long
riskSourceId
,
Integer
frequency
);
Integer
syncData
(
Callable
<
Integer
>
callable
)
throws
Exception
;
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_node3d.xml
View file @
e8fa7dd2
...
...
@@ -30,7 +30,8 @@
(select rl.`level` from f_risk_level rl where rl.id = rs.risk_level_id)data_level,
rs.`code` data_code,
null protect_obj_name,
null route_name
null route_name,
0 frequency
from f_risk_source rs
where
<choose>
...
...
@@ -41,7 +42,7 @@
not EXISTS(select 1 from toip_biz_node3dvo bn where bn.type = 'riskSource' and bn.oid = rs.`id`) ;
</otherwise>
</choose>
</select>
<select
id=
"incrementalDeleteRiskSource"
resultType=
"java.lang.Integer"
>
...
...
@@ -77,34 +78,10 @@
);
</otherwise>
</choose>
</select>
<select
id=
"incrementalUpdateRiskSource"
resultType=
"java.lang.Integer"
>
UPDATE
toip_biz_node3dvo AS bn
JOIN f_risk_source AS rs
ON bn.oid = rs.id
SET
bn.config = CONCAT('{"isIndoor":',CASE rs.is_indoor WHEN 1 THEN 'true' WHEN 0 THEN 'false' END,',"belongObjModel":"floor_',rs.floor3d,'"}'),
bn.org_code = rs.org_code,
bn.position = CASE WHEN (ISNULL(rs.position3d) || LENGTH(trim(rs.position3d))
<![CDATA[<]]>
1) THEN NULL ELSE CONCAT('{"x":',substring_index(rs.position3d,',', 1),',"y":',substring_index(substring_index(rs.position3d,',', -2), ',', 1),',"z":',substring_index(rs.position3d,',', -1),'}') END,
bn.data_level = (select rl.`level` from f_risk_level rl where rl.id = rs.risk_level_id),
bn.data_code = rs.`code`,
bn.display_name = rs.`name`
WHERE
bn.type = 'riskSource'
<if
test=
"rsId !=null"
>
and rs.id = #{rsId}
</if>
</select>
<select
id=
"incrementalCreateFierEqumt"
resultType=
"java.lang.Integer"
>
INSERT INTO toip_biz_node3dvo
select
...
...
@@ -153,7 +130,35 @@
fe.equip_classify in (0,2,3) and not EXISTS(select 1 from toip_biz_node3dvo bn where bn.type in ('fireEquipment','video','monitorEquipment') and bn.oid = fe.`id`) ;
</otherwise>
</choose>
</select>
<select
id=
"incrementalUpdateRiskSource"
resultType=
"java.lang.Integer"
>
UPDATE
toip_biz_node3dvo AS bn
JOIN f_risk_source AS rs
ON bn.oid = rs.id
SET
bn.config = CONCAT('{"isIndoor":',CASE rs.is_indoor WHEN 1 THEN 'true' WHEN 0 THEN 'false' END,',"belongObjModel":"floor_',rs.floor3d,'"}'),
bn.org_code = rs.org_code,
bn.position = CASE WHEN (ISNULL(rs.position3d) || LENGTH(trim(rs.position3d))
<![CDATA[<]]>
1) THEN NULL ELSE CONCAT('{"x":',substring_index(rs.position3d,',', 1),',"y":',substring_index(substring_index(rs.position3d,',', -2), ',', 1),',"z":',substring_index(rs.position3d,',', -1),'}') END,
bn.data_level = (select rl.`level` from f_risk_level rl where rl.id = rs.risk_level_id),
bn.data_code = rs.`code`,
bn.display_name = rs.`name`,
<if
test=
"frequency != null"
>
bn.frequency = #{frequency},
</if>
bn.node_state = rs.rpn
WHERE
bn.type = 'riskSource'
<if
test=
"rsId !=null"
>
and rs.id = #{rsId}
</if>
</select>
<select
id=
"incrementalDeleteFierEqumt"
resultType=
"java.lang.Integer"
>
...
...
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