From dcf8384b4a7604e6b4e3b68f2fe76571c0d00d41 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期一, 02 三月 2026 08:13:59 +0800
Subject: [PATCH] 1

---
 zy-acs-cv/src/main/java/com/zy/asrs/controller/SiteController.java |  131 -------------------------------------------
 1 files changed, 2 insertions(+), 129 deletions(-)

diff --git a/zy-acs-cv/src/main/java/com/zy/asrs/controller/SiteController.java b/zy-acs-cv/src/main/java/com/zy/asrs/controller/SiteController.java
index 74fbe57..e613f12 100644
--- a/zy-acs-cv/src/main/java/com/zy/asrs/controller/SiteController.java
+++ b/zy-acs-cv/src/main/java/com/zy/asrs/controller/SiteController.java
@@ -13,6 +13,7 @@
 import com.zy.core.cache.OutputQueue;
 import com.zy.core.cache.SlaveConnection;
 import com.zy.core.enums.SlaveType;
+import com.zy.core.enums.TaskType;
 import com.zy.core.model.DevpSlave;
 import com.zy.core.model.Task;
 import com.zy.core.model.protocol.StaProtocol;
@@ -75,23 +76,7 @@
         return R.ok().add(list);
     }
 
-    @PostMapping("/table/plc/errors")
-    @ManagerAuth(memo = "杈撻�佽澶噋lc寮傚父淇℃伅琛�")
-    public R plcErrorTable() {
-        List<PlcErrorTableVo> list = new ArrayList<>();
-        for (DevpSlave devp : slaveProperties.getDevp()) {
-            DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
-            Map<Integer, StaProtocol> station = devpThread.getStation();
 
-            for (Map.Entry<Integer, StaProtocol> entry : station.entrySet()) {
-                if (!Cools.isEmpty(staPlcErr(entry))) {
-                    list.add(staPlcErr(entry).get(0));
-                }
-
-            }
-        }
-        return R.ok().add(list);
-    }
 
     @PostMapping("/output/site")
     @ManagerAuth(memo = "绔欑偣璁惧鎶ユ枃鏃ュ織杈撳嚭")
@@ -162,7 +147,7 @@
                     if (pakMk != null) {
                         staProtocol.setPakMk(pakMk.equals("Y"));
                     }
-                    boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
+                    boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(TaskType.WRITE, staProtocol));
                     if (result) {
                         return R.ok();
                     } else {
@@ -172,118 +157,6 @@
             }
         }
         return R.error("plc宸叉帀绾�");
-    }
-
-    public List<PlcErrorTableVo> staPlcErr(Map.Entry<Integer, StaProtocol> entry) {
-        List<PlcErrorTableVo> list = new ArrayList<>();
-        StaProtocol staProtocol = entry.getValue();
-        if (staProtocol.getBreakerErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-            vo.setPlcDesc("鏂矾鍣ㄦ晠闅�");
-            vo.setError("鏂矾鍣ㄦ晠闅�");
-            list.add(vo);
-        }
-        if (staProtocol.getInfraredErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-            vo.setPlcDesc("鍏夌數寮傚父");
-            vo.setError("鍏夌數寮傚父");
-            list.add(vo);
-        }
-        if (staProtocol.getOutTimeErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-
-            vo.setPlcDesc("杩愯瓒呮椂");
-            vo.setError("杩愯瓒呮椂");
-            list.add(vo);
-        }
-        if (staProtocol.getSeizeSeatErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-
-            vo.setPlcDesc("鍗犱綅瓒呮椂");
-            vo.setError("鍗犱綅瓒呮椂");
-            list.add(vo);
-        }
-        if (staProtocol.getWrkYgoodsN()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-
-            vo.setPlcDesc("鏈変换鍔℃棤璐ф晠闅�");
-            vo.setError("鏈変换鍔℃棤璐ф晠闅�");
-            list.add(vo);
-        }
-        if (staProtocol.getInverterErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-
-            vo.setPlcDesc("鍙橀鍣ㄦ晠闅�");
-            vo.setError("鍙橀鍣ㄦ晠闅�");
-            list.add(vo);
-        }
-        if (staProtocol.getContactErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-
-            vo.setPlcDesc("鐢垫満鎺ヨЕ鍣ㄦ晠闅�");
-            vo.setError("鐢垫満鎺ヨЕ鍣ㄦ晠闅�");
-            list.add(vo);
-        }
-        if (staProtocol.getUpcontactErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-
-            vo.setPlcDesc("椤跺崌鐢垫満鎺ヨЕ鍣ㄦ晠闅�");
-            vo.setError("椤跺崌鐢垫満鎺ヨЕ鍣ㄦ晠闅�");
-            list.add(vo);
-        }
-        if (staProtocol.isFrontErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-            vo.setPlcDesc("鍓嶈秴闄�");
-            vo.setError("鍓嶈秴闄�");
-            list.add(vo);
-        }
-        if (staProtocol.isBackErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-            vo.setPlcDesc("鍚庤秴闄�");
-            vo.setError("鍚庤秴闄�");
-            list.add(vo);
-        }
-        if (staProtocol.isHighErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-            vo.setPlcDesc("楂樿秴闄�");
-            vo.setError("楂樿秴闄�");
-            list.add(vo);
-        }
-        if (staProtocol.isLeftErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-            vo.setPlcDesc("宸﹁秴闄�");
-            vo.setError("宸﹁秴闄�");
-            list.add(vo);
-        }
-        if (staProtocol.isRightErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-            vo.setPlcDesc("鍙宠秴闄�");
-            vo.setError("鍙宠秴闄�");
-            list.add(vo);
-        }
-        if (staProtocol.isBarcodeErr()) {
-            PlcErrorTableVo vo = new PlcErrorTableVo();
-            vo.setNo(entry.getKey());   //  搴忓彿
-            vo.setPlcDesc("鎵爜澶辫触");
-            vo.setError("鎵爜澶辫触");
-            list.add(vo);
-        }
-
-
-        return list;
     }
 
 

--
Gitblit v1.9.1