fix: 优化评判UDP

This commit is contained in:
wangzhongjie 2025-06-17 09:10:16 +08:00
parent 339dc43493
commit 59b95dc609
2 changed files with 26 additions and 20 deletions

View File

@ -1,8 +1,6 @@
import common from '@ohos.app.ability.common';
// ------------------------------
// 基础共用类型
// ------------------------------
import { MA_SYSTEMPARMType } from './Table';
/** 基础考试字段 */
interface BaseExamFields {
@ -742,7 +740,7 @@ export interface JudgePerformInfo {
lane: PerLane
}
export interface PerLane {
export interface PerLane {
MapRoad_Code_No: string
MapRoad_Name: string
TouchLineType: number
@ -821,4 +819,17 @@ export interface WuxiExamType {
}
export interface PLCDataType {
sensor: Sensor,
gps: Gps,
}
export interface ProjectDataType {
code: string
status: number
}
export interface ProjectItemType {
code: ProjectDataType
status: string
}

View File

@ -1,4 +1,13 @@
import { CarInfoType, EnvironmentConfigurationType, Gps, Sensor, UDPParamType } from '../../model';
import {
CarInfoType,
EnvironmentConfigurationType,
Gps,
PLCDataType,
ProjectDataType,
ProjectItemType,
Sensor,
UDPParamType
} from '../../model';
import { testKm2Items, testKm3Items } from '../../pages/judgeSDK/dataTest';
import { fillZero, } from '../../pages/judgeSDK/utils/Common';
import { JudgeConfig } from '../../config';
@ -10,21 +19,6 @@ import systemTime from '@ohos.systemDateTime';
import { examCalcGpsDistance } from '../../pages/judgeSDK/api';
import { SerialNumberInstance } from '../SerialNumber';
interface PLCDataType {
sensor: Sensor,
gps: Gps,
}
interface ProjectDataType {
code: string
status: number
}
interface ProjectItemType {
code: ProjectDataType
status: string
}
class JudgeUdpBusiness {
private static instance: JudgeUdpBusiness
@ -175,6 +169,7 @@ class JudgeUdpBusiness {
console.info('surenjun', `考车发送确定扣分指令,指令为:${directives}`)
}
// 初始化
async init(config: EnvironmentConfigurationType, carInfo: CarInfoType, singlePlay: boolean, lsh: string): Promise<void> {
this.lsh = lsh
this.carInfo = carInfo