| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | |
| | | && !staProtocol.isEmptyMk() && (workNo == 0 || (workNo >= 9990 && workNo <= 9999)) |
| | | && staProtocol.isPakMk()) { |
| | | |
| | | // 尺寸检测异常 |
| | | boolean back = false; |
| | | String errMsg = ""; |
| | | if (staProtocol.isFrontErr()) { |
| | | errMsg = "前超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isBackErr()) { |
| | | errMsg = "后超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isHighErr()) { |
| | | errMsg = "高超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isLeftErr()) { |
| | | errMsg = "左超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isRightErr()) { |
| | | errMsg = "右超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isWeightErr()) { |
| | | errMsg = "超重"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isBarcodeErr()) { |
| | | errMsg = "扫码失败"; |
| | | back = true; |
| | | } |
| | | |
| | | // 退回 |
| | | if (back) { |
| | | log.warn("扫码入库失败,{}入库站因{}异常,托盘已被退回", inSta.getStaNo(), errMsg); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | |
| | | // led 异常显示 |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); |
| | | if (ledThread != null) { |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errMsg)); |
| | | } |
| | | continue; |
| | | } |
| | | |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | |
| | | if(!Cools.isEmpty(barcode)) { |
| | | // log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode); |
| | | if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) { |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | continue; |
| | | } |
| | | } else { |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | } |
| | | |
| | | // 过滤盘点/拣料/并板任务 |
| | | if (null != wrkMastMapper.selectPickStepByBarcode(barcode)) { |
| | | continue; |
| | | } |
| | | // if (null != wrkMastMapper.selectPickStepByBarcode(barcode)) { |
| | | // continue; |
| | | // } |
| | | |
| | | // 判断重复工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode); |
| | | if (wrkMast != null) { |
| | | log.error("工作档中已存在该站状态为( 2.设备上走 )的数据,工作号={}", wrkMast.getWrkNo()); |
| | | continue; |
| | | } |
| | | // WrkMast wrkMast = wrkMastMapper.selectPakInStep1(inSta.getStaNo(), barcode); |
| | | // if (wrkMast != null) { |
| | | // log.error("工作档中已存在该站状态为( 2.设备上走 )的数据,工作号={}", wrkMast.getWrkNo()); |
| | | // continue; |
| | | // } |
| | | |
| | | try { |
| | | LocTypeDto locTypeDto = new LocTypeDto(staProtocol); |
| | |
| | | } |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response); |
| | | } else if (code == 700) { |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | * wms入库 |
| | | * 入库站,根据条码扫描生成入库工作档,工作状态 1 ==>> 2 |
| | | */ |
| | | @Deprecated |
| | | public void generateStoreWrkFile0() { |
| | | // 根据输送线plc遍历 |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | |
| | | && staProtocol.isInEnable() |
| | | && !staProtocol.isEmptyMk() && (workNo == 0 || (workNo >= 9990 && workNo <= 9999)) |
| | | && staProtocol.isPakMk()) { |
| | | |
| | | // 尺寸检测异常 |
| | | boolean back = false; |
| | | String errMsg = ""; |
| | | if (staProtocol.isFrontErr()) { |
| | | errMsg = "前超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isBackErr()) { |
| | | errMsg = "后超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isHighErr()) { |
| | | errMsg = "高超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isLeftErr()) { |
| | | errMsg = "左超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isRightErr()) { |
| | | errMsg = "右超限"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isWeightErr()) { |
| | | errMsg = "超重"; |
| | | back = true; |
| | | } |
| | | if (!back && staProtocol.isBarcodeErr()) { |
| | | errMsg = "扫码失败"; |
| | | back = true; |
| | | } |
| | | |
| | | // 退回 |
| | | if (back) { |
| | | log.warn("扫码入库失败,{}入库站因{}异常,托盘已被退回", inSta.getStaNo(), errMsg); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(inSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | |
| | | // led 异常显示 |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed()); |
| | | if (ledThread != null) { |
| | | MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errMsg)); |
| | | } |
| | | continue; |
| | | } |
| | | |
| | | // 判断重复工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectPakInStep11(inSta.getStaNo()); |
| | | if (wrkMast == null) { continue; } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 拣料、并板、盘点再入库 【第1阶段】 |
| | | * 拣料、并板、盘点再入库 |
| | | */ |
| | | public synchronized void stnToCrnStnPick0(){ |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历拣料入库口 |
| | | for (DevpSlave.Sta pickSta : devp.getPickOutSta()) { |
| | | |
| | | // 获取拣料入库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(pickSta.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | if (staProtocol.isAutoing() |
| | | && staProtocol.isLoading() |
| | | && staProtocol.isInEnable() |
| | | && staProtocol.getWorkNo() > 0 |
| | | && staProtocol.isPakMk()) { |
| | | WrkMast wrkMast = wrkMastMapper.selectPickStep(staProtocol.getWorkNo()); |
| | | if (wrkMast == null) { |
| | | // 无拣料数据 |
| | | continue; |
| | | } |
| | | short staNo; |
| | | switch (wrkMast.getSourceStaNo()) { |
| | | case 104: |
| | | case 108: |
| | | staNo = 103; |
| | | break; |
| | | case 204: |
| | | case 208: |
| | | staNo = 203; |
| | | break; |
| | | default: |
| | | log.error("{}任务再入库失败,系统数据异常!", wrkMast.getWrkNo()); |
| | | continue; |
| | | } |
| | | // 更新站点信息 且 下发plc命令 |
| | | // staProtocol.setWorkNo((short) 9994); |
| | | staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(staNo); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | if (!result) { |
| | | log.error("发布命令至输送线队列失败!!! [plc编号:{}]", devp.getId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 拣料、并板、盘点再入库【第2阶段】 |
| | | */ |
| | | public synchronized void stnToCrnStnPick1(){ |
| | | public synchronized void stnToCrnStnPick(){ |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历拣料入库口 |
| | | for (DevpSlave.Sta pickSta : devp.getPickInSta()) { |
| | |
| | | && staProtocol.isLoading() |
| | | && staProtocol.isInEnable() |
| | | // 0 - 9990 或者 9996 |
| | | && ((staProtocol.getWorkNo() > 0 && staProtocol.getWorkNo() < 9990) || staProtocol.getWorkNo() == 9996) |
| | | && (staProtocol.getWorkNo() > 0 && staProtocol.getWorkNo() < 9990) |
| | | && staProtocol.getStaNo().equals(staProtocol.getSiteId().shortValue()) |
| | | && staProtocol.isPakMk()){ |
| | | |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | | // BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, pickSta.getBarcode()); |
| | | // if (barcodeThread == null) { |
| | | // continue; |
| | | // } |
| | | |
| | | WrkMast wrkMast = null; |
| | | if (staProtocol.getWorkNo() > 0 && staProtocol.getWorkNo() < 9990) { |
| | | wrkMast = wrkMastMapper.selectPickStep(staProtocol.getWorkNo()); |
| | | if (null == wrkMast) { |
| | | log.error("{}任务号错误,暂无拣料任务!", staProtocol.getWorkNo()); |
| | | } |
| | | } |
| | | if (staProtocol.getWorkNo() == 9996) { |
| | | String barcode = barcodeThread.getBarcode(); |
| | | if(!Cools.isEmpty(barcode)) { |
| | | log.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode); |
| | | if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) { |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setStaNo(pickSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | |
| | | // led 异常显示 |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, pickSta.getLed()); |
| | | if (ledThread != null) { |
| | | String errorMsg = "扫码失败,请重试"; |
| | | MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, errorMsg)); |
| | | } |
| | | continue; |
| | | } |
| | | } else { |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setStaNo(pickSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | |
| | | // led 异常显示 |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, pickSta.getLed()); |
| | | if (ledThread != null) { |
| | | String errorMsg = "扫码失败,请重试"; |
| | | MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, errorMsg)); |
| | | } |
| | | continue; |
| | | } |
| | | wrkMast = wrkMastMapper.selectPickStepByBarcode(barcode); |
| | | if (null == wrkMast) { |
| | | log.error("{}条码错误,暂无拣料任务!", barcode); |
| | | } |
| | | } |
| | | |
| | | if (wrkMast == null) { |
| | | // 无拣料数据 |
| | | } else { |
| | | continue; |
| | | } |
| | | // if (staProtocol.getWorkNo() == 9996) { |
| | | // String barcode = barcodeThread.getBarcode(); |
| | | // if(!Cools.isEmpty(barcode)) { |
| | | // log.info("{}号条码扫描器检测条码信息:{}", pickSta.getBarcode(), barcode); |
| | | // if("NG".endsWith(barcode) || "NoRead".equals(barcode) || "empty".equals(barcode)) { |
| | | // staProtocol.setWorkNo((short) 32002); |
| | | // staProtocol.setStaNo(pickSta.getBackSta().shortValue()); |
| | | // devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | // MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | // |
| | | // // led 异常显示 |
| | | // LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, pickSta.getLed()); |
| | | // if (ledThread != null) { |
| | | // String errorMsg = "扫码失败,请重试"; |
| | | // MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, errorMsg)); |
| | | // } |
| | | // continue; |
| | | // } |
| | | // } else { |
| | | // staProtocol.setWorkNo((short) 32002); |
| | | // staProtocol.setStaNo(pickSta.getBackSta().shortValue()); |
| | | // devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | // MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | // |
| | | // // led 异常显示 |
| | | // LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, pickSta.getLed()); |
| | | // if (ledThread != null) { |
| | | // String errorMsg = "扫码失败,请重试"; |
| | | // MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, errorMsg)); |
| | | // } |
| | | // continue; |
| | | // } |
| | | // wrkMast = wrkMastMapper.selectPickStepByBarcode(barcode); |
| | | // if (null == wrkMast) { |
| | | // log.error("{}条码错误,暂无拣料任务!", barcode); |
| | | // } |
| | | // } |
| | | if ((wrkMast.getIoType() != 103 && wrkMast.getIoType() != 104 && wrkMast.getIoType() != 107) |
| | | || Cools.isEmpty(wrkMast.getStaNo()) || Cools.isEmpty(wrkMast.getSourceStaNo()) ) { |
| | | continue; |
| | |
| | | param.setWrkNo(wrkMast.getWrkNo()); |
| | | param.setIoType(wrkMast.getIoType()); |
| | | param.setSourceStaNo(pickSta.getStaNo()); |
| | | param.setLocType1(locTypeDto.getLocType1()); |
| | | // param.setLocType1(locTypeDto.getLocType1()); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/rpc/pakin/loc/v1") |
| | |
| | | if (wrkMastMapper.setSteEmpty(wrkMast.getWrkNo()) == 0) { |
| | | throw new CoolException(wrkMast.getWrkNo() + "更新工作档数据状态失败"); |
| | | } |
| | | // 修改源库位状态 O.空库位 |
| | | LocMast locMast = locMastService.selectById(sourceLocNo); |
| | | locMast.setLocSts("O"); |
| | | locMast.setModiTime(new Date()); |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException(wrkMast.getWrkNo() + "修改源库位状态 O.空库位"); |
| | | } |
| | | // 修改目标库位状态 Q.拣料/盘点/并板再入库 |
| | | locMast = locMastService.selectById(wrkMast.getLocNo()); |
| | | locMast.setLocSts("Q"); |
| | | locMast.setModiTime(new Date()); |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException(wrkMast.getWrkNo() + "修改目标库位状态 Q.拣料/盘点/并板再入库"); |
| | | } |
| | | // 库存明细转移 |
| | | if (!locDetlService.updateLocNo(wrkMast.getLocNo(), sourceLocNo)) { |
| | | throw new CoolException(wrkMast.getWrkNo() + "任务库存明细转移失败!!!"); |
| | | } |
| | | |
| | | // 条码设备处理 |
| | | barcodeThread.setBarcode(""); |
| | | |
| | | // 更新站点信息 且 下发plc命令 |
| | | staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue()); |
| | |
| | | } |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response); |
| | | } else { |
| | | staProtocol.setWorkNo((short) 9995); |
| | | staProtocol.setWorkNo((short) 32002); |
| | | staProtocol.setStaNo(pickSta.getBackSta().shortValue()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | // continue; |
| | | } |
| | | |
| | | } |
| | |
| | | /** |
| | | * 堆垛机站出库到出库站 |
| | | */ |
| | | @Async |
| | | public void crnStnToOutStn() { |
| | | for (CrnSlave crnSlave : slaveProperties.getCrn()) { |
| | | // 遍历堆垛机出库站 |
| | |
| | | // log.error("{}站点查询无待入库数据 工作号={}", crnStn.getStaNo(), staProtocol.getWorkNo()); |
| | | continue; |
| | | } |
| | | |
| | | // 同库位组进行校验 |
| | | List<String> groupLocNo = Utils.getGroupLocNo(wrkMast.getLocNo()); |
| | | if (!Cools.isEmpty(groupLocNo)) { |
| | | if (null != wrkMastMapper.selectPakoutWorkingByGroupLoc(groupLocNo)) { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (wrkMast.getWrkSts() < 3) { |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0 && staProtocol.isInEnable() |
| | | && staDetl.getCanining()!=null && staDetl.getCanining().equals("Y")) { |
| | |
| | | log.error("出库操作库位状态不符合--状态, 库位号={},库位状态={}", wrkMast.getLocNo(), sourceSta.getLocSts()); |
| | | continue; |
| | | } |
| | | |
| | | // 同库位组进行校验 |
| | | List<String> groupLocNo = Utils.getGroupLocNo(wrkMast.getSourceLocNo()); |
| | | if (!Cools.isEmpty(groupLocNo)) { |
| | | if (null != wrkMastMapper.selectPakinWorkingByGroupLoc(groupLocNo)) { |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | // 判断是否有同库位组的出库任务,如果有,则暂停 |
| | | List<String> outsideLoc = Utils.getGroupOutsideLoc(wrkMast.getSourceLocNo()); |
| | | if (!Cools.isEmpty(outsideLoc)) { |
| | | if (!Cools.isEmpty(wrkMastMapper.selectWorkingOfPakOutBySource(outsideLoc))) { |
| | | // log.warn("{}工作档出库失败,原因:外层库位{}正在执行出库任务!", wrkMast.getWrkNo(), JSON.toJSONString(outsideLoc)); |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | // 获取堆垛机出库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()); |
| | |
| | | /** |
| | | * 执行对工作档的完成操作 |
| | | */ |
| | | @Async |
| | | @Transactional |
| | | public void storeFinished() { |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | |
| | | /** |
| | | * 空栈板初始化入库,叉车入库站放货 |
| | | */ |
| | | @Async |
| | | public void storeEmptyPlt(){ |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | // 遍历空板入库口 |
| | |
| | | param.setBarcode(barcode); |
| | | } |
| | | param.setSourceStaNo(emptyInSta.getStaNo()); |
| | | param.setLocType1(locTypeDto.getLocType1()); |
| | | // param.setLocType1(locTypeDto.getLocType1()); |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(wmsUrl) |
| | | .setPath("/rpc/pakin/loc/v1") |
| | |
| | | /** |
| | | * 出库 ===>> 工作档信息写入led显示器 |
| | | */ |
| | | @Async |
| | | public void ledExecute() { |
| | | for (LedSlave led : slaveProperties.getLed()) { |
| | | // 获取输送线plc线程 |
| | |
| | | /** |
| | | * 其他 ===>> LED显示器复位,显示默认信息 |
| | | */ |
| | | @Async |
| | | public void ledReset() { |
| | | for (LedSlave led : slaveProperties.getLed()) { |
| | | // 获取输送线plc线程 |
| | |
| | | // 22.小车待搬 |
| | | if (wrkCharge.getWrkSts() == 22) { |
| | | |
| | | // 入出库任务优先 |
| | | if (null != wrkMastMapper.selectWorkingByCrn(wrkCharge.getCrnNo())) { |
| | | return; |
| | | } |
| | | |
| | | // 搬小车至小车走向通道 |
| | | List<String> channel = slaveProperties.getChannel(); |
| | | for (String channelLocNo : channel) { |
| | |
| | | } else if (wrkCharge.getWrkSts() == 26) { |
| | | // 固定堆垛机 |
| | | int crnNo = 1; |
| | | // 入出库任务优先 |
| | | if (null != wrkMastMapper.selectWorkingByCrn(crnNo)) { |
| | | return; |
| | | } |
| | | |
| | | // 充电位 |
| | | LocMast chargeLoc = locMastService.selectById(wrkCharge.getLocNo()); |
| | | |
| | |
| | | } else { |
| | | // 固定堆垛机 |
| | | int crnNo = 1; |
| | | if (null != wrkMastMapper.selectWorkingByCrn(crnNo)) { |
| | | return; |
| | | } |
| | | |
| | | LocMast channelLoc = locMastService.selectById(channelLocNo); |
| | | |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crnNo); |
| | |
| | | } |
| | | } |
| | | } else if (wrkCharge.getWrkSts() == 45L) { |
| | | if (null != wrkMastMapper.selectWorkingByCrn(wrkCharge.getCrnNo())) { |
| | | return; |
| | | } |
| | | |
| | | LocMast idleLoc = locMastService.selectById(basSte.getIdleLoc()); |
| | | |
| | | Integer otherSte = existOtherSte(idleLoc.getLocNo(), wrkCharge.getSteNo()); |