From 2b91b242113bd10f1be241d19ab154e9ad6506cd Mon Sep 17 00:00:00 2001 From: wangfei <3597712270@qq.com> Date: 星期二, 10 六月 2025 14:18:00 +0800 Subject: [PATCH] 国际化命名 --- hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java | 200 ++++++++++++++++++++++++++++++++++++------------- 1 files changed, 145 insertions(+), 55 deletions(-) diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java index 4d69ac4..77649b7 100644 --- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java +++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java @@ -24,12 +24,14 @@ import com.mes.bigstoragecagetask.service.BigStorageCageTaskService; import com.mes.bigstoragetask.entity.UpdateBigStorageCageDTO; import com.mes.common.config.Const; +import com.mes.common.config.ConstSysConfig; import com.mes.damage.entity.Damage; import com.mes.damage.service.DamageService; import com.mes.edgglasstask.entity.EdgGlassTaskInfo; import com.mes.edgglasstask.service.EdgGlassTaskInfoService; import com.mes.glassinfo.entity.GlassInfo; import com.mes.glassinfo.service.GlassInfoService; +import com.mes.sysconfig.service.SysConfigService; import com.mes.temperingglass.entity.TemperingGlassInfo; import com.mes.temperingglass.service.TemperingGlassInfoService; import com.mes.utils.RedisUtil; @@ -37,7 +39,6 @@ import org.apache.commons.lang.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @@ -76,25 +77,15 @@ MiloService miloService; @Resource + SysConfigService sysConfigService; + + /** + * 鐩撮�氭牸瀛� + */ + private static final Integer THROUGH_SLOT = 920; + + @Resource private RedisUtil redisUtil; - - @Value("${mes.slotWidth}") - private Integer slotWidth; - - @Value("${mes.glassGap}") - private Integer glassGap; - - @Value("${mes.carWidth}") - private Integer carWidth; - - @Value("${mes.outCarMaxSize}") - private Integer outCarMaxSize; - - @Value("${mes.temperingOutTargetPosition}") - private Integer temperingOutTargetPosition; - @Value("${mes.artificialOutTargetPosition}") - private Integer artificialOutTargetPosition; - @Scheduled(fixedDelay = 1000) public void inBigStorageTask() throws Exception { @@ -133,45 +124,118 @@ return; } log.info("鑾峰彇浠诲姟鐨勭幓鐠僫d锛歿}", glassIdList); + ReadWriteEntity countEntity = miloService.readFromOpcUa("DLP1A.DLP1A.glassCount"); + if (null == countEntity.getValue() || Integer.parseInt(countEntity.getValue() + "") != glassIdList.size()) { + log.info("褰撳墠澶ц溅杩涚墖鐜荤拑鏁伴噺{}涓巑es璇诲彇鍒扮殑鏁伴噺{}涓嶅尮閰嶏紝缁撴潫杩涚墖浠诲姟", countEntity.getValue(), glassIdList.size()); + //鍚憄lc鍙戦�佹姤璀�:褰撳墠澶ц溅杩涚墖鐜荤拑鏁伴噺涓巑es璇诲彇鍒扮殑鏁伴噺涓嶅尮閰� + miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 1)); + return; + } Map<String, Long> glassCountMap = glassIdList.stream().collect(Collectors.groupingBy(e -> e, Collectors.counting())); for (Map.Entry<String, Long> entry : glassCountMap.entrySet()) { if (entry.getValue() > 1) { log.info("杩涚墖鐜荤拑{}瀛樺湪鐩稿悓锛岀粨鏉熸湰娆′换鍔�", entry.getKey()); - //todo:鍚憄lc鍙戦�佹姤璀� + //鍚憄lc鍙戦�佹姤璀�:鍚屼竴杞﹁繘鐗囩幓鐠冨瓨鍦ㄧ浉鍚� + miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 2)); return; } } List<BigStorageCageDetails> detailsList = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>().in(BigStorageCageDetails::getGlassId, glassIdList) - .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL)); + .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL_ZERO)); if (CollectionUtil.isNotEmpty(detailsList)) { log.info("鐞嗙墖绗煎瓨鍦ㄧ浉鍚岀殑杩涚墖鐜荤拑{}锛岀粨鏉熸湰娆′换鍔�", detailsList); - //todo:鍚憄lc鍙戦�佹姤璀� + //鍚憄lc鍙戦�佹姤璀�:鐞嗙墖绗煎瓨鍦ㄧ浉鍚岀殑杩涚墖鐜荤拑 + miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 4)); return; } List<GlassInfo> glassInfoList = glassInfoService.list(new LambdaQueryWrapper<GlassInfo>().in(GlassInfo::getGlassId, glassIdList)); if (glassInfoList.size() != inTaskList.size()) { log.info("杩涚墖浠诲姟鏁伴噺{}涓庣幓鐠冩暟閲弡}涓嶅尮閰嶏紝缁撴潫鏈杩涚墖", inTaskList.size(), glassInfoList.size()); - //todo:鍚憄lc鍙戦�佹姤璀� + //鍚憄lc鍙戦�佹姤璀�:杩涚墖浠诲姟鏁伴噺涓庣郴缁熸煡璇㈠埌鐨勭幓鐠冩暟閲忎笉鍖归厤 + miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 8)); return; } + Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_GLASS_GAP); + Integer slotMaxthickness = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_MAX_THICKNESS); + Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH); + Integer slotMaxHeight = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_MAX_HEIGHT); + //鎸夌収鐜荤拑鍘氬害鍒嗙粍锛屽垽鏂墿浣欐牸瀛愭槸鍚﹀彲浠ュ瓨鏀� + Map<Double, Long> thickCountMap = glassInfoList.stream().collect(Collectors.groupingBy(GlassInfo::getThickness, Collectors.counting())); + if (glassInfoList.get(0).getThickness() < slotMaxthickness) { + for (Map.Entry<Double, Long> entry : thickCountMap.entrySet()) { + int count = bigStorageCageService.count(new LambdaQueryWrapper<BigStorageCage>() + .eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getRemainWidth, slotWidth) + .le(BigStorageCage::getMinThickness, entry.getKey()) + .ge(BigStorageCage::getMaxThickness, entry.getKey())); + if (count < entry.getValue()) { + log.info("绗煎唴鏍煎瓙鍓╀綑鏁伴噺涓嶈冻锛岀粨鏉熸湰娆¤繘鐗�"); + //鍚憄lc鍙戦�佹姤璀�:绗煎唴鏍煎瓙鍓╀綑鏁伴噺涓嶈冻 + miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 16)); + return; + } + } + } + //瓒呭ぇ灏哄 + if (slotMaxHeight < Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight()) || glassInfoList.get(0).getThickness() >= slotMaxthickness) { + int count = bigStorageCageDetailsService.count(new LambdaQueryWrapper<BigStorageCageDetails>() + .eq(BigStorageCageDetails::getSlot, THROUGH_SLOT) + .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL)); + if (count > 0) { + log.info("鐩撮�氱墖鍙板瓨鍦ㄧ幓鐠冿紝缁撴潫鏈杩涚墖"); + //鍚憄lc鍙戦�佹姤璀�:鐩撮�氱墖鍙板瓨鍦ㄧ幓鐠冿紝鏃犳硶缁х画鐩撮�� + miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 64)); + return; + } + } + //淇敼纾ㄨ竟瀵瑰垪琛ㄧ殑鐜荤拑鐘舵�� edgGlassTaskInfoService.update(new LambdaUpdateWrapper<EdgGlassTaskInfo>() .set(EdgGlassTaskInfo::getState, Const.EDG_GLASS_SUCCESS).in(EdgGlassTaskInfo::getGlassId, glassIdList)); + //鎶ュ伐 + for (String glass : glassIdList) { + damageService.autoSubmitReport(glass, inTaskList.get(0).getStartSlot(), "纾ㄨ竟", "杩涘ぇ鐞嗙墖绗�", 1); + } + Map<String, List<GlassInfo>> glassListMap = glassInfoList.stream().collect(Collectors.groupingBy(GlassInfo::getGlassId)); //璁$畻鐩爣鏍煎瓙 List<BigStorageCageHistoryTask> historyTasks = new ArrayList<>(); - for (BigStorageCageTask task : inTaskList) { - GlassInfo info = glassListMap.get(task.getGlassId()).get(0); - BigStorageDTO bigStorageDTO = bigStorageGlassInfoService.queryBigStorageTargetSlot(info.getEngineerId(), info.getTemperingLayoutId(), info.getTemperingFeedSequence()); - //鑾峰彇鐩爣鏍煎瓙淇℃伅 + //瓒呭ぇ灏哄涓庢甯稿昂瀵哥幓鐠冭绠楁柟寮忎笉涓�鏍� + if (slotMaxHeight > Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight()) && glassInfoList.get(0).getThickness() < slotMaxthickness) { + for (BigStorageCageTask task : inTaskList) { + GlassInfo info = glassListMap.get(task.getGlassId()).get(0); + BigStorageDTO bigStorageDTO = bigStorageGlassInfoService.queryBigStorageTargetSlot(info.getEngineerId(), info.getTemperingLayoutId(), info.getTemperingFeedSequence()); + //鑾峰彇鐩爣鏍煎瓙淇℃伅 // BigStorageDTO bigStorageDTO = bigStorageCageDetailsService.queryTargetSlotByTempering(info); // 涓存椂鏇存柊鏍煎瓙鐨勫墿浣欏昂瀵革細闃叉鐩搁偦鐜荤拑杩涘悓涓�鏍煎瓙閫犳垚鍓╀綑灏哄涓嶈冻锛岀幓鐠冭秺鐣岀殑鎯呭喌锛屼换鍔″畬鎴愬悗鍐嶆鏇存柊澶х悊鐗囩琛ㄥ墿浣欏搴︼紙鎸夌収绗煎唴鐜荤拑鏁伴噺鏇存柊澶х悊鐗囩鍓╀綑灏哄锛� - bigStorageCageService.update(new LambdaUpdateWrapper<BigStorageCage>() - .set(BigStorageCage::getRemainWidth, bigStorageDTO.getWidth() - Math.max(info.getWidth(), info.getHeight()) - glassGap) - .eq(BigStorageCage::getSlot, bigStorageDTO.getSlot())); - task.setTargetSlot(bigStorageDTO.getSlot()); - task.setGlassId(info.getGlassId()); + bigStorageCageService.update(new LambdaUpdateWrapper<BigStorageCage>() + .set(BigStorageCage::getRemainWidth, bigStorageDTO.getWidth() - Math.max(info.getWidth(), info.getHeight()) - glassGap) + .eq(BigStorageCage::getSlot, bigStorageDTO.getSlot())); + task.setTargetSlot(bigStorageDTO.getSlot()); + task.setGlassId(info.getGlassId()); + bigStorageCageTaskService.updateTaskMessage("big_storage_cage_in_one_task", task); + //瀛樻斁鍘嗗彶浠诲姟 + BigStorageCageHistoryTask historyTask = new BigStorageCageHistoryTask(); + BeanUtils.copyProperties(task, historyTask); + historyTask.setTaskType(Const.BIG_STORAGE_BEFORE_IN); + historyTask.setGlassCount(glassInfoList.size()); + historyTask.setTaskState(Const.ENGINEERING_NEW); + historyTasks.add(historyTask); + BigStorageCageDetails cageDetails = new BigStorageCageDetails(); + BeanUtils.copyProperties(info, cageDetails); + cageDetails.setSlot(bigStorageDTO.getSlot()); + cageDetails.setState(Const.GLASS_STATE_NEW); + cageDetails.setDeviceId(bigStorageDTO.getDeviceId()); + cageDetails.setSequence(bigStorageDTO.getSlotSequence()); + cageDetails.setAngle((int) info.getAngle()); + cageDetails.setGap(glassGap); + cageDetails.setFilmsId(info.getFilmsid()); + cageDetails.setId(null); + bigStorageCageDetailsService.save(cageDetails); + } + } else { + BigStorageCageTask task = inTaskList.get(0); + task.setTargetSlot(THROUGH_SLOT); bigStorageCageTaskService.updateTaskMessage("big_storage_cage_in_one_task", task); //瀛樻斁鍘嗗彶浠诲姟 BigStorageCageHistoryTask historyTask = new BigStorageCageHistoryTask(); @@ -180,13 +244,16 @@ historyTask.setGlassCount(glassInfoList.size()); historyTask.setTaskState(Const.ENGINEERING_NEW); historyTasks.add(historyTask); + GlassInfo info = glassInfoList.get(0); BigStorageCageDetails cageDetails = new BigStorageCageDetails(); BeanUtils.copyProperties(info, cageDetails); - cageDetails.setSlot(bigStorageDTO.getSlot()); + cageDetails.setSlot(THROUGH_SLOT); cageDetails.setState(Const.GLASS_STATE_NEW); - cageDetails.setDeviceId(bigStorageDTO.getDeviceId()); - cageDetails.setSequence(bigStorageDTO.getSlotSequence()); + cageDetails.setDeviceId(0); + cageDetails.setSequence(0); cageDetails.setGap(glassGap); + cageDetails.setAngle((int) info.getAngle()); + cageDetails.setFilmsId(info.getFilmsid()); cageDetails.setId(null); bigStorageCageDetailsService.save(cageDetails); } @@ -223,23 +290,27 @@ //鏄惁鍏佽閽㈠寲 //鏄惁鏈夋鍦ㄩ挗鍖栫殑鐜荤拑:閽㈠寲灏忕墖琛ㄥ叧鑱斿巻鍙蹭换鍔¤〃锛岀瓫閫夋湭鍑虹鐨勭幓鐠冧俊鎭� // 鑾峰彇褰撳墠閽㈠寲浠诲姟鏈畬鎴愬嚭鐗囩殑鐜荤拑淇℃伅 + + Integer temperingOutTargetPosition = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_TEMPERING_OUT_TARGET_POSITION); List<TemperingGlassInfo> unFinishTemperingGlassInfoList = temperingGlassInfoService.list(new LambdaQueryWrapper<TemperingGlassInfo>() - .eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW).orderByAsc(TemperingGlassInfo::getTemperingFeedSequence)); + .eq(TemperingGlassInfo::getState, Const.TEMPERING_NEW).orderByAsc(TemperingGlassInfo::getTemperingLayoutId).orderByAsc(TemperingGlassInfo::getTemperingFeedSequence)); if (CollectionUtil.isNotEmpty(unFinishTemperingGlassInfoList)) { -// List<String> glassIdList = unFinishTemperingGlassInfoList.stream().map(TemperingGlassInfo::getGlassId).collect(Collectors.toList()); -// List<BigStorageCageHistoryTask> historyTaskList = bigStorageCageHistoryTaskService.list(new LambdaQueryWrapper<BigStorageCageHistoryTask>() -// .eq(BigStorageCageHistoryTask::getTaskType, Const.BIG_STORAGE_BEFORE_OUT) -// .in(BigStorageCageHistoryTask::getGlassId, glassIdList)); -// List<TemperingGlassInfo> temperingGlassList = unFinishTemperingGlassInfoList; -// if (CollectionUtil.isNotEmpty(historyTaskList)) { -// List<String> taskGlassList = historyTaskList.stream().map(BigStorageCageHistoryTask::getGlassId).collect(Collectors.toList()); -// temperingGlassList = unFinishTemperingGlassInfoList.stream().filter(e -> !taskGlassList.contains(e.getGlassId())).collect(Collectors.toList()); -// } -// if (CollectionUtil.isNotEmpty(unFinishTemperingGlassInfoList)) { log.info("鏈夋鍦ㄥ嚭鐗囩殑閽㈠寲浠诲姟"); computeOutGlassInfoByVirtualSlot(unFinishTemperingGlassInfoList, "big_storage_cage_out_one_task", temperingOutTargetPosition, Const.GLASS_STATE_OUT_ING, Const.BIG_STORAGE_BEFORE_OUT); Date endDate = new Date(); log.info("澶х悊鐗囩鍑虹墖浠诲姟缁撴潫鏃堕棿锛歿}锛屽叡鑰楁椂锛歿}ms,缁撴潫鎵爜浠诲姟", endDate, endDate.getTime() - startDate.getTime()); + return; + } + + BigStorageCageDetails details = bigStorageCageDetailsService.getOne(new LambdaQueryWrapper<BigStorageCageDetails>() + .eq(BigStorageCageDetails::getSlot, THROUGH_SLOT) + .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL).last("limit 1")); + if (details != null) { + TemperingGlassInfo temperingGlassInfo = new TemperingGlassInfo(); + BeanUtils.copyProperties(details, temperingGlassInfo); + temperingGlassInfo.setState(-1); + temperingGlassInfoService.save(temperingGlassInfo); + computeOutGlassInfoByVirtualSlot(Arrays.asList(temperingGlassInfo), "big_storage_cage_out_one_task", temperingOutTargetPosition, Const.GLASS_STATE_OUT_ING, Const.BIG_STORAGE_BEFORE_OUT); return; } @@ -252,9 +323,9 @@ for (TemperingLayoutDTO item : temperingLayoutDTOList) { // if (item.getEngineerId().equals(redisUtil.getCacheObject("temperingengineerId"))) { List<TemperingGlassInfo> temperingGlassInfos = glassInfoService.selectJoinList(TemperingGlassInfo.class, JoinWrappers.lambda(GlassInfo.class) - .selectAll(GlassInfo.class) - .select("-1 as state") - .selectAs(BigStorageCageDetails::getSlot, TemperingGlassInfo::getSlot) + .select("-1 as state,t.filmsid as films_id,t.glass_id,t.flow_card_id,t.glass_type,t.width,t.height" + + ",t.thickness,t.ishorizontal,t.tempering_layout_id,t.tempering_feed_sequence,t.x_coordinate,t.y_coordinate," + + "t.angle,t1.slot,t.engineer_id") .innerJoin(BigStorageCageDetails.class, BigStorageCageDetails::getGlassId, GlassInfo::getGlassId) .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) .eq(GlassInfo::getTemperingLayoutId, item.getTemperingLayoutId()) @@ -272,6 +343,8 @@ } } //鏄惁鏈変汉宸ヤ笅鐗囦换鍔� 鏈夌洿鎺ュ嚭 + Integer artificialOutTargetPosition = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_ARTIFICIAL_OUT_TARGET_POSITION); + Integer outCarMaxSize = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_OUT_CAR_SIZE); List<BigStorageCageDetails> artificialList = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>() .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_ARTIFICIAL) .orderByAsc(BigStorageCageDetails::getSlot) @@ -421,7 +494,7 @@ //鑾峰彇杩涚墖浠诲姟琛� List<BigStorageCageTask> outTaskList = bigStorageCageTaskService.queryTaskMessage("big_storage_cage_out_one_task"); if (CollectionUtil.isEmpty(outTaskList)) { - log.info("褰撳墠澶ц溅鏃犺繘鐗囩幓鐠冿紝缁撴潫瀹屾垚杩涚墖浠诲姟"); + log.info("褰撳墠澶ц溅鏃犲嚭鐗囩幓鐠冿紝缁撴潫瀹屾垚鍑虹墖浠诲姟"); return; } List<BigStorageCageTask> unFinishTaskList = outTaskList.stream().filter(e -> e.getTaskState() <= 1 || e.getStartSlot() == 0).collect(Collectors.toList()); @@ -466,6 +539,10 @@ bigStorageCageDetailsService.updateBySlot(storageCageDTOList, Const.GLASS_STATE_OUT); } else { bigStorageCageDetailsService.updateBySlot(storageCageDTOList, Const.GLASS_STATE_IN); + //鎸夌収鏍煎瓙淇℃伅鏇存柊瀵瑰簲鐨勮澶噄d + List<Integer> slotList = storageCageDTOList.stream().map(UpdateBigStorageCageDTO::getTargetSlot).distinct().collect(Collectors.toList()); + bigStorageCageDetailsService.updateDeviceIdBySlot(slotList); + } log.info("4銆佸ぇ鐞嗙墖绗艰繘鐗囩姸鎬佸凡瀹屾垚宸插畬鎴愮殑鐜荤拑淇℃伅id:{}", v); updateSlotRemainBySlots(outSuccessGlassSlot); @@ -518,7 +595,7 @@ Damage damage = new Damage(); damage.setGlassId(item.getGlassId()); damage.setLine(item.getStartSlot()); - damage.setWorkingProcedure("纾ㄨ竟"); + damage.setWorkingProcedure("澶х悊鐗囩"); damage.setRemark("杩涚鍓嶅崸杞珛"); damage.setStatus(1); damage.setType(item.getTaskState()); @@ -615,9 +692,18 @@ */ private <T extends BigStorageCageBaseInfo> Boolean computeOutGlassInfoByVirtualSlot(List<T> list, String tableName, int targetSlot, int state, int taskType) { //浠诲姟鏁版嵁:鑾峰彇杞﹀瓙瀛樻斁鐜荤拑鏈�澶ф暟閲�,鐜荤拑闂撮殧 - List<String> glassIdList = bigStorageGlassRelationInfoService.queryNeedOutGlassId( - list.get(0).getEngineerId(), list.get(0).getTemperingLayoutId(), list.get(0).getTemperingFeedSequence()); - List<T> outGlassList = list.stream().filter(e -> glassIdList.contains(e.getGlassId())).collect(Collectors.toList()); + List<T> outGlassList = list; + if (!THROUGH_SLOT.equals(list.get(0).getSlot())) { + //todo:涓存椂瑙e喅鏂规:鍑虹墖鏃惰�冭檻鐜荤拑纰版挒锛屾敼涓轰竴鐗囦竴鍑� + // 鐣岄潰鍏抽棴璋冨害寮�鍏� !Const.BIG_STORAGE_BEFORE_DISPATCH.equals(taskType) + if (list.get(0).getThickness() >= 8) { + outGlassList = list.subList(0, 1); + } else { + List<String> glassIdList = bigStorageGlassRelationInfoService.queryNeedOutGlassId( + list.get(0).getEngineerId(), list.get(0).getTemperingLayoutId(), list.get(0).getTemperingFeedSequence()); + outGlassList = list.stream().filter(e -> glassIdList.contains(e.getGlassId())).collect(Collectors.toList()); + } + } Assert.isFalse(CollectionUtil.isEmpty(outGlassList), "鏈幏鍙栧嚭鐗囨暟鎹紝缁撴潫鍑虹墖浠诲姟"); log.info("鑾峰彇鍑虹墖浠诲姟鏁版嵁{}鏉★紝鎵ц淇濆瓨", outGlassList.size()); List<BigStorageCageTask> bigStorageCageTaskList = outGlassList.stream() @@ -666,7 +752,9 @@ //浠诲姟鏁版嵁:鑾峰彇杞﹀瓙瀛樻斁鐜荤拑鏈�澶ф暟閲�,鐜荤拑闂撮殧 List<BigStorageCageTask> bigStorageCageTaskList = new ArrayList<>(); //鎵撹溅鍓╀綑灏哄 - Integer remainWidth = carWidth; + Integer outCarMaxSize = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_OUT_CAR_SIZE); + Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_GLASS_GAP); + Integer remainWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_CAR_WIDTH); for (T e : list) { if (bigStorageCageTaskList.size() >= outCarMaxSize || Math.max((int) e.getWidth(), (int) e.getHeight()) > remainWidth) { break; @@ -716,6 +804,8 @@ List<BigStorageCageDetails> inSlotGlassList = bigStorageCageDetailsService.list(new LambdaQueryWrapper<BigStorageCageDetails>() .in(BigStorageCageDetails::getSlot, slotList).in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL)); Map<Integer, Double> slotRemainMap = new HashMap<>(); + Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_GLASS_GAP); + Integer slotWidth = sysConfigService.queryConfigValue(ConstSysConfig.VERTICAL_SLOT_WIDTH); //鏄惁瀛樺湪鏈夋牸瀛愰潪绌虹殑鐜荤拑 if (CollectionUtil.isNotEmpty(inSlotGlassList)) { //瀛樺湪 灏嗘牸瀛愬唴鐨勭幓鐠冨垎鍒繘琛屾洿鏂� -- Gitblit v1.8.0