| | |
| | | */ |
| | | public synchronized void locToCrnStn(CrnSlave slave, CrnProtocol crnProtocol,Integer mark) { |
| | | News.warnNoLog(""+mark+" - 2"+" - 0"+" - 堆垛机入出库作业下发:执行出库"); |
| | | boolean crnAvailableOut = false; |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","removeCrnAvailableOut")); |
| | | if (config != null && config.getStatus() == 1) { |
| | | crnAvailableOut = true; |
| | | } |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnOutStn()) { |
| | | // 获取工作状态为11(生成出库ID)的出库工作档 |
| | | List<WrkMast> wrkMasts = wrkMastMapper.selectPakOutStep11(slave.getId(), crnStn.getStaNo()); |
| | |
| | | } |
| | | |
| | | // 判断堆垛机出库站状态 |
| | | if ((staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) |
| | | || (staProtocol.getSiteId() == 1056 && staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y"))) { |
| | | if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") && |
| | | (crnAvailableOut || !staProtocol.isLoading() && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable())) { |
| | | // 堆垛机控制过滤 |
| | | if (!crnProtocol.getStatusType().equals(CrnStatusType.IDLE) || crnProtocol.getTaskNo() != 0) { |
| | | break; |
| | |
| | | // 获取堆垛机信息 |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | | CrnProtocol crnProtocol = crnThread.getCrnProtocol(); |
| | | if(crnProtocol == null) { |
| | | continue; |
| | | } |
| | | if (crnProtocol.getStatusType() == CrnStatusType.IDLE && crnProtocol.getTaskNo() == 0 && crnProtocol.getModeType() == CrnModeType.AUTO |
| | | && crnProtocol.getLoaded() == 0 && crnProtocol.getForkPos() == 0) { |
| | | // 判断是不是已在原点 |