| | |
| | | /** |
| | | * 四向穿梭车号 |
| | | */ |
| | | private String shuttleNo; |
| | | private Integer shuttleNo; |
| | | |
| | | /** |
| | | * 任务号 |
| | |
| | | * 是否顶升 |
| | | */ |
| | | private Boolean hasLift; |
| | | |
| | | /** |
| | | * 是否有托盘 |
| | | */ |
| | | private Boolean hasPallet; |
| | | |
| | | /** |
| | | * 行驶方向 |
| | |
| | | private Device device; |
| | | |
| | | /** |
| | | * 扩展字段 |
| | | */ |
| | | private Object extend; |
| | | |
| | | /** |
| | | * 设置小车状态 |
| | | */ |
| | | public void setProtocolStatus(Integer status) { |
| | |
| | | return this.taskNo == null ? 0 : this.taskNo; |
| | | } |
| | | |
| | | public void setTaskNo(Integer taskNo) { |
| | | RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); |
| | | if (null != redisUtil) { |
| | | redisUtil.set(DeviceRedisConstant.SHUTTLE_FLAG + this.shuttleNo, taskNo); |
| | | this.taskNo = taskNo; |
| | | } |
| | | } |
| | | |
| | | //通过当前二维码获取当前库位号 |
| | | public String getCurrentLocNo() { |
| | | LocService locService = SpringUtils.getBean(LocService.class); |
| | |
| | | } |
| | | |
| | | return currentLoc.getLocNo(); |
| | | } |
| | | |
| | | // 是否处于空闲待命状态 |
| | | public Boolean isIdle() { |
| | | if (this.deviceStatus == null |
| | | || this.pakMk == null |
| | | || this.errorCode == null |
| | | || this.protocolStatus == null |
| | | ) { |
| | | return false; |
| | | } |
| | | |
| | | boolean res = this.deviceStatus.equals(ShuttleDeviceStatusType.IDLE) |
| | | && this.pakMk |
| | | && !this.errorCode.equals("0") |
| | | && this.getTaskNo() == 0 |
| | | && this.protocolStatus.intValue() == ShuttleProtocolStatusType.IDLE.id |
| | | ; |
| | | return res; |
| | | } |
| | | |
| | | } |