1、中空大理片笼详情页新增删除、破损、拿走操作按钮接口
2、理片笼进片任务计算目标格子优化:笼子进笼将格子分组求笼内最大组序,确保中间块玻璃破损后仍能进入,导致玻璃错乱的情况
| | |
| | | package com.mes.hollow.controller; |
| | | |
| | | |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.dto.HollowBigStorageAndDetailsDTO; |
| | | import com.mes.hollow.service.HollowBigStorageCageDetailsService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (HollowBigStorageCageDetails)表控制层 |
| | |
| | | @RequestMapping("hollowBigStorageCageDetails") |
| | | public class HollowBigStorageCageDetailsController { |
| | | |
| | | @Autowired |
| | | private HollowBigStorageCageDetailsService hollowBigStorageCageDetailsService; |
| | | |
| | | @ApiOperation("理片笼详情添加") |
| | | @PostMapping("/insertHollowBigStorageCageDetails") |
| | | public Result<List<HollowBigStorageAndDetailsDTO>> insertHollowBigStorageCageDetails(@RequestBody HollowBigStorageCageDetails details) { |
| | | hollowBigStorageCageDetailsService.insertHollowBigStorageCageDetails(details); |
| | | return Result.build(200, "添加成功", null); |
| | | } |
| | | |
| | | @ApiOperation("理片笼详情删除") |
| | | @PostMapping("/deleteHollowBigStorageCageDetails") |
| | | public Result<List<HollowBigStorageAndDetailsDTO>> deleteHollowBigStorageCageDetails(String glassId, Integer deviceId, Integer slot) { |
| | | hollowBigStorageCageDetailsService.deleteHollowBigStorageCageDetails(glassId, deviceId, slot); |
| | | return Result.build(200, "删除成功", null); |
| | | } |
| | | |
| | | @ApiOperation("理片笼笼内玻璃破损0/拿走1") |
| | | @PostMapping("/damageHollowBigStorageCageDetails") |
| | | public Result<List<HollowBigStorageAndDetailsDTO>> damageHollowBigStorageCageDetails(String glassId, Integer deviceId, Integer slot, int state) { |
| | | hollowBigStorageCageDetailsService.damageHollowBigStorageCageDetails(glassId, deviceId, slot, state); |
| | | return Result.build(200, "破损/拿走成功", null); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | | import com.mes.hollow.entity.dto.LackDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | import com.mes.hollow.service.HollowGlassRelationInfoService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | |
| | | @ApiOperation("界面点击创建任务:查询中空所有流程卡对应的玻璃信息") |
| | | @PostMapping("/queryHollowAllFlowCard") |
| | | public Result<Map<String, List<FlowCardGlassInfoDTO>>> queryHollowAllFlowCard() { |
| | | Map<String, List<FlowCardGlassInfoDTO>> bigStorageCageDetails = hollowGlassRelationInfoService.queryHollowAllFlowCard(); |
| | | public Result<Map<String, List<FlowCardGlassInfoDTO>>> queryHollowAllFlowCard(@RequestBody HollowBigStorageDetailsQueryVO query) { |
| | | Map<String, List<FlowCardGlassInfoDTO>> bigStorageCageDetails = hollowGlassRelationInfoService.queryHollowAllFlowCard(query); |
| | | return Result.success(bigStorageCageDetails); |
| | | } |
| | | |
| | |
| | | List<HollowBigStorageCageDetails> queryOutGlassList(@Param("flowCardId") String flowCardId, @Param("cell") int cell); |
| | | |
| | | List<BigStorageVO> queryHollowbigStorageCageDetail(); |
| | | |
| | | List<HollowBigStorageCageDetails> querySlotMaxSequence(@Param("flowCardId") String flowCardId, @Param("totalLayer") Integer totalLayer, @Param("layer") Integer layer, @Param("virtualSlot") Integer virtualSlot); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.base.entity.vo.BigStorageVO; |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.dto.BigStorageSequenceDTO; |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | | import com.mes.hollow.entity.dto.FlowCardVirtualSlotDTO; |
| | | import com.mes.hollow.entity.dto.UpdateHollowBigStorageCageDTO; |
| | | import com.mes.hollow.entity.dto.*; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | List<HollowBigStorageCageDetails> queryOutGlassList(String flowCardId, int cell); |
| | | |
| | | List<BigStorageVO> queryHollowbigStorageCageDetail(); |
| | | |
| | | /** |
| | | * 取出每组玻璃占用笼子的格子并计算格子内的最大组序号 |
| | | * |
| | | * @param flowCardId |
| | | * @param totalLayer |
| | | * @param layer |
| | | * @param virtualSlot |
| | | * @return |
| | | */ |
| | | List<HollowBigStorageCageDetails> querySlotMaxSequence(String flowCardId, Integer totalLayer, Integer layer, Integer virtualSlot); |
| | | |
| | | List<HollowBigStorageAndDetailsDTO> insertHollowBigStorageCageDetails(HollowBigStorageCageDetails bigStorageCageDetails); |
| | | |
| | | List<HollowBigStorageAndDetailsDTO> deleteHollowBigStorageCageDetails(String glassId, Integer deviceId, Integer slot); |
| | | |
| | | List<HollowBigStorageAndDetailsDTO> damageHollowBigStorageCageDetails(String glassId, Integer deviceId, Integer slot, int state); |
| | | } |
| | | |
| | |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | | import com.mes.hollow.entity.dto.HollowBigStorageDTO; |
| | | import com.mes.hollow.entity.dto.LackDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | */ |
| | | void generateHollowGlassInfo(String flowCardId, int totalLayer, int layer); |
| | | |
| | | Map<String, List<FlowCardGlassInfoDTO>> queryHollowAllFlowCard(); |
| | | Map<String, List<FlowCardGlassInfoDTO>> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query); |
| | | |
| | | Map<Integer, List<LackDetailsDTO>> queryLackByFlowCard(String flowCardId); |
| | | // List<LackDetailsDTO> queryLackByFlowCard(String flowCardId); |
| | |
| | | package com.mes.hollow.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.base.entity.vo.BigStorageVO; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.dto.BigStorageSequenceDTO; |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | | import com.mes.hollow.entity.dto.FlowCardVirtualSlotDTO; |
| | | import com.mes.hollow.entity.dto.UpdateHollowBigStorageCageDTO; |
| | | import com.mes.hollow.entity.HollowGlassRelationInfo; |
| | | import com.mes.hollow.entity.dto.*; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | import com.mes.hollow.mapper.HollowBigStorageCageDetailsMapper; |
| | | import com.mes.hollow.service.HollowBigStorageCageDetailsService; |
| | | import com.mes.hollow.service.HollowBigStorageCageService; |
| | | import com.mes.hollow.service.HollowGlassRelationInfoService; |
| | | import com.mes.job.OpcPlcStorageCageHollowTask; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Slf4j |
| | | public class HollowBigStorageCageDetailsServiceImpl extends ServiceImpl<HollowBigStorageCageDetailsMapper, HollowBigStorageCageDetails> implements HollowBigStorageCageDetailsService { |
| | | |
| | | @Resource |
| | | HollowBigStorageCageService hollowBigStorageCageService; |
| | | |
| | | @Resource |
| | | HollowGlassRelationInfoService hollowGlassRelationInfoService; |
| | | @Resource |
| | | GlassInfoService glassInfoService; |
| | | @Resource |
| | | OpcPlcStorageCageHollowTask opcPlcStorageCageHollowTask; |
| | | |
| | | @Override |
| | | public void updateBySlot(List<UpdateHollowBigStorageCageDTO> storageCageDTOList, Integer state) { |
| | |
| | | public List<BigStorageVO> queryHollowbigStorageCageDetail() { |
| | | return baseMapper.queryHollowbigStorageCageDetail(); |
| | | } |
| | | |
| | | @Override |
| | | public List<HollowBigStorageCageDetails> querySlotMaxSequence(String flowCardId, Integer totalLayer, Integer layer, Integer virtualSlot) { |
| | | return baseMapper.querySlotMaxSequence(flowCardId, totalLayer, layer, virtualSlot); |
| | | } |
| | | |
| | | @Override |
| | | public List<HollowBigStorageAndDetailsDTO> insertHollowBigStorageCageDetails(HollowBigStorageCageDetails bigStorageCageDetails) { |
| | | GlassInfo info = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().in(GlassInfo::getGlassId, bigStorageCageDetails.getGlassId())); |
| | | HollowBigStorageDTO hollowBigStorageDTO = hollowGlassRelationInfoService.queryHollowTargetSlot(bigStorageCageDetails.getFlowCardId(), bigStorageCageDetails.getWidth(), |
| | | bigStorageCageDetails.getHeight(), bigStorageCageDetails.getTotalLayer(), bigStorageCageDetails.getLayer()); |
| | | HollowBigStorageCageDetails cageDetails = new HollowBigStorageCageDetails(); |
| | | BeanUtils.copyProperties(hollowBigStorageDTO, cageDetails); |
| | | BeanUtils.copyProperties(info, cageDetails); |
| | | cageDetails.setState(Const.GLASS_STATE_NEW); |
| | | cageDetails.setSequence(hollowBigStorageDTO.getSlotSequence()); |
| | | cageDetails.setGap(250); |
| | | cageDetails.setId(null); |
| | | this.save(cageDetails); |
| | | hollowGlassRelationInfoService.update(new LambdaUpdateWrapper<HollowGlassRelationInfo>() |
| | | .set(HollowGlassRelationInfo::getGlassId, cageDetails.getGlassId()) |
| | | .set(HollowGlassRelationInfo::getTemperingLayoutId, cageDetails.getTemperingLayoutId()) |
| | | .set(HollowGlassRelationInfo::getTemperingFeedSequence, cageDetails.getTemperingFeedSequence()) |
| | | .set(HollowGlassRelationInfo::getEngineerId, cageDetails.getEngineerId()) |
| | | .set(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_OCCUPY) |
| | | .eq(HollowGlassRelationInfo::getFlowCardId, hollowBigStorageDTO.getFlowCardId()) |
| | | .eq(HollowGlassRelationInfo::getLayer, hollowBigStorageDTO.getLayer()) |
| | | .eq(HollowGlassRelationInfo::getVirtualSlot, hollowBigStorageDTO.getVirtualSlot()) |
| | | .eq(HollowGlassRelationInfo::getSlotSequence, hollowBigStorageDTO.getSlotSequence()) |
| | | .eq(HollowGlassRelationInfo::getHollowSequence, hollowBigStorageDTO.getHollowSequence()) |
| | | ); |
| | | HollowBigStorageDetailsQueryVO query = new HollowBigStorageDetailsQueryVO(); |
| | | query.setDeviceId(bigStorageCageDetails.getDeviceId()); |
| | | return hollowBigStorageCageService.queryHollowBigStorageCageDetail(query); |
| | | } |
| | | |
| | | @Override |
| | | public List<HollowBigStorageAndDetailsDTO> deleteHollowBigStorageCageDetails(String glassId, Integer deviceId, Integer slot) { |
| | | return hollowBigStorageCageDetailsChild(glassId, deviceId, slot, Const.GLASS_STATE_OUT); |
| | | } |
| | | |
| | | @Override |
| | | public List<HollowBigStorageAndDetailsDTO> damageHollowBigStorageCageDetails(String glassId, Integer deviceId, Integer slot, int state) { |
| | | return hollowBigStorageCageDetailsChild(glassId, deviceId, slot, state); |
| | | } |
| | | |
| | | private List<HollowBigStorageAndDetailsDTO> hollowBigStorageCageDetailsChild(String glassId, Integer deviceId, Integer slot, int state) { |
| | | //将对应格子号的玻璃id置为101 |
| | | this.update(new LambdaUpdateWrapper<HollowBigStorageCageDetails>() |
| | | .set(HollowBigStorageCageDetails::getState, state) |
| | | .eq(HollowBigStorageCageDetails::getSlot, slot) |
| | | .eq(HollowBigStorageCageDetails::getGlassId, glassId) |
| | | ); |
| | | //将流程卡广西表内对应的玻璃信息清除 |
| | | hollowGlassRelationInfoService.update(new LambdaUpdateWrapper<HollowGlassRelationInfo>() |
| | | .set(HollowGlassRelationInfo::getGlassId, null) |
| | | .set(HollowGlassRelationInfo::getTemperingLayoutId, null) |
| | | .set(HollowGlassRelationInfo::getTemperingFeedSequence, null) |
| | | .set(HollowGlassRelationInfo::getEngineerId, null) |
| | | .set(HollowGlassRelationInfo::getState, Const.HOLLOW_RELATION_NEW) |
| | | .eq(HollowGlassRelationInfo::getGlassId, glassId) |
| | | ); |
| | | //更新对应格子的剩余尺寸 |
| | | opcPlcStorageCageHollowTask.updateSlotRemainBySlots(Arrays.asList(slot)); |
| | | //返回对应的笼子的列表信息 |
| | | HollowBigStorageDetailsQueryVO query = new HollowBigStorageDetailsQueryVO(); |
| | | query.setDeviceId(deviceId); |
| | | return hollowBigStorageCageService.queryHollowBigStorageCageDetail(query); |
| | | } |
| | | } |
| | | |
| | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.lang.Assert; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | |
| | | import com.mes.hollow.entity.dto.HollowBigStorageDTO; |
| | | import com.mes.hollow.entity.dto.HollowGlassDetailsDTO; |
| | | import com.mes.hollow.entity.dto.LackDetailsDTO; |
| | | import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO; |
| | | import com.mes.hollow.mapper.HollowGlassRelationInfoMapper; |
| | | import com.mes.hollow.service.HollowBigStorageCageDetailsService; |
| | | import com.mes.hollow.service.HollowBigStorageCageService; |
| | |
| | | .last("limit 1") |
| | | ); |
| | | } |
| | | HollowBigStorageCageDetails hollowDetails = hollowBigStorageCageDetailsService.getOne(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | //详情表内获取本组是否已经有玻璃在笼子内(0表示提前占用) |
| | | List<HollowBigStorageCageDetails> hollowDetailsList = hollowBigStorageCageDetailsService.list(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getFlowCardId, relationInfoOne.getFlowCardId()) |
| | | .eq(HollowBigStorageCageDetails::getTotalLayer, totalLayer) |
| | | .eq(HollowBigStorageCageDetails::getLayer, layer) |
| | | .eq(HollowBigStorageCageDetails::getVirtualSlot, relationInfoOne.getVirtualSlot()) |
| | | .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO) |
| | | .orderByDesc(HollowBigStorageCageDetails::getSequence).last("limit 1")); |
| | | .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO)); |
| | | HollowBigStorageCage storageCage = null; |
| | | if (null == hollowDetails) { |
| | | //如果不存在则选择笼内未用的新格子 |
| | | if (CollectionUtil.isEmpty(hollowDetailsList)) { |
| | | storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>() |
| | | .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getRemainWidth, slotWidth) |
| | | .le(HollowBigStorageCage::getMinThickness, relationInfoOne.getThickness()) |
| | |
| | | BeanUtils.copyProperties(relationInfoOne, storageDTO); |
| | | return storageDTO; |
| | | } |
| | | //获取当前组在笼子内的格子号(按照组内序号-1计算 如果没有则新开一格) |
| | | HollowGlassRelationInfo relationInfoBefore = hollowGlassRelationInfoService.getOne(new LambdaQueryWrapper<HollowGlassRelationInfo>() |
| | | .eq(HollowGlassRelationInfo::getFlowCardId, relationInfoOne.getFlowCardId()) |
| | | .eq(HollowGlassRelationInfo::getTotalLayer, relationInfoOne.getTotalLayer()) |
| | |
| | | .eq(HollowGlassRelationInfo::getVirtualSlot, relationInfoOne.getVirtualSlot()) |
| | | .eq(HollowGlassRelationInfo::getSlotSequence, relationInfoOne.getSlotSequence() - 1)); |
| | | if (null == relationInfoBefore) { |
| | | //表示序号没有或者 序号为1又不是第一块来的 新开一格 |
| | | storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>() |
| | | .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getRemainWidth, slotWidth) |
| | | .le(HollowBigStorageCage::getMinThickness, relationInfoOne.getThickness()) |
| | | .ge(HollowBigStorageCage::getMaxThickness, relationInfoOne.getThickness()) |
| | | .orderByAsc(HollowBigStorageCage::getMaxThickness).last("limit 1")); |
| | | } else { |
| | | //获取详情表组内前一片玻璃的笼内详情数据 |
| | | HollowBigStorageCageDetails beforeGlass = hollowBigStorageCageDetailsService.getOne(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO) |
| | | .eq(HollowBigStorageCageDetails::getEngineerId, relationInfoBefore.getEngineerId()) |
| | | .eq(HollowBigStorageCageDetails::getTemperingLayoutId, relationInfoBefore.getTemperingLayoutId()) |
| | | .eq(HollowBigStorageCageDetails::getTemperingFeedSequence, relationInfoBefore.getTemperingFeedSequence()) |
| | | ); |
| | | //改组在笼内有玻璃但是前一块玻璃没有:原因 玻璃破损处理 |
| | | if (null == beforeGlass) { |
| | | storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>() |
| | | .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getRemainWidth, slotWidth) |
| | |
| | | .ge(HollowBigStorageCage::getMaxThickness, relationInfoOne.getThickness()) |
| | | .orderByAsc(HollowBigStorageCage::getMaxThickness).last("limit 1")); |
| | | } else { |
| | | storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>() |
| | | .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getSlot, beforeGlass.getSlot())); |
| | | //取出每组玻璃占用笼子的格子并计算格子内的最大组序号,避免玻璃顺序错乱 |
| | | List<HollowBigStorageCageDetails> hollowSequenceList = hollowBigStorageCageDetailsService |
| | | .querySlotMaxSequence(beforeGlass.getFlowCardId(), beforeGlass.getTotalLayer(), beforeGlass.getLayer(), beforeGlass.getVirtualSlot()); |
| | | for (HollowBigStorageCageDetails hollowBigStorageCageDetail : hollowSequenceList) { |
| | | if (relationInfoOne.getSlotSequence() - 1 == hollowBigStorageCageDetail.getSequence()) { |
| | | storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>() |
| | | .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getSlot, beforeGlass.getSlot())); |
| | | break; |
| | | } |
| | | } |
| | | if (storageCage == null) { |
| | | storageCage = hollowBigStorageCageService.getOne(new LambdaQueryWrapper<HollowBigStorageCage>() |
| | | .eq(HollowBigStorageCage::getEnableState, Const.SLOT_ON).eq(HollowBigStorageCage::getRemainWidth, slotWidth) |
| | | .le(HollowBigStorageCage::getMinThickness, relationInfoOne.getThickness()) |
| | | .ge(HollowBigStorageCage::getMaxThickness, relationInfoOne.getThickness()) |
| | | .orderByAsc(HollowBigStorageCage::getMaxThickness).last("limit 1")); |
| | | } |
| | | } |
| | | } |
| | | Assert.isTrue(null != storageCage, "没有空余的笼子存放玻璃"); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<FlowCardGlassInfoDTO>> queryHollowAllFlowCard() { |
| | | public Map<String, List<FlowCardGlassInfoDTO>> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query) { |
| | | List<HollowBigStorageCageDetails> detailsList = hollowBigStorageCageDetailsService.list(new LambdaQueryWrapper<HollowBigStorageCageDetails>() |
| | | .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN)); |
| | | .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN) |
| | | .like(StringUtils.isNotBlank(query.getFilmsId()), HollowBigStorageCageDetails::getFilmsId, query.getFilmsId()) |
| | | .like(StringUtils.isNotBlank(query.getFlowCardId()), HollowBigStorageCageDetails::getFlowCardId, query.getFlowCardId()) |
| | | ); |
| | | if (CollectionUtil.isEmpty(detailsList)) { |
| | | log.info("笼内无玻璃"); |
| | | return new HashMap<>(); |
| | |
| | | group by SLOT |
| | | ORDER BY SLOT |
| | | </select> |
| | | <select id="querySlotMaxSequence" resultType="com.mes.hollow.entity.HollowBigStorageCageDetails"> |
| | | select max(sequence) as sequence, device_id, slot |
| | | from hollow_big_storage_cage_details |
| | | where (flow_card_id, total_layer, layer, virtual_slot) = |
| | | (#{flowCardId}, #{totalLayer}, #{layer}, #{virtualSlot}) |
| | | and state in (0, 100, 102, 103, 104) |
| | | group by device_id, slot |
| | | order by sequence |
| | | </select> |
| | | </mapper> |