From 86cf3f58d3152ab5f5c7539ee0393f3bd881dfda Mon Sep 17 00:00:00 2001 From: wangzhongjie Date: Wed, 29 Oct 2025 17:56:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Index/utils.ets | 2 +- entry/src/main/ets/pages/Judge/JudgeBusiness.ets | 2 +- entry/src/main/ets/utils/Common.ets | 2 +- entry/src/main/ets/utils/LogWorker.ets | 2 +- entry/src/main/ets/utils/business/CenterUdpBusiness.ets | 6 ++---- entry/src/main/ets/workers/DifferentialCorrection.ets | 2 +- entry/src/main/ets/workers/Log.ets | 5 ++--- 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/entry/src/main/ets/pages/Index/utils.ets b/entry/src/main/ets/pages/Index/utils.ets index 9ae9984..b7a0937 100644 --- a/entry/src/main/ets/pages/Index/utils.ets +++ b/entry/src/main/ets/pages/Index/utils.ets @@ -56,7 +56,7 @@ export async function GetCarInfo(): Promise { 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)) + // dConsole.log("Worker received message car", JSON.stringify(carInfo)) AppStorage.setOrCreate('carInfo', carInfo) return carInfo } diff --git a/entry/src/main/ets/pages/Judge/JudgeBusiness.ets b/entry/src/main/ets/pages/Judge/JudgeBusiness.ets index d2fee7c..f81f1f4 100644 --- a/entry/src/main/ets/pages/Judge/JudgeBusiness.ets +++ b/entry/src/main/ets/pages/Judge/JudgeBusiness.ets @@ -182,7 +182,7 @@ export default class JudgeBusiness { 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) + // dConsole.info("小红球过程数据1", this.judgeBusiness.getIsUdpEnd(), this.judgeUI.kfArr) DifferentialAndSignal.sendMsg({ diff --git a/entry/src/main/ets/utils/Common.ets b/entry/src/main/ets/utils/Common.ets index 50494e7..4931364 100644 --- a/entry/src/main/ets/utils/Common.ets +++ b/entry/src/main/ets/utils/Common.ets @@ -272,7 +272,7 @@ export function CloseFile(fd: number): Promise { export function EditFile(fd: number, data: string): Promise { return new Promise((resolve, reject) => { try { - console.log(LogTag, "写入数据:" + data) + // console.log(LogTag, "写入数据:" + data) fs.writeSync(fd, data + "\n") resolve(true) } catch (e) { diff --git a/entry/src/main/ets/utils/LogWorker.ets b/entry/src/main/ets/utils/LogWorker.ets index 89acffe..28c95a1 100644 --- a/entry/src/main/ets/utils/LogWorker.ets +++ b/entry/src/main/ets/utils/LogWorker.ets @@ -75,7 +75,7 @@ class logWorker { // 过程数据写入 writeProcessData(type: ProcessDataEnumType, data: string) { - dConsole.log(LogTag, "传入过程数据", data) + // dConsole.log(LogTag, "传入过程数据", data) let params: LogWorkerMessage = { type: WorkerMessageType.WriteProcessData, data, diff --git a/entry/src/main/ets/utils/business/CenterUdpBusiness.ets b/entry/src/main/ets/utils/business/CenterUdpBusiness.ets index f3ebff4..2d50e78 100644 --- a/entry/src/main/ets/utils/business/CenterUdpBusiness.ets +++ b/entry/src/main/ets/utils/business/CenterUdpBusiness.ets @@ -3,9 +3,7 @@ import { CarInfoType, CenterCallBackMsgType, EnvironmentConfigurationType, ExamD import { FillZero, NumberToByteArray } from '../Common'; import UdpClient, { MsgExt } from '../UdpUtils'; import { CenterUdpTag, UDPTag } from '../../config'; -import { dConsole } from '../LogWorker'; -const Tag = "CenterUDPBusiness" // 中心UDP业务逻辑 class CenterUDPBusiness { @@ -46,12 +44,12 @@ class CenterUDPBusiness { carNo: this.carInfo.carNo!, placeId: this.carInfo.examinationRoomId! } - dConsole.info(Tag, "发送中心数据", data) + // dConsole.info(Tag, "发送中心数据", data) this.udp.sendMsgExt(data, lsh); } sendMsgExt(id: number, body: number[], lsh: number) { - dConsole.info("中心udp", id, body, lsh) + // dConsole.info("中心udp", id, body, lsh) this.udp.sendMsgExt({ id: id, list: body, diff --git a/entry/src/main/ets/workers/DifferentialCorrection.ets b/entry/src/main/ets/workers/DifferentialCorrection.ets index 23845d8..acdb7f7 100644 --- a/entry/src/main/ets/workers/DifferentialCorrection.ets +++ b/entry/src/main/ets/workers/DifferentialCorrection.ets @@ -42,7 +42,7 @@ function checkLsh() { workerPort.onmessage = async (e: MessageEvents) => { - console.log(WorkerTag, `Worker received message: ${e.data}`); + // console.log(WorkerTag, `Worker received message: ${e.data}`); const result: WorkerMessage = JSON.parse(e.data); switch (result.type) { case WorkerMessageDataType.Init: { diff --git a/entry/src/main/ets/workers/Log.ets b/entry/src/main/ets/workers/Log.ets index 340a006..a04ed33 100644 --- a/entry/src/main/ets/workers/Log.ets +++ b/entry/src/main/ets/workers/Log.ets @@ -30,7 +30,7 @@ workerPort.onmessage = (e: MessageEvents) => { } // 写过程数据 if (result.type === WorkerMessageType.WriteProcessData && result.processDataType) { - console.log(LogTag, "work收到过程数据") + // console.log(LogTag, "work收到过程数据") WriteProcessData(result.processDataType, result.data || "") } // 关闭过程数据 @@ -95,7 +95,7 @@ async function InitExam(dirName: string) { // 写过程数据 async function WriteProcessData(type: ProcessDataEnumType, data: string) { - console.log(LogTag, "推入过程数据", type, data) + // console.log(LogTag, "推入过程数据", type, data) if (fileFdArr.length === 0) { return } @@ -109,7 +109,6 @@ async function WriteProcessData(type: ProcessDataEnumType, data: string) { async function processQueue() { isProcessing = true; while (writeQueue.length > 0 && isProcessing) { - console.log(LogTag, "处理过程数据") const item = writeQueue.shift()!; const index = Number(item.type); try {