Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
api
Overview
Overview
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
首航-临时账号
api
Commits
05d5122e
Commit
05d5122e
authored
Nov 19, 2020
by
java-温文海
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
excel导出格式变更
parent
c774bcc4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
17 deletions
+39
-17
StatisticalDao.xml
resources/mapper/modules/airport/StatisticalDao.xml
+3
-2
StatisticalController.java
src/com/ejweb/modules/airport/api/StatisticalController.java
+9
-2
StatisticalListEntity.java
src/com/ejweb/modules/airport/entity/StatisticalListEntity.java
+27
-13
No files found.
resources/mapper/modules/airport/StatisticalDao.xml
View file @
05d5122e
...
...
@@ -176,7 +176,7 @@
favt.arr_iata_name AS arrIataName,
favt.dep_iata AS depIata,
favt.dep_iata_name AS depIataName,
favt.last_airline_time
AS lastAirlineTime,
DATE_FORMAT(favt.last_airline_time,'%Y/%m/%d')
AS lastAirlineTime,
CASE
WHEN
DATE_SUB( #{benchmarkingTime}, INTERVAL 180 DAY )
<![CDATA[<=]]>
favt.last_airline_time
...
...
@@ -218,7 +218,7 @@
<if
test=
"dbName == 'mysql'"
>
CONCAT('%', #{arrIata}, '%')
</if>
)
</if>
ORDER BY favt.last_airline_time DESC
</select>
</mapper>
\ No newline at end of file
src/com/ejweb/modules/airport/api/StatisticalController.java
View file @
05d5122e
...
...
@@ -138,8 +138,15 @@ public class StatisticalController {
List
<
StatisticalListEntity
>
list
=
new
ArrayList
<
StatisticalListEntity
>();
if
(
page
!=
null
)
{
// 查询结果为空
list
=
page
.
getList
();
//自定义导出序号
int
no
=
1
;
for
(
StatisticalListEntity
s:
list
)
{
//自定义导出格式
s
.
setDepIataLabel
(
s
.
getArrIataName
()+
"="
+
s
.
getDepIataName
());
s
.
setNo
(
no
);
no
++;
//航线状态自定义
if
(
s
.
getAirlineStatus
()
==
0
){
s
.
setStatus
(
"失效"
);
...
...
@@ -149,14 +156,14 @@ public class StatisticalController {
}
//机型状态自定义
List
<
TypeBean
>
typeBeans
=
JSON
.
parseArray
(
s
.
getAirlineJson
(),
TypeBean
.
class
);
s
.
setTypeOne
(
typeInfo
(
typeBeans
.
get
(
typeBeans
.
size
()-
typeBeans
.
size
()
),
s
.
getAirlineStatus
()));
s
.
setTypeOne
(
typeInfo
(
typeBeans
.
get
(
0
),
s
.
getAirlineStatus
()));
s
.
setTypeTwo
(
typeInfo
(
typeBeans
.
get
(
typeBeans
.
size
()-
3
),
s
.
getAirlineStatus
()));
s
.
setTypeThree
(
typeInfo
(
typeBeans
.
get
(
typeBeans
.
size
()-
2
),
s
.
getAirlineStatus
()));
s
.
setTypeFour
(
typeInfo
(
typeBeans
.
get
(
typeBeans
.
size
()-
1
),
s
.
getAirlineStatus
()));
}
String
fileName
=
"航线执行期监控统计.xlsx"
;
try
{
new
ExportExcel
(
"航线执行期监控统计
"
,
StatisticalListEntity
.
class
).
setDataList
(
list
).
write
(
response
,
fileName
).
dispose
();
new
ExportExcel
(
"航线执行期监控统计
---"
+
bean
.
getBenchmarkingTime
()
,
StatisticalListEntity
.
class
).
setDataList
(
list
).
write
(
response
,
fileName
).
dispose
();
}
catch
(
IOException
e
)
{
responseBean
.
setMessage
(
"导出数据失败"
+
e
.
getMessage
());
return
responseBean
;
...
...
src/com/ejweb/modules/airport/entity/StatisticalListEntity.java
View file @
05d5122e
...
...
@@ -12,20 +12,25 @@ public class StatisticalListEntity extends BaseEntity {
private
String
arrIataName
;
private
String
depIata
;
private
String
depIataName
;
@ExcelField
(
title
=
"最后一班航班时间"
,
type
=
0
,
align
=
1
,
sort
=
25
)
private
String
lastAirlineTime
;
private
String
updateTime
;
private
int
airlineStatus
;
private
String
airlineJson
;
@ExcelField
(
title
=
"航线状态"
,
type
=
0
,
align
=
1
,
sort
=
26
)
private
String
status
;
@ExcelField
(
title
=
"A319/A320"
,
type
=
0
,
align
=
1
,
sort
=
21
)
private
String
typeOne
;
@ExcelField
(
title
=
"A321"
,
type
=
0
,
align
=
1
,
sort
=
22
)
private
String
typeTwo
;
@ExcelField
(
title
=
"A320neo"
,
type
=
0
,
align
=
1
,
sort
=
23
)
private
String
typeThree
;
@ExcelField
(
title
=
"A330"
,
type
=
0
,
align
=
1
,
sort
=
24
)
private
String
typeFour
;
@ExcelField
(
title
=
"航线"
,
type
=
0
,
align
=
1
,
sort
=
20
)
private
String
depIataLabel
;
@ExcelField
(
title
=
"序号"
,
type
=
0
,
align
=
1
,
sort
=
19
)
private
int
no
;
public
String
getArrIata
()
{
return
arrIata
;
...
...
@@ -35,7 +40,6 @@ public class StatisticalListEntity extends BaseEntity {
this
.
arrIata
=
arrIata
;
}
@ExcelField
(
title
=
"起飞"
,
type
=
0
,
align
=
1
,
sort
=
19
)
public
String
getArrIataName
()
{
return
arrIataName
;
}
...
...
@@ -52,7 +56,6 @@ public class StatisticalListEntity extends BaseEntity {
this
.
depIata
=
depIata
;
}
@ExcelField
(
title
=
"终点"
,
type
=
0
,
align
=
1
,
sort
=
20
)
public
String
getDepIataName
()
{
return
depIataName
;
}
...
...
@@ -61,7 +64,7 @@ public class StatisticalListEntity extends BaseEntity {
this
.
depIataName
=
depIataName
;
}
@ExcelField
(
title
=
"最后一班航班时间"
,
type
=
0
,
align
=
1
,
sort
=
25
)
public
String
getLastAirlineTime
()
{
return
lastAirlineTime
;
}
...
...
@@ -95,7 +98,6 @@ public class StatisticalListEntity extends BaseEntity {
this
.
updateTime
=
updateTime
;
}
@ExcelField
(
title
=
"A319/A320"
,
type
=
0
,
align
=
1
,
sort
=
21
)
public
String
getTypeOne
()
{
return
typeOne
;
}
...
...
@@ -104,7 +106,6 @@ public class StatisticalListEntity extends BaseEntity {
this
.
typeOne
=
typeOne
;
}
@ExcelField
(
title
=
"A321"
,
type
=
0
,
align
=
1
,
sort
=
22
)
public
String
getTypeTwo
()
{
return
typeTwo
;
}
...
...
@@ -113,7 +114,6 @@ public class StatisticalListEntity extends BaseEntity {
this
.
typeTwo
=
typeTwo
;
}
@ExcelField
(
title
=
"A320neo"
,
type
=
0
,
align
=
1
,
sort
=
23
)
public
String
getTypeThree
()
{
return
typeThree
;
}
...
...
@@ -122,7 +122,6 @@ public class StatisticalListEntity extends BaseEntity {
this
.
typeThree
=
typeThree
;
}
@ExcelField
(
title
=
"A330"
,
type
=
0
,
align
=
1
,
sort
=
24
)
public
String
getTypeFour
()
{
return
typeFour
;
}
...
...
@@ -131,7 +130,6 @@ public class StatisticalListEntity extends BaseEntity {
this
.
typeFour
=
typeFour
;
}
@ExcelField
(
title
=
"航线状态"
,
type
=
0
,
align
=
1
,
sort
=
26
)
public
String
getStatus
()
{
return
status
;
}
...
...
@@ -139,4 +137,20 @@ public class StatisticalListEntity extends BaseEntity {
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getDepIataLabel
()
{
return
depIataLabel
;
}
public
void
setDepIataLabel
(
String
depIataLabel
)
{
this
.
depIataLabel
=
depIataLabel
;
}
public
int
getNo
()
{
return
no
;
}
public
void
setNo
(
int
no
)
{
this
.
no
=
no
;
}
}
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