Merge branch 'master' into develop-2
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
FROM nginx:1.15.5-alpine
|
FROM nginx:1.15.5-alpine
|
||||||
COPY ./dist/gzzn-admin/ /usr/share/nginx/html/
|
COPY ./dist/cd-airport/ /usr/share/nginx/html/
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
Vendored
+78
@@ -0,0 +1,78 @@
|
|||||||
|
node {
|
||||||
|
def mailto="601470458@qq.com,505127606@qq.com,154707516@qq.com,444949396@qq.com,714943302@qq.com" //邮件接收人员列表
|
||||||
|
def containerName="adminweb" //容器名称
|
||||||
|
def imageName="130.120.3.193/com.gzzn.omms/admin-web:0.0.1-SNAPSHOT" //镜像名称
|
||||||
|
def dockerRegistry="http://130.120.3.193"
|
||||||
|
def credentialsId="e41b57a4-436a-4617-817c-9e3f25a8a47f" //ssh证书id
|
||||||
|
def deployHost="130.120.3.231" //发布到的主机
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
checkout scm
|
||||||
|
docker.image('teracy/angular-cli').inside() {
|
||||||
|
stage('build'){
|
||||||
|
sh 'npm config set registry http://registry.npm.taobao.org/'
|
||||||
|
sh 'npm install'
|
||||||
|
sh 'ng build'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
stage('Image Build And Push'){
|
||||||
|
docker.withRegistry("${dockerRegistry}", 'privateDockerId') {
|
||||||
|
docker.build("${imageName}").push()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
stage('deploy'){
|
||||||
|
def remote = [:]
|
||||||
|
remote.name = "airport-dev"
|
||||||
|
remote.host = "${deployHost}"
|
||||||
|
remote.allowAnyHosts = true
|
||||||
|
|
||||||
|
withCredentials([sshUserPrivateKey(credentialsId: "${credentialsId}", keyFileVariable: 'kfIdentity', passphraseVariable: 'pVariable', usernameVariable: 'userName')]) {
|
||||||
|
remote.user = userName
|
||||||
|
remote.identityFile = kfIdentity
|
||||||
|
|
||||||
|
sshCommand remote: remote, command: "docker stop ${containerName}",sudo: true ,failOnError: false
|
||||||
|
sshCommand remote: remote, command: "docker rm ${containerName}",sudo: true ,failOnError: false
|
||||||
|
sshCommand remote: remote, command: "docker rmi ${imageName}",sudo: true ,failOnError: false
|
||||||
|
sshCommand remote: remote, command: "docker run -d -p 96:80 --name ${containerName} ${imageName}",sudo: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//发送邮件
|
||||||
|
emailext (
|
||||||
|
subject: "'${env.JOB_NAME} [${env.BUILD_NUMBER}]' 更新正常",
|
||||||
|
body: """
|
||||||
|
详情:
|
||||||
|
SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'
|
||||||
|
状态:${env.JOB_NAME} jenkins 更新运行正常
|
||||||
|
URL :${env.BUILD_URL}
|
||||||
|
项目名称 :${env.JOB_NAME}
|
||||||
|
项目更新进度:${env.BUILD_NUMBER}
|
||||||
|
""",
|
||||||
|
to: "${mailto}",
|
||||||
|
recipientProviders: [[$class: 'DevelopersRecipientProvider']]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
emailext (
|
||||||
|
subject: "'${env.JOB_NAME} [${env.BUILD_NUMBER}]' 更新失败",
|
||||||
|
body: """
|
||||||
|
详情:
|
||||||
|
FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'
|
||||||
|
状态:${env.JOB_NAME} jenkins 运行失败
|
||||||
|
URL :${env.BUILD_URL}
|
||||||
|
项目名称 :${env.JOB_NAME}
|
||||||
|
项目更新进度:${env.BUILD_NUMBER}
|
||||||
|
""",
|
||||||
|
to: "${mailto}",
|
||||||
|
recipientProviders: [[$class: 'DevelopersRecipientProvider']]
|
||||||
|
)
|
||||||
|
throw e
|
||||||
|
} //end catch
|
||||||
|
}
|
||||||
@@ -43,24 +43,18 @@
|
|||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<!-- <div class="input-container mr-4">
|
||||||
<label for="">航班任务: </label>
|
<label for="">航班任务: </label>
|
||||||
<select class="form-control" name="" id="">
|
<select class="form-control" name="" id="">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">到达/出发:</label>
|
<label for="">到达/出发:</label>
|
||||||
<select class="form-control" name="" id="">
|
<select class="form-control" name="" id="">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
|
||||||
<label for="">航班代理: </label>
|
|
||||||
<select class="form-control" name="" id="">
|
|
||||||
<option value=""></option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">运营状态: </label>
|
<label for="">运营状态: </label>
|
||||||
<select class="form-control" name="" id="">
|
<select class="form-control" name="" id="">
|
||||||
@@ -79,6 +73,24 @@
|
|||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="input-container mr-4">
|
||||||
|
<label for="">机坪代理: </label>
|
||||||
|
<select class="form-control" name="" id="">
|
||||||
|
<option value=""></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="input-container mr-4">
|
||||||
|
<label for="">旅客代理: </label>
|
||||||
|
<select class="form-control" name="" id="">
|
||||||
|
<option value=""></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="input-container mr-4">
|
||||||
|
<label for="">维护代理: </label>
|
||||||
|
<select class="form-control" name="" id="">
|
||||||
|
<option value=""></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="third-condition row">
|
<div class="third-condition row">
|
||||||
|
|||||||
@@ -18,28 +18,60 @@ export class MainComponent implements OnInit {
|
|||||||
public airline_color: Array<object> = [];
|
public airline_color: Array<object> = [];
|
||||||
public row_state: number;
|
public row_state: number;
|
||||||
|
|
||||||
public TOP_1 = 100000000000; // 0-1
|
public TOP_1 = 1000000000000;
|
||||||
public TOP_2 = 200000000000; // 0-2
|
public TOP_2 = 2000000000000;
|
||||||
public TOP_3 = 300000000000; // 1
|
public TOP_3 = 3000000000000;
|
||||||
public TOP_4 = 400000000000; // 2
|
public TOP_4 = 4000000000000;
|
||||||
public TOP_5 = 500000000000; // 3
|
public TOP_5 = 5000000000000;
|
||||||
public TOP_6 = 600000000000; // 4-1-1
|
public TOP_6 = 6000000000000;
|
||||||
public TOP_7 = 700000000000; // 4-1-2
|
public TOP_7 = 7000000000000;
|
||||||
public TOP_8 = 800000000000; // 4-2-1-1
|
public TOP_8 = 8000000000000;
|
||||||
public TOP_9 = 900000000000; // 4-2-1-2
|
public TOP_9 = 9000000000000;
|
||||||
public TOP_10 = 1000000000000; // 4-2-2-1
|
public TOP_10 = 10000000000000;
|
||||||
public TOP_11 = 1100000000000; // 4-2-2-2
|
public TOP_11 = 11000000000000;
|
||||||
public TOP_12 = 1200000000000; // 5-1
|
public TOP_12 = 12000000000000;
|
||||||
public TOP_13 = 1300000000000; // 5-2
|
public TOP_13 = 13000000000000;
|
||||||
public TOP_14 = 1400000000000; // 6-1-1
|
public TOP_14 = 14000000000000;
|
||||||
public TOP_15 = 10000000000000; // 6-1-2
|
public LEVEL_1 = 100000000000000;
|
||||||
public TOP_16 = 20000000000000; // 6-2
|
public LEVEL_2 = 200000000000000;
|
||||||
|
public LEVEL_3 = 300000000000000;
|
||||||
|
public LEVEL_4 = 400000000000000;
|
||||||
|
public LEVEL_5 = 500000000000000;
|
||||||
|
public LEVEL_6 = 600000000000000;
|
||||||
|
public LEVEL_7 = 700000000000000;
|
||||||
|
public LEVEL_8 = 800000000000000;
|
||||||
|
public LEVEL_9 = 900000000000000;
|
||||||
|
public LEVEL_10 = 1000000000000000;
|
||||||
|
public LEVEL_11 = 1100000000000000;
|
||||||
|
public LEVEL_12 = 1200000000000000;
|
||||||
|
public LEVEL_13 = 1300000000000000;
|
||||||
|
public LEVEL_14 = 1400000000000000;
|
||||||
|
|
||||||
|
filterItems = {
|
||||||
|
SEARCH:'',
|
||||||
|
ALCD:'',
|
||||||
|
FLIN:'',
|
||||||
|
FLTY:'',
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private httpCilent: HttpClientService
|
private httpCilent: HttpClientService
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
|
selectRow($event, i) {
|
||||||
|
this.row_state = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
getColor(col_CODE) {
|
||||||
|
if (col_CODE === 'SODT') {
|
||||||
|
return 'skyblue'
|
||||||
|
} else {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
/* 获取显示列 */
|
/* 获取显示列 */
|
||||||
@@ -56,7 +88,7 @@ export class MainComponent implements OnInit {
|
|||||||
data => {
|
data => {
|
||||||
//解析数据
|
//解析数据
|
||||||
data.forEach(element => {
|
data.forEach(element => {
|
||||||
let air_message = JSON.parse(element.value)
|
let air_message = JSON.parse(element.value);
|
||||||
this.airline_row_lists.push(air_message);
|
this.airline_row_lists.push(air_message);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -64,7 +96,7 @@ export class MainComponent implements OnInit {
|
|||||||
for (let i = 0; i < this.airline_row_lists.length; i++) {
|
for (let i = 0; i < this.airline_row_lists.length; i++) {
|
||||||
if (this.airline_row_lists[i]['MVIN'] === 'D') {
|
if (this.airline_row_lists[i]['MVIN'] === 'D') {
|
||||||
if (this.airline_row_lists[i]['TAID']) {
|
if (this.airline_row_lists[i]['TAID']) {
|
||||||
let index = this.airline_row_lists.findIndex(val => { return val['FLID'] === this.airline_row_lists[i]['TAID'] })
|
let index = this.airline_row_lists.findIndex(val => { return val['FLID'] === this.airline_row_lists[i]['TAID'] });
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
this.airline_row_lists[i]['isLinked'] = true;
|
this.airline_row_lists[i]['isLinked'] = true;
|
||||||
this.airline_row_lists[i]['linkFlight'] = this.airline_row_lists[index];
|
this.airline_row_lists[i]['linkFlight'] = this.airline_row_lists[index];
|
||||||
@@ -75,97 +107,10 @@ export class MainComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** (0)000000+实际时间(到达航班有实际时间,且未超过1小时)
|
|
||||||
(0-1)无链接航班,取实际(到达)时间
|
|
||||||
(0-2)有链接航班,且出发航班未有实际时间,取实际(到达)时间
|
|
||||||
(1)100000+商调完成时间(商调完成登机未开始)
|
|
||||||
(2)110000+登机开始时间(登机开始尚未登机结束)
|
|
||||||
(3)111000+登机结束时间(登机结束)
|
|
||||||
(4)111100+计划/预计时间(无商调完成时间、登机开始时间、登机结束时间、航班实际完成时间)
|
|
||||||
(4-1)无链接航班
|
|
||||||
(4-1-1)若有预计时间则取预计时间
|
|
||||||
(4-1-2)若无预计时间则取计划时间
|
|
||||||
(4-2)有链接航班
|
|
||||||
(4-2-1)若无实际到达时间,则
|
|
||||||
(4-2-1-1)若有预计到达时间则取预计到达时间
|
|
||||||
(4-2-1-2)若无预计到达时间则取计划到达时间
|
|
||||||
(4-2-2)若有实际到达时间,
|
|
||||||
(4-2-2-1)若有预计出发时间则取预计出发时间
|
|
||||||
(4-2-2-2)若无预计出发时间则取计划出发时间
|
|
||||||
(5)111110+计划/预计时间(航班取消)[只考虑无链接航班,因为链接航班不会有取消状态]
|
|
||||||
(5-1)若有预计时间则取预计时间
|
|
||||||
(5-2)若无预计时间则取计划时间
|
|
||||||
(6)111111+实际时间(航班完成)
|
|
||||||
(6-1)无链接航班,取实际(到达/出发)时间
|
|
||||||
(6-1-1)到达航班有实际时间,且超过(含)1小时
|
|
||||||
(6-1-2)出发航班有实际时间
|
|
||||||
(6-2)有链接航班,取实际(出发)时间
|
|
||||||
*/
|
|
||||||
|
|
||||||
//排序
|
//排序
|
||||||
this.airline_row_lists.forEach(element => {
|
this.airline_row_lists.forEach(element => {
|
||||||
if (element['ACTT']) {
|
element['order'] = this.sequence(element)
|
||||||
if (this.isArriFlight(element)) {
|
element['ORDER'] = '+' + element['order']
|
||||||
if (!this.isOneHourLater(element['ACTT'])) {
|
|
||||||
element['ORDER'] = 'TOP_1' //到港航班(无链接)有实际时间,且未超过一小时
|
|
||||||
element['order'] = new Date(dateFormatter(element['ACTT'])).getTime() + this.TOP_1
|
|
||||||
} else {
|
|
||||||
element['ORDER'] = 'TOP_14' //到港航班(无链接)有实际时间,但超过一小时
|
|
||||||
element['order'] = new Date(dateFormatter(element['ACTT'])).getTime() + this.TOP_14
|
|
||||||
}
|
|
||||||
} else if (this.isDeptFlight(element)) {
|
|
||||||
element['ORDER'] = 'TOP_15' //出发航班(无链接)有实际时间
|
|
||||||
element['order'] = new Date(dateFormatter(element['ACTT'])).getTime() + this.TOP_15
|
|
||||||
} else if (this.isLinked(element)) {
|
|
||||||
element['ORDER'] = 'TOP_16' //链接航班有实际出发时间
|
|
||||||
element['order'] = new Date(dateFormatter(element['ACTT'])).getTime() + this.TOP_16
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// if (element['SDSJ'] && !this.isBoading()) {
|
|
||||||
// element['ORDER'] = 'TOP_3'
|
|
||||||
// element['order'] = new Date(dateFormatter(element['SDSJ'])).getTime() + this.TOP_3
|
|
||||||
// }
|
|
||||||
// else if (this.isBoading() && !this.isOverBoading()){
|
|
||||||
// element['ORDER'] = 'TOP_4'
|
|
||||||
// element['order'] = new Date(dateFormatter(element['DJKS'])).getTime() + this.TOP_4
|
|
||||||
// }else if(this.isOverBoading()){
|
|
||||||
// element['ORDER'] = 'TOP_5'
|
|
||||||
// element['order'] = new Date(dateFormatter(element['DJJS'])).getTime() + this.TOP_5
|
|
||||||
// }else if(this.isCancled()){
|
|
||||||
// if(element['ESTT']){
|
|
||||||
// element['ORDER'] = 'TOP_12'
|
|
||||||
// element['order'] = new Date(dateFormatter(element['ESTT'])).getTime() + this.TOP_12
|
|
||||||
// }else{
|
|
||||||
// element['ORDER'] = 'TOP_13'
|
|
||||||
// element['order'] = new Date(dateFormatter(element['SODT'])).getTime() + this.TOP_13
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
if(this.isArriFlight(element)||this.isDeptFlight(element)){
|
|
||||||
if(element['ESTT']){
|
|
||||||
element['ORDER'] = 'TOP_6' //航班(无链接)无实际时间,取预计时间
|
|
||||||
element['order'] = new Date(dateFormatter(element['ESTT'])).getTime() + this.TOP_6
|
|
||||||
}else{
|
|
||||||
element['ORDER'] = 'TOP_7' //航班(无链接)无实际时间和预计时间,取计划时间
|
|
||||||
element['order'] = new Date(dateFormatter(element['SODT'])).getTime() + this.TOP_7
|
|
||||||
}
|
|
||||||
}else if(this.isLinked(element)){
|
|
||||||
if(element['linkFlight']['ACTT']){
|
|
||||||
element['ORDER'] = 'TOP_2' //链接航班有实际到达时间,无出发时间
|
|
||||||
element['order'] = new Date(dateFormatter(element['linkFlight']['ACTT'])).getTime() + this.TOP_2
|
|
||||||
}else if(!element['linkFlight']['ACTT']){
|
|
||||||
if(element['linkFlight']['ESTT']){
|
|
||||||
element['ORDER'] = 'TOP_8' //链接航班无实际到达时间,取预计到达时间
|
|
||||||
element['order'] = new Date(dateFormatter(element['linkFlight']['ESTT'])).getTime() + this.TOP_8
|
|
||||||
}else{
|
|
||||||
element['ORDER'] = 'TOP_9' //链接航班无实际到达时间和预计到达时间,取计划到达时间
|
|
||||||
element['order'] = new Date(dateFormatter(element['linkFlight']['SODT'])).getTime() + this.TOP_9
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// else if()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
this.airline_row_lists.sort(function (a, b) {
|
this.airline_row_lists.sort(function (a, b) {
|
||||||
@@ -176,20 +121,155 @@ export class MainComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
selectRow($event, i) {
|
/**
|
||||||
this.row_state = i;
|
* 行排序规则方法
|
||||||
}
|
* @param flight
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
getColor(col_CODE) {
|
/** (0)000000+实际时间(到达航班有实际时间,且未超过1小时)
|
||||||
if (col_CODE === 'SODT') {
|
(0-1)无链接航班,取实际(到达)时间
|
||||||
return 'skyblue'
|
(0-2)有链接航班,且出发航班未有实际时间,取实际(到达)时间
|
||||||
} else {
|
(1)100000+商调完成时间(商调完成登机未开始)
|
||||||
return null
|
(2)110000+登机开始时间(登机开始尚未登机结束)
|
||||||
|
(3)111000+登机结束时间(登机结束)
|
||||||
|
(4)111100+计划/预计时间(无商调完成时间、登机开始时间、登机结束时间、航班实际完成时间)
|
||||||
|
(4-1)无链接航班
|
||||||
|
(4-1-1)若有预计时间则取预计时间
|
||||||
|
(4-1-2)若无预计时间则取计划时间
|
||||||
|
(4-2)有链接航班
|
||||||
|
(4-2-1)若无实际到达时间,则
|
||||||
|
(4-2-1-1)若有预计到达时间则取预计到达时间
|
||||||
|
(4-2-1-2)若无预计到达时间则取计划到达时间
|
||||||
|
(4-2-2)若有实际到达时间,
|
||||||
|
(4-2-2-1)若有预计出发时间则取预计出发时间
|
||||||
|
(4-2-2-2)若无预计出发时间则取计划出发时间
|
||||||
|
(5)111110+计划/预计时间(航班取消)[只考虑无链接航班,因为链接航班不会有取消状态]
|
||||||
|
(5-1)若有预计时间则取预计时间
|
||||||
|
(5-2)若无预计时间则取计划时间
|
||||||
|
(6)111111+实际时间(航班完成)
|
||||||
|
(6-1)无链接航班,取实际(到达/出发)时间
|
||||||
|
(6-1-1)到达航班有实际时间,且超过(含)1小时
|
||||||
|
(6-1-2)出发航班有实际时间
|
||||||
|
(6-2)有链接航班,取实际(出发)时间
|
||||||
|
*/
|
||||||
|
|
||||||
|
public sequence(flight) {
|
||||||
|
let dateTag: number = 10;
|
||||||
|
let dateToCompare = new Date().getTime();
|
||||||
|
if (!this.isCancled(flight) && !this.isDone(flight) && this.isDelayed(flight)) {
|
||||||
|
if (this.isLinked(flight)) {
|
||||||
|
if (this.getActualDatetime(flight['linkFlight']) && !this.getActualDatetime(flight)) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getActualDatetime(flight['linkFlight']))).getTime();
|
||||||
|
dateTag = this.TOP_1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getScheduledDatetime(flight))).getTime();
|
||||||
|
dateTag = this.TOP_2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getScheduledDatetime(flight))).getTime();
|
||||||
|
dateTag = this.TOP_3;
|
||||||
|
}
|
||||||
|
return dateToCompare + dateTag;
|
||||||
}
|
}
|
||||||
|
if (!this.isCancled(flight) && !this.isDone(flight) && this.isBoading(flight)) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getScheduledDatetime(flight))).getTime();
|
||||||
|
dateTag = this.TOP_4;
|
||||||
|
return dateToCompare + dateTag;
|
||||||
|
}
|
||||||
|
if (!this.isCancled(flight) && !this.isDone(flight) && this.isFlying(flight)) {
|
||||||
|
if (this.isArriFlight(flight)) {
|
||||||
|
if (this.getEstimatedDatetime(flight)) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getEstimatedDatetime(flight))).getTime();
|
||||||
|
} else {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getScheduledDatetime(flight))).getTime();
|
||||||
|
}
|
||||||
|
} else if (this.isLinked(flight)) {
|
||||||
|
if (this.getEstimatedDatetime(flight['linkFlight'])) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getEstimatedDatetime(flight['linkFlight']))).getTime();
|
||||||
|
} else {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getScheduledDatetime(flight['linkFlight']))).getTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dateTag = this.TOP_5;
|
||||||
|
return dateToCompare + dateTag;
|
||||||
|
}
|
||||||
|
if (!this.isCancled(flight) && !this.isDone(flight) && this.isLinked(flight) && this.getActualDatetime(flight['linkFlight']) && !this.getActualDatetime(flight)) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getActualDatetime(flight['linkFlight']))).getTime();
|
||||||
|
dateTag = this.TOP_6;
|
||||||
|
return dateToCompare + dateTag;
|
||||||
|
}
|
||||||
|
if (!this.isCancled(flight) && !this.isDone(flight) && this.isDeptFlight(flight) && !this.startBoading(flight)) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getScheduledDatetime(flight))).getTime();
|
||||||
|
dateTag = this.TOP_7;
|
||||||
|
return dateToCompare + dateTag;
|
||||||
|
}
|
||||||
|
if (!this.isCancled(flight) && this.isArriFlight(flight) && this.isDone(flight)) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getActualDatetime(flight))).getTime();
|
||||||
|
dateTag = this.TOP_8;
|
||||||
|
return dateToCompare + dateTag;
|
||||||
|
}
|
||||||
|
if (!this.isCancled(flight) && !this.isDone(flight) && this.isOverBoading(flight)) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getScheduledDatetime(flight))).getTime();
|
||||||
|
dateTag = this.TOP_9;
|
||||||
|
return dateToCompare + dateTag;
|
||||||
|
}
|
||||||
|
if (!this.isCancled(flight) && !this.isDone(flight) && !this.isFlying(flight)) {
|
||||||
|
if (this.isLinked(flight)) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getScheduledDatetime(flight))).getTime();
|
||||||
|
dateTag = this.TOP_10;
|
||||||
|
} else if (this.isArriFlight(flight)) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getScheduledDatetime(flight))).getTime();
|
||||||
|
dateTag = this.TOP_11;
|
||||||
|
}
|
||||||
|
return dateToCompare + dateTag;
|
||||||
|
}
|
||||||
|
if (!this.isCancled(flight) && this.isDone(flight) && (this.isLinked(flight) || this.isDeptFlight(flight))) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getActualDatetime(flight))).getTime();
|
||||||
|
dateTag = this.TOP_12;
|
||||||
|
return dateToCompare + dateTag;
|
||||||
|
}
|
||||||
|
if (this.isCancled(flight)) {
|
||||||
|
dateToCompare = new Date(dateFormatter(this.getScheduledDatetime(flight))).getTime();
|
||||||
|
dateTag = this.TOP_13;
|
||||||
|
return dateToCompare + dateTag;
|
||||||
|
}
|
||||||
|
return this.TOP_14
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取航班实际时间
|
||||||
|
* @param flight
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public getActualDatetime(flight) {
|
||||||
|
return flight['ACTT'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取航班预计时间
|
||||||
|
* @param flight
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public getEstimatedDatetime(flight) {
|
||||||
|
return flight['ESTT']
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取航班计划时间
|
||||||
|
* @param flight
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public getScheduledDatetime(flight) {
|
||||||
|
return flight['SODT']
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断航班是否是链接航班
|
* 判断航班是否是链接航班
|
||||||
|
* @param flight
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public isLinked(flight) {
|
public isLinked(flight) {
|
||||||
@@ -202,6 +282,7 @@ export class MainComponent implements OnInit {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断航班是否是纯离港航班
|
* 判断航班是否是纯离港航班
|
||||||
|
* @param flight
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public isDeptFlight(flight) {
|
public isDeptFlight(flight) {
|
||||||
@@ -215,6 +296,7 @@ export class MainComponent implements OnInit {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断航班是否是纯到港航班
|
* 判断航班是否是纯到港航班
|
||||||
|
* @param flight
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public isArriFlight(flight) {
|
public isArriFlight(flight) {
|
||||||
@@ -225,17 +307,82 @@ export class MainComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断航班是否已经前站起飞
|
||||||
|
* @param flight
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public isFlying(flight) {
|
||||||
|
if (this.isArriFlight(flight)) {
|
||||||
|
if (flight['PADT']) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
} else if (this.isLinked(flight)) {
|
||||||
|
if (flight['linkFlight']['PADT']) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断航班是否取消
|
||||||
|
* @param flight
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public isCancled(flight) {
|
||||||
|
if (this.isArriFlight(flight) || this.isDeptFlight(flight)) {
|
||||||
|
if (flight['CNCL']) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断航班是否延误(只针对纯离港航班或链接航班中的离港航班)
|
||||||
|
* @param flight
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public isDelayed(flight) {
|
||||||
|
if (this.isDeptFlight(flight) || this.isLinked(flight)) {
|
||||||
|
if (flight['DELY']) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断航班是否已经执行完成
|
* 判断航班是否已经执行完成
|
||||||
|
* @param flight
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public isDone(flight) {
|
public isDone(flight) {
|
||||||
if (this.isArriFlight(flight) && flight.ACTT) {
|
if (this.isLinked(flight) || this.isDeptFlight(flight)) {
|
||||||
return true;
|
if (!this.getActualDatetime(flight)) {
|
||||||
} else if (this.isDeptFlight(flight) && flight.ACTT) {
|
return false;
|
||||||
return true;
|
} else {
|
||||||
} else if (this.isLinked(flight) && flight.Actt) {
|
return true;
|
||||||
return true;
|
}
|
||||||
|
} else if (this.isArriFlight(flight)) {
|
||||||
|
if (!this.getActualDatetime(flight)) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -243,39 +390,54 @@ export class MainComponent implements OnInit {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断航班是否开始登机
|
* 判断航班是否开始登机
|
||||||
|
* @param flight
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public isBoading() {
|
public startBoading(flight) {
|
||||||
return true;
|
if (this.isLinked(flight) || this.isDeptFlight(flight)) {
|
||||||
|
if (!flight['BOTM']) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断航班是否正在登机中
|
||||||
|
* @param flight
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public isBoading(flight) {
|
||||||
|
if (this.isLinked(flight) || this.isDeptFlight(flight)) {
|
||||||
|
if (flight['BOTM'] && !flight['GCTM']) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断航班是否登机结束
|
* 判断航班是否登机结束
|
||||||
|
* @param flight
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public isOverBoading() {
|
public isOverBoading(flight) {
|
||||||
return true;
|
if (this.isLinked(flight) || this.isDeptFlight(flight)) {
|
||||||
}
|
if (!flight['GCTM']) {
|
||||||
|
return false;
|
||||||
/**
|
} else {
|
||||||
* 判断航班是否取消
|
return true;
|
||||||
* @return
|
}
|
||||||
*/
|
|
||||||
public isCancled() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 判断实际时间是否已超过一小时
|
|
||||||
* @return
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public isOneHourLater(dateString) {
|
|
||||||
let nowTimeStamp = new Date().getTime()
|
|
||||||
let actTimeStamp = new Date(dateFormatter(dateString)).getTime()
|
|
||||||
if (nowTimeStamp - actTimeStamp > 3600000) {
|
|
||||||
return true
|
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,16 +39,6 @@
|
|||||||
"COL_CN":"计划到达/出发",
|
"COL_CN":"计划到达/出发",
|
||||||
"COL_ORDER":"13"
|
"COL_ORDER":"13"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"COL_CODE":"TAOP",
|
|
||||||
"COL_CN":"联合承运人",
|
|
||||||
"COL_ORDER":"2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"COL_CODE":"TAFL",
|
|
||||||
"COL_CN":"链接航班号",
|
|
||||||
"COL_ORDER":"11"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"COL_CODE":"ESTT",
|
"COL_CODE":"ESTT",
|
||||||
"COL_CN":"预计到达/出发",
|
"COL_CN":"预计到达/出发",
|
||||||
|
|||||||
+1975
-1975
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user