Skip to content

Commit 2be88b6

Browse files
authored
FIX : 예상 대기시간, 인원 수정
1 parent 316f84e commit 2be88b6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/main/java/com/cloudcomputing/ohhanahana/dto/response/SensorDataResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ public class SensorDataResponse {
1616
private String currentLocation;
1717
private String currentDateTime;
1818
private Congestion congestion;
19-
private String expectedWaitingTime;
19+
private int expectedWaitingTime;
2020
private String expectedWaitingPeople;
2121

2222
public static SensorDataResponse toDTO(String currentLocation, String currentDateTime,
2323
Congestion congestion,
24-
String expectedWaitingTime, String expectedWaitingPeople) {
24+
int expectedWaitingTime, String expectedWaitingPeople) {
2525

2626
return SensorDataResponse.builder()
2727
.currentLocation(currentLocation)

src/main/java/com/cloudcomputing/ohhanahana/service/SensorDataService.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,22 @@ private Congestion determineCongestion(int sensor1Value, int sensor2Value, int s
9999
}
100100
}
101101

102-
private String calculateWaitingTime(Congestion congestion) throws JAXBException {
102+
private int calculateWaitingTime(Congestion congestion) throws JAXBException {
103103
int remain511Minute = busService.get511BusRemainMinute();
104104

105105
return switch (congestion) {
106-
case SPARE -> remain511Minute + "분";
107-
case NORMAL -> remain511Minute + 5 + "분";
108-
case CONGESTION -> remain511Minute + 10 + "분";
109-
default -> "-";
106+
case SPARE -> remain511Minute;
107+
case NORMAL -> remain511Minute;
108+
case CONGESTION -> remain511Minute + 10;
109+
default -> 0;
110110
};
111111
}
112112

113113
private String calculatePeople(Congestion congestion) {
114114
return switch (congestion) {
115-
case SPARE -> "15명";
116-
case NORMAL -> "25명";
117-
case CONGESTION -> "35명";
115+
case SPARE -> "15";
116+
case NORMAL -> "25";
117+
case CONGESTION -> "35";
118118
default -> "-";
119119
};
120120
}

0 commit comments

Comments
 (0)