diff --git a/pom.xml b/pom.xml
index 194425f..1687fbf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -186,6 +186,16 @@
viritin
2.8.22
+
+ org.apache.poi
+ poi-ooxml
+ 5.2.3
+
+
+ org.apache.poi
+ poi-ooxml-schemas
+ 4.1.2
+
com.flowingcode.addons
simple-timer
diff --git a/src/main/bundles/prod.bundle b/src/main/bundles/prod.bundle
index 0fe6623..3338417 100644
Binary files a/src/main/bundles/prod.bundle and b/src/main/bundles/prod.bundle differ
diff --git a/src/main/java/com/primefactorsolutions/model/Actividad.java b/src/main/java/com/primefactorsolutions/model/Actividad.java
new file mode 100644
index 0000000..f7df96d
--- /dev/null
+++ b/src/main/java/com/primefactorsolutions/model/Actividad.java
@@ -0,0 +1,111 @@
+package com.primefactorsolutions.model;
+
+public final class Actividad {
+ private String nombre;
+ private double lunes;
+ private double martes;
+ private double miercoles;
+ private double jueves;
+ private double viernes;
+ private double sabado;
+ private double domingo;
+
+ public Actividad(final Builder builder) {
+ this.nombre = builder.nombre;
+ this.lunes = builder.lunes;
+ this.martes = builder.martes;
+ this.miercoles = builder.miercoles;
+ this.jueves = builder.jueves;
+ this.viernes = builder.viernes;
+ this.sabado = builder.sabado;
+ this.domingo = builder.domingo;
+ }
+
+ public String getNombre() {
+ return nombre;
+ }
+
+ public double getLunes() {
+ return lunes;
+ }
+
+ public double getMartes() {
+ return martes;
+ }
+
+ public double getMiercoles() {
+ return miercoles;
+ }
+
+ public double getJueves() {
+ return jueves;
+ }
+
+ public double getViernes() {
+ return viernes;
+ }
+
+ public double getSabado() {
+ return sabado;
+ }
+
+ public double getDomingo() {
+ return domingo;
+ }
+
+ // Builder para crear instancias de Actividad
+ public static class Builder {
+ private String nombre;
+ private double lunes;
+ private double martes;
+ private double miercoles;
+ private double jueves;
+ private double viernes;
+ private double sabado;
+ private double domingo;
+
+ public Builder nombre(final String nombre) {
+ this.nombre = nombre;
+ return this;
+ }
+
+ public Builder lunes(final double horas) {
+ this.lunes = horas;
+ return this;
+ }
+
+ public Builder martes(final double horas) {
+ this.martes = horas;
+ return this;
+ }
+
+ public Builder miercoles(final double horas) {
+ this.miercoles = horas;
+ return this;
+ }
+
+ public Builder jueves(final double horas) {
+ this.jueves = horas;
+ return this;
+ }
+
+ public Builder viernes(final double horas) {
+ this.viernes = horas;
+ return this;
+ }
+
+ public Builder sabado(final double horas) {
+ this.sabado = horas;
+ return this;
+ }
+
+ public Builder domingo(final double horas) {
+ this.domingo = horas;
+ return this;
+ }
+
+ public Actividad build() {
+ return new Actividad(this);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/primefactorsolutions/model/HoursWorked.java b/src/main/java/com/primefactorsolutions/model/HoursWorked.java
new file mode 100644
index 0000000..d02310f
--- /dev/null
+++ b/src/main/java/com/primefactorsolutions/model/HoursWorked.java
@@ -0,0 +1,56 @@
+package com.primefactorsolutions.model;
+
+import jakarta.persistence.Entity;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.GenerationType;
+import jakarta.persistence.Id;
+import jakarta.persistence.ManyToOne;
+
+import java.util.UUID;
+
+@Entity
+public class HoursWorked extends BaseEntity {
+ @Id
+ @GeneratedValue(strategy = GenerationType.UUID)
+ private UUID id;
+
+ @ManyToOne
+ private Employee employee;
+
+ private int weekNumber;
+ private double totalHours;
+
+ public HoursWorked() { }
+
+ public UUID getId() {
+ return id;
+ }
+
+ public void setId(final UUID id) {
+ this.id = id;
+ }
+
+ public Employee getEmployee() {
+ return employee;
+ }
+
+ public void setEmployee(final Employee value) {
+ this.employee = value;
+ }
+
+ public int getWeekNumber() {
+ return weekNumber;
+ }
+
+ public void setWeekNumber(final int weekNumber) {
+ this.weekNumber = weekNumber;
+ }
+
+ public double getTotalHours() {
+ return totalHours;
+ }
+
+ public void setTotalHours(final double totalHours) {
+ this.totalHours = totalHours;
+ }
+}
diff --git a/src/main/java/com/primefactorsolutions/repositories/HoursWorkedRepository.java b/src/main/java/com/primefactorsolutions/repositories/HoursWorkedRepository.java
new file mode 100644
index 0000000..e5ad85b
--- /dev/null
+++ b/src/main/java/com/primefactorsolutions/repositories/HoursWorkedRepository.java
@@ -0,0 +1,10 @@
+package com.primefactorsolutions.repositories;
+
+import com.primefactorsolutions.model.HoursWorked;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface HoursWorkedRepository extends JpaRepository {
+ // Puedes definir consultas personalizadas aquí si es necesario.
+}
diff --git a/src/main/java/com/primefactorsolutions/service/HoursWorkedService.java b/src/main/java/com/primefactorsolutions/service/HoursWorkedService.java
new file mode 100644
index 0000000..2da3c4b
--- /dev/null
+++ b/src/main/java/com/primefactorsolutions/service/HoursWorkedService.java
@@ -0,0 +1,35 @@
+package com.primefactorsolutions.service;
+
+import com.primefactorsolutions.model.HoursWorked;
+import com.primefactorsolutions.repositories.HoursWorkedRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class HoursWorkedService {
+ private final HoursWorkedRepository hoursWorkedRepository;
+
+ @Autowired
+ public HoursWorkedService(final HoursWorkedRepository hoursWorkedRepository) {
+ this.hoursWorkedRepository = hoursWorkedRepository;
+ }
+
+ public List findAll() {
+ return hoursWorkedRepository.findAll();
+ }
+
+ public HoursWorked saveHoursWorked(final HoursWorked hoursWorked) {
+ return hoursWorkedRepository.save(hoursWorked);
+ }
+
+ public HoursWorked save(final HoursWorked hoursWorked) {
+ return hoursWorkedRepository.save(hoursWorked);
+ }
+
+ public void deleteHoursWorked(final Long id) {
+ hoursWorkedRepository.deleteById(id);
+ }
+}
+
diff --git a/src/main/java/com/primefactorsolutions/service/ReportService.java b/src/main/java/com/primefactorsolutions/service/ReportService.java
index 0de93fd..beaa21a 100644
--- a/src/main/java/com/primefactorsolutions/service/ReportService.java
+++ b/src/main/java/com/primefactorsolutions/service/ReportService.java
@@ -2,6 +2,7 @@ package com.primefactorsolutions.service;
import com.openhtmltopdf.pdfboxout.PdfBoxRenderer;
import com.openhtmltopdf.pdfboxout.PdfRendererBuilder;
+import com.primefactorsolutions.repositories.HoursWorkedRepository;
import freemarker.template.Configuration;
import freemarker.template.DefaultObjectWrapper;
import freemarker.template.Template;
@@ -9,15 +10,77 @@ import freemarker.template.TemplateExceptionHandler;
import lombok.SneakyThrows;
import org.apache.pdfbox.io.MemoryUsageSetting;
import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Service;
import java.io.*;
import java.nio.charset.StandardCharsets;
+import java.util.List;
+import java.util.Map;
import java.util.TimeZone;
@Service
public class ReportService {
+ private final HoursWorkedRepository hoursWorkedRepository;
+
+ public ReportService(final HoursWorkedRepository hoursWorkedRepository) {
+ this.hoursWorkedRepository = hoursWorkedRepository;
+ }
+
+ // Este método ahora solo crea el archivo Excel a partir de los datos que recibe.
+ public byte[] writeAsExcel(final String reportName, final List headers,
+ final List