#
Junjie
3 天以前 ce9c9af4a3710d17e17814bab629ab4ef474f3f1
src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
@@ -4,7 +4,9 @@
import com.core.common.SpringUtils;
import com.core.exception.CoolException;
import com.zy.asrs.entity.BasShuttle;
import com.zy.asrs.entity.DeviceConfig;
import com.zy.asrs.service.BasShuttleService;
import com.zy.asrs.service.DeviceConfigService;
import com.zy.asrs.utils.Utils;
import com.zy.common.model.MapNode;
import com.zy.common.model.NavigateNode;
@@ -18,7 +20,6 @@
import com.zy.core.model.command.ShuttleAssignCommand;
import com.zy.core.model.command.ShuttleCommand;
import com.zy.core.model.protocol.ShuttleProtocol;
import com.zy.core.properties.SlaveProperties;
import com.zy.core.thread.ShuttleThread;
import com.zy.system.entity.Config;
import com.zy.system.service.ConfigService;
@@ -45,9 +46,9 @@
    @Autowired
    private ConfigService configService;
    @Autowired
    private SlaveProperties slaveProperties;
    @Autowired
    private ShuttleDispatchUtils shuttleDispatchUtils;
    @Autowired
    private DeviceConfigService deviceConfigService;
    public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, Integer mapType, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread) {
        return getStartToTargetCommands(startLocNo, endLocNo, mapType, null, assignCommand, shuttleThread);
@@ -285,8 +286,11 @@
    private HashMap<String, Integer> findCarMap() {
        HashMap<String, Integer> carMap = new HashMap<>();
        for (ShuttleSlave slave : slaveProperties.getShuttle()) {
            ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, slave.getId());
        List<DeviceConfig> shuttleList = deviceConfigService.selectList(new EntityWrapper<DeviceConfig>()
                .eq("device_type", String.valueOf(SlaveType.Shuttle)));
        for (DeviceConfig device : shuttleList) {
            ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, device.getDeviceNo());
            if (shuttleThread == null) {
                continue;
            }
@@ -299,7 +303,7 @@
                continue;
            }
            carMap.put(currentLocNo, slave.getId());
            carMap.put(currentLocNo, device.getDeviceNo());
        }
        return carMap;
    }