| File was renamed from zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/kernel/command/ShuttleCommandService.java |
| | |
| | | //package com.zy.asrs.wcs.rcs.kernel.command; |
| | | //package com.zy.asrs.wcs.core.kernel.command; |
| | | // |
| | | //import com.zy.asrs.common.wms.mapper.WrkMastMapper; |
| | | //import com.zy.asrs.common.wms.service.LocMastService; |
| | | //import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | //import com.zy.asrs.wcs.core.model.command.ShuttleAssignCommand; |
| | | //import com.zy.asrs.wcs.core.model.command.ShuttleCommand; |
| | | //import com.zy.asrs.wcs.core.model.enums.DeviceCtgType; |
| | | //import com.zy.asrs.wcs.core.model.enums.MotionStsType; |
| | | //import com.zy.asrs.wcs.core.service.BasShuttleService; |
| | | //import com.zy.asrs.wcs.core.service.LocService; |
| | | //import com.zy.asrs.wcs.core.service.TaskService; |
| | | //import com.zy.asrs.wcs.core.utils.NavigateMapUtils; |
| | | //import com.zy.asrs.wcs.core.utils.RedisUtil; |
| | | //import com.zy.asrs.wcs.rcs.cache.SlaveConnection; |
| | | //import com.zy.asrs.wcs.rcs.entity.Motion; |
| | | //import com.zy.asrs.wcs.rcs.model.enums.SlaveType; |
| | | //import com.zy.asrs.wcs.rcs.model.protocol.ShuttleProtocol; |
| | | //import com.zy.asrs.wcs.rcs.service.MotionService; |
| | | //import com.zy.asrs.wcs.rcs.thread.ShuttleThread; |
| | | //import lombok.extern.slf4j.Slf4j; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.stereotype.Service; |
| | | // |
| | | //import java.util.ArrayList; |
| | | //import java.util.List; |
| | | //import java.util.Objects; |
| | | //import java.util.Optional; |
| | | // |
| | |
| | | // @Autowired |
| | | // private MotionService motionService; |
| | | // @Autowired |
| | | // private WrkMastMapper wrkMastMapper; |
| | | // private TaskService taskService; |
| | | // @Autowired |
| | | // private BasShuttleService basShuttleService; |
| | | // @Autowired |
| | | // private LocMastService locMastService; |
| | | // private LocService locService; |
| | | // @Autowired |
| | | // private NavigateMapUtils navigateMapUtils; |
| | | // |
| | |
| | | // public Boolean accept(Motion motion) { |
| | | // Integer deviceNo = Integer.parseInt(motion.getDevice()); |
| | | // ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, deviceNo); |
| | | // ShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol(); |
| | | // ShuttleProtocol shuttleProtocol = shuttleThread.getStatus(); |
| | | // if (null == shuttleProtocol) { |
| | | // return false; |
| | | // } |
| | | // if (shuttleProtocol.getBusyStatus().intValue() == ShuttleStatusType.BUSY.id |
| | | // || !shuttleProtocol.isIdle()) { |
| | | // if (!shuttleProtocol.getIdle()) {//设备不空闲 |
| | | // return false; |
| | | // } |
| | | // if (!shuttleProtocol.getPakMk()) { |
| | | // return false; |
| | | // } |
| | | // if (motionService.selectCount(new EntityWrapper<Motion>() |
| | | // .eq("device_ctg", DeviceCtgType.SHUTTLE.val()) |
| | | // .eq("device", motion.getDevice()) |
| | | // .eq("motion_sts", MotionStsType.EXECUTING.val())) > 0) { |
| | | // if (motionService.count(new LambdaQueryWrapper<Motion>() |
| | | // .eq(Motion::getDeviceCtg, DeviceCtgType.SHUTTLE.val()) |
| | | // .eq(Motion::getDevice, motion.getDevice()) |
| | | // .eq(Motion::getMotionSts, MotionStsType.EXECUTING.val())) > 0) { |
| | | // return false; |
| | | // } |
| | | // |