| | |
| | | //获取running运行的日志记录 |
| | | List<MdcEquipmentRunningSection> list = this.equipmentRunningTracesLog(equipment.getEquipmentid()); |
| | | if (list != null && !list.isEmpty()) { |
| | | List<MdcEquipmentRunningSection> equipList = addSequenceNumber(list); //添加程序号 |
| | | this.ergodicTrim(equipList); |
| | | super.saveBatch(equipList); |
| | | try { |
| | | List<MdcEquipmentRunningSection> equipList = addSequenceNumber(list); //添加程序号 |
| | | this.ergodicTrim(equipList); |
| | | super.saveBatch(equipList); |
| | | } catch (Exception e) { |
| | | log.error("添加程序号出现异常:", e); |
| | | } |
| | | } |
| | | //获取报警的日志记录 |
| | | List<MdcEquipmentRunningSection> errorList = this.equipmentRunningTracesErrorLog(equipment.getEquipmentid()); |
| | |
| | | ert.setStartTime(logList.get(i).getCollectTime()); |
| | | ert.setEndTime(logList.get(i + 1).getCollectTime()); |
| | | ert.setDuration(DateUtils.differentSecond(ert.getStartTime(), ert.getEndTime())); |
| | | // if (ert.getDuration() > 0) { |
| | | |
| | | erts.add(ert); |
| | | // } |
| | | |
| | | } else { |
| | | long count = differentSecond / 86400; |
| | | if (count % 86400 > 0) { |