From c8c96e57476968a164ad1889c9d7167fe320982e Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期二, 19 三月 2024 08:38:38 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes --- springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java | 59 +++++++++++++++++++++++++++++++++++------------------------ 1 files changed, 35 insertions(+), 24 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java index d178723..9f466ca 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java +++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java @@ -7,7 +7,9 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; import com.example.springboot.service.*; import org.springframework.beans.factory.annotation.Autowired; @@ -18,6 +20,7 @@ import com.example.springboot.entity.StorageCage; import com.example.springboot.entity.alarmmg; import com.example.springboot.entity.north_glass_buffer1; +import com.example.springboot.entity.device.PlcParameterObject; import com.example.springboot.mapper.HomeMapper; import com.example.springboot.mapper.SpianMapper; @@ -34,7 +37,7 @@ public static Boolean isAllowQueue = true; public static Boolean isAllowReordering = true; // 鍑虹墖闃熷垪璀﹀憡 - public static Boolean isQueueWarning = false; + public static Boolean isQueueWarning = true; // 閾濇id public static String FrameNo = ""; // 鏄惁闇�瑕佹墜鍔ㄧ‘璁ょ幓鐠� @@ -188,7 +191,7 @@ GlassIdList.add(spianService.queGlassid("DB103.114", 14).toString()); jsonObject.append("GlassIdList", GlassIdList); - // 璇诲幓Plc杩涚墖杞︿笌鍑虹墖杞︿綅缃甒 + // 鑾峰彇Plc杩涚墖杞︿笌鍑虹墖杞︿綅缃� List<String> addressList = new ArrayList<String>(); addressList.add("DB106.12"); addressList.add("DB106.0"); @@ -196,21 +199,21 @@ if (paramlist != null) { jsonObject.append("params", paramlist); } - // 鑾峰彇杩涚墖杞︾姸鎬� - List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", - 1);// 鑾峰彇杩涚墖杞︾姸鎬� - if (datas1ListState != null) { - boolean exist1 = datas1ListState.contains((short) 0); - jsonObject.append("zhuangtai", exist1); - } + // // 鑾峰彇杩涚墖杞︾姸鎬� + // List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", + // 1);// 鑾峰彇杩涚墖杞︾姸鎬� + // if (datas1ListState != null) { + // boolean exist1 = datas1ListState.contains((short) 0); + // jsonObject.append("zhuangtai", exist1); + // } - // 鑾峰彇杩涚墖鐜荤拑淇℃伅 - List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1); - if (inglassInfo != null) { - if (inglassInfo.size() > 0) { - jsonObject.append("loadglassheight", inglassInfo.get(0) * 70); - } - } + // // 鑾峰彇杩涚墖鐜荤拑淇℃伅 + // List<Short> inglassInfo = S7control.getinstance().ReadWord("DB106.24", 1); + // if (inglassInfo != null) { + // if (inglassInfo.size() > 0) { + // jsonObject.append("loadglassheight", inglassInfo.get(0) * 70); + // } + // } // // 鑾峰彇閾濇idDB106.DBW64锛屾坊鍔犲埌鍑虹墖闃熷垪 // String frameno="X21763329601FB"; String frameno = spianService.queGlassid("DB103.270", 14).toString(); @@ -247,7 +250,7 @@ jsonObject.append("countdown", countdowns); } // jsonObject.append("countdown", true); - // 澶嶄綅瀹屾垚淇″彿ss + // 澶嶄綅瀹屾垚淇″彿 List<Boolean> resetss = S7control.getinstance().ReadBits("DB103.284", 1); for (Boolean reset : resetss) { jsonObject.append("reset", reset); @@ -268,15 +271,23 @@ boolean D01ResponseState = D01respnse.contains((short) 1); // jsonObject.append("D01RequestState", D01RequestState); // 鑷姩杩涚墖 - if ((form3.getglassheight() < 380 || form3.getglasswidth() < 390 || form3.getglassheight() > 1810 - || form3.getglasswidth() > 2760) - || (form3.getglassheight() < 390 || form3.getglasswidth() < 380 - || form3.getglassheight() > 2760 || form3.getglasswidth() > 1810)) { - - if (isConfirm == true && D01RequestState == true && D01ResponseState == false) { - storageCageService.InsertQueueGlassId((short) 1, form3); + isConfirm = true; + if (isConfirm == true && form3.getglassId() != null && form3.getglassId() != "") { + if ((form3.getglassheight() < 380 || form3.getglasswidth() < 390 + || form3.getglassheight() > 1810 + || form3.getglasswidth() > 2760) + || (form3.getglassheight() < 390 || form3.getglasswidth() < 380 + || form3.getglassheight() > 2760 || form3.getglasswidth() > 1810)) { + FeedState = true; + jsonObject.append("FeedState", FeedState); + FeedState = false; + } else { + if (D01RequestState == true && D01ResponseState != true) { + storageCageService.InsertQueueGlassId((short) 1, form3); + } } } + } } catch (InterruptedException e) { -- Gitblit v1.8.0