| | |
| | | } |
| | | |
| | | //获取空闲且领取任务的数据信息,没有任务直接走玻璃调度 |
| | | HashMap<Integer, ReadWriteEntity> map = new HashMap<>(); |
| | | ReadWriteEntity oneEntity = miloService.readFromOpcUa("CMJ1.CMJ1.isFree"); |
| | | ReadWriteEntity twoEntity = miloService.readFromOpcUa("ZKQ2.ZKQ2.isFree"); |
| | | ReadWriteEntity threeEntity = miloService.readFromOpcUa("ZKQ3.ZKQ3.isFree"); |
| | | map.put(930, oneEntity); |
| | | map.put(931, twoEntity); |
| | | map.put(932, threeEntity); |
| | | HollowGlassOutRelationInfo hollowGlassOutRelationInfo = null; |
| | | int cell = -1; |
| | | //李赛克线需要获取韩江plc的线路空闲状态:10000000第8位为 1表示忙碌 0表示空闲 |
| | | if (null != oneEntity.getValue() && "1".equals(oneEntity.getValue() + "")) { |
| | | cell = 930; |
| | | hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService |
| | | .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getCell, cell) |
| | | .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) |
| | | ); |
| | | } |
| | | |
| | | ReadWriteEntity twoEntity = miloService.readFromOpcUa("ZKQ2.ZKQ2.isFree"); |
| | | if (null == hollowGlassOutRelationInfo && null != twoEntity.getValue() && Boolean.parseBoolean(twoEntity.getValue() + "")) { |
| | | cell = 931; |
| | | hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService |
| | | .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getCell, cell) |
| | | .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) |
| | | ); |
| | | } |
| | | for (int i = 930; i < 931; i++) { |
| | | if (null == hollowGlassOutRelationInfo) { |
| | | cell = 930; |
| | | ReadWriteEntity entity = map.get(i); |
| | | cell = i; |
| | | if (null != entity.getValue() && ("1".equals(entity.getValue() + "") || Boolean.parseBoolean(twoEntity.getValue() + ""))) { |
| | | hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService |
| | | .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getCell, cell) |
| | | .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) |
| | | ); |
| | | } |
| | | |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | for (int i = 930; i <= 932; i++) { |
| | | if (null == hollowGlassOutRelationInfo) { |
| | | cell = 931; |
| | | cell = i; |
| | | hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService |
| | | .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getCell, cell) |
| | | .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) |
| | | ); |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (null != hollowGlassOutRelationInfo) { |
| | |
| | | } |
| | | |
| | | |
| | | private <T extends HollowBigStorageCageBaseInfo> Boolean hollowOutGlassByIsPair(List<T> list, int targetSlot, int isPair, int totalLayer, int isForce) throws Exception { |
| | | private <T extends HollowBigStorageCageBaseInfo> Boolean hollowOutGlassByIsPair(List<T> list, |
| | | int targetSlot, int isPair, int totalLayer, int isForce) throws Exception { |
| | | List<T> resultList = new ArrayList<>(); |
| | | List<T> tempList = new ArrayList<>(); |
| | | int taskType = Const.BIG_STORAGE_AFTER_OUT; |
| | |
| | | * @param totalLayer |
| | | * @return |
| | | */ |
| | | private <T extends HollowBigStorageCageBaseInfo> Boolean computeOutGlassInfo(List<T> list, String tableName, int targetSlot, int state, int taskType, int totalLayer, int isForce) { |
| | | private <T extends HollowBigStorageCageBaseInfo> Boolean computeOutGlassInfo(List<T> list, String tableName, |
| | | int targetSlot, int state, int taskType, int totalLayer, int isForce) { |
| | | //任务数据:获取车子存放玻璃最大数量,玻璃间隔 |
| | | List<T> templist = new ArrayList<>(); |
| | | //打车剩余尺寸 |