| | |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.mapper.ConfigMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | log.error("2楼212呼叫空板"+e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 2楼212呼叫空板 |
| | | */ |
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 拣料、并板、盘点再入库 拆垛位置 |
| | | */ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 堆垛机站出库到出库站 |
| | | */ |
| | |
| | | Integer count = wrkMastMapper.countPakOut(); |
| | | |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | | if (wrkMast.getIoType() == 110 && wrkMast.getStaNo() == 2101) { |
| | | |
| | | } else { |
| | | if(count > 30){ //设备上走托盘不超过30个 |
| | | log.info("托盘数量不超过指定数量"); |
| | | // log.info("托盘数量不超过指定数量"); |
| | | continue; |
| | | } |
| | | } |
| | | // 已经存在吊车执行任务时,则过滤 |
| | | if (wrkMastMapper.selectWorking(slave.getId()) != null) { |
| | | break; |
| | | // return; |
| | | } |
| | | |
| | | // 判断堆垛机站点是否可用 |
| | | if (!crnEnabled(wrkMast)){ |
| | | continue; |
| | | break; |
| | | } |
| | | |
| | | if (wrkMast == null) { |
| | |
| | | } |
| | | } |
| | | |
| | | // 已经存在吊车执行任务时,则过滤 |
| | | if (wrkMastMapper.selectWorking(slave.getId()) != null) { |
| | | break; |
| | | // return; |
| | | } |
| | | |
| | | // 1.堆垛机开始移动 出库命令 |
| | | CrnCommand crnCommand = new CrnCommand(); |
| | |
| | | |
| | | /** |
| | | * 确认出库码头是否可用 |
| | | * |
| | | * @param wrkMast 工作档 |
| | | * @return 是否可用 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查找工作状态为2(设备上走),且RGV入库接驳站符合的的入库工作档,提取出最多2笔 |
| | | * |
| | | * @param slave |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查找工作状态为14(出库完成),且RGV出库接驳站符合的的出库工作档,提取出最多2笔 |
| | | * |
| | | * @param slave |
| | | * @return |
| | | */ |
| | |
| | | log.error("其他 ===>> 码垛完成驱动托盘进入下一步(入库前扫码)"+e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 其他 ===>> 码垛完成驱动托盘进入下一步 |
| | | */ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 其他 ===>> 贴标完成驱动托盘进入下一步 |
| | | */ |
| | |
| | | boolean result1 = MessageQueue.offer(SlaveType.Devp, devpThread.getSlave().getId(), new Task(3, staProtocol135)); |
| | | try{ |
| | | Thread.sleep(100); |
| | | }catch (Exception e){ } |
| | | } catch (Exception e) { |
| | | } |
| | | basDevp135.setReportSign(2); |
| | | basDevpService.updateById(basDevp135); |
| | | int workNo = commonService.getWorkNo(5); |
| | |
| | | log.error("小车复位线程报错!"+e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 入出库 ===>> 小车作业下发 |
| | | */ |
| | |
| | | } |
| | | return rgvIoExecuteSign; |
| | | } |
| | | |
| | | /** |
| | | * 执行小车搬运任务 |
| | | */ |
| | |
| | | continue; |
| | | } |
| | | List<Integer> STA_WORK_CU1 = new ArrayList<Integer>() {{ |
| | | add(101);add(102);add(104);add(105);add(107);add(108);add(118);add(119);add(122); |
| | | add(101); |
| | | add(102); |
| | | add(104); |
| | | add(105); |
| | | add(107); |
| | | add(108); |
| | | add(118); |
| | | add(119); |
| | | add(122); |
| | | }}; |
| | | List<Integer> STA_WORK_CU2 = new ArrayList<Integer>() {{ |
| | | add(110);add(111);add(113);add(114);add(116);add(117);add(120);add(121);add(122);add(123); |
| | | add(110); |
| | | add(111); |
| | | add(113); |
| | | add(114); |
| | | add(116); |
| | | add(117); |
| | | add(120); |
| | | add(121); |
| | | add(122); |
| | | add(123); |
| | | }}; |
| | | if (basRgv.getRgvNo()==1 && !STA_WORK_CU1.contains(wrkMastSta.getStaStart())){ |
| | | continue; |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 执行小车搬运任务//拆盘 |
| | | */ |
| | |
| | | continue; |
| | | } |
| | | List<Integer> STA_WORK_CU1 = new ArrayList<Integer>() {{ |
| | | add(101);add(102);add(104);add(105);add(107);add(108);add(118);add(119);add(122); |
| | | add(101); |
| | | add(102); |
| | | add(104); |
| | | add(105); |
| | | add(107); |
| | | add(108); |
| | | add(118); |
| | | add(119); |
| | | add(122); |
| | | }}; |
| | | List<Integer> STA_WORK_CU2 = new ArrayList<Integer>() {{ |
| | | add(110);add(111);add(113);add(114);add(116);add(117);add(120);add(121);add(122);add(123); |
| | | add(110); |
| | | add(111); |
| | | add(113); |
| | | add(114); |
| | | add(116); |
| | | add(117); |
| | | add(120); |
| | | add(121); |
| | | add(122); |
| | | add(123); |
| | | }}; |
| | | if (basRgv.getRgvNo()==1 && !STA_WORK_CU1.contains(wrkMastSta.getStaStart())){ |
| | | continue; |
| | |
| | | } |
| | | return rgvMapUpdate(basRgvMapCurrent,staStart,staEnd); |
| | | } |
| | | |
| | | public synchronized boolean rgvMapUpdate(BasRgvMap basRgvMapCurrent,Integer staStart,Integer staEnd){ |
| | | |
| | | // List<Integer> integers = RouteUtils.RouteMapCurrentFar(basRgvMapCurrent.getNowRoute(),staStart,staEnd, basRgvMapCurrent.getLockStartRoute()); |