use of io.choerodon.agile.api.vo.SprintStoryPointVO in project agile-service by open-hand.
the class TeamPerformanceServiceImpl method querySprintStoryPoint.
@Override
public List<SprintStoryPointVO> querySprintStoryPoint(Long projectId) {
List<SprintStoryPointVO> sprintStoryPoints = teamPerformanceMapper.querySprintStoryPoints(projectId);
BigDecimal sumStoryPoints = new BigDecimal(0);
BigDecimal sumStoryPointsComplete = new BigDecimal(0);
List<Long> mainResponsibleIds = new ArrayList<>();
for (SprintStoryPointVO sprintStoryPoint : sprintStoryPoints) {
if (Objects.nonNull(sprintStoryPoint)) {
sumStoryPoints = DataUtil.add(sumStoryPoints, sprintStoryPoint.getStoryPoints());
sumStoryPointsComplete = DataUtil.add(sumStoryPointsComplete, sprintStoryPoint.getStoryPointsComplete());
Long mainResponsibleId = sprintStoryPoint.getMainResponsibleId();
if (Objects.nonNull(mainResponsibleId)) {
mainResponsibleIds.add(mainResponsibleId);
}
}
}
Map<Long, UserMessageDTO> usersMap = userService.queryUsersMap(mainResponsibleIds, true);
for (SprintStoryPointVO sprintStoryPoint : sprintStoryPoints) {
handleUser(sprintStoryPoint, usersMap);
handleMainRate(sumStoryPoints, sumStoryPointsComplete, sprintStoryPoint);
}
return sprintStoryPoints;
}
Aggregations