diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/reports/dtos/HoursWorkedPerWorkerInAMonthDTO.java b/navalplanner-business/src/main/java/org/navalplanner/business/reports/dtos/HoursWorkedPerWorkerInAMonthDTO.java new file mode 100644 index 000000000..c65378136 --- /dev/null +++ b/navalplanner-business/src/main/java/org/navalplanner/business/reports/dtos/HoursWorkedPerWorkerInAMonthDTO.java @@ -0,0 +1,57 @@ +/* + * This file is part of NavalPlan + * + * Copyright (C) 2009-2010 Fundación para o Fomento da Calidade Industrial e + * Desenvolvemento Tecnolóxico de Galicia + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package org.navalplanner.business.reports.dtos; + +import org.navalplanner.business.resources.entities.Worker; + + +public class HoursWorkedPerWorkerInAMonthDTO { + + private String workerName; + + private Long numHours; + + public HoursWorkedPerWorkerInAMonthDTO(Worker worker, Long numHours) { + this.workerName = worker.getName(); + this.numHours = numHours; + } + + public Long getNumHours() { + return numHours; + } + + public void setNumHours(Long numHours) { + this.numHours = numHours; + } + + public String getWorkerName() { + return workerName; + } + + public void setWorkerName(String workerName) { + this.workerName = workerName; + } + + public String toString() { + return getWorkerName() + "; " + getNumHours(); + } + +} \ No newline at end of file diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/IResourceDAO.java b/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/IResourceDAO.java index 5e17c8e07..e22530c3b 100644 --- a/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/IResourceDAO.java +++ b/navalplanner-business/src/main/java/org/navalplanner/business/resources/daos/IResourceDAO.java @@ -28,6 +28,7 @@ import org.navalplanner.business.common.daos.IIntegrationEntityDAO; import org.navalplanner.business.labels.entities.Label; import org.navalplanner.business.planner.entities.Task; import org.navalplanner.business.reports.dtos.HoursWorkedPerResourceDTO; +import org.navalplanner.business.reports.dtos.HoursWorkedPerWorkerInAMonthDTO; import org.navalplanner.business.resources.entities.Criterion; import org.navalplanner.business.resources.entities.Machine; import org.navalplanner.business.resources.entities.Resource; @@ -120,9 +121,18 @@ public interface IResourceDAO extends IIntegrationEntityDAO { * the specified dates. * @return */ - public List getWorkingHoursPerWorker( + List getWorkingHoursPerWorker( List resources, List