Package org.libreplan.business.reports.dtos

Examples of org.libreplan.business.reports.dtos.WorkReportLineDTO


                .findByOrderElementGroupByResourceAndHourTypeAndDate(orderElement);

        this.listWRL = groupByDate(listWRL);
        Iterator<WorkReportLineDTO> iterador = listWRL.iterator();
        while (iterador.hasNext()) {
            WorkReportLineDTO w = iterador.next();
            w.getResource().getShortDescription();
            w.getTypeOfWorkHours().getName();
            this.assignedDirectEffort = this.assignedDirectEffort.plus(w
                    .getSumEffort());
        }
        return sortByDate(listWRL);
    }
View Full Code Here


            List<WorkReportLineDTO> listWRL) {
        List<WorkReportLineDTO> groupedByDateList = new ArrayList<WorkReportLineDTO>();

        if (!listWRL.isEmpty()) {
            Iterator<WorkReportLineDTO> iterador = listWRL.iterator();
            WorkReportLineDTO currentWRL = iterador.next();
            groupedByDateList.add(currentWRL);

            while (iterador.hasNext()) {
                WorkReportLineDTO nextWRL = iterador.next();

                LocalDate currentDate = currentWRL.getLocalDate();
                LocalDate nextDate = nextWRL.getLocalDate();

                if ((currentWRL.getResource().getId().equals(nextWRL
                        .getResource().getId()))
                        && (currentWRL.getTypeOfWorkHours().getId()
                                .equals(nextWRL.getTypeOfWorkHours().getId()))
                        && (currentDate.compareTo(nextDate) == 0)) {
                    // sum the number of hours to the next WorkReportLineDTO
                    currentWRL.setSumEffort(currentWRL.getSumEffort().plus(
                            nextWRL.getSumEffort()));
                } else {
                    groupedByDateList.add(nextWRL);
                    currentWRL = nextWRL;
                }
            }
View Full Code Here

TOP

Related Classes of org.libreplan.business.reports.dtos.WorkReportLineDTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.