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
7e3e0e81
Commit
7e3e0e81
authored
Jun 05, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
c0768549
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
173 additions
and
29 deletions
+173
-29
RegionTreeResponse.java
...oin/amos/fas/core/common/response/RegionTreeResponse.java
+15
-4
pom.xml
YeeAmosFireAutoSysService/pom.xml
+1
-1
BizMessageController.java
...in/amos/fas/business/controller/BizMessageController.java
+22
-8
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+24
-13
MessageParam.java
...ava/com/yeejoin/amos/fas/business/param/MessageParam.java
+44
-0
RetrieveParams.java
...a/com/yeejoin/amos/fas/business/param/RetrieveParams.java
+50
-0
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+17
-3
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/core/common/response/RegionTreeResponse.java
View file @
7e3e0e81
package
com
.
yeejoin
.
amos
.
fas
.
core
.
common
.
response
;
import
com.alibaba.druid.util.StringUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
static
org
.
hamcrest
.
CoreMatchers
.
sameInstance
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
com.alibaba.druid.util.StringUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
public
class
RegionTreeResponse
{
...
...
@@ -30,7 +35,13 @@ public class RegionTreeResponse {
}
public
void
setPosition3d
(
String
position3d
)
{
this
.
position3d
=
StringUtils
.
isEmpty
(
position3d
)
?
new
JSONArray
()
:
JSON
.
parseArray
(
position3d
);
JSONArray
jsonArray
=
new
JSONArray
();
if
(!
StringUtils
.
isEmpty
(
position3d
)){
String
[]
arryStr
=
position3d
.
split
(
","
);
List
<
Double
>
collect
=
Arrays
.
stream
(
arryStr
).
map
(
Double:
:
parseDouble
).
collect
(
Collectors
.
toList
());
jsonArray
.
addAll
(
collect
);
}
this
.
position3d
=
jsonArray
;
}
public
Long
getId
()
{
...
...
YeeAmosFireAutoSysService/pom.xml
View file @
7e3e0e81
...
...
@@ -70,7 +70,7 @@
<version>
1.4.5.RELEASE
</version>
</dependency>
<!-- 平台接口 -->
<dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-privilege
</artifactId>
<version>
1.1.0-SNAPSHOT
</version>
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/BizMessageController.java
View file @
7e3e0e81
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.fas.business.param.MessageParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IBizMessageService
;
import
com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Date
;
@RestController
@RequestMapping
(
value
=
"/api/message"
)
...
...
@@ -43,5 +45,17 @@ public class BizMessageController extends BaseController{
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
iBizMessageService
.
queryForPage
(
StringUtils
.
trimToNull
(
time
),
StringUtils
.
trimToNull
(
type
),
StringUtils
.
trimToNull
(
title
),
StringUtils
.
trimToNull
(
compCode
),
commonPageable
));
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"分页查询消息"
,
notes
=
"分页查询消息"
)
@RequestMapping
(
value
=
"/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
forPagePOST
(
@RequestBody
MessageParam
params
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
compCode
=
getOrgCode
(
reginParams
);
CommonPageable
commonPageable
=
new
CommonPageable
(
params
.
getPageNumber
(),
params
.
getPageSize
());
return
CommonResponseUtil
.
success
(
iBizMessageService
.
queryForPage
(
StringUtils
.
trimToNull
(
params
.
getTime
()),
StringUtils
.
trimToNull
(
params
.
getType
()),
StringUtils
.
trimToNull
(
params
.
getTitle
()),
StringUtils
.
trimToNull
(
compCode
),
commonPageable
));
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
7e3e0e81
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.BindRegionBo
;
import
com.yeejoin.amos.fas.business.param.RetrieveParams
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.intfc.IView3dService
;
import
com.yeejoin.amos.fas.business.vo.ExceptionRegionVo
;
...
...
@@ -9,14 +22,10 @@ import com.yeejoin.amos.fas.business.vo.ReginParams;
import
com.yeejoin.amos.fas.common.enums.ResourceTypeDefEnum
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/api/view3d"
)
...
...
@@ -206,22 +215,24 @@ public class View3dController extends BaseController {
return
CommonResponseUtil
.
success
(
view3dService
.
find3dViewDataByType
(
type
,
riskSourceId
,
orgCode
));
}
@
Ge
tMapping
(
value
=
"/retrieve/all"
,
produces
=
"application/json;charset=UTF-8"
)
@
Pos
tMapping
(
value
=
"/retrieve/all"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"右侧边栏搜索"
,
notes
=
"右侧边栏搜索"
)
public
CommonResponse
retrieveAll
(
@RequestParam
(
required
=
false
)
String
type
,
@RequestParam
(
required
=
false
)
String
inputText
,
@RequestParam
(
required
=
true
)
int
current
,
@RequestParam
(
required
=
true
)
int
pageSize
,
@RequestParam
(
required
=
false
)
String
dataLevel
,
@RequestParam
(
required
=
false
)
String
protectObjName
@RequestBody
RetrieveParams
params
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
String
token
=
this
.
getToken
();
String
appKey
=
this
.
getAppKey
();
String
product
=
this
.
getProduct
();
return
view3dService
.
retrieveAll
(
type
,
inputText
,
current
,
pageSize
,
orgCode
,
dataLevel
,
protectObjName
,
token
,
appKey
,
product
);
return
view3dService
.
retrieveAll
(
params
.
getType
(),
params
.
getInputText
(),
params
.
getCurrent
(),
params
.
getPageSize
(),
orgCode
,
params
.
getDataLevel
(),
params
.
getProtectObjName
(),
token
,
appKey
,
product
);
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/MessageParam.java
0 → 100644
View file @
7e3e0e81
package
com
.
yeejoin
.
amos
.
fas
.
business
.
param
;
public
class
MessageParam
{
private
String
time
;
private
String
type
;
private
String
title
;
private
int
pageNumber
;
private
int
pageSize
;
public
String
getTime
()
{
return
time
;
}
public
void
setTime
(
String
time
)
{
this
.
time
=
time
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
int
getPageNumber
()
{
return
pageNumber
;
}
public
void
setPageNumber
(
int
pageNumber
)
{
this
.
pageNumber
=
pageNumber
;
}
public
int
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
int
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/RetrieveParams.java
0 → 100644
View file @
7e3e0e81
package
com
.
yeejoin
.
amos
.
fas
.
business
.
param
;
public
class
RetrieveParams
{
private
String
type
;
private
String
inputText
;
private
Integer
current
;
private
Integer
pageSize
;
private
String
dataLevel
;
private
String
protectObjName
;
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getInputText
()
{
return
inputText
;
}
public
void
setInputText
(
String
inputText
)
{
this
.
inputText
=
inputText
;
}
public
Integer
getCurrent
()
{
return
current
;
}
public
void
setCurrent
(
Integer
current
)
{
this
.
current
=
current
;
}
public
Integer
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
Integer
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
public
String
getDataLevel
()
{
return
dataLevel
;
}
public
void
setDataLevel
(
String
dataLevel
)
{
this
.
dataLevel
=
dataLevel
;
}
public
String
getProtectObjName
()
{
return
protectObjName
;
}
public
void
setProtectObjName
(
String
protectObjName
)
{
this
.
protectObjName
=
protectObjName
;
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
7e3e0e81
...
...
@@ -161,6 +161,7 @@
rl.level,rl.name as levelStr,rs.floor3d ,rs.is_indoor as isIndoor,
rs.flicker_frequency as frequency,
true as 'showInfo',
#{type} as type,
rs.rpn as title
from f_risk_source rs
left join f_risk_level rl ON rl.id = rs.risk_level_id
...
...
@@ -193,6 +194,7 @@
when '2' then '不合格'
when '3' then '漏检'
end as levelStr,
#{type} as type,
status as level
from p_point p
where 1=1 and is_delete = 0
...
...
@@ -208,6 +210,7 @@
floor3d,is_indoor as isIndoor,
0 as frequency,
false as 'showInfo',
#{type} as type,
name as 'title'
from f_equipment
where 1=1
...
...
@@ -223,6 +226,7 @@
floor3d,is_indoor as isIndoor,
0 as frequency,
false as 'showInfo',
#{type} as type,
name as 'title'
from f_fire_equipment
where equip_classify = 0
...
...
@@ -238,6 +242,7 @@
floor3d,is_indoor as isIndoor,
0 as frequency,
false as 'showInfo',
#{type} as type,
name as 'title'
from f_fire_equipment
where equip_classify = 2
...
...
@@ -253,6 +258,7 @@
floor3d,is_indoor as isIndoor,
0 as frequency,
false as 'showInfo',
#{type} as type,
name as 'title'
from f_water_resource
where type = 1
...
...
@@ -268,6 +274,7 @@
floor3d,is_indoor as isIndoor,
0 as frequency,
false as 'showInfo',
#{type} as type,
name as 'title'
from f_water_resource
where type = 2
...
...
@@ -283,6 +290,7 @@
floor3d,is_indoor as isIndoor,
0 as frequency,
true as 'showInfo',
#{type} as type,
name as 'title'
from f_fire_car
where 1=1
...
...
@@ -298,6 +306,7 @@
floor3d,is_indoor as isIndoor,
0 as frequency,
true as 'showInfo',
#{type} as type,
name as 'title'
from f_fire_equipment
where equip_classify = 3
...
...
@@ -313,6 +322,7 @@
floor3d,is_indoor as isIndoor,
0 as frequency,
true as 'showInfo',
#{type} as type,
name as 'title'
from f_fire_station
where type = 1
...
...
@@ -328,6 +338,7 @@
floor3d,is_indoor as isIndoor,
0 as frequency,
true as 'showInfo',
#{type} as type,
name as 'title'
from f_fire_station
where type = 2
...
...
@@ -835,7 +846,8 @@
'riskSource' type,
rs.org_code as orgCode,
rs.id as riskSourceId,
rs.flicker_frequency as frequency
rs.flicker_frequency as frequency,
if('NORMAL'=rs.status,FALSE,TRUE) as twinkle
FROM
f_risk_source rs
LEFT JOIN f_risk_level rl ON rl.id = rs.risk_level_id
...
...
@@ -881,7 +893,8 @@
'impEquipment' type,
eq.org_code as orgCode,
eq.risk_source_id as riskSourceId,
0 as frequency
0 as frequency,
FALSE as twinkle
FROM
f_equipment eq
WHERE
...
...
@@ -933,7 +946,8 @@
'patrol' as type,
p.org_code as orgCode,
p.risk_source_id as riskSourceId,
0 as frequency
0 as frequency,
if(p.status > 1 ,TRUE,FALSE) as twinkle
from
p_point p
left join f_risk_source rs on p.risk_source_id = rs.id AND rs.is_region='TRUE'
...
...
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