version: 0.0.8
This commit is contained in:
parent
bc5a15b59a
commit
71abff6dda
2
Makefile
2
Makefile
@ -1,2 +1,2 @@
|
||||
gitLog:
|
||||
git log --since="2025-06-30 17:14" --until="2025-07-15 10:00" --pretty=format:"<details>%n <summary>%s</summary>%n <span style=\"color: #888;\">[提交人]:</span><span style=\"color: #333;\">%an</span><br>%n <span style=\"color: #888;\">[提交时间]:</span><span style=\"color: #333;\">%ad</span><br>%n <span style=\"color: #888;\">[提交版本]:</span><span style=\"color: #333;\">%h</span>%n</details>%n" --date=format:"%Y-%m-%d %H:%M" > release_note.md
|
||||
git log --since="2025-06-30 17:14" --until="2025-07-16 10:00" --pretty=format:"<details>%n <summary>%s</summary>%n <span style=\"color: #888;\">[提交人]:</span><span style=\"color: #333;\">%an</span><br>%n <span style=\"color: #888;\">[提交时间]:</span><span style=\"color: #333;\">%ad</span><br>%n <span style=\"color: #888;\">[提交版本]:</span><span style=\"color: #333;\">%h</span>%n</details>%n" --date=format:"%Y-%m-%d %H:%M" > release_note.md
|
||||
@ -184,37 +184,6 @@ export default class Judge {
|
||||
private isExamEnd: boolean
|
||||
// 是否发送udp
|
||||
private isUdpEnd: boolean = false
|
||||
// 处理udp plc信号
|
||||
handleUdp = async (msg: string) => {
|
||||
const stachArr = msg.split(',')
|
||||
if (stachArr[0] != '#DN_GD' || this.isUdpEnd) {
|
||||
return
|
||||
}
|
||||
const plcData = await this.getPlcData(msg);
|
||||
// 4.过程数据
|
||||
await this.fileLog?.setExamJudgeData(JSON.stringify(plcData))
|
||||
//检测到有无锡所设备接入,需要发送特定的数据,供检测
|
||||
// if (this.usbService.isWXUSBDevice) {
|
||||
// const str = await senorToWXDataStr(msg);
|
||||
// this.usbService.sendUSB(str)
|
||||
// }
|
||||
const param350: number = Reflect.get(this.judgeUI.judgeConfigObj, '350')
|
||||
this.judgeUI.sd = ((param350 == 0 ? plcData.gps.sd : plcData.sensor.cs) as number * 1.852).toFixed(0) + ''
|
||||
this.judgeUI.dw = (Math.floor(plcData.sensor.dw as number) || 0) + ''
|
||||
//TODO 暂时关闭差分检测异常
|
||||
// await this.checkDwzt(plcData.gps.dwzt,plcData.gps.jdzt);
|
||||
if (!this.isExamEnd) {
|
||||
await examJudgeRealExam(plcData)
|
||||
}
|
||||
// let udpIndex = AppStorage.get<number>('udpIndex') || 0;
|
||||
// if (udpIndex % 5 === 0 && !this.isUdpEnd) {
|
||||
// TODO UPD缺失
|
||||
// const judgeUdp = globalThis.judgeUdp
|
||||
// const bytes = await this.getMessageHeartbeat(this.isExamEnd);
|
||||
// judgeUdp.send(bytes)
|
||||
// }
|
||||
// AppStorage.setOrCreate('udpIndex', udpIndex++)
|
||||
}
|
||||
//是否手动结束考试
|
||||
private isManual: boolean = false
|
||||
//UDP服务序列号
|
||||
@ -261,6 +230,37 @@ export default class Judge {
|
||||
dConsole.info(JudgeTag, '过程数据文件上传 end')
|
||||
}
|
||||
private judgeTask: JudgeTask
|
||||
// 处理udp plc信号
|
||||
handleUdp = async (msg: string) => {
|
||||
const stachArr = msg.split(',')
|
||||
if (stachArr[0] != '#DN_GD' || this.isUdpEnd) {
|
||||
return
|
||||
}
|
||||
const plcData = await this.getPlcData(msg);
|
||||
// 4.过程数据
|
||||
await this.fileLog?.setExamJudgeData(JSON.stringify(plcData))
|
||||
//检测到有无锡所设备接入,需要发送特定的数据,供检测
|
||||
// if (this.usbService.isWXUSBDevice) {
|
||||
// const str = await senorToWXDataStr(msg);
|
||||
// this.usbService.sendUSB(str)
|
||||
// }
|
||||
const param350: number = Reflect.get(this.judgeUI.judgeConfigObj, '350')
|
||||
this.judgeUI.sd = ((param350 == 0 ? plcData.gps.sd : plcData.sensor.cs) as number * 1.852).toFixed(0) + ''
|
||||
this.judgeUI.dw = (Math.floor(plcData.sensor.dw as number) || 0) + ''
|
||||
//TODO 暂时关闭差分检测异常
|
||||
// await this.checkDwzt(plcData.gps.dwzt,plcData.gps.jdzt);
|
||||
if (!this.isExamEnd) {
|
||||
await examJudgeRealExam(plcData)
|
||||
}
|
||||
// let udpIndex = AppStorage.get<number>('udpIndex') || 0;
|
||||
// if (udpIndex % 5 === 0 && !this.isUdpEnd) {
|
||||
// TODO UPD缺失
|
||||
// const judgeUdp = globalThis.judgeUdp
|
||||
// const bytes = await this.getMessageHeartbeat(this.isExamEnd);
|
||||
// judgeUdp.send(bytes)
|
||||
// }
|
||||
// AppStorage.setOrCreate('udpIndex', udpIndex++)
|
||||
}
|
||||
private tempData?: PLCType
|
||||
//实时计算gps经纬度距离
|
||||
handDistance = async () => {
|
||||
@ -309,24 +309,40 @@ export default class Judge {
|
||||
AppStorage.setOrCreate('msgStr', plc)
|
||||
return tempData
|
||||
}
|
||||
private isEndTip: boolean = false;
|
||||
//本地轨迹回放地址
|
||||
private trajectoryPath: string
|
||||
// private currentKm2ItemsObj: any
|
||||
private isTrajectoryOpen: boolean;
|
||||
// 调代理接口是否断网了
|
||||
private isJudgeDisConnect: boolean = false;
|
||||
// 断网数据补传
|
||||
uploadDisConnectData = async () => {
|
||||
if (!this.isJudgeDisConnect) {
|
||||
return
|
||||
}
|
||||
const folderPath = this.fileLog?.folderPath
|
||||
const examDataStr = await this.fileUtil.readFile(`${folderPath}/wuxi_dis_progress_data.txt`);
|
||||
const examDataArr = examDataStr.split('\n');
|
||||
for (let examDataStr of examDataArr) {
|
||||
const code = await writeObjectOut(JSON.parse(examDataStr), "", this.context);
|
||||
}
|
||||
// 处理轨迹plc信号
|
||||
handleTrajectoryUdp = async (strArr: string[]) => {
|
||||
let num = 2;
|
||||
const judgeTimer = setInterval(async () => {
|
||||
const msgStr = strArr[num];
|
||||
if (msgStr == '') {
|
||||
dConsole.info(JudgeTag, '模拟数据考试结束')
|
||||
clearInterval(judgeTimer)
|
||||
this.checkExamIsEnd(true)
|
||||
return
|
||||
}
|
||||
const msg: PLCType = JSON.parse(strArr[num]);
|
||||
num++
|
||||
// 4.过程数据
|
||||
this.tempData = msg
|
||||
this.judgeUI.isDwztRight = (msg?.gps?.dwzt == 4 && msg?.gps?.jdzt == 3);
|
||||
this.judgeUI.sd = Math.floor(msg?.gps?.sd * 1.852) + '';
|
||||
this.judgeUI.dw = Math.floor(msg?.sensor?.dw) + ''
|
||||
this.plcData = msg
|
||||
// this.judgeUI.isDwztRight = msg.gps.dwzt == 4;
|
||||
AppStorage.setOrCreate('msgStr', '')
|
||||
if (msg.method === 'examJudgeArtificialItem') {
|
||||
this.setJudgeItem(msg.itemno, msg.type)
|
||||
}
|
||||
if (msg.method === 'examJudgeArtificialMark') {
|
||||
this.setJudgeItem(msg.itemno, msg.serial)
|
||||
}
|
||||
await examJudgeRealExam(msg)
|
||||
// const bytes = await this.getMessageHeartbeat();
|
||||
// bytes && globalThis.judgeUdp.send(bytes)
|
||||
|
||||
}, 200)
|
||||
// TODO 定时器缺失
|
||||
// globalThis.judgeTimer = judgeTimer;
|
||||
}
|
||||
// 项目开始接口同步
|
||||
beginProject = async (ksxm: number) => {
|
||||
@ -362,6 +378,25 @@ export default class Judge {
|
||||
}
|
||||
UploadRegulatoryCodeConversion('17C52', temp.code || 0)
|
||||
}
|
||||
private isEndTip: boolean = false;
|
||||
//本地轨迹回放地址
|
||||
private trajectoryPath: string
|
||||
// private currentKm2ItemsObj: any
|
||||
private isTrajectoryOpen: boolean;
|
||||
// 调代理接口是否断网了
|
||||
private isJudgeDisConnect: boolean = false;
|
||||
// 断网数据补传
|
||||
uploadDisConnectData = async () => {
|
||||
if (!this.isJudgeDisConnect) {
|
||||
return
|
||||
}
|
||||
const folderPath = this.fileLog?.folderPath
|
||||
const examDataStr = await this.fileUtil.readFile(`${folderPath}/wuxi_dis_progress_data.txt`);
|
||||
const examDataArr = examDataStr.split('\n');
|
||||
for (let examDataStr of examDataArr) {
|
||||
const code = await writeObjectOut(JSON.parse(examDataStr), "", this.context);
|
||||
}
|
||||
}
|
||||
// 项目结束接口同步
|
||||
endProject = async (ksxm: number) => {
|
||||
const carInfo = AppStorage.get<CarInfoType>('carInfo');
|
||||
@ -431,6 +466,61 @@ export default class Judge {
|
||||
UploadRegulatoryCodeConversion('17C54', temp.code || 0)
|
||||
dConsole.info(JudgeTag, '上传照片 end')
|
||||
}
|
||||
// 检测扣分、结束项目时该项目是否开始
|
||||
checkProjectIsStart = async (xmdm: number, currentType: 1 | 2, kf?: MarkRule) => {
|
||||
if (xmdm == 20) {
|
||||
return true
|
||||
}
|
||||
const judgeUI = this.judgeUI;
|
||||
const judgeTask = this.judgeTask;
|
||||
const projectsObj: object = this.judgeUI.projectsObj
|
||||
const currentProject: ProjectInfo = Reflect.get(projectsObj, xmdm)
|
||||
const isUpload = currentProject.isUpload
|
||||
|
||||
//如果项目没有开始
|
||||
dConsole.info(JudgeTag, 'surenjun isUpload=>', isUpload)
|
||||
if (!isUpload) {
|
||||
dConsole.info(JudgeTag, '项目补传开始')
|
||||
//项目开始补传
|
||||
judgeTask.addTask(async () => {
|
||||
await this.beginProject(xmdm)
|
||||
}, {
|
||||
isDelay: true
|
||||
})
|
||||
judgeTask.addTask(async () => {
|
||||
await this.uploadProgressPhoto(xmdm)
|
||||
}, {
|
||||
isDelay: true
|
||||
})
|
||||
currentProject.isUpload = true;
|
||||
Reflect.set(this.judgeUI.projectsObj, xmdm, currentProject)
|
||||
//扣分补传
|
||||
if (currentType == 2) {
|
||||
judgeTask.addTask(async () => {
|
||||
await this.pointsDedute(xmdm, kf!)
|
||||
}, {
|
||||
isDelay: true
|
||||
})
|
||||
}
|
||||
//扣分补传判断是否合格 不合格补传项目结束
|
||||
if (currentType == 1 || (currentType == 2 && this.totalScore < judgeUI.passingScore)) {
|
||||
judgeTask.addTask(async () => {
|
||||
await this.endProject(xmdm)
|
||||
}, {
|
||||
isDelay: true
|
||||
})
|
||||
currentProject.isEnd = true;
|
||||
Reflect.set(this.judgeUI.projectsObj, xmdm, currentProject)
|
||||
}
|
||||
judgeTask.addTask(async () => {
|
||||
this.checkExamIsEnd()
|
||||
})
|
||||
return false;
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
private artSubject3ProjectsCodesArr: number[] = [3, 9, 4, 10, 12, 11]
|
||||
// 校验考试是否结束
|
||||
checkExamIsEnd = async (isManual?: boolean) => {
|
||||
dConsole.log(JudgeTag, "校验考试是否结束")
|
||||
@ -546,102 +636,6 @@ export default class Judge {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 检测扣分、结束项目时该项目是否开始
|
||||
checkProjectIsStart = async (xmdm: number, currentType: 1 | 2, kf?: MarkRule) => {
|
||||
if (xmdm == 20) {
|
||||
return true
|
||||
}
|
||||
const judgeUI = this.judgeUI;
|
||||
const judgeTask = this.judgeTask;
|
||||
const projectsObj: object = this.judgeUI.projectsObj
|
||||
const currentProject: ProjectInfo = Reflect.get(projectsObj, xmdm)
|
||||
const isUpload = currentProject.isUpload
|
||||
|
||||
//如果项目没有开始
|
||||
dConsole.info(JudgeTag, 'surenjun isUpload=>', isUpload)
|
||||
if (!isUpload) {
|
||||
dConsole.info(JudgeTag, '项目补传开始')
|
||||
//项目开始补传
|
||||
judgeTask.addTask(async () => {
|
||||
await this.beginProject(xmdm)
|
||||
}, {
|
||||
isDelay: true
|
||||
})
|
||||
judgeTask.addTask(async () => {
|
||||
await this.uploadProgressPhoto(xmdm)
|
||||
}, {
|
||||
isDelay: true
|
||||
})
|
||||
currentProject.isUpload = true;
|
||||
Reflect.set(this.judgeUI.projectsObj, xmdm, currentProject)
|
||||
//扣分补传
|
||||
if (currentType == 2) {
|
||||
judgeTask.addTask(async () => {
|
||||
await this.pointsDedute(xmdm, kf!)
|
||||
}, {
|
||||
isDelay: true
|
||||
})
|
||||
}
|
||||
//扣分补传判断是否合格 不合格补传项目结束
|
||||
if (currentType == 1 || (currentType == 2 && this.totalScore < judgeUI.passingScore)) {
|
||||
judgeTask.addTask(async () => {
|
||||
await this.endProject(xmdm)
|
||||
}, {
|
||||
isDelay: true
|
||||
})
|
||||
currentProject.isEnd = true;
|
||||
Reflect.set(this.judgeUI.projectsObj, xmdm, currentProject)
|
||||
}
|
||||
judgeTask.addTask(async () => {
|
||||
this.checkExamIsEnd()
|
||||
})
|
||||
return false;
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
// 处理轨迹plc信号
|
||||
handleTrajectoryUdp = async (strArr: string[]) => {
|
||||
let num = 2;
|
||||
const judgeTimer = setInterval(async () => {
|
||||
const msgStr = strArr[num];
|
||||
if (msgStr == '') {
|
||||
dConsole.info(JudgeTag, '模拟数据考试结束')
|
||||
clearInterval(judgeTimer)
|
||||
this.checkExamIsEnd(true)
|
||||
return
|
||||
}
|
||||
const msg: PLCType = JSON.parse(strArr[num]);
|
||||
num++
|
||||
// 4.过程数据
|
||||
this.tempData = msg
|
||||
this.judgeUI.isDwztRight = (msg?.gps?.dwzt == 4 && msg?.gps?.jdzt == 3);
|
||||
this.judgeUI.sd = Math.floor(msg?.gps?.sd * 1.852) + '';
|
||||
this.judgeUI.dw = Math.floor(msg?.sensor?.dw) + ''
|
||||
this.plcData = msg
|
||||
// this.judgeUI.isDwztRight = msg.gps.dwzt == 4;
|
||||
AppStorage.setOrCreate('msgStr', '')
|
||||
if (msg.method === 'examJudgeArtificialItem') {
|
||||
this.setJudgeItem(msg.itemno, msg.type)
|
||||
}
|
||||
if (msg.method === 'examJudgeArtificialMark') {
|
||||
this.setJudgeItem(msg.itemno, msg.serial)
|
||||
}
|
||||
await examJudgeRealExam(msg)
|
||||
// const bytes = await this.getMessageHeartbeat();
|
||||
// bytes && globalThis.judgeUdp.send(bytes)
|
||||
|
||||
}, 200)
|
||||
// TODO 定时器缺失
|
||||
// globalThis.judgeTimer = judgeTimer;
|
||||
}
|
||||
private artSubject3ProjectsCodesArr: number[] = [3, 9, 4, 10, 12, 11]
|
||||
private lane: LANE = {
|
||||
road: '', num: 0, count: 0
|
||||
}
|
||||
private videoData?: RecordHandleType
|
||||
//当前科目二的考试项目
|
||||
private deductedPopShowTimer: number = 0;
|
||||
private disConnectNum: number = 0;
|
||||
//调用监管接口
|
||||
sendWriteObjectOut: SendWriteObjectOut = async (data, filePath) => {
|
||||
@ -664,6 +658,12 @@ export default class Judge {
|
||||
this.disConnectNum = 0
|
||||
return temp
|
||||
}
|
||||
private lane: LANE = {
|
||||
road: '', num: 0, count: 0
|
||||
}
|
||||
private videoData?: RecordHandleType
|
||||
//当前科目二的考试项目
|
||||
private deductedPopShowTimer: number = 0;
|
||||
|
||||
constructor(judgeUI: JudgeUI) {
|
||||
this.serialIndex = 1;
|
||||
|
||||
@ -1,3 +1,31 @@
|
||||
<details>
|
||||
<summary>fix: 修复完善一些小问题</summary>
|
||||
<span style="color: #888;">[提交人]:</span><span style="color: #333;">wangzhongjie</span><br>
|
||||
<span style="color: #888;">[提交时间]:</span><span style="color: #333;">2025-07-16 09:30</span><br>
|
||||
<span style="color: #888;">[提交版本]:</span><span style="color: #333;">46c9b8b</span>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Merge branch 'main' of http://47.122.70.237:3000/harmony_car/harmony_vehicle_terminal</summary>
|
||||
<span style="color: #888;">[提交人]:</span><span style="color: #333;">wangzhongjie</span><br>
|
||||
<span style="color: #888;">[提交时间]:</span><span style="color: #333;">2025-07-15 16:56</span><br>
|
||||
<span style="color: #888;">[提交版本]:</span><span style="color: #333;">39bfed3</span>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>fix: 解决考生缺考问题,解决进入不了联网考试问题</summary>
|
||||
<span style="color: #888;">[提交人]:</span><span style="color: #333;">wangzhongjie</span><br>
|
||||
<span style="color: #888;">[提交时间]:</span><span style="color: #333;">2025-07-15 16:55</span><br>
|
||||
<span style="color: #888;">[提交版本]:</span><span style="color: #333;">5b48137</span>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>请求类</summary>
|
||||
<span style="color: #888;">[提交人]:</span><span style="color: #333;">lixiao</span><br>
|
||||
<span style="color: #888;">[提交时间]:</span><span style="color: #333;">2025-07-15 15:48</span><br>
|
||||
<span style="color: #888;">[提交版本]:</span><span style="color: #333;">4c1e569</span>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>fix: 隐藏部分快速打印</summary>
|
||||
<span style="color: #888;">[提交人]:</span><span style="color: #333;">wangzhongjie</span><br>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user