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
488f71da
Commit
488f71da
authored
Oct 28, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
0e747853
1e68e16e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
179 additions
and
87 deletions
+179
-87
AlertCalledMapper.java
...in/amos/boot/module/jcs/api/mapper/AlertCalledMapper.java
+2
-6
AlertCalledMapper.xml
...e-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
+72
-1
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+94
-69
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+11
-11
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertCalledMapper.java
View file @
488f71da
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -60,11 +61,6 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
//未结束灾情列表
List
<
AlertCalled
>
AlertCalledStatusPage
(
@Param
(
"current"
)
Integer
current
,
@Param
(
"size"
)
Integer
size
);
List
<
Map
<
String
,
Object
>>
getOrgUserLocation
(
String
locationt
);
Set
<
Map
<
String
,
Object
>>
getLocation
(
);
List
<
Map
<
String
,
Object
>>
getAlertCalledLocation
(
String
locationt
);
List
<
Map
<
String
,
Object
>>
getKeySiteLocation
(
String
locationt
);
List
<
Map
<
String
,
Object
>>
getAirportLocation
(
String
locationt
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
488f71da
...
...
@@ -264,7 +264,7 @@
</select>
<select
id=
"getKeySiteLocation"
resultType=
"Map"
>
<!--
<select id="getKeySiteLocation" resultType="Map">
SELECT
address_desc AS location,
latitude,
...
...
@@ -310,5 +310,76 @@
WHERE
is_delete=0
</select>
-->
<select
id=
"getLocation"
resultType=
"Map"
>
SELECT
*
FROM
(
(
SELECT
stand_code AS location,
longitude,
latitude
FROM
jc_airport_stand
WHERE
is_delete = 0
)
UNION ALL
(
SELECT
tt.location AS location,
tt.longitude AS longitude,
tt.latitude AS latitude
FROM
(
SELECT
CASE
WHEN field_code = 'companyLocation' THEN
field_value
END AS location,
CASE
WHEN field_code = 'longitude' THEN
field_value
END AS longitude,
CASE
WHEN field_code = 'latitude' THEN
field_value
END AS latitude
FROM
cb_dynamic_form_instance
WHERE
group_code = '244'
) tt
WHERE
tt.location IS NOT NULL
)
UNION ALL
(
SELECT
address AS location,
coordinate_x AS latitude,
coordinate_y AS longitude
FROM
jc_alert_called
WHERE
is_delete = 0
) UNION all (
SELECT
address_desc AS location,
latitude,
longitude
FROM
cb_key_site
WHERE
is_delete=0
)
) hh
</select>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
488f71da
...
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledRequestDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStatusEnum
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl
;
...
...
@@ -55,7 +56,6 @@ import java.util.stream.Collectors;
import
java.util.stream.Stream
;
/**
* 警情接警记录
*
...
...
@@ -85,6 +85,10 @@ public class AlertCalledController extends BaseController {
OrgUsrServiceImpl
iOrgUsrService
;
@Value
(
"${redis.cache.failure.time}"
)
private
long
time
;
private
static
String
ALETR_TYPE_AID
=
"1214"
;
private
static
String
ALETR_TYPE_AID_STATUS
=
"patientStatus"
;
/**
* 新增警情接警记录
*
...
...
@@ -94,19 +98,41 @@ public class AlertCalledController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增警情接警记录"
,
notes
=
"新增警情接警记录"
)
@Transactional
public
ResponseModel
<
AlertCalled
>
saveAlertCalled
(
@RequestBody
AlertCalledObjsDto
alertCalledObjsDto
)
throws
Exception
{
if
(
ValidationUtil
.
isEmpty
(
alertCalledObjsDto
)
||
ValidationUtil
.
isEmpty
(
alertCalledObjsDto
.
getAlertCalled
()))
throw
new
BadRequest
(
"参数校验失败."
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
//获取当前登录人公司
String
name
=
reginParams
.
getCompany
().
getCompanyName
();
AlertCalled
alertCalled
=
alertCalledObjsDto
.
getAlertCalled
();
alertCalled
.
setCompanyName
(
name
);
alertCalledObjsDto
.
setAlertCalled
(
alertCalled
);
alertCalledObjsDto
=
iAlertCalledService
.
createAlertCalled
(
alertCalledObjsDto
);
return
ResponseHelper
.
buildResponse
(
alertCalledObjsDto
.
getAlertCalled
());
public
ResponseModel
<
AlertCalled
>
saveAlertCalled
(
@RequestBody
AlertCalledObjsDto
alertCalledObjsDto
)
throws
Exception
{
if
(
ValidationUtil
.
isEmpty
(
alertCalledObjsDto
)
||
ValidationUtil
.
isEmpty
(
alertCalledObjsDto
.
getAlertCalled
()))
throw
new
BadRequest
(
"参数校验失败."
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
//获取当前登录人公司
String
name
=
reginParams
.
getCompany
().
getCompanyName
();
AlertCalled
alertCalled
=
alertCalledObjsDto
.
getAlertCalled
();
alertCalled
.
setCompanyName
(
name
);
if
(
alertCalled
.
getAlertTypeCode
().
equals
(
ALETR_TYPE_AID
))
{
List
<
AlertFormValue
>
alertFormValue
=
alertCalledObjsDto
.
getAlertFormValue
();
alertFormValue
.
forEach
(
e
->
{
if
(
e
.
getFieldCode
().
equals
(
ALETR_TYPE_AID_STATUS
))
{
if
(
e
.
getFieldValueCode
()
!=
null
)
{
if
(
e
.
getFieldValueCode
().
contains
(
","
))
{
String
[]
split
=
e
.
getFieldValueCode
().
split
(
","
);
StringBuilder
stringBuilder
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
split
.
length
;
i
++)
{
DataDictionary
hzxz
=
dataDictionaryService
.
getByCode
(
split
[
i
],
"HZXZ"
);
stringBuilder
.
append
(
hzxz
.
getName
()
+
" "
);
e
.
setFieldValue
(
stringBuilder
.
toString
());
}
}
else
{
DataDictionary
hzxz
=
dataDictionaryService
.
getByCode
(
e
.
getFieldValueCode
(),
"HZXZ"
);
e
.
setFieldValue
(
hzxz
.
getName
());
}
}
}
});
alertCalledObjsDto
.
setAlertFormValue
(
alertFormValue
);
}
alertCalledObjsDto
.
setAlertCalled
(
alertCalled
);
alertCalledObjsDto
=
iAlertCalledService
.
createAlertCalled
(
alertCalledObjsDto
);
return
ResponseHelper
.
buildResponse
(
alertCalledObjsDto
.
getAlertCalled
());
}
/**
...
...
@@ -145,7 +171,7 @@ public class AlertCalledController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询"
,
notes
=
"根据id查询"
)
public
ResponseModel
<
Object
>
selectById
(
@PathVariable
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalledById
(
id
));
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalledById
(
id
));
}
...
...
@@ -161,7 +187,7 @@ public class AlertCalledController extends BaseController {
String
alertTypeCode
,
String
alertSourceCode
,
String
callTimeStart
,
String
callTimeEnd
){
String
callTimeEnd
)
{
/* Page<AlertCalled> pageBean;
IPage<AlertCalled> page;
QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>();
...
...
@@ -175,7 +201,7 @@ public class AlertCalledController extends BaseController {
page
.
setCurrent
(
0L
);
page
.
setSize
(
Long
.
MAX_VALUE
);
}
else
{
page
.
setCurrent
(
(
Long
.
parseLong
(
pageNum
)
-
1
)
*
Long
.
parseLong
(
pageSize
));
page
.
setCurrent
((
Long
.
parseLong
(
pageNum
)
-
1
)
*
Long
.
parseLong
(
pageSize
));
page
.
setSize
(
Long
.
parseLong
(
pageSize
));
}
/*分页存在问题 修改分页参数 陈召 2021-09-22 结束*/
...
...
@@ -184,10 +210,10 @@ public class AlertCalledController extends BaseController {
/* bug2408 筛选参数解析异常 修改筛选条件方法 修改入参分离筛选条件
alertStatus 警情状态 alertTypeCode 报警类型code alertSourceCode 警情来源code
陈召 2021-08-21 开始*/
IPage
<
AlertCalled
>
alertCalledIPage
=
iAlertCalledService
.
queryForCalledList
(
page
,
alertStatus
,
alertTypeCode
,
alertSourceCode
,
callTimeStart
,
callTimeEnd
,
sort
);
IPage
<
AlertCalled
>
alertCalledIPage
=
iAlertCalledService
.
queryForCalledList
(
page
,
alertStatus
,
alertTypeCode
,
alertSourceCode
,
callTimeStart
,
callTimeEnd
,
sort
);
/* bug 2406 接警记录,列表缺少警情状态字段 by litw start*/
alertCalledIPage
.
getRecords
().
stream
().
forEach
(
e
->
{
if
(
e
.
getAlertStatus
())
{
alertCalledIPage
.
getRecords
().
stream
().
forEach
(
e
->
{
if
(
e
.
getAlertStatus
())
{
e
.
setAlertStatusStr
(
AlertStatusEnum
.
CLOSED
.
getName
());
}
else
{
e
.
setAlertStatusStr
(
AlertStatusEnum
.
UNCLOSED
.
getName
());
...
...
@@ -200,12 +226,11 @@ public class AlertCalledController extends BaseController {
}
/**
*
* <pre>
* 相似警情分页查询
* </pre>
*
* @param
* @param
* @param current
* @param size
* @return
...
...
@@ -215,7 +240,7 @@ public class AlertCalledController extends BaseController {
@ApiOperation
(
value
=
"相似警情分页查询"
)
@PostMapping
(
value
=
"/page/similar"
)
public
ResponseModel
<
Page
<
ESAlertCalledDto
>>
pageBySimilar
(
@RequestBody
ESAlertCalledRequestDto
alertCalledVo
,
@RequestBody
ESAlertCalledRequestDto
alertCalledVo
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
throws
Exception
{
/*bug 3090 警情填报,相似警情中响应级别错误显示为code 2021-10-13 chenzhao */
...
...
@@ -223,8 +248,8 @@ public class AlertCalledController extends BaseController {
List
<
ESAlertCalledDto
>
records
=
esAlertCalledDtoPage
.
getRecords
();
for
(
ESAlertCalledDto
record
:
records
)
{
if
(
record
.
getResponseLevelCode
()
!=
null
){
DataDictionary
byCode
=
dataDictionaryService
.
getByCode
(
record
.
getResponseLevelCode
(),
"XYJBR"
);
if
(
record
.
getResponseLevelCode
()
!=
null
)
{
DataDictionary
byCode
=
dataDictionaryService
.
getByCode
(
record
.
getResponseLevelCode
(),
"XYJBR"
);
record
.
setResponseLevel
(
byCode
.
getName
());
}
}
...
...
@@ -233,7 +258,6 @@ public class AlertCalledController extends BaseController {
}
/**
*
* <pre>
* 初始化ES
* </pre>
...
...
@@ -257,24 +281,24 @@ public class AlertCalledController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表无分页查询"
,
notes
=
"列表无分页查询"
)
public
ResponseModel
<
List
<
AlertCalled
>>
list
(
AlertCalled
alertCalled
)
{
QueryWrapper
<
AlertCalled
>
alertCalledQueryWrapper
=
new
QueryWrapper
<>();
setQueryWrapper
(
alertCalledQueryWrapper
,
alertCalled
,
null
);
setQueryWrapper
(
alertCalledQueryWrapper
,
alertCalled
,
null
);
List
<
AlertCalled
>
list
=
iAlertCalledService
.
list
(
alertCalledQueryWrapper
);
return
ResponseHelper
.
buildResponse
(
list
);
}
private
QueryWrapper
<
AlertCalled
>
setQueryWrapper
(
QueryWrapper
<
AlertCalled
>
queryWrapper
,
AlertCalled
alertCalled
,
String
sort
)
{
private
QueryWrapper
<
AlertCalled
>
setQueryWrapper
(
QueryWrapper
<
AlertCalled
>
queryWrapper
,
AlertCalled
alertCalled
,
String
sort
)
{
Class
<?
extends
AlertCalled
>
aClass
=
alertCalled
.
getClass
();
queryWrapper
.
eq
(
"is_delete"
,
0
);
if
(
sort
!=
null
)
{
String
[]
date
=
sort
.
split
(
","
);
if
(
date
[
1
].
equals
(
"ascend"
))
{
queryWrapper
.
orderByAsc
(
RedisKey
.
humpToLine
(
date
[
0
]));
}
else
{
queryWrapper
.
orderByDesc
(
RedisKey
.
humpToLine
(
date
[
0
]));
}
}
else
{
queryWrapper
.
orderByDesc
(
"call_time"
);
if
(
sort
!=
null
)
{
String
[]
date
=
sort
.
split
(
","
);
if
(
date
[
1
].
equals
(
"ascend"
))
{
queryWrapper
.
orderByAsc
(
RedisKey
.
humpToLine
(
date
[
0
]));
}
else
{
queryWrapper
.
orderByDesc
(
RedisKey
.
humpToLine
(
date
[
0
]));
}
}
else
{
queryWrapper
.
orderByDesc
(
"call_time"
);
}
if
(
alertCalled
.
getCallTimeStart
()
!=
null
&&
alertCalled
.
getCallTimeEnd
()
!=
null
)
{
...
...
@@ -283,7 +307,7 @@ public class AlertCalledController extends BaseController {
if
(
alertCalled
.
getIsFatherAlert
())
{
// 0:接警;1:处警
queryWrapper
.
isNull
(
"father_alert"
);
}
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getAlertSourceCodeStr
())){
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getAlertSourceCodeStr
()))
{
String
[]
arr
=
alertCalled
.
getAlertSourceCodeStr
().
split
(
","
);
List
<
String
>
collect
=
Arrays
.
stream
(
arr
).
collect
(
Collectors
.
toList
());
queryWrapper
.
in
(
"alert_source_code"
,
collect
);
...
...
@@ -308,8 +332,8 @@ public class AlertCalledController extends BaseController {
}
else
if
(
type
.
equals
(
Boolean
.
class
))
{
Boolean
fileValue
=
(
Boolean
)
field
.
get
(
alertCalled
);
queryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
Long
.
class
)
||
"long"
.
equals
(
type
.
toString
()))
{
Long
fileValue
=
(
Long
)
field
.
get
(
alertCalled
);
}
else
if
(
type
.
equals
(
Long
.
class
)
||
"long"
.
equals
(
type
.
toString
()))
{
Long
fileValue
=
(
Long
)
field
.
get
(
alertCalled
);
queryWrapper
.
eq
(
name
,
fileValue
);
}
}
...
...
@@ -330,12 +354,11 @@ public class AlertCalledController extends BaseController {
@GetMapping
(
value
=
"/dateRange/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询指定日期内警情列表"
,
notes
=
"查询指定日期内警情列表"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
listByDateRange
(
@RequestParam
(
value
=
"beginDate"
,
required
=
false
)
String
beginDate
,
@RequestParam
(
"endDate"
)
String
endDate
)
{
@RequestParam
(
"endDate"
)
String
endDate
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getAlertInfoList
(
beginDate
,
endDate
));
}
/**
*
* <pre>
* 设备联动紧急响应
* 启动所有消防队伍的警铃、广播,并自动开启所有车库门
...
...
@@ -349,9 +372,9 @@ public class AlertCalledController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备联动紧急响应"
,
notes
=
"启动所有消防队伍的警铃、广播,并自动开启所有车库门"
)
@Transactional
@RestEventTrigger
(
value
=
"opreateLogEventHandler"
)
public
ResponseModel
<
Boolean
>
controlEquip
()
throws
Exception
{
public
ResponseModel
<
Boolean
>
controlEquip
()
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
controlEquip
());
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
controlEquip
());
}
/**
...
...
@@ -363,10 +386,11 @@ public class AlertCalledController extends BaseController {
@PutMapping
(
value
=
"/reLocate"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"警情重新定位"
,
notes
=
"警情重新定位"
)
public
ResponseModel
<
Boolean
>
reLocateById
(
@RequestParam
String
alertCalled
,
@RequestParam
String
longitude
,
@RequestParam
String
latitude
)
{
@RequestParam
String
latitude
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
reLocate
(
alertCalled
,
longitude
,
latitude
));
}
/*2304 地址 联系人模糊查询缺失 陈召 2021-09-23 开始*/
/*2304 地址 联系人模糊查询缺失 陈召 2021-09-23 开始*/
/**
* 警情填报联系人模糊查询
*
...
...
@@ -376,14 +400,14 @@ public class AlertCalledController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getAmosId"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"警情填报联系人模糊查询"
,
notes
=
"警情填报联系人模糊查询"
)
public
ResponseModel
<
Object
>
getContact
(
)
{
public
ResponseModel
<
Object
>
getContact
(
)
{
if
(
redisUtils
.
hasKey
(
RedisKey
.
CONTACT_USER
))
{
Object
obj
=
redisUtils
.
get
(
RedisKey
.
CONTACT_USER
);
return
ResponseHelper
.
buildResponse
(
obj
);
}
else
{
List
<
Map
<
String
,
String
>>
contactName
=
iAlertCalledService
.
getContactName
();
redisUtils
.
set
(
RedisKey
.
CONTACT_USER
,
contactName
,
time
);
redisUtils
.
set
(
RedisKey
.
CONTACT_USER
,
contactName
,
time
);
return
ResponseHelper
.
buildResponse
(
contactName
);
}
}
...
...
@@ -397,7 +421,7 @@ public class AlertCalledController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getAddress"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"警情填报地址模糊查询"
,
notes
=
"警情填报地址模糊查询"
)
public
ResponseModel
<
List
<
String
>>
getAddress
()
{
public
ResponseModel
<
List
<
String
>>
getAddress
()
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getCalledAddress
());
}
...
...
@@ -412,45 +436,45 @@ public class AlertCalledController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getAlarmGiveStatistics"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"app领导统计"
,
notes
=
"app领导统计"
)
public
ResponseModel
<
AlarmGiveStatisticsDto
>
getAlarmGiveStatistics
()
{
public
ResponseModel
<
AlarmGiveStatisticsDto
>
getAlarmGiveStatistics
()
{
AlarmGiveStatisticsDto
dto
=
new
AlarmGiveStatisticsDto
();
LambdaQueryWrapper
<
AlertCalled
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
isNull
(
AlertCalled:
:
getFatherAlert
);
queryWrapper
.
eq
(
AlertCalled:
:
getAlertStatus
,
true
);
queryWrapper
.
eq
(
AlertCalled:
:
getIsDelete
,
false
);
queryWrapper
.
eq
(
AlertCalled:
:
getAlertStatus
,
true
);
queryWrapper
.
eq
(
AlertCalled:
:
getIsDelete
,
false
);
Integer
alertNum
=
iAlertCalledService
.
getBaseMapper
().
selectCount
(
queryWrapper
);
dto
.
setAlarmNum
(
alertNum
);
ResponseModel
<
Map
<
String
,
Object
>>
fireAlarm
=
equipFeignClient
.
getFireAlarm
();
Map
<
String
,
Object
>
map
=
fireAlarm
.
getResult
();
int
fireAlarmNum
=
!
ValidationUtil
.
isEmpty
(
map
.
get
(
"FireAlarmNum"
))
?
Integer
.
valueOf
(
map
.
get
(
"FireAlarmNum"
).
toString
())
:
0
;
Map
<
String
,
Object
>
map
=
fireAlarm
.
getResult
();
int
fireAlarmNum
=
!
ValidationUtil
.
isEmpty
(
map
.
get
(
"FireAlarmNum"
))
?
Integer
.
valueOf
(
map
.
get
(
"FireAlarmNum"
).
toString
())
:
0
;
ResponseModel
<
Map
<
String
,
Object
>>
faultAlarm
=
equipFeignClient
.
getFaultAlarm
();
map
=
faultAlarm
.
getResult
();
int
faultAlarmNum
=
!
ValidationUtil
.
isEmpty
(
map
.
get
(
"FaultAlarmNum"
))
?
Integer
.
valueOf
(
map
.
get
(
"FaultAlarmNum"
).
toString
())
:
0
;
int
faultAlarmNum
=
!
ValidationUtil
.
isEmpty
(
map
.
get
(
"FaultAlarmNum"
))
?
Integer
.
valueOf
(
map
.
get
(
"FaultAlarmNum"
).
toString
())
:
0
;
ResponseModel
<
Map
<
String
,
Object
>>
monitorEvent
=
equipFeignClient
.
getMonitorEvent
();
map
=
monitorEvent
.
getResult
();
int
monitorEventNum
=
!
ValidationUtil
.
isEmpty
(
map
.
get
(
"monitorEventNum"
))
?
Integer
.
valueOf
(
map
.
get
(
"monitorEventNum"
).
toString
())
:
0
;
int
monitorEventNum
=
!
ValidationUtil
.
isEmpty
(
map
.
get
(
"monitorEventNum"
))
?
Integer
.
valueOf
(
map
.
get
(
"monitorEventNum"
).
toString
())
:
0
;
dto
.
setIotDetection
(
fireAlarmNum
+
faultAlarmNum
+
monitorEventNum
);
dto
.
setIotDetection
(
fireAlarmNum
+
faultAlarmNum
+
monitorEventNum
);
ResponseModel
<
Object
>
currentHiddenDanger
=
latentDangerFeignClient
.
getUnFinishedDangerCount
();
Integer
currentHiddenDangerNum
=
(
Integer
)
currentHiddenDanger
.
getResult
();
Integer
currentHiddenDangerNum
=
(
Integer
)
currentHiddenDanger
.
getResult
();
dto
.
setCurrentHiddenDanger
(
currentHiddenDangerNum
);
dto
.
setAllNum
(
dto
.
getAlarmNum
()
+
dto
.
getIotDetection
()+
currentHiddenDangerNum
);
dto
.
setAllNum
(
dto
.
getAlarmNum
()
+
dto
.
getIotDetection
()
+
currentHiddenDangerNum
);
return
ResponseHelper
.
buildResponse
(
dto
);
}
/**
*
获取坐席情况
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getLocation"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"模糊获取地址的方法"
,
notes
=
"模糊获取地址的方法"
)
public
ResponseModel
<
Object
>
getLocationLike
(
@RequestParam
(
required
=
false
)
String
locationt
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getLocationLike
(
locationt
));
}
*
获取坐席情况
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getLocation"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"模糊获取地址的方法"
,
notes
=
"模糊获取地址的方法"
)
public
ResponseModel
<
Object
>
getLocationLike
(
@RequestParam
(
required
=
false
)
String
locationt
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getLocationLike
(
locationt
));
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
488f71da
...
...
@@ -861,16 +861,16 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
/* 2304 地址 联系人模糊查询缺失 陈召 2021-09-23 结束 */
public
Set
<
Map
<
String
,
Object
>>
getLocationLike
(
String
locationt
)
{
Set
<
Map
<
String
,
Object
>>
set
=
new
HashSet
<
Map
<
String
,
Object
>>();
List
<
Map
<
String
,
Object
>>
orgUserLocation
=
alertCalledMapper
.
getOrgUserLocation
(
locationt
);
List
<
Map
<
String
,
Object
>>
alertCalledLocation
=
alertCalledMapper
.
getAlertCalledLocation
(
locationt
);
List
<
Map
<
String
,
Object
>>
keySiteLocation
=
alertCalledMapper
.
getKeySiteLocation
(
locationt
);
List
<
Map
<
String
,
Object
>>
airportLocation
=
alertCalledMapper
.
getAirportLocation
(
locationt
);
set
.
addAll
(
alertCalledLocation
);
set
.
addAll
(
keySiteLocation
);
set
.
addAll
(
airportLocation
);
set
.
addAll
(
orgUserLocation
);
set
.
remove
(
null
);
return
set
;
//
Set<Map<String, Object>> set=new HashSet<Map<String, Object>>();
//
List<Map<String, Object>> orgUserLocation = alertCalledMapper.getOrgUserLocation(locationt);
//
List<Map<String, Object>> alertCalledLocation = alertCalledMapper.getAlertCalledLocation(locationt);
//
List<Map<String, Object>> keySiteLocation = alertCalledMapper.getKeySiteLocation(locationt);
//
List<Map<String, Object>> airportLocation = alertCalledMapper.getAirportLocation(locationt);
//
set.addAll(alertCalledLocation);
//
set.addAll(keySiteLocation);
//
set.addAll(airportLocation);
//
set.addAll(orgUserLocation);
//
set.remove(null);
return
alertCalledMapper
.
getLocation
()
;
}
}
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