Merge branch 'dev' of http://47.122.70.237:3000/harmony_car/harmony_vehicle_terminal into dev
This commit is contained in:
commit
d35c015f7f
@ -564,7 +564,6 @@ export class BaseJudge {
|
|||||||
// }
|
// }
|
||||||
// return true
|
// return true
|
||||||
// }
|
// }
|
||||||
|
|
||||||
async judgeStart(callBack: Function, judgeUI: JudgePage, that: JudgeBusiness, beginExamInfo: JudgeBeginObj, initInfo: JudgeInitObj) {
|
async judgeStart(callBack: Function, judgeUI: JudgePage, that: JudgeBusiness, beginExamInfo: JudgeBeginObj, initInfo: JudgeInitObj) {
|
||||||
const name = judgeUI.name
|
const name = judgeUI.name
|
||||||
const kssycs = judgeUI.kssycs
|
const kssycs = judgeUI.kssycs
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
DrvexamType,
|
||||||
OnAllTasksCompletedCallback,
|
OnAllTasksCompletedCallback,
|
||||||
OnBatchProgressUpdateCallback,
|
OnBatchProgressUpdateCallback,
|
||||||
ProcessDataEnumType,
|
ProcessDataEnumType,
|
||||||
@ -91,13 +92,14 @@ export class ProcessDataTaskPool {
|
|||||||
try {
|
try {
|
||||||
console.log(QueueTag, `开始处理任务: ${JSON.stringify(taskData)}`);
|
console.log(QueueTag, `开始处理任务: ${JSON.stringify(taskData)}`);
|
||||||
|
|
||||||
|
let drvexam: DrvexamType = JSON.parse(JSON.stringify(taskData.drvexam))
|
||||||
|
drvexam.zp = ""
|
||||||
|
|
||||||
const obj: WuxiExamType = {
|
const obj: WuxiExamType = {
|
||||||
xtlb: taskData.xtlb,
|
xtlb: taskData.xtlb,
|
||||||
jkxlh: taskData.jkxlh,
|
jkxlh: taskData.jkxlh,
|
||||||
jkid: taskData.jkid,
|
jkid: taskData.jkid,
|
||||||
drvexam: {
|
drvexam: drvexam,
|
||||||
zp: "",
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
dConsole.writeProcessData(ProcessDataEnumType.WuxiExam, JSON.stringify(obj));
|
dConsole.writeProcessData(ProcessDataEnumType.WuxiExam, JSON.stringify(obj));
|
||||||
|
|
||||||
|
|||||||
@ -94,9 +94,7 @@ class CenterUDPBusiness {
|
|||||||
this.lsh = otherMessage.lsh || '0000000000000'
|
this.lsh = otherMessage.lsh || '0000000000000'
|
||||||
this.carInfo = carInfo
|
this.carInfo = carInfo
|
||||||
// TODO
|
// TODO
|
||||||
// this.udp.create(config.udplocalIp!, '8800', carInfo.udpAddress!, carInfo.messagePort!)
|
|
||||||
this.udp.create(config.udplocalIp!, '8800', "112.80.35.83", "11056")
|
this.udp.create(config.udplocalIp!, '8800', "112.80.35.83", "11056")
|
||||||
|
|
||||||
this.udp.setDealMethod(this.dealMsg)
|
this.udp.setDealMethod(this.dealMsg)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(UDPTag, "初始化中心 udp失败")
|
console.error(UDPTag, "初始化中心 udp失败")
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import {
|
|||||||
} from '../model';
|
} from '../model';
|
||||||
import { CenterUDPBusinessInstance } from '../utils/business/CenterUdpBusiness';
|
import { CenterUDPBusinessInstance } from '../utils/business/CenterUdpBusiness';
|
||||||
import { DifferentialSignal } from '../utils/business/DifferentialSignal';
|
import { DifferentialSignal } from '../utils/business/DifferentialSignal';
|
||||||
|
import { JudgeUdpBusinessInstance } from '../utils/business/JudgeUdpBusiness';
|
||||||
import { ObtainUdpBusinessInstance } from '../utils/business/ObtainUdpBusiness';
|
import { ObtainUdpBusinessInstance } from '../utils/business/ObtainUdpBusiness';
|
||||||
import { SerialPortService } from '../utils/business/SerialPortService';
|
import { SerialPortService } from '../utils/business/SerialPortService';
|
||||||
|
|
||||||
|
|||||||
@ -91,37 +91,9 @@ async function InitExam(dirName: string) {
|
|||||||
|
|
||||||
// 写过程数据
|
// 写过程数据
|
||||||
async function WriteProcessData(type: ProcessDataEnumType, data: string) {
|
async function WriteProcessData(type: ProcessDataEnumType, data: string) {
|
||||||
|
let result: LogWorkerMessage = JSON.parse(data)
|
||||||
if (type === ProcessDataEnumType.WuxiExam) {
|
if (type === ProcessDataEnumType.WuxiExam) {
|
||||||
// 改变数据为无锡所需要的数据
|
writeQueue.push({ type, data: result.data });
|
||||||
const plcData = data.split(',');
|
|
||||||
const time = dayTs().format("YYYY-MM-DD HH:mm:ss")
|
|
||||||
const lineData = [
|
|
||||||
/*帧头*/time,
|
|
||||||
/*卫星时间*/time,
|
|
||||||
/*经度*/ plcData[95],
|
|
||||||
/*纬度*/ plcData[95],
|
|
||||||
/*高度*/ plcData[86],
|
|
||||||
/*方位角*/ 0,
|
|
||||||
/*俯仰角*/ plcData[91],
|
|
||||||
/*速度角*/'',
|
|
||||||
/*速度*/ plcData[97],
|
|
||||||
/*横滚*/'',
|
|
||||||
/*卫星定位状态*/'',
|
|
||||||
/*卫星定向状态*/'',
|
|
||||||
/*前天线可用星数*/'',
|
|
||||||
/*后天线可用星数*/'',
|
|
||||||
/*东向位置坐标*/'',
|
|
||||||
/*北向位置坐标*/'',
|
|
||||||
/*天向位置坐标*/'',
|
|
||||||
/*东向速度*/'',
|
|
||||||
/*北向速度*/'',
|
|
||||||
/*评判信号1*/[plcData[14], plcData[19], plcData[5], '', plcData[2], plcData[3], plcData[7], plcData[8],
|
|
||||||
plcData[13], plcData[12], plcData[17], '', plcData[4], plcData[11], plcData[20], plcData[9], 0].join(','),
|
|
||||||
/*评判信号2*/['', plcData[28], '', '', plcData[10], '', '', '', '', '', '', '', '', '', '', '', '', ''].join(','),
|
|
||||||
/*发动机转速*/ plcData[25],
|
|
||||||
/*结束符*/ time,
|
|
||||||
];
|
|
||||||
writeQueue.push({ type, data: JSON.stringify(lineData) });
|
|
||||||
} else {
|
} else {
|
||||||
writeQueue.push({ type, data });
|
writeQueue.push({ type, data });
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user