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
c3033d29
Commit
c3033d29
authored
Sep 14, 2023
by
lupengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决警情开始时间查询和资源管理——任务站添加新站点排在末端的问题
parent
23b04fc8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
3 deletions
+36
-3
AlertCalledController.java
...module/elevator/biz/controller/AlertCalledController.java
+14
-2
RescueStationController.java
...dule/elevator/biz/controller/RescueStationController.java
+22
-1
No files found.
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/controller/AlertCalledController.java
View file @
c3033d29
...
@@ -390,6 +390,11 @@ public class AlertCalledController extends BaseController {
...
@@ -390,6 +390,11 @@ public class AlertCalledController extends BaseController {
setQueryWrapper
(
alertCalledQueryWrapper
,
alertCalled
,
sort
);
setQueryWrapper
(
alertCalledQueryWrapper
,
alertCalled
,
sort
);
// 添加接警开始时间的查询条件
if
(
alertCalledDto
.
getCallTimeStart
()
!=
null
)
{
alertCalledQueryWrapper
.
ge
(
"call_time_start"
,
alertCalledDto
.
getCallTimeStart
());
}
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
if
(
StringUtils
.
isBlank
(
pageNum
)
||
StringUtils
.
isBlank
(
pageSize
))
{
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
pageBean
=
new
Page
<>(
0
,
Long
.
MAX_VALUE
);
}
else
{
}
else
{
...
@@ -433,13 +438,19 @@ public class AlertCalledController extends BaseController {
...
@@ -433,13 +438,19 @@ public class AlertCalledController extends BaseController {
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getIsAuxiliaryScreen
()))
{
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getIsAuxiliaryScreen
()))
{
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getCallTimeStart
())
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getCallTimeStart
())
&&
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getCallTimeEnd
()))
{
&&
!
ValidationUtil
.
isEmpty
(
alertCalled
.
getCallTimeEnd
()))
{
queryWrapper
.
between
(
"call_time"
,
alertCalled
.
getCallTimeStart
(),
queryWrapper
.
between
(
"call_time
_start
"
,
alertCalled
.
getCallTimeStart
(),
alertCalled
.
getCallTimeEnd
());
alertCalled
.
getCallTimeEnd
());
}
else
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getCallTimeStart
()))
{
queryWrapper
.
ge
(
"call_time_start"
,
alertCalled
.
getCallTimeStart
());
}
}
}
else
{
}
else
{
queryWrapper
.
between
(
"call_time"
,
DateUtils
.
stampToDate
(
System
.
currentTimeMillis
(),
DateUtils
.
DATE_PATTERN
),
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getCallTimeStart
()))
{
queryWrapper
.
ge
(
"call_time_start"
,
alertCalled
.
getCallTimeStart
());
}
else
{
queryWrapper
.
between
(
"call_time_start"
,
DateUtils
.
stampToDate
(
System
.
currentTimeMillis
(),
DateUtils
.
DATE_PATTERN
),
DateUtils
.
stampToDate
(
DateUtils
.
dateAddDays
(
new
Date
(),
1
).
getTime
(),
DateUtils
.
DATE_PATTERN
));
DateUtils
.
stampToDate
(
DateUtils
.
dateAddDays
(
new
Date
(),
1
).
getTime
(),
DateUtils
.
DATE_PATTERN
));
}
}
}
if
(
alertCalled
.
getIsFatherAlert
())
{
// 0:接警;1:处警
if
(
alertCalled
.
getIsFatherAlert
())
{
// 0:接警;1:处警
queryWrapper
.
isNull
(
"father_alert"
);
queryWrapper
.
isNull
(
"father_alert"
);
...
@@ -456,6 +467,7 @@ public class AlertCalledController extends BaseController {
...
@@ -456,6 +467,7 @@ public class AlertCalledController extends BaseController {
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getAlertSource
()))
{
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getAlertSource
()))
{
queryWrapper
.
eq
(
"alert_source"
,
alertCalled
.
getAlertSource
());
queryWrapper
.
eq
(
"alert_source"
,
alertCalled
.
getAlertSource
());
}
}
return
queryWrapper
;
return
queryWrapper
;
}
}
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/controller/RescueStationController.java
View file @
c3033d29
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.elevator.biz.controller;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.elevator.biz.controller;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
...
@@ -187,6 +188,15 @@ public class RescueStationController extends BaseController {
...
@@ -187,6 +188,15 @@ public class RescueStationController extends BaseController {
}
}
page
=
iRescueStationService
.
page
(
pageBean
,
rescueStationQueryWrapper
);
page
=
iRescueStationService
.
page
(
pageBean
,
rescueStationQueryWrapper
);
IPage
<
RescueStationDto
>
rescueStationDtoIPage
=
BeanDtoVoUtils
.
iPageVoStream
(
page
,
RescueStationDto
.
class
);
IPage
<
RescueStationDto
>
rescueStationDtoIPage
=
BeanDtoVoUtils
.
iPageVoStream
(
page
,
RescueStationDto
.
class
);
// 获取查询结果列表
List
<
RescueStationDto
>
rescueStationList
=
rescueStationDtoIPage
.
getRecords
();
// 对救援站列表按照更新时间进行排序,新增的救援站将排在最前面
Collections
.
sort
(
rescueStationList
,
Comparator
.
comparing
(
RescueStationDto:
:
getRecDate
).
reversed
());
// 更新排序后的列表
rescueStationDtoIPage
.
setRecords
(
rescueStationList
);
return
ResponseHelper
.
buildResponse
(
rescueStationDtoIPage
);
return
ResponseHelper
.
buildResponse
(
rescueStationDtoIPage
);
}
}
...
@@ -217,12 +227,23 @@ public class RescueStationController extends BaseController {
...
@@ -217,12 +227,23 @@ public class RescueStationController extends BaseController {
page
.
setSize
(
Integer
.
parseInt
(
pageSize
));
page
.
setSize
(
Integer
.
parseInt
(
pageSize
));
page
.
setCurrent
(
Integer
.
parseInt
(
pageNum
));
page
.
setCurrent
(
Integer
.
parseInt
(
pageNum
));
}
}
page
=
iRescueStationService
.
getRescueStationList
(
page
,
rescueStationDto
);
page
=
iRescueStationService
.
getRescueStationList
(
page
,
rescueStationDto
);
IPage
<
RescueStationDto
>
rescueStationDtoIPage
=
ObjectUtils
.
isEmpty
(
page
)?
new
Page
<>():
BeanDtoVoUtils
.
iPageVoStream
(
page
,
RescueStationDto
.
class
);
IPage
<
RescueStationDto
>
rescueStationDtoIPage
=
ObjectUtils
.
isEmpty
(
page
)?
new
Page
<>():
BeanDtoVoUtils
.
iPageVoStream
(
page
,
RescueStationDto
.
class
);
// 获取查询结果列表
List
<
RescueStationDto
>
rescueStationList
=
rescueStationDtoIPage
.
getRecords
();
// 对救援站列表按照更新时间进行排序,新增的救援站将排在最前面
Collections
.
sort
(
rescueStationList
,
Comparator
.
comparing
(
RescueStationDto:
:
getRecDate
).
reversed
());
// 更新排序后的列表
rescueStationDtoIPage
.
setRecords
(
rescueStationList
);
// // 反转列表顺序
// Collections.reverse(rescueStationList);
return
ResponseHelper
.
buildResponse
(
rescueStationDtoIPage
);
return
ResponseHelper
.
buildResponse
(
rescueStationDtoIPage
);
}
}
/**
/**
* 根据警情id和距离返回救援机构信息
* 根据警情id和距离返回救援机构信息
* @param alertId
* @param alertId
...
...
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