From 1f06ab808f1dde3cc21651c56e70e6b76786e4c5 Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期四, 01 八月 2024 15:12:45 +0800
Subject: [PATCH] repair

---
 pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 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..28deed1 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,11 +349,13 @@
         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);

--
Gitblit v1.8.0