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
bf9777b3
Commit
bf9777b3
authored
Aug 17, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
80f87523
449602bc
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
25 deletions
+23
-25
AlertCalledMapper.xml
...e-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
+1
-1
AlertCalledController.java
...boot/module/tzs/biz/controller/AlertCalledController.java
+7
-8
DispatchPaperController.java
...ot/module/tzs/biz/controller/DispatchPaperController.java
+1
-1
DispatchTaskController.java
...oot/module/tzs/biz/controller/DispatchTaskController.java
+1
-1
RepairConsultController.java
...ot/module/tzs/biz/controller/RepairConsultController.java
+1
-1
RescueProcessController.java
...ot/module/tzs/biz/controller/RescueProcessController.java
+1
-1
TemplateController.java
...os/boot/module/tzs/biz/controller/TemplateController.java
+1
-1
VoiceRecordFileController.java
.../module/tzs/biz/controller/VoiceRecordFileController.java
+1
-2
ESAlertCalledService.java
...oot/module/tzs/biz/service/impl/ESAlertCalledService.java
+9
-9
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
bf9777b3
...
...
@@ -5,7 +5,7 @@
<select
id=
"queryAlertStatusCount"
resultType=
"java.util.Map"
>
SELECT
count( 1 ) calledCount,
sum( CASE WHEN father_alert
=
null THEN 1 ELSE 0 END ) majorAlertCount,
sum( CASE WHEN father_alert
is
null THEN 1 ELSE 0 END ) majorAlertCount,
sum( CASE WHEN alarm_type_code = 'KRJY' THEN 1 ELSE 0 END ) sleepyIncidentCount,
sum( CASE WHEN alarm_type_code = 'GZWX' THEN 1 ELSE 0 END ) faultRescueCount,
sum( CASE WHEN alarm_type_code = 'TSZX' THEN 1 ELSE 0 END ) suggestionsCount
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/AlertCalledController.java
View file @
bf9777b3
...
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.tzs.biz.controller;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.SystemClock
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -68,7 +67,7 @@ import java.util.stream.Stream;
*/
@RestController
@Api
(
tags
=
"警情接警填报记录Api"
)
@RequestMapping
(
value
=
"/
tzs/
alert-called"
)
@RequestMapping
(
value
=
"/alert-called"
)
public
class
AlertCalledController
extends
BaseController
{
@Autowired
...
...
@@ -218,21 +217,21 @@ public class AlertCalledController extends BaseController {
// 当天接警
alarmStatisticsDto
.
setTodayAlarmNum
(
map
.
get
(
"calledCount"
)
==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"calledCount"
).
toString
()))
;
//当天提交
alarmStatisticsDto
.
set
TodayAlarm
Num
(
map
.
get
(
"majorAlertCount"
)
==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"majorAlertCount"
).
toString
()))
;
alarmStatisticsDto
.
set
Submit
Num
(
map
.
get
(
"majorAlertCount"
)
==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"majorAlertCount"
).
toString
()))
;
//投诉咨询数量
alarmStatisticsDto
.
setSuggestions
(
map
.
get
(
"suggestionsCount"
)
==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"suggestionsCount"
).
toString
()))
;
//故障维修数量
alarmStatisticsDto
.
set
Suggestions
(
map
.
get
(
"faultRescueCount"
)
==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"faultRescueCount"
).
toString
()))
;
alarmStatisticsDto
.
set
FaultRescue
(
map
.
get
(
"faultRescueCount"
)
==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"faultRescueCount"
).
toString
()))
;
//困人救援数量
alarmStatisticsDto
.
setS
uggestions
(
map
.
get
(
"sleepyIncidentCount"
)
==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"sleepyIncidentCount"
).
toString
()))
;
alarmStatisticsDto
.
setS
leepyIncident
(
map
.
get
(
"sleepyIncidentCount"
)
==
null
?
0
:
Integer
.
valueOf
(
map
.
get
(
"sleepyIncidentCount"
).
toString
()))
;
Map
<
String
,
Integer
>
recordMap
=
Maps
.
newHashMap
();
// 近七天办理数量
for
(
int
i
=
1
;
i
<
8
;
i
++)
{
Map
<
String
,
Object
>
nearlySevenDaysMap
=
iAlertCalledService
.
getAlertInfoList
(
DateUtils
.
stampToDate
(
System
.
currentTimeMillis
(),
"yyyy-MM-dd"
)+
" 00:00:00"
,
DateUtils
.
stampToDate
(
System
.
currentTimeMillis
(),
"yyyy-MM-dd"
)+
" 23:59:59"
,
null
,
Map
<
String
,
Object
>
nearlySevenDaysMap
=
iAlertCalledService
.
getAlertInfoList
(
DateUtils
.
stampToDate
(
DateUtils
.
dateAddDays
(
new
Date
(),
-
i
).
getTime
(),
"yyyy-MM-dd"
)+
" 00:00:00"
,
DateUtils
.
stampToDate
(
DateUtils
.
dateAddDays
(
new
Date
(),
-
i
).
getTime
(),
"yyyy-MM-dd"
)+
" 23:59:59"
,
null
,
getUserInfo
().
getUserId
());
recordMap
.
put
(
DateUtils
.
dateFormat
(
DateUtils
.
dateAddDays
(
new
Date
(),
-
i
),
"
"
),
nearlySevenDaysMap
.
get
(
"calledCount"
)
==
null
?
0
:
Integer
.
valueOf
(
nearlySevenDaysMap
.
get
(
"calledCount"
).
toString
()));
recordMap
.
put
(
DateUtils
.
stampToDate
(
DateUtils
.
dateAddDays
(
new
Date
(),
-
i
).
getTime
(),
"yyyy-MM-dd
"
),
nearlySevenDaysMap
.
get
(
"calledCount"
)
==
null
?
0
:
Integer
.
valueOf
(
nearlySevenDaysMap
.
get
(
"calledCount"
).
toString
()));
}
alarmStatisticsDto
.
setNearlySevenDaysNum
(
recordMap
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/DispatchPaperController.java
View file @
bf9777b3
...
...
@@ -34,7 +34,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
*/
@RestController
@Api
(
tags
=
"派遣单Api"
)
@RequestMapping
(
value
=
"/
tzs/
dispatch-paper"
)
@RequestMapping
(
value
=
"/dispatch-paper"
)
public
class
DispatchPaperController
extends
BaseController
{
@Autowired
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/DispatchTaskController.java
View file @
bf9777b3
...
...
@@ -34,7 +34,7 @@ import io.swagger.annotations.ApiOperation;
*/
@RestController
@Api
(
tags
=
"派遣任务Api"
)
@RequestMapping
(
value
=
"/
tzs/
dispatch-task"
)
@RequestMapping
(
value
=
"/dispatch-task"
)
public
class
DispatchTaskController
extends
BaseController
{
@Autowired
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/RepairConsultController.java
View file @
bf9777b3
...
...
@@ -35,7 +35,7 @@ import java.util.List;
*/
@RestController
@Api
(
tags
=
"处置过程Api"
)
@RequestMapping
(
value
=
"/
tzs/
repair-consult"
)
@RequestMapping
(
value
=
"/repair-consult"
)
public
class
RepairConsultController
extends
BaseController
{
@Autowired
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/RescueProcessController.java
View file @
bf9777b3
...
...
@@ -34,7 +34,7 @@ import io.swagger.annotations.ApiOperation;
*/
@RestController
@Api
(
tags
=
"救援过程表Api"
)
@RequestMapping
(
value
=
"/
tzs/
rescue-process"
)
@RequestMapping
(
value
=
"/rescue-process"
)
public
class
RescueProcessController
extends
BaseController
{
@Autowired
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/TemplateController.java
View file @
bf9777b3
...
...
@@ -32,7 +32,7 @@ import java.util.List;
*/
@RestController
@Api
(
tags
=
"模板表Api"
)
@RequestMapping
(
value
=
"/t
zs/t
emplate"
)
@RequestMapping
(
value
=
"/template"
)
public
class
TemplateController
extends
BaseController
{
@Autowired
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/VoiceRecordFileController.java
View file @
bf9777b3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
...
...
@@ -39,7 +38,7 @@ import java.util.UUID;
*/
@RestController
@Api
(
tags
=
"通话记录附件Api"
)
@RequestMapping
(
value
=
"/
tzs/
voice-record-file"
)
@RequestMapping
(
value
=
"/voice-record-file"
)
public
class
VoiceRecordFileController
extends
BaseController
{
@Autowired
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/ESAlertCalledService.java
View file @
bf9777b3
...
...
@@ -171,39 +171,39 @@ public class ESAlertCalledService {
long
currentTime
=
System
.
currentTimeMillis
()
;
currentTime
=
currentTime
-
120
*
60
*
1000
;
BoolQueryBuilder
qb1
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
rangeQuery
(
"callTimeLong"
).
gte
(
currentTime
));
.
filter
(
QueryBuilders
.
rangeQuery
(
"callTimeLong"
).
gte
(
currentTime
));
boolMust
.
must
(
qb1
);
//报警电话一致
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getEmergencyCall
())
&&
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
()))
{
BoolQueryBuilder
qb2
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
termQuery
(
"emergencyCall.keyword"
,
alertCalled
.
getEmergencyCall
()))
.
must
(
QueryBuilders
.
termQuery
(
"contactPhone.keyword"
,
alertCalled
.
getContactPhone
()));
boolMust
.
should
(
qb2
);
.
should
(
QueryBuilders
.
termQuery
(
"emergencyCall.keyword"
,
alertCalled
.
getEmergencyCall
()))
.
should
(
QueryBuilders
.
termQuery
(
"contactPhone.keyword"
,
alertCalled
.
getContactPhone
()));
boolMust
.
must
(
qb2
);
}
//事发地点一致,或相距不超过200米的
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getAddress
()))
{
BoolQueryBuilder
qb3
=
QueryBuilders
.
boolQuery
()
.
should
(
QueryBuilders
.
matchQuery
(
"address"
,
alertCalled
.
getAddress
()));
.
filter
(
QueryBuilders
.
matchQuery
(
"address"
,
alertCalled
.
getAddress
()));
boolMust
.
should
(
qb3
);
}
//警情类型一致
BoolQueryBuilder
qb4
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
termQuery
(
"alarmTypeCode"
,
alertCalled
.
getAlarmTypeCode
()));
.
filter
(
QueryBuilders
.
termQuery
(
"alarmTypeCode"
,
alertCalled
.
getAlarmTypeCode
()));
boolMust
.
must
(
qb4
);
//使用单位名称一致
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUseUnit
()))
{
BoolQueryBuilder
qb5
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
termQuery
(
"useUnit.keyword"
,
alertCalled
.
getUseUnit
()));
.
filter
(
QueryBuilders
.
termQuery
(
"useUnit.keyword"
,
alertCalled
.
getUseUnit
()));
boolMust
.
must
(
qb5
);
}
//电梯识别码一致
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getDeviceId
()))
{
BoolQueryBuilder
qb6
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
termQuery
(
"deviceId.keyword"
,
alertCalled
.
getDeviceId
()));
boolMust
.
should
(
qb6
);
.
filter
(
QueryBuilders
.
termQuery
(
"deviceId.keyword"
,
alertCalled
.
getDeviceId
()));
boolMust
.
must
(
qb6
);
}
/**
...
...
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