Integer currentWeek = 0;
Integer year = 0;
Integer week = 0;
String yearString;
ReportDataTransport reportDataTransport = null;
ReportDataTransport.clearCostHeading();
List<ReportDataTransport> reportDataTransportList = new ArrayList<ReportDataTransport>();
Map<String, BigDecimal> costs = null;
Integer numberOf;
if (list != null && list.size() != 0) {
List<Object[]> beregnetTid=takstolInfoVManager.summerArbeidsinnsats(fromString, toString, transportConstraintEnum, productArea.getProductArea());
list.addAll(beregnetTid);
Collections.sort(list, aarUke());
for (Object[] object : list) {
year = (Integer) object[1];
week = (Integer) object[2];
yearString = String.format("%1$d%2$02d", year, week);
numberOf = numberOfOrders.get(yearString);
if (!year.equals(currentYear) || !week.equals(currentWeek)) {
addReportDataTransportToList(reportDataTransport, reportDataTransportList, costs);
reportDataTransport = new ReportDataTransport();
reportDataTransport.setYear(year);
reportDataTransport.setWeek(week);
reportDataTransport.setNumberOf(numberOf);
currentYear = year;
currentWeek = week;
costs = new Hashtable<String, BigDecimal>();
}