| | |
| | | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | @Value("${wcs-slave.isToOrigin}") |
| | | private boolean isToOrigin; |
| | | |
| | | public Integer wrkNo = 10000; |
| | | |
| | |
| | | StaProtocol staProtocol = devpThread.getStation().get(pickSta.getStaNo()); |
| | | |
| | | if(staProtocol == null) { |
| | | News.error("站点信息未获得"); |
| | | // News.error("站点信息未获得"); |
| | | continue; |
| | | } |
| | | // 尺寸检测异常 |
| | |
| | | } |
| | | // News.infoNoLog(""+mark+" - 0"+" - 堆垛机站出库到出库站 ===》执行完成"); |
| | | } |
| | | /** |
| | | * 堆垛机默认回原点 |
| | | */ |
| | | public synchronized void crnToInStn(Integer mark) { |
| | | if(isToOrigin){ |
| | | for (CrnSlave crn : slaveProperties.getCrn()){ |
| | | // 获取堆垛机信息 |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | | CrnProtocol crnProtocol = crnThread.getCrnProtocol(); |
| | | if (crnProtocol == null) { |
| | | continue; |
| | | } |
| | | BasCrnp basCrnp = basCrnpService.selectById(crn.getId()); |
| | | if (basCrnp == null) { |
| | | News.error("" + mark + " - 1" + " - {}号堆垛机尚未在数据库进行维护!", crn.getId()); |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 入出库 ===>> 堆垛机入出库作业下发 |
| | |
| | | crnCommand.setDestinationPosX((short) (locMast.getRow1() + slave.getOffset())); // 目标库位排 |
| | | crnCommand.setDestinationPosY((short) (locMast.getBay1() + slave.getOffset())); // 目标库位列 |
| | | crnCommand.setDestinationPosZ((short) (locMast.getLev1() + slave.getOffset())); // 目标库位层 |
| | | crnCommand.setTraySize(locMast.getLocType1() == 2); |
| | | // crnCommand.setTraySize(locMast.getLocType1() == 2); |
| | | if (!MessageQueue.offer(SlaveType.Crn, wrkMast.getCrnNo(), new Task(2, crnCommand))) { |
| | | News.error("" + mark + " - 1" + " - 16" + " - 堆垛机命令下发失败,堆垛机号={},任务数据={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand)); |
| | | } else { |
| | |
| | | |
| | | try { |
| | | LocTypeDto locTypeDto = new LocTypeDto(staProtocol); |
| | | |
| | | SearchLocParam param = new SearchLocParam(); |
| | | locTypeDto.setLocType1((short) 1); |
| | | param.setIoType(10); |
| | | param.setSourceStaNo(emptyInSta.getStaNo()); |
| | | param.setLocType1(locTypeDto.getLocType1()); |