tube stats detail 삭제된 코드 재추가
This commit is contained in:
parent
2aed8b9f65
commit
4c553d2938
|
@ -38,6 +38,7 @@ public class DefaultStatsService implements StatsService{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<StatsRecord> getChamberStats() {
|
public List<StatsRecord> getChamberStats() {
|
||||||
|
log.info("[getChamberStats]");
|
||||||
List<Slot> all= slotRepositoryDelegate.getAll();
|
List<Slot> all= slotRepositoryDelegate.getAll();
|
||||||
|
|
||||||
Map<String, List<Slot>> groupByChamber = all.stream().collect(Collectors.groupingBy(Slot::getChamberNumber));
|
Map<String, List<Slot>> groupByChamber = all.stream().collect(Collectors.groupingBy(Slot::getChamberNumber));
|
||||||
|
@ -82,8 +83,7 @@ public class DefaultStatsService implements StatsService{
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
throw new NoSuchElementException();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StatsCntRecord onCntRecord = new StatsCntRecord(onCnt.get(), onTotalCnt.get());
|
StatsCntRecord onCntRecord = new StatsCntRecord(onCnt.get(), onTotalCnt.get());
|
||||||
|
@ -98,8 +98,8 @@ public class DefaultStatsService implements StatsService{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<StatsDetailRecord> getChamberStatsDetail(int page, int size, String chamberNumber) {
|
public Page<StatsDetailRecord> getChamberStatsDetail(int page, int size, String chamberNumber) {
|
||||||
|
log.info("[getChamberStatsDetail] chamberNumber: {}", chamberNumber);
|
||||||
List<Slot> all= slotRepositoryDelegate.getAll().stream().filter(slot -> slot.getChamberNumber().equals(chamberNumber)).toList();
|
List<Slot> all= slotRepositoryDelegate.getAll().stream().filter(slot -> slot.getChamberNumber().equals(chamberNumber)).toList();
|
||||||
if (all.isEmpty()) throw new NoSuchElementException();
|
|
||||||
Pageable pageable = PageRequest.of(page, size);
|
Pageable pageable = PageRequest.of(page, size);
|
||||||
|
|
||||||
List<StatsDetailRecord> statsDetailRecords = new LinkedList<>();
|
List<StatsDetailRecord> statsDetailRecords = new LinkedList<>();
|
||||||
|
@ -138,6 +138,25 @@ public class DefaultStatsService implements StatsService{
|
||||||
} else {
|
} else {
|
||||||
throw new NoSuchElementException();
|
throw new NoSuchElementException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(int i=0 ; i < 16 ; i++){
|
||||||
|
StatsDetailRecord statsDetailRecord = new StatsDetailRecord(
|
||||||
|
slot.getAssetCode(),
|
||||||
|
slot.getSlotNumber(),
|
||||||
|
String.valueOf(i),
|
||||||
|
"status",
|
||||||
|
String.valueOf(voltageMap.get(String.valueOf(i))),
|
||||||
|
String.valueOf(currentMap.get(String.valueOf(i))),
|
||||||
|
String.valueOf(doMap.get(String.valueOf(i))),
|
||||||
|
String.valueOf(er1Map.get(String.valueOf(i))),
|
||||||
|
String.valueOf(er2Map.get(String.valueOf(i))),
|
||||||
|
"passTime",
|
||||||
|
"retentionRate",
|
||||||
|
String.valueOf(slot.getTube().get(i).getVoltageOffset()),
|
||||||
|
String.valueOf(slot.getTube().get(i).getAmpereOffset())
|
||||||
|
);
|
||||||
|
statsDetailRecords.add(statsDetailRecord);
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
statsDetailRecords.sort(new StatsDetailSlotNumberComparator());
|
statsDetailRecords.sort(new StatsDetailSlotNumberComparator());
|
||||||
|
|
Loading…
Reference in New Issue