| | |
| | | import com.mes.bigstorage.mapper.BigStorageCageMapper; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | @Resource |
| | | private TemperingGlassInfoService temperingGlassInfoService; |
| | | |
| | | @Resource |
| | | private GlassInfoService glassInfoService; |
| | | |
| | | @Override |
| | | public BigStorageCageDetails feedGlass(GlassInfo glassInfo, BigStorageCageDetails bigStorageCageDetails) { |
| | | |
| | | log.info("1、查询理片笼内片序+1等于当前玻璃片序的玻璃"); |
| | | log.info("1、查询理片笼内片序-1等于当前玻璃片序的玻璃"); |
| | | LambdaQueryWrapper<BigStorageCageDetails> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(BigStorageCageDetails::getTemperingLayoutId, glassInfo.getTemperingLayoutId()) |
| | | .eq(BigStorageCageDetails::getTemperingFeedSequence, glassInfo.getTemperingFeedSequence() + 1); |
| | | .eq(BigStorageCageDetails::getTemperingFeedSequence, glassInfo.getTemperingFeedSequence() - 1); |
| | | BigStorageCageDetails layoutSlotInfo; |
| | | layoutSlotInfo= bigStorageCageDetailsMapper.selectOne(wrapper); |
| | | |
| | | BeanUtils.copyProperties(glassInfo, bigStorageCageDetails); |
| | | |
| | | log.info("2、查询理片笼内片序+1等于当前玻璃片序的玻璃的结果不为空时"); |
| | | log.info("2、查询理片笼内片序-1等于当前玻璃片序的玻璃的结果不为空时"); |
| | | if (layoutSlotInfo.getSlot() != null) { |
| | | bigStorageCageDetails.setSlot(layoutSlotInfo.getSlot()); |
| | | } else { |
| | | log.info("3、查询理片笼内片序+1等于当前玻璃片序的玻璃的结果为空时获取当前玻璃版图id是否存在理片笼内"); |
| | | log.info("3、查询理片笼内片序-1等于当前玻璃片序的玻璃的结果为空时获取当前玻璃版图id是否存在理片笼内"); |
| | | LambdaQueryWrapper<BigStorageCageDetails> bigStorageCageDetailslambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | bigStorageCageDetailslambdaQueryWrapper |
| | | .select(BigStorageCageDetails::getTemperingLayoutId); |
| | |
| | | public boolean outGlass() { |
| | | List<TemperingGlassInfo> temperingGlassInfoList = temperingGlassInfoService.list(); |
| | | log.info("1、查询钢化小片任务表是否有待出玻璃"+temperingGlassInfoList.size()); |
| | | |
| | | if(temperingGlassInfoList!=null){ |
| | | temperingGlassInfoService.addOutTask(temperingGlassInfoList); |
| | | log.info("2、添加任务到任务表"); |
| | |
| | | String layoutNum = entry.getKey().substring(entry.getKey().indexOf('-') + 1); |
| | | if (layoutNum.equals(entry.getValue())) { |
| | | //4、添加此钢化版图id所有小片小片到钢化小片表 |
| | | LambdaQueryWrapper<GlassInfo> glassInfoWrapper=new LambdaQueryWrapper<>(); |
| | | glassInfoWrapper.select(GlassInfo::getTemperingLayoutId) |
| | | .orderByDesc(GlassInfo::getTemperingFeedSequence); |
| | | List<GlassInfo> glassInfoList= glassInfoService.list(glassInfoWrapper); |
| | | for (GlassInfo glassInfo:glassInfoList |
| | | ) { |
| | | TemperingGlassInfo temperingGlassInfo=new TemperingGlassInfo(); |
| | | BeanUtils.copyProperties(glassInfo, temperingGlassInfo); |
| | | temperingGlassInfoService.save(temperingGlassInfo); |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | |
| | | bigStorageCageWrapper.eq("remain_width", width); |
| | | bigStorageCageMapper.update(bigStorageCage, bigStorageCageWrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |