| | |
| | | |
| | | @Slf4j |
| | | @Data |
| | | public class LiftProtocol { |
| | | public class LiftProtocol implements Cloneable { |
| | | |
| | | //**********************必须存在属性********************** |
| | | /** |
| | |
| | | private Device device; |
| | | |
| | | /** |
| | | * 扩展字段 |
| | | */ |
| | | private Object extend; |
| | | |
| | | /** |
| | | * 设置提升机状态 |
| | | */ |
| | | public void setProtocolStatus(Integer status) { |
| | |
| | | this.protocolStatusType = status; |
| | | } |
| | | |
| | | public void setTaskNo(Integer taskNo) { |
| | | public synchronized void setTaskNo(Integer taskNo) { |
| | | RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class); |
| | | if (null != redisUtil) { |
| | | redisUtil.set(DeviceRedisConstant.LIFT_FLAG + this.liftNo, taskNo); |
| | |
| | | return this.taskNo == null ? 0 : this.taskNo; |
| | | } |
| | | |
| | | @Override |
| | | public LiftProtocol clone() { |
| | | try { |
| | | return (LiftProtocol) super.clone(); |
| | | } catch (CloneNotSupportedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |