From 31cde7475c41aa9dbcc6d282ca3d92a07bd37bef Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 05 八月 2024 20:16:03 +0800 Subject: [PATCH] 优化代码 --- pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java index 28deed1..438f790 100644 --- a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java +++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java @@ -349,7 +349,7 @@ repairInfo.repairTime = new Date(); repairInfo.repairBy = workLast.userId; repairInfo.repairReason = vo.errorMsg; - if(preDeviceRecord!=null) { + if (preDeviceRecord != null) { repairInfo.fromNode = preDeviceRecord.currNode; } repairInfoDao.insertSelective(repairInfo); @@ -359,11 +359,9 @@ int count = deviceLast.id == null ? deviceLastDao.insertSelective(deviceLast) : deviceLastDao.updateByPrimaryKey(deviceLast); saveDeviceProductionLog(deviceLast); - if(preDeviceRecord.currNode != null){ - boolean isEndNode = nodeDao.isEndNode(preDeviceRecord.currNode); - if (isEndNode) { - saveDeviceLife(deviceLast); - } + //鍙缁忓巻杩囩粨鏉熻妭鐐�,灏变竴鐩磋褰昫evice life + if (preDeviceRecord != null && preDeviceRecord.getOutLineTime() != null) { + saveDeviceLife(deviceLast); } return count; } -- Gitblit v1.8.0