From cdc594d12e46b7dd2e37c7a2071c133f8404f9be Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期二, 12 九月 2023 18:25:55 +0800 Subject: [PATCH] 测试代码,部分代码进行优化 --- springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java index 8f92c3b..7e9a4fa 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java +++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java @@ -31,7 +31,7 @@ if (sendwServer != null) { sendwServer.sendMessage(jsonObject.toString()); } - + // 灏嗚鍙杙lc鏁版嵁鐨刾lclist杞崲涓烘暟缁� Short[] shuzu1 = plclist.toArray(new Short[0]); // Short[] shuzu1 = { // 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, @@ -85,7 +85,7 @@ for (short i = 0; i < shuzu1.length; i++) { short result = alarmMapper.selectnullti(shuzu[i]); if (shuzu1[i] == 1 && result == 0) { - // alarmMapper.Insertalarm(shuzu[i]); + alarmMapper.Insertalarm(shuzu[i]); } else if (shuzu1[i] == 0 && result > 0) { alarmMapper.updatealarm(shuzu[i]); } -- Gitblit v1.8.0