张世豪
2025-11-28 7acfc864d11de1fc41cabc2a5d4fad3894c2e5b0
src/chuankou/Sendmsg.java
@@ -6,11 +6,13 @@
import javax.swing.SwingWorker;
import chushihua.SlotManager;
import chushihua.lunxun;
import dialog.Charulog;
import dialog.Dingshidialog;
import dialog.Errlog;
import publicway.OpenDoor;
import publicway.TimestampUtil;
import xitongshezhi.SystemDebugDialog;
/**
@@ -55,6 +57,11 @@
            mesBuilder.append(command).append(";type").append(type).append("控制打开").append(slotId).append("柜门");
            String mes = mesBuilder.toString();
            
         // 获取当前时间
         String currentTime = TimestampUtil.getTimestamp();
         // 更新卡槽的收到发卡指令时间
         SlotManager.slotArray[slotId-1].setReceiveCardCommandTime(currentTime);
            Charulog.logOperation(mes);
            if (lunxun.DEBUG_ENABLED) {
                SystemDebugDialog.appendAsciiData(mes);
@@ -91,6 +98,11 @@
                        
                        if (!sent) {
                            Errlog.logOperation("发送指令到卡槽 " + slotId + " 失败");
                  }else {
                     // 获取当前时间
                     String currentTime = TimestampUtil.getTimestamp();
                     // 更新卡槽的收到发卡指令时间
                     SlotManager.slotArray[slotId-1].setReceiveCardCommandTime(currentTime);
                        }
                        
                        // 间隔100ms,但检查是否被取消