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
a7da26ee
Commit
a7da26ee
authored
Feb 05, 2020
by
zhangyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c2757cd8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
4 deletions
+94
-4
StatisticalDao.xml
resources/mapper/modules/airport/StatisticalDao.xml
+67
-0
StatisticalDao.java
src/com/ejweb/modules/airport/dao/StatisticalDao.java
+3
-2
StatisticalService.java
src/com/ejweb/modules/airport/service/StatisticalService.java
+24
-2
No files found.
resources/mapper/modules/airport/StatisticalDao.xml
View file @
a7da26ee
...
@@ -93,4 +93,70 @@
...
@@ -93,4 +93,70 @@
ORDER BY ata_chn DESC
ORDER BY ata_chn DESC
LIMIT 1
LIMIT 1
</select>
</select>
<select
id=
"getStatisticalArrIataList"
resultType=
"com.ejweb.modules.airport.entity.StatisticalEntity"
>
SELECT a.verif_no as verifNo,
a.id as verifId,
CASE WHEN a.verif_type='01' OR a.verif_type='02'
OR a.verif_type='03' OR a.verif_type='04' OR a.verif_type='05'
THEN b.flight_no
ELSE a.flight_no
END flightNo,
a.route_no AS routeNo,
a.aircraft_type,
TIMESTAMPDIFF(DAY,a.start_time,CURRENT_TIMESTAMP) AS expiryDate,
roundtrip_type,
IFNULL(b.depIata,a.depIata) AS depIata,
b.arrIata,
DATE_FORMAT(a.start_time, '%Y-%m-%d') AS startTime,
CASE WHEN a.verif_type='01' OR a.verif_type='02'
OR a.verif_type='03' OR a.verif_type='04' OR a.verif_type='05'
THEN p.city_name
ELSE tt.airport_name
END depIataName,
a.verif_type as verifType,
r.city_name AS arrIataName,
a.verifued_count AS verifuedCount,
a.depart_id as departId,
d.file_path as filePath,
c.type_name as typeName,
a.state
from foc_airline_verify a
left JOIN foc_airline_connect b on a.id = b.verif_id AND b.Is_main!='0'
LEFT JOIN foc_aircraft_type c on a.aircraft_type = c.id
LEFT JOIN foc_sailing_file d on a.id = d.verif_id
LEFT JOIN foc_airports p ON p.airport_iata = b.depIata
LEFT JOIN foc_sailing_command cc ON a.id = cc.verif_id
LEFT JOIN foc_airports r ON r.airport_iata = b.arrIata
LEFT JOIN foc_airports tt ON tt.airport_iata = a.depIata
where a.verif_status='02' AND a.del_flag = #{DEL_FLAG_NORMAL}
<if
test=
"routeNo != null and routeNo != ''"
>
AND a.route_no LIKE
<if
test=
"dbName == 'oracle'"
>
'%'||#{routeNo}||'%')
</if>
<if
test=
"dbName == 'mssql'"
>
'%'+#{routeNo}+'%')
</if>
<if
test=
"dbName == 'mysql'"
>
CONCAT('%', #{routeNo}, '%')
</if>
</if>
<if
test=
"verifNo != null and verifNo != ''"
>
AND a.verif_no LIKE
<if
test=
"dbName == 'oracle'"
>
'%'||#{verifNo}||'%')
</if>
<if
test=
"dbName == 'mssql'"
>
'%'+#{verifNo}+'%')
</if>
<if
test=
"dbName == 'mysql'"
>
CONCAT('%', #{verifNo}, '%')
</if>
</if>
<if
test=
"verifType != null and verifType != ''"
>
AND a.verif_type = #{verifType}
</if>
AND (a.id in (
SELECT id FROM foc_airline_verify where depIata =#{depIata} AND arrIata= #{arrIata} ) OR a.id IN
(SELECT verif_id FROM foc_airline_connect WHERE depIata =#{depIata} and arrIata =#{arrIata} AND is_main != '0')
)
<if
test=
"aircraftType != null and aircraftType != ''"
>
AND a.aircraft_type = #{aircraftType}
</if>
GROUP BY verifNo,routeNo,arrIata,depIata
</select>
</mapper>
</mapper>
\ No newline at end of file
src/com/ejweb/modules/airport/dao/StatisticalDao.java
View file @
a7da26ee
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
*/
*/
package
com
.
ejweb
.
modules
.
airport
.
dao
;
package
com
.
ejweb
.
modules
.
airport
.
dao
;
import
java.util.List
;
import
com.ejweb.core.base.BaseDao
;
import
com.ejweb.core.base.BaseDao
;
import
com.ejweb.modules.airport.bean.StatisticalBean
;
import
com.ejweb.modules.airport.bean.StatisticalBean
;
import
com.ejweb.modules.airport.entity.StatisticalEntity
;
import
com.ejweb.modules.airport.entity.StatisticalEntity
;
import
java.util.List
;
/**
/**
*
*
* @team suzhou
* @team suzhou
...
@@ -19,5 +19,6 @@ import com.ejweb.modules.airport.entity.StatisticalEntity;
...
@@ -19,5 +19,6 @@ import com.ejweb.modules.airport.entity.StatisticalEntity;
public
interface
StatisticalDao
extends
BaseDao
{
public
interface
StatisticalDao
extends
BaseDao
{
List
<
StatisticalEntity
>
getStatisticalList
(
StatisticalBean
bean
);
List
<
StatisticalEntity
>
getStatisticalList
(
StatisticalBean
bean
);
List
<
StatisticalEntity
>
getStatisticalArrIataList
(
StatisticalBean
bean
);
Integer
getDay
(
StatisticalEntity
entity
);
Integer
getDay
(
StatisticalEntity
entity
);
}
}
src/com/ejweb/modules/airport/service/StatisticalService.java
View file @
a7da26ee
...
@@ -18,6 +18,8 @@ import org.apache.log4j.Logger;
...
@@ -18,6 +18,8 @@ import org.apache.log4j.Logger;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -46,7 +48,15 @@ public class StatisticalService extends BaseService<StatisticalDao> {
...
@@ -46,7 +48,15 @@ public class StatisticalService extends BaseService<StatisticalDao> {
}
else
{
}
else
{
PageHelper
.
orderBy
(
"source,"
+
bean
.
getSort
());
PageHelper
.
orderBy
(
"source,"
+
bean
.
getSort
());
}
}
List
<
StatisticalEntity
>
lists
=
dao
.
getStatisticalList
(
bean
);
// 双向查询目的地修正
String
depIata
=
bean
.
getDepIata
();
String
arrIata
=
bean
.
getArrIata
();
List
<
StatisticalEntity
>
lists
=
null
;
if
(
depIata
.
length
()
!=
0
&&
arrIata
.
length
()
!=
0
)
{
lists
=
dao
.
getStatisticalArrIataList
(
bean
);
}
else
{
lists
=
dao
.
getStatisticalList
(
bean
);
}
LOG
.
info
(
"用户userCode:"
+
bean
.
getUserCode
());
LOG
.
info
(
"用户userCode:"
+
bean
.
getUserCode
());
String
departId
=
airlineVerifiedDao
.
findDepartId
(
abean
);
String
departId
=
airlineVerifiedDao
.
findDepartId
(
abean
);
for
(
StatisticalEntity
e
:
lists
)
{
for
(
StatisticalEntity
e
:
lists
)
{
...
@@ -60,11 +70,23 @@ public class StatisticalService extends BaseService<StatisticalDao> {
...
@@ -60,11 +70,23 @@ public class StatisticalService extends BaseService<StatisticalDao> {
}
else
{
}
else
{
e
.
setReStart
(
false
);
e
.
setReStart
(
false
);
}
}
// 根据调机进行状态修改
String
startTime
=
e
.
getStartTime
();
Date
date
=
new
Date
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
format
=
sdf
.
format
(
date
);
if
(
"05"
.
equals
(
e
.
getVerifType
()))
{
if
(
null
!=
startTime
&&
format
==
startTime
)
{
e
.
setExpiryDate
(
10
+
""
);
}
else
{
e
.
setExpiryDate
(-
10
+
""
);
}
}
if
(
"06"
.
equals
(
e
.
getVerifType
())
||
"07"
.
equals
(
e
.
getVerifType
())
if
(
"06"
.
equals
(
e
.
getVerifType
())
||
"07"
.
equals
(
e
.
getVerifType
())
||
"08"
.
equals
(
e
.
getVerifType
()))
{
||
"08"
.
equals
(
e
.
getVerifType
()))
{
e
.
setExpiryDate
(
"长期有效"
);
e
.
setExpiryDate
(
"长期有效"
);
}
else
{
}
else
if
(!
"05"
.
equals
(
e
.
getVerifType
()))
{
Integer
day
=
dao
.
getDay
(
e
);
Integer
day
=
dao
.
getDay
(
e
);
if
(
day
!=
null
)
{
if
(
day
!=
null
)
{
if
(
day
>
180
&&
Integer
.
parseInt
(
e
.
getExpiryDate
())
>
180
)
{
if
(
day
>
180
&&
Integer
.
parseInt
(
e
.
getExpiryDate
())
>
180
)
{
...
...
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