#
Junjie
2025-11-12 885633a6a4da38c530c033796fcd3dead72349c0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.zy.core.thread.impl;
 
import com.zy.core.thread.StationThread;
import com.zy.asrs.entity.DeviceConfig;
import com.zy.common.utils.RedisUtil;
import com.zy.core.network.ZyStationConnectDriver;
import com.zy.core.model.CommandResponse;
import com.zy.core.model.command.StationCommand;
import com.zy.core.network.entity.ZyStationStatusEntity;
import java.util.Collections;
import java.util.List;
 
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
 
/**
 * 输送站线程
 */
@Data
@Slf4j
public class ZyStationThread implements Runnable, StationThread {
 
    private DeviceConfig deviceConfig;
    private RedisUtil redisUtil;
    private ZyStationConnectDriver zyStationConnectDriver;
 
    public ZyStationThread(DeviceConfig deviceConfig, RedisUtil redisUtil) {
        this.deviceConfig = deviceConfig;
        this.redisUtil = redisUtil;
    }
 
    @Override
    public boolean connect() {
        return true;
    }
 
    @Override
    public void close() {
    }
 
    @Override
    public List<ZyStationStatusEntity> getStatus() {
        if (zyStationConnectDriver == null) {
            return Collections.emptyList();
        }
        return zyStationConnectDriver.getStatus();
    }
 
    @Override
    public StationCommand getMoveCommand() {
        return null;
    }
 
    @Override
    public CommandResponse sendCommand(StationCommand command) {
        return new CommandResponse(true);
    }
 
    @Override
    public void run() {
    }
}