From 26784989e73fc36c6315e54939d1b13a50eb5020 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期四, 26 三月 2026 21:03:00 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/network/real/ZyStationV4RealConnect.java |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/core/network/real/ZyStationV4RealConnect.java b/src/main/java/com/zy/core/network/real/ZyStationV4RealConnect.java
index b5a45d8..6e91763 100644
--- a/src/main/java/com/zy/core/network/real/ZyStationV4RealConnect.java
+++ b/src/main/java/com/zy/core/network/real/ZyStationV4RealConnect.java
@@ -274,6 +274,44 @@
     }
 
     @Override
+    public CommandResponse clearTaskBufferSlot(Integer deviceNo, Integer stationId, Integer slotIdx) {
+        CommandResponse commandResponse = new CommandResponse(false);
+        if (stationId == null) {
+            commandResponse.setMessage("绔欑偣鍙蜂负绌�");
+            return commandResponse;
+        }
+        if (slotIdx == null || slotIdx <= 0 || slotIdx > TASK_AREA_SLOT_COUNT) {
+            commandResponse.setMessage("缂撳瓨鍖烘Ы浣嶆棤鏁�");
+            return commandResponse;
+        }
+
+        getStatus(deviceNo);
+
+        int stationIdx = findIndex(stationId);
+        if (stationIdx < 0) {
+            commandResponse.setMessage("鏈壘鍒扮珯鐐圭姸鎬�");
+            return commandResponse;
+        }
+
+        int slotBaseOffset = stationIdx * TASK_AREA_LENGTH + slotIdx * TASK_AREA_SLOT_SIZE;
+        CommandResponse clearTaskNo = sendOriginCommand("DB13." + slotBaseOffset, new short[]{0, 0});
+        if (clearTaskNo == null || !Boolean.TRUE.equals(clearTaskNo.getResult())) {
+            commandResponse.setMessage(clearTaskNo == null ? "娓呯┖浠诲姟鍙峰け璐�" : clearTaskNo.getMessage());
+            return commandResponse;
+        }
+
+        CommandResponse clearTarget = sendOriginCommand("DB13." + (slotBaseOffset + 6), new short[]{0});
+        if (clearTarget == null || !Boolean.TRUE.equals(clearTarget.getResult())) {
+            commandResponse.setMessage(clearTarget == null ? "娓呯┖鐩爣绔欏け璐�" : clearTarget.getMessage());
+            return commandResponse;
+        }
+
+        commandResponse.setResult(true);
+        commandResponse.setMessage("缂撳瓨鍖烘Ы浣嶆竻鐞嗘垚鍔�");
+        return commandResponse;
+    }
+
+    @Override
     public synchronized CommandResponse sendOriginCommand(String address, short[] data) {
         CommandResponse commandResponse = new CommandResponse(false);
         if (null == data || data.length == 0) {

--
Gitblit v1.9.1