fix: 版本号

This commit is contained in:
wangzhongjie 2025-09-16 15:45:15 +08:00
parent 8d7173c545
commit 3ee1b98b43
11 changed files with 511 additions and 498 deletions

View File

@ -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"

View File

@ -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"
}
}
}

View File

@ -25,7 +25,7 @@ interface WR {
}
// 通用监管接口
export async function writeObjectOut(params, filePath?: string): Promise<WR> {
export async function writeObjectOut(params, externalTransmission: boolean, filePath?: string): Promise<WR> {
const singlePlay = globalThis.singlePlay
if (singlePlay) {
return { code: 1 }
@ -54,8 +54,7 @@ export async function writeObjectOut(params, filePath?: string): Promise<WR> {
//新监管调用
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) {
<lsh>${params.lsh}<lsh>
<kskssj>${params.examinationRoomId}<kskssj>
<kslc>${params.kslc}<kslc>
<specialkf>${params.specialkf}<specialkf>
</body>
</uploadExamMileageReq>`,
method: 'post',

View File

@ -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<string>{
const temp = libJudgeSdk.examJudgeSetLogCallback(level,handleLog);
return await handle(temp,'examJudgeSetLogCallback')
export async function examJudgeSetLogCallback(level: number, handleLog: Function): Promise<string> {
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 levelinfoStrlen
* @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<string>{
return new Promise((resolve,reject)=>{
if(temp == 0){
async function handle(temp, fnName): Promise<string> {
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()
}

View File

@ -73,7 +73,6 @@ export interface CARINFO {
FLAG: string,
BK1: string,
BK2: string
//脉冲里程设置
X_MCH: string
}

File diff suppressed because it is too large Load Diff

View File

@ -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
})
}
}

View File

@ -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
})()
}
}

View File

@ -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],
//龄期 经度因子 纬度因子 定位搜星数

View File

@ -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: {}
}

View File

@ -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"
}
}
}