Skip to content

Commit

Permalink
Merge branch 'fix/merge74' into feature/DCMFOSS-75
Browse files Browse the repository at this point in the history
  • Loading branch information
Bailonis committed Oct 4, 2023
2 parents df04c58 + cbeb04f commit d05c845
Show file tree
Hide file tree
Showing 3 changed files with 291 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* *******************************************************************************
* Copyright (c) 2023 BMW AG
* Copyright (c) 2023 Contributors to the Eclipse Foundation
Expand All @@ -24,7 +24,9 @@

import eclipse.tractusx.demand_capacity_mgmt_specification.model.*;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -75,6 +77,7 @@ public CapacityGroupResponse createCapacityGroup(CapacityGroupRequest capacityGr
@Override
public CapacityGroupResponse getCapacityGroupById(String capacityGroupId) {
CapacityGroupEntity capacityGroupEntity = getCapacityGroupEntity(capacityGroupId);

return convertCapacityGroupDto(capacityGroupEntity);
}

Expand Down Expand Up @@ -190,7 +193,7 @@ private CapacityGroupEntity enrichCapacityGroup(CapacityGroupRequest capacityGro
.map(
capacityRequest ->
enrichCapacityTimeSeries(
DataConverterUtil.convertFromString(capacityRequest.getCalendarWeek()),
LocalDate.parse(capacityRequest.getCalendarWeek()).atStartOfDay(),
capacityRequest.getActualCapacity().doubleValue(),
capacityRequest.getMaximumCapacity().doubleValue()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ public FavoriteResponse updateFavorite(UUID id, FavoriteType type, FavoriteReque
return convertFavoriteResponse(entity);

} else throw new NotFoundException(
404,
"Demand category not found",
new ArrayList<>(List.of("provided UUID did not match any records. - " + id))
404,
"Demand category not found",
new ArrayList<>(List.of("provided UUID did not match any records. - " + id))
);

}
Expand Down
Loading

0 comments on commit d05c845

Please sign in to comment.