Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
c928122e
Commit
c928122e
authored
Nov 09, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改特种设备es 接口
parent
5079c387
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
25 deletions
+50
-25
EsSpecialEquipmentDto.java
...n/amos/boot/module/tzs/api/dto/EsSpecialEquipmentDto.java
+1
-2
SpecialEquipmentController.java
...module/tzs/biz/controller/SpecialEquipmentController.java
+48
-22
ESElevatorServiceImpl.java
...ot/module/tzs/biz/service/impl/ESElevatorServiceImpl.java
+0
-0
application.properties
...boot-system-tzs/src/main/resources/application.properties
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/EsSpecialEquipmentDto.java
View file @
c928122e
...
@@ -4,8 +4,6 @@ import io.swagger.annotations.ApiModel;
...
@@ -4,8 +4,6 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
/**
/**
* 特种设备搜索DTO
* 特种设备搜索DTO
*/
*/
...
@@ -64,4 +62,5 @@ public class EsSpecialEquipmentDto {
...
@@ -64,4 +62,5 @@ public class EsSpecialEquipmentDto {
@ApiModelProperty
(
value
=
"聚合精确度1-12"
)
@ApiModelProperty
(
value
=
"聚合精确度1-12"
)
private
Integer
precision
;
private
Integer
precision
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/SpecialEquipmentController.java
View file @
c928122e
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.biz.common.feign.AmosFeignService
;
import
com.yeejoin.amos.boot.biz.common.feign.AmosFeignService
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorBaseInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorBaseInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorInfoDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorInfoDto
;
...
@@ -100,55 +101,52 @@ public class SpecialEquipmentController extends BaseController {
...
@@ -100,55 +101,52 @@ public class SpecialEquipmentController extends BaseController {
private
IElevatorRelationService
elevatorRelationService
;
private
IElevatorRelationService
elevatorRelationService
;
/**
/**
* ES查询
电梯信息
* ES查询
特种设备信息 带分页 加经纬度过滤 keyword 搜索
*
*
* @return 查询结果
* @return 查询结果
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/querySpecialEquipment"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/querySpecialEquipmentListPage"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"ES查询八大类信息"
,
notes
=
"ES查询八大类信息"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"ES查询特种设备信息带分页 "
,
notes
=
"ES查询特种设备信息带分页"
)
public
ResponseModel
<
Map
<
String
,
List
<
SpecialEquipmentDto
>>>
querySpecialEquipment
(
@RequestBody
EsSpecialEquipmentDto
esSpecialEquipmentDto
){
public
ResponseModel
<
Page
<
SpecialEquipmentDto
>>
querySpecialEquipmentListPage
(
@RequestBody
EsSpecialEquipmentDto
esSpecialEquipmentDto
Map
<
String
,
List
<
SpecialEquipmentDto
>>
result
=
new
HashMap
<>();
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
){
Page
<
SpecialEquipmentDto
>
result
=
null
;
if
(
ValidationUtil
.
isEmpty
(
esSpecialEquipmentDto
.
getCategoryCode
()))
{
throw
new
BadRequest
(
"参数校验失败."
);
}
if
(
StringUtils
.
isNotBlank
(
esSpecialEquipmentDto
.
getCategoryCode
()))
{
// 查找特定设备
if
(
StringUtils
.
isNotBlank
(
esSpecialEquipmentDto
.
getCategoryCode
()))
{
// 查找特定设备
if
(
"3000"
.
equals
(
esSpecialEquipmentDto
.
getCategoryCode
()))
{
if
(
"3000"
.
equals
(
esSpecialEquipmentDto
.
getCategoryCode
()))
{
List
<
SpecialEquipmentDto
>
elevatorList
=
esElevatorService
.
queryByDto
(
esSpecialEquipmentDto
,
true
);
result
=
esElevatorService
.
queryPageByDto
(
esSpecialEquipmentDto
,
current
,
size
);
result
.
put
(
"3000"
,
elevatorList
);
}
}
}
else
{
// 查找所有设备
// 查找电梯数据
List
<
SpecialEquipmentDto
>
elevatorList
=
esElevatorService
.
queryByDto
(
esSpecialEquipmentDto
,
false
);
result
.
put
(
"3000"
,
elevatorList
);
}
}
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
/**
/**
* ES查询
电梯信息
* ES查询
特种设备信息 不带分页 加经纬度过滤 keyword 搜索
*
*
* @return 查询结果
* @return 查询结果
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/querySpecialEquipmentList"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/querySpecialEquipmentList"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"ES查询
八大类列表信息"
,
notes
=
"ES查询八大类列表信息
"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"ES查询
特种设备信息不带分页"
,
notes
=
"ES查询特种设备信息不带分页
"
)
public
ResponseModel
<
List
<
SpecialEquipmentDto
>>
querySpecialEquipmentList
(
@RequestBody
EsSpecialEquipment
ListDto
eSpecialEquipmentLis
tDto
){
public
ResponseModel
<
List
<
SpecialEquipmentDto
>>
querySpecialEquipmentList
(
@RequestBody
EsSpecialEquipment
Dto
esSpecialEquipmen
tDto
){
List
<
SpecialEquipmentDto
>
result
=
new
ArrayList
<>();
List
<
SpecialEquipmentDto
>
result
=
new
ArrayList
<>();
if
(
ValidationUtil
.
isEmpty
(
esSpecialEquipmentDto
.
getCategoryCode
()))
{
if
(
ValidationUtil
.
isEmpty
(
eSpecialEquipmentListDto
.
getCategoryCode
()))
{
throw
new
BadRequest
(
"参数校验失败."
);
throw
new
BadRequest
(
"参数校验失败."
);
}
}
if
(
"3000"
.
equals
(
eSpecialEquipmentListDto
.
getCategoryCode
()))
{
if
(
StringUtils
.
isNotBlank
(
esSpecialEquipmentDto
.
getCategoryCode
()))
{
// 查找特定设备
result
=
esElevatorService
.
queryListByDto
(
eSpecialEquipmentListDto
);
if
(
"3000"
.
equals
(
esSpecialEquipmentDto
.
getCategoryCode
()))
{
result
=
esElevatorService
.
queryByDto
(
esSpecialEquipmentDto
);
}
}
}
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
/**
/**
* ES查询
电梯
信息
* ES查询
特种设备聚合
信息
*
*
* @return 查询结果
* @return 查询结果
*/
*/
...
@@ -170,10 +168,38 @@ public class SpecialEquipmentController extends BaseController {
...
@@ -170,10 +168,38 @@ public class SpecialEquipmentController extends BaseController {
result
=
esElevatorService
.
queryTogetherByDto
(
esSpecialEquipmentDto
);
result
=
esElevatorService
.
queryTogetherByDto
(
esSpecialEquipmentDto
);
}
}
}
}
return
ResponseHelper
.
buildResponse
(
result
);
}
/***
* keyword 区域 查询八大类总数
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/queryEquipNum"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询八大类总数"
,
notes
=
"查询八大类总数"
)
public
ResponseModel
<
Map
<
String
,
Long
>>
queryEquipNum
(
@RequestBody
EsSpecialEquipmentDto
esSpecialEquipmentDto
){
Map
<
String
,
Long
>
result
=
new
HashMap
<>();
// 锅炉
Long
boiler
=
0
l
;
result
.
put
(
"1000"
,
boiler
);
// 压力容器
Long
vessel
=
0
l
;
result
.
put
(
"2000"
,
vessel
);
// 电梯
Long
elevator
=
esElevatorService
.
queryNumberByDto
(
esSpecialEquipmentDto
);
result
.
put
(
"3000"
,
elevator
);
// 起重机械
Long
crane
=
0
l
;
result
.
put
(
"4000"
,
crane
);
// 大型游乐设施
Long
facility
=
0
l
;
result
.
put
(
"6000"
,
facility
);
// 大型游乐设施
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/ESElevatorServiceImpl.java
View file @
c928122e
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/src/main/resources/application.properties
View file @
c928122e
spring.application.name
=
TZS
spring.application.name
=
TZS
-kfm
server.servlet.context-path
=
/tzs
server.servlet.context-path
=
/tzs
server.port
=
11000
server.port
=
11000
spring.profiles.active
=
dev
spring.profiles.active
=
dev
...
...
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