| | |
| | | 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); |
| | |
| | | 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; |
| | | } |