Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ddc81e49
authored
Dec 25, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化报表查询时间参数
1 parent
6d78e653
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
100 additions
and
11 deletions
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
src/main/java/cn/com/glsx/admin/modules/model/param/CommonTearDownSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/DeviceActiveSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/FinalPositioningSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/JourneyDetailSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/JudgmentSearch.java
src/main/java/cn/com/glsx/admin/modules/model/param/OfflineSearch.java
src/main/resources/mapper/VehicleMapper.xml
src/main/java/cn/com/glsx/admin/modules/mapper/VehicleMapper.java
View file @
ddc81e4
...
...
@@ -152,7 +152,7 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
* @param offlineSearch
* @return
*/
//
@DataPerm(showSql = true)
@DataPerm
(
showSql
=
true
)
List
<
OfflineExport
>
findOfflineList
(
OfflineSearch
offlineSearch
);
/**
...
...
@@ -200,5 +200,6 @@ public interface VehicleMapper extends CommonBaseMapper<Vehicle> {
* @param offlineTime 离线时间
* @return
*/
@DataPerm
(
showSql
=
true
)
Integer
getOfflineNumber
(
@Param
(
"offlineSnList"
)
List
<
String
>
offlineSnList
,
@Param
(
"offlineTime"
)
long
offlineTime
);
}
\ No newline at end of file
src/main/java/cn/com/glsx/admin/modules/model/param/CommonTearDownSearch.java
View file @
ddc81e4
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
com.glsx.plat.common.utils.StringUtils
;
import
lombok.Data
;
/**
...
...
@@ -40,4 +41,11 @@ public class CommonTearDownSearch extends Page {
* 报警类型
*/
private
Integer
alarmType
;
public
void
setAlarmEndTime
(
String
alarmEndTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
alarmEndTime
))
{
this
.
alarmEndTime
=
alarmEndTime
;
}
this
.
alarmEndTime
=
alarmEndTime
.
concat
(
" 23:59:59"
);
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/DeviceActiveSearch.java
View file @
ddc81e4
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
com.glsx.plat.common.utils.StringUtils
;
import
lombok.Data
;
/**
...
...
@@ -14,12 +15,12 @@ public class DeviceActiveSearch extends Page {
/**
* 激活开始时间
*/
private
String
sTime
;
private
String
s
tart
Time
;
/**
* 激活截止时间
*/
private
String
eTime
;
private
String
e
nd
Time
;
/**
* 是否在线 0全部 1在线 2离线
...
...
@@ -35,4 +36,12 @@ public class DeviceActiveSearch extends Page {
* 设备号|工单号|车架号|姓名
*/
private
String
keywords
;
public
void
setEndTime
(
String
endTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
endTime
))
{
this
.
endTime
=
endTime
;
}
else
{
this
.
endTime
=
endTime
.
concat
(
" 23:59:59"
);
}
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/FinalPositioningSearch.java
View file @
ddc81e4
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
com.glsx.plat.common.utils.StringUtils
;
import
lombok.Data
;
/**
...
...
@@ -70,4 +71,25 @@ public class FinalPositioningSearch extends Page {
* 最后定位数据过滤:0 不过滤(默认); 1:过滤
*/
private
int
filterFlag
;
public
void
setActiveDateEnd
(
String
activeDateEnd
)
{
if
(
StringUtils
.
isNullOrEmpty
(
activeDateEnd
))
{
this
.
activeDateEnd
=
activeDateEnd
;
}
this
.
activeDateEnd
=
activeDateEnd
.
concat
(
" 23:59:59"
);
}
public
void
setFinalGpsTimeEnd
(
String
finalGpsTimeEnd
)
{
if
(
StringUtils
.
isNullOrEmpty
(
finalGpsTimeEnd
))
{
this
.
finalGpsTimeEnd
=
finalGpsTimeEnd
;
}
this
.
finalGpsTimeEnd
=
finalGpsTimeEnd
.
concat
(
" 23:59:59"
);
}
public
void
setFinalBsTimeEnd
(
String
finalBsTimeEnd
)
{
if
(
StringUtils
.
isNullOrEmpty
(
finalBsTimeEnd
))
{
this
.
finalBsTimeEnd
=
finalBsTimeEnd
;
}
this
.
finalBsTimeEnd
=
finalBsTimeEnd
.
concat
(
" 23:59:59"
);
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/JourneyDetailSearch.java
View file @
ddc81e4
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
com.glsx.plat.common.utils.StringUtils
;
import
lombok.Data
;
/**
...
...
@@ -29,4 +30,11 @@ public class JourneyDetailSearch extends Page {
* 设备号
*/
private
String
sn
;
public
void
setJourneyEndTime
(
String
journeyEndTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
journeyEndTime
))
{
this
.
journeyEndTime
=
journeyEndTime
;
}
this
.
journeyEndTime
=
journeyEndTime
.
concat
(
" 23:59:59"
);
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/JudgmentSearch.java
View file @
ddc81e4
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
com.glsx.plat.common.utils.StringUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -47,4 +48,11 @@ public class JudgmentSearch extends Page {
*/
@ApiModelProperty
(
name
=
"工单号|车架号|姓名|设备号"
)
private
String
keywords
;
public
void
setEndTime
(
String
endTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
endTime
))
{
this
.
endTime
=
endTime
;
}
this
.
endTime
=
endTime
.
concat
(
" 23:59:59"
);
}
}
src/main/java/cn/com/glsx/admin/modules/model/param/OfflineSearch.java
View file @
ddc81e4
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
param
;
import
cn.hutool.db.Page
;
import
com.glsx.plat.common.utils.StringUtils
;
import
lombok.Data
;
/**
...
...
@@ -55,4 +56,18 @@ public class OfflineSearch extends Page {
* 工单号|车架号|姓名
*/
private
String
keywords
;
public
void
setOfflineEndTime
(
String
offlineEndTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
offlineEndTime
))
{
this
.
offlineEndTime
=
offlineEndTime
;
}
this
.
offlineEndTime
=
offlineEndTime
.
concat
(
" 23:59:59"
);
}
public
void
setActiveEndTime
(
String
activeEndTime
)
{
if
(
StringUtils
.
isNullOrEmpty
(
activeEndTime
))
{
this
.
activeEndTime
=
activeEndTime
;
}
this
.
activeEndTime
=
activeEndTime
.
concat
(
" 23:59:59"
);
}
}
src/main/resources/mapper/VehicleMapper.xml
View file @
ddc81e4
...
...
@@ -501,6 +501,12 @@
</when>
</choose>
</if>
<if
test=
"startTime != null and startTime != ''"
>
tvd.created_date
>
= #{startTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
tvd.created_date
<
= #{endTime}
</if>
<if
test=
"keywords != null and keywords !=''"
>
and(
td.sn like '%${keywords}%'
...
...
@@ -530,14 +536,23 @@
where tv.del_flag = 0
and tvd.bind_status = 1
and tvd.del_flag = 0
<if
test=
"activeDateStart != null and activeDateStart != '' and activeDateEnd != null and activeDateEnd != ''"
>
and tvd.created_date between #{activeDateStart} and #{activeDateEnd}
<if
test=
"activeDateStart != null and activeDateStart != ''"
>
tvd.created_date
>
= #{activeDateStart}
</if>
<if
test=
"activeDateEnd != null and activeDateEnd != ''"
>
tvd.created_date
<
= #{activeDateEnd}
</if>
<if
test=
"finalGpsTimeStart != null and finalGpsTimeStart != ''
and finalGpsTimeEnd != null and finalGpsTimeEnd != ''
"
>
and tdl.last_gps_time between #{finalGpsTimeStart} and #{finalGpsTimeEnd
}
<if
test=
"finalGpsTimeStart != null and finalGpsTimeStart != ''"
>
tvd.last_gps_time
>
= #{finalGpsTimeStart
}
</if>
<if
test=
"finalBsTimeStart != null and finalBsTimeStart != '' and finalBsTimeEnd != null and finalBsTimeEnd != ''"
>
and tdl.last_bs_time between #{finalBsTimeStart} and #{finalBsTimeEnd}
<if
test=
"finalGpsTimeEnd != null and finalGpsTimeEnd != ''"
>
tvd.last_gps_time
<
= #{finalGpsTimeEnd}
</if>
<if
test=
"finalBsTimeStart != null and finalBsTimeStart != ''"
>
tvd.last_bs_time
>
= #{finalBsTimeStart}
</if>
<if
test=
"finalBsTimeEnd != null and finalBsTimeEnd != ''"
>
tvd.last_bs_time
<
= #{finalBsTimeEnd}
</if>
<if
test=
"orgId != null "
>
and tu.id = #{orgId}
...
...
@@ -637,8 +652,11 @@
and td.source = 1)
or (tdl.last_bs_time
<
#{offlineStartTime} and td.source = 0))
</if>
<if
test=
"activeStartTime != null and activeStartTime != '' and activeEndTime != null and activeEndTime != ''"
>
and tvd.created_date between #{activeStartTime} and #{activeEndTime}
<if
test=
"activeStartTime != null and activeStartTime != ''"
>
and tvd.created_date
>
= #{activeStartTime}
</if>
<if
test=
"activeEndTime != null and activeEndTime != ''"
>
and tvd.created_date
<
= #{activeEndTime}
</if>
<if
test=
"orgId != null "
>
and tu.id = #{orgId}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment