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
b0471502
Commit
b0471502
authored
Jun 11, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
efecf9f3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
230 additions
and
16 deletions
+230
-16
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+4
-2
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+1
-1
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+8
-2
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+2
-2
IView3dService.java
...ejoin/amos/fas/business/service/intfc/IView3dService.java
+2
-1
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+213
-8
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
b0471502
...
...
@@ -209,10 +209,11 @@ public class View3dController extends BaseController {
@ApiOperation
(
value
=
"初始化三维视图节点"
,
notes
=
"初始化三维视图节点"
)
public
CommonResponse
init3dViewNode
(
@ApiParam
(
value
=
"节点类型"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
type
,
@ApiParam
(
value
=
"区域ID"
,
required
=
false
)
@RequestParam
(
required
=
false
)
Long
riskSourceId
)
{
@ApiParam
(
value
=
"区域ID"
,
required
=
false
)
@RequestParam
(
required
=
false
)
Long
riskSourceId
,
@ApiParam
(
value
=
"异常状态"
,
required
=
false
)
@RequestParam
(
required
=
false
)
Boolean
abnormalStatus
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
find3dViewDataByType
(
type
,
riskSourceId
,
orgCode
));
return
CommonResponseUtil
.
success
(
view3dService
.
find3dViewDataByType
(
type
,
riskSourceId
,
orgCode
,
abnormalStatus
));
}
@PostMapping
(
value
=
"/retrieve/all"
,
produces
=
"application/json;charset=UTF-8"
)
...
...
@@ -225,6 +226,7 @@ public class View3dController extends BaseController {
String
token
=
this
.
getToken
();
String
appKey
=
this
.
getAppKey
();
String
product
=
this
.
getProduct
();
return
view3dService
.
retrieveAll
(
params
.
getType
(),
params
.
getInputText
(),
params
.
getCurrent
(),
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
b0471502
...
...
@@ -144,7 +144,7 @@ public interface View3dMapper extends BaseMapper{
*/
List
<
View3dNodeVo
>
initViewErrorNode
(
String
type
,
Long
riskSourceId
,
String
orgCode
);
List
<
Node3DVoResponse
>
findViewDataByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"riskSourceId"
)
Long
riskSourceId
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
Node3DVoResponse
>
findViewDataByType
(
@Param
(
"type"
)
String
type
,
@Param
(
"riskSourceId"
)
Long
riskSourceId
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"abnormalStatus"
)
Boolean
abnormalStatus
);
Long
retrieveAllCount
(
String
type
,
String
inputText
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
b0471502
...
...
@@ -1304,8 +1304,14 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
return
;
}
Fmea
caluFmea
=
fmeaMapper
.
getById
(
fmeaId
);
Integer
rpnDiffer
=
caluFmea
.
getRpn
().
intValue
()-
caluFmea
.
getRpni
().
intValue
();
String
checkStatus
=
jpushMsgBo
.
getMsg
().
getCheckStatus
();
Integer
rpnDiffer
=
0
;
if
(
caluFmea
!=
null
)
{
rpnDiffer
=
caluFmea
.
getRpn
().
intValue
()-
caluFmea
.
getRpni
().
intValue
();
}
String
checkStatus
=
""
;
if
(
jpushMsgBo
!=
null
)
{
checkStatus
=
jpushMsgBo
.
getMsg
().
getCheckStatus
();
}
BigDecimal
rpn
=
rpnValueBo
.
getRpn
();
BigDecimal
rpni
=
rpnValueBo
.
getRpni
();
List
<
RiskLevel
>
levels
=
riskLevelDao
.
findAll
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
b0471502
...
...
@@ -558,8 +558,8 @@ public class View3dServiceImpl implements IView3dService {
}
@Override
public
List
<
Node3DVoResponse
>
find3dViewDataByType
(
String
type
,
Long
riskSourceId
,
String
orgCode
)
{
return
view3dMapper
.
findViewDataByType
(
type
,
riskSourceId
,
orgCode
);
public
List
<
Node3DVoResponse
>
find3dViewDataByType
(
String
type
,
Long
riskSourceId
,
String
orgCode
,
Boolean
abnormalStatus
)
{
return
view3dMapper
.
findViewDataByType
(
type
,
riskSourceId
,
orgCode
,
abnormalStatus
);
}
@Override
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IView3dService.java
View file @
b0471502
...
...
@@ -140,10 +140,11 @@ public interface IView3dService {
* 3维异常点查询
* @param type
* @param orgCode
* @param abnormalStatus 异常状态
* @param riskSourceId区域id
* @return
*/
List
<
Node3DVoResponse
>
find3dViewDataByType
(
String
type
,
Long
riskSourceId
,
String
orgCode
);
List
<
Node3DVoResponse
>
find3dViewDataByType
(
String
type
,
Long
riskSourceId
,
String
orgCode
,
Boolean
abnormalStatus
);
/**
* 检索
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
b0471502
...
...
@@ -115,7 +115,7 @@
AND B.id is not null
</when>
<when
test=
"type == 'fireEquipment'"
>
select tmp.id,tmp.name,tmp.type,tmp.position3d,tmp.ue4_rotation,tmp.ue4_location,tmp.code,R.parent_id,
select tmp.id,tmp.name,tmp.type,tmp.position3d,tmp.ue4_rotation,tmp.ue4_location,tmp.code,R.
id as
parent_id,
<choose>
<when
test=
"channelType == '3dpage'"
>
IF(ISNULL(tmp.position3d) || LENGTH(trim(tmp.position3d))
<![CDATA[ <]]>
1,0,1) as isBind
...
...
@@ -131,6 +131,7 @@
union all
select id,name,'fireEquipment' as type,position3d,code,ue4_location,ue4_rotation,risk_source_id
from f_fire_equipment
where equip_classify =3
union all
select id,name,CASE
WHEN S.type = 1 then 'fireChamber'
...
...
@@ -855,7 +856,9 @@
rs.position3d IS NOT NULL
AND rs.position3d != ''
AND rs.risk_level_id is not null
AND rs.is_region
<![CDATA[<>]]>
'TRUE'
<if
test=
"abnormalStatus != false"
>
AND rs.is_region
<![CDATA[<>]]>
'TRUE'
</if>
AND rs.status = 'ANOMALY'
UNION ALL
SELECT
...
...
@@ -901,10 +904,12 @@
position3d IS NOT NULL
AND eq.risk_source_id in (select id from f_risk_source where is_region='TRUE')
AND position3d != ''
AND eq.id in
(select equipment_id from f_equipment_fire_equipment fefe
left join f_fire_equipment fe ON fe.id = fefe.fire_equipment_id
where fe.equip_status = 1)
<if
test=
"abnormalStatus != false"
>
AND eq.id in
(select equipment_id from f_equipment_fire_equipment fefe
left join f_fire_equipment fe ON fe.id = fefe.fire_equipment_id
where fe.equip_status = 1)
</if>
UNION ALL
select
p.id,
...
...
@@ -952,16 +957,216 @@
p_point p
left join f_risk_source rs on p.risk_source_id = rs.id AND rs.is_region='TRUE'
where rs.id is not null
AND p.status in ('0','2','3')
<if
test=
"abnormalStatus != false"
>
AND p.status in ('0','2','3')
</if>
AND p.coordinates != '' AND p.coordinates is not null
UNION ALL
select
fe.id,
fe.is_indoor as inDoor,
case
when fe.equip_classify = 0 then CONCAT('monitorEquipment',fe.id)
when fe.equip_classify = 2 then CONCAT('video',fe.id)
when fe.equip_classify = 3 then CONCAT('fireEquipment',fe.id)
end as `key`,
fe.name,
'' as LEVEL,
'' as levelStr,
CONCAT('floor',fe.floor3d) as objKey,
CASE
WHEN (
ISNULL(fe.position3d) || LENGTH(trim(fe.position3d))
<![CDATA[ <]]>
1
) THEN
NULL
ELSE
CONCAT(
'{"x":',
substring_index(fe.position3d, ',', 1),
',"y":',
substring_index(
substring_index(fe.position3d, ',', - 2),
',',
1
),
',"z":',
substring_index(fe.position3d, ',', - 1),
'}'
)
END positionDTO,
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
false as `showInfo`,
fe.name as title,
case
when fe.equip_classify = 0 then 'monitorEquipment'
when fe.equip_classify = 2 then 'video'
when fe.equip_classify = 3 then 'fireEquipment'
end as type,
fe.org_code as orgCode,
fe.risk_source_id as riskSourceId,
0 as frequency,
false as twinkle
from
f_fire_equipment fe
left join f_risk_source rs on fe.risk_source_id = rs.id AND rs.is_region='TRUE'
where rs.id is not null
<if
test=
"abnormalStatus != false"
>
AND fe.equip_status = 1
</if>
AND fe.equip_classify in (0,2,3)
AND fe.position3d != '' AND fe.position3d is not null
UNION ALL
select
c.id,
c.is_indoor as inDoor,
CONCAT('fireCar',c.id) as `key`,
c.name,
'' as LEVEL,
'' as levelStr,
CONCAT('floor',c.floor3d) as objKey,
CASE
WHEN (
ISNULL(c.position3d) || LENGTH(trim(c.position3d))
<![CDATA[ <]]>
1
) THEN
NULL
ELSE
CONCAT(
'{"x":',
substring_index(c.position3d, ',', 1),
',"y":',
substring_index(
substring_index(c.position3d, ',', - 2),
',',
1
),
',"z":',
substring_index(c.position3d, ',', - 1),
'}'
)
END positionDTO,
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
false as `showInfo`,
c.name as title,
'fireCar' as type,
c.org_code as orgCode,
c.risk_source_id as riskSourceId,
0 as frequency,
false as twinkle
from f_fire_car c
left join f_risk_source rs on c.risk_source_id = rs.id AND rs.is_region='TRUE'
where rs.id is not null
AND c.position3d != '' AND c.position3d is not null
UNION ALL
select
s.id,
s.is_indoor as inDoor,
case
when S.type = 1 then CONCAT('fireChamber',s.id)
when S.type = 2 then CONCAT('fireFoamRoom',s.id)
end as `key`,
s.name,
'' as LEVEL,
'' as levelStr,
CONCAT('floor',s.floor3d) as objKey,
CASE
WHEN (
ISNULL(s.position3d) || LENGTH(trim(s.position3d))
<![CDATA[ <]]>
1
) THEN
NULL
ELSE
CONCAT(
'{"x":',
substring_index(s.position3d, ',', 1),
',"y":',
substring_index(
substring_index(s.position3d, ',', - 2),
',',
1
),
',"z":',
substring_index(s.position3d, ',', - 1),
'}'
)
END positionDTO,
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
false as `showInfo`,
s.name as title,
case
when S.type = 1 then 'fireChamber'
when S.type = 2 then 'fireFoamRoom'
end as type,
s.org_code as orgCode,
s.risk_source_id as riskSourceId,
0 as frequency,
false as twinkle
from
f_fire_station s
left join f_risk_source rs on s.risk_source_id = rs.id AND rs.is_region='TRUE'
where rs.id is not null
AND s.position3d != '' AND s.position3d is not null
UNION ALL
select
w.id,
w.is_indoor as inDoor,
case
when w.type = 1 then CONCAT('hydrant',w.id)
when w.type = 2 then CONCAT('pool',w.id)
end as `key`,
w.name,
'' as LEVEL,
'' as levelStr,
CONCAT('floor',w.floor3d) as objKey,
CASE
WHEN (
ISNULL(w.position3d) || LENGTH(trim(w.position3d))
<![CDATA[ <]]>
1
) THEN
NULL
ELSE
CONCAT(
'{"x":',
substring_index(w.position3d, ',', 1),
',"y":',
substring_index(
substring_index(w.position3d, ',', - 2),
',',
1
),
',"z":',
substring_index(w.position3d, ',', - 1),
'}'
)
END positionDTO,
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
false as `showInfo`,
w.name as title,
case
when w.type = 1 then 'hydrant'
when w.type = 2 then 'pool'
end as type,
w.org_code as orgCode,
w.risk_source_id as riskSourceId,
0 as frequency,
false as twinkle
from
f_water_resource w
left join f_risk_source rs on w.risk_source_id = rs.id AND rs.is_region='TRUE'
where rs.id is not null
AND w.position3d != '' AND w.position3d is not null
) temp
WHERE 1=1
<if
test=
"riskSourceId != null"
>
AND FIND_IN_SET(temp.riskSourceId,queryRiskSourceChildrenIds(#{riskSourceId}))
</if>
<if
test=
"type != null"
>
<if
test=
"type != null
and type !='fireResource'
"
>
AND temp.type = #{type}
</if>
<if
test=
"type == 'fireResource'"
>
AND temp.type in ('fireCar','fireEquipment','fireChamber','fireFoamRoom','hydrant','pool')
</if>
<if
test=
"orgCode != null"
>
AND temp.orgCode = #{orgCode}
</if>
...
...
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