| | |
| | | import com.zy.asrs.wcs.rcs.entity.Device; |
| | | import com.zy.asrs.wcs.rcs.entity.DeviceDataLog; |
| | | import com.zy.asrs.wcs.rcs.model.enums.LiftProtocolStatusType; |
| | | import com.zy.asrs.wcs.rcs.model.enums.SlaveType; |
| | | import com.zy.asrs.wcs.rcs.model.protocol.LiftProtocol; |
| | | import com.zy.asrs.wcs.rcs.service.DeviceDataLogService; |
| | | import com.zy.asrs.wcs.rcs.thread.LiftThread; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.text.MessageFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | |
| | | } |
| | | |
| | | @Override |
| | | public LiftCommand getMoveCommand(Integer taskNo, Integer sourceLev, Integer targetLev, Integer mode) { |
| | | public synchronized boolean setProtocolStatus(LiftProtocolStatusType status) { |
| | | this.liftProtocol.setProtocolStatus(status); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public synchronized boolean setSyncTaskNo(Integer taskNo) { |
| | | this.liftProtocol.setTaskNo(taskNo); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public boolean isLock(ExecuteSupport support) { |
| | | if (support != null) { |
| | | return support.judgement(); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public LiftCommand getMoveCommand(Integer taskNo, Integer sourceLev, Integer targetLev, LiftCommandModeType mode) { |
| | | /** |
| | | * 任务类型 |
| | | * 1=移托盘;升降机将源站台托盘移到目标站台 |
| | | * 2=移小车,升降机移到目标层,等待 |
| | | */ |
| | | short taskMode = 2; |
| | | if (mode == null) { |
| | | taskMode = mode.shortValue(); |
| | | if (mode.equals(LiftCommandModeType.PALLET_INOUT)) { |
| | | taskMode = 1; |
| | | } |
| | | |
| | | // 开始任务 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public LiftCommand getMoveWithShuttleCommand(Integer taskNo, Integer sourceLev, Integer targetLev, Integer mode) { |
| | | return getMoveCommand(taskNo, sourceLev, targetLev, 2); |
| | | public LiftCommand getMoveWithShuttleCommand(Integer taskNo, Integer sourceLev, Integer targetLev, LiftCommandModeType mode) { |
| | | return getMoveCommand(taskNo, sourceLev, targetLev, mode); |
| | | } |
| | | |
| | | @Override |
| | | public LiftCommand getPalletInOutCommand(Integer taskNo, Integer sourceLev, Integer targetLev, Integer originSta, Integer targetSta, Integer mode) { |
| | | return getMoveCommand(taskNo, sourceLev, targetLev, 1); |
| | | public LiftCommand getPalletInOutCommand(Integer taskNo, Integer sourceLev, Integer targetLev, Integer originSta, Integer targetSta, LiftCommandModeType mode) { |
| | | return getMoveCommand(taskNo, sourceLev, targetLev, mode); |
| | | } |
| | | |
| | | @Override |
| | | public LiftCommand getLockCommand(Integer taskNo, Boolean lock) { |
| | | LiftCommand command = new LiftCommand(); |
| | | return command; |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public LiftCommand getShuttleSignalCommand(Integer taskNo, Boolean signal) { |
| | | LiftCommand command = new LiftCommand(); |
| | | return command; |
| | | return null; |
| | | } |
| | | |
| | | @Override |