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
cb821db6
Commit
cb821db6
authored
Jun 04, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加区域下点查询接口,前端删除区域时根据长度进行校验
parent
f571ae6a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
6 deletions
+109
-6
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+8
-5
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+7
-0
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+37
-0
IView3dService.java
...ejoin/amos/fas/business/service/intfc/IView3dService.java
+8
-1
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+49
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
cb821db6
...
@@ -12,8 +12,6 @@ import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
...
@@ -12,8 +12,6 @@ import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.Authorization
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -144,8 +142,7 @@ public class View3dController extends BaseController {
...
@@ -144,8 +142,7 @@ public class View3dController extends BaseController {
public
CommonResponse
getStatisticsDuty
(){
public
CommonResponse
getStatisticsDuty
(){
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
CommonResponse
statisticsDuty
=
view3dService
.
getStatisticsDuty
(
getAppKey
(),
getProduct
(),
orgCode
);
return
view3dService
.
getStatisticsDuty
(
getAppKey
(),
getProduct
(),
orgCode
);
return
statisticsDuty
;
}
}
@ApiOperation
(
value
=
"异常区域信息查询"
,
notes
=
"异常区域信息查询"
)
@ApiOperation
(
value
=
"异常区域信息查询"
,
notes
=
"异常区域信息查询"
)
...
@@ -157,7 +154,7 @@ public class View3dController extends BaseController {
...
@@ -157,7 +154,7 @@ public class View3dController extends BaseController {
return
CommonResponseUtil
.
success
(
exceptionRegionVoList
);
return
CommonResponseUtil
.
success
(
exceptionRegionVoList
);
}
}
@ApiOperation
(
value
=
"
异常区域信息查询"
,
notes
=
"异常区域
信息查询"
)
@ApiOperation
(
value
=
"
设备状态信息查询"
,
notes
=
"设备状态
信息查询"
)
@GetMapping
(
value
=
"equipStatus/list"
)
@GetMapping
(
value
=
"equipStatus/list"
)
public
CommonResponse
getEquipStatusList
(){
public
CommonResponse
getEquipStatusList
(){
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
...
@@ -233,4 +230,10 @@ public class View3dController extends BaseController {
...
@@ -233,4 +230,10 @@ public class View3dController extends BaseController {
public
CommonResponse
pointLevel
(
@ApiParam
(
value
=
"点类型"
)
@RequestParam
String
type
){
public
CommonResponse
pointLevel
(
@ApiParam
(
value
=
"点类型"
)
@RequestParam
String
type
){
return
CommonResponseUtil
.
success
(
view3dService
.
pointLevelList
(
type
));
return
CommonResponseUtil
.
success
(
view3dService
.
pointLevelList
(
type
));
}
}
@ApiOperation
(
value
=
"重新区域下包含点"
,
notes
=
"重新区域下包含点"
)
@GetMapping
(
value
=
"point/list/{regionId}"
)
public
CommonResponse
listPointsByRegion
(
@PathVariable
Long
regionId
,
@RequestParam
(
required
=
false
,
defaultValue
=
"all"
)
String
type
){
return
CommonResponseUtil
.
success
(
view3dService
.
listPointsByRegionId
(
regionId
,
type
));
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
cb821db6
...
@@ -149,4 +149,11 @@ public interface View3dMapper extends BaseMapper{
...
@@ -149,4 +149,11 @@ public interface View3dMapper extends BaseMapper{
Long
retrieveAllCount
(
String
type
,
String
inputText
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
);
Long
retrieveAllCount
(
String
type
,
String
inputText
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
);
List
<
HashMap
<
String
,
Object
>>
retrieveAll
(
String
type
,
String
inputText
,
long
start
,
int
length
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
);
List
<
HashMap
<
String
,
Object
>>
retrieveAll
(
String
type
,
String
inputText
,
long
start
,
int
length
,
String
orgCode
,
String
dataLevel
,
String
protectObjName
);
/**
* 查询区域下点
* @param ids 区域ids
* @return list
*/
List
<
Map
<
String
,
Object
>>
getAllPointInRegions
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
cb821db6
...
@@ -600,5 +600,42 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -600,5 +600,42 @@ public class View3dServiceImpl implements IView3dService {
throw
new
YeeException
(
"不支持的类型 -->"
+
type
);
throw
new
YeeException
(
"不支持的类型 -->"
+
type
);
}
}
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
listPointsByRegionId
(
Long
regionId
,
String
type
)
{
List
<
Map
<
String
,
Object
>>
pointList
=
new
ArrayList
<>();
if
(
FasConstant
.
ALL_POINT
.
equalsIgnoreCase
(
type
)){
//分支1:查询区域及子区域下所有点
List
<
Long
>
regionIds
=
new
ArrayList
<>();
List
<
RiskSource
>
riskSourceList
=
iRiskSourceDao
.
findByParentId
(
regionId
);
this
.
getAllRiskRegion
(
regionIds
,
riskSourceList
);
regionIds
.
add
(
regionId
);
pointList
=
this
.
getPointsByRegionIds
(
regionIds
);
}
else
{
//分支2:查询指定区域下所有点
pointList
=
this
.
getPointsByRegionIds
(
Collections
.
singletonList
(
regionId
));
}
return
pointList
;
}
private
List
<
Map
<
String
,
Object
>>
getPointsByRegionIds
(
List
<
Long
>
ids
){
return
view3dMapper
.
getAllPointInRegions
(
ids
);
}
/**
* 获得子节点:区域
* @param ids 返回
* @param riskSourceList 风险点区域列表
*/
private
void
getAllRiskRegion
(
List
<
Long
>
ids
,
List
<
RiskSource
>
riskSourceList
)
{
//TODO 递归
for
(
RiskSource
riskSource
:
riskSourceList
)
{
if
(
riskSource
.
getIsRegion
().
equalsIgnoreCase
(
"TRUE"
))
{
ids
.
add
(
riskSource
.
getId
());
List
<
RiskSource
>
list
=
iRiskSourceDao
.
findByParentId
(
riskSource
.
getId
());
if
(
list
!=
null
)
{
this
.
getAllRiskRegion
(
ids
,
list
);
}
}
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IView3dService.java
View file @
cb821db6
...
@@ -164,5 +164,12 @@ public interface IView3dService {
...
@@ -164,5 +164,12 @@ public interface IView3dService {
* @return
* @return
*/
*/
List
<
Map
<
String
,
String
>>
pointLevelList
(
String
type
);
List
<
Map
<
String
,
String
>>
pointLevelList
(
String
type
);
/**
* 查询区域下的各类点
* @param regionId 区域id
* @param type 类型
* @return list
*/
List
<
Map
<
String
,
Object
>>
listPointsByRegionId
(
Long
regionId
,
String
type
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
cb821db6
...
@@ -1385,4 +1385,52 @@ from (select concat('riskSource',r.id) as id,r.name,r.code,r.ue4_location as ue4
...
@@ -1385,4 +1385,52 @@ from (select concat('riskSource',r.id) as id,r.name,r.code,r.ue4_location as ue4
</if>
</if>
LIMIT ${start},${length}
LIMIT ${start},${length}
</select>
</select>
<select
id=
"getAllPointInRegions"
resultType=
"java.util.Map"
>
select
CONCAT(type,'-',id) as `key`,
id as pointId,
name,
type,
risk_source_id as regionId
from
(select id,name,'riskSource' as type, parent_id as risk_source_id
from f_risk_source where is_region = 'FALSE'
UNION all
select id,name,'patrol' as type,risk_source_id
from p_point WHERE is_delete = FALSE
UNION all
select id,name ,'impEquipment' as type,risk_source_id
from f_equipment e
UNION all
select id,name,'monitorEquipment' as type,risk_source_id
from f_fire_equipment where equip_classify = 0
UNION all
select id,name,'video' as type,risk_source_id
from f_fire_equipment where equip_classify = 2
UNION all
select id,name ,'hydrant' as type,risk_source_id
from f_water_resource where type = 1
UNION all
select id,name,'pool' as type,risk_source_id
from f_water_resource where type = 2
UNION all
select id,name,'fireCar' as type,risk_source_id
from f_fire_car
UNION all
select id,name,'fireEquipment' as type,risk_source_id
from f_fire_equipment where equip_classify = 3
UNION all
select id,name,'fireChamber' as type,risk_source_id
from f_fire_station where type = 2
UNION all
select id,name,'fireFoamRoom' as type,risk_source_id
from f_fire_station where type = 1
) as sp
where
risk_source_id in
<foreach
collection=
"ids"
open=
"("
separator=
","
close=
")"
item=
"id"
>
#{id}
</foreach>
order by regionId
</select>
</mapper>
</mapper>
\ No newline at end of file
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