| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.asrs.framework.common.Cools; |
| | | import com.zy.asrs.framework.common.SpringUtils; |
| | | import com.zy.asrs.wcs.core.entity.Loc; |
| | | import com.zy.asrs.wcs.core.service.LocService; |
| | | import com.zy.asrs.wcs.core.utils.RedisUtil; |
| | | import com.zy.asrs.wcs.rcs.constant.DeviceRedisConstant; |
| | | import com.zy.asrs.wcs.rcs.model.enums.ShuttleDeviceStatusType; |
| | | import com.zy.asrs.wcs.rcs.model.enums.ShuttleProtocolStatusType; |
| | | import com.zy.asrs.wcs.rcs.entity.Device; |
| | | import com.zy.asrs.wcs.rcs.entity.ShuttleDeviceStatus; |
| | | import com.zy.asrs.wcs.rcs.model.enums.SlaveType; |
| | | import com.zy.asrs.wcs.rcs.service.ShuttleDeviceStatusService; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | return this.taskNo == null ? 0 : this.taskNo; |
| | | } |
| | | |
| | | //通过当前二维码获取当前库位号 |
| | | public String getCurrentLocNo() { |
| | | LocService locService = SpringUtils.getBean(LocService.class); |
| | | if (locService == null) { |
| | | return null; |
| | | } |
| | | if (this.currentCode == null) { |
| | | return null; |
| | | } |
| | | |
| | | //源库位(小车当前位置) |
| | | Loc currentLoc = locService.getOne(new LambdaQueryWrapper<Loc>() |
| | | .eq(Loc::getCode, this.currentCode) |
| | | .eq(Loc::getHostId, this.device.getHostId())); |
| | | if (currentLoc == null) { |
| | | return null; |
| | | } |
| | | |
| | | return currentLoc.getLocNo(); |
| | | } |
| | | |
| | | } |