| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | |
| | | // @Value("${mes.threshold}") |
| | | private int threshold; |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | // @Scheduled(fixedDelay = 1000) |
| | | public void autoBindRack() { |
| | | log.info("根据缓存中已经进片的玻璃种数量最多的流程卡号自动绑定一个启用状态的空架子"); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | log.info("3、如果当前玻璃属于流程卡中的片序的顺序则直通,执行下片任务"); |
| | | DownWorkstation downWorkstation = downWorkstationService.getOne(new LambdaQueryWrapper<DownWorkstation>().eq(DownWorkstation::getFlowCardId, glassInfo.getFlowCardId())); |
| | | int WorkstationId = downWorkstation.getWorkstationId(); |
| | | DownGlassTask downGlassTask = downStorageCageService.createDownGlassTask(glassInfo, "0", String.valueOf(WorkstationId), "3"); |
| | | DownGlassTask downGlassTask = downStorageCageService.createDownGlassTask(glassInfo, 0, WorkstationId, "3"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | |
| | | } else { |
| | |
| | | downStorageCageDetailsService.save(details); |
| | | log.info("7、玻璃信息已存入理片笼详情表,玻璃信息为{}", details); |
| | | |
| | | DownGlassTask downGlassTask = downStorageCageService.createDownGlassTask(glassInfo, "0", item.getSlot() + "", "1"); |
| | | DownGlassTask downGlassTask = downStorageCageService.createDownGlassTask(glassInfo, 0, item.getSlot(), "1"); |
| | | //添加进片任务 |
| | | log.info("8、生成进片任务信息存入任务表{}", downGlassTask); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | |
| | | |
| | | DownStorageCageDetails selectedItem = null; |
| | | |
| | | String endCell = ""; |
| | | Integer endCell = null; |
| | | |
| | | // 优先 超出尺寸优先人工出片 人工处理 |
| | | if (!list1to6.isEmpty()) { |
| | |
| | | new LambdaQueryWrapper<DownWorkstation>() |
| | | .eq(DownWorkstation::getFlowCardId, selectedItem.getFlowCardId()) |
| | | ); |
| | | endCell = String.valueOf(downWorkstation.getWorkstationId()); |
| | | if (endCell.isEmpty()) { |
| | | endCell = "7"; |
| | | endCell = downWorkstation.getWorkstationId(); |
| | | if (endCell == null) { |
| | | endCell = 7; |
| | | } |
| | | DownGlassTask downGlassTask = downStorageCageService.createDownGlassTask(selectedItem, "9", endCell, "2"); |
| | | DownGlassTask downGlassTask = downStorageCageService.createDownGlassTask(selectedItem, 9, endCell, "2"); |
| | | downGlassTaskService.insertCacheTask(downGlassTask); |
| | | LambdaQueryWrapper<DownStorageCageDetails> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(DownStorageCageDetails::getGlassId, selectedItem.getGlassId()); |
| | |
| | | // 创建新的 DownGlassInfo 对象并设置相关属性 |
| | | DownGlassInfo newdownGlassInfo = new DownGlassInfo(); |
| | | |
| | | Integer maxSequence = downGlassInfoService.getMaxSequenceByFlowCardId(downGlassInfo.getFlowCardId()); |
| | | Integer maxSequence = downGlassInfoService.getMaxSequenceByFlowCardId(downGlassInfo.getFlowCardId(), downGlassInfo.getLayer()); |
| | | // 初始化顺序字段值 |
| | | int sequence = maxSequence != null ? maxSequence + 1 : 1; |
| | | BeanUtils.copyProperties(downGlassInfo, newdownGlassInfo); |