diff --git a/build-profile.json5 b/build-profile.json5 index 1c7c00ba..a58d0c75 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -5,9 +5,9 @@ "name": "default", "material": { "certpath": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.cer", - "storePassword": "0000001B0D8963A2149509CE4705E3453B788A74A9A4A6714814A79A4AA117A71A42C0D48243CE59D648EE", + "storePassword": "0000001B16BF173FAE0A4B7B6556BEFBF019A66FA1332BD4CE16B85D6FDCDB05CDB01EBBC32A8B55F90168", "keyAlias": "debugKey", - "keyPassword": "0000001BABDF12118AF1E7E6AFF8D76FA6D89B08D9E1EC05B6A55CFDAABB51A25D3EA85D9B0E3570B4E666", + "keyPassword": "0000001B2679DA5771C677985ED3A052179731797CD7638B37C0C5DE3D97C1041D0E80EB0D0947ADF133B0", "profile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p7b", "signAlg": "SHA256withECDSA", "storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p12" diff --git a/entry/oh-package-lock.json5 b/entry/oh-package-lock.json5 index bc40219d..1f023b33 100644 --- a/entry/oh-package-lock.json5 +++ b/entry/oh-package-lock.json5 @@ -1,13 +1,15 @@ { - "lockfileVersion": 1, + "lockfileVersion": 2, "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", "specifiers": { "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" }, "packages": { "@ohos/hypium@1.0.6": { - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", - "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==" + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", + "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==", + "registryType": "ohpm", + "shasum": "3f5fed65372633233264b3447705b0831dfe7ea1" } } } \ No newline at end of file diff --git a/entry/src/main/ets/api/judge.ts b/entry/src/main/ets/api/judge.ts index 41b655ba..8940c5c4 100644 --- a/entry/src/main/ets/api/judge.ts +++ b/entry/src/main/ets/api/judge.ts @@ -25,7 +25,7 @@ interface WR { } // 通用监管接口 -export async function writeObjectOut(params, filePath?: string): Promise { +export async function writeObjectOut(params, externalTransmission: boolean, filePath?: string): Promise { const singlePlay = globalThis.singlePlay if (singlePlay) { return { code: 1 } @@ -54,8 +54,7 @@ export async function writeObjectOut(params, filePath?: string): Promise { //新监管调用 if (globalThis.isJGNew) { - - return await writeObjectOutNew(params, filePath) + return await writeObjectOutNew(params, filePath, externalTransmission) } drvexam.zp = drvexam.zp === undefined ? undefined : encodeURIComponent(drvexam.zp) @@ -189,7 +188,6 @@ export async function uploadExamMileage(params) { ${params.lsh} ${params.examinationRoomId} ${params.kslc} - ${params.specialkf} `, method: 'post', diff --git a/entry/src/main/ets/pages/judgeSDK/api/index.ts b/entry/src/main/ets/pages/judgeSDK/api/index.ts index 6ec593da..6a43342b 100644 --- a/entry/src/main/ets/pages/judgeSDK/api/index.ts +++ b/entry/src/main/ets/pages/judgeSDK/api/index.ts @@ -1,4 +1,5 @@ import libJudgeSdk from 'libJudgeSdk.so' + //@ts-ignore // import libJudgeSdk from '@ohos.judgesdk' /** @@ -12,7 +13,7 @@ import libJudgeSdk from 'libJudgeSdk.so' * * @desc 获取版本信息 **/ -export async function examJudgeVersion(){ +export async function examJudgeVersion() { return await libJudgeSdk.examJudgeVersion(); } @@ -24,29 +25,29 @@ export async function examJudgeVersion(){ * @params callBack 日志操作回调 * @desc 设置评判日志级别和日志回调函数 */ -export async function examJudgeSetLogCallback(level:number,handleLog:Function):Promise{ - const temp = libJudgeSdk.examJudgeSetLogCallback(level,handleLog); - return await handle(temp,'examJudgeSetLogCallback') +export async function examJudgeSetLogCallback(level: number, handleLog: Function): Promise { + const temp = libJudgeSdk.examJudgeSetLogCallback(level, handleLog); + return await handle(temp, 'examJudgeSetLogCallback') } /* * * @desc评判初始化 */ -export async function examJudgeInit(data){ +export async function examJudgeInit(data) { const str = JSON.stringify(data); - const temp = libJudgeSdk.examJudgeInit(str,str.length); - return await handle(temp,'examJudgeInit') + const temp = libJudgeSdk.examJudgeInit(str, str.length); + return await handle(temp, 'examJudgeInit') } /* * * @desc 执行实时考试过程 实时传递传感信息 */ -export async function examJudgeRealExam(data){ +export async function examJudgeRealExam(data) { const str = JSON.stringify(data); - const temp = libJudgeSdk.examJudgeRealExam(str,str.length); - return await handle(temp,'examJudgeRealExam') + const temp = libJudgeSdk.examJudgeRealExam(str, str.length); + return await handle(temp, 'examJudgeRealExam') } /* @@ -54,18 +55,18 @@ export async function examJudgeRealExam(data){ * @desc 设置评判输出的考试过程数据回调函数 */ //js_examJudgeSetRealExamCallback -export async function examJudgeSetRealExamCallback(fn){ +export async function examJudgeSetRealExamCallback(fn) { const temp = libJudgeSdk.examJudgeSetRealExamCallback(fn); - return await handle(temp,'examJudgeSetRealExamCallback') + return await handle(temp, 'examJudgeSetRealExamCallback') } /* * * @desc 设置轨迹图像回调函数 */ -export async function examJudgeMapImageSetCallback(fn){ +export async function examJudgeMapImageSetCallback(fn) { const temp = libJudgeSdk.examJudgeMapImageSetCallback(fn); - return await handle(temp,'examJudgeMapImageSetCallback') + return await handle(temp, 'examJudgeMapImageSetCallback') } /* @@ -75,14 +76,14 @@ export async function examJudgeMapImageSetCallback(fn){ export async function examJudgeArtificialMark( //项目代码 - itemno:number, + itemno: number, //扣分代码 - serial:string, + serial: string, //扣分类型:number - type:number -){ - const temp = libJudgeSdk.examJudgeArtificialMark(itemno,serial,type); - return await handle(temp,'examJudgeArtificialMark') + type: number +) { + const temp = libJudgeSdk.examJudgeArtificialMark(itemno, serial, type); + return await handle(temp, 'examJudgeArtificialMark') } /* @@ -91,12 +92,12 @@ export async function examJudgeArtificialMark( */ export async function examJudgeArtificialItem( //项目代码 - itemno:number, + itemno: number, //操作类型 - type:number = 0 -){ - const temp = libJudgeSdk.examJudgeArtificialItem(itemno,type); - return await handle(temp,'examJudgeArtificialMark') + type: number = 0 +) { + const temp = libJudgeSdk.examJudgeArtificialItem(itemno, type); + return await handle(temp, 'examJudgeArtificialMark') } @@ -104,9 +105,9 @@ export async function examJudgeArtificialItem( * * @desc 设置地图轨迹图像绘制的开关 */ -export async function examJudgeMapSetDrawing(fn){ +export async function examJudgeMapSetDrawing(fn) { const temp = libJudgeSdk.examJudgeMapSetDrawing(fn); - return await handle(temp,'examJudgeMapSetDrawing') + return await handle(temp, 'examJudgeMapSetDrawing') } @@ -114,17 +115,17 @@ export async function examJudgeMapSetDrawing(fn){ * * @desc开始考试 */ -export async function examJudgeBeginExam(data){ +export async function examJudgeBeginExam(data) { const str = JSON.stringify(data); - const temp = libJudgeSdk.examJudgeBeginExam(str,str.length); - return await handle(temp,'examJudgeBeginExam') + const temp = libJudgeSdk.examJudgeBeginExam(str, str.length); + return await handle(temp, 'examJudgeBeginExam') } /* @params level:日志等级,infoStr:日志信息,len:数据长度 * @desc处理日志文件 */ -export function handleLog(level,infoStr, len){ +export function handleLog(level, infoStr, len) { //TODO } @@ -132,45 +133,45 @@ export function handleLog(level,infoStr, len){ * @desc结束考试 * */ -export async function examJudgeEndExam(){ +export async function examJudgeEndExam() { const temp = libJudgeSdk.examJudgeEndExam(); - return await handle(temp,'examJudgeEndExam') + return await handle(temp, 'examJudgeEndExam') } /* *@desc examJudgeDestroy * */ -export async function examJudgeDestroy(){ +export async function examJudgeDestroy() { const temp = libJudgeSdk.examJudgeDestroy(); - return await handle(temp,'examJudgeDestroy') + return await handle(temp, 'examJudgeDestroy') } /* *@desc设置地图轨迹图像参数 * */ -export async function examJudgeMapSetParam(width:number,height:number){ - const temp = libJudgeSdk.examJudgeMapSetParam(width,height ); - return await handle(temp,'examJudgeMapSetParam') +export async function examJudgeMapSetParam(width: number, height: number) { + const temp = libJudgeSdk.examJudgeMapSetParam(width, height); + return await handle(temp, 'examJudgeMapSetParam') } /* *@desc设置地图图像缩放系数 * */ -export async function examJudgeMapSetScaling(scaling?:number){ +export async function examJudgeMapSetScaling(scaling?: number) { const temp = libJudgeSdk.examJudgeMapSetScaling(scaling || 1); - return await handle(temp,'examJudgeMapSetScaling') + return await handle(temp, 'examJudgeMapSetScaling') } /* *@desc设置考试过程数据回调 * */ -export async function examJudgeSetPerformCallback(fn){ +export async function examJudgeSetPerformCallback(fn) { const temp = libJudgeSdk.examJudgeSetPerformCallback(fn); - return await handle(temp,'examJudgeSetPerformCallback') + return await handle(temp, 'examJudgeSetPerformCallback') } /** @@ -179,17 +180,17 @@ export async function examJudgeSetPerformCallback(fn){ * / */ -export async function examJudgeSoundEnd(param:{ +export async function examJudgeSoundEnd(param: { //项目代码 - itemno:number, + itemno: number, //语音码 - code:string, + code: string, //语音类型 - type:number, -}){ + type: number, +}) { const {itemno,code,type} = param; - const temp = libJudgeSdk.examJudgeSoundEnd(itemno,code,type); - return await handle(temp,'examJudgeSoundEnd') + const temp = libJudgeSdk.examJudgeSoundEnd(itemno, code, type); + return await handle(temp, 'examJudgeSoundEnd') } /** @@ -197,15 +198,15 @@ export async function examJudgeSoundEnd(param:{ * @desc 实时距离计算 * * */ -export async function examCalcGpsDistance(param:{ - jd1:number, - wd1:number, - jd2:number, - wd2:number, - h:number -}){ +export async function examCalcGpsDistance(param: { + jd1: number, + wd1: number, + jd2: number, + wd2: number, + h: number +}) { const {jd1,wd1,jd2,wd2,h} = param - const temp = libJudgeSdk.examCalcGpsDistance(jd1,wd1,jd2,wd2,h); + const temp = libJudgeSdk.examCalcGpsDistance(jd1, wd1, jd2, wd2, h); return await temp; } @@ -214,13 +215,21 @@ export async function examCalcGpsDistance(param:{ * @desc通用处理函数 * */ -async function handle(temp,fnName):Promise{ - return new Promise((resolve,reject)=>{ - if(temp == 0){ +async function handle(temp, fnName): Promise { + return new Promise((resolve, reject) => { + if (temp == 0) { resolve(temp); - }else{ - console.log('surenjun error:' + `调用c++函数 ${fnName} 异常:`+ libJudgeSdk.examJudgeErrorInfo(temp*1)) + } else { + console.log('surenjun error:' + `调用c++函数 ${fnName} 异常:` + libJudgeSdk.examJudgeErrorInfo(temp * 1)) reject(temp) } }) +} + +/** + * 获取cpu内存使用情况 + * @returns + */ +export function examPeerOccupy() { + return libJudgeSdk.examPeerOccupy() } \ No newline at end of file diff --git a/entry/src/main/ets/pages/judgeSDK/api/judgeSDK.d.ts b/entry/src/main/ets/pages/judgeSDK/api/judgeSDK.d.ts index b953d198..bf46e8ef 100644 --- a/entry/src/main/ets/pages/judgeSDK/api/judgeSDK.d.ts +++ b/entry/src/main/ets/pages/judgeSDK/api/judgeSDK.d.ts @@ -73,7 +73,6 @@ export interface CARINFO { FLAG: string, BK1: string, BK2: string - //脉冲里程设置 X_MCH: string } diff --git a/entry/src/main/ets/pages/judgeSDK/judge.ts b/entry/src/main/ets/pages/judgeSDK/judge.ts index 171c8471..d5d99e41 100644 --- a/entry/src/main/ets/pages/judgeSDK/judge.ts +++ b/entry/src/main/ets/pages/judgeSDK/judge.ts @@ -15,7 +15,6 @@ import { uploadExamProgressData, writeObjectOut } from '../../api/judge'; import UsbService from '../../common/service/usbService'; import { KF, LANE } from '../judgeSDK/api/judgeSDK.d'; import { endRecordVideo, saveStartRecordVideo } from '../../common/service/videoService'; - import { Array2Byte, convertGpsCoord2, @@ -55,7 +54,9 @@ import { examJudgeVersion } from './api/index'; import { getSyncData, upDateTableByArray } from '../../common/service/initable'; -import { GlobalConfig } from '../../config'; +import promptAction from '@ohos.promptAction'; +import Want from '@ohos.app.ability.Want'; + const judgeTag = 'SURENJUN_JUDGE' function ifNeedRetry(code: number | string): boolean { @@ -65,6 +66,7 @@ function ifNeedRetry(code: number | string): boolean { } return false } + export default class Judge { // 过程照片拍照 getPhoto = async (empty?: boolean) => { @@ -73,7 +75,7 @@ export default class Judge { if (singlePlay) { return '' } else { - const {filePhoto} = this; + const { filePhoto } = this; const photoBase64 = await filePhoto.getPhoto(); console.info(judgeTag, '拍照完成') return photoBase64 @@ -81,7 +83,7 @@ export default class Judge { } //人工操作项目 public setJudgeItem = async (itemno, type: 1 | 2) => { - const {fileLog} = this; + const { fileLog } = this; await examJudgeArtificialItem(itemno * 1, type); await fileLog.setExamJudgeData({ method: 'examJudgeArtificialItem', @@ -92,7 +94,7 @@ export default class Judge { } //人工扣分 public setJudgeMark = async (itemno, serial, type = 1) => { - const {fileLog} = this + const { fileLog } = this await examJudgeArtificialMark(itemno * 1, serial, type); console.info(judgeTag, `进入人工扣分-${itemno}-${serial}`) await fileLog.setExamJudgeData({ @@ -106,7 +108,7 @@ export default class Judge { } // 断网数据补传 uploadDisConnectData = async () => { - const {isJudgeDisConnect,fileLog,fileUtil} = this; + const { isJudgeDisConnect, fileLog, fileUtil } = this; if (!isJudgeDisConnect) { return } @@ -115,15 +117,15 @@ export default class Judge { const examDataArr = examDataStr.split('\n'); for (let examDataStr of examDataArr) { const examData = JSON.parse(examDataStr) - const code = await writeObjectOut(examData); + const code = await writeObjectOut(examData, false); } } //上传无锡所过程数据 uploadProgressData = async () => { - const {judgeUI,fileUtil,fileLog} = this; - const {idCard,startFullTime} = judgeUI + const { judgeUI, fileUtil, fileLog } = this; + const { idCard, startFullTime } = judgeUI const carInfo = globalThis.carInfo; - const {carId,examinationRoomId} = carInfo + const { carId, examinationRoomId } = carInfo const folderPath = fileLog.folderPath const base64 = new util.Base64(); const time = await getCurrentTime(); @@ -159,23 +161,25 @@ export default class Judge { } //获取科目三的评判初始化配置 getKm3JudgeInitConfig = async () => { - const {judgeUI,getModelData} = this; - const {mapPointArr,mapPointItemArr} = judgeUI; + const { judgeUI, getModelData } = this; + const { mapPointArr, mapPointItemArr } = judgeUI; return { map_point: mapPointArr, map_point_item: mapPointItemArr, //科目三暂时为空 iteminfo: [], - roads: getModelData('Roads.txt'), - sharps: getModelData('Sharps.txt') + roads: getModelData('km3/Roads.txt'), + sharps: getModelData('km3/Sharps.txt') } } // 处理特殊参数配置 handleSEP = async (code: number) => { - const {judgeUI:{ - judgeConfigObj - },avPlayer} = this; - const {examSubject} = globalThis.carInfo; + const { + judgeUI:{ + judgeConfigObj + }, avPlayer + } = this; + const { examSubject } = globalThis.carInfo; switch (code) { //结束考试方式 @@ -194,9 +198,9 @@ export default class Judge { if (xmdm == 20) { return true } - const {judgeTask,beginProject,pointsDedute,uploadProgressPhoto,endProject,checkExamIsEnd,totalScore} = this; - const {projectsObj,passingScore:passingGrade} = this.judgeUI - const {isUpload} = projectsObj[xmdm]; + const { judgeTask, beginProject, pointsDedute, uploadProgressPhoto, endProject, checkExamIsEnd, totalScore } = this; + const { projectsObj, passingScore:passingGrade } = this.judgeUI + const { isUpload } = projectsObj[xmdm]; //如果项目没有开始 console.info('surenjun isUpload=>', isUpload) if (!isUpload) { @@ -240,7 +244,8 @@ export default class Judge { } // 处理udp plc信号 handleUdp = async (msg) => { - const {fileLog,getPlcData,usbService,isUdpEnd,isExamEnd,judgeUI} = this + console.info('plc信号', msg) + const { fileLog, getPlcData, usbService, isUdpEnd, isExamEnd, judgeUI } = this const stachArr = msg.split(',') if (stachArr[0] != '#DN_GD' || isUdpEnd) { return @@ -260,23 +265,20 @@ export default class Judge { this.judgeUI.dw = (Math.floor(plcData.sensor.dw as number) || 0) + '' //TODO 暂时关闭差分检测异常 // await this.checkDwzt(plcData.gps.dwzt,plcData.gps.jdzt); + if (!isExamEnd) { + await examJudgeRealExam(plcData) + } const udpIndex = globalThis.udpIndex; + let [prevJd, preWd] = [0, 0] if (udpIndex % 5 === 0 && !isUdpEnd) { const judgeUdp = globalThis.judgeUdp const bytes = await this.getMessageHeartbeat(isExamEnd); judgeUdp.send(bytes) } - if (!isExamEnd) { - console.info(judgeTag, 'start examJudgeRealExam') - await examJudgeRealExam(plcData) - console.info(judgeTag, 'end examJudgeRealExam') - } - let [prevJd, preWd] = [0, 0] globalThis.udpIndex += 1 } private fileLog private filePath - private bklx: number = 0 private totalScore: number private prevJd: number = 0 private prevWd: number = 0 @@ -285,7 +287,7 @@ export default class Judge { private modelPath: string private avPlayer private carztStr: string - private rmndg: 0 | 1 | 2 + private rmndg: 0 | 1 private mndgStr: string | undefined // 模拟灯光 setMndg = async (mndgStr: string) => { @@ -315,11 +317,11 @@ export default class Judge { private tempData: any //实时计算gps经纬度距离 handDistance = async () => { - const {jd,wd,hxj,dwzt,jdzt} = this.tempData.gps; + const { jd, wd, hxj, dwzt, jdzt } = this.tempData.gps; const tJD = convertGpsCoord2(jd) const tWD = convertGpsCoord2(wd) - const {prevJd,prevWd} = this - if (prevJd && dwzt == 4 && jdzt == 3 && !globalThis.singlePlay) { + const { prevJd, prevWd } = this + if (prevJd && dwzt == 4 && jdzt == 3) { const distance = await examCalcGpsDistance({ jd1: prevJd, wd1: prevWd, @@ -328,7 +330,7 @@ export default class Judge { h: hxj || 1, }) //@ts-ignore - // globalThis.distanceClass?.setTimeData(((distance / 100).toFixed(2)) * 1) + globalThis.distanceClass?.setTimeData(((distance / 100).toFixed(2)) * 1) } this.prevJd = tJD; this.prevWd = tWD; @@ -336,7 +338,7 @@ export default class Judge { private performInfo: any private isEndTip: boolean = false; private deductedPopShowTimer: number = 0; - + // 校验考试是否结束 // 校验考试是否结束 checkExamIsEnd = async (isManual?: boolean) => { @@ -390,10 +392,10 @@ export default class Judge { //成绩不合格 if (totalScore < passingGrade) { //科目三不合格报靠边停车 - if (examSubject == 3 ) { - if( param302 == 1){ + if (examSubject == 3) { + if (param302 == 1) { avPlayer.playAudio([`voice/考试结束.mp3`]); - }else if(param302 == 0){ + } else if (param302 == 0) { return } } @@ -468,11 +470,9 @@ export default class Judge { //所有的科目考试项目(大车&小车) private testKmItems: any private plcData: any - //特殊扣分标记 - private specialkf:string = '' // 获取plc数据 getPlcData = async (plc: string) => { - const {fileLog,mndgStr,rmndg} = this; + const { fileLog, mndgStr, rmndg } = this; await fileLog.setPlcProgressData(plc) //plc字符串转化成评判初始化数据 const tempData = await plcStrToJson(plc); @@ -494,13 +494,12 @@ export default class Judge { } // 处理轨迹plc信号 handleTrajectoryUdp = async (strArr) => { - const {fileLog,setJudgeItem,setJudgeMark,endExam} = this; + const { fileLog, setJudgeItem, setJudgeMark, endExam } = this; let num = 2; const judgeTimer = setInterval(async () => { const msgStr = strArr[num]; if (msgStr == '') { console.info(judgeTag, '模拟数据考试结束') - globalThis.windowClass.setWindowSystemBarEnable(['navigation']) clearInterval(judgeTimer) this.checkExamIsEnd(true) return @@ -521,14 +520,11 @@ export default class Judge { if (msg.method === 'examJudgeArtificialMark') { setJudgeItem(msg.itemno, msg.serial) } - msg.sensor.rmndg = this.rmndg - await fileLog.setExamJudgeData(msg) await examJudgeRealExam(msg) - this.rmndg = 0 const bytes = await this.getMessageHeartbeat(); bytes && globalThis.judgeUdp.send(bytes) - }, 50) + }, 200) globalThis.judgeTimer = judgeTimer; } @@ -540,17 +536,19 @@ export default class Judge { // 调代理接口是否断网了 private isJudgeDisConnect: boolean; // 项目开始接口同步 - beginProject = async (ksxm,xmxh?:string) => { + beginProject = async (ksxm) => { const carInfo = globalThis.carInfo; - const { examSubject,plateNo } = carInfo; - const {judgeUI,fileLog,getSbbm,filePath} = this; - const {lsh,idCard,serialNumber,projectsObj,ksdd,kslx,xldm} = judgeUI + const { examSubject, plateNo } = carInfo; + const { judgeUI, fileLog, getSbbm, xmxh, filePath } = this; + const { lsh, idCard, serialNumber, projectsObj, ksdd, kslx, xldm } = judgeUI const time = await getCurrentTime(); const project = projectsObj[ksxm] - const sbxh = getSbbm(ksxm, xmxh || this.xmxh) + const sbxh = getSbbm(ksxm, xmxh) const data = { //系统类别 接口序列号 接口标识 - xtlb: '17', jkxlh: serialNumber, jkid: '17C52', + xtlb: '17', + jkxlh: serialNumber, + jkid: '17C52', drvexam: { // 考试科目 身份证号码 lsh, @@ -566,7 +564,7 @@ export default class Judge { kssj: time } } - const {code} = await this.sendWriteObjectOut(data, filePath) + const { code } = await this.sendWriteObjectOut(data, filePath) console.info(judgeTag, '项目开始 end') if (code === 2300007) { this.isJudgeDisConnect = true; @@ -574,18 +572,20 @@ export default class Judge { promptWxCode('17C52', code) } // 项目结束接口同步 - endProject = async (ksxm,xmxh?:string) => { + endProject = async (ksxm) => { const carInfo = globalThis.carInfo; const deviceNo = globalThis.deviceNo; - const { examSubject,plateNo,carNo } = carInfo; - const {judgeUI,fileLog,getSbxh,getSbbm,filePath} = this; - const {lsh,idCard,serialNumber,projectsObj,cdsbInfoObj,ksdd,kslx,xldm,} = judgeUI + const { examSubject, plateNo, carNo } = carInfo; + const { judgeUI, fileLog, getSbxh, xmxh, getSbbm, filePath } = this; + const { lsh, idCard, serialNumber, projectsObj, cdsbInfoObj, ksdd, kslx, xldm, } = judgeUI const time = await getCurrentTime(); const project = projectsObj[ksxm] - const sbxh = examSubject == 3 ? undefined : getSbbm(ksxm, xmxh || this.xmxh) + const sbxh = examSubject == 3 ? undefined : getSbbm(ksxm, xmxh) const data = { - xtlb: '17', jkxlh: serialNumber, jkid: '17C55', + xtlb: '17', + jkxlh: serialNumber, + jkid: '17C55', drvexam: { lsh, kskm: examSubject, @@ -601,70 +601,28 @@ export default class Judge { jssj: time } } - const {code} = await this.sendWriteObjectOut(data, filePath) - - //科三 & 432=3 - if(examSubject == 3 && this.judgeUI.judgeConfigObj['432'] == 2){ - this.judgeUI.uploadMileage() - } - + const { code } = await this.sendWriteObjectOut(data, filePath) if (code === 2300007) { this.isJudgeDisConnect = true; } console.info(judgeTag, '项目结束 end') promptWxCode('17C55', code) } - private artSubject3ProjectsCodesArr: number[] = [3, 9, 4, 10, 12, 11] - private lane: LANE = { - road: '', num: 0, count: 0 - } - private videoData: any - private disConnectNum: number = 0; - //调用监管接口 - - //调用监管接口 - sendWriteObjectOut = async (data, filePath) => { - const temp = await writeObjectOut(data, filePath); - console.log("wzj", JSON.stringify(temp)) - if (this.disConnectNum == 0) { - console.log("wzj", "第一次发送", JSON.stringify(data)) - } - if (this.disConnectNum < 5 && this.disConnectNum > 0) { - console.log("wzj", "第" + this.disConnectNum + "次重新发送", JSON.stringify(data)) - } - // 不是成功的接口就需要补传 - if (ifNeedRetry(temp.code)) { - this.disConnectNum += 1; - if (this.disConnectNum < 5) { - if (temp.code == 2300028) { - await new Promise(resolve => setTimeout(resolve, 2000)); // 延迟1秒 - } - return await this.sendWriteObjectOut(data, filePath) - } - } - - if (this.disConnectNum >= 5) { - console.info('surenjun', '123') - this.judgeUI.errorMsg = '当前的考试过程信息网络传输异常,程序点击确认将重启!'; - this.judgeUI.disConnectErrorOpen = true - } - - this.disConnectNum = 0 - return temp - } // 考试过程照片 uploadProgressPhoto = async (ksxm) => { const time = await getCurrentTime(); - const {judgeUI,plcData,getPhoto,fileLog,filePath} = this; + const { judgeUI, plcData, getPhoto, fileLog, filePath } = this; const photoBase64 = await getPhoto(); const carInfo = globalThis.carInfo; - const { examSubject,plateNo,carNo } = carInfo; - const {lsh,idCard,serialNumber,projectsObj,ksdd,judgeConfigObj} = judgeUI; - const {sensor,gps} = plcData + const { examSubject, plateNo, carNo } = carInfo; + const { lsh, idCard, serialNumber, projectsObj, ksdd, judgeConfigObj } = judgeUI; + const { sensor, gps } = plcData const project = projectsObj[ksxm] const data = { - xtlb: '17', jkxlh: serialNumber, jkid: '17C54', + xtlb: '17', + jkxlh: serialNumber, + jkid: '17C54', drvexam: { lsh, kskm: examSubject, @@ -678,13 +636,19 @@ export default class Judge { ksdd: encodeURI(ksdd) } }; - const {code} = await this.sendWriteObjectOut(data, filePath); + const { code } = await this.sendWriteObjectOut(data, filePath); if (code === 2300007) { this.isJudgeDisConnect = true } promptWxCode('17C54', code) console.info(judgeTag, '上传照片 end') } + private artSubject3ProjectsCodesArr: number[] = [3, 9, 4, 10, 12, 11] + private lane: LANE = { + road: '', num: 0, count: 0 + } + private videoData: any + private disConnectNum: number = 0; constructor(judgeUI) { this.serialIndex = 1; @@ -705,13 +669,13 @@ export default class Judge { this.carztStr = ''; this.testKmItems = {}; // 考试回放配置 - const {isTrajectoryOpen,trajectoryPath} = judgeConfig + const { isTrajectoryOpen, modelPath, trajectoryPath } = judgeConfig this.isTrajectoryOpen = isTrajectoryOpen; - this.modelPath = 'models'; + this.modelPath = modelPath; this.trajectoryPath = trajectoryPath; this.isExam = !this.judgeUI.singlePlay; - const {projectsCenterObj,examSubject} = judgeUI; + const { projectsCenterObj, examSubject } = judgeUI; (examSubject == 2 ? testKm2Items : testKm3Items).forEach(item => { const projectCenterObj = projectsCenterObj[item.code] @@ -729,49 +693,97 @@ export default class Judge { this.isExamEnd = false; } + private externalTransmission: boolean = false + // 计算是否启动 + private whetherToStart: boolean + //调用监管接口 + sendWriteObjectOut = async (data, filePath) => { + const temp = await writeObjectOut(data, this.externalTransmission, filePath); + console.log("wzj", JSON.stringify(temp)) + if (this.disConnectNum == 0) { + console.log("wzj", "第一次发送", JSON.stringify(data)) + } + if (this.disConnectNum < 5 && this.disConnectNum > 0) { + console.log("wzj", "第" + this.disConnectNum + "次重新发送", JSON.stringify(data)) + } + // 不是成功的接口就需要补传 + if (ifNeedRetry(temp.code)) { + this.disConnectNum += 1; + if (this.disConnectNum < 5) { + if (temp.code == 2300028) { + await new Promise(resolve => setTimeout(resolve, 2000)); // 延迟1秒 + } + return await this.sendWriteObjectOut(data, filePath) + } + if (this.disConnectNum >= 5) { + this.externalTransmission = true + let want: Want = { + bundleName: 'com.oh.upload', // 替换为你的应用包名 + abilityName: 'EntryAbility', // 你的 Service Ability 名称 + moduleName: 'entry', // 你的模块名称,通常是 'entry', + parameters: {} + }; + try { + let context = this.judgeUI.context; + context.startAbility(want) + .then(() => { + }) + .catch((error) => { + console.error(`拉起应用失败: ${error.code} - ${error.message}`); + }); + } catch (error) { + console.error(`启动Ability异常: ${error.message}`); + } + return await this.sendWriteObjectOut(data, filePath) + } + } + + if (this.disConnectNum >= 5) { + console.info('surenjun', '123') + this.judgeUI.errorMsg = '当前的考试过程信息网络传输异常,程序点击确认将重启!'; + this.judgeUI.disConnectErrorOpen = true + + } + + this.disConnectNum = 0 + return temp + } + public async onJudgeFn(fn: Function) { await this.judging(fn) } // 获取评判初始化数据 getJudgeInitData = async () => { - const {getModelData,getKm3JudgeInitConfig,bklx} = this + const { getModelData, getKm3JudgeInitConfig } = this const carInfo = globalThis.carInfo; - const { examSubject,plateNo,carId } = carInfo; + const { examSubject, plateNo, carId } = carInfo; const judgeUI = this.judgeUI - const {projectsObj,itemInfoObj,markRuleListObj,carType,carName,systemparmArr,carinfoArr} = judgeUI + const { projectsObj, itemInfoObj, markRuleListObj, carType, carName, systemparmArr, carinfoArr } = judgeUI const examType = examSubject == 2 ? 'km2' : 'km3' - const fileUtil = new FileUtil(globalThis.context) - const ipConfigStr = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/ipConfig.txt'); - const ipConfig = JSON.parse(ipConfigStr) let allitems = []; if (examSubject == 2) { allitems = Reflect.ownKeys(itemInfoObj).map(cdsbKey => { const cdsb = itemInfoObj[cdsbKey]; - const {xmdm,xmxh,modelKey} = cdsb - const modelVal= getModelData(`${modelKey}.txt`) - if(modelVal){ - return { - xmdm, xmxh, model: modelVal - } - }else{ - return undefined + const { xmdm, xmxh, modelKey } = cdsb + return { + xmdm, xmxh, model: getModelData(`${examType}/${modelKey}.txt`) } - }).filter(item => item !== undefined) + }) } //获取版本号 const sdkver = await examJudgeVersion(); const initInfo = { sdkver, - appver: globalThis.version, + appver: judgeConfig.version, kskm: examSubject * 1, kchp: plateNo, kchm: carId * 1, kscx: carType, cxcode: '1', name: carName, - carmodel: getModelData(`${carType}.txt`), + carmodel: getModelData(`${examType}/${carType}.txt`), allitems, iteminfo: [], systemparm: systemparmArr, @@ -780,8 +792,6 @@ export default class Judge { itemInfoObj, carlist: judgeUI.carlist, carinfo: carinfoArr, - //板卡类型 - bklx, }; let km3Config = {} @@ -798,12 +808,13 @@ export default class Judge { // 获取开始考试数据 getJudgeBeginData = async () => { - const {code,name:examinerName} = globalThis.examinerInfo; + const { code, name:examinerName } = globalThis.examinerInfo; let currentParams: any = router.getParams(); - const {sczb,kfdm} = currentParams; - const {isExam} = this; + const { sczb, kfdm } = currentParams; + const { isExam } = this; const judgeUI = this.judgeUI - const {projects,carType,kssycs,isDdxk,ddxkTime,projectsCenterObj,ddxkKsxmArr,ddxkKfArr,passingScore} = judgeUI; + const { projects, carType, kssycs, isDdxk, ddxkTime, projectsCenterObj, ddxkKsxmArr, ddxkKfArr, passingScore } = + judgeUI; const beginInfo = { kgid: '012', kgxm: decodeURI(examinerName || ''), @@ -841,15 +852,16 @@ export default class Judge { xmdm: xmdm * 1, kfdm } })) : [], - yklc: judgeUI.yklc, + //TODO 已考里程待修改 + yklc: 0, special: [], + //TODO 科目三参数临时写死 sczb: (sczb === undefined || sczb == 0) ? 0 : 1, sczbkf: kfdm, dmndg: false, mfxx: false, mfxxn: false, - //科目三特殊扣分项 - specialkf:judgeUI.specialkf, + zeng: false } console.info(judgeTag, '5.获取开始考试数据完成') return beginInfo @@ -858,14 +870,14 @@ export default class Judge { //处理评判过程回调 handleRealExam = async (strData, callBack) => { let examData: EXAMDATA = JSON.parse(strData); - const {getDqxmStr,getKfStr,goJudgeVoice,setMndg,avPlayer,fileLog,judgeUI} = this; - const {carzt,xmks,kf,event,xmjs,xmqx,ksjs,sound,mndg,lane,precast,nongps} = examData + const { getDqxmStr, getKfStr, goJudgeVoice, setMndg, avPlayer, fileLog, judgeUI } = this; + const { carzt, xmks, kf, event, xmjs, xmqx, ksjs, sound, mndg, lane, precast, nongps } = examData const param512 = (judgeUI.judgeConfigObj['512'] || '').split(','); //获取项目结束、项目开始代码 const xmdm = event == 2 ? xmjs.xmdm : xmks.xmdm const xmxh = event == 2 ? xmjs.xmxh : xmks.xmxh; const isManualProjectIn = this.artSubject3ProjectsCodesArr.includes(xmdm); - const {examSubject,projects,judgeConfigObj} = this.judgeUI; + const { examSubject, projects, judgeConfigObj } = this.judgeUI; const param611 = judgeConfigObj['611'] || ''; switch (event) { //项目开始 @@ -954,10 +966,10 @@ export default class Judge { //项目取消 case 6: { console.info(judgeTag, '项目取消'); - const {examSubject} = this.judgeUI + const { examSubject } = this.judgeUI const xmdm = xmqx.xmdm; const xmmcCode = judgeUI.projectsObj[xmdm].projectCodeCenter; - // const voiceCode = getKmProjectCancelVoice(examSubject, xmmcCode); + const voiceCode = getKmProjectCancelVoice(examSubject, xmmcCode); // avPlayer.playAudio([`voice/${voiceCode}.mp3`],true) this.judgeUI.projectsObj[xmdm].type = '1'; this.testKmItems[xmmcCode].status = '1'; @@ -984,7 +996,7 @@ export default class Judge { case 10: { const param611 = judgeConfigObj['611'] || ''; const [f, s] = param611.split('/') - const {xmdm,xmxh} = precast; + const { xmdm, xmxh } = precast; const xmmcCode = judgeUI.projectsObj[xmdm].projectCodeCenter; const xmmcSingleCode = judgeUI.projectsObj[xmdm].projectCode; // if(examSubject == 2 && ((xmdm == 0 && f == 1) || (xmdm == 1 && s == 1) || xmdm == 3)){ @@ -1003,7 +1015,7 @@ export default class Judge { //差分事件 case 11: { - const {type} = nongps + const { type } = nongps this.checkDwzt(type) } default: @@ -1011,7 +1023,7 @@ export default class Judge { } - const {xmmcStr,carztStr,kfArr} = this; + const { xmmcStr, carztStr, kfArr } = this; await callBack({ //项目名称 考车状态 扣分arr @@ -1044,7 +1056,7 @@ export default class Judge { closeAllFiles } = this; - const {projectsObj,judgeConfigObj,examSubject,examMileage,jl,isAllProjectsEnd} = judgeUI; + const { projectsObj, judgeConfigObj, examSubject, examMileage, jl, isAllProjectsEnd } = judgeUI; const kfLen = kf.length; //不报语音的项目列表 const ignoreVoiceCodeArr = (judgeConfigObj['312'] || '').split(',') @@ -1074,7 +1086,7 @@ export default class Judge { if (!isEnd) { judgeTask.addTask(async () => { console.info(judgeTag, `项目开始-${xmdm}-${projectsObj[xmdm].name}`) - await beginProject(xmdm,xmxh) + await beginProject(xmdm) }, { isDelay: true }) @@ -1103,7 +1115,7 @@ export default class Judge { if (!projectIsEnd) { judgeTask.addTask(async () => { console.info(judgeTag, `项目结束-${xmdm}-${projectsObj[xmdm].name}`) - await endProject(xmdm,xmxh) + await endProject(xmdm); this.xmmcSingleCode = 0; this.xmmcEndCode = undefined; }, { @@ -1125,7 +1137,8 @@ export default class Judge { console.info('surenjun', '扣分开始') //扣分时实时播报语音(0-否+1-是) const currentKf = kf[kfLen -1]; - if (judgeConfig.kfVoiceOpen || (examSubject == 2 && judgeConfigObj['618'] == '1') || (examSubject == 3 && judgeConfigObj['418'] == '1')) { + if (judgeConfig.kfVoiceOpen || (examSubject == 2 && judgeConfigObj['618'] == '1') || + (examSubject == 3 && judgeConfigObj['418'] == '1')) { avPlayer.playAudio([`voice/${currentKf.markcatalog}.mp3`, `voice/mark_${Math.abs(currentKf.score)}.mp3`]) } const isStart = await checkProjectIsStart(currentKf.xmdm, 2, currentKf); @@ -1176,9 +1189,9 @@ export default class Judge { pointsDedute = async (ksxm, kf) => { const carInfo = globalThis.carInfo; const deviceNo = globalThis.deviceNo; - const { examSubject,plateNo,carNo } = carInfo; - const {judgeUI,getProjectInfo,fileLog,xmmcSingleCode,xmmcEndCode,filePath} = this; - const {lsh,idCard,serialNumber,ksdd,projectsObj} = judgeUI + const { examSubject, plateNo, carNo } = carInfo; + const { judgeUI, getProjectInfo, fileLog, xmmcSingleCode, xmmcEndCode, filePath } = this; + const { lsh, idCard, serialNumber, ksdd, projectsObj } = judgeUI const time = await getCurrentTime(); const project = getProjectInfo(ksxm); //科目三夜间行驶.模拟灯光、上车准备出现通用评判,ksxm为当前进行的项目 @@ -1194,7 +1207,9 @@ export default class Judge { }) const data = { - xtlb: '17', jkxlh: serialNumber, jkid: '17C53', + xtlb: '17', + jkxlh: serialNumber, + jkid: '17C53', drvexam: { lsh, kskm: examSubject, @@ -1214,7 +1229,8 @@ export default class Judge { } } console.info(judgeTag + 'ksxm=>', data.drvexam.ksxm) - const {code} = await this.sendWriteObjectOut(data, filePath); + + const { code } = await this.sendWriteObjectOut(data, filePath); if (code == 2300007) { this.isJudgeDisConnect = true } @@ -1224,8 +1240,8 @@ export default class Judge { // 评判语音提示 goJudgeVoice = async (sound: SOUND) => { - const {avPlayer,fileLog} = this; - const {xmdm,code,type} = sound; + const { avPlayer, fileLog } = this; + const { xmdm, code, type } = sound; console.info('surenjun code=>', JSON.stringify(code)) //判断是不是模拟灯光语音 if (type == 1) { @@ -1242,14 +1258,10 @@ export default class Judge { }) } else { //收到综合评判语音时,显示综合评判弹窗 - if(code[0] == 'zhpp'){ - const param512 = (this.judgeUI.judgeConfigObj['512'] || '').split(','); - this.judgeUI.isDeductedPopShow = false + if (code[0] == 'zhpp') { clearTimeout(this.deductedPopShowTimer) - if(param512[7] != 0){ - this.judgeUI.isDeductedPopShow = true - this.judgeUI.defaultTabIndex = 1 - } + this.judgeUI.isDeductedPopShow = true + this.judgeUI.defaultTabIndex = 1 this.isEndTip = true } avPlayer.playAudio([`voice/${code[0]}.mp3`]) @@ -1261,20 +1273,19 @@ export default class Judge { this.judgeUI.loadingPopupVisible = true; this.judgeUI.endPopupVisible = false; this.judgeUI.isDeductedPopShow = false; - const {qjjl,dcjl} = ksjs - const {judgeUI,endExam,handleSEP,kfArr,avPlayer,judgeTask,isManual,closeAllFiles} = this; - const {judgeConfigObj,examSubject,isAllProjectsEnd,totalScore,passingScore} = judgeUI; + const { qjjl, dcjl } = ksjs + const { judgeUI, endExam, handleSEP, kfArr, avPlayer, judgeTask, isManual, closeAllFiles } = this; + const { judgeConfigObj, examSubject, isAllProjectsEnd, totalScore, passingScore } = judgeUI; //计算考试分数 // this.judgeUI.totalScore = isAllProjectsEnd ? totalScore : 0; const singlePlay = globalThis.singlePlay const param302 = judgeConfigObj['302']; - // globalThis.windowClass.setWindowSystemBarEnable(['navigation']) //自动退出待验证并且不合格 - if (!isManual && examSubject == 3 && (param302 == 1 || (singlePlay && param302 == 2)) && totalScore < passingScore) { + if (!isManual && examSubject == 3 && (param302 == 1 || (singlePlay && param302 == 2)) && + totalScore < passingScore) { avPlayer.playAudio([`voice/考试结束.mp3`]) } - //联网模式下:项目没有做完、当前分数大于及格分;手动结束直接退出 if (!singlePlay && isManual && !isAllProjectsEnd && totalScore >= passingScore) { avPlayer.playAudio(['voice/empty.mp3'], true, () => { @@ -1284,7 +1295,18 @@ export default class Judge { }) return } + if (examSubject == 3) { + const param302 = judgeConfigObj['302']; + if (totalScore < passingScore) { + //考试不合格;考试模式,自动退出; + if (param302 == 4 || param302 == 5 || param302 == 7 || param302 == 8) { + } + } else { + //考试合格 + } + } + await handleSEP(306); avPlayer.playAudio(['voice/exam_waiting.mp3'], globalThis.singlePlay, async () => { try { if (!singlePlay) { @@ -1295,7 +1317,6 @@ export default class Judge { console.info(judgeTag, JSON.stringify(e)) } await endExam() - }); } @@ -1304,137 +1325,147 @@ export default class Judge { public endExam = async (isManual?: Boolean) => { const carInfo = globalThis.carInfo; const singlePlay = globalThis.singlePlay - const { examSubject ,plateNo} = carInfo; + const { examSubject, plateNo } = carInfo; const { judgeUI, ksjs, getPhoto, - uploadProgressData, - uploadDisConnectData, avPlayer, kfArr, - judgeTask, filePath, closeAllFiles } = this; - const {lsh,idCard,serialNumber,kssycs,totalScore,judgeConfigObj,isAllProjectsEnd,passingScore} = judgeUI + const { lsh, idCard, serialNumber, kssycs, totalScore, judgeConfigObj, isAllProjectsEnd, passingScore } = judgeUI //TODO 断网考试结束补传 // await uploadDisConnectData(); - const time = await getCurrentTime(); - const photoBase64 = await getPhoto(); - const {d1,d2,d3,d4,d5} = ksjs - const data = { - xtlb: '17', jkxlh: serialNumber, jkid: '17C56', - drvexam: { - lsh, - kchp: encodeURI(plateNo), - kskm: examSubject, - sfzmhm: idCard, - //@ts-ignore - zp: photoBase64, - jssj: time, - kscj: (totalScore * 1) > 0 ? totalScore : 0, - kslc: Math.ceil(((ksjs?.qjjl + ksjs?.dcjl) || 0) / 100), - // 1,22;2,560;3,128;4,0;5,0; - dwlc: [d1, d2, d3, d4, d5].map((d, index) => `${index + 1},${Math.floor(d / 100)}`).join(';'), + try { + const time = await getCurrentTime(); + const photoBase64 = await getPhoto(); + const { d1, d2, d3, d4, d5 } = ksjs + const data = { + xtlb: '17', + jkxlh: serialNumber, + jkid: '17C56', + drvexam: { + lsh, + kchp: encodeURI(plateNo), + kskm: examSubject, + sfzmhm: idCard, + //@ts-ignore + zp: photoBase64, + jssj: time, + kscj: (totalScore * 1) > 0 ? totalScore : 0, + kslc: Math.ceil(((ksjs?.qjjl + ksjs?.dcjl) || 0) / 100), + // 1,22;2,560;3,128;4,0;5,0; + dwlc: [d1, d2, d3, d4, d5].map((d, index) => `${index + 1},${Math.floor(d / 100)}`).join(';'), + } } - } - let backTimeOut = setTimeout(() => { - router.back() - }, 90 * 1000) - const {code,keystr,message} = await this.sendWriteObjectOut(data, filePath); - promptWxCode('17C56', code) + let backTimeOut = setTimeout(() => { + router.back() + }, 90 * 1000) + const { code, keystr, message } = await this.sendWriteObjectOut(data, filePath); + promptWxCode('17C56', code) - if (code != 1) { - avPlayer.playAudio(['voice/监管失败.mp3']) - this.judgeUI.errorMsg = decodeURIComponent(message) + if (code != 1) { + avPlayer.playAudio(['voice/监管失败.mp3']) + this.judgeUI.errorMsg = decodeURIComponent(message) - if (code == 2300028 || code == 2300007) { - this.judgeUI.errorMsg = '当前的考试过程信息监管审核未通过,程序将退出!' + if (code == 2300028 || code == 2300007) { + this.judgeUI.errorMsg = '当前的考试过程信息监管审核未通过,程序将退出!' + } + this.isUdpEnd = true; + closeAllFiles() + this.judgeUI.loadingPopupVisible = false; + return } - this.isUdpEnd = true; - closeAllFiles() - this.judgeUI.loadingPopupVisible = false; - return - } - console.info(judgeTag, '考试结束 end') - const param302 = judgeConfigObj['302']; - judgeUI.loadingPopupVisible = true; - let currentKssycs = 0; - let voiceURL = '' - if (examSubject == 2) { - if (isAllProjectsEnd) { - voiceURL = (totalScore < passingScore ? `voice/unqualified_${kssycs == 1 ? 'one' : 'two'}.wav` : 'voice/qualified.mp3') - } else { - voiceURL = `voice/unqualified_${kssycs == 1 ? 'one' : 'two'}.wav` - currentKssycs = kssycs == 1 ? 0 : 1 - } - switch (voiceURL) { - case 'voice/unqualified_one.wav': - currentKssycs = 0; - break; + console.info(judgeTag, '考试结束 end') + const param302 = judgeConfigObj['302']; + judgeUI.loadingPopupVisible = true; + let currentKssycs = 0; + let voiceURL = '' + if (examSubject == 2) { + if (isAllProjectsEnd) { + voiceURL = + (totalScore < passingScore ? `voice/unqualified_${kssycs == 1 ? 'one' : 'two'}.wav` : 'voice/qualified.mp3') + } else { + voiceURL = `voice/unqualified_${kssycs == 1 ? 'one' : 'two'}.wav` + currentKssycs = kssycs == 1 ? 0 : 1 + } + switch (voiceURL) { + case 'voice/unqualified_one.wav': + currentKssycs = 0; + break; - case 'voice/unqualified_two.wav': - currentKssycs = 1; - break; + case 'voice/unqualified_two.wav': + currentKssycs = 1; + break; - case 'voice/qualified.mp3': - currentKssycs = 0; - break; + case 'voice/qualified.mp3': + currentKssycs = 0; + break; + } } - } - if (examSubject == 3) { - if (isAllProjectsEnd) { - if (totalScore < passingScore) { + if (examSubject == 3) { + if (isAllProjectsEnd) { + if (totalScore < passingScore) { + voiceURL = `voice/${kssycs == 1 ? 'exam_no_pass_finish' : 'exam_no_pass'}.mp3` + currentKssycs = kssycs == 1 ? 0 : 1 + } else { + voiceURL = 'voice/exam_pass.mp3' + currentKssycs = 0 + } + } else { voiceURL = `voice/${kssycs == 1 ? 'exam_no_pass_finish' : 'exam_no_pass'}.mp3` currentKssycs = kssycs == 1 ? 0 : 1 - } else { - voiceURL = 'voice/exam_pass.mp3' - currentKssycs = 0 } - } else { - voiceURL = `voice/${kssycs == 1 ? 'exam_no_pass_finish' : 'exam_no_pass'}.mp3` - currentKssycs = kssycs == 1 ? 0 : 1 + switch (voiceURL) { + case 'voice/exam_no_pass_finish.mp3': + currentKssycs = 0; + break; + + case 'voice/exam_no_pass.mp3': + currentKssycs = 1; + break; + + case 'voice/exam_pass.mp3': + currentKssycs = 0; + break; + + } } - switch (voiceURL) { - case 'voice/exam_no_pass_finish.mp3': - currentKssycs = 0; - break; - case 'voice/exam_no_pass.mp3': - currentKssycs = 1; - break; - - case 'voice/exam_pass.mp3': - currentKssycs = 0; - break; + const USER = await getSyncData('USER'); + await upDateTableByArray('USER', [{ + ...USER[0], + kssycs: currentKssycs + }]) + console.info(judgeTag, `考试成绩:${totalScore}`) + if (!singlePlay) { + // await uploadProgressData(); } - } - - const USER = await getSyncData('USER'); - await upDateTableByArray('USER', [{ - ...USER[0], - kssycs: currentKssycs - }]) - - console.info(judgeTag, `考试成绩:${totalScore}`) - if (!singlePlay) { - // await uploadProgressData(); - } - clearTimeout(backTimeOut) - //语音播放扣分项 - let score = 0; - //结束考试时候是否播报一遍所有扣分 - const param634 = judgeConfigObj['634']; - if (kfArr.length && ((examSubject == 2 && param634 == 1) || examSubject == 3)) { - avPlayer.playAudio([`voice/kfdesc.mp3`], false, () => { - try { - kfArr.forEach((kf, index) => { - score += Math.abs(Number(kf.score)); - //TODO 考试分数待替换 - if (score <= (examSubject == 3 ? 10 : 20)) { - if (kfArr.length - 1 === index) { + clearTimeout(backTimeOut) + //语音播放扣分项 + let score = 0; + //结束考试时候是否播报一遍所有扣分 + const param634 = judgeConfigObj['634']; + if (kfArr.length && ((examSubject == 2 && param634 == 1) || examSubject == 3)) { + avPlayer.playAudio([`voice/kfdesc.mp3`], false, () => { + try { + kfArr.forEach((kf, index) => { + score += Math.abs(Number(kf.score)); + //TODO 考试分数待替换 + if (score <= (examSubject == 3 ? 10 : 20)) { + if (kfArr.length - 1 === index) { + avPlayer.playAudio([`voice/${kf.markcatalog}.mp3`, voiceURL], false, () => { + this.isUdpEnd = true; + closeAllFiles() + router.back(); + }) + throw new Error('End Loop') + } + avPlayer.playAudio([`voice/${kf.markcatalog}.mp3`]) + } else { avPlayer.playAudio([`voice/${kf.markcatalog}.mp3`, voiceURL], false, () => { this.isUdpEnd = true; closeAllFiles() @@ -1442,28 +1473,27 @@ export default class Judge { }) throw new Error('End Loop') } - avPlayer.playAudio([`voice/${kf.markcatalog}.mp3`]) - } else { - avPlayer.playAudio([`voice/${kf.markcatalog}.mp3`, voiceURL], false, () => { - this.isUdpEnd = true; - closeAllFiles() - router.back(); - }) - throw new Error('End Loop') - } - }) - } catch (e) { - console.info(judgeTag, JSON.stringify(e)) - } - }) - } else { - avPlayer.playAudio([voiceURL], true, () => { - setTimeout(() => { - this.isUdpEnd = true - closeAllFiles() - router.back(); - }, param302 == 8 ? 3000 : 0) + }) + } catch (e) { + console.info(judgeTag, JSON.stringify(e)) + } + }) + } else { + avPlayer.playAudio([voiceURL], true, () => { + setTimeout(() => { + this.isUdpEnd = true + closeAllFiles() + router.back(); + }, param302 == 8 ? 3000 : 0) + }) + } + + } catch (e) { + promptAction.showToast({ + message: "考试结束异常,请尝试重新结束", + duration: 3000 }) + judgeUI.loadingPopupVisible = false } } @@ -1490,7 +1520,7 @@ export default class Judge { // 消息心跳发送 getMessageHeartbeat = async (isEnd?: Boolean) => { const carInfo = globalThis.carInfo; - const { examSubject,plateNo,ksyh } = carInfo; + const { examSubject, plateNo, ksyh } = carInfo; const { judgeUI, isExam, @@ -1507,17 +1537,19 @@ export default class Judge { fileLog, } = this; const singlePlay = globalThis.singlePlay - const {lsh,startHourTime,totalScore,examTime,judgeConfigObj} = judgeUI; - const {fourInOneScreen:{ - gpsDigit - }} = judgeConfig + const { lsh, startHourTime, totalScore, examTime, judgeConfigObj } = judgeUI; + const { + fourInOneScreen:{ + gpsDigit + } + } = judgeConfig const examType = examSubject == 2 ? 2 : 3 - const {sensor,gps} = tempData; + const { sensor, gps } = tempData; if (tempData.sensor === undefined) { return } - const {zfxd,yfxd,shtd,ygd,jgd,skd,dh1,dh2,lhq,jsc,ssc,fsc,lb,mkg,aqd,ygq,cs,fdjzs,dw} = sensor - const {jd,wd, hxj, fyj, hbg,sd} = gps; + const { zfxd, yfxd, shtd, ygd, jgd, skd, dh1, dh2, lhq, jsc, ssc, fsc, lb, mkg, aqd, ygq, cs, fdjzs, dw } = sensor + const { jd, wd, hxj, fyj, hbg, sd } = gps; //过滤错误数据 if (jd == 0) { @@ -1525,17 +1557,16 @@ export default class Judge { } const translateProject = getTranslateProject(); const sbxh = getSbxh(xmdm, xmxh) - const {carzt,dcjl,qjjl,dxjl,bxjl} = performInfo || {}; + const { carzt, dcjl, qjjl, dxjl, bxjl } = performInfo || {}; const asclshArr = stringToASC( - fillZero(( - singlePlay ? - (examSubject == 2 ? '0000000000000' : '0000000000000') : lsh) || 0, 13) + fillZero((singlePlay ? (examSubject == 2 ? '0000000000000' : '1111111111111') : lsh) || 0, 13) ); //13不足要补0 const ascksyhArr = stringToASC(fillZero(ksyh || 0, 13)) const ascsbxhArr = stringToASC(sbxh) const translateSignals = getTranslateSignals( - [zfxd, yfxd, shtd, ygd, jgd, skd, dh1, dh2, lhq, jsc, ssc, fsc, lb, mkg, aqd].concat(getDwStatusType(dw)).concat(getCarStatusType(carzt)).concat([ygq, sensor.wd, 0]) + [zfxd, yfxd, shtd, ygd, jgd, skd, dh1, dh2, lhq, jsc, ssc, fsc, lb, mkg, aqd].concat(getDwStatusType(dw)) + .concat(getCarStatusType(carzt)).concat([ygq, sensor.wd, 0]) ) //@ts-ignore const translateJd = convertGpsCoord2(wd).toFixed(gpsDigit) * Math.pow(10, gpsDigit); @@ -1563,7 +1594,8 @@ export default class Judge { translateSignals, //速度 发动机转速 GPS纬度 GPS经度 主天线位置 //@ts-ignore - string2Bytes(tempSd * 100, 2 * 8), string2Bytes(fdjzs / 100, 8), string2Bytes(translateJd, 4 * 8), string2Bytes(translateWd, 4 * 8), string2Bytes(1, 8), + string2Bytes(tempSd * 100, 2 * 8), string2Bytes(fdjzs / 100, 8), string2Bytes(translateJd, 4 * 8), + string2Bytes(translateWd, 4 * 8), string2Bytes(1, 8), //GPS东向距离 string2Bytes(dxjl < 0 ? (dxjl + 4294967296) : dxjl, 4 * 8), //GPS北向距离 @@ -1610,8 +1642,8 @@ export default class Judge { //获取场地序号 getSbxh = (ksxm, xmxh) => { - const {judgeUI} = this; - const {cdsbInfoObj,projectsObj} = judgeUI; + const { judgeUI } = this; + const { cdsbInfoObj, projectsObj } = judgeUI; const project = projectsObj[ksxm] if (project == 3) { return '0000000000' @@ -1627,8 +1659,8 @@ export default class Judge { } getSbbm = (ksxm, xmxh) => { - const {judgeUI} = this; - const {cdsbInfoObj,projectsObj,examSubject} = judgeUI; + const { judgeUI } = this; + const { cdsbInfoObj, projectsObj, examSubject } = judgeUI; const project = projectsObj[ksxm] //科目三不需要 if (examSubject == 3) { @@ -1645,7 +1677,7 @@ export default class Judge { // 中心所有项目转换 getTranslateProject = () => { - const {examSubject} = this.judgeUI; + const { examSubject } = this.judgeUI; const tempItems = (examSubject == 2 ? testKm2Items : testKm3Items).map(item => { const current = this.testKmItems[item.code]; return { @@ -1682,22 +1714,23 @@ export default class Judge { // 获取模型数据 getModelData = (modelName) => { + const modelPath = this.modelPath const fileModel = this.fileModel; - const modelData = fileModel.getModelContent('models', modelName); + const modelData = fileModel.getModelContent(modelPath, modelName); return modelData } // 统计必考项目、所有项目、已考数量 setCountItems = async () => { const carInfo = globalThis.carInfo; - const { examSubject} = carInfo; - const {projectsObj} = this.judgeUI; + const { examSubject } = carInfo; + const { projectsObj } = this.judgeUI; //必考项目数量 必考项目已考数量 let projectNum = 0, endProjectsNum = 0; // 所有考试项目数量 项目已考项目数量 let allProjectNum = 0, allEndProjectsNum = 0; Reflect.ownKeys(projectsObj).forEach(projectKey => { - const {type,isRequired} = projectsObj[projectKey]; + const { type, isRequired } = projectsObj[projectKey]; allProjectNum += 1; if (type == 3 || type == 4) { allEndProjectsNum += 1; @@ -1721,8 +1754,8 @@ export default class Judge { // 检测差分状态 checkDwzt = async (type) => { - const {avPlayer} = this; - const config499 = this.judgeUI.judgeConfigObj['499']; + const { avPlayer } = this; + const judgeConfig = this.judgeUI.judgeConfig; switch (type) { case 0: this.judgeUI.isDwztRight = true; @@ -1730,17 +1763,10 @@ export default class Judge { case 1: this.judgeUI.dwztErrorVisible = true; - clearInterval(this.judgeUI.timer); - clearInterval(globalThis.judgeTimer) avPlayer.playAudio([`voice/差分状态异常.mp3`], true) setTimeout(() => { - try { - this.checkExamIsEnd(true); - } catch (e) { - this.closeAllFiles() - router.back() - } - }, config499 * 1000) + router.back() + }, 3000) break; case 2: @@ -1767,20 +1793,14 @@ export default class Judge { //开始评判 private async judging(callBack: Function) { - const {judgeUI} = this; - const { name, lsh, idCard,kssycs,markRules} = judgeUI; + const { judgeUI } = this; + const { name, lsh, idCard, kssycs, manualMarkRules } = judgeUI; const fileLog = new FileLog(judgeUI.context); const filePath = await fileLog.initFileLogo({ name, lsh, idCard }); - - const ipFileUtil = new FileUtil(globalThis.context) - const ipConfigStr = await ipFileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/ipConfig.txt'); - const ipConfig = JSON.parse(ipConfigStr) - this.fileLog = fileLog; this.filePath = filePath; - this.bklx = Number(ipConfig.cardType) const { getJudgeBeginData, @@ -1825,7 +1845,6 @@ export default class Judge { this.handleRealExam(strData, callBack) }) - await examJudgeSetPerformCallback(async (info) => { console.info('评判实时数据', info) const performInfo = JSON.parse(info) @@ -1837,11 +1856,6 @@ export default class Judge { this.judgeUI.jl = jl //TODO 待优化 跨组件传值不生效 globalThis.laneData = performInfo.lane; - //特殊扣分标记上传中心 - if(performInfo.specialkf !== this.specialkf){ - this.judgeUI.uploadMileage(performInfo.specialkf) - this.specialkf = performInfo.specialkf - } }) // 3.开始考试 @@ -1858,8 +1872,8 @@ export default class Judge { if (!globalThis.singlePlay) { this.videoData = await saveStartRecordVideo(`${name}_${kssycs}`) } - globalThis.statue = 4 - const {examSubject,projectsObj} = this.judgeUI + + const { examSubject, projectsObj } = this.judgeUI // if(examSubject == 3){ // //不做模拟灯光,需要做上车准备 =>(请上车准备) // if(projectsObj[41]?.type == 3 && projectsObj[1]?.type != 3){ @@ -1887,8 +1901,7 @@ export default class Judge { handDistance(); } }); - //页面逻辑处理完成 - this.judgeUI.isInitSuccess = true; + // this.checkExamIsEnd() //监听远程结束考试 @@ -1896,33 +1909,18 @@ export default class Judge { this.checkExamIsEnd(true); }) - console.info(judgeTag, JSON.stringify(markRules)) - + console.info(judgeTag, JSON.stringify(manualMarkRules)) //监听远程扣分 globalThis.udpEvent.onKfExam(async (content) => { - //为1时,所有扣分项均可远程扣分;其它,只能扣 MARKSERIAL 大于 99 的扣分项 - const config810 = this.judgeUI.judgeConfigObj['810']; console.info('评判收到远程扣分项目内容' + JSON.stringify(content)) - const { kfxh , directives } = content.data; + const { kfxh, directives } = content.data; console.info(judgeTag, '评判收到远程扣分项目内容,扣分序号:' + `kfxh=>${kfxh}; directives=>${directives}`) - //根据扣分序号找扣分代码 - const currentKf = markRules.filter(mark => ( - mark.kfxh == kfxh && (config810 == 1 || mark.markserial > 99) - ))[0]; - + const currentKf = manualMarkRules.filter(mark => mark.kfxh == kfxh)[0]; console.info(judgeTag, '扣分项目:' + JSON.stringify(currentKf)) this.setJudgeMark(currentKf.itemno, currentKf.markserial, 2); globalThis.judgeUdp.confirmKf(directives, 1) }) - - //监听远程终止考试 - globalThis.udpEvent.onStopExam(async () => { - const config392 = (this.judgeUI.judgeConfigObj['392'] || '20,81').split(','); - console.info(judgeTag, '开始远程终止考试扣分') - this.setJudgeMark(config392[0]*1, config392[1], 2); - }) - this.checkExamIsEnd(); } diff --git a/entry/src/main/ets/pages/judgeSDK/utils/fileModel.ts b/entry/src/main/ets/pages/judgeSDK/utils/fileModel.ts index c9131252..4b43662a 100644 --- a/entry/src/main/ets/pages/judgeSDK/utils/fileModel.ts +++ b/entry/src/main/ets/pages/judgeSDK/utils/fileModel.ts @@ -55,11 +55,10 @@ export default class FileModel{ return content; }catch (e){ console.info('surenjun',JSON.stringify(e)) - // promptAction.showToast({ - // message:`请检查模型路径${folderPath}/${fileName}是否正确!`, - // duration:4000 - // }) - return ''; + promptAction.showToast({ + message:`请检查模型路径${folderPath}/${fileName}是否正确!`, + duration:4000 + }) } } diff --git a/entry/src/main/ets/pages/judgeSDK/utils/filePhoto.ts b/entry/src/main/ets/pages/judgeSDK/utils/filePhoto.ts index 25563c36..1df03b04 100644 --- a/entry/src/main/ets/pages/judgeSDK/utils/filePhoto.ts +++ b/entry/src/main/ets/pages/judgeSDK/utils/filePhoto.ts @@ -1,46 +1,30 @@ import FileUtil from '../../../common/utils/File' import { takePhoto } from '../../../common/service/videoService'; import promptAction from '@ohos.promptAction'; -import {judgeConfig} from './judgeConfig' +import { judgeConfig } from './judgeConfig' -interface Params{ - userName:string - pwd:string - ip:string - port:string - rlls:string - pztd:string +interface Params { + userName: string + pwd: string + ip: string + port: string + rlls: string + pztd: string } -export default class FilePhoto{ - - private params:Params - private context:any - private fileUtil:FileUtil +export default class FilePhoto { public mediaTest - - constructor(context) { - (async ()=>{ - //TODO 309参数 获取拍照摄像头拍照通道 - const fileUtil = new FileUtil(context) - const strConfig = await fileUtil.readFile('/mnt/hmdfs/100/account/device_view/local/files/duolun/config/config3.txt'); - const config = JSON.parse(strConfig) - const {userName,ip,pwd,port,rlls,pztd} = config - this.params = {userName,pwd,ip,port,rlls,pztd} - this.context = context - this.fileUtil = fileUtil - })() - } - + private params: Params + private context: any public getPhoto = async () => { - const {params} = this; - if(!judgeConfig.isPhotoOpen){ + const { params } = this; + if (!judgeConfig.isPhotoOpen) { return '' - }else{ + } else { try { - console.info('surenjun','拍照开始') - const res = await takePhoto(params, this.context, 'pz/',2); - console.info('surenjun','拍照结束' + JSON.stringify(res)) + console.info('surenjun', '拍照开始') + const res = await takePhoto(params, this.context, 'pz/', 2); + console.info('surenjun', '拍照结束' + JSON.stringify(res)) return res.base64 } catch (e) { console.error('surenjun =>拍照异常' + JSON.stringify(e)) @@ -52,5 +36,26 @@ export default class FilePhoto{ } } } + private fileUtil: FileUtil + constructor(context) { + (async () => { + //TODO 309参数 获取拍照摄像头拍照通道 + const fileUtil = new FileUtil(context) + const strConfig = + await fileUtil.readFile('/mnt/hmdfs/100/account/device_view/local/files/duolun/config/config3.txt'); + const config = JSON.parse(strConfig) + const { userName, ip, pwd, port, rlls, pztd } = config + this.params = { + userName, + pwd, + ip, + port, + rlls, + pztd + } + this.context = context + this.fileUtil = fileUtil + })() + } } \ No newline at end of file diff --git a/entry/src/main/ets/pages/judgeSDK/utils/judgeCommon.ts b/entry/src/main/ets/pages/judgeSDK/utils/judgeCommon.ts index c40b70f6..bef47155 100644 --- a/entry/src/main/ets/pages/judgeSDK/utils/judgeCommon.ts +++ b/entry/src/main/ets/pages/judgeSDK/utils/judgeCommon.ts @@ -107,6 +107,8 @@ export function getKmProjectVoice( const param544Str = judgeConfig['544']?.split(',') || []; const param405Str = judgeConfig['405'] || 0; + console.info('surenjun => param544Str.length',param544Str.length) + const {num,count,road} = lane if(examSubject == 2){ return projectCode @@ -317,14 +319,12 @@ export const plcStrToJson = async (plc:string) =>{ }, gps:{ //办卡类型 定位差分状态 - bklx:Number(p[56]), dwzt:p[83], + bklx:p[56], dwzt:p[83], //@ts-ignore 角度差分状态 jdzt:p[92].split('-')[0]*1, - //一代机、三代机经纬度数据兼容 - //gps时间 经度 纬度 - sj:time, jd:Math.max(Number(p[95]),Number(p[96])), wd:Math.min(Number(p[95]),Number(p[96])), - //航向角 俯仰角 海拔高 高度差 速度 - hxj:p[90], fyj:p[91], hbg:p[85], gdc:p[86], sd:p[97], + //gps数据 + //gps时间 经度 纬度 航向角 俯仰角 海拔高 高度差 速度 + sj:time, jd:p[96], wd:p[95], hxj:p[90], fyj:p[91], hbg:p[85], gdc:p[86], sd:p[97], //龄期 经度因子 纬度因子 定位搜星数 age:p[87], jdyz:p[89], wdyz:p[88], dwsxs:p[84] || 0, //@ts-ignore 角度搜星数 @@ -350,7 +350,7 @@ export const plcStrToWXJson = async (plc:string) =>{ const timeStr = p[93] + '' + p[94]; const gps = { //办卡类型 定位差分状态 - bklx:Number(p[56]), dwzt:p[83], + bklx:p[56], dwzt:p[83], // 经度 纬度 航向角 俯仰角 海拔高 高度差 速度 jd:p[96], wd:p[95], hxj:p[90], fyj:p[91], hbg:p[85], gdc:p[86], sd:p[97], //龄期 经度因子 纬度因子 定位搜星数 diff --git a/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts b/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts index d6ea58e8..e1b48489 100644 --- a/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts +++ b/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts @@ -1,6 +1,7 @@ //考试回放开关 export const judgeConfig = { - version:'2024.08.21.01', + // 外壳版本号 + version: "2025.05.26.01", //本地目录开关 isTrajectoryOpen: false, //是否开启拍照 @@ -8,22 +9,22 @@ export const judgeConfig = { //扣分语音是否强制开启 kfVoiceOpen: false, //忽略的考试项目 - ignoreProjects:[], + ignoreProjects: [], // 是否忽略考试前熄火、车门检查 isCheckFireOpen: false, //轨迹回放是否开启Udp - udpOpen:true, + udpOpen: true, // 本地模型地址 - // modelPath: 'models/model_enc', + modelPath: 'models/model_enc', // 济南科目三 - trajectoryPath: 'logs/2025_04_23_09_50_55_2504755332926_320924199111132926_陈静/judge_exam_data.txt', + trajectoryPath: 'logs/2024_10_12/2024_10_12_11_50_10_9999427676823_744299437502336256_隋统/judge_exam_data.txt', //四合一画面配置 - fourInOneScreen:{ + fourInOneScreen: { //gps位数 - gpsDigit:7 + gpsDigit: 6 }, // 杭州科目二 // trajectoryPath: 'logs/2024_07_19/0000000000001_342323199501470011_测试学员1_2024_07_19_06_49_12/judge_exam_data.txt', //TODO 济南临时特殊配置 - systemParamConfig:{} + systemParamConfig: {} } \ No newline at end of file diff --git a/oh-package-lock.json5 b/oh-package-lock.json5 index bc40219d..1f023b33 100644 --- a/oh-package-lock.json5 +++ b/oh-package-lock.json5 @@ -1,13 +1,15 @@ { - "lockfileVersion": 1, + "lockfileVersion": 2, "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", "specifiers": { "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" }, "packages": { "@ohos/hypium@1.0.6": { - "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", - "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==" + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", + "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==", + "registryType": "ohpm", + "shasum": "3f5fed65372633233264b3447705b0831dfe7ea1" } } } \ No newline at end of file