| | |
| | | log.error("物料码扫码失败"); |
| | | back = true; |
| | | } |
| | | if(barcode.equals("0")){ |
| | | continue; |
| | | } |
| | | // 退回 |
| | | if (back) { |
| | | News.warn("扫码入库失败,{}入库站因{}异常,托盘已被退回", inSta.getStaNo(), errMsg); |
| | |
| | | && staProtocol.isPakMk() |
| | | && staProtocol.getWorkNo() == 0 |
| | | ) { |
| | | |
| | | if(Cools.isEmpty(barcode) || "NG".endsWith(barcode) || "NoRead".equals(barcode)) { |
| | | // News.error(JSON.toJSONString(staProtocol)); |
| | | News.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); |
| | |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | log.error("输送线下发1:"+wrkNo+","+inSta.getBackSta()); |
| | | continue; |
| | | } |
| | | if(barcode.equals("0")){ |
| | | continue; |
| | | } |
| | | // if (staProtocol.getSiteId()!= 159){ |
| | |
| | | log.error("机械臂抓取任务完成组托失败"+e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | * arm任务完成自动组托 |
| | | * */ |
| | | public synchronized void armMissionAccomplished2() { |
| | | try{ |
| | | List<BasArm> basArmList = basArmService.selectList(new EntityWrapper<BasArm>().gt("arm_no",4)); |
| | | for (BasArm basArm : basArmList) { |
| | | if (basArm.getStatus()!=1){ |
| | | continue; |
| | | } |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", basArm.getStaNoSou())); |
| | | if (Cools.isEmpty(locMast)){ |
| | | continue; |
| | | } |
| | | try{ |
| | | List<BasArmMast> basArmMastList = basArmMastService.selectList( |
| | | new EntityWrapper<BasArmMast>() |
| | | .eq("arm_no", basArm.getArmNo()) |
| | | .eq("sorting_line", basArm.getSortingLineSou()) |
| | | .eq("status", 3) |
| | | ); |
| | | if (basArmMastList.isEmpty()){ |
| | | continue; |
| | | } |
| | | CombParam combParam = new CombParam(basArmMastList); |
| | | //arm任务完成自动组托 |
| | | ReturnT<String> result = new PostMesDataUtils().postMesData("arm任务完成自动组托",wmsUrl, wmsComb, combParam); |
| | | if (result.getCode()==200){ |
| | | basArmMastService.updateArmMastStatus(basArm.getArmNo(),basArm.getSortingLineSou(),3,5); |
| | | locMast.setLocSts("R"); |
| | | locMastService.updateById(locMast); |
| | | } else { |
| | | armTaskAssignmentCallApiLogSave(locMast, "自动组托失败", basArm.getStaNoSou()+"码垛位置,===》自动组托失败,等待重试", false); |
| | | // log.error("机械臂抓取任务完成:"+JSON.toJSON(basArmMastList)+"===》自动组托失败,等待重试"); |
| | | } |
| | | } catch (Exception e){ |
| | | armTaskAssignmentCallApiLogSave(locMast, "自动组托失败", basArm.getStaNoSou()+"码垛位置,===》自动组托失败,等待重试", false); |
| | | // log.error("arm编号:"+basArm.getArmNo()+"====》机械臂抓取任务完成"+e.getMessage()); |
| | | } |
| | | break; |
| | | } |
| | | } catch (Exception e){ |
| | | log.error("机械臂抓取任务完成组托失败"+e.getMessage()); |
| | | } |
| | | } |
| | | public synchronized void armMissionAccomplishedScanToCheckIn() { |
| | | try{ |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |