liurunyu
2024-08-09 d562b35ec9d09979971066ba9c07ec8576f9a45e
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);
            }
        //只要经历过结束节点,就一直记录device life
        if (preDeviceRecord != null && preDeviceRecord.getOutLineTime() != null) {
            saveDeviceLife(deviceLast);
        }
        return count;
    }