From 0aef9abcba7f6e2cd41e330f397760cb8147c9b7 Mon Sep 17 00:00:00 2001 From: zhoushihao <zsh19950802@163.com> Date: 星期四, 18 七月 2024 08:38:53 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java | 36 ++++++++++++++++++++---------------- 1 files changed, 20 insertions(+), 16 deletions(-) diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java index dfc2719..5430e36 100644 --- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java +++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/PlcStorageCageTask.java @@ -263,23 +263,27 @@ return; } //閽㈠寲浼樺厛锛氳幏鍙栫悊鐗囩 鐜荤拑灏忕墖 鐮存崯琛� 鏁伴噺 鍒ゆ柇绗煎唴鐗堝浘鏄惁鍒伴綈 - TemperingLayoutDTO temperingLayoutDTO = bigStorageCageDetailsService.temperingIsAll(); - if (null != temperingLayoutDTO) { - //鐜荤拑鍒伴綈 + List<TemperingLayoutDTO> temperingLayoutDTOList = bigStorageCageDetailsService.temperingIsAll(); + if (CollectionUtils.isNotEmpty(temperingLayoutDTOList)) { + //鐜荤拑鍒伴綈鍖呮嫭宸插嚭鐗囩殑 //鍒伴綈锛屽皢鐜荤拑灏忕墖鏁版嵁瀛樺叆閽㈠寲灏忕墖琛紝閫昏緫鐢熸垚鍑虹墖浠诲姟 缁撴潫 - List<TemperingGlassInfo> temperingGlassInfos = glassInfoService.selectJoinList(TemperingGlassInfo.class, JoinWrappers.lambda(GlassInfo.class) - .selectAll(GlassInfo.class) - .select("-1 as state") - .selectAs(BigStorageCageDetails::getSlot, TemperingGlassInfo::getSlot) - .innerJoin(BigStorageCageDetails.class, BigStorageCageDetails::getGlassId, GlassInfo::getGlassId) - .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) - .eq(GlassInfo::getTemperingLayoutId, temperingLayoutDTO.getTemperingLayoutId()) - .eq(GlassInfo::getEngineerId, temperingLayoutDTO.getEngineerId())); - temperingGlassInfoService.saveBatch(temperingGlassInfos); - computeOutGlassInfo(temperingGlassInfoList, Boolean.TRUE, mesToPLCAddress); - Date endDate = new Date(); - log.info("澶х悊鐗囩鍑虹墖浠诲姟缁撴潫鏃堕棿锛歿}锛屽叡鑰楁椂锛歿}ms,缁撴潫鎵爜浠诲姟", endDate, endDate.getTime() - startDate.getTime()); - return; + for (TemperingLayoutDTO item : temperingLayoutDTOList) { + List<TemperingGlassInfo> temperingGlassInfos = glassInfoService.selectJoinList(TemperingGlassInfo.class, JoinWrappers.lambda(GlassInfo.class) + .selectAll(GlassInfo.class) + .select("-1 as state") + .selectAs(BigStorageCageDetails::getSlot, TemperingGlassInfo::getSlot) + .innerJoin(BigStorageCageDetails.class, BigStorageCageDetails::getGlassId, GlassInfo::getGlassId) + .eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN) + .eq(GlassInfo::getTemperingLayoutId, item.getTemperingLayoutId()) + .eq(GlassInfo::getEngineerId, item.getEngineerId())); + if (CollectionUtils.isNotEmpty(temperingGlassInfos)) { + temperingGlassInfoService.saveBatch(temperingGlassInfos); + computeOutGlassInfo(temperingGlassInfoList, Boolean.TRUE, mesToPLCAddress); + Date endDate = new Date(); + log.info("澶х悊鐗囩鍑虹墖浠诲姟缁撴潫鏃堕棿锛歿}锛屽叡鑰楁椂锛歿}ms,缁撴潫鎵爜浠诲姟", endDate, endDate.getTime() - startDate.getTime()); + return; + } + } } //鏈埌榻� 鎵ц鍐呴儴璋冨害浠诲姟 TemperingLayoutDTO temperingOccupySlot = bigStorageCageDetailsService.queryTemperingOccupySlot(); -- Gitblit v1.8.0