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
669f9a3c
Commit
669f9a3c
authored
May 27, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试接口
parent
4e81a21f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
82 deletions
+49
-82
ContingencyOriginalMapper.java
...os/fas/business/dao/mapper/ContingencyOriginalMapper.java
+4
-2
ContingencyOriginalServiceImpl.java
...business/service/impl/ContingencyOriginalServiceImpl.java
+2
-2
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+4
-0
dbTemplate_contingencyOriginal.xml
...in/resources/db/mapper/dbTemplate_contingencyOriginal.xml
+13
-5
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+26
-73
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/ContingencyOriginalMapper.java
View file @
669f9a3c
...
...
@@ -11,12 +11,14 @@ public interface ContingencyOriginalMapper extends BaseMapper {
Long
queryCountForPage
(
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"createTime"
)
String
createTime
);
@Param
(
"createTime"
)
String
createTime
,
@Param
(
"contingencyName"
)
String
contingencyName
);
List
<
Map
>
queryForPage
(
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"createTime"
)
String
createTime
,
@Param
(
"start"
)
long
start
,
@Param
(
"length"
)
Integer
length
);
@Param
(
"length"
)
Integer
length
,
@Param
(
"contingencyName"
)
String
contingencyName
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyOriginalServiceImpl.java
View file @
669f9a3c
...
...
@@ -50,8 +50,8 @@ public class ContingencyOriginalServiceImpl /*extends GenericManagerImpl<Conting
public
Page
queryForPage
(
String
contingencyName
,
String
equipmentId
,
String
createTime
,
CommonPageable
pageable
)
{
Long
total
=
contingencyOriginalMapper
.
queryCountForPage
(
equipmentId
,
createTime
);
List
<
Map
>
content
=
contingencyOriginalMapper
.
queryForPage
(
equipmentId
,
createTime
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Long
total
=
contingencyOriginalMapper
.
queryCountForPage
(
equipmentId
,
createTime
,
contingencyName
);
List
<
Map
>
content
=
contingencyOriginalMapper
.
queryForPage
(
equipmentId
,
createTime
,
pageable
.
getOffset
(),
pageable
.
getPageSize
()
,
contingencyName
);
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
return
result
;
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
669f9a3c
...
...
@@ -600,10 +600,14 @@ public class View3dServiceImpl implements IView3dService {
List
<
HashMap
<
String
,
Object
>>
retrieveAll
=
view3dMapper
.
retrieveAll
(
type
,
inputText
,
pageable
.
getOffset
(),
pageable
.
getPageSize
(),
orgCode
,
dataLevel
,
protectObjName
);
retrieveAll
.
stream
().
forEach
(
e
->{
String
person
=
(
String
)
e
.
get
(
"person"
);
JSONArray
ue4Location
=
this
.
getInitJSONArray
(
String
.
valueOf
(
e
.
get
(
"ue4Location"
)));
JSONArray
ue4Rotation
=
this
.
getInitJSONArray
(
String
.
valueOf
(
e
.
get
(
"ue4Rotation"
)));
if
(
person
!=
null
&&
!
person
.
equals
(
""
))
{
AgencyUserModel
user
=
remoteSecurityService
.
getUserById
(
token
,
product
,
appKey
,
person
);
e
.
put
(
"person"
,
user
!=
null
?
user
.
getRealName
()
:
""
);
}
e
.
put
(
"ue4Location"
,
ue4Location
);
e
.
put
(
"ue4Rotation"
,
ue4Rotation
);
});
Page
result
=
new
PageImpl
(
retrieveAll
,
pageable
,
count
);
return
CommonResponseUtil
.
success
(
result
);
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_contingencyOriginal.xml
View file @
669f9a3c
...
...
@@ -15,14 +15,18 @@
1 = 1
<if
test=
"equipmentId!=null"
>
AND t.equipment_Id =
$
{equipmentId}
AND t.equipment_Id =
#
{equipmentId}
</if>
<if
test=
"createTime!=null"
>
AND TO_DAYS(t.create_date) = TO_DAYS(${createTime})
AND TO_DAYS(t.create_date) = TO_DAYS(#{createTime})
</if>
<if
test=
"contingencyName!=null and contingencyName!=''"
>
AND t.fire_Equipment_Name like concat('%',#{contingencyName},'%')
OR t.equipment_Name like concat('%',#{contingencyName},'%')
</if>
order by t.create_date desc
LIMIT
${start},$
{length} ;
LIMIT
#{start},#
{length} ;
</select>
...
...
@@ -35,11 +39,15 @@
1 = 1
<if
test=
"equipmentId!=null"
>
AND t.equipment_Id =
$
{equipmentId}
AND t.equipment_Id =
#
{equipmentId}
</if>
<if
test=
"createTime!=null"
>
AND TO_DAYS(t.create_date) = TO_DAYS(${createTime})
AND TO_DAYS(t.create_date) = TO_DAYS(#{createTime})
</if>
<if
test=
"contingencyName!=null and contingencyName!=''"
>
AND t.fire_Equipment_Name like concat('%',#{contingencyName},'%')
OR t.equipment_Name like concat('%',#{contingencyName},'%')
</if>
</select>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
669f9a3c
...
...
@@ -10,7 +10,7 @@
R.id,R.name,R.code,R.parent_id,R.ue4_location,R.ue4_rotation,R.ue4_extent,
<choose>
<when
test=
"channelType == '3dpage'"
>
IF(ISNULL(
route_path) || LENGTH(trim(route_path
))
<![CDATA[ <]]>
1,0,1) as is_bind,
IF(ISNULL(
position3d) || LENGTH(trim(position3d
))
<![CDATA[ <]]>
1,0,1) as is_bind,
</when>
<otherwise>
IF(ISNULL(IF(replace(trim(ue4_rotation),'[]','')='',NULL,R.ue4_rotation))
...
...
@@ -115,84 +115,37 @@
AND B.id is not null
</when>
<when
test=
"type == 'fireEquipment'"
>
select
<!-- R.id, -->
CASE
WHEN ISNULL(C.id) = 0 then C.id
WHEN ISNULL(E.id) = 0 then E.id
WHEN ISNULL(S.id) = 0 then S.id
WHEN ISNULL(W.id) = 0 then W.id
END as id
,R.parent_id,
select tmp.id,tmp.name,tmp.type,tmp.position3d,tmp.ue4_rotation,tmp.ue4_location,tmp.code,R.parent_id,
<choose>
<when
test=
"channelType == '3dpage'"
>
CASE
WHEN ISNULL(C.id) = 0 AND ISNULL(C.position3d) OR LENGTH(trim(C.position3d))
<![CDATA[ <]]>
1 then 0
WHEN ISNULL(E.id) = 0 AND ISNULL(E.position3d) OR LENGTH(trim(E.position3d))
<![CDATA[ <]]>
1 then 0
WHEN ISNULL(S.id) = 0 AND ISNULL(S.position3d) OR LENGTH(trim(S.position3d))
<![CDATA[ <]]>
1 then 0
WHEN ISNULL(W.id) = 0 AND ISNULL(W.position3d) OR LENGTH(trim(W.position3d))
<![CDATA[ <]]>
1 then 0
ELSE 1
END as is_bind,
IF(ISNULL(tmp.position3d) || LENGTH(trim(tmp.position3d))
<![CDATA[ <]]>
1,0,1) as isBind
</when>
<otherwise>
CASE
WHEN ISNULL(C.id) = 0 then IF(ISNULL(IF(replace(trim(C.ue4_rotation),'[]','')='',NULL,C.ue4_rotation))
AND ISNULL(IF(replace(trim(C.ue4_rotation),'[]','')='',NULL,C.ue4_location)),0,1)
WHEN ISNULL(E.id) = 0 then IF(ISNULL(IF(replace(trim(E.ue4_rotation),'[]','')='',NULL,E.ue4_rotation))
AND ISNULL(IF(replace(trim(E.ue4_rotation),'[]','')='',NULL,E.ue4_location)),0,1)
WHEN ISNULL(S.id) = 0 then IF(ISNULL(IF(replace(trim(S.ue4_rotation),'[]','')='',NULL,S.ue4_rotation))
AND ISNULL(IF(replace(trim(S.ue4_rotation),'[]','')='',NULL,S.ue4_location)),0,1)
WHEN ISNULL(W.id) = 0 then IF(ISNULL(IF(replace(trim(W.ue4_rotation),'[]','')='',NULL,W.ue4_rotation))
AND ISNULL(IF(replace(trim(W.ue4_rotation),'[]','')='',NULL,W.ue4_location)),0,1)
END as is_bind,
IF(ISNULL(IF(replace(trim(tmp.ue4_rotation),'[]','')='',NULL,tmp.ue4_rotation))
AND ISNULL(IF(replace(trim(tmp.ue4_location),'[]','')='',NULL,tmp.ue4_location)),0,1) as isBind
</otherwise>
</choose>
CASE
WHEN ISNULL(C.id) = 0 then 'fireCar'
WHEN ISNULL(E.id) = 0 then 'fireEquipment'
WHEN ISNULL(S.id) = 0 AND S.type = 1 then 'fireChamber'
WHEN ISNULL(S.id) = 0 AND S.type = 2 then 'fireFoamRoom'
WHEN ISNULL(W.id) = 0 AND W.type = 1 then 'hydrant'
WHEN ISNULL(W.id) = 0 AND W.type = 2 then 'pool'
END as type,
CASE
WHEN ISNULL(C.id) = 0 then C.name
WHEN ISNULL(E.id) = 0 then E.name
WHEN ISNULL(S.id) = 0 then S.name
WHEN ISNULL(W.id) = 0 then W.name
END as name,
CASE
WHEN ISNULL(C.id) = 0 then C.car_num
WHEN ISNULL(E.id) = 0 then E.code
WHEN ISNULL(S.id) = 0 then S.code
WHEN ISNULL(W.id) = 0 then W.code
END as code,
CASE
WHEN ISNULL(C.id) = 0 then C.ue4_location
WHEN ISNULL(E.id) = 0 then E.ue4_location
WHEN ISNULL(S.id) = 0 then S.ue4_location
WHEN ISNULL(W.id) = 0 then W.ue4_location
END as ue4_location,
CASE
WHEN ISNULL(C.id) = 0 then C.ue4_rotation
WHEN ISNULL(E.id) = 0 then E.ue4_rotation
WHEN ISNULL(S.id) = 0 then S.ue4_rotation
WHEN ISNULL(W.id) = 0 then W.ue4_rotation
END as ue4_rotation,
0 as is_region,
CASE
WHEN ISNULL(C.id) = 0 then C.position3d
WHEN ISNULL(E.id) = 0 then E.position3d
WHEN ISNULL(S.id) = 0 then S.position3d
WHEN ISNULL(W.id) = 0 then W.position3d
END as position3d
from f_risk_source R
left join f_fire_car C on C.risk_source_id = R.id
left join f_fire_equipment E on E.risk_source_id = R.id AND equip_classify = 3
left join f_fire_station S on S.risk_source_id = R.id
left join f_water_resource W on W.risk_source_id = R.id
where 1=1
AND (C.id is not null OR E.id is not null OR S.id is not null OR w.id is not null)
from (
select id,name,'fireCar' as type,position3d,car_num as code,ue4_location,ue4_rotation,risk_source_id
from f_fire_car
union all
select id,name,'fireEquipment' as type,position3d,code,ue4_location,ue4_rotation,risk_source_id
from f_fire_equipment
union all
select id,name,CASE
WHEN S.type = 1 then 'fireChamber'
WHEN S.type = 2 then 'fireFoamRoom'
END as type,position3d,code,ue4_location,ue4_rotation,risk_source_id
from f_fire_station s
union all
select id,name,
CASE
WHEN W.type = 1 then 'hydrant'
WHEN W.type = 2 then 'pool'
END as type,position3d,code,ue4_location,ue4_rotation,risk_source_id
from f_water_resource w
) tmp
left join f_risk_source R on R.id = tmp.risk_source_id
</when>
</choose>
...
...
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