| | |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | 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; |
| | |
| | | |
| | | @Resource |
| | | private GlassInfoService glassInfoService; |
| | | |
| | | @Value("${mes.glassGap}") |
| | | private Integer glassGap; |
| | | |
| | | //进片逻辑 |
| | | @Override |
| | |
| | | LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailsWrapper = new LambdaQueryWrapper(); |
| | | bigStorageCageDetailsWrapper |
| | | .eq(BigStorageCageDetails::getSlot, slot) |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL); |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN, Const.GLASS_STATE_ARTIFICIAL); |
| | | |
| | | List<BigStorageCageDetails> bigStorageCageDetailsList = bigStorageCageDetailsMapper.selectList(bigStorageCageDetailsWrapper); |
| | | for (BigStorageCageDetails bigStorageCageDetails : bigStorageCageDetailsList |
| | | ) { |
| | | double widths = bigStorageCageDetails.getWidth(); |
| | | double gap = bigStorageCageDetails.getGap(); |
| | | width -= widths + gap; |
| | | width = width - widths - glassGap; |
| | | } |
| | | //修改格子剩余宽度 |
| | | BigStorageCage bigStorageCage = new BigStorageCage(); |
| | |
| | | wrapper.selectAll(BigStorageCage.class).selectCollection(BigStorageCageDetails.class, BigStorageCage::getBigStorageCageDetails) |
| | | .leftJoin(BigStorageCageDetails.class, on -> on.eq(BigStorageCageDetails::getSlot, BigStorageCage::getSlot) |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN, Const.GLASS_STATE_ARTIFICIAL)) |
| | | .orderByAsc(BigStorageCage::getDeviceId) |
| | | .orderByAsc(BigStorageCage::getSlot); |
| | | .orderByAsc(BigStorageCage::getDeviceId) |
| | | .orderByAsc(BigStorageCage::getSlot); |
| | | return bigStorageCageMapper.selectJoinList(BigStorageCage.class, wrapper); |
| | | } |
| | | |