diff --git a/Makefile b/Makefile
index 99ba50c..3678164 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 gitLog:
 	git log --since="2025-08-08 14:00" --until="2025-08-19 15:00"  --pretty=format:"%n    %s
%n     [提交人]:%an
%n     [提交时间]:%ad
%n    [提交版本]:%h%n %n" --date=format:"%Y-%m-%d %H:%M" > release_note.md
-
 re:
 	hdc shell mount -o remount,rw /
-
 pushJudge:
-	hdc file send  /Users/wangzhongjie/Desktop/duolun/openHarmony/car_next/ohos/so/libjudgesdk.z.so /system/lib/module/
\ No newline at end of file
+	hdc file send  /Users/wangzhongjie/Desktop/duolun/openHarmony/car_next/ohos/so/libjudgesdk.z.so /system/lib/module/
+uninstall:
+	hdc uninstall com.oh.dts
diff --git a/build-profile.json5 b/build-profile.json5
index e620bae..00c3c80 100644
--- a/build-profile.json5
+++ b/build-profile.json5
@@ -5,9 +5,9 @@
         "name": "default",
         "material": {
           "certpath": "/Users/wangzhongjie/.ohos/config/openharmony/default_car_next_xIuD6UMCLxZgyeiH-w2XdDck6DewIfdHAvOk_FUbNZo=.cer",
-          "storePassword": "0000001B3C172BE457130742FD9398569777C93BBF9F9BBC9FA403F3FD8E06D5893F3D14B1789DF6E0F242",
+          "storePassword": "0000001B42BCAC6B534ABB3B488F5C45764278201EE92A007F988939EC561EEB8ED64F737B8A11A7A72A1E",
           "keyAlias": "debugKey",
-          "keyPassword": "0000001BEB9FF05D2B1A12791F121AFD8768580FD640018F6A394C3992EF05F73C2CEFAA130DE40703DFE8",
+          "keyPassword": "0000001B2A149F63C38A6F5B972EC903EB0ADAB7978BA6C33B8E460C7353BD0BC2248776AB2FD2AE009A98",
           "profile": "/Users/wangzhongjie/.ohos/config/openharmony/default_car_next_xIuD6UMCLxZgyeiH-w2XdDck6DewIfdHAvOk_FUbNZo=.p7b",
           "signAlg": "SHA256withECDSA",
           "storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/default_car_next_xIuD6UMCLxZgyeiH-w2XdDck6DewIfdHAvOk_FUbNZo=.p12"
diff --git a/entry/oh-package-lock.json5 b/entry/oh-package-lock.json5
index 3f4c904..d5892e3 100644
--- a/entry/oh-package-lock.json5
+++ b/entry/oh-package-lock.json5
@@ -1,5 +1,5 @@
 {
-  "lockfileVersion": 2,
+  "lockfileVersion": 1,
   "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
   "specifiers": {},
   "packages": {}
diff --git a/entry/src/main/ets/api/index.ets b/entry/src/main/ets/api/index.ets
index c456c52..0acbfe2 100644
--- a/entry/src/main/ets/api/index.ets
+++ b/entry/src/main/ets/api/index.ets
@@ -145,4 +145,5 @@ export async function initCarParameter(params: object) {
     method: http.RequestMethod.POST,
     xml: false,
   })
-}
\ No newline at end of file
+}
+
diff --git a/entry/src/main/ets/api/judgeNew.ets b/entry/src/main/ets/api/judgeNew.ets
index dab1f0c..89dce6f 100644
--- a/entry/src/main/ets/api/judgeNew.ets
+++ b/entry/src/main/ets/api/judgeNew.ets
@@ -12,6 +12,7 @@ import {
 } from '../model';
 import FileUtils from '../utils/FileUtils';
 import { GetSyncData } from '../utils/table/Operation';
+import { JudgeTag } from '../config';
 
 //监管接口序列号映射
 const gjxlhObj: Record = {
@@ -52,7 +53,7 @@ export default async function writeObjectOutNew(data: RegulatoryInterfaceParams,
   }
 
   // let connectTimeout = sjbs === '02-21-000014' ?60000:1
-  console.info('surenjun', '调用新监管')
+  console.info(JudgeTag, '调用新监管')
   let temp: WR
   try {
     const JGHOST: string = AppStorage.get('JGHOST') || ""
diff --git a/entry/src/main/ets/api/networkCamera.ets b/entry/src/main/ets/api/networkCamera.ets
new file mode 100644
index 0000000..1ae7c88
--- /dev/null
+++ b/entry/src/main/ets/api/networkCamera.ets
@@ -0,0 +1,94 @@
+import http from '@ohos.net.http';
+import buffer from '@ohos.buffer';
+import image from '@ohos.multimedia.image';
+
+const TAG = 'CameraService';
+
+export async function ObtainNetworkCameraImages(): Promise {
+  const url = "http://192.168.1.125/snapshot.cgi?stream=1&username=admin&password=123456";
+  let httpRequest = http.createHttp();
+
+  try {
+    console.info(TAG, 'Starting image request...');
+    const response = await httpRequest.request(url, {
+      method: http.RequestMethod.GET,
+      connectTimeout: 10000,
+      readTimeout: 10000,
+      expectDataType: http.HttpDataType.ARRAY_BUFFER,
+    });
+
+    if (response.responseCode === 200) {
+      let arrayBuffer = response.result as ArrayBuffer;
+
+      // 裁剪左半部分
+      const croppedBase64 = await cropLeftHalf(arrayBuffer);
+
+      return croppedBase64;
+    } else {
+      console.error(TAG, `HTTP Error: ${response.responseCode}`);
+      return null;
+    }
+  } catch (error) {
+    console.error(TAG, 'An error occurred while fetching the image.', JSON.stringify(error));
+    return null;
+  } finally {
+    httpRequest.destroy();
+  }
+}
+
+async function cropLeftHalf(arrayBuffer: ArrayBuffer): Promise {
+  let imageSource: image.ImageSource | null = null;
+  let pixelMap: image.PixelMap | null = null;
+
+  try {
+    // 1. 创建ImageSource
+    imageSource = image.createImageSource(arrayBuffer);
+
+    // 2. 获取图片信息
+    const imageInfo = await imageSource.getImageInfo();
+    console.info(TAG, `Original image size: ${imageInfo.size.width}x${imageInfo.size.height}`);
+
+    // 3. 计算并定义左半部分的裁剪区域
+    const leftHalfWidth = Math.floor(imageInfo.size.width / 2);
+    const cropRegion: image.Region = {
+      size: {
+        width: leftHalfWidth,
+        height: imageInfo.size.height
+      },
+      x: 0,
+      y: 0
+    };
+
+    // 创建解码选项,并将裁剪区域放入其中
+    const decodingOptions: image.DecodingOptions = {
+      desiredRegion: cropRegion
+    };
+
+    // 4. 创建像素映射并进行裁剪
+    pixelMap = await imageSource.createPixelMap(decodingOptions);
+
+    // 5. 将裁剪后的PixelMap转换为ArrayBuffer
+    const imagePacker = image.createImagePacker();
+    const packedData = await imagePacker.packing(pixelMap, {
+      format: "image/jpeg",
+      quality: 90
+    });
+
+    // 6. 转换为Base64
+    const buf = buffer.from(packedData);
+    const base64 = buf.toString('base64');
+
+    const result = `data:image/jpeg;base64,${base64}`;
+    console.info(TAG, `Left half cropped successfully. Size: ${leftHalfWidth}x${imageInfo.size.height}`);
+
+    return result;
+
+  } catch (error) {
+    console.error(TAG, 'Image cropping failed:', JSON.stringify(error));
+    return "";
+  } finally {
+    // 7. 在 finally 块中安全地释放资源
+    imageSource?.release();
+    pixelMap?.release();
+  }
+}
\ No newline at end of file
diff --git a/entry/src/main/ets/config/LogEnum.ets b/entry/src/main/ets/config/LogEnum.ets
index da2fbe4..0407a07 100644
--- a/entry/src/main/ets/config/LogEnum.ets
+++ b/entry/src/main/ets/config/LogEnum.ets
@@ -71,5 +71,19 @@ export const StartExamTag = '[StartExam]'
 
 //人脸对比
 export const FaceCompareTag = '[FaceCompare]';
+
 //过程数据处理
-export const ProcessDataTag = '[ProcessData]';
\ No newline at end of file
+export const ProcessDataTag = '[ProcessData]';
+
+// 日志
+export const LogTag = '[LogWorker]';
+
+// 开始考试,结束考试标志
+export const StartEndExamTag = '[StartEndExam]';
+
+// Queue
+export const QueueTag = '[Queue]'
+
+// 考试过程数据
+export const ExamProcessDataTag = '[ExamProcessData]';
+
diff --git a/entry/src/main/ets/config/global.ets b/entry/src/main/ets/config/global.ets
index aa15b05..fa5dc22 100644
--- a/entry/src/main/ets/config/global.ets
+++ b/entry/src/main/ets/config/global.ets
@@ -10,6 +10,7 @@ import { GlobalConfigType } from '../model';
  */
 export const GlobalConfig: GlobalConfigType = {
   commonFileWriteAddress: '/mnt/hmdfs/100/account/device_view/local/files/duolun',
+  modelPath: "/mnt/hmdfs/100/account/device_view/local/files/duolun/models/model_enc",
   picSavePath: '/storage/cloud/100/files/Photo/',
   videoSavePath: '/storage/cloud/100/files/Videos/',
   host: 'http://192.168.32.105:8089',
diff --git a/entry/src/main/ets/config/judge.ets b/entry/src/main/ets/config/judge.ets
index 96aeea8..5316320 100644
--- a/entry/src/main/ets/config/judge.ets
+++ b/entry/src/main/ets/config/judge.ets
@@ -24,9 +24,9 @@ export const JudgeConfig: JudgeConfigType = {
   //轨迹回放是否开启Udp
   udpOpen: true,
   // 本地模型地址
-  modelPath: 'models/model_enc',
+  modelPath: 'models/',
   // 济南科目三
-  trajectoryPath: 'logs/2024_10_12/2024_10_12_11_50_10_9999427676823_744299437502336256_隋统/judge_exam_data.txt',
+  trajectoryPath: 'logs/2025_08_22/2025_08_22_17_09_49_9999245520855_654211778346526080_杜兰曼/judge_exam_data.txt',
   //四合一画面配置
   fourInOneScreen: {
     //gps位数
diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets
index 61a6792..b4e0f4a 100644
--- a/entry/src/main/ets/entryability/EntryAbility.ets
+++ b/entry/src/main/ets/entryability/EntryAbility.ets
@@ -8,10 +8,9 @@ import { BaseInfoType, CarInfoType, EnvironmentConfigurationType, ExaminerInfoTy
 import DB from '../utils/DbSql';
 import { DrivingDataStorage } from '../utils/business/DrivingDataStorage';
 import { InitTable } from '../utils/table/Operation';
-import FileUtils from '../utils/FileUtils';
 import { EntryTag } from '../config';
 import { dConsole } from '../utils/LogWorker';
-import { UseAuth } from '../utils/Common';
+import { ReadFileContent, UseAuth } from '../utils/Common';
 import { DifferentialAndSignal } from '../utils/business/DifferentialAndSignalWorker';
 
 export default class EntryAbility extends UIAbility {
@@ -19,9 +18,8 @@ export default class EntryAbility extends UIAbility {
     console.log(EntryTag, "多伦鸿蒙车载程序启动")
     await DB.init(this.context)
     try {
-      let fileUtil = new FileUtils(this.context)
       // 读取系统设置参数
-      const data = await fileUtil.readFile(GlobalConfig.commonFileWriteAddress + '/config/ipConfig.txt');
+      const data = await ReadFileContent(GlobalConfig.commonFileWriteAddress + '/config/ipConfig.txt')
       if (data !== '' && data !== undefined) {
         const result: EnvironmentConfigurationType = JSON.parse(data)
         AppStorage.setOrCreate("EnvironmentConfiguration", result)
@@ -33,7 +31,7 @@ export default class EntryAbility extends UIAbility {
         AppStorage.setOrCreate("host", host)
       }
       // 读取视频配置
-      const videoData = await fileUtil.readFile(GlobalConfig.commonFileWriteAddress + '/config/config3.txt');
+      const videoData = await ReadFileContent(GlobalConfig.commonFileWriteAddress + '/config/config3.txt')
       if (videoData !== '' && videoData !== undefined) {
         const videoConfig: VideoConfig = JSON.parse(videoData)
         AppStorage.setOrCreate("VideoConfig", videoConfig)
@@ -55,38 +53,38 @@ export default class EntryAbility extends UIAbility {
 
   async onWindowStageCreate(windowStage: window.WindowStage) {
     console.log(EntryTag, "onWindowStageCreate", "窗口创建完成")
-    await UseAuth(this.context)
-    const windowClass = await windowStage.getMainWindow();
-    let rect = windowClass.getWindowProperties().windowRect
-    let width = rect.width
-    let height = rect.height
-    AppStorage.setOrCreate('carInfo', {})
-    AppStorage.setOrCreate('examinerInfo', {})
-    AppStorage.setOrCreate('lsh', '0000000000000')
-    AppStorage.setOrCreate('statue', "1") //考试状态
-    AppStorage.setOrCreate('signNum', 0) //心跳指令编号
-    AppStorage.setOrCreate('deviceNo', "") //设备号
-    AppStorage.setOrCreate('baseInfo', {
-      hasAuth: false,
-      version: GlobalConfig.version.sz.km2[0] || "",
-      judgeVersion: GlobalConfig.version.sz.km2[1] || "",
-      tcpSendNum: 0,
-      videoVersion: '1.0',
-      ratio: width / height, //适配比例
-      pathDir: this.context.filesDir,
-      context: this.context,
-      isJudgeInitBool: false,
-    })
+    try {
+      await UseAuth(this.context)
+      const windowClass = await windowStage.getMainWindow();
+      AppStorage.setOrCreate('carInfo', {})
+      AppStorage.setOrCreate('examinerInfo', {})
+      AppStorage.setOrCreate('lsh', '0000000000000')
+      AppStorage.setOrCreate('statue', "1") //考试状态
+      AppStorage.setOrCreate('signNum', 0) //心跳指令编号
+      AppStorage.setOrCreate('deviceNo', "") //设备号
+      AppStorage.setOrCreate('baseInfo', {
+        hasAuth: false,
+        // version: GlobalConfig.version.sz.km2[0] || "",
+        // judgeVersion: GlobalConfig.version.sz.km2[1] || "",
+        tcpSendNum: 0,
+        videoVersion: '1.0',
+        pathDir: this.context.filesDir,
+        context: this.context,
+        isJudgeInitBool: false,
+      })
+      AppStorage.setOrCreate('isJudgeInitBool', false)
 
-    let fileUtil = new FileUtils(this.context)
-    const data = await fileUtil.readFile(GlobalConfig.commonFileWriteAddress + '/config/ipConfig.txt');
-    if (data !== '' && data !== undefined) {
-      const config: EnvironmentConfigurationType = JSON.parse(data)
-      await windowClass.setWindowLayoutFullScreen(true)
-      console.log("是否调试模式", config?.isOpenDebugger)
-      if (config?.isOpenDebugger === "0") {
-        await windowClass.setWindowSystemBarEnable([]) //全屏
+      const data = await ReadFileContent(GlobalConfig.commonFileWriteAddress + '/config/ipConfig.txt')
+      if (data !== '' && data !== undefined) {
+        const config: EnvironmentConfigurationType = JSON.parse(data)
+        await windowClass.setWindowLayoutFullScreen(true)
+        console.log("是否调试模式", config?.isOpenDebugger)
+        if (config?.isOpenDebugger === "0") {
+          await windowClass.setWindowSystemBarEnable([]) //全屏
+        }
       }
+    } catch (e) {
+      console.error("onWindowStageCreate error", e)
     }
     windowStage.loadContent('pages/Index', (err, data) => {
       if (err.code) {
@@ -96,6 +94,7 @@ export default class EntryAbility extends UIAbility {
       hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
     });
 
+
     this.createFiles();
   }
 
diff --git a/entry/src/main/ets/mock/Judge.ets b/entry/src/main/ets/mock/Judge.ets
index 6b66155..6c99b68 100644
--- a/entry/src/main/ets/mock/Judge.ets
+++ b/entry/src/main/ets/mock/Judge.ets
@@ -264,7 +264,12 @@ export const DefaultJudgeConfigData: DefaultJudgeConfigObj = {
   //里程不够允许手工点靠边停车
   param_387: '0',
   //监管模式有扣分续考(0-否++1-是+把上次未考完的扣分带下来重新考试)
-  param_432: '1'
+  param_432: '1',
+  // Todo
+  // param_634: '1',
+  // Todo
+  // param_810: '1'
+
 }
 
 //所有的科二 科目三项目
diff --git a/entry/src/main/ets/mock/TerminallInfo.ets b/entry/src/main/ets/mock/TerminallInfo.ets
new file mode 100644
index 0000000..15e922f
--- /dev/null
+++ b/entry/src/main/ets/mock/TerminallInfo.ets
@@ -0,0 +1,71 @@
+import { CommonListType } from '../model'
+
+export const RearMachineModelListData: CommonListType[] = [
+  {
+    label: '一型机',
+    value: '1'
+  },
+  {
+    label: '二型机',
+    value: '2'
+  },
+  {
+    label: '三型机',
+    value: '3'
+  },
+  {
+    label: '一体机',
+    value: '4'
+  }
+]
+
+export const BoardListData: CommonListType[] = [
+  {
+    label: '北云',
+    value: '1'
+  },
+  {
+    label: '天宝MB2',
+    value: '2'
+  }
+]
+
+export const LogListData: CommonListType[] = [
+  {
+    label: '开启',
+    value: '1'
+  },
+  {
+    label: '关闭',
+    value: '0'
+  }
+]
+
+export const CarTypeListData: CommonListType[] = [
+  {
+    label: '小车C1',
+    value: '1'
+  },
+  {
+    label: '小车C2',
+    value: '2'
+  },
+  {
+    label: '大车',
+    value: '3'
+  },
+  {
+    label: '牵引车A2',
+    value: '4'
+  }
+]
+export const ManufacturerListData: CommonListType[] = [
+  {
+    label: '诚迈',
+    value: '1'
+  },
+  {
+    label: '润和',
+    value: '2'
+  }
+]
\ No newline at end of file
diff --git a/entry/src/main/ets/mock/index.ets b/entry/src/main/ets/mock/index.ets
index d9d3a5d..3a1b7b6 100644
--- a/entry/src/main/ets/mock/index.ets
+++ b/entry/src/main/ets/mock/index.ets
@@ -7,4 +7,5 @@ export * from "./Judge"
 export * from "./SignDisplay"
 
 export * from "./CarCheck"
-export * from "./Test"
\ No newline at end of file
+export * from "./Test"
+export * from "./TerminallInfo"
\ No newline at end of file
diff --git a/entry/src/main/ets/model/Common.ets b/entry/src/main/ets/model/Common.ets
index 72404f5..21fcd0d 100644
--- a/entry/src/main/ets/model/Common.ets
+++ b/entry/src/main/ets/model/Common.ets
@@ -79,8 +79,9 @@ export interface CommonType {
 // 基础信息
 export interface BaseInfoType {
   hasAuth?: boolean,
-  version?: string,
-  judgeVersion?: string,
+
+  // version?: string,
+  // judgeVersion?: string,
   tcpSendNum?: number,
   videoVersion?: string,
   ratio?: number,
@@ -104,6 +105,8 @@ export interface RouteParamsType {
   kString?: string;
   examItems?: string;
   fromIndex?: boolean;
+  mode?: number
+  score?: number
 }
 
 // 车辆信息
@@ -137,6 +140,7 @@ export interface EnvironmentConfigurationType {
   // 前置机响应后置机端口2
   udplocalIpPortTwo?: string,
   udpOppositeIp?: string,
+  udpOppositeIpTwo?: string,
 
   // 后置机响应端口
   udpOppositeIpPort?: string,
@@ -169,6 +173,10 @@ export interface EnvironmentConfigurationType {
   version?: string
   //   评判版本
   judgeVersion?: string
+  //   是否使用网络摄像头
+  isUseNetworkCamera?: string
+  //   厂商  诚迈 1 润和 2
+  manufacturer?: string
 }
 
 //全局配置
@@ -180,6 +188,8 @@ export interface GlobalConfigType {
   version: VersionType
   //   几代机
   modelNo?: string
+  //   模型位置
+  modelPath?: string
 }
 
 interface VersionType {
diff --git a/entry/src/main/ets/model/Judge.ets b/entry/src/main/ets/model/Judge.ets
index 1753dc9..a859ca0 100644
--- a/entry/src/main/ets/model/Judge.ets
+++ b/entry/src/main/ets/model/Judge.ets
@@ -273,7 +273,10 @@ export interface DefaultJudgeConfigObj {
   param_369: string
   param_375: string
   param_387: string
+  param_392?: string
   param_432: string
+  param_634?: string
+  param_810?: string
 }
 
 export interface SyssetConfig {
@@ -308,6 +311,7 @@ export interface ProjectInfo {
   isRequired?: boolean
   //项目状态:未做 正在做 及格 不及格 有扣分
   type?: '1' | '2' | '3' | '4' | '5'
+  ykType?: '1' | '2' | '3' | '4' | '5'
 }
 
 /**  科目二项目代码  **/
@@ -431,6 +435,8 @@ export interface MAPPOINT {
   f_gps_e: number,
   f_gps_n: number,
   passed: number
+  X_MCH: string,
+
 }
 
 export interface MAPITEMPOINTITEM {
@@ -447,8 +453,8 @@ export interface JudgeUI {
   startFullTime: string
   mapPointArr: MAPPOINT[]
   mapPointItemArr: MAPITEMPOINTITEM[]
-  systemparmArr: SYSTEMPARMARR[]
-  carinfoArr: CARINFO[]
+  systemparmArr: SYSTEM_PARAM[]
+  carinfoArr: CAR_INFO[]
   kfArr: MarkRule[]
   judgeConfigObj: DefaultJudgeConfigObj
   judgeConfig: SyssetConfig[]
@@ -532,16 +538,22 @@ export interface CDSBInfo {
   xmxh?: string
 }
 
-export interface SYSTEMPARMARR {
-  NO1: number,
-  NO2: number,
-  NO3: number,
-  TXT1: string,
-  TXT2: string,
-  TXT3: string,
+export interface SYSTEM_PARAM {
+  NO1?: number,
+  NO2?: number,
+  NO3?: number,
+  TXT1?: string,
+  TXT2?: string,
+  TXT3?: string,
+  no1?: string,
+  no2?: string,
+  no3?: string,
+  txt1?: string
+  txt2?: string
+  txt3?: string
 }
 
-export interface CARINFO {
+export interface CAR_INFO {
   CARID: string,
   IPADDR: string,
   CARCLASS: string,
@@ -550,6 +562,7 @@ export interface CARINFO {
   FLAG: string,
   BK1: string,
   BK2: string
+  X_MCH: string,
 }
 
 export interface KmItem {
@@ -596,12 +609,12 @@ export interface JudgeInitObj extends Km3JudgeInitConfig {
   carmodel: string
   allitems: ItemInfo[]
   iteminfo?: ItemInfo[]
-  systemparm: SYSTEMPARMARR[]
+  systemparm: SYSTEM_PARAM[]
   mark: MarkRule[]
   sysset: SyssetConfig[]
   itemInfoObj?: ItemInfos
   carlist: string
-  carinfo: CARINFO[]
+  carinfo: CAR_INFO[]
 
 }
 
@@ -646,7 +659,7 @@ export interface JudgeBeginObj {
   sczbkf?: JudgeKFXM[]
   dmndg: boolean
   mfxx: boolean
-  mfxxn: boolean
+  zeng: boolean
 }
 
 export interface JudgeXMJS {
@@ -807,7 +820,7 @@ export interface DistanceClass {
 
 export interface WR {
   message?: string
-  code?: number
+  code: string
   keystr?: string
 }
 
@@ -838,7 +851,7 @@ export interface ProjectDataType {
 }
 
 export interface ProjectItemType {
-  code: ProjectDataType
+  code: string
   status: string
 }
 
@@ -856,6 +869,9 @@ export interface Project {
   //
   isEnd: boolean,
   isUpload: boolean
+  // 下面是大车使用的
+  isRequired?: boolean
+  ykType?: '1' | '2' | '3' | '4' | '5'
 }
 
 
diff --git a/entry/src/main/ets/model/ProcessData.ets b/entry/src/main/ets/model/ProcessData.ets
new file mode 100644
index 0000000..dbe24a7
--- /dev/null
+++ b/entry/src/main/ets/model/ProcessData.ets
@@ -0,0 +1,38 @@
+/**
+ * 定义批次进度更新时的回调函数类型
+ * @param totalTasks 本批次总任务数
+ * @param completedTasks 已完成任务数 (成功 + 失败)
+ * @param successfulTasks 成功完成的任务数
+ * @param failedTasks 失败的任务数
+ * @param progressPercentage 当前进度百分比 (0-100)
+ */
+import { RegulatoryInterfaceParams, WR } from '.';
+
+export type OnBatchProgressUpdateCallback = (
+  totalTasks: number,
+  completedTasks: number,
+  successfulTasks: number,
+  failedTasks: number,
+  progressPercentage: number
+) => void;
+
+/**
+ * 定义所有任务完成时的回调函数类型
+ * @param totalTasks 本批次总任务数
+ * @param completedTasks 已完成任务数 (成功 + 失败)
+ * @param successfulTasks 成功完成的任务数
+ * @param failedTasks 失败的任务数
+ */
+export type OnAllTasksCompletedCallback = (
+  totalTasks: number,
+  completedTasks: number,
+  successfulTasks: number,
+  failedTasks: number
+) => void;
+
+export type ProgressCallback = (data: WR) => void;
+
+export interface QueueTask {
+  data: RegulatoryInterfaceParams;
+  callback?: ProgressCallback;
+}
\ No newline at end of file
diff --git a/entry/src/main/ets/model/Worker.ets b/entry/src/main/ets/model/Worker.ets
index 6f39e65..062ee73 100644
--- a/entry/src/main/ets/model/Worker.ets
+++ b/entry/src/main/ets/model/Worker.ets
@@ -1,31 +1,90 @@
-import { CarInfoType, CenterCallBackMsgType, EnvironmentConfigurationType, UDPParamType } from '.';
+import {
+  CarInfoType,
+  CDSBInfos,
+  CenterCallBackMsgType,
+  EnvironmentConfigurationType,
+  JudgeConfigObjKmItems,
+  JudgePerformInfo,
+  MarkRule,
+} from '.';
+
+export interface JudgeUDPData {
+  totalScore: number
+  kfArr: MarkRule[]
+  startTime: string
+  examTime: number
+  xmmcSingleCode: string
+  kmItems: JudgeConfigObjKmItems
+  cdsbInfoObj: CDSBInfos
+  xmxh: string
+  xmdm: number | string
+}
+
+export enum WorkerMessageDataType {
+  Init,
+  Close,
+  SetExamData,
+  JudgeSend,
+  CenterSend
+}
+
+export interface InitData extends ExamData {
+  config?: EnvironmentConfigurationType;
+  carInfo?: CarInfoType;
+  singlePlay?: boolean
+}
+
+export interface JudgeData {
+  judgeUdpEnd?: boolean,
+  judgeExamEnd?: boolean
+  performInfo?: JudgePerformInfo,
+  business?: JudgeUDPData
+  remoteType?: 'kf'
+  remoteData?: number[]
+}
+
+export interface CenterData {
+  id: number
+  body: number[]
+}
+
+export interface ExamData {
+  signNum?: number;
+  statue?: string;
+  lsh?: string;
+}
+
+export interface CloseData {
+  carType: string
+}
 
 export interface WorkerMessage {
-  config: EnvironmentConfigurationType;
-  carInfo: CarInfoType;
-  centerUdpParam?: UDPParamType;
-  otherMessage: OtherMessageType;
-  singlePlay?: boolean
-  //   关闭
-  close?: boolean;
+  type: WorkerMessageDataType
+  data: InitData | JudgeData | CenterData | ExamData | CloseData
 }
 
-export interface OtherMessageType {
-  signNum: number;
-  statue: string;
-  lsh: string;
-}
 
 export interface WorkerBackMessage {
   type: WorkerBackMessageType;
-  data: string | CenterCallBackMsgType
+  data: string | CenterCallBackMsgType | number[]
 }
 
 export enum WorkerBackMessageType {
   // 后置机信息
   ObtainUdpData = 'obtainUdpData',
+  // 后置机GPS2消息
+  ObtainUdpGps2Data = 'obtainUdpGps2Data',
   // 中心消息
   CenterUdpData = 'centerUdpData',
+  // 远程开始考试
+  RemoteStartExam = 'remoteStartExam',
+  // 远程结束考试
+  RemoteEndExam = 'remoteEndExam',
+  // 远程扣分
+  RemoteKf = 'RemoteKf',
+  // 远程扣分确认
+  RemoteKfConfirm = 'RemoteKfConfirm',
+  StopExam = 'stopExam'
 }
 
 export interface LogWorkerMessage {
@@ -55,22 +114,22 @@ export enum WorkerMessageType {
 
 // 过程数据枚举
 export enum ProcessDataEnumType {
-  //four_one_log_byte_data
-  FourOneLogByteData = "0",
-  //four_one_log_data
-  FourOneLogData = "1",
+  // //four_one_log_byte_data
+  // FourOneLogByteData = "0",
+  // //four_one_log_data
+  // FourOneLogData = "1",
   //judge_exam_data
-  JudgeExamData = "2",
+  JudgeExamData = "0",
   //judge_log_data
-  JudgeLogData = "3",
+  JudgeLogData = "1",
   //judge_progress_callback_data
-  JudgeProgressCallbackData = "4",
+  JudgeProgressCallbackData = "2",
   //plc_data
-  PlcData = "5",
+  PlcData = "3",
   //wuxi_exam_data
-  WuxiExam = "6",
+  WuxiExam = "4",
   //wuxi_progress_data
-  WuxiProgressData = "7"
+  WuxiProgressData = "5"
 }
 
 export interface FileQueueType {
diff --git a/entry/src/main/ets/model/api.ets b/entry/src/main/ets/model/api.ets
index 3dae78c..0e2ea9a 100644
--- a/entry/src/main/ets/model/api.ets
+++ b/entry/src/main/ets/model/api.ets
@@ -248,6 +248,7 @@ export interface ObtainCarExamInfoParams {
 
 //监管接口参数
 export interface RegulatoryInterfaceParams {
+  JGHOST?: string
   xtlb?: string;
   jkxlh?: string;
   jkid?: string;
diff --git a/entry/src/main/ets/model/index.ets b/entry/src/main/ets/model/index.ets
index d60d364..620bdf1 100644
--- a/entry/src/main/ets/model/index.ets
+++ b/entry/src/main/ets/model/index.ets
@@ -20,4 +20,6 @@ export * from "./TableColumn"
 
 export * from "./Other"
 
-export * from "./Worker"
\ No newline at end of file
+export * from "./Worker"
+
+export * from "./ProcessData"
\ No newline at end of file
diff --git a/entry/src/main/ets/pages/ExaminerLogin.ets b/entry/src/main/ets/pages/ExaminerLogin.ets
index 5e03f82..b06a5cb 100644
--- a/entry/src/main/ets/pages/ExaminerLogin.ets
+++ b/entry/src/main/ets/pages/ExaminerLogin.ets
@@ -34,7 +34,7 @@ struct ExaminerLoginPage {
       })
       Row() {
         Text("请考官输入用户名和密码")
-          .fontSize(40)
+          .fontSize(50)
           .fontColor("#EF9335")
           .width("100%")
           .height(50)
@@ -145,14 +145,14 @@ struct ExaminerLoginPage {
                       router.pushUrl({
                         url: 'pages/UserInfo',
                         params: {
-                          type: 1
+                          type: "1"
                         }
                       }, router.RouterMode.Single);
                     }, remainingTime);
 
                   } catch (e) {
                     this.loadingDialog.close();
-                    dConsole.error(ExaminerLoginTag, 'examinerLogin error: ' + e);
+                    dConsole.error(ExaminerLoginTag, 'examinerLogin error: ' + JSON.stringify(e));
                     Prompt.showToast({
                       message: "登录失败,请稍后重试",
                       duration: 2000
@@ -194,7 +194,7 @@ struct btnComponent {
   build() {
     Row() {
       if (this.text != "确定" && this.text !== "退格" && this.text !== "清空") {
-        Text(this.text).fontSize(40).fontColor("#F0DEC5")
+        Text(this.text).fontSize(50).fontColor("#F0DEC5")
       }
     }
     .backgroundImage(this.text === "确定" ? $r("app.media.queding_nor") : this.text === "退格" ? $r("app.media.delete_nor") : this.text === "清空" ? $r("app.media.clear_nor") : $r("app.media.nor_btn"))
diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets
index 7d2ce77..3912c5d 100644
--- a/entry/src/main/ets/pages/Index.ets
+++ b/entry/src/main/ets/pages/Index.ets
@@ -3,9 +3,15 @@ import router from '@ohos.router';
 
 import { HomeTag, InitTableTag, JudgeConfig } from '../config';
 import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
-import { BaseInfoType } from '../model/Common';
-import { CarInfoType, InitializeTheCentralTableType, MASYSSETTableType, TimeSynchronizationRspBody } from '../model';
-import { CreateAlbum, GetCarInfo, GetDeviceInfo, SetCurrentTime } from './Index/utils';
+import { BaseInfoType, EnvironmentConfigurationType } from '../model/Common';
+import {
+  CarInfoType,
+  ES_CARINFOType,
+  InitializeTheCentralTableType,
+  MASYSSETTableType,
+  TimeSynchronizationRspBody
+} from '../model';
+import { CheckNetUntilConnected, CreateAlbum, GetCarInfo, GetDeviceInfo, SetCurrentTime } from './Index/utils';
 import { GetSyncData, InitializeTheCentralTable } from '../utils/table/Operation';
 import { BusinessError } from '@ohos.base';
 import { delPic } from '../utils/Video';
@@ -31,7 +37,6 @@ struct Index {
   @State deviceId: string = '';
   @State angle: number = 0
   @State dialogRatio: number = 0.8
-  @State ratio: number = 1700 / 960
   @State delLoading: boolean = false
   @State initParamFlag: boolean = false
   @State fd: number = -1;
@@ -40,6 +45,8 @@ struct Index {
   @State isPlay: boolean = false;
   @State initWork: boolean = false
   @State status: string = "开始"
+  @State base64Img: string = ""
+  @State config: EnvironmentConfigurationType = {}
   // 请求网络表等待弹窗
   customDialogController: CustomDialogController = new CustomDialogController({
     builder: CarLoadingComponent(),
@@ -52,17 +59,10 @@ struct Index {
   private avPlayer: VoiceAnnounce = new VoiceAnnounce(this.context)
   private timeInfo: TimeSynchronizationRspBody = {}
 
-  @Styles
-  commStyle(){
-    .width(220 * this.ratio * this.dialogRatio)
-    .height(69 * this.ratio * this.dialogRatio)
-    .backgroundImage($r('app.media.button_nor'))
-    .backgroundImageSize({ width: '100%', height: '100%' })
-  }
-
   async aboutToAppear() {
     dConsole.log("权限首页 aboutToAppear")
-    this.ratio = AppStorage.get('baseInfo')?.ratio || 1.4
+    const result = await GetSyncData("ES_CARINFO")
+    dConsole.log(HomeTag, "读取carinfo", result)
     this.angle = 0
     AppStorage.set('lsh', '1111111111111')
     JudgeEmitterInstance.init()
@@ -77,12 +77,14 @@ struct Index {
   }
 
   async onPageShow(): Promise {
-    dConsole.log("权限首页 onPageShow2")
+    dConsole.log("权限首页 onPageShow")
+    await CheckNetUntilConnected()
     if (!this.isPlay) {
       this.avPlayer.playAudio(['welcome.wav'])
       this.isPlay = true
     }
     this.baseInfo = AppStorage.get('baseInfo')!
+    this.config = AppStorage.get('EnvironmentConfiguration')!
     this.initParams()
 
     AppStorage.setOrCreate('singlePlay', false)
@@ -137,8 +139,8 @@ struct Index {
     const param: InitializeTheCentralTableType = {
       carId: this.carInfo?.carId,
       examinationRoomId: this.carInfo?.examinationRoomId,
-      judgeVersion: this.baseInfo?.judgeVersion,
-      shellVersion: this.baseInfo?.version || "",
+      judgeVersion: this.config?.judgeVersion,
+      shellVersion: this.config?.version || "",
       paraKdid: this.timeInfo?.paraKdid || this.timeInfo?.kdid,
       kdid: this.timeInfo?.kdid || this.timeInfo?.paraKdid,
       mode: this.timeInfo?.mode,
@@ -245,8 +247,8 @@ struct Index {
       })
 
       BottomMessageComponent({
-        version: this.baseInfo.version,
-        judgeVersion: this.baseInfo.judgeVersion,
+        version: this.config.version,
+        judgeVersion: this.config.judgeVersion,
         hasAuth: this.baseInfo.hasAuth,
         examCarNumber: this.deviceId,
         versionClick: () => {
diff --git a/entry/src/main/ets/pages/Index/utils.ets b/entry/src/main/ets/pages/Index/utils.ets
index f313f91..316ded4 100644
--- a/entry/src/main/ets/pages/Index/utils.ets
+++ b/entry/src/main/ets/pages/Index/utils.ets
@@ -1,11 +1,11 @@
 import common from '@ohos.app.ability.common';
-import { GlobalConfig } from '../../config';
+import { GlobalConfig, HomeTag } from '../../config';
 import Prompt from '@system.prompt';
 import {
   ApiResponseType,
-  BaseInfoType,
   CarConfigurationParamsType,
   CarInfoType,
+  EnvironmentConfigurationType,
   ObtainCarExamInfoParams,
   ObtainCarExamInfoRspBody,
   TimeSynchronizationParams,
@@ -19,6 +19,8 @@ import { VideoConfigData } from '../../mock';
 import FileUtils from '../../utils/FileUtils';
 import { FileHelper } from '../../utils/FileHelp';
 import { dConsole } from '../../utils/LogWorker';
+import connection from '@ohos.net.connection';
+
 
 //获取设备信息
 export async function GetDeviceInfo(context: common.UIAbilityContext): Promise {
@@ -42,19 +44,28 @@ export async function GetDeviceInfo(context: common.UIAbilityContext): Promise {
+
   let date = new Date();
   let params: ObtainCarExamInfoParams = {
     time: dayTs(date).format("YYYY-MM-DD HH:mm:ss"),
     deviceNo: AppStorage.get('deviceNo') || ""
   };
-  let res: ApiResponseType = await obtainCarExamInfo(params)
-  dConsole.log("90", res)
-  if (res.obtainCarExamInfoRsp && res.obtainCarExamInfoRsp.body) {
-    const carInfo: ObtainCarExamInfoRspBody = res?.obtainCarExamInfoRsp?.body!
-    carInfo.plateNo = decodeURIComponent(carInfo.plateNo)
-    dConsole.log("Worker received message car", JSON.stringify(carInfo))
-    AppStorage.setOrCreate('carInfo', carInfo)
-    return carInfo
+  try {
+    let res: ApiResponseType = await obtainCarExamInfo(params)
+    dConsole.log("90", res)
+    if (res.obtainCarExamInfoRsp && res.obtainCarExamInfoRsp.body) {
+      const carInfo: ObtainCarExamInfoRspBody = res?.obtainCarExamInfoRsp?.body!
+      carInfo.plateNo = decodeURIComponent(carInfo.plateNo)
+      // dConsole.log("Worker received message car", JSON.stringify(carInfo))
+      AppStorage.setOrCreate('carInfo', carInfo)
+      return carInfo
+    }
+  } catch (e) {
+    dConsole.error(HomeTag, "获取考车信息错误", JSON.stringify(e))
+    setTimeout(() => {
+      dConsole.log(HomeTag, "延迟获取考车信息")
+      GetCarInfo()
+    }, 1000)
   }
   return {}
 }
@@ -62,12 +73,12 @@ export async function GetCarInfo(): Promise {
 //获取时间同步
 export async function SetCurrentTime(): Promise {
   let deviceNo: string = AppStorage.get('deviceNo')!;
-  let baseInfo: BaseInfoType = AppStorage.get('baseInfo')!
+  let config: EnvironmentConfigurationType = AppStorage.get('EnvironmentConfiguration')!
   let params: TimeSynchronizationParams = {
     time: dayTs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
     deviceNo,
-    version: baseInfo.version!,
-    judgeVersion: baseInfo.judgeVersion!
+    version: config.version!,
+    judgeVersion: config.judgeVersion!
   }
   let res: ApiResponseType = await timeSynchronization(params);
   if (res.timeSynchronizationRsp?.body) {
@@ -141,3 +152,35 @@ export function CreateAlbum(fileHelper: FileHelper) {
   fileHelper.createAlbum(date);
 }
 
+const RETRY_INTERVAL_MS = 3000;
+
+export async function CheckNetUntilConnected(): Promise {
+  return new Promise(async (resolve, reject) => {
+    const doCheck = async () => {
+      try {
+        let netHandle: connection.NetHandle = await connection.getDefaultNet();
+        // getDefaultNet().netId 在网络连接正常时会大于0
+        // 在没有默认网络时,getDefaultNet()可能会抛出异常或者返回netId为0的NetHandle
+        // 最新的OpenHarmony API中,推荐使用connection.getNetCapabilities(netHandle)
+        // 或 connection.hasDefaultNet() 来更准确判断网络状态
+
+        let hasDefaultNet: boolean = await connection.hasDefaultNet();
+
+        if (hasDefaultNet && netHandle && netHandle.netId > 0) {
+          dConsole.log(HomeTag, "网络通畅");
+          resolve(); // 网络通畅,解决Promise
+        } else {
+          dConsole.log(HomeTag, "网络不通畅,等待 " + RETRY_INTERVAL_MS / 1000 + " 秒后重试...");
+          setTimeout(doCheck, RETRY_INTERVAL_MS); // 网络不通畅,继续重试
+        }
+      } catch (error) {
+        dConsole.log(HomeTag, "网络不通畅,等待 " + RETRY_INTERVAL_MS / 1000 + " 秒后重试...");
+        setTimeout(doCheck, RETRY_INTERVAL_MS); // 即使出错,也继续重试
+      }
+    };
+
+    // 首次执行检查
+    doCheck();
+  });
+}
+
diff --git a/entry/src/main/ets/pages/Judge.ets b/entry/src/main/ets/pages/Judge.ets
index 1184498..828f8be 100644
--- a/entry/src/main/ets/pages/Judge.ets
+++ b/entry/src/main/ets/pages/Judge.ets
@@ -3,7 +3,6 @@ import Prompt from '@system.prompt';
 import common from '@ohos.app.ability.common';
 import DeductedPopup from './compontents/judge/DeductionPopup';
 import AmplifyPopup from './compontents/judge/AmplifyPopup';
-import Judge from './judgeSDK/judge';
 import { uploadExamMileage } from '../api/judge';
 import DwztErrorPopup from './compontents/judge/DwztErrorPopup';
 import MsgPopup from './compontents/judge/MsgPopup';
@@ -11,7 +10,7 @@ import { JudgeConfig, JudgeTag } from '../config';
 import JudgeAndProjectComponent from './Judge/components/JudgeAndProject';
 import {
   AmplifyItem,
-  CARINFO,
+  CAR_INFO,
   CarInfoType,
   CDSBInfo,
   CDSBInfos,
@@ -24,7 +23,6 @@ import {
   LANE,
   MA_CDSBINFOType,
   MA_ITEMINFOType,
-  MA_SYSTEMPARMType,
   MAPITEMPOINTITEM,
   MAPPOINT,
   MarkRule,
@@ -37,8 +35,11 @@ import {
   RouteParamsType,
   SYSSET,
   SyssetConfig,
-  SYSTEMPARMARR,
-  User
+  SYSTEM_PARAM,
+  User,
+  WorkerBackMessage,
+  WorkerBackMessageType,
+  WorkerMessageDataType
 } from '../model';
 import { GetSyncData } from '../utils/table/Operation';
 import dayTs from '../utils/Date';
@@ -53,11 +54,13 @@ import MessageComponent from './Judge/components/Message';
 import OperatingAreaComponent from './Judge/components/OperatingArea';
 import { GetIsExitManualProject } from './Judge/utils';
 import { InitMapPoint, InitMapPointItem } from './Judge/TableUtils';
+import JudgeBusiness from './Judge/JudgeBusiness';
+import { DifferentialAndSignal } from '../utils/business/DifferentialAndSignalWorker';
 
 
 @Entry
 @Component
-struct JudgePage {
+export struct JudgePage {
   @State wayno: number = 0
   @State isDdxk: boolean = false;
   //开始时间
@@ -78,7 +81,7 @@ struct JudgePage {
   @State singlePlay: boolean = false;
   @State totalScore: number = 100
   //模拟考试项目
-  @State projects: ProjectInfo[] = []
+  @State projects: Project[] = []
   @State projectsObj: ProjectInfos = {}
   @State projectsCenterObj: ProjectInfos = {}
   @State markRuleListObj: MarkRules = {}
@@ -112,10 +115,11 @@ struct JudgePage {
   @State artSubject3Projects: string[] = ['直线', '会车', '变道', '超车', '掉头', '停车']
   @State artSubject3ProjectsCodesArr: string[] = ['3', '9', '4', '10', '12', '11']
   @State manualMarkRules: MarkRule[] = []
+  @State markRules: MarkRule[] = []
   //科目三评判初始化数据
-  @State systemparmArr: SYSTEMPARMARR[] = []
+  @State systemparmArr: SYSTEM_PARAM[] = []
   @State mapPointItemArr: MAPITEMPOINTITEM[] = []
-  @State carinfoArr: CARINFO[] = []
+  @State carinfoArr: CAR_INFO[] = []
   @State mapPointArr: MAPPOINT[] = []
   //手动项目是否在进行中
   @State isManualProjectIn: boolean = false;
@@ -145,6 +149,7 @@ struct JudgePage {
   @State isErrorMsgEnd: boolean = false
   @State disConnectErrorOpen: boolean = false
   @State @Watch("laneSignalChange") laneSignal: PerLane = InitialPerLane
+  public examTime: number = 0
   public context = getContext(this) as common.UIAbilityContext;
   // 信号查看弹窗
   signalTrajectoryDialogController: CustomDialogController = new CustomDialogController({
@@ -161,12 +166,14 @@ struct JudgePage {
     }),
     customStyle: true
   })
-  private judge: Judge = new Judge(this)
+  // private judge: Judge = new Judge(this)
+  private judgeBusiness = new JudgeBusiness(this)
   // 结束考试弹窗
   endExamDialogController: CustomDialogController = new CustomDialogController({
     builder: ConfirmDialog({
       text: "确认结束考试?",
       onConfirm: async () => {
+        dConsole.log(JudgeTag, "点击确认结束")
         if (this.isErrorMsgEnd) {
           dConsole.log(JudgeTag, "router back1")
           router.back()
@@ -185,7 +192,7 @@ struct JudgePage {
         clearInterval(this.timer);
         clearInterval(AppStorage.get('judgeTimer'))
         try {
-          this.judge.checkExamIsEnd(true);
+          this.judgeBusiness.JudgeEnd(true);
         } catch (e) {
           dConsole.log(JudgeTag, "router back2")
           router.back()
@@ -196,43 +203,16 @@ struct JudgePage {
   })
 
   laneSignalChange() {
-    dConsole.log("车道信号变化1", this.laneSignal)
-  }
-
-  async aboutToDisappear() {
-    this.generateExamRecordsDialogController.close()
-    this.signalTrajectoryDialogController.close()
-    clearInterval(this.mileageTimer)
+    // dConsole.log("车道信号变化1", this.laneSignal)
   }
 
   async aboutToAppear() {
+    DifferentialAndSignal.onMsg(this.onCenterMsg)
     this.carInfo = AppStorage.get('carInfo')!
     this.singlePlay = AppStorage.get('singlePlay')!
     this.startFullTime = dayTs().format("YYYYMMDDHHmmss");
     this.startTime = dayTs().format("YYYY-MM-DD HH:mm:ss")
     this.startExamTime = dayTs().format("YYYY-MM-DD HH:mm:ss")
-    // let count = 0;
-    // const totalTimes = 1000;
-    // const intervalTime = 100; // 0.1秒 = 100毫秒
-    //
-    // const timer = setInterval(() => {
-    //   if (count < totalTimes) {
-    //     dConsole.writeProcessData(ProcessDataEnumType.FourOneLogByteData, ProcessDataMock);
-    //     dConsole.writeProcessData(ProcessDataEnumType.FourOneLogData, ProcessDataMock);
-    //     dConsole.writeProcessData(ProcessDataEnumType.JudgeExamData, ProcessDataMock);
-    //     dConsole.writeProcessData(ProcessDataEnumType.JudgeLogData, ProcessDataMock);
-    //     dConsole.writeProcessData(ProcessDataEnumType.JudgeProgressCallbackData, ProcessDataMock);
-    //     dConsole.writeProcessData(ProcessDataEnumType.PlcData, ProcessDataMock);
-    //     dConsole.writeProcessData(ProcessDataEnumType.WuxiExam, ProcessDataMock);
-    //     dConsole.writeProcessData(ProcessDataEnumType.WuxiProgressData, ProcessDataMock);
-    //     count++;
-    //     console.log(`已调用 ${count} 次`);
-    //   } else {
-    //     dConsole.closeProcessData()
-    //     clearInterval(timer);
-    //     console.log('已完成1000次调用');
-    //   }
-    // }, intervalTime);
     //初始化数据库表
     await this.initDb()
     //断点续考
@@ -241,6 +221,15 @@ struct JudgePage {
     await this.initJudge();
   }
 
+  async aboutToDisappear() {
+    this.generateExamRecordsDialogController.close()
+    this.signalTrajectoryDialogController.close()
+    this.judgeBusiness.close()
+    clearInterval(this.mileageTimer)
+    DifferentialAndSignal.offMsg(this.onCenterMsg)
+
+  }
+
   //初始化相关数据库表
   async initDb() {
     this.examSubject = this.carInfo.examSubject!;
@@ -282,8 +271,9 @@ struct JudgePage {
       FLAG: carInfo.flag!,
       BK1: carInfo.bk1!,
       BK2: carInfo.bk2!,
+      X_MCH: carInfo.x_mch || "",
     })
-    dConsole.info(JudgeTag, 'surenjun =>carinfoArrr', JSON.stringify(this.carinfoArr))
+    dConsole.info(JudgeTag, '=>carinfoArrr', JSON.stringify(this.carinfoArr))
   }
 
   // 获取考生信息
@@ -323,6 +313,7 @@ struct JudgePage {
       if (Number(tempObj.markserial) > 100 && Number(tempObj.markserial) < 200) {
         this.manualMarkRules.push(tempObj)
       }
+      this.markRules.push(tempObj)
       tempObj.markserial = mark.markserial
       Reflect.set(this.markRuleListObj, `${mark.itemno}_${mark.markserial}`, tempObj)
     })
@@ -332,7 +323,7 @@ struct JudgePage {
   async initSysset(sysset?: SYSSET[]) {
     const syssetParams: SYSSET[] | MASYSSETTableType[] = sysset || await GetSyncData('MA_SYSSET')
     const serialNumberArr = (syssetParams as SYSSET[]).filter(sys => sys.v_no === '901');
-    dConsole.info(JudgeTag, 'surenjun serialNumberArr' + JSON.stringify(serialNumberArr))
+    dConsole.info(JudgeTag, 'serialNumberArr' + JSON.stringify(serialNumberArr))
     this.serialNumber = (serialNumberArr[0] && serialNumberArr[0].v_value) || '';
     const syssetJudgeConfigArr: SyssetConfig[] = []
 
@@ -401,113 +392,19 @@ struct JudgePage {
   }
 
   //初始化systemParam表
-  async initSystemParam(sysParam?: MA_SYSTEMPARMType  []) {
-    let systemParms: MA_SYSTEMPARMType[] = sysParam || await GetSyncData('MA_SYSTEMPARM')
-
-    let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
-    //小车车型列表
-    const sCarTypes = ['C1', 'C2', 'C5']
-    if (this.singlePlay) {
-      this.wayno = Number(currentParams.wayno) || 1;
-    }
-    //真实监管下发的项目
-    let kStringArr: string[] = (currentParams.kString?.split(',') || []).filter(item => item);
-    dConsole.info(JudgeTag, 'surenjun kStringArr', JSON.stringify(kStringArr))
-    let isInExam = kStringArr.length > 0;
-    let carNo = '', allItems: string[] = [];
-    systemParms.forEach((systemParm) => {
-      if (JudgeConfig.isTrajectoryOpen) {
-        systemParm.no1 = systemParm.NO1! + '';
-        systemParm.no2 = systemParm.NO2! + '';
-        systemParm.no3 = systemParm.NO3! + '';
-        systemParm.txt1 = systemParm.TXT1!;
-        systemParm.txt2 = systemParm.TXT2!;
-        systemParm.txt3 = systemParm.TXT3!;
-      }
-      const txt1 = decodeURI(systemParm.txt1 || "")
-      const txt2 = decodeURI(systemParm.txt2 || "")
-
-      const no1 = systemParm.no1;
-      const no2 = systemParm.no2;
-      const no3 = systemParm.no3;
-
-      //获取当前考车的no2
-      if (systemParm.no1 == "3" && systemParm.no3 == "1") {
-        if (txt1 === this.carName) {
-          carNo = systemParm?.no2 || ""
-          this.carlist = carNo
-        }
-      }
-
-      //获取及格分数线
-      if (systemParm.no1 == "3" && systemParm.no3 == "3" && carNo === systemParm.no2) {
-        this.passingScore = Number(txt1) || 0;
-      }
-      //根据车型获取应行驶里程数
-      if (systemParm.no1 == "3" && systemParm.no3 == "15" && carNo === systemParm.no2) {
-        this.examMileage = ((decodeURI(systemParm.txt1 || "")) || '').split('^')[0];
-      }
-      //获取当前考车的考试项目
-      if (carNo !== '' && systemParm.no1 == "3" && systemParm.no2 == carNo && systemParm.no3 == "10") {
-        allItems = decodeURIComponent(systemParm.txt1 || "").split(',').filter(txt => txt !== '')
-        dConsole.info(JudgeTag, '考试项目', allItems)
-      }
-      if (
-      //科目二获取项目
-        (this.examSubject == "2" && allItems.length && systemParm.no1 == '6' && allItems.includes(systemParm?.no2 || ""))
-          ||
-          //科目三获取项目
-          (this.examSubject == "3" && systemParm.no1 == "6")
-      ) {
-        const name = decodeURI(systemParm.txt1 || "")
-        //小车过滤掉 夜间模拟行驶
-        if (sCarTypes.includes(this.carType) && name === '夜间行驶') {
-          return
-        }
-        const currentProject: ProjectInfo = {
-          name,
-          abbreviation: decodeURI(systemParm.txt3 || ""),
-          projectCode: no2,
-          projectCodeCenter: txt2,
-          //是否是必考  加减档设置成非必考
-          isRequired: no2 == '14' ? false : allItems.includes(no2 + ''),
-          //是否考过了
-          isEnd: false,
-          //项目开始数据是否上传过
-          isUpload: false,
-        }
-        const no2Num = Number(systemParm.no2)
-        //真实监管下发考试项目
-        if (isInExam && !(kStringArr.includes(txt2) || kStringArr.includes(no2 + ''))) {
-          dConsole.info(JudgeTag, 'surenjun =>', txt2)
-          dConsole.info(JudgeTag, 'surenjun => no2', systemParm.no2)
-          currentProject.type = '3'
-          currentProject.isUpload = true
-          currentProject.isEnd = true
-          this.ddxkKsxmArr.push(txt2)
-        }
-        Reflect.set(this.projectsObj, no2Num, currentProject)
-        Reflect.set(this.projectsCenterObj, txt2, currentProject)
-        this.projects.push(currentProject);
-      }
-      this.systemparmArr.push({
-        NO1: Number(systemParm.no1),
-        NO2: Number(systemParm.no2),
-        NO3: Number(systemParm.no3),
-        TXT1: decodeURIComponent(systemParm.txt1 || ""),
-        TXT2: decodeURIComponent(systemParm.txt2 || ""),
-        TXT3: decodeURIComponent(systemParm.txt3 || ""),
-      })
-    })
-    dConsole.log(JudgeTag, "考试项目", JSON.stringify(this.projects))
-    if (!this.projects.length) {
-      Prompt.showToast({
-        message: '读取数据库信息失败,请重新联网更新!',
-        duration: 8000
-      });
-      dConsole.log(JudgeTag, "router back3")
-      router.back();
-    }
+  async initSystemParam(sysParam?: SYSTEM_PARAM[]) {
+    let result = await this.judgeBusiness.JudgeInit()
+    this.totalScore = result.totalScore
+    this.wayno = result.wayno
+    this.carlist = result.carlist
+    this.passingScore = result.passingScore
+    this.examMileage = result.examMileage
+    this.projectsObj = result.projectsObj
+    this.projectsCenterObj = result.projectsCenterObj
+    this.ddxkKsxmArr = result.ddxkKsxmArr
+    this.singlePlay = result.singlePlay
+    this.systemparmArr = result.systemparmArr
+    this.projects = result.projects
   }
 
   // 获取场地设备信息
@@ -542,7 +439,8 @@ struct JudgePage {
       const carlistArr = info.carlist === '' ? [] : (decodeURI(info.carlist || "").split(',') || []);
       const newKey = key.split('~').join('_')
       const xmdm = Number(key.split('~')[0])
-      const currentProject: ProjectInfo = Reflect.get(this.projectsObj, xmdm)
+      const data: ProjectInfos = JSON.parse(JSON.stringify(this.projectsObj))
+      const currentProject: ProjectInfo = Reflect.get(data, xmdm)
       if (currentProject && (carlistArr.length == 0 || carlistArr.includes(this.carlist))) {
         Reflect.set(this.itemInfoObj!, newKey, {
           modelKey: newKey,
@@ -551,16 +449,17 @@ struct JudgePage {
         })
       }
     })
+    dConsole.info(JudgeTag, this.projectsObj, this.itemInfoObj)
   }
 
   // 评判相关初始化
   async initJudge() {
-    await this.judge.onJudgeFn(async (judgeData: JudgeCallBacData) => {
+    this.judgeBusiness.JudgeStart((judgeData: JudgeCallBacData) => {
+      dConsole.log(JudgeTag, "扣分", judgeData.kfArr)
       this.xmmcStr = judgeData.xmmcStr || "";
       this.carztStr = judgeData.carztStr || "";
-      dConsole.log(JudgeTag, "扣分", judgeData.kfArr)
       this.kfArr = judgeData.kfArr || [];
-    });
+    })
   }
 
   // 断点续考判断
@@ -575,7 +474,7 @@ struct JudgePage {
       const examItems: string | undefined = currentParams?.examItems;
       // 2024-01-03 16:29:26;0;20300,;2,4^2,4;null;
       if (examItems !== '' && examItems !== undefined) {
-        dConsole.info(JudgeTag, 'surenjun examItems=>', JSON.stringify(examItems))
+        dConsole.info(JudgeTag, 'examItems=>', examItems)
         const examItemsArrs = examItems.split(';');
         const startTime = examItemsArrs[0]
         const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || []
@@ -646,7 +545,7 @@ struct JudgePage {
     this.carInfo.examSubject = this.examSubject
     this.singlePlay = beginDataObj.exam == 0;
     this.carName = initDataObj.name;
-    await this.initSystemParam(initDataObj.systemparm as MA_SYSTEMPARMType[])
+    await this.initSystemParam(initDataObj.systemparm)
     await this.initMarkRules(initDataObj.mark);
     await this.initSysset(initDataObj.sysset as SYSSET[]);
   }
@@ -666,6 +565,61 @@ struct JudgePage {
     }
   }
 
+  //人工项目操作
+  async setManualProjectFn(index: number) {
+    const isManualProjectIn = this.isManualProjectIn;
+    const artSubject3ProjectsCodesArr = this.artSubject3ProjectsCodesArr;
+    const projectsObj = this.projectsObj;
+    const projectCode = artSubject3ProjectsCodesArr[index]
+    let sideParkingStatus = GetIsExitManualProject(index, this.judgeConfigObj, this.artSubject3ProjectsCodesArr, this.projectsObj, this.carztStr, this.isManualProjectIn, this.isProjectIn, this.jl, this.examMileage, this.isRequiredProjectsEnd, this.lane)
+    if (index === 5) {
+      dConsole.info(JudgeTag, '靠边停车状态=> ', sideParkingStatus)
+    }
+    const currentProject: ProjectInfo = Reflect.get(projectsObj, projectCode)
+    if (sideParkingStatus) {
+      // 正在进行的项目 取消项目
+      if (isManualProjectIn && currentProject.type == '2') {
+        //判断人工是否能取消项目 && 当前项目有扣分的不能取消
+        if (Reflect.get(this.judgeConfigObj, '340') == 1) {
+          // TODO
+          // await this.judge.setJudgeItem(projectCode, 2);
+          Prompt.showToast({
+            message: '项目取消',
+            duration: 2000
+          })
+          return
+        }
+      }
+
+      // 靠边停车时候可以触发
+      if (Reflect.get(this.judgeConfigObj, '343') === '0') {
+        const xmmcStr = this.xmmcStr;
+        if (xmmcStr == '无' || xmmcStr == '') {
+          //512[6] 人工项目按钮放大确认
+          const param512: string[] = (Reflect.get(this.judgeConfigObj, '512') || '').split(',');
+          dConsole.info(JudgeTag, param512)
+          if (param512[6] !== '0') {
+            this.amplifiedImgIndex = index;
+            this.isAmplifyPopShow = true
+          } else {
+            // TODO
+            // await this.judge.setJudgeItem(projectCode, 1);
+          }
+        } else {
+          if (index === 5) {
+            Prompt.showToast({
+              message: `${xmmcStr}未结束,不允许靠边停车`,
+              duration: 8000
+            });
+          }
+        }
+      } else {
+        this.amplifiedImgIndex = index;
+        this.isAmplifyPopShow = true
+      }
+    }
+  }
+
   // 信号区域
   @Builder
   logoExpansionBuilder() {
@@ -705,6 +659,9 @@ struct JudgePage {
               jl: this.jl,
               wayno: this.wayno,
               judgeConfigObj: this.judgeConfigObj,
+              onTimeUpdate: (time) => {
+                this.examTime = time
+              }
             })
             //  扣分列表和评判列表
             JudgeAndProjectComponent({
@@ -733,6 +690,8 @@ struct JudgePage {
 
         //   操作区域,分数显示区域
         OperatingAreaComponent({
+          kfArr: this.kfArr,
+          isAllProjectsEnd: this.isAllProjectsEnd,
           totalScore: this.totalScore,
           kszp: this.kszp,
           examSubject: this.examSubject,
@@ -779,7 +738,8 @@ struct JudgePage {
           confirmMark: async (item: string, serial: string) => {
             clearTimeout(this.popTimer)
             this.popTimer = setTimeout(async () => {
-              await this.judge.setJudgeMark(item, serial);
+              // TODO
+              // await this.judge.setJudgeMark(item, serial);
               this.isDeductedPopShow = false
               this.popTimer = null;
             }, 500)
@@ -795,7 +755,8 @@ struct JudgePage {
           confirmAmplify: async (amplify: AmplifyItem) => {
             clearTimeout(this.popTimer)
             this.popTimer = setTimeout(async () => {
-              await this.judge.setJudgeItem(amplify.projectCode, 1);
+              // TODO
+              // await this.judge.setJudgeItem(amplify.projectCode, 1);
               this.isAmplifyPopShow = false
               this.popTimer = null;
             }, 500)
@@ -831,7 +792,7 @@ struct JudgePage {
           confirmFn: () => {
             clearInterval(this.timer);
             // clearInterval(AppStorage.get('judgeTimer'))
-            this.judge.checkExamIsEnd(true);
+            this.judgeBusiness.JudgeEnd(true);
           },
         })
       }
@@ -839,56 +800,33 @@ struct JudgePage {
     .height('100%').backgroundColor('#000').justifyContent(FlexAlign.Start)
   }
 
-  //人工项目操作
-  async setManualProjectFn(index: number) {
-    const isManualProjectIn = this.isManualProjectIn;
-    const artSubject3ProjectsCodesArr = this.artSubject3ProjectsCodesArr;
-    const projectsObj = this.projectsObj;
-    const projectCode = artSubject3ProjectsCodesArr[index]
-    let sideParkingStatus = GetIsExitManualProject(index, this.judgeConfigObj, this.artSubject3ProjectsCodesArr, this.projectsObj, this.carztStr, this.isManualProjectIn, this.isProjectIn, this.jl, this.examMileage, this.isRequiredProjectsEnd, this.lane)
-    if (index === 5) {
-      dConsole.info(JudgeTag, 'surenjun 靠边停车状态=> ', sideParkingStatus)
-    }
-    const currentProject: ProjectInfo = Reflect.get(projectsObj, projectCode)
-    if (sideParkingStatus) {
-      // 正在进行的项目 取消项目
-      if (isManualProjectIn && currentProject.type == '2') {
-        //判断人工是否能取消项目 && 当前项目有扣分的不能取消
-        if (Reflect.get(this.judgeConfigObj, '340') == 1) {
-          await this.judge.setJudgeItem(projectCode, 2);
-          Prompt.showToast({
-            message: '项目取消',
-            duration: 2000
-          })
-          return
-        }
+  private onCenterMsg = (msg: string) => {
+    let result: WorkerBackMessage = JSON.parse(msg)
+    if (result.type === WorkerBackMessageType.RemoteEndExam) {
+      dConsole.info(JudgeTag, msg)
+      this.judgeBusiness.JudgeEnd(true)
+    } else if (result.type === WorkerBackMessageType.RemoteKf) {
+      let data = result.data as number[]
+      const config810 = this.judgeConfigObj.param_810
+      dConsole.info(JudgeTag, '评判收到远程扣分项目内容:' + `kfxh=>${data[1]}; directives=>${data[0]}`)
+      let currentKf = this.markRules.filter(item => {
+        return item.kfxh === data[1].toString() && (config810 === "1" || Number(item.markserial) > 99)
+      })[0]
+      if (!currentKf) {
+        return
       }
-
-      // 靠边停车时候可以触发
-      if (Reflect.get(this.judgeConfigObj, '343') === '0') {
-        const xmmcStr = this.xmmcStr;
-        if (xmmcStr == '无' || xmmcStr == '') {
-          //512[6] 人工项目按钮放大确认
-          const param512: string[] = (Reflect.get(this.judgeConfigObj, '512') || '').split(',');
-          dConsole.info(JudgeTag, 'surenjun', param512)
-          if (param512[6] !== '0') {
-            this.amplifiedImgIndex = index;
-            this.isAmplifyPopShow = true
-          } else {
-            await this.judge.setJudgeItem(projectCode, 1);
-          }
-        } else {
-          if (index === 5) {
-            Prompt.showToast({
-              message: `${xmmcStr}未结束,不允许靠边停车`,
-              duration: 8000
-            });
-          }
+      dConsole.info(JudgeTag, '远程扣分项目:', currentKf)
+      this.judgeBusiness.setJudgeMark(currentKf.itemno!, currentKf.markserial!, 2)
+      DifferentialAndSignal.sendMsg({
+        type: WorkerMessageDataType.JudgeSend,
+        data: {
+          remoteType: 'kf',
+          remoteData: [data[0]]
         }
-      } else {
-        this.amplifiedImgIndex = index;
-        this.isAmplifyPopShow = true
-      }
+      })
+    } else if (result.type === WorkerBackMessageType.StopExam) {
+      const config392 = (this.judgeConfigObj.param_392 || '20,81').split(',');
+      this.judgeBusiness.setJudgeMark(Number(config392[0]), config392[1], 2)
     }
   }
 }
diff --git a/entry/src/main/ets/pages/Judge/BaseJudgeBussines.ets b/entry/src/main/ets/pages/Judge/BaseJudgeBussines.ets
new file mode 100644
index 0000000..8d81952
--- /dev/null
+++ b/entry/src/main/ets/pages/Judge/BaseJudgeBussines.ets
@@ -0,0 +1,902 @@
+import {
+  JudgeBeginObj,
+  JudgeCallBackData,
+  JudgeConfigObj,
+  JudgeInitObj,
+  JudgeSound,
+  KmItem,
+  MarkRule,
+  ProcessDataEnumType,
+  Project,
+  ProjectInfo,
+  ProjectInfos,
+  SYSTEM_PARAM,
+  User,
+  WorkerMessageDataType,
+  WR
+} from '../../model'
+import JudgeBusiness from './JudgeBusiness'
+import { JudgePage } from '../Judge'
+import VoiceAnnounce from '../judgeSDK/utils/voiceAnnouncements'
+import { dConsole } from '../../utils/LogWorker'
+import { ExamProcessDataTag, JudgeConfig, JudgeTag, QueueTag } from '../../config'
+import {
+  examJudgeArtificialItem,
+  examJudgeBeginExam,
+  examJudgeEndExam,
+  examJudgeInit,
+  examJudgeSetLogCallback,
+  examJudgeSetPerformCallback,
+  examJudgeSetRealExamCallback,
+  examJudgeSoundEnd
+} from './JudgeSDKUtils'
+import { DeductPoints, ProjectEnd, ProjectStart, TheExamIsOver, UploadProgressPhoto } from './ProcessDataProcessing'
+import { endRecordVideo, saveStartRecordVideo } from '../../utils/Video'
+import router from '@ohos.router'
+import { GetSyncData, UpdateTableByArray } from '../../utils/table/Operation'
+import { CurrentProjectConversion, DeductionProjectConversion, DetectingDifferences, GetCarStatus } from './utils'
+import { DifferentialAndSignal } from '../../utils/business/DifferentialAndSignalWorker'
+import dayTs from '../../utils/Date'
+
+
+export interface GetSysSetResult {
+  totalScore: number
+  wayno: number
+  carlist: string
+  passingScore: number
+  examMileage: string
+  projectsObj: ProjectInfos
+  projectsCenterObj: ProjectInfos
+  ddxkKsxmArr: Array
+  singlePlay: boolean
+  systemparmArr: Array
+  projects: Array
+}
+
+export interface BaseJudgeImpl {
+  getIsUdpEnd: () => boolean
+  JudgeInit: (judgeUI: JudgePage, that: JudgeBusiness) => Promise
+  JudgeStart: (callBack: Function, judgeUI: JudgePage, that: JudgeBusiness) => void
+  Judging: (strData: string, callBack: Function, judgeUI: JudgePage, that: JudgeBusiness) => void
+  JudgeEnd: (judgeUI: JudgePage, that: JudgeBusiness, isManual?: boolean) => void
+}
+
+export const SetJudgeItem = async (itemno: string, type: 1 | 2) => {
+  await examJudgeArtificialItem(Number(itemno), type);
+  const str = JSON.stringify({
+    method: 'examJudgeArtificialItem',
+    itemno: Number(itemno),
+    type
+  })
+  dConsole.writeProcessData(ProcessDataEnumType.JudgeExamData, str)
+  dConsole.info(JudgeTag, `人工评判${type == 1 ? '进入' : '取消'}项目-${itemno}`)
+}
+
+export class BaseJudge {
+  private isUdpEnd: boolean = false
+
+  getIsUdpEnd() {
+    return this.isUdpEnd
+  }
+
+  async goJudgeVoice(sound: JudgeSound, avPlayer: VoiceAnnounce) {
+    dConsole.info(JudgeTag, 'code=>', JSON.stringify(sound.code))
+    //判断是不是模拟灯光语音
+    if (sound.type == 1) {
+      avPlayer?.playAudio([`voice/${sound.code[0]}.mp3`], false, () => {
+        examJudgeSoundEnd({
+          xmdm: sound.xmdm, code: sound.code[0], type: sound.type
+        })
+        dConsole.writeProcessData(ProcessDataEnumType.JudgeExamData, JSON.stringify({
+          method: 'examJudgeSoundEnd',
+          itemno: sound.xmdm,
+          code: sound.code[0],
+          type: sound.type,
+        }))
+      })
+    } else {
+      avPlayer?.playAudio([`voice/${sound.code[0]}.mp3`])
+    }
+  }
+
+  /**
+   * 改变考试状态
+   * old goVoiceAnnounce
+   * @param event
+   * @param xmdm
+   * @param kf
+   * @param judgeUI
+   * @param that
+   */
+  async changeExamStatus(event: number, xmdm: number, xmxh: string, kf: MarkRule[], judgeUI: JudgePage, that: JudgeBusiness) {
+    switch (event) {
+      case 1: {
+        const param512: JudgeConfigObj = (Reflect.get(judgeUI.judgeConfigObj, '512') || '').split(',');
+        const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
+        setTimeout(() => {
+          if (Reflect.get(param512, 7) != 0) {
+            clearTimeout(that.deductedPopShowTimer)
+            judgeUI.isDeductedPopShow = true
+          }
+        }, 200)
+        if (!project.isEnd) {
+          that.xmmcSingleCode = "0";
+          // judgeTask.addTask(async () => {
+          //   console.info(judgeTag, `项目开始-${xmdm}-${projectsObj[xmdm].name}`)
+          //   await beginProject(xmdm, xmxh)
+          // }, {
+          //   isDelay: true
+          // })
+          // judgeTask.addTask(async () => {
+          //   console.info(judgeTag, `项目-${xmdm}-上传照片 start`)
+          //   await uploadProgressPhoto(xmdm)
+          // }, {
+          //   isDelay: true
+          // })
+          ProjectStart(xmdm, xmxh, judgeUI)
+          UploadProgressPhoto(xmdm, that.plcData!, judgeUI)
+        }
+        // this.judgeUI.projectsObj[xmdm].isUpload = true
+
+        break;
+      }
+      case 2: {
+        dConsole.log(JudgeTag, ExamProcessDataTag, "项目结束判定1")
+        const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
+        // const isStart = await this.checkProjectIsStart(xmdm, 1, judgeUI, that, kf)
+
+        // if (isStart) {
+        //   // 项目结束了就不再生成数据
+        //   dConsole.info(JudgeTag, ExamProcessDataTag, ' 项目是否结束 =>', project.isEnd)
+        //   if (!project.isEnd) {
+        // judgeTask.addTask(async () => {
+        //   dConsole.info(JudgeTag, `项目结束-${xmdm}-${project.name}`)
+        //   await endProject(xmdm);
+        //   this.xmmcSingleCode = '0';
+        //   this.xmmcEndCode = undefined;
+        // }, {
+        //   isDelay: true
+        // })
+        ProjectEnd(xmdm, xmxh, judgeUI)
+        //   }
+        // }
+        dConsole.log(JudgeTag, ExamProcessDataTag, "项目结束判定3")
+        try {
+          const param512: JudgeConfigObj = (Reflect.get(judgeUI.judgeConfigObj, '512') || '').split(',');
+          if (!judgeUI.isProjectIn) {
+            that.deductedPopShowTimer = setTimeout(() => {
+              judgeUI.isDeductedPopShow = false
+            }, (Reflect.get(param512!, 5) || 0) * 1000)
+          }
+        } catch (e) {
+          dConsole.error(JudgeTag, "项目结束后弹窗定时器异常", e)
+        }
+        project.isEnd = true;
+        dConsole.log(JudgeTag, "项目结束判定4")
+        break;
+      }
+      case 3: {
+        dConsole.log(JudgeTag, "扣分开始")
+        const currentKf = kf[kf.length -1];
+        if (JudgeConfig.kfVoiceOpen || (judgeUI.examSubject == "2" && Reflect.get(judgeUI.judgeConfigObj, '618') === "1") || (judgeUI.examSubject == "3" && Reflect.get(judgeUI.judgeConfigObj, '418') === "1")) {
+          that.avPlayer?.playAudio([`voice/${currentKf.markcatalog}.mp3`,
+            `voice/mark_${Math.abs(currentKf?.score || 0)}.mp3`])
+        }
+        // const isStart = await this.checkProjectIsStart(Number(currentKf.xmdm), 2, judgeUI, that, kf);
+        // if (isStart) {
+        // await judgeTask.addTask(async () => {
+        //   dConsole.info(JudgeTag, `项目扣分-${currentKf.markcatalog}-${currentKf.desc}`)
+        //   await pointsDedute(Number(currentKf.xmdm), currentKf)
+        // }, {
+        //   isDelay: true
+        // })
+        DeductPoints(Number(currentKf.xmdm), currentKf, that.xmmcEndCode || "", judgeUI)
+        if (judgeUI.totalScore < judgeUI.passingScore) {
+          try {
+            ProjectEnd(xmdm, xmxh, judgeUI)
+          } catch (e) {
+            dConsole.info(e)
+          }
+        }
+        // }
+        break
+      }
+      case 5: {
+        dConsole.log(JudgeTag, QueueTag, "考试结束")
+        const singlePlay = AppStorage.get('singlePlay')
+        //   关闭录像
+        if (!singlePlay && that.videoData) {
+          await endRecordVideo(that.videoData)
+        }
+        // TODO
+        // ProcessDataTaskPoolInstance.setOnAllTasksCompletedCallback((data) => {
+        //   if (event === 5) {
+        //     dConsole.log(JudgeTag, QueueTag, "这才是考试结束判定")
+        //   }
+        //   dConsole.log(JudgeTag, QueueTag, "考试结束判断", data)
+        // })
+        // judgeTask.addTask(async () => {
+        //   dConsole.info(JudgeTag, '考试结束 start')
+        //   AppStorage.setOrCreate('isJudge', false)
+        await this.handEndExam(judgeUI, that)
+        // })
+        break
+
+      }
+      default:
+        break
+    }
+    if (event === 2 || event === 3) {
+      dConsole.log(JudgeTag, "项目结束判定统计项目")
+      await this.setCountItems(judgeUI);
+      await this.judgeEnd(judgeUI, that)
+    }
+  }
+
+  /**
+   * 统计必考项目,所有项目,已考数量
+   */
+  async setCountItems(judgeUI: JudgePage) {
+    dConsole.log(JudgeTag, "项目结束判定,统计考试项目")
+    const projectsObj: object = judgeUI.projectsObj;
+    //必考项目数量       必考项目已考数量 所有考试项目数量  项目已考项目数量
+    let projectNum = 0, endProjectsNum = 0, allProjectNum = 0, allEndProjectsNum = 0;
+    Reflect.ownKeys(projectsObj).forEach(projectKey => {
+      const projectObj: ProjectInfo = Reflect.get(projectsObj, projectKey)
+      const type = projectObj.type
+      const ykType = projectObj.ykType
+      const isRequired = projectObj.isRequired
+      allProjectNum += 1;
+      if (type == '3' || type == '4' || ykType === "3" || ykType === "4") {
+        allEndProjectsNum += 1;
+      }
+
+      if (isRequired) {
+        projectNum += 1;
+        if (type == '3' || type == '4' || ykType === "3" || ykType === "4") {
+          endProjectsNum += 1;
+        }
+      }
+    })
+    dConsole.info(JudgeTag, '项目状态' + JSON.stringify(projectsObj));
+    dConsole.info(JudgeTag, '所有考试项目数量:' + allProjectNum)
+    dConsole.info(JudgeTag, '必考项目数量:' + projectNum)
+    dConsole.info(JudgeTag, '必考项目已考数量:' + endProjectsNum)
+    judgeUI.isRequiredProjectsEnd = (projectNum - endProjectsNum === 0)
+    judgeUI.isAllProjectsEnd = (allProjectNum - allEndProjectsNum === 0)
+  }
+
+  /**
+   * 结束考试
+   */
+  async handEndExam(judgeUI: JudgePage, that: JudgeBusiness) {
+    judgeUI.endExamDialogController.close();
+    judgeUI.generateExamRecordsDialogController.open();
+    judgeUI.isDeductedPopShow = false;
+
+    const param302 = judgeUI.judgeConfigObj.param_302;
+    //自动退出待验证并且不合格
+    if (!that.isManual && judgeUI.examSubject === "3" && (param302 === "1" || (judgeUI.singlePlay && param302 === "2")) && judgeUI.totalScore < judgeUI.passingScore) {
+      that.avPlayer?.playAudio([`voice/考试结束.mp3`])
+    }
+    //联网模式下:项目没有做完、当前分数大于及格分;手动结束直接退出
+    if (!judgeUI.singlePlay && that.isManual && !judgeUI.isAllProjectsEnd && judgeUI.totalScore >= judgeUI.passingScore) {
+      that.avPlayer?.playAudio(['voice/empty.mp3'], true, () => {
+        this.isUdpEnd = true
+        dConsole.log(JudgeTag, "考试结束自动退出1")
+        router.back();
+      })
+      return
+    }
+    that.avPlayer?.playAudio(['voice/exam_waiting.mp3'], judgeUI.singlePlay, async () => {
+
+      if (judgeUI.singlePlay) {
+        // 单机结束
+        await this.endExam(judgeUI, that)
+      } else {
+        TheExamIsOver(judgeUI, that, async (res: WR) => {
+          dConsole.log(JudgeTag, ExamProcessDataTag, "考试结束接口完成", res)
+          const code = res.code!.toString()
+          if (code !== "1") {
+            that?.avPlayer?.playAudio(['voice/监管失败.mp3'])
+            judgeUI.errorMsg = decodeURIComponent(res?.message || "")
+            if (code.toString() === "2300028" || code.toString() === "2300007") {
+              judgeUI.errorMsg = '当前的考试过程信息监管审核未通过,程序将退出!'
+            }
+            judgeUI.generateExamRecordsDialogController.close();
+            return
+          } else {
+            await this.endExam(judgeUI, that)
+          }
+        })
+      }
+
+    })
+  }
+
+  // 考试结束 Todo
+  async endExam(judgeUI: JudgePage, that: JudgeBusiness) {
+    const singlePlay = judgeUI.singlePlay
+    //TODO 断网考试结束补传
+    // await uploadDisConnectData();
+    // let backTimeOut = setTimeout(() => {
+    //   router.back()
+    // }, 90 * 1000)
+
+    console.info(JudgeTag, '考试结束 end')
+    const param302 = judgeUI.judgeConfigObj.param_302;
+    let currentKssycs = 0;
+    let voiceURL = ''
+    if (judgeUI.examSubject === "2") {
+      if (judgeUI.isAllProjectsEnd) {
+        voiceURL = (judgeUI.totalScore < judgeUI.passingScore ? `voice/unqualified_${judgeUI.kssycs === "1" ? 'one' : 'two'}.wav` : 'voice/qualified.mp3')
+      } else {
+        voiceURL = `voice/unqualified_${judgeUI.kssycs === "1" ? 'one' : 'two'}.wav`
+        currentKssycs = judgeUI.kssycs === "1" ? 0 : 1
+      }
+      switch (voiceURL) {
+        case 'voice/unqualified_one.wav':
+          currentKssycs = 0;
+          break;
+        case 'voice/unqualified_two.wav':
+          currentKssycs = 1;
+          break;
+        case 'voice/qualified.mp3':
+          currentKssycs = 0;
+          break;
+      }
+    }
+    if (judgeUI.examSubject === "3") {
+      if (judgeUI.isAllProjectsEnd) {
+        if (judgeUI.totalScore < judgeUI.passingScore) {
+          voiceURL = `voice/${judgeUI.kssycs === "1" ? 'exam_no_pass_finish' : 'exam_no_pass'}.mp3`
+          currentKssycs = judgeUI.kssycs === "1" ? 0 : 1
+        } else {
+          voiceURL = 'voice/exam_pass.mp3'
+          currentKssycs = 0
+        }
+      } else {
+        voiceURL = `voice/${judgeUI.kssycs === "1" ? 'exam_no_pass_finish' : 'exam_no_pass'}.mp3`
+        currentKssycs = judgeUI.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;
+      }
+    }
+
+    const USER = await GetSyncData('USER');
+    let user = USER[0]
+    user.kssycs = currentKssycs.toString()
+    dConsole.info(JudgeTag, `更新后学员信息`, user)
+    try {
+      await UpdateTableByArray('USER', [user])
+    } catch (e) {
+      dConsole.error(JudgeTag, `更新学员信息失败`, e)
+    }
+    dConsole.info(JudgeTag, `考试成绩:${judgeUI.totalScore}`)
+    if (!singlePlay) {
+      // await uploadProgressData();
+    }
+    // clearTimeout(backTimeOut)
+    //语音播放扣分项
+    let score = 0;
+    //结束考试时候是否播报一遍所有扣分
+    const param634 = judgeUI.judgeConfigObj.param_634;
+    if (judgeUI.kfArr.length && ((judgeUI.examSubject === "2" && param634 === "1") || judgeUI.examSubject === "3")) {
+      that.avPlayer?.playAudio([`voice/kfdesc.mp3`], false, () => {
+        try {
+          judgeUI.kfArr.forEach((kf, index) => {
+            score += Math.abs(Number(kf.score));
+            //TODO 考试分数待替换
+            if (score <= (judgeUI.examSubject === "3" ? 10 : 20)) {
+              if (judgeUI.kfArr.length - 1 === index) {
+                that.avPlayer?.playAudio([`voice/${kf.markcatalog}.mp3`, voiceURL], false, () => {
+                  this.isUdpEnd = true
+                  dConsole.log(JudgeTag, "考试结束自动退出2")
+                  router.back();
+                })
+                // throw new Error('End Loop')
+              }
+              that.avPlayer?.playAudio([`voice/${kf.markcatalog}.mp3`])
+            } else {
+              that.avPlayer?.playAudio([`voice/${kf.markcatalog}.mp3`, voiceURL], false, () => {
+                this.isUdpEnd = true
+                dConsole.log(JudgeTag, "考试结束自动退出3")
+                router.back();
+              })
+              // throw new Error('End Loop')
+            }
+          })
+          this.isUdpEnd = true
+          try {
+            if (!judgeUI.singlePlay) {
+              console.log("四合一结束1")
+              let startTime: Date = AppStorage.get("startTime") || new Date()
+              DifferentialAndSignal.sendMsg({ type: WorkerMessageDataType.JudgeSend, data: {
+                judgeUdpEnd: this.isUdpEnd,
+                judgeExamEnd: true,
+                performInfo: that.performInfo,
+                business: {
+                  totalScore: that.judgeUI.totalScore,
+                  kfArr: that.judgeUI.kfArr,
+                  startTime: dayTs(startTime).format("HHmmssSSS"),
+                  xmmcSingleCode: that.xmmcSingleCode,
+                  kmItems: that.kmItems,
+                  examTime: that.judgeUI.examTime,
+                  cdsbInfoObj: that.judgeUI.cdsbInfoObj!,
+                  xmdm: that.xmdm,
+                  xmxh: that.xmxh
+                } } })
+            }
+          } catch (e) {
+            console.info(JudgeTag, JSON.stringify(e))
+          }
+        } catch (e) {
+          console.info(JudgeTag, JSON.stringify(e))
+        }
+      })
+    } else {
+      that.avPlayer?.playAudio([voiceURL], true, () => {
+        setTimeout(() => {
+          this.isUdpEnd = true
+          try {
+            if (!judgeUI.singlePlay) {
+              console.log("四合一结束2")
+              let startTime: Date = AppStorage.get("startTime") || new Date()
+              DifferentialAndSignal.sendMsg({ type: WorkerMessageDataType.JudgeSend, data: {
+                judgeUdpEnd: this.isUdpEnd,
+                judgeExamEnd: true,
+                performInfo: that.performInfo,
+                business: {
+                  totalScore: that.judgeUI.totalScore,
+                  kfArr: that.judgeUI.kfArr,
+                  startTime: dayTs(startTime).format("HHmmssSSS"),
+                  xmmcSingleCode: that.xmmcSingleCode,
+                  kmItems: that.kmItems,
+                  examTime: that.judgeUI.examTime,
+                  cdsbInfoObj: that.judgeUI.cdsbInfoObj!,
+                  xmdm: that.xmdm,
+                  xmxh: that.xmxh
+                } } })
+            }
+          } catch (e) {
+            console.info(JudgeTag, JSON.stringify(e))
+          }
+          dConsole.log(JudgeTag, "考试结束自动退出5")
+          router.back();
+        }, param302 === "8" ? 3000 : 0)
+      })
+    }
+  }
+
+  /**
+   *  检测扣分、结束项目时该项目是否开始
+   */
+  // async checkProjectIsStart(xmdm: number, currentType: 1 | 2, judgeUI: JudgePage, that: JudgeBusiness, kf?: MarkRule[]): Promise {
+  //   if (xmdm == 20) {
+  //     return true
+  //   }
+  //   const currentProject: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
+  //
+  //   if (!currentProject.isUpload) {
+  //     dConsole.info(JudgeTag, '项目补传开始')
+  //     // judgeTask.addTask(async () => {
+  //     //   await this.beginProject(xmdm)
+  //     // }, {
+  //     //   isDelay: true
+  //     // })
+  //     // judgeTask.addTask(async () => {
+  //     //   await this.uploadProgressPhoto(xmdm)
+  //     // }, {
+  //     //   isDelay: true
+  //     // })
+  //     ProjectStart(xmdm, xmxh, judgeUI)
+  //     UploadProgressPhoto(xmdm, that.plcData!, judgeUI)
+  //     currentProject.isUpload = true;
+  //     Reflect.set(judgeUI.projectsObj, xmdm, currentProject)
+  //     if (currentType == 2) {
+  //       //项目结束需要等补传完毕
+  //       // judgeTask.addTask(async () => {
+  //       //   await this.pointsDedute(xmdm, kf!)
+  //       // }, {
+  //       //   isDelay: true
+  //       // })\
+  //       const currentKf = kf[kf.length -1];
+  //       DeductPoints(Number(currentKf.xmdm), currentKf, that.xmmcEndCode || "", judgeUI)
+  //     }
+  //     //扣分补传判断是否合格 不合格补传项目结束
+  //     if (currentType == 1 || (currentType == 2 && that.totalScore < judgeUI.passingScore)) {
+  //       // judgeTask.addTask(async () => {
+  //       //   await this.endProject(xmdm)
+  //       // }, {
+  //       //   isDelay: true
+  //       // })
+  //       ProjectEnd(xmdm, that.xmxh, judgeUI)
+  //       currentProject.isEnd = true;
+  //       Reflect.set(judgeUI.projectsObj, xmdm, currentProject)
+  //     }
+  //     // judgeTask.addTask(async () => {
+  //     //   this.checkExamIsEnd()
+  //     // })
+  //     return false;
+  //   }
+  //   return true
+  // }
+
+  async judgeStart(callBack: Function, judgeUI: JudgePage, that: JudgeBusiness, beginExamInfo: JudgeBeginObj, initInfo: JudgeInitObj) {
+    this.isUdpEnd = false
+    const name = judgeUI.name
+    const kssycs = judgeUI.kssycs
+    // 处理远程扣分使用
+    // 处理单机模式
+    const isTrajectoryOpen = JudgeConfig.isTrajectoryOpen;
+    const isJudgeInitBool = AppStorage.get('isJudgeInitBool');
+    const trajectoryPath = JudgeConfig.trajectoryPath;
+    let strArr: string[] = [];
+    if (isTrajectoryOpen) {
+      const folderPath = await that.fileUtil.initFolder(trajectoryPath);
+      const str: string = await that.fileUtil.readFile(folderPath)
+      strArr = str.split('\n')
+    }
+    //日志回调
+    dConsole.info(JudgeTag, '1.进入评判入口')
+    await examJudgeSetLogCallback(3, async (level: number, info: string, len: number) => {
+      dConsole.log(JudgeTag, '评判日志:' + info)
+      dConsole.writeProcessData(ProcessDataEnumType.JudgeLogData, info)
+    })
+
+    dConsole.info(JudgeTag, '2.注册日志回调完成')
+
+    //相关评判初始化只做一次
+    if (!isJudgeInitBool) {
+      dConsole.log(JudgeTag, "评判初始化参数", initInfo)
+      await examJudgeInit(initInfo);
+      AppStorage.setOrCreate('isJudgeInitBool', true)
+      dConsole.info(JudgeTag, '4.评判初始化完成')
+    }
+    dConsole.writeProcessData(ProcessDataEnumType.JudgeExamData, JSON.stringify(initInfo))
+    AppStorage.setOrCreate('isJudge', true)
+    // 2.评判过程回调
+    await examJudgeSetRealExamCallback(async (strData: string, len: number) => {
+      // 评判回调日志
+      dConsole.writeProcessData(ProcessDataEnumType.JudgeProgressCallbackData, strData)
+      dConsole.info(JudgeTag, '评判回调数据', strData)
+      await this.judging(strData, callBack, judgeUI, that)
+    })
+    await examJudgeSetPerformCallback(async (info: string) => {
+      // dConsole.info('评判实时数据', info)
+      that.performInfo = JSON.parse(info)
+      const jl = Math.floor((that.performInfo!.qjjl + that.performInfo!.dcjl) / 100);
+      if (jl > Number(judgeUI.examMileage)) {
+        that.JudgeEnd()
+      }
+      judgeUI.jl = jl
+      judgeUI.laneSignal = that.performInfo!.lane
+    })
+
+    // 3.开始考试
+    if (beginExamInfo) {
+      await examJudgeBeginExam(beginExamInfo);
+      dConsole.writeProcessData(ProcessDataEnumType.JudgeExamData, JSON.stringify(beginExamInfo))
+    }
+    dConsole.info(JudgeTag, '6.开始考试注册完成')
+    that.avPlayer?.playAudio([judgeUI.singlePlay ? 'voice/ksks.wav' : 'voice/监管成功.mp3'])
+    if (!judgeUI.singlePlay) {
+      that.videoData = await saveStartRecordVideo(`${name}_${kssycs}`, that.context)
+    }
+    judgeUI.draw = true
+    // 处理单机泡轨迹模式
+    if (isTrajectoryOpen) {
+      that.SingleMachineTrajectory(strArr)
+      return
+    }
+  };
+
+  async judging(strData: string, callBack: Function, judgeUI: JudgePage, that: JudgeBusiness) {
+    let examData: JudgeCallBackData = JSON.parse(strData);
+    const carzt = examData.carzt
+    const xmks = examData.xmks
+    const kf = examData.kf
+    const event = examData.event
+    const xmjs = examData.xmjs
+    const xmqx = examData.xmqx
+    const ksjs = examData.ksjs
+    const sound = examData.sound
+    const mndg = examData.mndg
+    const lane = examData.lane
+    const precast = examData.precast
+    const nongps = examData.nongps
+    //获取项目结束、项目开始代码
+    const xmdm = event == 2 ? xmjs.xmdm : xmks.xmdm
+    const xmxh = event == 2 ? xmjs.xmxh : xmks.xmxh;
+    let artSubject3ProjectsCodesArr: number[] = [3, 9, 4, 10, 12, 11]
+    const isManualProjectIn = artSubject3ProjectsCodesArr.includes(xmdm);
+    const examSubject = judgeUI.examSubject
+    switch (event) {
+    //   项目开始
+      case 1: {
+        dConsole.info(JudgeTag, "项目开始")
+        const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
+        project.type = '2';
+        if (isManualProjectIn) {
+          //手动项目是否在进行中
+          judgeUI.isManualProjectIn = true
+        }
+        if (xmdm == 41 && examSubject == '3') {
+          that.rmndg = 1
+        }
+        judgeUI.currentXmdm = xmdm;
+        const xmmcStr = project.name || "";
+        const xmmcSingleCode = project.projectCode || "";
+        const xmmcCode = project.projectCodeCenter || "";
+        const kmItem: KmItem = Reflect.get(that.kmItems, xmmcCode)
+        kmItem.status = 2;
+        that.xmmcStr = xmmcStr;
+        that.xmmcCode = xmmcCode;
+        that.xmmcSingleCode = xmmcSingleCode
+        that.xmmcEndCode = xmmcCode
+        that.xmdm = xmdm;
+        that.xmxh = xmxh;
+        judgeUI.isProjectIn = true
+        Reflect.set(judgeUI.projectsObj, xmdm, project)
+        Reflect.set(that.kmItems, xmmcCode || 0, kmItem)
+        break;
+      }
+    //   项目结束
+      case 2: {
+        dConsole.info(JudgeTag, "项目结束")
+        const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
+        const xmmcCode = project.projectCodeCenter || "";
+        project.type = (xmjs.xmhg === 0 ? '4' : '3')
+        //计算项目是否全部结束
+        judgeUI.isProjectIn = (Reflect.ownKeys(judgeUI.projectsObj).filter((projectKey) => {
+          const fillProject: ProjectInfo = Reflect.get(judgeUI.projectsObj, projectKey)
+          return fillProject.type == '2'
+        }).length) > 0;
+        if (isManualProjectIn) {
+          judgeUI.isManualProjectIn = false
+        }
+        const kmItem: KmItem = Reflect.get(that.kmItems, xmmcCode)
+        kmItem.status = 3;
+        //统计必考项目数量
+        that.xmmcStr = '无';
+        that.xmmcCode = '';
+        that.xmdm = '';
+        judgeUI.currentXmdm = undefined;
+        Reflect.set(judgeUI.projectsObj, xmdm, project)
+        Reflect.set(that.kmItems, xmmcCode, kmItem)
+        break;
+      }
+    //   扣分
+      case 3: {
+        dConsole.info(JudgeTag, "项目扣分")
+        const thisKf = DeductionProjectConversion(`${kf.xmdm}_${kf.kfdm}`, judgeUI.markRuleListObj)
+        const kfObj: MarkRule = {
+          //扣分项目名称
+          xmmcStr: CurrentProjectConversion(kf.xmdm, judgeUI.projectsObj),
+          xmdm: kf.xmdm + "",
+          //扣分描述
+          desc: thisKf.desc,
+          //扣分分数
+          score: thisKf.score,
+          // 扣分无锡所代码
+          markcatalog: thisKf.markcatalog,
+          markserial: thisKf.markserial,
+          kfxh: thisKf.kfxh,
+          //扣分类型
+          type: kf.type
+        }
+        dConsole.log(JudgeTag, "扣分组装", kfObj)
+        judgeUI.kfArr.push(kfObj)
+        dConsole.log(JudgeTag, "扣分类组装", judgeUI.kfArr)
+        judgeUI.totalScore += Number(thisKf?.score);
+        if (kf.xmdm != 20) {
+          const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, kf.xmdm)
+          const type = project.type;
+          project.type = (type == '3' || type == '4') ? '4' : '5'
+          Reflect.set(judgeUI.projectsObj, kf.xmdm, project)
+        }
+        break;
+      }
+    // 考试状态
+      case 4: {
+        that.carztStr = GetCarStatus(carzt);
+        break;
+      }
+    //   考试结束
+      case 5: {
+        dConsole.info(JudgeTag, "考试结束距离1", ksjs)
+        that.ksjs = ksjs;
+        dConsole.writeProcessData(ProcessDataEnumType.JudgeExamData, JSON.stringify({
+          method: 'examJudgeEndExam'
+        }))
+        break;
+      }
+    //   项目取消
+      case 6: {
+        dConsole.info(JudgeTag, '项目取消');
+        const xmdm = xmqx.xmdm;
+        const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
+        const xmmcCode = project.projectCodeCenter || "";
+        project.type = '1'
+        const kmItem: KmItem = Reflect.get(that.kmItems, xmmcCode)
+        Reflect.set(judgeUI.projectsObj, xmdm, project)
+        kmItem.status = 1
+        Reflect.set(that.kmItems, xmmcCode, kmItem)
+        break;
+      }
+    //   语音播报和提示
+      case 7: {
+        dConsole.info(JudgeTag, '播放语音');
+        this.goJudgeVoice(sound, that.avPlayer!)
+        break;
+      }
+    //   模拟灯光事件
+      case 8: {
+        that.mndgStr = mndg
+        break;
+      }
+    //   车道和路段变化
+      case 9: {
+        judgeUI.lane = lane
+        that.lane = lane;
+        break;
+      }
+    //   预进项目事件
+      case 10: {
+        dConsole.info(JudgeTag, '预进项目');
+        const xmdm = precast.xmdm
+        const xmxh = precast.xmxh
+        const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
+        const xmmcCode: string = project.projectCodeCenter!;
+        const xmmcSingleCode: string = project.projectCode!;
+        const kmItem: KmItem = Reflect.get(that.kmItems, xmmcCode)
+        const xmmcStr = project?.name || "";
+        kmItem.status = 2;
+        Reflect.set(that.kmItems, xmmcCode, project)
+        that.xmmcStr = xmmcStr || "";
+        that.xmmcCode = xmmcCode || "";
+        that.xmdm = xmdm;
+        that.xmxh = xmxh;
+        that.xmmcSingleCode = xmmcSingleCode || "";
+        project.type = '2';
+        Reflect.set(judgeUI.projectsObj, xmdm, project)
+      }
+    //   差分事件
+      case 11: {
+        DetectingDifferences(nongps.type, that.avPlayer!)
+        break;
+      }
+      default:
+        break;
+    }
+    callBack({
+      //项目名称   考车状态   扣分arr
+      xmmcStr: that.xmmcStr, carztStr: that.carztStr, kfArr: judgeUI.kfArr
+    });
+    // TODO 语音播报
+    this.changeExamStatus(event, xmdm, xmxh, judgeUI.kfArr!, judgeUI, that);
+    //   更新ui
+    if (event == 1 || event == 2 || event == 3 || event == 6) {
+      judgeUI.projectsObj = JSON.parse(JSON.stringify(judgeUI.projectsObj))
+    }
+  }
+
+  async judgeEnd(judgeUI: JudgePage, that: JudgeBusiness, isManual?: boolean) {
+    dConsole.info(JudgeTag, '收到远程结束考试消息3')
+    const isAllProjectsEnd = judgeUI.isAllProjectsEnd
+    const examSubject = judgeUI.examSubject
+    const singlePlay = judgeUI.singlePlay
+    const totalScore = Number(judgeUI.totalScore)
+    const judgeConfigObj = judgeUI.judgeConfigObj
+    const examMileage = Number(judgeUI.examMileage)
+    const passingScore = Number(judgeUI.passingScore)
+    const jl = judgeUI.jl
+    if (that.isExamEnd) {
+      dConsole.log("JudgeTag", "已经结束考试")
+      return
+    }
+    if (isManual) {
+      dConsole.log(JudgeTag, '收到远程结束考试消息5')
+      judgeUI.generateExamRecordsDialogController.close()
+      // 考试不合格
+      await examJudgeEndExam()
+      that.isExamEnd = true
+      that.isManual = true
+    } else {
+      const param302: number = Reflect.get(judgeConfigObj, '302')
+      const param342: number = Reflect.get(judgeConfigObj, '342')
+      const param512: number[] = (Reflect.get(judgeConfigObj, '512') || '').split(',');
+      dConsole.log(JudgeTag, '收到远程结束考试消息4')
+      //单机模式
+      if (singlePlay) {
+        dConsole.info(JudgeTag + ' 单机模式结束 => ', isAllProjectsEnd)
+        if (isAllProjectsEnd && jl >= examMileage) {
+          //成绩合格
+          if (totalScore >= passingScore && !that.isEndTip) {
+            if (examSubject == '3' && (param342 == 0 || param342 == 2) &&
+              (param302 != 6 && param302 != 7 && param302 != 8)) {
+              if (param512[7] != 0) {
+                clearTimeout(that.deductedPopShowTimer)
+                that.avPlayer?.playAudio(['voice/综合评判.mp3'])
+                judgeUI.isDeductedPopShow = true
+                judgeUI.defaultTabIndex = 1
+                that.isEndTip = true
+                return
+              }
+            } else {
+              await examJudgeEndExam()
+              that.isExamEnd = true
+              return
+            }
+          } else {
+            if (examSubject == '3' && (param302 == 4 || param302 == 5 || param302 == 7 || param302 == 8)) {
+              await examJudgeEndExam()
+              that.isExamEnd = true
+              return
+            }
+          }
+          await examJudgeEndExam()
+          that.isExamEnd = true
+        }
+      } else {
+        //成绩不合格
+        if (totalScore < passingScore) {
+          //科目三不合格报靠边停车
+          if (examSubject == '3' && param302 == 1) {
+            that.avPlayer?.playAudio([`voice/考试结束.mp3`]);
+            return
+          }
+          await examJudgeEndExam()
+          that.isExamEnd = true
+          return
+        }
+        //成绩合格
+        if (isAllProjectsEnd && totalScore >= passingScore && !that.isEndTip) {
+          if (examSubject == '2') {
+            await examJudgeEndExam()
+            that.isExamEnd = true
+            return
+          }
+
+          //考试里程判断
+          if (examSubject == '3' && jl < examMileage) {
+            return
+          }
+
+          //考试合格自动退出
+          if (examSubject == '3' && (param302 == 4 || param302 == 7) || param302 == 8) {
+            await examJudgeEndExam()
+            that.isExamEnd = true
+            return
+          }
+
+          if (examSubject == '3' && (param342 == 0 || param342 == 2) &&
+            (param302 != 6 && param302 != 7 && param302 != 8)) {
+            if (param512[7] != 0) {
+              clearTimeout(that.deductedPopShowTimer)
+              judgeUI.isDeductedPopShow = false
+              that.avPlayer?.playAudio(['voice/综合评判.mp3'])
+              judgeUI.isDeductedPopShow = true
+              judgeUI.defaultTabIndex = 1
+              that.isEndTip = true
+            }
+          } else {
+            await examJudgeEndExam()
+            that.isExamEnd = true
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/entry/src/main/ets/pages/Judge/JudgeBusiness.ets b/entry/src/main/ets/pages/Judge/JudgeBusiness.ets
index d463dda..90267d3 100644
--- a/entry/src/main/ets/pages/Judge/JudgeBusiness.ets
+++ b/entry/src/main/ets/pages/Judge/JudgeBusiness.ets
@@ -1,27 +1,29 @@
 import {
+  EnvironmentConfigurationType,
   JudgeConfigObjKmItems,
   JudgeKSJS,
   JudgePerformInfo,
-  JudgeUI,
   LANE,
-  MarkRule,
   PLCType,
   ProcessDataEnumType,
   RecordHandleType,
   WorkerBackMessage,
-  WorkerBackMessageType
+  WorkerBackMessageType,
+  WorkerMessageDataType
 } from '../../model'
 import FileUtils from '../../utils/FileUtils'
 import VoiceAnnounce from '../judgeSDK/utils/voiceAnnouncements'
 import common from '@ohos.app.ability.common'
-import { JudgeStartFn } from './JudgeStart'
+import { LargeJudge } from './LargeJudgeBusiness'
+import { SmallJudge } from './SmallJudgeBusiness'
 import { dConsole } from '../../utils/LogWorker'
 import { JudgeTag } from '../../config'
-import { examJudgeRealExam } from './JudgeSDKUtils'
-import { JudgingFn, SetJudgeItem } from './JudgeIng'
+import { examJudgeArtificialMark, examJudgeRealExam } from './JudgeSDKUtils'
 import { DifferentialAndSignal } from '../../utils/business/DifferentialAndSignalWorker'
 import { PlcStrToJson, PlcStrToWXJson } from './utils'
-import { JudgeEndFn } from './JudgeEnd'
+import { BaseJudgeImpl, SetJudgeItem } from './BaseJudgeBussines'
+import { JudgePage } from '../Judge'
+import dayTs from '../../utils/Date'
 
 export default class JudgeBusiness {
   public mndgStr: string | undefined
@@ -33,38 +35,43 @@ export default class JudgeBusiness {
   public performInfo?: JudgePerformInfo
   public context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext;
   //考试是否结束了
-  public isExamEnd: boolean
+  public isExamEnd: boolean = false
   public isEndTip: boolean = false;
   //是否手动结束考试
   public isManual: boolean = false
   public deductedPopShowTimer: number = -1;
   public videoData?: RecordHandleType
   //是否是考试模式
-  public isExam: boolean
+  public isExam: boolean = true
   // PLC原始数据
   public plcStr: string = ""
   public rmndg: 0 | 1 = 0
   //所有的科目考试项目(大车&小车)
-  public kmItems: JudgeConfigObjKmItems
+  public kmItems: JudgeConfigObjKmItems = {}
   public xmmcStr: string = ""
   public xmmcCode: string = ""
   public xmmcSingleCode: string = ""
   public xmmcEndCode?: string
   public xmdm: string | number = ""
   public xmxh: string = ""
-  public kfArr?: MarkRule[]
-  public carztStr: string
+  public carztStr: string = ""
   public ksjs?: JudgeKSJS
   public plcData?: PLCType
-  private judgeUI: JudgeUI
-  private tempData?: PLCType
-  // 是否发送udp
-  private isUdpEnd: boolean = false
+  public totalScore: number = -1
+  public judgeUI: JudgePage
+  private judgeBusiness: BaseJudgeImpl
+  private plc2Data?: string
 
-  constructor(judgeUI: JudgeUI) {
+  constructor(judgeUI: JudgePage) {
     this.judgeUI = judgeUI
     this.fileUtil = new FileUtils(judgeUI.context)
     this.avPlayer = new VoiceAnnounce(this.context);
+    const config = AppStorage.get("EnvironmentConfiguration")
+    if (config?.carType === '1' || config?.carType === '2') {
+      this.judgeBusiness = new SmallJudge()
+    } else {
+      this.judgeBusiness = new LargeJudge()
+    }
   }
 
   // 单机轨迹模式
@@ -81,7 +88,6 @@ export default class JudgeBusiness {
       const msg: PLCType = JSON.parse(strArr[num]);
       num++
       // 4.过程数据
-      this.tempData = msg
       this.judgeUI.sd = Math.floor(msg?.gps?.sd * 1.852) + '';
       this.judgeUI.dw = Math.floor(msg?.sensor?.dw) + ''
       this.plcData = msg
@@ -96,43 +102,64 @@ export default class JudgeBusiness {
     }, 200)
   }
 
+  // 考试初始化
+  public async JudgeInit() {
+    return this.judgeBusiness.JudgeInit(this.judgeUI, this)
+  }
+
   // 开始考试
   public async JudgeStart(callBack: Function) {
     //   处理考试前需要做的业务
     //   调用开始考试
-    JudgeStartFn(callBack, this.judgeUI, this)
+    this.judgeBusiness.JudgeStart(callBack, this.judgeUI, this)
     //   处理PLC数据
     // 处理实时udp里的plc信号
-    DifferentialAndSignal.onMsg((data: string) => {
-      const result: WorkerBackMessage = JSON.parse(data)
-      if (result.type === WorkerBackMessageType.ObtainUdpData) {
-        this.HandlePLCData(result.data as string)
-        dConsole.writeProcessData(ProcessDataEnumType.PlcData, result.data as string)
-      }
-    })
+    DifferentialAndSignal.onMsg(this.onUdpMessageCallback)
     this.JudgeEnd()
   }
 
+  // 人工扣分
+  public async setJudgeMark(itemno: number, markserial: string, type: number) {
+    await examJudgeArtificialMark(itemno, markserial, type)
+    //   TODO 写扣分轨迹日志
+  }
+
   // 考试过程 callback优化
   public async Judging(strData: string, callBack: Function) {
-    JudgingFn(strData, callBack, this.judgeUI, this)
+    this.judgeBusiness.Judging(strData, callBack, this.judgeUI, this)
   }
 
   // 结束考试
   public JudgeEnd(isManual?: boolean) {
-    JudgeEndFn(this.judgeUI, this, isManual)
+    dConsole.info(JudgeTag, '收到远程结束考试消息1')
+    this.judgeBusiness.JudgeEnd(this.judgeUI, this, isManual)
+  }
+
+  close() {
+    DifferentialAndSignal.offMsg(this.onUdpMessageCallback)
+  }
+
+  private onUdpMessageCallback = (data: string) => {
+    dConsole.log(JudgeTag, '收到UDP数据', data)
+    const result: WorkerBackMessage = JSON.parse(data)
+    if (result.type === WorkerBackMessageType.ObtainUdpData) {
+      this.HandlePLCData(result.data as string)
+      dConsole.writeProcessData(ProcessDataEnumType.PlcData, result.data as string)
+    }
+    if (result.type === WorkerBackMessageType.ObtainUdpGps2Data) {
+      this.plc2Data = result.data as string
+    }
   }
 
   // 处理PLC数据
   private async HandlePLCData(msg: string) {
     const plcArr = msg.split(',')
-    if (plcArr[0] != '#DN_GD' || this.isUdpEnd) {
+    if (plcArr[0] != '#DN_GD' || this.judgeBusiness.getIsUdpEnd()) {
       return
     }
     const gpsPart = msg.split("#END$GPS,")[1];
     const gpsStatus = gpsPart.split(",")[0];
     if (gpsStatus === "4") {
-      dConsole.log(JudgeTag, "差分状态正常", gpsStatus)
       this.judgeUI.isDwztRight = true
     } else {
       dConsole.log(JudgeTag, "差分状态异常", gpsStatus)
@@ -140,14 +167,13 @@ export default class JudgeBusiness {
     }
     // 记录原始PLC数据
     dConsole.writeProcessData(ProcessDataEnumType.PlcData, msg)
-    const tempData = await PlcStrToJson(msg);
+    const tempData = await PlcStrToJson(msg, this.plc2Data);
     tempData.sensor.rmndg = this.rmndg;
     tempData.sensor.mndg = this.mndgStr || "";
     const wuXiDataStr = await PlcStrToWXJson(msg)
     // 无锡所数据记录
     dConsole.writeProcessData(ProcessDataEnumType.WuxiProgressData, wuXiDataStr)
     this.plcData = tempData
-    this.tempData = tempData
     this.plcStr = msg;
     this.mndgStr = '';
     this.rmndg = 0;
@@ -157,10 +183,33 @@ export default class JudgeBusiness {
     const param350: number = Reflect.get(this.judgeUI.judgeConfigObj, '350')
     this.judgeUI.sd = ((param350 == 0 ? this.plcData.gps.sd : this.plcData.sensor.cs) as number * 1.852).toFixed(0) + ''
     this.judgeUI.dw = (Math.floor(this.plcData.sensor.dw as number) || 0) + ''
+
+    // dConsole.info("小红球过程数据1", this.judgeBusiness.getIsUdpEnd(), this.judgeUI.kfArr)
+
+    let startTime: Date = AppStorage.get("startTime") || new Date()
+
+    DifferentialAndSignal.sendMsg({
+      type: WorkerMessageDataType.JudgeSend, data: {
+        performInfo: this.performInfo,
+        judgeUdpEnd: this.judgeBusiness.getIsUdpEnd(),
+        judgeExamEnd: this.isExamEnd,
+        business: {
+          totalScore: this.judgeUI.totalScore,
+          kfArr: this.judgeUI.kfArr,
+          startTime: dayTs(startTime).format("HHmmssSSS"),
+          xmmcSingleCode: this.xmmcSingleCode,
+          kmItems: this.kmItems,
+          examTime: this.judgeUI.examTime,
+          cdsbInfoObj: this.judgeUI.cdsbInfoObj!,
+          xmdm: this.xmdm,
+          xmxh: this.xmxh
+        }
+      }
+    })
+
     if (!this.isExamEnd) {
       await examJudgeRealExam(this.plcData)
     }
-
   }
 }
 
diff --git a/entry/src/main/ets/pages/Judge/JudgeEnd.ets b/entry/src/main/ets/pages/Judge/JudgeEnd.ets
deleted file mode 100644
index b224356..0000000
--- a/entry/src/main/ets/pages/Judge/JudgeEnd.ets
+++ /dev/null
@@ -1,110 +0,0 @@
-import { JudgeTag } from '../../config'
-import { JudgeUI } from '../../model'
-import { dConsole } from '../../utils/LogWorker'
-import JudgeBusiness from './JudgeBusiness'
-import { examJudgeEndExam } from './JudgeSDKUtils'
-
-export const JudgeEndFn = async (judgeUI: JudgeUI, that: JudgeBusiness, isManual?: boolean) => {
-  const isAllProjectsEnd = judgeUI.isAllProjectsEnd
-  const examSubject = judgeUI.examSubject
-  const singlePlay = judgeUI.singlePlay
-  const totalScore = Number(judgeUI.totalScore)
-  const judgeConfigObj = judgeUI.judgeConfigObj
-  const examMileage = Number(judgeUI.examMileage)
-  const passingScore = Number(judgeUI.passingScore)
-  const jl = judgeUI.jl
-  if (that.isExamEnd) {
-    return
-  }
-  if (isManual) {
-    // 考试不合格
-    await examJudgeEndExam()
-    that.isExamEnd = true
-    that.isManual = true
-  } else {
-    const param302: number = Reflect.get(judgeConfigObj, '302')
-    const param342: number = Reflect.get(judgeConfigObj, '342')
-    const param512: number[] = (Reflect.get(judgeConfigObj, '512') || '').split(',');
-
-    //单机模式
-    if (singlePlay) {
-      dConsole.info(JudgeTag + ' 单机模式结束 => ', isAllProjectsEnd)
-      if (isAllProjectsEnd && jl >= examMileage) {
-        //成绩合格
-        if (totalScore >= passingScore && !that.isEndTip) {
-          if (examSubject == '3' && (param342 == 0 || param342 == 2) &&
-            (param302 != 6 && param302 != 7 && param302 != 8)) {
-            if (param512[7] != 0) {
-              clearTimeout(that.deductedPopShowTimer)
-              that.avPlayer?.playAudio(['voice/综合评判.mp3'])
-              judgeUI.isDeductedPopShow = true
-              judgeUI.defaultTabIndex = 1
-              that.isEndTip = true
-              return
-            }
-          } else {
-            await examJudgeEndExam()
-            that.isExamEnd = true
-            return
-          }
-        } else {
-          if (examSubject == '3' && (param302 == 4 || param302 == 5 || param302 == 7 || param302 == 8)) {
-            await examJudgeEndExam()
-            that.isExamEnd = true
-            return
-          }
-        }
-        await examJudgeEndExam()
-        that.isExamEnd = true
-      }
-    } else {
-      //成绩不合格
-      if (totalScore < passingScore) {
-        //科目三不合格报靠边停车
-        if (examSubject == '3' && param302 == 1) {
-          that.avPlayer?.playAudio([`voice/考试结束.mp3`]);
-          return
-        }
-        await examJudgeEndExam()
-        that.isExamEnd = true
-        return
-      }
-
-      //成绩合格
-      if (isAllProjectsEnd && totalScore >= passingScore && !that.isEndTip) {
-        if (examSubject == '2') {
-          await examJudgeEndExam()
-          that.isExamEnd = true
-          return
-        }
-
-        //考试里程判断
-        if (examSubject == '3' && jl < examMileage) {
-          return
-        }
-
-        //考试合格自动退出
-        if (examSubject == '3' && (param302 == 4 || param302 == 7) || param302 == 8) {
-          await examJudgeEndExam()
-          that.isExamEnd = true
-          return
-        }
-
-        if (examSubject == '3' && (param342 == 0 || param342 == 2) &&
-          (param302 != 6 && param302 != 7 && param302 != 8)) {
-          if (param512[7] != 0) {
-            clearTimeout(that.deductedPopShowTimer)
-            judgeUI.isDeductedPopShow = false
-            that.avPlayer?.playAudio(['voice/综合评判.mp3'])
-            judgeUI.isDeductedPopShow = true
-            judgeUI.defaultTabIndex = 1
-            that.isEndTip = true
-          }
-        } else {
-          await examJudgeEndExam()
-          that.isExamEnd = true
-        }
-      }
-    }
-  }
-}
\ No newline at end of file
diff --git a/entry/src/main/ets/pages/Judge/JudgeIng.ets b/entry/src/main/ets/pages/Judge/JudgeIng.ets
deleted file mode 100644
index 42e2793..0000000
--- a/entry/src/main/ets/pages/Judge/JudgeIng.ets
+++ /dev/null
@@ -1,276 +0,0 @@
-import { JudgeTag } from '../../config';
-import {
-  JudgeCallBackData,
-  JudgeConfigObj,
-  JudgeSound,
-  JudgeUI,
-  KmItem,
-  MarkRule,
-  ProcessDataEnumType,
-  ProjectInfo
-} from '../../model';
-import { dConsole } from '../../utils/LogWorker';
-import VoiceAnnounce from '../judgeSDK/utils/voiceAnnouncements';
-import JudgeBusiness from './JudgeBusiness';
-import { examJudgeArtificialItem, examJudgeSoundEnd } from './JudgeSDKUtils';
-import { ProjectStart, UploadProgressPhoto } from './ProcessDataProcessing';
-import { CurrentProjectConversion, DeductionProjectConversion, DetectingDifferences, GetCarStatus } from './utils';
-
-export const JudgingFn = async (strData: string, callBack: Function, judgeUI: JudgeUI, that: JudgeBusiness) => {
-  let examData: JudgeCallBackData = JSON.parse(strData);
-  const carzt = examData.carzt
-  const xmks = examData.xmks
-  const kf = examData.kf
-  const event = examData.event
-  const xmjs = examData.xmjs
-  const xmqx = examData.xmqx
-  const ksjs = examData.ksjs
-  const sound = examData.sound
-  const mndg = examData.mndg
-  const lane = examData.lane
-  const precast = examData.precast
-  const nongps = examData.nongps
-  //获取项目结束、项目开始代码
-  const xmdm = event == 2 ? xmjs.xmdm : xmks.xmdm
-  const xmxh = event == 2 ? xmjs.xmxh : xmks.xmxh;
-  let artSubject3ProjectsCodesArr: number[] = [3, 9, 4, 10, 12, 11]
-  const isManualProjectIn = artSubject3ProjectsCodesArr.includes(xmdm);
-  const examSubject = judgeUI.examSubject
-  const judgeConfigObj = judgeUI.judgeConfigObj
-  switch (event) {
-  //   项目开始
-    case 1: {
-      const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
-      project.type = '2';
-      if (isManualProjectIn) {
-        //手动项目是否在进行中
-        judgeUI.isManualProjectIn = true
-      }
-      if (xmdm == 41 && examSubject == '3') {
-        that.rmndg = 1
-      }
-      judgeUI.currentXmdm = xmdm;
-      const xmmcStr = project.name || "";
-      const xmmcSingleCode = project.projectCode || "";
-      const xmmcCode = project.projectCodeCenter || "";
-      const kmItem: KmItem = Reflect.get(that.kmItems, xmmcCode)
-      kmItem.status = 2;
-      that.xmmcStr = xmmcStr;
-      that.xmmcCode = xmmcCode;
-      that.xmmcSingleCode = xmmcSingleCode
-      that.xmmcEndCode = xmmcCode
-      that.xmdm = xmdm;
-      that.xmxh = xmxh;
-      judgeUI.isProjectIn = true
-      Reflect.set(judgeUI.projectsObj, xmdm, project)
-      Reflect.set(that.kmItems, xmmcCode || 0, kmItem)
-      break;
-    }
-  //   项目结束
-    case 2: {
-      const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
-      const xmmcCode = project.projectCodeCenter || "";
-      project.type = (xmjs.xmhg === 0 ? '4' : '3')
-      //计算项目是否全部结束
-      judgeUI.isProjectIn = (Reflect.ownKeys(judgeUI.projectsObj).filter((projectKey) => {
-        const fillProject: ProjectInfo = Reflect.get(judgeUI.projectsObj, projectKey)
-        return fillProject.type == '2'
-      }).length) > 0;
-      if (isManualProjectIn) {
-        judgeUI.isManualProjectIn = false
-      }
-      const kmItem: KmItem = Reflect.get(that.kmItems, xmmcCode)
-      kmItem.status = 3;
-      //统计必考项目数量
-      that.xmmcStr = '无';
-      that.xmmcCode = '';
-      that.xmdm = '';
-      judgeUI.currentXmdm = undefined;
-      Reflect.set(judgeUI.projectsObj, xmdm, project)
-      Reflect.set(that.kmItems, xmmcCode, kmItem)
-      break;
-    }
-  //   扣分
-    case 3: {
-      const thisKf = DeductionProjectConversion(`${kf.xmdm}_${kf.kfdm}`, judgeUI.markRuleListObj)
-      const kfObj: MarkRule = {
-        //扣分项目名称
-        xmmcStr: CurrentProjectConversion(kf.xmdm, judgeUI.projectsObj),
-        xmdm: kf.xmdm + "",
-        //扣分描述
-        desc: thisKf.desc,
-        //扣分分数
-        score: thisKf.score,
-        // 扣分无锡所代码
-        markcatalog: thisKf.markcatalog,
-        markserial: thisKf.markserial,
-        kfxh: thisKf.kfxh,
-        //扣分类型
-        type: kf.type
-      }
-      dConsole.log(JudgeTag, "扣分组装", kfObj)
-      that.kfArr?.push(kfObj)
-      dConsole.log(JudgeTag, "扣分类组装", that.kfArr)
-      judgeUI.totalScore += Number(thisKf?.score);
-      if (kf.xmdm != 20) {
-        const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, kf.xmdm)
-        const type = project.type;
-        project.type = (type == '3' || type == '4') ? '4' : '5'
-        Reflect.set(judgeUI.projectsObj, kf.xmdm, project)
-      }
-      break;
-    }
-  // 考试状态
-    case 4: {
-      that.carztStr = GetCarStatus(carzt);
-      break;
-    }
-  //   考试结束
-    case 5: {
-      that.ksjs = ksjs;
-      // await fileLog?.setExamJudgeData(JSON.stringify({
-      //   method: 'examJudgeEndExam'
-      // }))
-      dConsole.writeProcessData(ProcessDataEnumType.JudgeExamData, JSON.stringify({
-        method: 'examJudgeEndExam'
-      }))
-      break;
-    }
-  //   项目取消
-    case 6: {
-      dConsole.info(JudgeTag, '项目取消');
-      const xmdm = xmqx.xmdm;
-      const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
-      const xmmcCode = project.projectCodeCenter || "";
-      project.type = '1'
-      const kmItem: KmItem = Reflect.get(that.kmItems, xmmcCode)
-      Reflect.set(judgeUI.projectsObj, xmdm, project)
-      kmItem.status = 1
-      Reflect.set(that.kmItems, xmmcCode, kmItem)
-      break;
-    }
-  //   语音播报和提示
-    case 7: {
-      goJudgeVoice(sound, that.avPlayer)
-      break;
-    }
-  //   模拟灯光事件
-    case 8: {
-      that.mndgStr = mndg
-      break;
-    }
-  //   车道和路段变化
-    case 9: {
-      judgeUI.lane = lane
-      that.lane = lane;
-      break;
-    }
-  //   预进项目事件
-    case 10: {
-      const xmdm = precast.xmdm
-      const xmxh = precast.xmxh
-      const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
-      const xmmcCode: string = judgeUI.projectsObj[xmdm].projectCodeCenter;
-      const xmmcSingleCode: string = judgeUI.projectsObj[xmdm].projectCode;
-      const kmItem: KmItem = Reflect.get(that.kmItems, xmmcCode)
-      const xmmcStr = project?.name || "";
-      kmItem.status = 2;
-      Reflect.set(that.kmItems, xmmcCode, project)
-      that.xmmcStr = xmmcStr || "";
-      that.xmmcCode = xmmcCode || "";
-      that.xmdm = xmdm;
-      that.xmxh = xmxh;
-      that.xmmcSingleCode = xmmcSingleCode || "";
-      project.type = '2';
-      Reflect.set(judgeUI.projectsObj, xmdm, project)
-    }
-  //   差分事件
-    case 11: {
-      DetectingDifferences(nongps.type, that.avPlayer)
-      break;
-    }
-    default:
-      break;
-  }
-  await callBack({
-    //项目名称   考车状态   扣分arr
-    xmmcStr: that.xmmcStr, carztStr: that.carztStr, kfArr: that.kfArr
-  });
-
-}
-
-const goJudgeVoice = async (sound: JudgeSound, avPlayer: VoiceAnnounce) => {
-  dConsole.info('surenjun code=>', JSON.stringify(sound.code))
-  //判断是不是模拟灯光语音
-  if (sound.type == 1) {
-    avPlayer?.playAudio([`voice/${sound.code[0]}.mp3`], false, () => {
-      examJudgeSoundEnd({
-        xmdm: sound.xmdm, code: sound.code[0], type: sound.type
-      })
-      dConsole.writeProcessData(ProcessDataEnumType.JudgeExamData, JSON.stringify({
-        method: 'examJudgeSoundEnd',
-        itemno: sound.xmdm,
-        code: sound.code[0],
-        type: sound.type,
-      }))
-    })
-  } else {
-    avPlayer?.playAudio([`voice/${sound.code[0]}.mp3`])
-  }
-}
-
-
-export const SetJudgeItem = async (itemno: string, type: 1 | 2) => {
-  await examJudgeArtificialItem(Number(itemno), type);
-  const str = JSON.stringify({
-    method: 'examJudgeArtificialItem',
-    itemno: Number(itemno),
-    type
-  })
-  dConsole.writeProcessData(ProcessDataEnumType.JudgeExamData, str)
-  dConsole.info(JudgeTag, `人工评判${type == 1 ? '进入' : '取消'}项目-${itemno}`)
-}
-
-/**
- * 改变考试状态
- * old goVoiceAnnounce
- * @param event
- * @param xmdm
- * @param kf
- * @param judgeUI
- * @param that
- */
-const changeExamStatus = async (event: number, xmdm: number, kf: MarkRule[], judgeUI: JudgeUI, that: JudgeBusiness) => {
-  switch (event) {
-    case 1: {
-      const param512: JudgeConfigObj = (Reflect.get(judgeUI.judgeConfigObj, '512') || '').split(',');
-      const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
-      setTimeout(() => {
-        if (Reflect.get(param512, 7) != 0) {
-          clearTimeout(that.deductedPopShowTimer)
-          judgeUI.isDeductedPopShow = true
-        }
-      }, 200)
-      if (!project.isEnd) {
-        // that.judgeTask.addTask(async () => {
-        //   dConsole.info(JudgeTag, `项目开始-${xmdm}-${project.name}`)
-        //   await beginProject(xmdm)
-        // }, {
-        //   isDelay: true
-        // })
-        ProjectStart(xmdm, that.xmxh, judgeUI)
-        // that.judgeTask.addTask(async () => {
-        //   dConsole.info(JudgeTag, `项目-${xmdm}-上传照片 start`)
-        //   await uploadProgressPhoto(xmdm)
-        // }, {
-        //   isDelay: true
-        // })
-        UploadProgressPhoto(xmdm, that.plcData, judgeUI)
-      }
-      break;
-    }
-    case 2: {
-      break;
-    }
-  }
-}
\ No newline at end of file
diff --git a/entry/src/main/ets/pages/Judge/JudgeSDKUtils.ets b/entry/src/main/ets/pages/Judge/JudgeSDKUtils.ets
index c6692e2..2167621 100644
--- a/entry/src/main/ets/pages/Judge/JudgeSDKUtils.ets
+++ b/entry/src/main/ets/pages/Judge/JudgeSDKUtils.ets
@@ -115,8 +115,6 @@ export async function examJudgeBeginExam(data: JudgeBeginObj) {
 }
 
 
-
-
 /*
  * @desc结束考试
  *
@@ -205,7 +203,7 @@ async function handle(temp: number, fnName: string): Promise {
     if (temp == 0) {
       resolve(temp);
     } else {
-      dConsole.error('surenjun error:' + `调用c++函数 ${fnName} 异常:` + libJudgeSdk.examJudgeErrorInfo(temp * 1))
+      dConsole.error('error:' + `调用c++函数 ${fnName} 异常:` + libJudgeSdk.examJudgeErrorInfo(temp * 1))
       reject(temp)
     }
   })
diff --git a/entry/src/main/ets/pages/Judge/JudgeStart.ets b/entry/src/main/ets/pages/Judge/JudgeStart.ets
deleted file mode 100644
index bad0c84..0000000
--- a/entry/src/main/ets/pages/Judge/JudgeStart.ets
+++ /dev/null
@@ -1,249 +0,0 @@
-//开始评判
-import { JudgeConfig, JudgeTag } from '../../config';
-import {
-  BaseInfoType,
-  CARINFO,
-  CarInfoType,
-  CDSBInfo,
-  ExaminerInfoType,
-  ItemInfo,
-  ItemInfos,
-  JudgeBeginObj,
-  JudgeInitObj,
-  JudgeKFXM,
-  JudgeKSXM,
-  JudgeUI,
-  Km3JudgeInitConfig,
-  MAPITEMPOINTITEM,
-  MAPPOINT,
-  MarkRule,
-  ProcessDataEnumType,
-  ProjectInfo,
-  RouteParamsType,
-  SyssetConfig,
-  SYSTEMPARMARR
-} from '../../model';
-import common from '@ohos.app.ability.common';
-import { dConsole } from '../../utils/LogWorker';
-import {
-  examJudgeBeginExam,
-  examJudgeInit,
-  examJudgeSetLogCallback,
-  examJudgeSetPerformCallback,
-  examJudgeSetRealExamCallback,
-  examJudgeVersion
-} from './JudgeSDKUtils';
-import FileModel from '../judgeSDK/utils/fileModel';
-import JudgeBusiness from './JudgeBusiness';
-import { saveStartRecordVideo } from '../../utils/Video';
-import router from '@ohos.router';
-import systemTime from '@ohos.systemTime';
-
-export const JudgeStartFn = async (callBack: Function, judgeUI: JudgeUI, that: JudgeBusiness) => {
-  const name = judgeUI.name
-  const kssycs = judgeUI.kssycs
-  const manualMarkRules = judgeUI.manualMarkRules
-  // 处理单机模式
-  const isTrajectoryOpen = JudgeConfig.isTrajectoryOpen;
-  const isJudgeInitBool = AppStorage.get('isJudgeInitBool');
-  const trajectoryPath = JudgeConfig.trajectoryPath;
-  let strArr: string[] = [];
-  if (isTrajectoryOpen) {
-    const folderPath = await that.fileUtil.initFolder(trajectoryPath);
-    const str: string = await that.fileUtil.readFile(folderPath)
-    strArr = str.split('\n')
-  }
-  //日志回调
-  dConsole.info(JudgeTag, '1.进入评判入口')
-  await examJudgeSetLogCallback(6, async (level: number, info: string, len: number) => {
-    dConsole.log(JudgeTag, '评判日志:' + info)
-    dConsole.writeProcessData(ProcessDataEnumType.JudgeLogData, info)
-  })
-
-  dConsole.info(JudgeTag, '2.注册日志回调完成')
-
-  let initInfo: JudgeInitObj = isTrajectoryOpen ? JSON.parse(strArr[0]) : await GetJudgeInitData(judgeUI.context, judgeUI.markRuleListObj, judgeUI.carType, judgeUI.carName, judgeUI.systemparmArr, judgeUI.carinfoArr, judgeUI.examSubject, judgeUI.itemInfoObj, judgeUI.judgeConfig, judgeUI.carlist, judgeUI.mapPointArr, judgeUI.mapPointItemArr);
-  //相关评判初始化只做一次
-  if (!isJudgeInitBool) {
-    dConsole.log(JudgeTag, "评判初始化参数", initInfo)
-    await examJudgeInit(initInfo);
-    AppStorage.setOrCreate('isJudgeInitBool', true)
-    dConsole.info(JudgeTag, '4.评判初始化完成')
-  }
-  AppStorage.setOrCreate('isJudge', true)
-  // 2.评判过程回调
-  await examJudgeSetRealExamCallback(async (strData: string, len: number) => {
-    // 评判回调日志
-    dConsole.writeProcessData(ProcessDataEnumType.JudgeProgressCallbackData, strData)
-    dConsole.info(JudgeTag, '评判回调数据', strData)
-    await that.Judging(strData, callBack)
-  })
-  await examJudgeSetPerformCallback(async (info: string) => {
-    dConsole.info('评判实时数据', info)
-    that.performInfo = JSON.parse(info)
-    const jl = Math.floor((that.performInfo.qjjl + that.performInfo.dcjl) / 100);
-    if (jl > Number(judgeUI.examMileage)) {
-      that.JudgeEnd()
-    }
-    judgeUI.jl = jl
-    judgeUI.laneSignal = that.performInfo.lane
-  })
-  let beginExamInfo: JudgeBeginObj | undefined = undefined
-  // 3.开始考试
-  if (isTrajectoryOpen) {
-    beginExamInfo = JSON.parse(strArr[1])
-    beginExamInfo && (beginExamInfo.replay = 1)
-  } else {
-    beginExamInfo = await GetJudgeBeginData(judgeUI.projects, judgeUI.carType, judgeUI.kssycs, judgeUI.isDdxk, judgeUI.ddxkTime, judgeUI.projectsCenterObj, judgeUI.ddxkKsxmArr, judgeUI.ddxkKfArr, judgeUI.passingScore, judgeUI.wayno, judgeUI.name, judgeUI.lsh, judgeUI.idCard, that.isExam)
-  }
-  if (beginExamInfo) {
-    await examJudgeBeginExam(beginExamInfo);
-  }
-  dConsole.info(JudgeTag, '6.开始考试注册完成')
-  that.avPlayer?.playAudio([judgeUI.singlePlay ? 'voice/ksks.wav' : 'voice/监管成功.mp3'])
-  if (!judgeUI.singlePlay) {
-    that.videoData = await saveStartRecordVideo(`${name}_${kssycs}`, that.context)
-  }
-  judgeUI.draw = true
-  // 处理单机泡轨迹模式
-  if (isTrajectoryOpen) {
-    that.SingleMachineTrajectory(strArr)
-    return
-  }
-}
-
-// 获取评判开始考试数据
-const GetJudgeBeginData = async (projects: ProjectInfo[], carType: string, kssycs: string, isDdxk: boolean, ddxkTime: number, projectsCenterObj: Object, ddxkKsxmArr: string[], ddxkKfArr: string[], passingScore: number, wayno: number, name: string, lsh: string, idCard: string, isExam: boolean) => {
-  const examinerInfo = AppStorage.get('examinerInfo')
-  const examinerName = examinerInfo?.name || ""
-  let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
-  const sczb = currentParams.sczb;
-  const kfdm = currentParams.kfdm;
-  const ksxm: JudgeKSXM[] = projects.map(project => {
-    const temp: JudgeKSXM = {
-      xmdm: Number(project.projectCode), xmxh: ''
-    }
-    return temp
-  })
-  const ykxm: number[] = (ddxkKsxmArr?.map(projectCenterCode => {
-    const currentProject: ProjectInfo = Reflect.get(projectsCenterObj, projectCenterCode)
-    return Number(currentProject.projectCode)
-  })) || [];
-  const kfxm: JudgeKFXM[] = isDdxk ? (ddxkKfArr?.map(kf => {
-    return {
-      xmdm: Number(kf.split(',')[0]), kfdm: kf.split(',')[1]
-    } as JudgeKFXM
-  })) : []
-  const beginInfo: JudgeBeginObj = {
-    kgid: '012',
-    kgxm: decodeURI(examinerName || ''),
-    exam: isExam ? 1 : 0,
-    //是否回放
-    replay: 0,
-    //生成的轨迹文件
-    track: '',
-    xm: name,
-    sex: 0,
-    kslsh: lsh,
-    sfzmhm: idCard,
-    ksyy: '',
-    kscx: carType,
-    kkcs: Number(kssycs) || 2,
-    sfyk: 0,
-    ykkkcs: 1,
-    wayno: Number(wayno),
-    czlx: 0,
-    kskssj: await systemTime.getCurrentTime(),
-    passing: Number(passingScore),
-    ksxm,
-    //断点续考
-    ddxk: isDdxk ? 1 : 0,
-    ddkssj: ddxkTime || 0,
-    ykxm,
-    kfxm,
-    yklc: 0,
-    special: [],
-    sczb: (sczb === undefined || sczb == '0') ? 0 : 1,
-    sczbkf: kfdm,
-    dmndg: false,
-    mfxx: false,
-    mfxxn: false
-  }
-  dConsole.info(JudgeTag, '5.获取开始考试数据完成')
-  return beginInfo
-}
-
-// 获取评判初始化数据
-const GetJudgeInitData = async (context: common.UIAbilityContext, markRuleListObj: object, carType: string, carName: string, systemparmArr: SYSTEMPARMARR[], carinfoArr: CARINFO[], examSubject: string, itemInfoObj: ItemInfos, judgeConfig: SyssetConfig[], carlist: string, mapPointArr: MAPPOINT[], mapPointItemArr: MAPITEMPOINTITEM[]) => {
-  const carInfo = AppStorage.get('carInfo');
-  const examType = carInfo?.examSubject == '2' ? 'km2' : 'km3'
-
-  let allitems: ItemInfo[] = [];
-  if (examSubject == '2' && itemInfoObj) {
-    allitems = Reflect.ownKeys(itemInfoObj).map(cdsbKey => {
-      const cdsb: CDSBInfo = Reflect.get(itemInfoObj, cdsbKey);
-      const model = GetModelData(`${examType}/${cdsb.modelKey}.txt`, context)
-      const temp: ItemInfo = {
-        xmdm: cdsb?.xmdm || 0,
-        xmxh: cdsb?.xmxh || "",
-        model: model || ""
-      }
-      return temp
-    })
-  }
-
-  //获取版本号
-  const mark: MarkRule[] = Reflect.ownKeys(markRuleListObj).map(ruleKey => {
-    const current: MarkRule = Reflect.get(markRuleListObj, ruleKey)
-    return current
-  })
-  const initInfo: JudgeInitObj = {
-    sdkver: await examJudgeVersion(),
-    appver: AppStorage.get('baseInfo')?.version || "",
-    kskm: Number(carInfo?.examSubject || "2"),
-    kchp: carInfo?.plateNo || "",
-    kchm: Number(carInfo?.carId || ""),
-    kscx: carType,
-    cxcode: '1',
-    name: carName,
-    carmodel: GetModelData(`${examType}/${carType}.txt`, context) || "",
-    allitems,
-    iteminfo: [],
-    systemparm: systemparmArr,
-    mark,
-    sysset: judgeConfig,
-    itemInfoObj,
-    carlist: carlist,
-    carinfo: carinfoArr,
-  };
-  let km3Config: Km3JudgeInitConfig = {}
-  if (examSubject == '3') {
-    km3Config = {
-      map_point: mapPointArr,
-      map_point_item: mapPointItemArr,
-      //科目三暂时为空
-      iteminfo: [],
-      roads: GetModelData('km3/Roads.txt', context) || "",
-      sharps: GetModelData('km3/Sharps.txt', context) || ""
-    };
-    initInfo.map_point = km3Config.map_point
-    initInfo.map_point_item = km3Config.map_point_item
-    initInfo.iteminfo = km3Config.iteminfo
-    initInfo.roads = km3Config.roads
-    initInfo.sharps = km3Config.sharps
-  }
-  // 获取科目三的评判配置
-  dConsole.info(JudgeTag, '3.获取评判初始化数据完成')
-  return initInfo
-}
-
-export const GetModelData = (modelName: string, context: common.UIAbilityContext): string => {
-  try {
-    return new FileModel(context).getModelContent(JudgeConfig.modelPath, modelName);
-  } catch (e) {
-    // 可根据实际需求,返回空字符串或抛出异常
-    dConsole.error(JudgeTag, `获取模型数据失败: ${modelName}`, e.message)
-    return '';
-  }
-};
-
diff --git a/entry/src/main/ets/pages/Judge/LargeJudgeBusiness.ets b/entry/src/main/ets/pages/Judge/LargeJudgeBusiness.ets
new file mode 100644
index 0000000..ef53d82
--- /dev/null
+++ b/entry/src/main/ets/pages/Judge/LargeJudgeBusiness.ets
@@ -0,0 +1,469 @@
+import { JudgeConfig, JudgeTag } from '../../config';
+import {
+  BaseInfoType,
+  CAR_INFO,
+  CarInfoType,
+  CDSBInfo,
+  ExaminerInfoType,
+  ItemInfo,
+  ItemInfos,
+  JudgeBeginObj,
+  JudgeCallBackData,
+  JudgeInitObj,
+  JudgeKFXM,
+  JudgeKSXM,
+  Km3JudgeInitConfig,
+  MAPITEMPOINTITEM,
+  MAPPOINT,
+  MarkRule,
+  Project,
+  ProjectInfo,
+  ProjectInfos,
+  RouteParamsType,
+  SyssetConfig,
+  SYSTEM_PARAM,
+  EnvironmentConfigurationType
+} from '../../model';
+import common from '@ohos.app.ability.common';
+import { dConsole } from '../../utils/LogWorker';
+import { examJudgeVersion } from './JudgeSDKUtils';
+import JudgeBusiness from './JudgeBusiness';
+import router from '@ohos.router';
+import { GetModelData } from './utils';
+import { BaseJudge, BaseJudgeImpl, GetSysSetResult } from './BaseJudgeBussines';
+import { GetSyncData } from '../../utils/table/Operation';
+import promptAction from '@ohos.promptAction';
+import { JudgePage } from '../Judge';
+import systemDateTime from '@ohos.systemDateTime';
+import { testKm2Items, testKm3Items } from '../../mock';
+
+export class LargeJudge extends BaseJudge implements BaseJudgeImpl {
+  private mockLight: boolean = false
+  private mode: number = 1
+
+  getIsUdpEnd(): boolean {
+    return super.getIsUdpEnd()
+  }
+
+  private async GetJudgeBeginData(projects: Project[], carType: string, kssycs: string, isDdxk: boolean, ddxkTime: number, projectsCenterObj: Object, ddxkKsxmArr: string[], ddxkKfArr: string[], passingScore: number, wayno: number, name: string, lsh: string, idCard: string, isExam: boolean) {
+    const examinerInfo = AppStorage.get('examinerInfo')
+    const examinerName = examinerInfo?.name || ""
+    let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
+    const sczb = currentParams.sczb;
+    const kfdm = currentParams.kfdm;
+    const ksxm: JudgeKSXM[] = projects.map(project => {
+      const temp: JudgeKSXM = {
+        xmdm: Number(project.projectCode), xmxh: ''
+      }
+      return temp
+    })
+    const ykxm: number[] = (ddxkKsxmArr?.map(projectCenterCode => {
+      const currentProject: ProjectInfo = Reflect.get(projectsCenterObj, projectCenterCode)
+      return Number(currentProject.projectCode)
+    })) || [];
+    const kfxm: JudgeKFXM[] = isDdxk ? (ddxkKfArr?.map(kf => {
+      return {
+        xmdm: Number(kf.split(',')[0]), kfdm: kf.split(',')[1]
+      } as JudgeKFXM
+    })) : []
+    const beginInfo: JudgeBeginObj = {
+      kgid: '012',
+      kgxm: decodeURI(examinerName || ''),
+      exam: isExam ? 1 : 0,
+      //是否回放
+      replay: 0,
+      //生成的轨迹文件
+      track: '',
+      xm: name,
+      sex: 0,
+      kslsh: lsh,
+      sfzmhm: idCard,
+      ksyy: '',
+      kscx: carType,
+      kkcs: Number(kssycs) || 2,
+      sfyk: 0,
+      ykkkcs: 1,
+      wayno: Number(wayno),
+      czlx: 0,
+      kskssj: await systemDateTime.getCurrentTime(),
+      passing: Number(passingScore),
+      ksxm,
+      //断点续考
+      ddxk: isDdxk ? 1 : 0,
+      ddkssj: ddxkTime || 0,
+      ykxm,
+      kfxm,
+      yklc: 0,
+      special: [],
+      sczb: (sczb === undefined || sczb == '0') ? 0 : 1,
+      sczbkf: kfdm,
+      dmndg: this.mockLight,
+      mfxx: this.mode === 5,
+      zeng: this.mode === 3 || this.mode === 4
+    }
+    dConsole.info(JudgeTag, '5.获取开始考试数据完成')
+    return beginInfo
+  };
+
+  private async GetJudgeInitData(context: common.UIAbilityContext, markRuleListObj: object, carType: string, carName: string, systemparmArr: SYSTEM_PARAM[], carinfoArr: CAR_INFO[], examSubject: string, itemInfoObj: ItemInfos, judgeConfig: SyssetConfig[], carlist: string, mapPointArr: MAPPOINT[], mapPointItemArr: MAPITEMPOINTITEM[]) {
+    const carInfo = AppStorage.get('carInfo');
+
+    let allitems: ItemInfo[] = [];
+    if (examSubject == '2' && itemInfoObj) {
+      const promiseItems = Reflect.ownKeys(itemInfoObj).map(async cdsbKey => {
+        const cdsb: CDSBInfo = Reflect.get(itemInfoObj, cdsbKey);
+        const model = await GetModelData(`/${cdsb.modelKey}.txt`, context);
+        const temp: ItemInfo = {
+          xmdm: cdsb?.xmdm || 0,
+          xmxh: cdsb?.xmxh || "",
+          model: model || ""
+        };
+        return temp;
+      });
+      // 等待所有的 Promise 解析完成
+      allitems = await Promise.all(promiseItems);
+    }
+
+    const mark: MarkRule[] = Object.values(markRuleListObj)
+    const initInfo: JudgeInitObj = {
+      sdkver: await examJudgeVersion(),
+      appver: AppStorage.get('EnvironmentConfigurationType')?.version || "",
+      kskm: Number(carInfo?.examSubject || "2"),
+      kchp: carInfo?.plateNo || "",
+      kchm: Number(carInfo?.carId || ""),
+      kscx: carType,
+      cxcode: '1',
+      name: carName,
+      carmodel: await GetModelData(`/${carType}.txt`, context) || "",
+      allitems,
+      iteminfo: [],
+      systemparm: systemparmArr,
+      mark,
+      sysset: judgeConfig,
+      itemInfoObj,
+      carlist: carlist,
+      carinfo: carinfoArr,
+    };
+    let km3Config: Km3JudgeInitConfig = {}
+    if (examSubject == '3') {
+      km3Config = {
+        map_point: mapPointArr,
+        map_point_item: mapPointItemArr,
+        //科目三暂时为空
+        iteminfo: [],
+        roads: await GetModelData('/Roads.txt', context) || "",
+        sharps: await GetModelData('/Sharps.txt', context) || ""
+      };
+      initInfo.map_point = km3Config.map_point
+      initInfo.map_point_item = km3Config.map_point_item
+      initInfo.iteminfo = km3Config.iteminfo
+      initInfo.roads = km3Config.roads
+      initInfo.sharps = km3Config.sharps
+    }
+    // 获取科目三的评判配置
+    dConsole.info(JudgeTag, '3.获取评判初始化数据完成')
+    return initInfo
+  };
+
+  public async JudgeInit(judgeUI: JudgePage, that: JudgeBusiness): Promise {
+    const systemParams = await GetSyncData('MA_SYSTEMPARM')
+    let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
+    this.mode = currentParams.mode || 1
+    let totalScore: number = 100
+    let wayno: number = 1
+    let carlist: string = ""
+    let passingScore: number = 90
+    let examMileage: string = ""
+    let projectsObj: ProjectInfos = {}
+    let projectsCenterObj: ProjectInfos = {}
+    let ddxkKsxmArr: Array = []
+    let singlePlay: boolean = AppStorage.get("singlePlay")!
+    let systemparmArr: Array = []
+    let projects: Array = []
+    let examSubject: string = AppStorage.get('carInfo')!.examSubject!
+    if (this.mode === 2) {
+      totalScore = Number(currentParams.score) || 100
+    }
+    if (singlePlay) {
+      wayno = Number(currentParams.wayno) || 1;
+    }
+    //真实监管下发的项目
+    let kStringArr: string[] = (currentParams.kString?.split(',') || []).filter(item => item);
+    // 单机模式下增驾进模拟灯光
+    this.mockLight = kStringArr.includes("41700") || singlePlay && this.mode === 3
+
+    let isInExam = kStringArr.length > 0;
+
+    // const {isTrajectoryOpen} = judgeConfig
+
+    let carNo = '', allItems: string[] = [];
+    systemParams.forEach((systemParam: SYSTEM_PARAM) => {
+      const no1 = systemParam.no1;
+      const no2 = systemParam.no2;
+      const no3 = systemParam.no3;
+
+      const txt1 = decodeURI(systemParam.txt1 || "")
+      //获取当前考车的no2
+      if (no1 === "3" && no3 === "1" && txt1 === judgeUI.carName) {
+        carNo = no2!
+        carlist = carNo
+      }
+      //获取及格分数线
+      if (no1 === "3" && no3 === "3" && carNo === no2) {
+        passingScore = Number(txt1) || 0;
+      }
+      //根据车型获取应行驶里程数
+      if (no1 === "3" && no3 === "15" && carNo === no2) {
+        let mileage = (decodeURI(systemParam.txt1 || '')).split('^')
+        if (this.mode === 1) {
+          examMileage = mileage[1]
+        } else if (this.mode === 2) {
+          examMileage = mileage[2]
+        } else {
+          examMileage = mileage[0]
+        }
+      }
+      // 满分学习里程
+      if (this.mode === 5 && no1 === "3" && no2 === carNo && no3 === "63") {
+        let data = decodeURI(systemParam.txt1 || "")?.split("^")
+        examMileage = data[1] || examMileage
+      }
+      //获取当前考车的考试项目
+      if (this.mode === 2 && no1 === "3" && no2 === carNo && no3 === "46") {
+        // 夜考必考项目读取
+        allItems = decodeURIComponent(systemParam.txt1 || "").split(',').filter(txt => txt !== '')
+      } else if (this.mode !== 2 && no1 === "3" && no2 === carNo && no3 === "10") {
+        // 其他模式必考项目获取
+        allItems = decodeURIComponent(systemParam.txt1 || "").split(',').filter(txt => txt !== '')
+      } else if (this.mode == 5 && no1 === "3" && no2 === carNo && no3 === "63") {
+        // 满分学习项目
+        let data = decodeURI(systemParam.txt1 || "")?.split("^")
+        allItems = data[0]?.split(",").filter(item => item !== "") || []
+      }
+    })
+    systemParams.forEach((systemParam) => {
+      if (JudgeConfig.isTrajectoryOpen) {
+        systemParam.no1 = systemParam.NO1!.toString()!;
+        systemParam.no2 = systemParam.NO2!.toString()!;
+        systemParam.no3 = systemParam.NO3!.toString()!;
+        systemParam.txt1 = systemParam.TXT1!;
+        systemParam.txt2 = systemParam.TXT2!;
+        systemParam.txt3 = systemParam.TXT3!;
+      }
+      const no1 = systemParam.no1;
+      const no2 = systemParam.no2;
+      const no3 = systemParam.no3;
+      const txt2 = decodeURI(systemParam.txt2 || "")
+
+      if (no1 === "6") {
+        const name = decodeURI(systemParam.txt1 || "")
+        // 白考过滤掉夜间行驶
+        if (this.mode !== 2 && no2 === "13") {
+          return
+        }
+        // 模拟夜间驾驶(灯光)
+        if (!this.mockLight && no2 === "41") {
+          return
+        }
+        let isRequired = (this.mode === 5 && allItems.length === 0) || allItems.includes(no2 + '')
+        let isEnd = false
+        let isUpload = false
+
+        // 夜考除夜间行驶其他项目不需要重复上传
+        if (this.mode === 2 && no2 !== "13") {
+          isUpload = true
+        }
+        // 加减档自动完成,为非必须项目
+        if (no2 === "14") {
+          isRequired = false
+        }
+        const currentProject: Project = {
+          name,
+          abbreviation: decodeURI(systemParam.txt3 || ""),
+          projectCode: no2 + '',
+          projectCodeCenter: txt2,
+          // 白考夜间行驶非必考
+          isRequired,
+          //是否考过了
+          isEnd,
+          //项目开始数据是否上传过
+          isUpload,
+        }
+        // 夜考时
+        if (this.mode === 2 && no2 !== "13") {
+          currentProject.ykType = isRequired ? "1" : "3"
+          currentProject.isEnd = !allItems.includes(no2 + '')
+        }
+        Reflect.set(projectsObj, no2!, currentProject)
+        Reflect.set(projectsCenterObj, no2!, currentProject)
+        projects.push(currentProject);
+        // 真实监管下发考试项目, 夜考模式不进此逻辑
+        if (isInExam && this.mode !== 2 && !(kStringArr.includes(txt2) || kStringArr.includes(no2 + ''))) {
+          let temp: ProjectInfo = Reflect.get(projectsObj, no2!)
+          temp.type = '3'
+          temp.isUpload = true
+          temp.isEnd = true
+          Reflect.set(projectsObj, no2!, temp)
+
+          temp = Reflect.get(projectsCenterObj, txt2!)
+          temp.type = '3'
+          temp.isUpload = true
+          temp.isEnd = true
+          Reflect.set(projectsCenterObj, txt2!, temp)
+
+          ddxkKsxmArr.push(txt2)
+        }
+      }
+      systemparmArr.push({
+        NO1: Number(no1),
+        NO2: Number(no2),
+        NO3: Number(no3),
+        TXT1: decodeURIComponent(systemParam.txt1 || ""),
+        TXT2: decodeURIComponent(systemParam.txt2 || ""),
+        TXT3: decodeURIComponent(systemParam.txt3 || ""),
+      })
+    })
+    if (!projects.length) {
+      promptAction.showToast({
+        message: '读取数据库信息失败,请重新联网更新!',
+        duration: 8000
+      });
+      router.back();
+    }
+    (examSubject === '2' ? testKm2Items : testKm3Items).forEach(item => {
+      let project: ProjectInfo = Reflect.get(judgeUI.projectsCenterObj, item.code)
+      Reflect.set(that.kmItems, item.code, {
+        code: item.code,
+        status: project === undefined ? 0 : (project.isEnd ? 3 : 1)
+      })
+    })
+
+    return {
+      totalScore,
+      wayno,
+      carlist,
+      passingScore,
+      examMileage,
+      projectsObj,
+      projectsCenterObj,
+      ddxkKsxmArr,
+      singlePlay,
+      systemparmArr,
+      projects,
+    }
+  }
+
+  public async JudgeStart(callBack: Function, judgeUI: JudgePage, that: JudgeBusiness) {
+    const isTrajectoryOpen = JudgeConfig.isTrajectoryOpen;
+    const trajectoryPath = JudgeConfig.trajectoryPath;
+    let strArr: string[] = [];
+    if (isTrajectoryOpen) {
+      const folderPath = await that.fileUtil.initFolder(trajectoryPath);
+      const str: string = await that.fileUtil.readFile(folderPath)
+      strArr = str.split('\n')
+    }
+    let initInfo: JudgeInitObj = isTrajectoryOpen ? JSON.parse(strArr[0]) : await this.GetJudgeInitData(judgeUI.context, judgeUI.markRuleListObj, judgeUI.carType, judgeUI.carName, judgeUI.systemparmArr, judgeUI.carinfoArr, judgeUI.examSubject, judgeUI.itemInfoObj!, judgeUI.judgeConfig, judgeUI.carlist, judgeUI.mapPointArr, judgeUI.mapPointItemArr);
+    let beginExamInfo: JudgeBeginObj | undefined = undefined
+
+    if (isTrajectoryOpen) {
+      beginExamInfo = JSON.parse(strArr[1])
+      beginExamInfo && (beginExamInfo.replay = 1)
+    } else {
+      beginExamInfo = await this.GetJudgeBeginData(judgeUI.projects, judgeUI.carType, judgeUI.kssycs, judgeUI.isDdxk, judgeUI.ddxkTime, judgeUI.projectsCenterObj, judgeUI.ddxkKsxmArr, judgeUI.ddxkKfArr, judgeUI.passingScore, judgeUI.wayno, judgeUI.name, judgeUI.lsh, judgeUI.idCard, that.isExam)
+    }
+    super.judgeStart(callBack, judgeUI, that, beginExamInfo!, initInfo)
+  };
+
+  public async Judging(strData: string, callBack: Function, judgeUI: JudgePage, that: JudgeBusiness) {
+    let examData: JudgeCallBackData = JSON.parse(strData);
+    const xmks = examData.xmks
+    const kf = examData.kf
+    const event = examData.event
+    const xmjs = examData.xmjs
+
+    const xmdm = event == 2 ? xmjs.xmdm : xmks.xmdm
+
+    switch (event) {
+    // 项目开始
+      case 1: {
+        if (this.mode === 2) {
+          const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
+          project.ykType = '2';
+          Reflect.set(judgeUI.projectsObj, xmdm, project)
+        }
+        break;
+      }
+    // 项目结束
+      case 2: {
+        if (this.mode === 2) {
+          const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
+          project.ykType = xmjs.xmhg === 0 ? '4' : '3';
+          Reflect.set(judgeUI.projectsObj, xmdm, project)
+        }
+        break;
+      }
+    // 扣分
+      case 3: {
+        if (kf.xmdm != 20) {
+          const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, kf.xmdm)
+          const type = project.type;
+          if (this.mode === 2) {
+            project.ykType = (type === "3" || type === "4") ? '4' : '5';
+            Reflect.set(judgeUI.projectsObj, kf.xmdm, project)
+          }
+        }
+        break;
+      }
+    // 考试状态
+      case 4: {
+        break;
+      }
+    // 考试结束
+      case 5: {
+        break;
+      }
+    // 项目取消
+      case 6: {
+        if (this.mode === 2) {
+          const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
+          project.ykType = '1';
+          Reflect.set(judgeUI.projectsObj, xmdm, project)
+        }
+        break;
+      }
+    // 语音播报和提示
+      case 7: {
+        break;
+      }
+    // 模拟灯光事件
+      case 8: {
+        break;
+      }
+    // 车道和路段变化
+      case 9: {
+        break;
+      }
+    // 预进项目事件
+      case 10: {
+        if (this.mode === 2) {
+          const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
+          project.ykType = '2';
+          Reflect.set(judgeUI.projectsObj, xmdm, project)
+        }
+      }
+    // 差分事件
+      case 11: {
+        break;
+      }
+      default:
+        break;
+    }
+    super.judging(strData, callBack, judgeUI, that)
+  }
+
+  public async JudgeEnd(judgeUI: JudgePage, that: JudgeBusiness, isManual?: boolean) {
+    super.judgeEnd(judgeUI, that, isManual)
+  };
+
+
+}
\ No newline at end of file
diff --git a/entry/src/main/ets/pages/Judge/ProcessDataProcessing.ets b/entry/src/main/ets/pages/Judge/ProcessDataProcessing.ets
index 734dfde..4486db3 100644
--- a/entry/src/main/ets/pages/Judge/ProcessDataProcessing.ets
+++ b/entry/src/main/ets/pages/Judge/ProcessDataProcessing.ets
@@ -1,30 +1,32 @@
 /**
  * 过程数据处理
  */
-import { ProcessDataTag } from '../../config';
+import { ExamProcessDataTag, JudgeTag, ProcessDataTag, QueueTag } from '../../config';
 import {
   CarInfoType,
   CDSBInfo,
   CDSBInfos,
   DrvexamType,
-  JudgeUI,
   MarkRule,
   PLCType,
+  ProgressCallback,
   ProjectInfo,
   RegulatoryInterfaceParams
 } from '../../model';
 import { GetPhotoBase64 } from '../../utils/Common';
 import dayTs from '../../utils/Date';
 import { dConsole } from '../../utils/LogWorker';
+import { JudgePage } from '../Judge';
+import JudgeBusiness from './JudgeBusiness';
 import { ProcessDataTaskPoolInstance } from './ProcessDataTaskPool';
 
 /**
  * beginProject 项目开始
  */
-export const ProjectStart = (ksxm: number, xmxh: string, judgeUI: JudgeUI) => {
-  const carInfo = AppStorage.get('carInfo');
+export const ProjectStart = (ksxm: number, xmxh: string, judgeUI: JudgePage) => {
+  const carInfo = AppStorage.get('carInfo')!;
   const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, ksxm)
-  const sbxh = getSBXH(ksxm, xmxh, judgeUI.cdsbInfoObj, judgeUI.projectsObj, carInfo.examSubject);
+  const sbxh = getSBXH(ksxm, xmxh, judgeUI.cdsbInfoObj!, judgeUI.projectsObj, carInfo.examSubject!);
   const drvexam: DrvexamType = {
     lsh: judgeUI.lsh,
     kskm: carInfo?.examSubject || "2",
@@ -38,20 +40,21 @@ export const ProjectStart = (ksxm: number, xmxh: string, judgeUI: JudgeUI) => {
     kssj: dayTs().format("YYYY-MM-DD HH:mm:ss")
   }
   const data: RegulatoryInterfaceParams = {
+    JGHOST: AppStorage.get("JGHOST") || "",
     //系统类别   接口序列号             接口标识
     xtlb: '17',
     jkxlh: judgeUI.serialNumber,
     jkid: '17C52',
     drvexam
   }
-  dConsole.log(ProcessDataTag, "项目开始数据处理", data)
+  dConsole.log(ProcessDataTag, QueueTag, ExamProcessDataTag, "项目开始数据处理", data)
   ProcessDataTaskPoolInstance.addTask(data)
 }
 
 /**
  * uploadProgressPhoto 上传过程照片
  */
-export const UploadProgressPhoto = async (ksxm: number, plcData: PLCType, judgeUI: JudgeUI) => {
+export const UploadProgressPhoto = async (ksxm: number, plcData: PLCType, judgeUI: JudgePage) => {
   const photoBase64 = await GetPhotoBase64(judgeUI.context);
   const carInfo = AppStorage.get('carInfo');
   const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, ksxm)
@@ -68,19 +71,20 @@ export const UploadProgressPhoto = async (ksxm: number, plcData: PLCType, judgeU
     ksdd: encodeURI(judgeUI.ksdd)
   }
   const data: RegulatoryInterfaceParams = {
+    JGHOST: AppStorage.get("JGHOST") || "",
     xtlb: '17',
     jkxlh: judgeUI.serialNumber,
     jkid: '17C54',
     drvexam
   };
-  dConsole.log(ProcessDataTag, "上传过程照片数据处理", data);
+  dConsole.log(ProcessDataTag, QueueTag, ExamProcessDataTag, "上传过程照片数据处理", data);
   ProcessDataTaskPoolInstance.addTask(data)
 }
 
 /**
  * pointsDedute 扣分补传
  */
-export const DeductPoints = (ksxm: number, kf: MarkRule, xmmcEndCode: string, judgeUI: JudgeUI) => {
+export const DeductPoints = (ksxm: number, kf: MarkRule, xmmcEndCode: string, judgeUI: JudgePage) => {
   const carInfo = AppStorage.get('carInfo')!;
   const examSubject = carInfo.examSubject
   const lsh = judgeUI.lsh
@@ -130,22 +134,23 @@ export const DeductPoints = (ksxm: number, kf: MarkRule, xmmcEndCode: string, ju
     kfsj: dayTs().format("YYYY-MM-DD HH:mm:ss"),
   }
   const data: RegulatoryInterfaceParams = {
+    JGHOST: AppStorage.get("JGHOST") || "",
     xtlb: '17',
     jkxlh: serialNumber,
     jkid: '17C53',
     drvexam
   }
-  dConsole.log(ProcessDataTag, "扣分上传数据", data)
+  dConsole.log(ProcessDataTag, QueueTag, ExamProcessDataTag, "扣分上传数据", data)
   ProcessDataTaskPoolInstance.addTask(data)
 }
 
 /**
  * endProject 结束项目
  */
-export const ProjectEnd = (ksxm: number, xmxh: string, judgeUI: JudgeUI) => {
-  const carInfo = AppStorage.get('carInfo');
+export const ProjectEnd = (ksxm: number, xmxh: string, judgeUI: JudgePage) => {
+  const carInfo = AppStorage.get('carInfo')!;
   const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, ksxm)
-  const sbxh = carInfo.examSubject == '3' ? undefined : getSBXH(ksxm, xmxh, judgeUI.cdsbInfoObj, judgeUI.projectsObj, carInfo.examSubject);
+  const sbxh = carInfo.examSubject == '3' ? undefined : getSBXH(ksxm, xmxh, judgeUI.cdsbInfoObj!, judgeUI.projectsObj!, carInfo.examSubject!);
   const drvexam: DrvexamType = {
     lsh: judgeUI.lsh,
     kskm: carInfo?.examSubject || "2",
@@ -162,14 +167,47 @@ export const ProjectEnd = (ksxm: number, xmxh: string, judgeUI: JudgeUI) => {
   }
   const data: RegulatoryInterfaceParams = {
     xtlb: '17',
+    JGHOST: AppStorage.get("JGHOST") || "",
     jkxlh: judgeUI.serialNumber,
     jkid: '17C55',
     drvexam
   }
-  dConsole.log(ProcessDataTag, "结束项目数据", data)
+  dConsole.log(ProcessDataTag, QueueTag, ExamProcessDataTag, "结束项目数据", data)
   ProcessDataTaskPoolInstance.addTask(data)
 }
 
+/**
+ * 考试结束接口
+ * @returns
+ */
+export const TheExamIsOver = async (judgeUI: JudgePage, that: JudgeBusiness, callback: ProgressCallback) => {
+  const carInfo: CarInfoType = AppStorage.get("carInfo")!
+  const photoBase64 = await GetPhotoBase64(judgeUI.context);
+  const ksjs = that.ksjs!
+  dConsole.log(JudgeTag, "考试结束距离", that.ksjs)
+  const data: RegulatoryInterfaceParams = {
+    JGHOST: AppStorage.get("JGHOST") || "",
+    xtlb: '17',
+    jkxlh: judgeUI.serialNumber,
+    jkid: '17C56',
+    drvexam: {
+      lsh: judgeUI.lsh,
+      kchp: encodeURI(carInfo?.plateNo || ""),
+      kskm: carInfo?.examSubject || "2",
+      sfzmhm: judgeUI.idCard,
+      zp: photoBase64,
+      jssj: dayTs().format("YYYY-MM-DD HH:mm:ss"),
+      kscj: (judgeUI.totalScore * 1) > 0 ? judgeUI.totalScore : 0,
+      // kslc: Math.ceil(((ksjs?.qjjl + ksjs?.dcjl) || 0) / 100),
+      kslc: Math.ceil(((ksjs?.qjjl + ksjs?.dcjl) || 0) / 100),
+      dwlc: [ksjs.d1, ksjs.d2, ksjs.d3, ksjs.d4, ksjs!.d5].map((d, index) => `${index + 1},${Math.floor(d / 100)}`)
+        .join(';'),
+    }
+  }
+  dConsole.log(ProcessDataTag, QueueTag, ExamProcessDataTag, "考试结束数据", data)
+  ProcessDataTaskPoolInstance.addTask(data, callback)
+}
+
 
 const getSBXH = (ksxm: number, xmxh: string, cdsbInfoObj: CDSBInfos, projectsObj: object, examSubject: string): string => {
   const project: ProjectInfo = Reflect.get(projectsObj, ksxm);
diff --git a/entry/src/main/ets/pages/Judge/ProcessDataTaskPool.ets b/entry/src/main/ets/pages/Judge/ProcessDataTaskPool.ets
index 348cf68..8cc8f3e 100644
--- a/entry/src/main/ets/pages/Judge/ProcessDataTaskPool.ets
+++ b/entry/src/main/ets/pages/Judge/ProcessDataTaskPool.ets
@@ -1,11 +1,23 @@
-import { ProcessDataEnumType, RegulatoryInterfaceParams, WR, WuxiExamType } from '../../model';
+import {
+  DrvexamType,
+  OnAllTasksCompletedCallback,
+  OnBatchProgressUpdateCallback,
+  ProcessDataEnumType,
+  ProgressCallback,
+  QueueTask,
+  RegulatoryInterfaceParams,
+  WR,
+  WuxiExamType
+} from '../../model';
 import taskpool from '@ohos.taskpool';
-import { dConsole } from '../../utils/LogWorker';
+import { QueueTag } from '../../config';
 import http from '@ohos.net.http';
 import Request from '../../utils/Request';
+import { dConsole } from '../../utils/LogWorker';
+
 
 export class ProcessDataTaskPool {
-  private queue: RegulatoryInterfaceParams[] = [];
+  private queue: QueueTask[] = [];
   private isProcessing: boolean = false;
   /** 最大重试次数。1次初次尝试 + 5次重试 = 总共6次尝试。 */
   private readonly maxRetries = 5;
@@ -13,10 +25,45 @@ export class ProcessDataTaskPool {
   private readonly minProcessingTime = 2000;
   /** 记录每个任务的开始处理时间 */
   private taskStartTime: number = 0;
+  /** 批次进度更新时的回调函数 */
+  private onBatchProgressUpdateCallback: OnBatchProgressUpdateCallback | null = null;
+  /** 所有任务完成时的回调函数 (批次) */
+  private onAllTasksCompletedCallback: OnAllTasksCompletedCallback | null = null;
+  // 用于跟踪批次任务完成情况
+  private totalTasksInCurrentBatch: number = 0;
+  private completedTasksInCurrentBatch: number = 0;
+  private successfulTasksInCurrentBatch: number = 0;
+  private failedTasksInCurrentBatch: number = 0;
 
-  public addTask(dataItem: RegulatoryInterfaceParams): void {
-    console.info(`[Queue] 新任务已添加: ${JSON.stringify(dataItem)},当前队列长度: ${this.queue.length + 1}`);
-    this.queue.push(dataItem); // 将任务添加到队尾
+  /**
+   * 设置批次进度更新时的回调函数
+   * @param callback 回调函数
+   */
+  public setOnBatchProgressUpdateCallback(callback: OnBatchProgressUpdateCallback): void {
+    this.onBatchProgressUpdateCallback = callback;
+  }
+
+  /**
+   * 设置所有任务完成时的回调函数
+   * @param callback 回调函数
+   */
+  public setOnAllTasksCompletedCallback(callback: OnAllTasksCompletedCallback): void {
+    this.onAllTasksCompletedCallback = callback;
+  }
+
+  /**
+   * 添加任务到队列。
+   * 注意:为了正确追踪批次,通常建议一次性添加一个批次的所有任务。
+   * 如果在处理过程中动态添加任务,会影响 `totalTasksInCurrentBatch` 的准确性,
+   * 进而影响 `onAllTasksCompletedCallback` 的触发时机和进度计算。
+   * @param dataItem 任务数据
+   */
+  public addTask(dataItem: RegulatoryInterfaceParams, callback?: ProgressCallback): void {
+    console.info(QueueTag, `新任务已添加: ${JSON.stringify(dataItem)},当前队列长度: ${this.queue.length + 1}`);
+    this.queue.push({ data: dataItem, callback: callback }); // 将任务添加到队尾
+
+    // 每次添加任务,增加当前批次的总任务数
+    this.totalTasksInCurrentBatch++;
     this.triggerProcessing(); // 尝试启动处理流程
   }
 
@@ -26,70 +73,107 @@ export class ProcessDataTaskPool {
    */
   private triggerProcessing(): void {
     if (this.isProcessing) {
-      console.log('[Queue] 处理器正在运行中,新任务将在稍后被处理。');
+      console.log(QueueTag, '处理器正在运行中,新任务将在稍后被处理。');
       return;
     }
-    // [优化] 直接调用 async 函数,它会立即返回一个 Promise,不会阻塞当前执行流,效果与 Promise.resolve().then() 相同但更简洁。
     this.processQueue();
   }
 
   private async processQueue(): Promise {
     this.isProcessing = true;
-    console.log(`[Queue] 启动处理器... 待处理任务数: ${this.queue.length}`);
+    console.log(QueueTag, `启动处理器... 待处理任务数: ${this.queue.length}`);
 
     while (this.queue.length > 0) {
-      const taskData = this.queue[0]; // 查看队首任务
+      const taskData = this.queue[0].data; // 查看队首任务
+      const callback = this.queue[0].callback || (() => {
+      });
       this.taskStartTime = Date.now(); // 记录任务开始时间
 
       try {
-        console.log(`[Queue] 开始处理任务: ${JSON.stringify(taskData)}`);
+        console.log(QueueTag, `开始处理任务: ${JSON.stringify(taskData)}`);
+
+        let drvexam: DrvexamType = JSON.parse(JSON.stringify(taskData.drvexam))
+        drvexam.zp = ""
 
-        // 预先记录将要处理的数据
         const obj: WuxiExamType = {
           xtlb: taskData.xtlb,
           jkxlh: taskData.jkxlh,
           jkid: taskData.jkid,
-          drvexam: {
-            zp: "",
-          },
+          drvexam: drvexam,
         };
+        
         dConsole.writeProcessData(ProcessDataEnumType.WuxiExam, JSON.stringify(obj));
 
-        // 此方法若成功则正常返回,若永久失败则会抛出错误
-        await this.processSingleTaskWithRetries(taskData);
+        await this.processSingleTaskWithRetries(taskData, callback);
 
-        // 任务成功,将其从队列中移除
+        // 任务成功
         this.queue.shift();
-        console.log(`[Queue] ✅ 任务处理成功,已从队列移除。剩余任务: ${this.queue.length}`);
-
-        // 计算任务实际耗时
-        const elapsedTime = Date.now() - this.taskStartTime;
-        // 如果处理时间小于最小要求时间,则延迟剩余时间
-        if (elapsedTime < this.minProcessingTime) {
-          const delayTime = this.minProcessingTime - elapsedTime;
-          console.log(`[Queue] 任务处理耗时 ${elapsedTime}ms,需要延迟 ${delayTime}ms 以满足最小处理时间要求`);
-          await this.delay(delayTime);
-        }
+        console.log(QueueTag, `✅ 任务处理成功,已从队列移除。剩余任务: ${this.queue.length}`);
+        this.successfulTasksInCurrentBatch++; // 增加成功任务计数
       } catch (error) {
-        // **[健壮性改进]** 捕获到永久失败的错误。
-        // 原有逻辑会清空整个队列,导致后续任务丢失。
-        // 优化后的逻辑是:仅移除当前失败的任务,并记录错误,然后继续处理队列中的下一个任务。
-        console.error(`[Queue] 🔥 任务永久失败: ${(error as Error).message}`);
+        // 任务永久失败
+        console.error(QueueTag, ` 🔥 任务永久失败: ${(error as Error).message}`);
         const failedTask = this.queue.shift(); // 移除失败的任务
         console.error(`[Queue] 失败的任务已被移除: ${JSON.stringify(failedTask)},将继续处理下一个任务。`);
+        this.failedTasksInCurrentBatch++; // 增加失败任务计数
+      } finally {
+        // 无论成功或失败,都增加已完成任务计数
+        this.completedTasksInCurrentBatch++;
 
-        // 即使任务失败,也需要满足最小处理时间要求
+        // 每次任务完成(或失败),都更新进度
+        this.reportBatchProgress();
+
+        // 检查是否所有任务都已处理完
+        if (this.queue.length === 0 && this.completedTasksInCurrentBatch === this.totalTasksInCurrentBatch) {
+          console.log(QueueTag, ' 所有任务处理完毕!"总数', this.totalTasksInCurrentBatch, "完成的");
+          this.onAllTasksCompletedCallback?.(
+            this.totalTasksInCurrentBatch,
+            this.completedTasksInCurrentBatch,
+            this.successfulTasksInCurrentBatch,
+            this.failedTasksInCurrentBatch
+          );
+          // 重置批次计数器,为下一批次做准备
+          this.resetBatchCounters();
+        }
+
+        // 计算任务实际耗时,并根据需要延迟
         const elapsedTime = Date.now() - this.taskStartTime;
         if (elapsedTime < this.minProcessingTime) {
           const delayTime = this.minProcessingTime - elapsedTime;
-          console.log(`[Queue] 失败任务处理耗时 ${elapsedTime}ms,需要延迟 ${delayTime}ms 以满足最小处理时间要求`);
+          console.log(QueueTag, ` 任务处理耗时 ${elapsedTime}ms,需要延迟 ${delayTime}ms 以满足最小处理时间要求`);
           await this.delay(delayTime);
         }
       }
     }
 
     this.isProcessing = false;
-    console.log('[Queue] 处理器已停止。');
+    console.log(QueueTag, ' 处理器已停止。');
+  }
+
+  /**
+   * 报告批次进度
+   */
+  private reportBatchProgress(): void {
+    if (this.onBatchProgressUpdateCallback && this.totalTasksInCurrentBatch > 0) {
+      const progressPercentage = Math.floor((this.completedTasksInCurrentBatch / this.totalTasksInCurrentBatch) * 100);
+      this.onBatchProgressUpdateCallback(
+        this.totalTasksInCurrentBatch,
+        this.completedTasksInCurrentBatch,
+        this.successfulTasksInCurrentBatch,
+        this.failedTasksInCurrentBatch,
+        progressPercentage
+      );
+    }
+  }
+
+  /**
+   * 重置批次任务计数器
+   */
+  private resetBatchCounters(): void {
+    this.totalTasksInCurrentBatch = 0;
+    this.completedTasksInCurrentBatch = 0;
+    this.successfulTasksInCurrentBatch = 0;
+    this.failedTasksInCurrentBatch = 0;
   }
 
   /**
@@ -100,28 +184,22 @@ export class ProcessDataTaskPool {
     return new Promise(resolve => setTimeout(resolve, ms));
   }
 
-  private async processSingleTaskWithRetries(taskData: RegulatoryInterfaceParams): Promise {
-    // 1 次初次尝试 + 5 次重试
+  private async processSingleTaskWithRetries(taskData: RegulatoryInterfaceParams, callback: ProgressCallback): Promise {
     for (let attempt = 0; attempt <= this.maxRetries; attempt++) {
       const attemptNum = attempt + 1;
       try {
         const attemptType = attempt === 0 ? '初次尝试' : `重试 ${attempt}`;
-        console.log(`[Queue] 开始上传 (${attemptType}, 总共第 ${attemptNum} 次)`);
-
-        // **注意**: 这里传递的是 taskData 的引用,为了防止 worker 中意外修改原始数据,
-        // 最佳实践是在 worker 内部或传递前进行深拷贝。
-        // 但根据我们下面的修复,worker 不再修改原始数据,所以这里是安全的。
-        const result: WR = await taskpool.execute(uploadWorkerTask, taskData);
-
+        console.log(QueueTag, `开始上传 (${attemptType}, 总共第 ${attemptNum} 次)`);
+        const result: WR = (await taskpool.execute(uploadWorkerTask, taskData)) as WR;
+        callback(result)
         dConsole.writeProcessData(ProcessDataEnumType.WuxiExam, JSON.stringify(result));
-        if (result.code === 1) {
-          console.log(`[Queue] ✔️ 上传成功 (在第 ${attemptNum} 次尝试)`);
+        if (result.code === "1") {
+          console.log(QueueTag, ` ✔️ 上传成功 (在第 ${attemptNum} 次尝试)`);
           return; // 成功,立即返回
         }
-        console.warn(`[Queue] ❌ 上传失败 (第 ${attemptNum} 次)。响应: ${result.message}`);
+        console.warn(QueueTag, ` ❌ 上传失败 (第 ${attemptNum} 次)。${result.code},响应: ${decodeURIComponent(result.message)}`);
       } catch (e) {
-        // **[健壮性改进]** 现在可以捕获从 Worker 抛出的更详细的异常信息
-        console.error(`[Queue] ❌ TaskPool 执行或网络错误 (第 ${attemptNum} 次): ${e}`);
+        console.error(QueueTag, ` ❌ TaskPool 执行或网络错误 (第 ${attemptNum} 次): ${e}`);
       }
 
       if (attempt === this.maxRetries) {
@@ -129,55 +207,45 @@ export class ProcessDataTaskPool {
       }
     }
 
-    // 如果循环结束,意味着所有尝试都失败了
     throw new Error(`任务 ${JSON.stringify(taskData)} 在 ${this.maxRetries + 1} 次尝试后永久失败。`);
   }
 }
 
 export const ProcessDataTaskPoolInstance = new ProcessDataTaskPool();
 
-/**
- * 这是将在 Worker 线程中执行的任务函数。
- * 它负责执行单次的上传尝试。
- * @param data 需要上传的单条数据项
- * @returns 一个包含本次上传尝试结果的对象
- */
+@Concurrent
 export async function uploadWorkerTask(data: RegulatoryInterfaceParams): Promise {
-  // 这两个变量似乎未在逻辑中使用,暂时保持原样
   let singlePlay: boolean = false;
   let isJGNew = false;
   try {
+    const sendProcessData = async (data: RegulatoryInterfaceParams, singlePlay: boolean, isJGNew: boolean): Promise => {
+      if (singlePlay) {
+        return { code: "1" }
+      }
+      if (isJGNew) {
+        //   调用新监管
+      }
+      data.drvexam = data.drvexam ?? {};
+      if (data.drvexam.zp !== undefined && data.drvexam.zp !== null) {
+        data.drvexam.zp = encodeURIComponent(data.drvexam.zp);
+      }
+
+      const drvexamArr = Object.entries(data.drvexam)
+        .filter((item: [string, string]) => item[1] != undefined)
+        .map((item: [string, object]) => `<${item[0]}>${item[1]}${item[0]}>`)
+      return await Request