From cfc2855d2fe063e26947bad7277a1091efbb3bbb Mon Sep 17 00:00:00 2001 From: wu <731351411@qq.com> Date: 星期四, 28 十一月 2024 02:16:21 +0800 Subject: [PATCH] 协议地址更新,手动页面更新 --- springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java b/springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java index a1e0c70..a4fe714 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java +++ b/springboot-vue3/src/main/java/com/example/springboot/service/SpianServiceNew.java @@ -63,7 +63,7 @@ // 褰撹繑鍥炵殑鏍煎瓙鍙蜂负绌烘椂,杩斿洖400绗煎瓙宸叉弧 if (cage != null) { albaniaMapper.AddCage(cage.getId(), glassid, width, height, 1, glasstype, 0, thickness, - glassfilms.getFilms(), glassfilms.getFlowcard(), glassfilms.getMateid()); + glassfilms.getFilms(), glassfilms.getFlowcard(), glassfilms.getMateid(),glassfilms.getTier()); Mestast(glassid, 1001, cage.getId(), 1, "MESID1", 1); System.out.println("浠诲姟鍙戦�佺幓鐠僫d:" + glassid + "璧峰浣嶇疆:" + 1001 + "鏍煎瓙鍙�:" + cage.getId() + "鍚姩:" + 1); albaniaMapper.UpdateStorage(width, height, cage.getId()); @@ -72,7 +72,7 @@ } } // 澧炲姞浠诲姟璁板綍 - albaniaMapper.Inserttask(0, 0, 1001, cage.getId(), glassid, glasstype, flowcard, glassfilms.getMateid(), 0); + albaniaMapper.Inserttask(0, 0, 1001, cage.getId(), glassid, glasstype, flowcard, glassfilms.getMateid(), glassfilms.getTier()); albaniaMapper.UpdateQueueState(glassid); return (200); @@ -92,6 +92,7 @@ carwidth = carwidth + glass.getWidth() + 300; if (carwidth >= 4300&&type!=glassmate.get(i).getTaskType()) { S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLC").getAddress(), (short) 1);// 鍑虹墖浠诲姟鍚姩 + MestoPlc(); return (200); } else { //澧炲姞涓�鏉′换鍔¤褰� @@ -108,6 +109,22 @@ } // 鏈閰嶇墖瀹屾垚鍙戦�佸惎鍔ㄥ懡浠� // S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLC").getAddress(), (short) 1);// 鍑虹墖浠诲姟鍚姩 + while (true) { + String currentValue = plcmes.getPlcParameter("MESToPLC").getValue(); + // 妫�鏌� MESToPLC 鐨勫�兼槸鍚︿负 0 + if (currentValue.equals("1")) { + System.out.println("鍙戦�佸惎鍔ㄥ瓧鐜板湪涓�1,鍋滄寰幆鍐欏叆"); + break; // 閫�鍑哄惊鐜� + } + // 濡傛灉涓嶄负 1锛岀户缁啓鍏� + S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLC").getAddress(),(short) 1);// 浠诲姟鍙戦�佸瓧 + System.out.println("缁х画鍐欏叆 MESToPLC,褰撳墠鍊�:" + currentValue); + try { + Thread.sleep(100); // 渚嬪姣忕妫�鏌ヤ竴娆� + } catch (InterruptedException e) { + e.printStackTrace(); + } + } MestoPlc(); } @@ -149,7 +166,7 @@ peipianid.get(j).getMateid()); // System.out.println("peipiancage:"+peipiancage+peipianid.get(j).getMateid()); // System.out.println("peipiancage2:"+peipiancage2); - if (!peipiancage.contains("涓嶈冻") && !peipiancage2.contains("涓嶈冻")) { + if (!peipiancage.contains("涓嶈冻")) { List<GlassInfo> chupian = albaniaMapper.SelectOutGlass7(peipianid.get(j).getFlowcard(), peipianid.get(j).getMateid()); for (int k = 0; k < chupian.size(); k++) { -- Gitblit v1.8.0