#
zjj
2024-06-19 f11ce451cef38b58a189e92d943566282e6a316c
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/LiftDispatcher.java
@@ -1,6 +1,7 @@
package com.zy.asrs.wcs.core.utils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zy.asrs.wcs.core.entity.BasLift;
import com.zy.asrs.wcs.core.entity.ShuttleStandby;
import com.zy.asrs.wcs.core.model.NavigateNode;
import com.zy.asrs.wcs.core.model.enums.DeviceCtgType;
@@ -33,8 +34,9 @@
    /**
     * 根据目标位置搜索空闲提升机
     * transfer: 是否可换层
     */
    public LiftThread searchIdleLift(String locNo, Long hostId) {
    public LiftThread searchIdleLift(String locNo, Long hostId, Boolean transfer) {
        LiftThread recentLiftThread = null;
        Integer finalDistance = Integer.MAX_VALUE;
        List<Device> list = deviceService.list(new LambdaQueryWrapper<Device>()
@@ -56,6 +58,16 @@
                continue;
            }
            if (transfer) {
                BasLift basLift = basLiftService.getOne(new LambdaQueryWrapper<BasLift>().eq(BasLift::getLiftNo, device.getDeviceNo()).eq(BasLift::getHostId, hostId));
                if (basLift == null) {
                    continue;
                }
                if (basLift.getTransfer() != 1) {
                    continue;//提升机被设置成不可换层
                }
            }
            ShuttleStandby standby = shuttleStandbyService.getOne(new LambdaQueryWrapper<ShuttleStandby>()
                    .eq(ShuttleStandby::getDeviceId, device.getId())
                    .eq(ShuttleStandby::getDeviceLev, Utils.getLev(locNo))