| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | |
| | | |
| | | @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; |
| | | |
| | | /** |
| | | * 查询进/出片任务 |
| | |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList |
| | | ) { |
| | | if (bigStorageCageDetails.getBigStorageCageFeedTask().getTaskState() == 0) { |
| | | carWidth -= Integer.parseInt(bigStorageCageDetails.getWidth().toString()) + bigStorageCageDetails.getGap(); |
| | | carWidth -= Integer.parseInt(bigStorageCageDetails.getWidth().toString()) + galssGap; |
| | | } |
| | | } |
| | | return carWidth; |
| | |
| | | BigStorageCageDetails bigStorageCageDetails = new BigStorageCageDetails(); |
| | | BeanUtils.copyProperties(glassInfo, bigStorageCageDetails); |
| | | bigStorageCageDetails.setState(0); |
| | | bigStorageCageDetails.setGap(Const.BIG_STORAGE_GAP); |
| | | bigStorageCageDetails.setGap(galssGap); |
| | | return bigStorageCageDetails; |
| | | } |
| | | |
| | |
| | | return bigStorageDTO; |
| | | } |
| | | bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .eq(BigStorageCage::getRemainWidth, Const.BIG_STORAGE_WIDTH) |
| | | .eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | .inSql(BigStorageCage::getDeviceId, |
| | | "select distinct device_id from big_storage_cage_details where tempering_layout_id = " + glassInfo.getTemperingLayoutId()) |
| | | .last("limit 1")); |
| | |
| | | return bigStorageDTO; |
| | | } |
| | | bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .eq(BigStorageCage::getRemainWidth, Const.BIG_STORAGE_WIDTH) |
| | | .eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | .last("limit 1")); |
| | | Assert.isTrue(null != bigStorageCage, "没有空余的笼子存放玻璃"); |
| | | bigStorageDTO = new BigStorageDTO(); |