New file |
| | |
| | | package com.mes.downstorage.service.impl; |
| | | |
| | | |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.mes.downstorage.entity.DownStorageCage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.downstorage.entity.DownStorageCageDetails; |
| | | import com.mes.downstorage.mapper.DownStorageCageMapper; |
| | | import com.mes.downstorage.service.DownStorageCageService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author zhoush |
| | | * @since 2024-03-27 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class DownStorageCageServiceImpl extends MPJBaseServiceImpl<DownStorageCageMapper, DownStorageCage> implements DownStorageCageService { |
| | | @Autowired |
| | | private DownStorageCageMapper downStorageCageMapper; |
| | | @Override |
| | | public List<Map> gettask(){ |
| | | downStorageCageMapper.selectList(null); |
| | | // downStorageCageMapper.selectJoin(); |
| | | return null; |
| | | }; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> getCacheLeisure() { |
| | | log.info(" 查询笼子内空闲"); |
| | | MPJQueryWrapper mpjQueryWrapper = new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNull("escd.slot") |
| | | .orderByAsc("escd.slot"); |
| | | List<DownStorageCageDetails> list = baseMapper.selectJoinList( |
| | | DownStorageCageDetails.class,mpjQueryWrapper |
| | | ); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | // @Override |
| | | // public List<Map> getCacheOut(int start, int end) { |
| | | // log.info(" 根据传入的工位查询符合按照顺序和大小出片的小片"); |
| | | // List<Map> map = downStorageCageMapper.selectJoinList( |
| | | // Map.class, new MPJQueryWrapper<DownStorageCageDetails>() |
| | | // .select("escd.*") |
| | | // .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | // .leftJoin("down_workstation dw on escd.flow_card_id = dw.flow_card_id") |
| | | // .isNotNull("escd.slot") |
| | | // .between("dw.workstation_id", start, end) |
| | | // .orderByAsc("escd.tempering_layout_id, escd.tempering_feed_sequence") |
| | | // ); |
| | | // return map; |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> getCacheOut(int start, int end) { |
| | | log.info("根据传入的工位查询符合按照顺序和大小出片的小片"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .leftJoin("down_workstation dw on escd.flow_card_id = dw.flow_card_id") |
| | | .leftJoin("glass_info gi on dw.flow_card_id = gi.flowcard_id and gi.flowcard_id=escd.flow_card_id ") |
| | | .isNotNull("escd.slot") |
| | | .between("dw.workstation_id", start, end) |
| | | .orderByDesc("escd.width") |
| | | .orderByDesc("escd.height"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, mpjQueryWrapper |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<Map> getCacheInfo() { |
| | | log.info(" 查询笼子内信息"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .orderByAsc("t.slot"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | Map.class,mpjQueryWrapper |
| | | ); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> getIsExistIntoCacheByLayoutAndSequence(Integer tempering_layout_id, Integer tempering_feed_sequence, double width) { |
| | | log.info(" 查询可进此片玻璃的栅格号 找到相同版图id并且大于前面的顺序的空格"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .eq("escd.tempering_layout_id", tempering_layout_id) |
| | | .lt("escd.tempering_feed_sequence", tempering_feed_sequence) |
| | | .gt("t.remain_width", width) |
| | | .orderByAsc("escd.tempering_feed_sequence"); |
| | | List<DownStorageCageDetails> list = downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, mpjQueryWrapper |
| | | ); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> getIsExistIntoCacheByflowcardid(String flowcardid, double width) { |
| | | log.info(" 查询可进此片玻璃的栅格号 找到相同流程卡号的空格"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .eq("escd.flow_card_id", flowcardid) |
| | | .gt("t.remain_width", width) |
| | | .orderByAsc("escd.tempering_feed_sequence"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, mpjQueryWrapper |
| | | ); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> IsExistIntoCacheByflowcardid(String flowcardid, double width) { |
| | | log.info(" 查询可进此片玻璃的栅格号"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .lt("escd.flow_card_id", flowcardid) |
| | | // 条件 t.remain_width - width > 0 |
| | | .apply("t.remain_width - " + width + " > 0") |
| | | .orderByDesc("escd.tempering_layout_id, escd.tempering_feed_sequence"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class,mpjQueryWrapper |
| | | ); |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<DownStorageCageDetails> getIsExistIntoCacheByLayout(Integer tempering_layout_id, double width) { |
| | | log.info(" 查询可进此片玻璃的栅格号"); |
| | | MPJQueryWrapper mpjQueryWrapper =new MPJQueryWrapper<DownStorageCageDetails>() |
| | | .select("escd.*") |
| | | .leftJoin("down_storage_cage_details escd on t.slot = escd.slot") |
| | | .isNotNull("escd.slot") |
| | | .lt("escd.tempering_layout_id", tempering_layout_id) |
| | | // 条件 t.remain_width - width > 0 |
| | | .apply("t.remain_width - " + width + " > 0") |
| | | .orderByDesc("escd.tempering_layout_id, escd.tempering_feed_sequence"); |
| | | return downStorageCageMapper.selectJoinList( |
| | | DownStorageCageDetails.class, mpjQueryWrapper |
| | | ); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |