This commit is contained in:
wangzhongjie 2025-07-29 14:57:47 +08:00
commit 8d7173c545
5 changed files with 40 additions and 24 deletions

View File

@ -1,15 +1,13 @@
{ {
"lockfileVersion": 2, "lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": { "specifiers": {
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6"
}, },
"packages": { "packages": {
"@ohos/hypium@1.0.6": { "@ohos/hypium@1.0.6": {
"resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==", "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
"registryType": "ohpm",
"shasum": "3f5fed65372633233264b3447705b0831dfe7ea1"
} }
} }
} }

View File

@ -189,6 +189,7 @@ export async function uploadExamMileage(params) {
<lsh>${params.lsh}<lsh> <lsh>${params.lsh}<lsh>
<kskssj>${params.examinationRoomId}<kskssj> <kskssj>${params.examinationRoomId}<kskssj>
<kslc>${params.kslc}<kslc> <kslc>${params.kslc}<kslc>
<specialkf>${params.specialkf}<specialkf>
</body> </body>
</uploadExamMileageReq>`, </uploadExamMileageReq>`,
method: 'post', method: 'post',

View File

@ -7,12 +7,14 @@ import { takePhoto, deleteAllFileByPiC } from '../../common/service/videoService
// import { VideoConfigData } from '../../mock'; // import { VideoConfigData } from '../../mock';
import request from '@ohos.request' import request from '@ohos.request'
import Prompt from '@system.prompt'; import Prompt from '@system.prompt';
import util from '@ohos.util';
import { import {
delSyncTable, delSyncTable,
getDataBaseTable, getDataBaseTable,
getMySystemSetTable, getMySystemSetTable,
upDataZhongxinginitialization, upDataZhongxinginitialization,
getSyncData,
upDateTable upDateTable
} from '../../common/service/initable' } from '../../common/service/initable'
import { GlobalConfig } from '../../config/index' import { GlobalConfig } from '../../config/index'
@ -455,9 +457,9 @@ function getChuankouFnMsg() {
let databuff = [0x61, 0xAA, 0x0A, 0X15, 0X00]; // send ABCDE let databuff = [0x61, 0xAA, 0x0A, 0X15, 0X00]; // send ABCDE
testNapi.SerialSendAsync(globalThis.fd, databuff, (ret) => { testNapi.SerialSendAsync(globalThis.fd, databuff, (ret) => {
testNapi.SerialRecvAsync(globalThis.fd, timeout, (revTestInfo) => { testNapi.SerialRecvAsync(globalThis.fd, timeout, (revTestInfo) => {
const message = revTestInfo?.recevedBuf?.toString() const message = revTestInfo?.recevedBuf?.toString()
if (message == '') { let msgBuf = util.TextDecoder.create().decodeWithStream(new Uint8Array(revTestInfo?.recevedBuf))
if (message == '' || msgBuf == '') {
globalThis.num = 1 globalThis.num = 1
// clearInterval(chuankou) // clearInterval(chuankou)
testNapi.SerialClose(globalThis.fd); testNapi.SerialClose(globalThis.fd);
@ -468,16 +470,8 @@ function getChuankouFnMsg() {
return return
} }
const msg = message?.split(',') const msg = message?.split(',')
if (!msg?.length) { let dang = Number(msgBuf?.split(",")?.[1]?.split('\r')[0] || 0)
globalThis.chuankoMsg =( msg[9] === '' || msg[9] >10 ) ? dang: msg[9]
} else if (msg[0] != '98' || msg[1] != '85' || msg.length < 9) {
} else if (msg.length < 12) {
} else {
globalThis.chuankoMsg = msg[9]
}
setTimeout(() => { setTimeout(() => {
getChuankouFnMsg() getChuankouFnMsg()
}, 500) }, 500)

View File

@ -442,7 +442,7 @@ struct Index {
const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || [] const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || []
const ddxkKfArr = examItemsArrs[3]?.split('^').filter(item => item) || [] const ddxkKfArr = examItemsArrs[3]?.split('^').filter(item => item) || []
if (judgeConfigObj['432'] == 2 || examSubject == 2) { if (judgeConfigObj['432'] == 2 || examSubject == 2) {
//TODO 带项目带里程
if (ddxkKsxmArr?.length) { if (ddxkKsxmArr?.length) {
//断点续考 //断点续考
ddxkKsxmArr.forEach(xmdm => { ddxkKsxmArr.forEach(xmdm => {
@ -455,6 +455,8 @@ struct Index {
}) })
this.ddxkKsxmArr = ddxkKsxmArr this.ddxkKsxmArr = ddxkKsxmArr
} }
this.specialkf = examItemsArrs[4];
this.yklc = Number(examItemsArrs[1]) || 0
} }
//扣分续考 //扣分续考
ddxkKfArr.forEach((kf) => { ddxkKfArr.forEach((kf) => {
@ -480,6 +482,7 @@ struct Index {
this.ddxkKfArr = ddxkKfArr this.ddxkKfArr = ddxkKfArr
this.ddxkTime = Date.parse(startTime); this.ddxkTime = Date.parse(startTime);
this.isDdxk = true this.isDdxk = true
} }
} }
@ -572,7 +575,7 @@ struct Index {
} }
// 上传考试里程 // 上传考试里程
async uploadMileage() { async uploadMileage(specialkf) {
if (!globalThis.singlePlay) { if (!globalThis.singlePlay) {
const {lsh,startExamTime:kskssj,jl:kslc} = this const {lsh,startExamTime:kskssj,jl:kslc} = this
const { carId ,examinationRoomId} = globalThis.carInfo; const { carId ,examinationRoomId} = globalThis.carInfo;
@ -581,7 +584,9 @@ struct Index {
examinationRoomId, examinationRoomId,
lsh, lsh,
kskssj, kskssj,
kslc //考试里程单位cm
kslc:kslc * 100,
specialkf
}) })
} }
} }
@ -1443,4 +1448,8 @@ struct Index {
@State errorMsg: string = '' @State errorMsg: string = ''
@State isErrorMsgEnd: boolean = false @State isErrorMsgEnd: boolean = false
@State disConnectErrorOpen: boolean = false @State disConnectErrorOpen: boolean = false
//开始考试特殊标记
@State specialkf:string = ''
//已考里程
@State yklc:number = 0
} }

View File

@ -468,6 +468,8 @@ export default class Judge {
//所有的科目考试项目(大车&小车) //所有的科目考试项目(大车&小车)
private testKmItems: any private testKmItems: any
private plcData: any private plcData: any
//特殊扣分标记
private specialkf:string = ''
// 获取plc数据 // 获取plc数据
getPlcData = async (plc: string) => { getPlcData = async (plc: string) => {
const {fileLog,mndgStr,rmndg} = this; const {fileLog,mndgStr,rmndg} = this;
@ -600,6 +602,12 @@ export default class Judge {
} }
} }
const {code} = await this.sendWriteObjectOut(data, filePath) const {code} = await this.sendWriteObjectOut(data, filePath)
//科三 & 432=3
if(examSubject == 3 && this.judgeUI.judgeConfigObj['432'] == 2){
this.judgeUI.uploadMileage()
}
if (code === 2300007) { if (code === 2300007) {
this.isJudgeDisConnect = true; this.isJudgeDisConnect = true;
} }
@ -833,15 +841,15 @@ export default class Judge {
xmdm: xmdm * 1, kfdm xmdm: xmdm * 1, kfdm
} }
})) : [], })) : [],
//TODO 已考里程待修改 yklc: judgeUI.yklc,
yklc: 0,
special: [], special: [],
//TODO 科目三参数临时写死
sczb: (sczb === undefined || sczb == 0) ? 0 : 1, sczb: (sczb === undefined || sczb == 0) ? 0 : 1,
sczbkf: kfdm, sczbkf: kfdm,
dmndg: false, dmndg: false,
mfxx: false, mfxx: false,
mfxxn: false mfxxn: false,
//科目三特殊扣分项
specialkf:judgeUI.specialkf,
} }
console.info(judgeTag, '5.获取开始考试数据完成') console.info(judgeTag, '5.获取开始考试数据完成')
return beginInfo return beginInfo
@ -1817,6 +1825,7 @@ export default class Judge {
this.handleRealExam(strData, callBack) this.handleRealExam(strData, callBack)
}) })
await examJudgeSetPerformCallback(async (info) => { await examJudgeSetPerformCallback(async (info) => {
console.info('评判实时数据', info) console.info('评判实时数据', info)
const performInfo = JSON.parse(info) const performInfo = JSON.parse(info)
@ -1828,6 +1837,11 @@ export default class Judge {
this.judgeUI.jl = jl this.judgeUI.jl = jl
//TODO 待优化 跨组件传值不生效 //TODO 待优化 跨组件传值不生效
globalThis.laneData = performInfo.lane; globalThis.laneData = performInfo.lane;
//特殊扣分标记上传中心
if(performInfo.specialkf !== this.specialkf){
this.judgeUI.uploadMileage(performInfo.specialkf)
this.specialkf = performInfo.specialkf
}
}) })
// 3.开始考试 // 3.开始考试