diff --git a/Makefile b/Makefile
index d16f2bc..4e4b357 100644
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,2 @@
gitLog:
- git log --since="2025-06-30 17:14" --until="2025-07-15 10:00" --pretty=format:"%n %s
%n [提交人]:%an
%n [提交时间]:%ad
%n [提交版本]:%h%n %n" --date=format:"%Y-%m-%d %H:%M" > release_note.md
\ No newline at end of file
+ git log --since="2025-06-30 17:14" --until="2025-07-16 10:00" --pretty=format:"%n %s
%n [提交人]:%an
%n [提交时间]:%ad
%n [提交版本]:%h%n %n" --date=format:"%Y-%m-%d %H:%M" > release_note.md
\ No newline at end of file
diff --git a/entry/src/main/ets/pages/judgeSDK/judge.ets b/entry/src/main/ets/pages/judgeSDK/judge.ets
index 4e7a2ca..e710ffe 100644
--- a/entry/src/main/ets/pages/judgeSDK/judge.ets
+++ b/entry/src/main/ets/pages/judgeSDK/judge.ets
@@ -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('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('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('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;
diff --git a/release_note.md b/release_note.md
index fc8d9c6..bd6a6f7 100644
--- a/release_note.md
+++ b/release_note.md
@@ -1,3 +1,31 @@
+
+ fix: 修复完善一些小问题
+ [提交人]:wangzhongjie
+ [提交时间]:2025-07-16 09:30
+ [提交版本]:46c9b8b
+
+
+
+ Merge branch 'main' of http://47.122.70.237:3000/harmony_car/harmony_vehicle_terminal
+ [提交人]:wangzhongjie
+ [提交时间]:2025-07-15 16:56
+ [提交版本]:39bfed3
+
+
+
+ fix: 解决考生缺考问题,解决进入不了联网考试问题
+ [提交人]:wangzhongjie
+ [提交时间]:2025-07-15 16:55
+ [提交版本]:5b48137
+
+
+
+ 请求类
+ [提交人]:lixiao
+ [提交时间]:2025-07-15 15:48
+ [提交版本]:4c1e569
+
+
fix: 隐藏部分快速打印
[提交人]:wangzhongjie