fix: 删除不必要的打印
This commit is contained in:
parent
be462d6877
commit
86cf3f58d3
@ -56,7 +56,7 @@ export async function GetCarInfo(): Promise<CarInfoType> {
|
|||||||
if (res.obtainCarExamInfoRsp && res.obtainCarExamInfoRsp.body) {
|
if (res.obtainCarExamInfoRsp && res.obtainCarExamInfoRsp.body) {
|
||||||
const carInfo: ObtainCarExamInfoRspBody = res?.obtainCarExamInfoRsp?.body!
|
const carInfo: ObtainCarExamInfoRspBody = res?.obtainCarExamInfoRsp?.body!
|
||||||
carInfo.plateNo = decodeURIComponent(carInfo.plateNo)
|
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)
|
AppStorage.setOrCreate('carInfo', carInfo)
|
||||||
return 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.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) + ''
|
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({
|
DifferentialAndSignal.sendMsg({
|
||||||
|
|||||||
@ -272,7 +272,7 @@ export function CloseFile(fd: number): Promise<boolean> {
|
|||||||
export function EditFile(fd: number, data: string): Promise<boolean> {
|
export function EditFile(fd: number, data: string): Promise<boolean> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
console.log(LogTag, "写入数据:" + data)
|
// console.log(LogTag, "写入数据:" + data)
|
||||||
fs.writeSync(fd, data + "\n")
|
fs.writeSync(fd, data + "\n")
|
||||||
resolve(true)
|
resolve(true)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@ -75,7 +75,7 @@ class logWorker {
|
|||||||
|
|
||||||
// 过程数据写入
|
// 过程数据写入
|
||||||
writeProcessData(type: ProcessDataEnumType, data: string) {
|
writeProcessData(type: ProcessDataEnumType, data: string) {
|
||||||
dConsole.log(LogTag, "传入过程数据", data)
|
// dConsole.log(LogTag, "传入过程数据", data)
|
||||||
let params: LogWorkerMessage = {
|
let params: LogWorkerMessage = {
|
||||||
type: WorkerMessageType.WriteProcessData,
|
type: WorkerMessageType.WriteProcessData,
|
||||||
data,
|
data,
|
||||||
|
|||||||
@ -3,9 +3,7 @@ import { CarInfoType, CenterCallBackMsgType, EnvironmentConfigurationType, ExamD
|
|||||||
import { FillZero, NumberToByteArray } from '../Common';
|
import { FillZero, NumberToByteArray } from '../Common';
|
||||||
import UdpClient, { MsgExt } from '../UdpUtils';
|
import UdpClient, { MsgExt } from '../UdpUtils';
|
||||||
import { CenterUdpTag, UDPTag } from '../../config';
|
import { CenterUdpTag, UDPTag } from '../../config';
|
||||||
import { dConsole } from '../LogWorker';
|
|
||||||
|
|
||||||
const Tag = "CenterUDPBusiness"
|
|
||||||
|
|
||||||
// 中心UDP业务逻辑
|
// 中心UDP业务逻辑
|
||||||
class CenterUDPBusiness {
|
class CenterUDPBusiness {
|
||||||
@ -46,12 +44,12 @@ class CenterUDPBusiness {
|
|||||||
carNo: this.carInfo.carNo!,
|
carNo: this.carInfo.carNo!,
|
||||||
placeId: this.carInfo.examinationRoomId!
|
placeId: this.carInfo.examinationRoomId!
|
||||||
}
|
}
|
||||||
dConsole.info(Tag, "发送中心数据", data)
|
// dConsole.info(Tag, "发送中心数据", data)
|
||||||
this.udp.sendMsgExt(data, lsh);
|
this.udp.sendMsgExt(data, lsh);
|
||||||
}
|
}
|
||||||
|
|
||||||
sendMsgExt(id: number, body: number[], lsh: number) {
|
sendMsgExt(id: number, body: number[], lsh: number) {
|
||||||
dConsole.info("中心udp", id, body, lsh)
|
// dConsole.info("中心udp", id, body, lsh)
|
||||||
this.udp.sendMsgExt({
|
this.udp.sendMsgExt({
|
||||||
id: id,
|
id: id,
|
||||||
list: body,
|
list: body,
|
||||||
|
|||||||
@ -42,7 +42,7 @@ function checkLsh() {
|
|||||||
|
|
||||||
|
|
||||||
workerPort.onmessage = async (e: MessageEvents) => {
|
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);
|
const result: WorkerMessage = JSON.parse(e.data);
|
||||||
switch (result.type) {
|
switch (result.type) {
|
||||||
case WorkerMessageDataType.Init: {
|
case WorkerMessageDataType.Init: {
|
||||||
|
|||||||
@ -30,7 +30,7 @@ workerPort.onmessage = (e: MessageEvents) => {
|
|||||||
}
|
}
|
||||||
// 写过程数据
|
// 写过程数据
|
||||||
if (result.type === WorkerMessageType.WriteProcessData && result.processDataType) {
|
if (result.type === WorkerMessageType.WriteProcessData && result.processDataType) {
|
||||||
console.log(LogTag, "work收到过程数据")
|
// console.log(LogTag, "work收到过程数据")
|
||||||
WriteProcessData(result.processDataType, result.data || "")
|
WriteProcessData(result.processDataType, result.data || "")
|
||||||
}
|
}
|
||||||
// 关闭过程数据
|
// 关闭过程数据
|
||||||
@ -95,7 +95,7 @@ async function InitExam(dirName: string) {
|
|||||||
|
|
||||||
// 写过程数据
|
// 写过程数据
|
||||||
async function WriteProcessData(type: ProcessDataEnumType, data: string) {
|
async function WriteProcessData(type: ProcessDataEnumType, data: string) {
|
||||||
console.log(LogTag, "推入过程数据", type, data)
|
// console.log(LogTag, "推入过程数据", type, data)
|
||||||
if (fileFdArr.length === 0) {
|
if (fileFdArr.length === 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -109,7 +109,6 @@ async function WriteProcessData(type: ProcessDataEnumType, data: string) {
|
|||||||
async function processQueue() {
|
async function processQueue() {
|
||||||
isProcessing = true;
|
isProcessing = true;
|
||||||
while (writeQueue.length > 0 && isProcessing) {
|
while (writeQueue.length > 0 && isProcessing) {
|
||||||
console.log(LogTag, "处理过程数据")
|
|
||||||
const item = writeQueue.shift()!;
|
const item = writeQueue.shift()!;
|
||||||
const index = Number(item.type);
|
const index = Number(item.type);
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user