| | |
| | | import com.zy.core.model.command.LedCommand; |
| | | import com.zy.core.model.command.SteCommand; |
| | | import com.zy.core.model.protocol.CrnProtocol; |
| | | import com.zy.core.model.protocol.ShuttleProtocol; |
| | | import com.zy.core.model.protocol.StaProtocol; |
| | | import com.zy.core.model.protocol.SteProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.thread.BarcodeThread; |
| | | import com.zy.core.thread.LedThread; |
| | | import com.zy.core.thread.SiemensDevpThread; |
| | | import com.zy.core.thread.SteThread; |
| | | import com.zy.core.thread.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 入出库 ===>> 四向穿梭车入出库作业下发 |
| | | */ |
| | | public synchronized void shuttleIoExecute() { |
| | | for (ShuttleSlave shuttle : slaveProperties.getShuttle()) { |
| | | //获取四向穿梭车信息 |
| | | ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttle.getId()); |
| | | ShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol(); |
| | | if (shuttleProtocol == null) { |
| | | continue; |
| | | } |
| | | |
| | | // 只有当四向穿梭车空闲 并且无任务时才继续执行 |
| | | if (shuttleProtocol.getBusyStatusType() == ShuttleStatusType.IDLE && shuttleProtocol.getTaskNo() == 0) { |
| | | //入出库逻辑 |
| | | //..... |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 入出库 ===>> 堆垛机入出库作业下发 |
| | | */ |
| | | public synchronized void crnIoExecute(){ |
| | |
| | | .eq("bay1",locMast.getBay1()).eq("lev1",locMast.getLev1())); |
| | | for (LocMast locMast1:locMasts){ |
| | | if (locMast1.getRow1()>locMast.getRow1()){ |
| | | if (!locMast1.getLocSts().equals("F")){ |
| | | if (!locMast1.getLocSts().equals("F") && !locMast1.getLocSts().equals("D")){ |
| | | if (!locMast1.getLocSts().equals("X")){ |
| | | sign=true; |
| | | break; |
| | | } |
| | | } |
| | | }else if (locMast1.getRow1()<locMast.getRow1()){ |
| | | if (locMast1.getLocSts().equals("F")){ |
| | | if (locMast1.getLocSts().equals("F") || locMast1.getLocSts().equals("D")){ |
| | | News.error("当前工作档目标库位所在排前边存在货物!", wrkMast.getWrkNo()); |
| | | sign=true; |
| | | break; |
| | |
| | | .eq("bay1",locMast.getBay1()).eq("lev1",locMast.getLev1())); |
| | | for (LocMast locMast1:locMasts){ |
| | | if (locMast1.getRow1()>locMast.getRow1()){ |
| | | if (locMast1.getLocSts().equals("F")){ |
| | | if (locMast1.getLocSts().equals("F") || locMast1.getLocSts().equals("D")){ |
| | | News.error("当前工作档目标库位所在排前边存在货物!", wrkMast.getWrkNo()); |
| | | sign=true; |
| | | break; |
| | | } |
| | | }else if (locMast1.getRow1()<locMast.getRow1()){ |
| | | if (!locMast1.getLocSts().equals("F")){ |
| | | if (!locMast1.getLocSts().equals("F") && !locMast1.getLocSts().equals("D")){ |
| | | if (!locMast1.getLocSts().equals("X")){ |
| | | sign=true; |
| | | break; |
| | |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | public synchronized void loopSteCharge() { |
| | | if (!Cools.isEmpty(wrkMastMapper.selectAllC())){ |
| | | return; |
| | | } |
| | | if (null != wrkChargeService.selectWorking(null, WrkChargeType.reset)) { |
| | | return; |
| | | } |