From 30aee68389c98177173a1e20f1c1b562e0fa2afc Mon Sep 17 00:00:00 2001 From: surenjun Date: Tue, 20 May 2025 15:33:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E4=B8=89=E4=BB=A3=E6=9C=BA?= =?UTF-8?q?=E4=B8=AD=E5=BF=83udp=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/ets/common/utils/UdpClientByCenter.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/entry/src/main/ets/common/utils/UdpClientByCenter.ts b/entry/src/main/ets/common/utils/UdpClientByCenter.ts index b96bd1b1..d607ce8a 100644 --- a/entry/src/main/ets/common/utils/UdpClientByCenter.ts +++ b/entry/src/main/ets/common/utils/UdpClientByCenter.ts @@ -88,7 +88,11 @@ export default class UdpClientByCenter { // time:dateFormat(new Date()), // PLC:`${TAG} getUDPudp rebind success`, // }) - this.udp && this.udp.on('message', this.message_1Fn); + const terType = this.retClass.terType + //TODO 临时处理过滤掉中心udp + if(localIpPort != '8800' && terType == 2){ + this.udp && this.udp.on('message', this.message_1Fn); + } }).catch(err => { //globalThis.closeHeartSocket=true this.isWorking = false @@ -105,12 +109,17 @@ export default class UdpClientByCenter { address: this.localIp, port: parseInt(this.localIpPort), family: 1 }); promise.then(() => { + const localIpPort = this.localIpPort this.isWorking = true // this.writeLog({ // time:dateFormat(new Date()), // PLC:`${TAG} getUDPudp bind success`, // }) - this.udp && this.udp.on('message', this.message_1Fn); + const terType = this.retClass.terType + //TODO 临时处理过滤掉中心udp + if(localIpPort != '8800' && terType == 2){ + this.udp && this.udp.on('message', this.message_1Fn); + } }).catch(err => { this.isWorking = false console.info('surenjun err=>', JSON.stringify(err)) From ce3a1e86a6bcd2110e74d00e3a831c4522c1fd9b Mon Sep 17 00:00:00 2001 From: surenjun Date: Mon, 26 May 2025 14:20:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E8=BF=9C=E7=A8=8B=E7=BB=88?= =?UTF-8?q?=E6=AD=A2=E8=80=83=E8=AF=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/judgeSDK/judge.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entry/src/main/ets/pages/judgeSDK/judge.ts b/entry/src/main/ets/pages/judgeSDK/judge.ts index 74c8cc58..fe2645e8 100644 --- a/entry/src/main/ets/pages/judgeSDK/judge.ts +++ b/entry/src/main/ets/pages/judgeSDK/judge.ts @@ -3747,7 +3747,7 @@ export default class Judge { //监听远程终止考试 globalThis.udpEvent.onStopExam(async () => { - const config392 = (this.judgeUI.judgeConfigObj['392'] || [20,'81']).split(','); + const config392 = (this.judgeUI.judgeConfigObj['392'] || '20,81').split(','); this.setJudgeMark(config392[0]*1, config392[1], 2); })