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
108d313e
Commit
108d313e
authored
Jul 14, 2021
by
taabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
交接班-接警情况接口修改
parent
9679e4ca
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
8 deletions
+22
-8
AlertCalledMapper.java
...in/amos/boot/module/jcs/api/mapper/AlertCalledMapper.java
+7
-0
AlertCalledMapper.xml
...e-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
+7
-2
AlertFormValueMapper.xml
...cs-api/src/main/resources/mapper/AlertFormValueMapper.xml
+2
-2
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+1
-1
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+5
-3
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 @
108d313e
...
@@ -14,5 +14,12 @@ import java.util.Map;
...
@@ -14,5 +14,12 @@ import java.util.Map;
*/
*/
public
interface
AlertCalledMapper
extends
BaseMapper
<
AlertCalled
>
{
public
interface
AlertCalledMapper
extends
BaseMapper
<
AlertCalled
>
{
/**
* 接警情况统计-交接班用
*
* @param beginDate
* @param endDate
* @return
*/
Map
<
String
,
Integer
>
queryAlertStatusCount
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
);
Map
<
String
,
Integer
>
queryAlertStatusCount
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
108d313e
...
@@ -9,7 +9,12 @@
...
@@ -9,7 +9,12 @@
sum( CASE WHEN alert_type_code = 230 THEN 1 ELSE 0 END ) majorAlertCount
sum( CASE WHEN alert_type_code = 230 THEN 1 ELSE 0 END ) majorAlertCount
FROM
FROM
jc_alert_called
jc_alert_called
WHERE
WHERE 1 = 1
call_time BETWEEN #{beginDate} AND #{endDate}
<if
test=
"beginDate != null and beginDate != ''"
>
and call_time >= #{beginDate}
</if>
<if
test=
"endDate != null and endDate != ''"
>
and call_time
<![CDATA[ <= ]]>
#{endDate}
</if>
</select>
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertFormValueMapper.xml
View file @
108d313e
...
@@ -42,9 +42,9 @@
...
@@ -42,9 +42,9 @@
<if
test=
"params != null and params.size > 0 "
>
<if
test=
"params != null and params.size > 0 "
>
where 1=1
where 1=1
<foreach
collection=
"params"
index=
"key"
item=
"value"
>
<foreach
collection=
"params"
index=
"key"
item=
"value"
>
<if
test=
"key != null and key == 'beginDate'"
>
<if
test=
"key != null and key == 'beginDate'
and value != null and value != ''
"
>
and d.recDate >= #{value}
and d.recDate >= #{value}
</if>
</if>
<if
test=
"key != null and key == 'endDate'"
>
<if
test=
"key != null and key == 'endDate'"
>
and d.recDate
<![CDATA[<=]]>
#{value}
and d.recDate
<![CDATA[<=]]>
#{value}
</if>
</if>
...
...
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 @
108d313e
...
@@ -303,7 +303,7 @@ public class AlertCalledController extends BaseController {
...
@@ -303,7 +303,7 @@ public class AlertCalledController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/dateRange/list"
)
@GetMapping
(
value
=
"/dateRange/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询指定日期内警情列表"
,
notes
=
"查询指定日期内警情列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询指定日期内警情列表"
,
notes
=
"查询指定日期内警情列表"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
listByDateRange
(
@RequestParam
(
"beginDate"
)
String
beginDate
,
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
));
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
getAlertInfoList
(
beginDate
,
endDate
));
}
}
...
...
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 @
108d313e
...
@@ -185,8 +185,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -185,8 +185,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
*/
*/
public
List
<
Map
<
String
,
Object
>>
listByDateRange
(
String
beginDate
,
String
endDate
)
{
public
List
<
Map
<
String
,
Object
>>
listByDateRange
(
String
beginDate
,
String
endDate
)
{
// 查询指定日期内的警情列表
// 查询指定日期内的警情列表
List
<
AlertCalled
>
alertCalledList
=
List
<
AlertCalled
>
alertCalledList
=
this
.
list
(
new
LambdaQueryWrapper
<
AlertCalled
>().
between
(
AlertCalled:
:
getCallTime
,
beginDate
,
endDate
));
this
.
list
(
new
LambdaQueryWrapper
<
AlertCalled
>().
apply
(!
ValidationUtil
.
isEmpty
(
beginDate
),
"call_time >= "
+
beginDate
).
le
(
true
,
AlertCalled:
:
getCallTime
,
endDate
));
Map
<
String
,
String
>
queryParams
=
Maps
.
newHashMap
();
Map
<
String
,
String
>
queryParams
=
Maps
.
newHashMap
();
queryParams
.
put
(
"beginDate"
,
beginDate
);
queryParams
.
put
(
"beginDate"
,
beginDate
);
queryParams
.
put
(
"endDate"
,
endDate
);
queryParams
.
put
(
"endDate"
,
endDate
);
...
@@ -196,8 +198,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
...
@@ -196,8 +198,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
alertCalledList
.
stream
().
collect
(
Collectors
.
groupingBy
(
AlertCalled:
:
getAlertTypeCode
));
alertCalledList
.
stream
().
collect
(
Collectors
.
groupingBy
(
AlertCalled:
:
getAlertTypeCode
));
Map
<
Long
,
AlertCalled
>
calledMap
=
Map
<
Long
,
AlertCalled
>
calledMap
=
alertCalledList
.
stream
().
collect
(
Collectors
.
toMap
(
AlertCalled:
:
getSequenceNbr
,
Function
.
identity
()));
alertCalledList
.
stream
().
collect
(
Collectors
.
toMap
(
AlertCalled:
:
getSequenceNbr
,
Function
.
identity
()));
alertCalledMap
.
forEach
((
alert
,
list
)
->
{
alertCalledMap
.
forEach
((
alert
TypeCode
,
list
)
->
{
allList
.
addAll
(
iAlertFormValueService
.
listAll
(
alert
,
queryParams
));
allList
.
addAll
(
iAlertFormValueService
.
listAll
(
alert
TypeCode
,
queryParams
));
});
});
allList
.
forEach
(
i
->
{
allList
.
forEach
(
i
->
{
...
...
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