| | |
| | | return this.baseMapper.findWaitList(date); |
| | | } |
| | | |
| | | @Override |
| | | public MdcEquipmentRunningSection getFirstRecord() { |
| | | return this.baseMapper.getFirstRecord(); |
| | | } |
| | | |
| | | private Map<String, List<MdcEquipmentRunningSectionDto>> logCharts(MdcEquipmentRunningSectionVo equipmentRunningSectionVo, String date) { |
| | | Map<String, List<MdcEquipmentRunningSectionDto>> map = new HashMap<>(); |
| | | List<MdcEquipmentRunningSectionDto> normal = new ArrayList<>(); |
| | | List<MdcEquipmentRunningSectionDto> waring = new ArrayList<>(); |
| | | List<MdcEquipmentRunningSectionDto> fault = new ArrayList<>(); |
| | | //运行 |
| | | List<MdcEquipmentRunningSection> running = loadEquipmentRunningTrace(equipmentRunningSectionVo.getEquipmentId(), date); |
| | | //报警 |
| | | List<MdcEquipmentRunningSection> errs = loadEquipmentErrorTrace(equipmentRunningSectionVo.getEquipmentId(), date); |
| | | //故障 |
| | | List<MdcEquipmentRunningSection> faults = loadEquipmentFaultTrace(equipmentRunningSectionVo.getEquipmentId(), date); |
| | | |
| | | if (running != null && !running.isEmpty()) { |
| | | MdcEquipmentRunningSectionDto dto; |
| | |
| | | map.put("waring", null); |
| | | } |
| | | |
| | | if (!faults.isEmpty()) { |
| | | MdcEquipmentRunningSectionDto dto; |
| | | for (MdcEquipmentRunningSection mdcEquipmentRunningSection : faults) { |
| | | dto = new MdcEquipmentRunningSectionDto(); |
| | | BeanUtils.copyProperties(mdcEquipmentRunningSection, dto); |
| | | fault.add(dto); |
| | | } |
| | | } else { |
| | | map.put("fault", null); |
| | | } |
| | | |
| | | map.put("normal", normal); |
| | | map.put("waring", waring); |
| | | map.put("fault", fault); |
| | | |
| | | return map; |
| | | } |