Skip to content

Commit

Permalink
[fix] : 비정상 부품 별 점수 오류 수정
Browse files Browse the repository at this point in the history
조건문 수정
  • Loading branch information
chahyunsoo committed Mar 10, 2024
1 parent f9dda15 commit 62ec49b
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,18 +239,17 @@ public List<AbnormalPartsDto> getAbnormalParts(Drone drone) {
categoryToAbnormalPartsMap.put("Esc", new ArrayList<>());

for (Part part : drone.getParts()) {
if (part.getMotorScore() != null && part.getMotorScore() <= 70) {
if (part.getMotorScore() != null && part.getBladeScore() <= 70) {
categoryToAbnormalPartsMap.get("Blade")
.add(PartScoreDto.of(part.getName(), part.getMotorScore()));
// .add(PartScoreDto.of(part.getName(), part.getMotorScore(), null, null))
.add(PartScoreDto.of(part.getName(), part.getBladeScore()));
}
if (part.getBladeScore() != null && part.getBladeScore() <= 70) {
if (part.getBladeScore() != null && part.getMotorScore() <= 70) {
categoryToAbnormalPartsMap.get("Motor")
.add(PartScoreDto.of(part.getName(), part.getMotorScore()));
}
if (part.getEscScore() != null && part.getEscScore() <= 70) {
categoryToAbnormalPartsMap.get("Esc")
.add(PartScoreDto.of(part.getName(), part.getMotorScore()));
.add(PartScoreDto.of(part.getName(), part.getEscScore()));
}
}

Expand Down

0 comments on commit 62ec49b

Please sign in to comment.