| | |
| | | package com.mes.temperingglass.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.bigstoragetask.entity.BigStorageCageOutTask; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.mapper.TemperingGlassInfoMapper; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class TemperingGlassInfoServiceImpl extends ServiceImpl<TemperingGlassInfoMapper, TemperingGlassInfo> implements TemperingGlassInfoService { |
| | | |
| | | @Override |
| | | public void addOutTask(List<TemperingGlassInfo> temperingGlassInfoList) { |
| | | double carWidth=5000; |
| | | double gap=50; |
| | | double carwidth = 5000; |
| | | double gay = 50; |
| | | //写入任务到任务表 |
| | | for (TemperingGlassInfo temperingGlassInfo:temperingGlassInfoList |
| | | for (TemperingGlassInfo temperingGlassInfo : temperingGlassInfoList |
| | | ) { |
| | | log.info("1、当出片车宽度大于玻璃宽度时"); |
| | | if((carWidth-temperingGlassInfo.getWidth())>0){ |
| | | carWidth-=temperingGlassInfo.getWidth()-gap; |
| | | log.info("2、添加刚小片表信息到任务表"); |
| | | temperingGlassInfo.setState(1); |
| | | baseMapper.updateById(temperingGlassInfo); |
| | | log.info("3、添加刚小片表信息到任务表"); |
| | | BigStorageCageOutTask bigStorageCageOutTask =new BigStorageCageOutTask(); |
| | | bigStorageCageOutTask.setId(temperingGlassInfo.getId()); |
| | | }else{ |
| | | if ((carwidth - gay - temperingGlassInfo.getWidth()) > 0) { |
| | | //添加任务到任务表 |
| | | } else { |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<TemperingGlassInfo> SelectTemperingGlassInfo() { |
| | | return null; |
| | | } |
| | | } |