| | |
| | | * @param width |
| | | * @param height |
| | | */ |
| | | private EdgStorageCageDetails queryMinGlass(Double width, Double height, String glassId) { |
| | | private EdgStorageCageDetails queryMinGlass(double width, double height, String glassId) { |
| | | //获取表内版图id最小的玻璃信息 |
| | | EdgStorageCageDetails glassDetails = edgStorageCageDetailsService.getOne(new LambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .eq(EdgStorageCageDetails::getState, 100) |
| | |
| | | */ |
| | | private Integer queryLineByGlassInfo(EdgStorageCageDetails a08EdgStorageCageDetails, EdgStorageCageDetails a10EdgStorageCageDetails, |
| | | EdgStorageCageDetails glassInfo, int out08Glassstate, int out10Glassstate) { |
| | | boolean b08 = a08EdgStorageCageDetails != null && a08EdgStorageCageDetails.getHeight().equals(glassInfo.getHeight()) |
| | | && a08EdgStorageCageDetails.getWidth().equals(glassInfo.getWidth()); |
| | | boolean b10 = a10EdgStorageCageDetails != null && a10EdgStorageCageDetails.getHeight().equals(glassInfo.getHeight()) |
| | | && a10EdgStorageCageDetails.getWidth().equals(glassInfo.getWidth()); |
| | | boolean b08 = a08EdgStorageCageDetails != null && a08EdgStorageCageDetails.getHeight() == glassInfo.getHeight() |
| | | && a08EdgStorageCageDetails.getWidth() == glassInfo.getWidth(); |
| | | boolean b10 = a10EdgStorageCageDetails != null && a10EdgStorageCageDetails.getHeight() == glassInfo.getHeight() |
| | | && a10EdgStorageCageDetails.getWidth() == glassInfo.getWidth(); |
| | | //存在出片任务 07为空 |
| | | if (b10) { |
| | | return out10Glassstate == 2 ? Const.A09_OUT_TARGET_POSITION : Const.A10_OUT_TARGET_POSITION; |
| | |
| | | //获取宽高拍第一的玻璃信息 |
| | | EdgStorageCageDetails firstSize = list.get(0); |
| | | Integer firstCount = firstSize.getCount(); |
| | | Double firstWidth = firstSize.getWidth(); |
| | | Double firstHeight = firstSize.getHeight(); |
| | | double firstWidth = firstSize.getWidth(); |
| | | double firstHeight = firstSize.getHeight(); |
| | | if (list.size() == 1) { |
| | | return queryMinGlass(firstWidth, firstHeight, glassId); |
| | | } |
| | | //获取宽高拍第二的玻璃信息 |
| | | EdgStorageCageDetails secondSize = list.get(1); |
| | | Integer secondCount = secondSize.getCount(); |
| | | Double secondWidth = secondSize.getWidth(); |
| | | Double secondHeight = secondSize.getHeight(); |
| | | double secondWidth = secondSize.getWidth(); |
| | | double secondHeight = secondSize.getHeight(); |
| | | //获取数量前2的玻璃数量比例 |
| | | Integer mix = firstCount / secondCount; |
| | | log.info("获取玻璃数量前2的玻璃占比为:{}", mix); |
| | |
| | | EdgStorageCageDetails outGlassInfo = edgStorageCageDetailsService.getOne(new LambdaQueryWrapper<EdgStorageCageDetails>() |
| | | .eq(EdgStorageCageDetails::getGlassId, taskCache.getGlassId())); |
| | | log.info("{}线有出片任务信息,任务信息为{},玻璃信息为{}", endcell, taskCache, outGlassInfo); |
| | | if (outGlassInfo.getWidth().equals(firstWidth) && outGlassInfo.getHeight().equals(firstHeight)) { |
| | | if (outGlassInfo.getWidth() == firstWidth && outGlassInfo.getHeight() == firstHeight) { |
| | | log.info("数量最多的宽{}高{}和{}线任务的宽{}高{}相同,出数量排第二的玻璃,宽{}高{}", |
| | | firstWidth, firstHeight, endcell, outGlassInfo.getWidth(), outGlassInfo.getHeight(), secondWidth, secondHeight); |
| | | return queryMinGlass(secondWidth, secondHeight, glassId); |