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 4a6486db
authored
Oct 26, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新E盾 1.30 版本开发 修改日里程导出BUG
1 parent
57274490
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
src/main/java/cn/com/glsx/admin/modules/controller/MileageController.java
src/main/java/cn/com/glsx/admin/modules/controller/OilController.java
src/main/java/cn/com/glsx/admin/modules/utils/DateUtil.java
src/main/java/cn/com/glsx/admin/modules/controller/MileageController.java
View file @
4a6486d
...
@@ -58,7 +58,6 @@ public class MileageController {
...
@@ -58,7 +58,6 @@ public class MileageController {
}
}
@GetMapping
(
value
=
"/export"
)
@GetMapping
(
value
=
"/export"
)
@SysLog
(
module
=
"导出里程统计报表"
,
value
=
"导出里程统计报表"
,
action
=
OperateType
.
QUERY
)
@ApiOperation
(
value
=
"导出里程统计报表"
)
@ApiOperation
(
value
=
"导出里程统计报表"
)
public
void
exportMileageReport
(
MileageSearch
search
)
throws
Exception
{
public
void
exportMileageReport
(
MileageSearch
search
)
throws
Exception
{
log
.
info
(
"里程统计报表导出===start"
);
log
.
info
(
"里程统计报表导出===start"
);
...
@@ -71,7 +70,6 @@ public class MileageController {
...
@@ -71,7 +70,6 @@ public class MileageController {
}
}
@GetMapping
(
value
=
"/exportdailydetails"
)
@GetMapping
(
value
=
"/exportdailydetails"
)
@SysLog
(
module
=
"导出每日里程统计报表"
,
value
=
"导出每日里程统计报表"
,
action
=
OperateType
.
QUERY
)
@ApiOperation
(
value
=
"导出每日里程统计报表"
)
@ApiOperation
(
value
=
"导出每日里程统计报表"
)
public
void
exportDailyMileageReport
(
MileageSearch
search
)
throws
Exception
{
public
void
exportDailyMileageReport
(
MileageSearch
search
)
throws
Exception
{
log
.
info
(
"日里程详细报表导出===start"
);
log
.
info
(
"日里程详细报表导出===start"
);
...
@@ -108,7 +106,6 @@ public class MileageController {
...
@@ -108,7 +106,6 @@ public class MileageController {
}
}
@GetMapping
(
"/dailyexport"
)
@GetMapping
(
"/dailyexport"
)
@SysLog
(
module
=
"导出里程详情统计"
,
value
=
"导出里程详情统计"
,
action
=
OperateType
.
QUERY
)
@ApiOperation
(
value
=
"导出里程详情统计"
)
@ApiOperation
(
value
=
"导出里程详情统计"
)
public
void
dailyExport
(
DailyMileageSearch
search
)
throws
Exception
{
public
void
dailyExport
(
DailyMileageSearch
search
)
throws
Exception
{
log
.
info
(
"里程详情统计导出===start"
);
log
.
info
(
"里程详情统计导出===start"
);
...
...
src/main/java/cn/com/glsx/admin/modules/controller/OilController.java
View file @
4a6486d
...
@@ -52,7 +52,6 @@ public class OilController {
...
@@ -52,7 +52,6 @@ public class OilController {
}
}
@GetMapping
(
value
=
"/export"
)
@GetMapping
(
value
=
"/export"
)
@SysLog
(
module
=
"导出油耗统计"
,
value
=
"导出油耗统计"
,
action
=
OperateType
.
QUERY
)
@ApiOperation
(
value
=
"导出油耗统计"
)
@ApiOperation
(
value
=
"导出油耗统计"
)
public
void
exportTrialDriveReport
(
OilSearch
search
)
throws
Exception
{
public
void
exportTrialDriveReport
(
OilSearch
search
)
throws
Exception
{
log
.
info
(
"油耗统计报表导出===start"
);
log
.
info
(
"油耗统计报表导出===start"
);
...
...
src/main/java/cn/com/glsx/admin/modules/utils/DateUtil.java
View file @
4a6486d
...
@@ -446,14 +446,14 @@ public class DateUtil extends org.apache.commons.lang.time.DateUtils {
...
@@ -446,14 +446,14 @@ public class DateUtil extends org.apache.commons.lang.time.DateUtils {
List
<
List
<
String
>>
dateStr
=
new
ArrayList
<>();
List
<
List
<
String
>>
dateStr
=
new
ArrayList
<>();
// 获取两个日期的天数差
// 获取两个日期的天数差
long
daydiff
=
getDiffDays
(
startDate
,
endDate
);
long
daydiff
=
getDiffDays
(
startDate
,
endDate
);
dateStr
.
add
(
Lists
.
newArrayList
(
DateUtils
.
formatDate
(
startDate
,
"YYYY-MM-dd"
)));
dateStr
.
add
(
Lists
.
newArrayList
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
startDate
,
"YYYY-MM-dd"
)));
for
(
int
i
=
1
;
i
<
daydiff
;
i
++)
{
for
(
int
i
=
1
;
i
<
daydiff
;
i
++)
{
Calendar
calendar
=
Calendar
.
getInstance
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
startDate
);
calendar
.
setTime
(
startDate
);
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
i
);
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
i
);
dateStr
.
add
(
Lists
.
newArrayList
(
DateUtils
.
formatDate
(
calendar
.
getTime
(),
"YYYY-MM-dd"
)));
dateStr
.
add
(
Lists
.
newArrayList
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
calendar
.
getTime
(),
"YYYY-MM-dd"
)));
}
}
dateStr
.
add
(
Lists
.
newArrayList
(
DateUtils
.
formatDate
(
endDate
,
"YYYY-MM-dd"
)));
dateStr
.
add
(
Lists
.
newArrayList
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
endDate
,
"YYYY-MM-dd"
)));
return
dateStr
;
return
dateStr
;
}
}
...
...
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