Completati servizi di modifica e cancellazione delle assenze
This commit is contained in:
@@ -110,7 +110,7 @@ public class UserAbsenceService {
|
||||
message = message.concat(String.format("\nNote: %s", note));
|
||||
}
|
||||
|
||||
mailService.sendMail("amministrazione@integry.it", "m.morelli@integry.it", subject, message);
|
||||
// mailService.sendMail("amministrazione@integry.it", "m.morelli@integry.it", subject, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,6 +119,28 @@ public class UserAbsenceService {
|
||||
String fullname = requestDataDTO.getUser().getFullname();
|
||||
|
||||
if (assenza.getDataInizio() == null) throw new Exception("Errore nella data inizio");
|
||||
|
||||
JtbRLavt jtbRLavt = new JtbRLavt();
|
||||
|
||||
jtbRLavt.setGiustificativo(assenza.getGiustificativo())
|
||||
.setDataLav(UtilityLocalDate.localDateToDate(assenza.getDataInizio()))
|
||||
.setCodJflav(codJflav)
|
||||
.setNote(assenza.getNote())
|
||||
.setOperation(OperationType.UPDATE);
|
||||
|
||||
String giustificativo = WordUtils.capitalize(assenza.getGiustificativo().toLowerCase());
|
||||
String note = assenza.getNote();
|
||||
|
||||
UtilityEntity.throwEntitiesException(entityProcessor.processEntity(jtbRLavt, multiDBTransactionManager));
|
||||
|
||||
String subject = String.format("Modifica %s di %s", giustificativo, fullname);
|
||||
String message = String.format("%s di %s per il giorno: %s.", giustificativo, fullname, assenza.getDataInizio());
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(note)) {
|
||||
message = message.concat(String.format("\nNote: %s", note));
|
||||
}
|
||||
|
||||
// mailService.sendMail("amministrazione@integry.it", null, subject, message);
|
||||
}
|
||||
|
||||
public void deleteAbsence(UserAbsenceRequestDTO assenza, String username) throws Exception {
|
||||
@@ -126,6 +148,28 @@ public class UserAbsenceService {
|
||||
String fullname = requestDataDTO.getUser().getFullname();
|
||||
|
||||
if (assenza.getDataInizio() == null) throw new Exception("Errore nella data inizio");
|
||||
|
||||
JtbRLavt jtbRLavt = new JtbRLavt();
|
||||
|
||||
jtbRLavt.setGiustificativo(assenza.getGiustificativo())
|
||||
.setDataLav(UtilityLocalDate.localDateToDate(assenza.getDataInizio()))
|
||||
.setCodJflav(codJflav)
|
||||
.setNote(assenza.getNote())
|
||||
.setOperation(OperationType.DELETE);
|
||||
|
||||
String giustificativo = WordUtils.capitalize(assenza.getGiustificativo().toLowerCase());
|
||||
String note = assenza.getNote();
|
||||
|
||||
UtilityEntity.throwEntitiesException(entityProcessor.processEntity(jtbRLavt, multiDBTransactionManager));
|
||||
|
||||
String subject = String.format("Eliminazione %s di %s", giustificativo, fullname);
|
||||
String message = String.format("%s di %s per il giorno: %s.", giustificativo, fullname, assenza.getDataInizio());
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(note)) {
|
||||
message = message.concat(String.format("\nNote: %s", note));
|
||||
}
|
||||
|
||||
// mailService.sendMail("amministrazione@integry.it", null, subject, message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user