| | |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageFeedTask; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageFeedTaskMapper; |
| | | import com.mes.bigstoragetask.mapper.BigStorageCageOutTaskMapper; |
| | | import com.mes.common.config.Const; |
| | |
| | | @Value("${mes.minCount}") |
| | | private int minCount; |
| | | |
| | | @Value("${mes.carWidth}") |
| | | private Integer carWidth; |
| | | |
| | | @Value("${mes.slotWidth}") |
| | | private Integer slotWidth; |
| | | |
| | | @Value("${mes.carMaxSize}") |
| | | private Integer carMaxSize; |
| | | |
| | | @Value("${mes.galssGap}") |
| | | private Integer galssGap; |
| | | @Value("${mes.glassGap}") |
| | | private Integer glassGap; |
| | | |
| | | /** |
| | | * 查询进/出片任务 |
| | |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList |
| | | ) { |
| | | if (bigStorageCageDetails.getBigStorageCageFeedTask().getTaskState() == 0) { |
| | | carWidth = carWidth - bigStorageCageDetails.getWidth() - galssGap; |
| | | carWidth = carWidth - bigStorageCageDetails.getWidth() - glassGap; |
| | | } |
| | | } |
| | | return carWidth; |
| | |
| | | glassInfoWrapper.eq(GlassInfo::getGlassId, glassId); |
| | | GlassInfo glassInfo = glassInfoMapper.selectOne(glassInfoWrapper); |
| | | BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails(); |
| | | if(glassInfo!=null){ |
| | | if (glassInfo != null) { |
| | | BeanUtils.copyProperties(glassInfo, bigStorageCageDetails); |
| | | bigStorageCageDetails.setState(1); |
| | | bigStorageCageDetails.setGap(galssGap); |
| | | bigStorageCageDetails.setGap(glassGap); |
| | | } |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList=new ArrayList<>(); |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = new ArrayList<>(); |
| | | bigStorageCageDetailsList.add(bigStorageCageDetails); |
| | | return bigStorageCageDetailsList; |
| | | } |
| | |
| | | MPJLambdaWrapper<BigStorageCage> wrapper = new MPJLambdaWrapper<>(BigStorageCage.class) |
| | | .selectAll(BigStorageCage.class) |
| | | .leftJoin(BigStorageCageDetails.class, BigStorageCageDetails::getSlot, BigStorageCage::getSlot) |
| | | .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | .eq(BigStorageCageDetails::getTemperingLayoutId, glassInfo.getTemperingLayoutId()) |
| | | .gt(BigStorageCage::getRemainWidth, glassInfo.getWidth()) |
| | | .last("limit 1"); |
| | |
| | | return bigStorageDTO; |
| | | } |
| | | bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | .eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | .inSql(BigStorageCage::getDeviceId, |
| | | "select distinct device_id from big_storage_cage_details where tempering_layout_id = " + glassInfo.getTemperingLayoutId()) |
| | |
| | | } |
| | | bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | .last("limit 1")); |
| | | Assert.isTrue(null != bigStorageCage, "没有空余的笼子存放玻璃"); |
| | | bigStorageDTO = new BigStorageDTO(); |