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 bbaa685d
authored
Dec 29, 2021
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化导出报表模板
1 parent
8d6ed97e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
29 deletions
src/main/java/cn/com/glsx/admin/modules/controller/OfflineController.java
src/main/java/cn/com/glsx/admin/modules/model/export/DeviceActiveExprot.java
src/main/java/cn/com/glsx/admin/modules/model/export/FinalPositioningExport.java
src/main/java/cn/com/glsx/admin/modules/model/export/OfflineExport.java
src/main/java/cn/com/glsx/admin/modules/controller/OfflineController.java
View file @
bbaa685
...
@@ -54,7 +54,7 @@ public class OfflineController {
...
@@ -54,7 +54,7 @@ public class OfflineController {
List
<
OfflineExport
>
offlineList
=
offlineService
.
exportOfflineList
(
offlineSearch
);
List
<
OfflineExport
>
offlineList
=
offlineService
.
exportOfflineList
(
offlineSearch
);
// 将文件写入内存流 然后上传到文件服务器 返回文件服务器的地址给前端 前端执行下载
// 将文件写入内存流 然后上传到文件服务器 返回文件服务器的地址给前端 前端执行下载
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
EasyExcelUtils
.
writeExcel
(
outputStream
,
offlineList
,
fileName
,
Judgment
Export
.
class
);
EasyExcelUtils
.
writeExcel
(
outputStream
,
offlineList
,
fileName
,
Offline
Export
.
class
);
FileUploadServerData
uploadServerData
=
FileUploadUtil
.
uploadToFileSystem
(
fileName
,
outputStream
.
toByteArray
(),
FileConstants
.
EXCEL_TYPE_XLSX
);
FileUploadServerData
uploadServerData
=
FileUploadUtil
.
uploadToFileSystem
(
fileName
,
outputStream
.
toByteArray
(),
FileConstants
.
EXCEL_TYPE_XLSX
);
return
R
.
ok
().
data
(
uploadServerData
.
getSecureUrl
());
return
R
.
ok
().
data
(
uploadServerData
.
getSecureUrl
());
}
}
...
...
src/main/java/cn/com/glsx/admin/modules/model/export/DeviceActiveExprot.java
View file @
bbaa685
...
@@ -48,7 +48,7 @@ public class DeviceActiveExprot {
...
@@ -48,7 +48,7 @@ public class DeviceActiveExprot {
/**
/**
* 设备型号 字符串类型
* 设备型号 字符串类型
**/
**/
@ExcelProperty
(
"设备
型号
"
)
@ExcelProperty
(
"设备
类型
"
)
private
String
deviceTypeStr
;
private
String
deviceTypeStr
;
/**
/**
...
@@ -59,7 +59,6 @@ public class DeviceActiveExprot {
...
@@ -59,7 +59,6 @@ public class DeviceActiveExprot {
/**
/**
* 是否有源 1 有源 0无源 字符串类型
* 是否有源 1 有源 0无源 字符串类型
*/
*/
@ExcelProperty
(
"设备类型"
)
private
String
sourceStr
;
private
String
sourceStr
;
/**
/**
...
...
src/main/java/cn/com/glsx/admin/modules/model/export/FinalPositioningExport.java
View file @
bbaa685
...
@@ -51,7 +51,7 @@ public class FinalPositioningExport {
...
@@ -51,7 +51,7 @@ public class FinalPositioningExport {
/**
/**
* 设备类型字符串 1 有线 0无线
* 设备类型字符串 1 有线 0无线
*/
*/
@ExcelProperty
(
"设备
类型
"
)
@ExcelProperty
(
"设备
型号
"
)
private
String
deviceTypeStr
;
private
String
deviceTypeStr
;
/**
/**
...
@@ -62,7 +62,6 @@ public class FinalPositioningExport {
...
@@ -62,7 +62,6 @@ public class FinalPositioningExport {
/**
/**
* 是否有源 1 有源 0无源
* 是否有源 1 有源 0无源
*/
*/
@ExcelProperty
(
"设备型号"
)
private
String
sourceStr
;
private
String
sourceStr
;
/**
/**
...
@@ -86,34 +85,34 @@ public class FinalPositioningExport {
...
@@ -86,34 +85,34 @@ public class FinalPositioningExport {
/**
/**
* 最后定位时间
* 最后定位时间
*/
*/
@ExcelProperty
(
"最后定位时间"
)
private
String
lastPoiTime
;
private
String
lastPoiTime
;
/**
/**
* 最后定位类型
* 最后定位类型
*/
*/
@ExcelProperty
(
"最后定位类型"
)
private
String
poiType
;
private
String
poiType
;
/**
/**
* 最后定位位置
* 最后定位位置
*/
*/
@ExcelProperty
(
"最后定位地址"
)
private
String
lastPoiAddress
;
private
String
lastPoiAddress
;
/**
/**
* Gps经度
* Gps经度
**/
**/
@ExcelProperty
(
"经度"
)
private
String
gpsLng
;
private
String
gpsLng
;
/**
/**
* Gps纬度
* Gps纬度
**/
**/
@ExcelProperty
(
"纬度"
)
private
String
gpsLat
;
private
String
gpsLat
;
/**
/**
* Gps最后定位地址
* Gps最后定位地址
**/
**/
@ExcelProperty
(
"最后Gps定位地址"
)
private
String
lastGpsAddress
;
private
String
lastGpsAddress
;
/**
/**
...
...
src/main/java/cn/com/glsx/admin/modules/model/export/OfflineExport.java
View file @
bbaa685
...
@@ -27,18 +27,18 @@ public class OfflineExport {
...
@@ -27,18 +27,18 @@ public class OfflineExport {
private
String
ownerName
;
private
String
ownerName
;
/**
/**
* 设备号
*/
@ExcelProperty
(
"设备号"
)
private
String
sn
;
/**
* 车架号
* 车架号
*/
*/
@ExcelProperty
(
"车架号"
)
@ExcelProperty
(
"车架号"
)
private
String
vin
;
private
String
vin
;
/**
/**
* 设备号
*/
@ExcelProperty
(
"设备号"
)
private
String
sn
;
/**
* 设备类型 8:Gps 1:OBD
* 设备类型 8:Gps 1:OBD
*/
*/
private
Integer
deviceType
;
private
Integer
deviceType
;
...
@@ -46,7 +46,6 @@ public class OfflineExport {
...
@@ -46,7 +46,6 @@ public class OfflineExport {
/**
/**
* 设备类型 字符串
* 设备类型 字符串
*/
*/
@ExcelProperty
(
"设备型号"
)
private
String
deviceTypeStr
;
private
String
deviceTypeStr
;
/**
/**
...
@@ -73,18 +72,6 @@ public class OfflineExport {
...
@@ -73,18 +72,6 @@ public class OfflineExport {
private
String
activeDate
;
private
String
activeDate
;
/**
/**
* 最后Gps定位时间
*/
@ExcelProperty
(
" 最后Gps定位时间"
)
private
String
lastGpsTime
;
/**
* 最后基站定位时间
*/
@ExcelProperty
(
" 最后基站定位时间"
)
private
String
lastBsTime
;
/**
* GPS经度
* GPS经度
**/
**/
private
String
gpsAlarmLng
;
private
String
gpsAlarmLng
;
...
@@ -95,9 +82,15 @@ public class OfflineExport {
...
@@ -95,9 +82,15 @@ public class OfflineExport {
private
String
gpsAlarmLat
;
private
String
gpsAlarmLat
;
/**
/**
* 最后Gps定位时间
*/
@ExcelProperty
(
" 最后Gps时间"
)
private
String
lastGpsTime
;
/**
* GPS报警位置
* GPS报警位置
*/
*/
@ExcelProperty
(
"最后GPS
报警位置
"
)
@ExcelProperty
(
"最后GPS
定位地址
"
)
private
String
gpsAlarmAddress
;
private
String
gpsAlarmAddress
;
/**
/**
...
@@ -111,8 +104,14 @@ public class OfflineExport {
...
@@ -111,8 +104,14 @@ public class OfflineExport {
private
String
bsAlarmLat
;
private
String
bsAlarmLat
;
/**
/**
* 最后基站定位时间
*/
@ExcelProperty
(
" 最后基站时间"
)
private
String
lastBsTime
;
/**
* BS报警位置
* BS报警位置
*/
*/
@ExcelProperty
(
"最后基站
报警位置
"
)
@ExcelProperty
(
"最后基站
定位地址
"
)
private
String
bsAlarmAddress
;
private
String
bsAlarmAddress
;
}
}
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