| | |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.entity.HollowGlassRelationInfo; |
| | | import com.mes.hollow.entity.dto.*; |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | | import com.mes.hollow.entity.dto.HollowBigStorageDTO; |
| | | import com.mes.hollow.entity.dto.LackDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowAllFlowCardVO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | import com.mes.hollow.mapper.HollowGlassRelationInfoMapper; |
| | |
| | | if (null == relationInfoOne) { |
| | | throw new RuntimeException("相关流程卡未找到对应的组号信息,玻璃流程卡:" + flowCardId + ",序号:" + glassType + ",总层数:" + totalLayer + ",层数:" + layer); |
| | | } |
| | | Integer slotMaxHeight = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_SLOT_MAX_HEIGHT); |
| | | Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_SLOT_WIDTH); |
| | | HollowBigStorageCage storageCage = null; |
| | | if (Math.min(width, height) > slotMaxHeight) { |
| | | storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>() |
| | | .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getRemainWidth, slotWidth) |
| | | .eq(HollowBigStorageCage::getDeviceId, 5) |
| | | .orderByAsc(HollowBigStorageCage::getMaxThickness).last("limit 1")); |
| | | HollowBigStorageDTO storageDTO = new HollowBigStorageDTO(); |
| | | BeanUtils.copyProperties(storageCage, storageDTO); |
| | | BeanUtils.copyProperties(relationInfoOne, storageDTO); |
| | | return storageDTO; |
| | | } |
| | | |
| | | //详情表内获取本组是否已经有玻璃在笼子内(0表示提前占用) |
| | | int taskCount = hollowGlassOutRelationInfoService.count(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)); |
| | | HollowBigStorageCage storageCage = null; |
| | | |
| | | //如果不存在则选择笼内未用的新格子 |
| | | if (taskCount > 0) { |
| | | storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>() |