| | |
| | | import org.jeecg.modules.mdc.service.*; |
| | | import org.jeecg.modules.mdc.util.DateUtils; |
| | | import org.jeecg.modules.mdc.util.TimeFieldUtils; |
| | | import org.jeecg.modules.mdc.vo.MdcAlarmAnalyzeQueryVo; |
| | | import org.jeecg.modules.mdc.vo.MdcEquipmentRunningSectionVo; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | * 设备运行状态点时间转为段时间 |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void runningAllEquipmentTraceProcess() { |
| | | //获取所有设备 |
| | | List<Equipment> equipmentList = equipmentService.list(); |
| | |
| | | @Override |
| | | public List<MdcEquipmentRunningSection> listEquipmentRunningSectionError(String equipmentid, long start, long end) { |
| | | return this.baseMapper.listEquipmentRunningSectionError(equipmentid, start, end); |
| | | } |
| | | |
| | | @Override |
| | | public List<MdcEquipmentRunningSection> findAlarmList(MdcAlarmAnalyzeQueryVo vo) { |
| | | return this.baseMapper.findAlarmList(vo); |
| | | } |
| | | |
| | | @Override |
| | | public Integer findAlarmCount(String equipmentId, String startDate, String endDate, String alarmCode) { |
| | | return this.baseMapper.findAlarmCount(equipmentId, startDate, endDate, alarmCode); |
| | | } |
| | | |
| | | @Override |
| | | public Integer findAlarmCountByDate(String startDate, String endDate, MdcAlarmAnalyzeQueryVo vo) { |
| | | return this.baseMapper.findAlarmCountByDate(startDate, endDate, vo); |
| | | } |
| | | |
| | | private Map<String, List<MdcEquipmentRunningSectionDto>> logCharts(MdcEquipmentRunningSectionVo equipmentRunningSectionVo, String date) { |
| | |
| | | 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); |
| | | } |
| | | // if (ert.getDuration() > 0) { |
| | | erts.add(ert); |
| | | // } |
| | | } else { |
| | | long count = differentSecond / 86400; |
| | | if (count % 86400 > 0) { |