| | |
| | | |
| | | //计算目标格子 |
| | | List<HollowBigStorageCageHistoryTask> historyTasks = new ArrayList<>(); |
| | | try { |
| | | for (BigStorageCageTask task : inTaskList) { |
| | | GlassInfo info = glassListMap.get(task.getGlassId()).get(0); |
| | | HollowBigStorageDTO bigStorageDTO = hollowGlassRelationInfoService.queryHollowTargetSlot(info.getFlowCardId(), |
| | |
| | | .set(HollowGlassRelationInfo::getTemperingLayoutId, cageDetails.getTemperingLayoutId()) |
| | | .set(HollowGlassRelationInfo::getTemperingFeedSequence, cageDetails.getTemperingFeedSequence()) |
| | | .set(HollowGlassRelationInfo::getEngineerId, cageDetails.getEngineerId()) |
| | | .set(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_OCCUPY) |
| | | .eq(HollowGlassRelationInfo::getFlowCardId, bigStorageDTO.getFlowCardId()) |
| | | .eq(HollowGlassRelationInfo::getLayer, bigStorageDTO.getLayer()) |
| | | .eq(HollowGlassRelationInfo::getVirtualSlot, bigStorageDTO.getVirtualSlot()) |
| | | .eq(HollowGlassRelationInfo::getSlotSequence, bigStorageDTO.getSlotSequence()) |
| | | .eq(HollowGlassRelationInfo::getHollowSequence, bigStorageDTO.getHollowSequence()) |
| | | ); |
| | | } |
| | | } catch (Exception exception) { |
| | | log.info("进片任务执行中发生异常:{}", exception); |
| | | hollowGlassRelationInfoService.update(new LambdaUpdateWrapper<HollowGlassRelationInfo>() |
| | | .set(HollowGlassRelationInfo::getGlassId, null) |
| | | .set(HollowGlassRelationInfo::getTemperingLayoutId, null) |
| | | .set(HollowGlassRelationInfo::getTemperingFeedSequence, null) |
| | | .set(HollowGlassRelationInfo::getEngineerId, null) |
| | | .set(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_NEW) |
| | | .eq(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_OCCUPY) |
| | | ); |
| | | } |
| | | //历史数据入库 |
| | |
| | | hollowBigStorageCageDetailsService.updateBySlot(storageCageDTOList, Const.GLASS_STATE_IN); |
| | | log.info("4、大理片笼进片状态已完成已完成的玻璃信息id:{}", v); |
| | | updateSlotRemainBySlots(inSuccessGlassSlot); |
| | | List<String> glassList = v.stream().map(BigStorageCageTask::getGlassId).collect(Collectors.toList()); |
| | | hollowGlassRelationInfoService.update(new LambdaUpdateWrapper<HollowGlassRelationInfo>() |
| | | .set(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_SUCCESS) |
| | | .eq(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_OCCUPY) |
| | | .in(HollowGlassRelationInfo::getGlassId, glassList) |
| | | ); |
| | | } else if (e1 == 3) { |
| | | //破损处理 |
| | | dealDamageInTask(v); |
| | | List<String> glassList = v.stream().map(BigStorageCageTask::getGlassId).collect(Collectors.toList()); |
| | | hollowGlassRelationInfoService.update(new LambdaUpdateWrapper<HollowGlassRelationInfo>() |
| | | .set(HollowGlassRelationInfo::getGlassId, null) |
| | | .set(HollowGlassRelationInfo::getTemperingLayoutId, null) |
| | | .set(HollowGlassRelationInfo::getTemperingFeedSequence, null) |
| | | .set(HollowGlassRelationInfo::getEngineerId, null) |
| | | .set(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_NEW) |
| | | .eq(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_OCCUPY) |
| | | .in(HollowGlassRelationInfo::getGlassId, glassList) |
| | | ); |
| | | } else { |
| | | //清空理片笼空数据 |
| | | noDealInTask(v); |
| | | List<String> glassList = v.stream().map(BigStorageCageTask::getGlassId).collect(Collectors.toList()); |
| | | hollowGlassRelationInfoService.update(new LambdaUpdateWrapper<HollowGlassRelationInfo>() |
| | | .set(HollowGlassRelationInfo::getGlassId, null) |
| | | .set(HollowGlassRelationInfo::getTemperingLayoutId, null) |
| | | .set(HollowGlassRelationInfo::getTemperingFeedSequence, null) |
| | | .set(HollowGlassRelationInfo::getEngineerId, null) |
| | | .set(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_NEW) |
| | | .eq(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_OCCUPY) |
| | | .in(HollowGlassRelationInfo::getGlassId, glassList) |
| | | ); |
| | | } |
| | | }); |
| | | for (BigStorageCageTask item : inTaskList) { |