From 3c89dbf9bd3d064787f34d52e8ef29a803945e85 Mon Sep 17 00:00:00 2001 From: admin <52323@qq.com> Date: 星期五, 15 九月 2023 11:37:26 +0800 Subject: [PATCH] 测试加密 --- springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java | 8 ++------ 1 files changed, 2 insertions(+), 6 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 1597562..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()); } - // 将读取到的plclist转为数组 + // 灏嗚鍙杙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, @@ -83,14 +83,10 @@ }; alarmMapper = WebSocketServer.applicationContext.getBean(AlarmMapper.class); for (short i = 0; i < shuzu1.length; i++) { - // 查询结束时间为null的个数 short result = alarmMapper.selectnullti(shuzu[i]); - // 读取PLC对应地址的值为1并且该地址没有结束时间为null的数据,添加一条新的报警信息 if (shuzu1[i] == 1 && result == 0) { alarmMapper.Insertalarm(shuzu[i]); - } - // 读取PLC对应地址的值为0并且该地址有结束时间为null的数据,修改该条数据的结束时间 - else if (shuzu1[i] == 0 && result > 0) { + } else if (shuzu1[i] == 0 && result > 0) { alarmMapper.updatealarm(shuzu[i]); } } -- Gitblit v1.8.0