From b8b5b799e8770d29ac0a5b8530c468d74173c487 Mon Sep 17 00:00:00 2001 From: zhoushihao <zsh19950802@163.com> Date: 星期五, 03 一月 2025 23:22:53 +0800 Subject: [PATCH] 1、手动生成李赛克文件功能已完成、待联调 2、对接除膜机,调整对应的交互 3、中空两条线新增空闲信号,优先李赛克线优先 4、fixbug:指定工程后增加版图id排序,优先炉号从小到大,版序从小到大 --- hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java | 79 ++++----------------------------------- 1 files changed, 8 insertions(+), 71 deletions(-) diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java index 5fa3e66..55e15b0 100644 --- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java +++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java @@ -285,12 +285,11 @@ } //鑾峰彇绌洪棽涓旈鍙栦换鍔$殑鏁版嵁淇℃伅锛屾病鏈変换鍔$洿鎺ヨ蛋鐜荤拑璋冨害 - ReadWriteEntity oneEntity = miloService.readFromOpcUa("DLP2B.DLP2B.outOneRequest"); - ReadWriteEntity twoEntity = miloService.readFromOpcUa("DLP2B.DLP2B.outTwoRequest"); - ReadWriteEntity threeEntity = miloService.readFromOpcUa("DLP2B.DLP2B.outThreeRequest"); - int cell = -1; + ReadWriteEntity oneEntity = miloService.readFromOpcUa("CMJ1.CMJ1.isFree"); HollowGlassOutRelationInfo hollowGlassOutRelationInfo = null; - if ("1".equals(oneEntity.getValue() + "")) { + int cell = -1; + //鏉庤禌鍏嬬嚎闇�瑕佽幏鍙栭煩姹焢lc鐨勭嚎璺┖闂茬姸鎬侊細10000000绗�8浣嶄负 1琛ㄧず蹇欑 0琛ㄧず绌洪棽 + if (null != oneEntity.getValue() && "1".equals(oneEntity.getValue() + "")) { cell = 930; hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() @@ -298,7 +297,9 @@ .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) ); } - if (1 == 1 || null == hollowGlassOutRelationInfo && "1".equals(twoEntity.getValue() + "")) { + + ReadWriteEntity twoEntity = miloService.readFromOpcUa("ZKQ2.ZKQ2.isFree"); + if (null == hollowGlassOutRelationInfo && null != twoEntity.getValue() && Boolean.parseBoolean(twoEntity.getValue() + "")) { cell = 931; hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() @@ -306,14 +307,7 @@ .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) ); } - if (null == hollowGlassOutRelationInfo && "1".equals(threeEntity.getValue() + "")) { - cell = 932; - hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService - .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() - .eq(HollowGlassOutRelationInfo::getCell, cell) - .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) - ); - } + if (null != hollowGlassOutRelationInfo) { //鏄惁鍏佽涓┖ //鏄惁鏈夋鍦ㄤ腑绌虹殑鐜荤拑:涓┖灏忕墖琛ㄧ瓫閫夋湭鍑虹鐨勭幓鐠冧俊鎭� @@ -337,63 +331,6 @@ .eq(HollowGlassOutRelationInfo::getCell, hollowGlassOutRelationInfo.getCell()) .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_SUCCESS)); } -// if (redisUtil.getCacheObject("hollowSwitch")) { -// List<HollowGlassOutRelationInfo> HollowGlassOutRelationInfoList = hollowGlassOutRelationInfoService -// .list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() -// .eq(HollowGlassOutRelationInfo::getCell, cell) -// .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW)); -// for (HollowGlassOutRelationInfo e : HollowGlassOutRelationInfoList) { -// //涓┖浼樺厛锛氳幏鍙栫悊鐗囩 鐜荤拑灏忕墖 鐮存崯琛� 鏁伴噺 鍒ゆ柇绗煎唴鐗堝浘鏄惁鍒伴綈 -// List<FlowCardGlassInfoDTO> flowCardGlassInfoDTO = hollowBigStorageCageDetailsService.hollowIsAll(e.getFlowCardId(), e.getTotalLayer(), Boolean.TRUE); -// if (CollectionUtil.isNotEmpty(flowCardGlassInfoDTO)) { -// //鐜荤拑鍒伴綈鍖呮嫭宸插嚭鐗囩殑 -// //鍒伴綈锛屽皢鐜荤拑灏忕墖鏁版嵁瀛樺叆涓┖灏忕墖琛紝閫昏緫鐢熸垚鍑虹墖浠诲姟 缁撴潫 -// for (FlowCardGlassInfoDTO item : flowCardGlassInfoDTO) { -// List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService.queryOutGlassList(item.getFlowCardId(), cell); -// int finalCell = cell; -// List<HollowGlassQueueInfo> hollowQueues = hollowBigStorageCageDetailsList.stream().map(queue -> { -// HollowGlassQueueInfo queueInfo = new HollowGlassQueueInfo(); -// BeanUtils.copyProperties(queue, queueInfo); -// queueInfo.setState(Const.TEMPERING_NEW); -// queueInfo.setCell(finalCell); -// return queueInfo; -// }).collect(Collectors.toList()); -// -// List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService.queryOutGlassList(flowCardId, cell); -// int isPairCount = glassInfo.getTotalLayer() * e.getTotalLayer(); -// List<HollowGlassQueueInfo> hollowQueues = new ArrayList<>(); -// loop: -// for (HollowBigStorageCageDetails queue : hollowBigStorageCageDetailsList) { -// HollowGlassQueueInfo queueInfo = new HollowGlassQueueInfo(); -// BeanUtils.copyProperties(queue, queueInfo); -// queueInfo.setState(Const.TEMPERING_NEW); -// queueInfo.setCell(cell); -// hollowQueues.add(queueInfo); -// if (queue.getIsPair() == 1){ -// isPairCount -=1; -// if (isPairCount == 0){ -// break loop; -// } -// } -// } -// -// if (CollectionUtil.isNotEmpty(hollowQueues)) { -// hollowGlassQueueInfoService.saveBatch(hollowQueues); -// Integer isPair = hollowQueues.get(0).getIsPair(); -// hollowOutGlassByIsPair(hollowQueues, cell, isPair, e.getTotalLayer()); -// //灏嗕腑绌轰换鍔$姸鎬佹敼涓哄紑濮� -// hollowGlassOutRelationInfoService.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>() -// .eq(HollowGlassOutRelationInfo::getFlowCardId, e.getFlowCardId()) -// .eq(HollowGlassOutRelationInfo::getCell, cell) -// .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)); -// Date endDate = new Date(); -// log.info("澶х悊鐗囩鍑虹墖浠诲姟缁撴潫鏃堕棿锛歿}锛屽叡鑰楁椂锛歿}ms,缁撴潫鎵爜浠诲姟", endDate, endDate.getTime() - startDate.getTime()); -// return; -// } -// } -// } -// } -// } } // redisUtil.setCacheObject("dispatchHollowSwitch",true); //鏄惁瀛樺湪闇�瑕佸唴閮ㄨ皟搴︾殑鏍煎瓙:鎵ц鍐呴儴璋冨害浠诲姟 -- Gitblit v1.8.0