| | |
| | | import com.mes.bigstorage.service.BigStorageGlassInfoService; |
| | | import com.mes.bigstorage.service.BigStorageGlassRelationInfoService; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.common.config.ConstSysConfig; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.sysconfig.service.SysConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | BigStorageCageDetailsService bigStorageCageDetailsService; |
| | | @Resource |
| | | BigStorageGlassRelationInfoService bigStorageGlassRelationInfoService; |
| | | @Value("${mes.slotWidth}") |
| | | private Integer slotWidth; |
| | | @Value("${mes.glassGap}") |
| | | private Integer glassGap; |
| | | @Value("${mes.outCarMaxSize}") |
| | | private Integer outCarMaxSize; |
| | | @Resource |
| | | SysConfigService sysConfigService; |
| | | // @Value("${mes.slotWidth}") |
| | | // private Integer slotWidth; |
| | | // @Value("${mes.glassGap}") |
| | | // private Integer glassGap; |
| | | // @Value("${mes.outCarMaxSize}") |
| | | // private Integer outCarMaxSize; |
| | | |
| | | @Override |
| | | public BigStorageDTO queryBigStorageTargetSlot(String engineerId, Integer temperingLayoutId, Integer temperingFeedSequence) { |
| | |
| | | .eq(BigStorageGlassRelationInfo::getTemperingLayoutId, temperingLayoutId) |
| | | .eq(BigStorageGlassRelationInfo::getTemperingFeedSequence, temperingFeedSequence)); |
| | | } |
| | | Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH); |
| | | BigStorageCageDetails bigStorageCageDetails = bigStorageCageDetailsService.getOne(new LambdaQueryWrapper<BigStorageCageDetails>() |
| | | .eq(BigStorageCageDetails::getSlot, relationInfoOne.getSlot()).in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO) |
| | | .orderByDesc(BigStorageCageDetails::getSequence).last("limit 1")); |
| | |
| | | if (CollectionUtil.isNotEmpty(list)) { |
| | | return; |
| | | } |
| | | Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH); |
| | | Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_GLASS_GAP); |
| | | Integer outCarMaxSize = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_OUT_CAR_SIZE); |
| | | // Engineering engineering = engineeringMapper.selectOne(new LambdaQueryWrapper<Engineering>() |
| | | // .eq(Engineering::getEngineerId, glassInfo.getEngineerId())); |
| | | //获取玻璃的工程id,按照工程id获取工程下的所有玻璃信息 |
| | |
| | | @Override |
| | | public int bigStorageSlotPair(BigStorageGlassInfo bigStorageGlassInfo) { |
| | | //获取所有空闲可用的格子号 |
| | | Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH); |
| | | BigStorageCage storageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | .eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | .le(BigStorageCage::getMinThickness, bigStorageGlassInfo.getThickness()) |