huang
16 小时以前 9c489617b002e71859597097c9d1d2f1b9fc0e56
mes-processes/mes-plcSend/src/main/java/com/mes/plc/factory/PlcClientFactory.java
@@ -118,10 +118,17 @@
        }
        
        // 根据PLC类型创建不同的客户端
        if (plcType.startsWith("S7")) {
        // 支持 S7_1200, S7_1500 等格式,也支持 S1200, S1500 等格式
        String normalizedPlcType = plcType.toUpperCase();
        if (normalizedPlcType.startsWith("S7") ||
            normalizedPlcType.startsWith("S1200") ||
            normalizedPlcType.startsWith("S1500") ||
            normalizedPlcType.startsWith("S200") ||
            normalizedPlcType.startsWith("S300") ||
            normalizedPlcType.startsWith("S400")) {
            // S7协议客户端
            return createS7Client(device);
        } else if (plcType.equals("MODBUS")) {
        } else if (normalizedPlcType.equals("MODBUS")) {
            // Modbus协议客户端
            return createModbusClient(device);
        } else {