| | |
| | | HollowGlassOutRelationInfoService hollowGlassOutRelationInfoService; |
| | | |
| | | @Override |
| | | public void forceOutGlass(String flowCardId, int cell) { |
| | | hollowGlassOutRelationInfoService.receiveTask(flowCardId, cell); |
| | | public void forceOutGlass(String flowCardId, int cell, int totalPairQuantity) { |
| | | hollowGlassOutRelationInfoService.receiveTask(flowCardId, cell, totalPairQuantity); |
| | | hollowGlassOutRelationInfoService.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId) |
| | | .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) |
| | | ); |
| | | List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService.list(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .eq(HollowBigStorageCageDetails::getFlowCardId, flowCardId) |
| | | .orderByAsc(HollowBigStorageCageDetails::getVirtualSlot) |
| | | .orderBy(Boolean.TRUE, cell != 931, HollowBigStorageCageDetails::getSequence) |
| | | .orderByAsc(HollowBigStorageCageDetails::getHollowSequence) |
| | | ); |
| | | List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService.queryOutGlassList(flowCardId, cell); |
| | | |
| | | List<HollowGlassQueueInfo> hollowQueues = hollowBigStorageCageDetailsList.stream().map(queue -> { |
| | | HollowGlassQueueInfo queueInfo = new HollowGlassQueueInfo(); |
| | |
| | | }).collect(Collectors.toList()); |
| | | this.saveBatch(hollowQueues); |
| | | } |
| | | |
| | | @Override |
| | | public void changeForceOutGlass(String flowCardId, int cell) { |
| | | hollowGlassOutRelationInfoService.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId) |
| | | .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) |
| | | ); |
| | | //情况历史任务中未做完的玻璃信息 |
| | | this.remove(new LambdaQueryWrapper<HollowGlassQueueInfo>() |
| | | .eq(HollowGlassQueueInfo::getFlowCardId, flowCardId) |
| | | .eq(HollowGlassQueueInfo::getCell, cell) |
| | | .eq(HollowGlassQueueInfo::getState, Const.TEMPERING_NEW) |
| | | ); |
| | | //按照线路重新去理片笼查询玻璃信息 |
| | | List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService.list(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .eq(HollowBigStorageCageDetails::getFlowCardId, flowCardId) |
| | | .orderByAsc(HollowBigStorageCageDetails::getVirtualSlot) |
| | | .orderBy(Boolean.TRUE, cell != 931, HollowBigStorageCageDetails::getSequence) |
| | | .orderByAsc(HollowBigStorageCageDetails::getHollowSequence) |
| | | ); |
| | | |
| | | List<HollowGlassQueueInfo> hollowQueues = hollowBigStorageCageDetailsList.stream().map(queue -> { |
| | | HollowGlassQueueInfo queueInfo = new HollowGlassQueueInfo(); |
| | | BeanUtils.copyProperties(queue, queueInfo); |
| | | queueInfo.setState(Const.TEMPERING_NEW); |
| | | queueInfo.setCell(cell); |
| | | return queueInfo; |
| | | }).collect(Collectors.toList()); |
| | | this.saveBatch(hollowQueues); |
| | | } |
| | | |
| | | @Override |
| | | public List<HollowGlassQueueInfo> queryHollowGlassQueueInfo(int cell) { |
| | | HollowGlassOutRelationInfo one = hollowGlassOutRelationInfoService.getOne(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>() |