| | |
| | | package com.zy.asrs.wcs.rcs.model.protocol; |
| | | |
| | | import com.zy.asrs.framework.common.Cools; |
| | | import com.zy.asrs.framework.common.SpringUtils; |
| | | import com.zy.asrs.wcs.core.utils.RedisUtil; |
| | | import com.zy.asrs.wcs.rcs.constant.DeviceRedisConstant; |
| | | import com.zy.asrs.wcs.rcs.entity.Device; |
| | | import com.zy.asrs.wcs.rcs.model.enums.LiftProtocolStatusType; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 提升机号 |
| | | */ |
| | | private String liftNo; |
| | | private Integer liftNo; |
| | | |
| | | /** |
| | | * 任务号 |
| | | */ |
| | | private String taskNo; |
| | | private Integer taskNo; |
| | | |
| | | /** |
| | | * 四向穿梭车号 |
| | |
| | | this.protocolStatusType = status; |
| | | } |
| | | |
| | | public void setTaskNo(Integer taskNo) { |
| | | RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); |
| | | if (null != redisUtil) { |
| | | redisUtil.set(DeviceRedisConstant.LIFT_FLAG + this.liftNo, taskNo); |
| | | this.taskNo = taskNo; |
| | | } |
| | | } |
| | | |
| | | public Integer getTaskNo() { |
| | | RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); |
| | | if (null != redisUtil) { |
| | | Object o = redisUtil.get(DeviceRedisConstant.LIFT_FLAG + this.liftNo); |
| | | if (!Cools.isEmpty(o)) { |
| | | this.taskNo = Integer.valueOf(String.valueOf(o)); |
| | | } |
| | | } |
| | | return this.taskNo == null ? 0 : this.taskNo; |
| | | } |
| | | |
| | | } |