add assetCode

This commit is contained in:
ihyeon-yong 2023-09-11 13:01:28 +09:00
parent 33d178b130
commit 59c0de7f25
3 changed files with 12 additions and 5 deletions

View File

@ -137,6 +137,7 @@ public class DefaultStatsService implements StatsService{
}
for(int i=0 ; i < 16 ; i++){
StatsDetailRecord statsDetailRecord = new StatsDetailRecord(
slot.getAssetCode(),
slot.getSlotNumber(),
String.valueOf(i),
"status",

View File

@ -28,7 +28,7 @@ public class StatsController {
@ResponseStatus(HttpStatus.OK)
@GetMapping("/chambers/stats")
public StatsResult chambers(
// @RequestHeader("Authorization") String authorization
@RequestHeader("Authorization") String authorization
){
log.info("[chambers stats]");
@ -37,11 +37,11 @@ public class StatsController {
return new StatsResult(chamberStats);
}
@ResourceMapping(name = "Chambers_stats_detail", method = "GET", uri = "/chambers/stats/{chamberNumber}", description = "get chamber stats detail")
@ResourceMapping(name = "Chambers_stats_detail", method = "GET", uri = "/chambers/stats/detail/{chamberNumber}", description = "get chamber stats detail")
@ResponseStatus(HttpStatus.OK)
@GetMapping("/chambers/stats/{chamberNumber}")
@GetMapping("/chambers/stats/detail/{chamberNumber}")
public PageableResponse<StatsDetailRecord> detail(
// @RequestHeader("Authorization") String authorization
@RequestHeader("Authorization") String authorization,
@PathVariable String chamberNumber,
@RequestParam(value = "page", required = false, defaultValue = "0") Integer page,
@RequestParam(value = "size", required = false, defaultValue = "20") Integer size

View File

@ -1,6 +1,7 @@
package inc.sdt.controlcentermanagement.presentation;
public class StatsDetailRecord {
private String assetCode;
private String slotNumber;
private String tubeId;
private String status;
@ -14,7 +15,8 @@ public class StatsDetailRecord {
private String voltageOffset;
private String currentOffset;
public StatsDetailRecord(String slotNumber, String tubeId, String status, String voltage, String current, String pin, String err1, String err2, String passTime, String retentionRate, String voltageOffset, String currentOffset) {
public StatsDetailRecord(String assetCode, String slotNumber, String tubeId, String status, String voltage, String current, String pin, String err1, String err2, String passTime, String retentionRate, String voltageOffset, String currentOffset) {
this.assetCode = assetCode;
this.slotNumber = slotNumber;
this.tubeId = tubeId;
this.status = status;
@ -29,6 +31,10 @@ public class StatsDetailRecord {
this.currentOffset = currentOffset;
}
public String getAssetCode() {
return assetCode;
}
public String getVoltageOffset() {
return voltageOffset;
}