消息联调登机门和值机柜台修改
This commit is contained in:
@@ -132,7 +132,7 @@ export class MainComponent implements OnInit {
|
|||||||
let data = JSON.parse(event as string);
|
let data = JSON.parse(event as string);
|
||||||
if (data.topic === 'schd') {
|
if (data.topic === 'schd') {
|
||||||
let message = JSON.parse(data.message);
|
let message = JSON.parse(data.message);
|
||||||
// console.log(message);
|
console.log(message);
|
||||||
//是否可以开始处理动态消息
|
//是否可以开始处理动态消息
|
||||||
if (this.canHandleDynamicMessage) {
|
if (this.canHandleDynamicMessage) {
|
||||||
this.dynamicMessageHandle(message);
|
this.dynamicMessageHandle(message);
|
||||||
@@ -141,7 +141,7 @@ export class MainComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
} else if (data.topic === 'msg') {
|
} else if (data.topic === 'msg') {
|
||||||
let message = JSON.parse(data.message);
|
let message = JSON.parse(data.message);
|
||||||
// console.log(message);
|
console.log(message);
|
||||||
if (this.canHandleDynamicAlert) {
|
if (this.canHandleDynamicAlert) {
|
||||||
this.dynamicAlertHandle(message);
|
this.dynamicAlertHandle(message);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -68,9 +68,8 @@ export class AlertMessageHandle {
|
|||||||
temp2 = reason;
|
temp2 = reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// alertText += "\n延误码:" + code;
|
||||||
alertText += "\n延误码:" + code;
|
|
||||||
|
|
||||||
let fimsFlightstatusDefinition = null;
|
let fimsFlightstatusDefinition = null;
|
||||||
|
|
||||||
if (flightStatusDefinitions && flightStatusDefinitions.length > 0) {
|
if (flightStatusDefinitions && flightStatusDefinitions.length > 0) {
|
||||||
@@ -153,8 +152,8 @@ export class AlertMessageHandle {
|
|||||||
let ckdts = message.FLOP["CKDT"];
|
let ckdts = message.FLOP["CKDT"];
|
||||||
for (let i = 0; i < ckdts.length; i++) {
|
for (let i = 0; i < ckdts.length; i++) {
|
||||||
let chkc = ckdts[i]["CHKC"],
|
let chkc = ckdts[i]["CHKC"],
|
||||||
cotm = ckdts[i]["GOTM"],
|
cotm = ckdts[i]["COTM"],
|
||||||
cctm = ckdts[i]["GCTM"];
|
cctm = ckdts[i]["CCTM"];
|
||||||
if (chkc) {
|
if (chkc) {
|
||||||
ckdtCode += chkc + ":【值机打开:" + (!cotm ? "待定" : this.utils.dateFormatter(cotm)) + ";值机关闭:" + (!cctm ? "待定" : this.utils.dateFormatter(cctm)) + "】\n";
|
ckdtCode += chkc + ":【值机打开:" + (!cotm ? "待定" : this.utils.dateFormatter(cotm)) + ";值机关闭:" + (!cctm ? "待定" : this.utils.dateFormatter(cctm)) + "】\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,16 +58,28 @@ export class TransferRenderHandle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public gctmFormatter(flight) {
|
public gctmFormatter(flight) {
|
||||||
|
function add0(m) {
|
||||||
|
return m < 10 ? '0' + m : m
|
||||||
|
}
|
||||||
if (flight['GTDT']) {
|
if (flight['GTDT']) {
|
||||||
if (Array.isArray(flight['GTDT']) && flight['GTDT'].length > 0) {
|
if (Array.isArray(flight['GTDT']) && flight['GTDT'].length > 0) {
|
||||||
let gtdt = flight['GTDT'];
|
let gtdt = flight['GTDT'];
|
||||||
|
let gctmArray = [];
|
||||||
gtdt.forEach(element => {
|
gtdt.forEach(element => {
|
||||||
|
if (element['GCTM']) {
|
||||||
|
let gctmTime = new Date(this.utils.dateFormatter(element['GCTM'])).getTime();
|
||||||
|
gctmArray.push(gctmTime)
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (gctmArray.length > 0) {
|
||||||
|
let laterTime = Math.max.apply(null, gctmArray);
|
||||||
|
return add0(new Date(laterTime).getHours()) + ':' + add0(new Date(laterTime).getMinutes())
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// return this.utils.timeFormatter(flight['GTDT'][0]['GCTM']);
|
||||||
return this.utils.timeFormatter(flight['GTDT'][0]['GCTM']);
|
|
||||||
} else if (Object.prototype.toString.call(flight['GTDT']) === '[object Object]') {
|
} else if (Object.prototype.toString.call(flight['GTDT']) === '[object Object]') {
|
||||||
return this.utils.timeFormatter(flight['GTDT']['GCTM']);
|
return this.utils.timeFormatter(flight['GTDT']['GCTM']);
|
||||||
} else {
|
} else {
|
||||||
@@ -183,9 +195,26 @@ export class TransferRenderHandle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public cctmFormatter(flight) {
|
public cctmFormatter(flight) {
|
||||||
|
function add0(m) {
|
||||||
|
return m < 10 ? '0' + m : m
|
||||||
|
}
|
||||||
if (flight['CKDT']) {
|
if (flight['CKDT']) {
|
||||||
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
||||||
return this.utils.timeFormatter(flight['CKDT'][0]['CCTM']);
|
let ckdt = flight['CKDT'];
|
||||||
|
let cctmArray = [];
|
||||||
|
ckdt.forEach(element => {
|
||||||
|
if (element['CCTM']) {
|
||||||
|
let cctmTime = new Date(this.utils.dateFormatter(element['CCTM'])).getTime();
|
||||||
|
cctmArray.push(cctmTime)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (cctmArray.length > 0) {
|
||||||
|
let laterTime = Math.max.apply(null, cctmArray);
|
||||||
|
return add0(new Date(laterTime).getHours()) + ':' + add0(new Date(laterTime).getMinutes())
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
} else if (Object.prototype.toString.call(flight['CKDT']) === '[object Object]') {
|
} else if (Object.prototype.toString.call(flight['CKDT']) === '[object Object]') {
|
||||||
return this.utils.timeFormatter(flight['CKDT']['CCTM']);
|
return this.utils.timeFormatter(flight['CKDT']['CCTM']);
|
||||||
} else {
|
} else {
|
||||||
@@ -196,11 +225,28 @@ export class TransferRenderHandle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public cotmFormatter(flight) {
|
public cotmFormatter(flight) {
|
||||||
|
function add0(m) {
|
||||||
|
return m < 10 ? '0' + m : m
|
||||||
|
}
|
||||||
if (flight['CKDT']) {
|
if (flight['CKDT']) {
|
||||||
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
||||||
return this.utils.timeFormatter(flight['CKDT'][0]['COTM']);
|
let ckdt = flight['CKDT'];
|
||||||
|
let cotmArray = [];
|
||||||
|
ckdt.forEach(element => {
|
||||||
|
if (element['COTM']) {
|
||||||
|
let cctmTime = new Date(this.utils.dateFormatter(element['COTM'])).getTime();
|
||||||
|
cotmArray.push(cctmTime)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (cotmArray.length > 0) {
|
||||||
|
let laterTime = Math.min.apply(null, cotmArray);
|
||||||
|
return add0(new Date(laterTime).getHours()) + ':' + add0(new Date(laterTime).getMinutes())
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
} else if (Object.prototype.toString.call(flight['CKDT']) === '[object Object]') {
|
} else if (Object.prototype.toString.call(flight['CKDT']) === '[object Object]') {
|
||||||
return this.utils.timeFormatter(flight['CKDT']['COTM']);
|
return this.utils.timeFormatter(flight['CKDT']['CCTM']);
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,9 +234,26 @@ onmessage = function (dynamicData) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'GCTM': function gctmFormatter(flight) {
|
'GCTM': function gctmFormatter(flight) {
|
||||||
|
function add0(m) {
|
||||||
|
return m < 10 ? '0' + m : m
|
||||||
|
}
|
||||||
if (flight['GTDT']) {
|
if (flight['GTDT']) {
|
||||||
if (Array.isArray(flight['GTDT']) && flight['GTDT'].length > 0) {
|
if (Array.isArray(flight['GTDT']) && flight['GTDT'].length > 0) {
|
||||||
return timeFormatter(flight['GTDT'][0]['GCTM']);
|
let gtdt = flight['GTDT'];
|
||||||
|
let gctmArray = [];
|
||||||
|
gtdt.forEach(element => {
|
||||||
|
if (element['GCTM']) {
|
||||||
|
let gctmTime = new Date(dateFormatter(element['GCTM'])).getTime();
|
||||||
|
gctmArray.push(gctmTime)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (gctmArray.length > 0) {
|
||||||
|
let laterTime = Math.max.apply(null, gctmArray);
|
||||||
|
return add0(new Date(laterTime).getHours()) + ':' + add0(new Date(laterTime).getMinutes())
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
} else if (Object.prototype.toString.call(flight['GTDT']) === '[object Object]') {
|
} else if (Object.prototype.toString.call(flight['GTDT']) === '[object Object]') {
|
||||||
return timeFormatter(flight['GTDT']['GCTM']);
|
return timeFormatter(flight['GTDT']['GCTM']);
|
||||||
} else {
|
} else {
|
||||||
@@ -352,9 +369,26 @@ onmessage = function (dynamicData) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'CCTM': function cctmFormatter(flight) {
|
'CCTM': function cctmFormatter(flight) {
|
||||||
|
function add0(m) {
|
||||||
|
return m < 10 ? '0' + m : m
|
||||||
|
}
|
||||||
if (flight['CKDT']) {
|
if (flight['CKDT']) {
|
||||||
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
||||||
return timeFormatter(flight['CKDT'][0]['CCTM']);
|
let ckdt = flight['CKDT'];
|
||||||
|
let cctmArray = [];
|
||||||
|
ckdt.forEach(element => {
|
||||||
|
if (element['CCTM']) {
|
||||||
|
let cctmTime = new Date(dateFormatter(element['CCTM'])).getTime();
|
||||||
|
cctmArray.push(cctmTime)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (cctmArray.length > 0) {
|
||||||
|
let laterTime = Math.max.apply(null, cctmArray);
|
||||||
|
return add0(new Date(laterTime).getHours()) + ':' + add0(new Date(laterTime).getMinutes())
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
} else if (Object.prototype.toString.call(flight['CKDT']) === '[object Object]') {
|
} else if (Object.prototype.toString.call(flight['CKDT']) === '[object Object]') {
|
||||||
return timeFormatter(flight['CKDT']['CCTM']);
|
return timeFormatter(flight['CKDT']['CCTM']);
|
||||||
} else {
|
} else {
|
||||||
@@ -365,11 +399,28 @@ onmessage = function (dynamicData) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'COTM': function cotmFormatter(flight) {
|
'COTM': function cotmFormatter(flight) {
|
||||||
|
function add0(m) {
|
||||||
|
return m < 10 ? '0' + m : m
|
||||||
|
}
|
||||||
if (flight['CKDT']) {
|
if (flight['CKDT']) {
|
||||||
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
if (Array.isArray(flight['CKDT']) && flight['CKDT'].length > 0) {
|
||||||
return timeFormatter(flight['CKDT'][0]['COTM']);
|
let ckdt = flight['CKDT'];
|
||||||
|
let cotmArray = [];
|
||||||
|
ckdt.forEach(element => {
|
||||||
|
if (element['COTM']) {
|
||||||
|
let cctmTime = new Date(dateFormatter(element['COTM'])).getTime();
|
||||||
|
cotmArray.push(cctmTime)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (cotmArray.length > 0) {
|
||||||
|
let laterTime = Math.min.apply(null, cotmArray);
|
||||||
|
return add0(new Date(laterTime).getHours()) + ':' + add0(new Date(laterTime).getMinutes())
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
} else if (Object.prototype.toString.call(flight['CKDT']) === '[object Object]') {
|
} else if (Object.prototype.toString.call(flight['CKDT']) === '[object Object]') {
|
||||||
return timeFormatter(flight['CKDT']['COTM']);
|
return timeFormatter(flight['CKDT']['CCTM']);
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user