dev #2
| @ -56,7 +56,7 @@ export async function GetCarInfo(): Promise<CarInfoType> { | ||||
|     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 | ||||
|     } | ||||
|  | ||||
| @ -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({ | ||||
|  | ||||
| @ -272,7 +272,7 @@ export function CloseFile(fd: number): Promise<boolean> { | ||||
| export function EditFile(fd: number, data: string): Promise<boolean> { | ||||
|   return new Promise((resolve, reject) => { | ||||
|     try { | ||||
|       console.log(LogTag, "写入数据:" + data) | ||||
|       // console.log(LogTag, "写入数据:" + data) | ||||
|       fs.writeSync(fd, data + "\n") | ||||
|       resolve(true) | ||||
|     } catch (e) { | ||||
|  | ||||
| @ -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, | ||||
|  | ||||
| @ -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, | ||||
|  | ||||
| @ -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: { | ||||
|  | ||||
| @ -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 { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user