| | |
| | | //package com.mes.hollow.service.impl; |
| | | // |
| | | //import cn.hutool.core.lang.Assert; |
| | | //import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | //import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | //import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | //import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | //import com.mes.bigstorage.entity.BigStorageCage; |
| | | //import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | //import com.mes.bigstorage.entity.BigStorageDTO; |
| | | //import com.mes.common.config.Const; |
| | | //import com.mes.glassinfo.entity.GlassInfo; |
| | | //import com.mes.hollow.entity.BigStorageCageHollow; |
| | | //import com.mes.hollow.entity.BigStorageCageHollowDetails; |
| | | //import com.mes.hollow.mapper.BigStorageCageHollowDetailsMapper; |
| | | //import com.mes.hollow.service.BigStorageCageHollowDetailsService; |
| | | //import org.springframework.stereotype.Service; |
| | | // |
| | | //import java.util.List; |
| | | // |
| | | ///** |
| | | // * (BigStorageCageHollowDetails)表服务实现类 |
| | | // * |
| | | // * @author makejava |
| | | // * @since 2024-11-21 09:23:12 |
| | | // */ |
| | | //@Service |
| | | //public class BigStorageCageHollowDetailsServiceImpl extends ServiceImpl<BigStorageCageHollowDetailsMapper, BigStorageCageHollowDetails> implements BigStorageCageHollowDetailsService { |
| | | // |
| | | // @Override |
| | | // public BigStorageDTO queryTargetSlotByHollow(GlassInfo glassInfo) { |
| | | package com.mes.hollow.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.bigstorage.entity.dto.BigStorageDTO; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.hollow.entity.BigStorageCageHollowDetails; |
| | | import com.mes.hollow.mapper.BigStorageCageHollowDetailsMapper; |
| | | import com.mes.hollow.service.BigStorageCageHollowDetailsService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * (BigStorageCageHollowDetails)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2024-11-21 09:23:12 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class BigStorageCageHollowDetailsServiceImpl extends ServiceImpl<BigStorageCageHollowDetailsMapper, BigStorageCageHollowDetails> implements BigStorageCageHollowDetailsService { |
| | | |
| | | @Override |
| | | public BigStorageDTO queryTargetSlotByHollow(GlassInfo glassInfo) { |
| | | // BigStorageDTO bigStorageDTO = null; |
| | | // MPJLambdaWrapper<BigStorageCageHollow> wrapper = new MPJLambdaWrapper<>(BigStorageCageHollow.class) |
| | | // .selectAll(BigStorageCageHollow.class) |
| | | // .leftJoin(BigStorageCageHollowDetails.class, BigStorageCageHollowDetails::getSlot, BigStorageCageHollow::getSlot) |
| | | // .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | // .in(BigStorageCageDetails::getState, Const.GLASS_STATE_NEW,Const.GLASS_STATE_IN) |
| | | // .in(BigStorageCageDetails::getState, Const.GLASS_STATE_NEW, Const.GLASS_STATE_IN) |
| | | // .eq(BigStorageCageDetails::getEngineerId, glassInfo.getEngineerId()) |
| | | // .eq(BigStorageCageDetails::getTemperingLayoutId, glassInfo.getTemperingLayoutId()) |
| | | // .gt(BigStorageCage::getRemainWidth, Math.max(glassInfo.getWidth(), glassInfo.getHeight())) |
| | |
| | | // return bigStorageDTO; |
| | | // } |
| | | // } |
| | | // |
| | | // //获取玻璃的厚度:重新选笼子需要按照笼子可放玻璃厚度进行选择 |
| | | //// List<Integer> deviceNotUsedList = bigStorageCageService.queryFreeDeviceByNotUsed(glassInfo.getThickness()); |
| | | //// for (Integer item : deviceNotUsedList) { |
| | | //// bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | //// .eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | //// .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | //// .eq(BigStorageCage::getDeviceId, item) |
| | | //// .last("limit 1")); |
| | | //// if (null != bigStorageCage) { |
| | | //// log.info("按照存笼玻璃格子数剩余最多得方式获取信息版图id:{},格子:{},玻璃id:{}", glassInfo.getTemperingLayoutId(), bigStorageCage.getSlot(), glassInfo.getGlassId()); |
| | | //// bigStorageDTO = new BigStorageDTO(); |
| | | //// bigStorageDTO.setWidth(bigStorageCage.getRemainWidth()); |
| | | //// bigStorageDTO.setSlot(bigStorageCage.getSlot()); |
| | | //// bigStorageDTO.setDeviceId(bigStorageCage.getDeviceId()); |
| | | //// return bigStorageDTO; |
| | | //// } |
| | | //// } |
| | | |
| | | //获取玻璃的厚度:重新选笼子需要按照笼子可放玻璃厚度进行选择 |
| | | // List<Integer> deviceNotUsedList = bigStorageCageService.queryFreeDeviceByNotUsed(glassInfo.getThickness()); |
| | | // for (Integer item : deviceNotUsedList) { |
| | | // bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>() |
| | | // .eq(BigStorageCage::getRemainWidth, slotWidth) |
| | | // .eq(BigStorageCage::getEnableState, Const.SLOT_ON) |
| | | // .eq(BigStorageCage::getDeviceId, item) |
| | | // .last("limit 1")); |
| | | // if (null != bigStorageCage) { |
| | | // log.info("按照存笼玻璃格子数剩余最多得方式获取信息版图id:{},格子:{},玻璃id:{}", glassInfo.getTemperingLayoutId(), bigStorageCage.getSlot(), glassInfo.getGlassId()); |
| | | // bigStorageDTO = new BigStorageDTO(); |
| | | // bigStorageDTO.setWidth(bigStorageCage.getRemainWidth()); |
| | | // bigStorageDTO.setSlot(bigStorageCage.getSlot()); |
| | | // bigStorageDTO.setDeviceId(bigStorageCage.getDeviceId()); |
| | | // return bigStorageDTO; |
| | | // } |
| | | // } |
| | | // Assert.isTrue(null != bigStorageCage, "没有空余的笼子存放玻璃"); |
| | | // return bigStorageDTO; |
| | | // } |
| | | //} |
| | | // |
| | | return null; |
| | | } |
| | | } |
| | | |