From d722c501d795a1c548843d663a128ac1324d5c1b Mon Sep 17 00:00:00 2001
From: 刘小明 <liuxm_a@163.com>
Date: 星期三, 07 八月 2024 15:13:45 +0800
Subject: [PATCH] 初始化代码优化
---
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java | 14 +++++++-------
1 files changed, 7 insertions(+), 7 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 f87a757..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,19 +349,19 @@
repairInfo.repairTime = new Date();
repairInfo.repairBy = workLast.userId;
repairInfo.repairReason = vo.errorMsg;
- repairInfo.fromNode = preDeviceRecord.currNode;
+ if (preDeviceRecord != null) {
+ repairInfo.fromNode = preDeviceRecord.currNode;
+ }
repairInfoDao.insertSelective(repairInfo);
StaDeviceLast deviceLast = buildDeviceLast(vo, workLast, vo.deviceNo[0]);
-
+ deviceLast.setRepairId(repairInfo.getId());
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