diff --git a/entry/src/main/ets/model/Judge.ets b/entry/src/main/ets/model/Judge.ets index 0c59bf7..a7f9a3c 100644 --- a/entry/src/main/ets/model/Judge.ets +++ b/entry/src/main/ets/model/Judge.ets @@ -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 +} diff --git a/entry/src/main/ets/utils/business/JudgeUdpBusiness.ets b/entry/src/main/ets/utils/business/JudgeUdpBusiness.ets index f1e33dc..94fbd23 100644 --- a/entry/src/main/ets/utils/business/JudgeUdpBusiness.ets +++ b/entry/src/main/ets/utils/business/JudgeUdpBusiness.ets @@ -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 { this.lsh = lsh this.carInfo = carInfo