diff --git a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASAffiliationsCient.java b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASAffiliationsCient.java index e43736b..3b601b0 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASAffiliationsCient.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASAffiliationsCient.java @@ -47,7 +47,7 @@ public class EPASAffiliationsCient { HttpMethod.GET, null, new ParameterizedTypeReference>() { }, groupId,includeInactive); List listEPASAffiliations = responseEntity.getBody(); - log.info("Retrieved Affiliations byGroup: {}", listEPASAffiliations); + log.info("Retrieved Affiliations by group id: {}", listEPASAffiliations); return listEPASAffiliations; } @@ -58,7 +58,7 @@ public class EPASAffiliationsCient { HttpMethod.GET, null, new ParameterizedTypeReference>() { }, personId); List listEPASAffiliations = responseEntity.getBody(); - log.info("Retrieved Affiliations by Person id: {}", listEPASAffiliations); + log.info("Retrieved Affiliations by person id: {}", listEPASAffiliations); return listEPASAffiliations; } @@ -69,7 +69,7 @@ public class EPASAffiliationsCient { HttpMethod.GET, null, new ParameterizedTypeReference>() { }, fc); List listEPASAffiliations = responseEntity.getBody(); - log.info("Retrieved Affiliations by Person fiscalcode: {}", listEPASAffiliations); + log.info("Retrieved Affiliations by person fiscalcode: {}", listEPASAffiliations); return listEPASAffiliations; } diff --git a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASCertificationsClient.java b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASCertificationsClient.java index 11d131f..2c4c102 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASCertificationsClient.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASCertificationsClient.java @@ -29,36 +29,52 @@ public class EPASCertificationsClient { @Autowired ApplicationProperties appProps; - public EPASCertifications getCertificationsByPersonId(String id, String year, String month) { - log.info("Retrieving EPASCertifications for person id: {}", id); + public EPASCertifications getByPersonId(String id, String year, String month) { + log.info("Retrieving EPASCertifications by person id: {}", id); Map uriVariables = new HashMap<>(); uriVariables.put("id", id); uriVariables.put("year", year); uriVariables.put("month", month); EPASCertifications epasCertifications = rt.getForObject( - appProps.getDatasourceEpasRest().getRestUrl() + "/v2/certifications/getMonthValidationStatusByPerson?id={id}&year={year}&month={month}", + appProps.getDatasourceEpasRest().getRestUrl() + "/v2/certifications/getMonthSituation?id={id}&year={year}&month={month}", EPASCertifications.class,uriVariables); log.info("Retrieved EPASCertifications: {}", epasCertifications); return epasCertifications; } - public EPASCertifications getCertificationsByPersonFiscalCode(String fc, String year, String month) { - log.info("Retrieving EPASCertifications for person fiscalCode: {}", fc); + public EPASCertifications getByPersonFiscalCode(String fc, String year, String month) { + log.info("Retrieving EPASCertifications by person fiscalcode: {}", fc); Map uriVariables = new HashMap<>(); uriVariables.put("fc", fc); uriVariables.put("year", year); uriVariables.put("month", month); EPASCertifications epasCertifications = rt.getForObject( - appProps.getDatasourceEpasRest().getRestUrl() + "/v2/certifications/getMonthValidationStatusByPerson?fiscalCode={fc}&year={year}&month={month}", + appProps.getDatasourceEpasRest().getRestUrl() + "/v2/certifications/getMonthSituation?fiscalCode={fc}&year={year}&month={month}", EPASCertifications.class,uriVariables); log.info("Retrieved EPASCertifications: {}", epasCertifications); return epasCertifications; } - public List getCertificationsByOfficeCodeId(String id, String year, String month) { - log.info("Retrieving EPASCertifications for office codeId: {}", id); + public EPASCertifications getByPersonEmail(String email, String year, String month) { + log.info("Retrieving EPASCertifications by person email={}, year={}, month={}", email,year,month); + Map uriVariables = new HashMap<>(); + uriVariables.put("email", email); + uriVariables.put("year", year); + uriVariables.put("month", month); + + EPASCertifications epasCertifications = rt.getForObject( + appProps.getDatasourceEpasRest().getRestUrl() + "/v2/certifications/getMonthSituation?email={email}&year={year}&month={month}", + EPASCertifications.class,uriVariables); + log.info("Retrieved EPASCertifications: {}", epasCertifications); + return epasCertifications; + } + + + + public List getByOfficeCodeId(String id, String year, String month) { + log.info("Retrieving EPASCertifications by office codeId: {}", id); Map uriVariables = new HashMap<>(); uriVariables.put("sedeId", id); diff --git a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASContractsCient.java b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASContractsCient.java index 9619211..27d6ff0 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASContractsCient.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASContractsCient.java @@ -60,6 +60,17 @@ public class EPASContractsCient { return listEPASContracts; } + public List getByPersonEmail(String email) { + ResponseEntity> responseEntity = rt.exchange( + appProps.getDatasourceEpasRest().getRestUrl() + "/v2/contracts/byPerson?email={email}", HttpMethod.GET, + null, new ParameterizedTypeReference>() { + }, email); + List listEPASContracts = responseEntity.getBody(); + log.info("Retrieved Contracts: {}", listEPASContracts); + return listEPASContracts; + } + + public EPASContracts create(EPASContractsDTO epasContractsDTO) { ResponseEntity response = rt.postForEntity( appProps.getDatasourceEpasRest().getRestUrl() + "/v2/contracts/create", epasContractsDTO, diff --git a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASLeavesCient.java b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASLeavesCient.java new file mode 100644 index 0000000..5b6757a --- /dev/null +++ b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASLeavesCient.java @@ -0,0 +1,94 @@ +package it.cnr.isti.epasmed.epas.client; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Component; +import org.springframework.web.client.RestTemplate; + +import it.cnr.isti.epasmed.config.ApplicationProperties; +import it.cnr.isti.epasmed.epas.model.EPASLeaves; + +@Component +public class EPASLeavesCient { + + private final Logger log = LoggerFactory.getLogger(getClass()); + + @Autowired + @Qualifier("RestTemplateForSecondUser") + RestTemplate rt; + + @Autowired + ApplicationProperties appProps; + + public List getByPersonId(String id, String year) { + log.info("Retrieving EPASLeaves by person id: {}", id); + Map uriVariables = new HashMap<>(); + uriVariables.put("id", id); + uriVariables.put("year", year); + + ResponseEntity> responseEntity = rt.exchange( + appProps.getDatasourceEpasRest().getRestUrl() + "/v2/leaves/byPersonAndYear?id={id}&year={year}", + HttpMethod.GET, null, new ParameterizedTypeReference>() { + }, uriVariables); + List listEPASLeaves = responseEntity.getBody(); + log.info("Retrieved Leaves: {}", listEPASLeaves); + return listEPASLeaves; + } + + public List getByFiscalcode(String fc, String year) { + log.info("Retrieving EPASLeaves by person fiscalcode: {}", fc); + Map uriVariables = new HashMap<>(); + uriVariables.put("fc", fc); + uriVariables.put("year", year); + + ResponseEntity> responseEntity = rt.exchange( + appProps.getDatasourceEpasRest().getRestUrl() + + "/v2/leaves/byPersonAndYear?fiscalCode={fc}&year={year}", + HttpMethod.GET, null, new ParameterizedTypeReference>() { + }, uriVariables); + List listEPASLeaves = responseEntity.getBody(); + log.info("Retrieved Leaves: {}", listEPASLeaves); + return listEPASLeaves; + + } + + public List getByPersonEmail(String email, String year) { + log.info("Retrieving EPASLeaves by person email: {}", email); + Map uriVariables = new HashMap<>(); + uriVariables.put("email", email); + uriVariables.put("year", year); + + ResponseEntity> responseEntity = rt.exchange( + appProps.getDatasourceEpasRest().getRestUrl() + "/v2/leaves/byPersonAndYear?email={email}&year={year}", + HttpMethod.GET, null, new ParameterizedTypeReference>() { + }, uriVariables); + List listEPASLeaves = responseEntity.getBody(); + log.info("Retrieved Leaves: {}", listEPASLeaves); + return listEPASLeaves; + } + + public List getByOfficeCodeId(String officeCodeId, String year) { + log.info("Retrieving EPASLeaves by office codeId: {}", officeCodeId); + Map uriVariables = new HashMap<>(); + uriVariables.put("id", officeCodeId); + uriVariables.put("year", year); + + ResponseEntity> responseEntity = rt.exchange( + appProps.getDatasourceEpasRest().getRestUrl() + "/v2/leaves/byOfficeAndYear?sedeId={id}&year={year}", + HttpMethod.GET, null, new ParameterizedTypeReference>() { + }, uriVariables); + List listEPASLeaves = responseEntity.getBody(); + log.info("Retrieved Leaves: {}", listEPASLeaves); + return listEPASLeaves; + } + +} diff --git a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASPersonsCient.java b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASPersonsCient.java index e8279be..92ae3e3 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASPersonsCient.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASPersonsCient.java @@ -95,7 +95,7 @@ public class EPASPersonsCient { public void deleteByFiscalCode(String fc) { rt.delete(appProps.getDatasourceEpasRest().getRestUrl() + "/v2/persons/delete?fiscalCode={fc}", fc); - log.info("Delete Persons with fiscalcode: {}", fc); + log.info("Delete Persons by fiscalcode: {}", fc); return; } diff --git a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASTimeCardsClient.java b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASTimeCardsClient.java index d807716..229f48f 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASTimeCardsClient.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASTimeCardsClient.java @@ -15,7 +15,6 @@ import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; import it.cnr.isti.epasmed.config.ApplicationProperties; -import it.cnr.isti.epasmed.epas.model.EPASPersons; import it.cnr.isti.epasmed.epas.model.EPASTimeCards; @Component @@ -30,7 +29,8 @@ public class EPASTimeCardsClient { @Autowired ApplicationProperties appProps; - public EPASTimeCards getTimeCardByPersonId(String id, String year, String month) { + public EPASTimeCards getByPersonId(String id, String year, String month) { + log.info("Retrieving EPASTimeCard by person id: {}", id); Map uriVariables = new HashMap<>(); uriVariables.put("id", id); uriVariables.put("year", year); @@ -44,7 +44,7 @@ public class EPASTimeCardsClient { } - public List getTimeCardByOfficeCodeId(String id, String year, String month) { + public List getByOfficeCodeId(String id, String year, String month) { Map uriVariables = new HashMap<>(); uriVariables.put("sedeId", id); uriVariables.put("year", year); diff --git a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASValidatesClient.java b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASValidatesClient.java index 6121b32..d86c1b7 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/client/EPASValidatesClient.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/client/EPASValidatesClient.java @@ -25,7 +25,7 @@ public class EPASValidatesClient { @Autowired ApplicationProperties appProps; - public String isValidatesByPersonEmail(String email, String year, String month) { + public String isByPersonEmail(String email, String year, String month) { log.info("Retrieving EPASValidates status for person email: {}", email); Map uriVariables = new HashMap<>(); uriVariables.put("email", email); @@ -40,7 +40,7 @@ public class EPASValidatesClient { } - public EPASValidates getValidatesByOfficeCodeId(String id, String year, String month) { + public EPASValidates getByOfficeCodeId(String id, String year, String month) { log.info("Retrieving EPASValidates for office codeId: {}", id); Map uriVariables = new HashMap<>(); diff --git a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASAbsences.java b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASAbsences.java index 33988f8..fa359b9 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASAbsences.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASAbsences.java @@ -14,11 +14,11 @@ public class EPASAbsences implements Serializable { private static final long serialVersionUID = 1L; - String code; - String date; - String id; - String justifiedTime; - String justifiedType; - String note; + private String code; + private String date; + private String id; + private String justifiedTime; + private String justifiedType; + private String note; } \ No newline at end of file diff --git a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASCertifications.java b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASCertifications.java index c6e426e..81d7ebe 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASCertifications.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASCertifications.java @@ -23,4 +23,4 @@ public class EPASCertifications implements Serializable { private String[] trainingHours; private String year; -} \ No newline at end of file +} diff --git a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASLeaves.java b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASLeaves.java new file mode 100644 index 0000000..6c64694 --- /dev/null +++ b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASLeaves.java @@ -0,0 +1,21 @@ +package it.cnr.isti.epasmed.epas.model; + +import java.io.Serializable; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class EPASLeaves implements Serializable { + + private static final long serialVersionUID = 1L; + + private EPASPersons person; + private String code; + private String start; + private String end; +} \ No newline at end of file diff --git a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASPersonDays.java b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASPersonDays.java index c09c4fc..1ab9ab1 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASPersonDays.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASPersonDays.java @@ -14,14 +14,14 @@ public class EPASPersonDays implements Serializable { private static final long serialVersionUID = 1L; - EPASAbsences[] absences; - String date; - Integer difference; - String id; - Boolean isHoliday; - Boolean isTicketAvailable; - Integer progressive; - String[] stampings; - Integer timeAtWork; + private EPASAbsences[] absences; + private String date; + private Integer difference; + private String id; + private Boolean isHoliday; + private Boolean isTicketAvailable; + private Integer progressive; + private EPASStampings[] stampings; + private Integer timeAtWork; } \ No newline at end of file diff --git a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASStampings.java b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASStampings.java new file mode 100644 index 0000000..cd3a610 --- /dev/null +++ b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASStampings.java @@ -0,0 +1,25 @@ +package it.cnr.isti.epasmed.epas.model; + +import java.io.Serializable; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class EPASStampings implements Serializable { + + private static final long serialVersionUID = 1L; + private String id; + private String date; + private String way; + private String stampType; + private String place; + private String reason; + private String markedByAdmin; + private String markedByEmployee; + private String note; + +} \ No newline at end of file diff --git a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASTickets.java b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASTickets.java index f6c3c39..165f838 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASTickets.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASTickets.java @@ -13,7 +13,10 @@ public class EPASTickets implements Serializable { private static final long serialVersionUID = 1L; - private String code; + private String electronicTickets; + private String paperyTickets; private String quantity; } + + diff --git a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASTimeCards.java b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASTimeCards.java index dab001b..8ddb882 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASTimeCards.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASTimeCards.java @@ -14,10 +14,10 @@ public class EPASTimeCards implements Serializable { private static final long serialVersionUID = 1L; - String baseWorkingDays; - String month; - String year; - EPASPersons person; - EPASPersonDays[] personDays; + private String baseWorkingDays; + private String month; + private String year; + private EPASPersons person; + private EPASPersonDays[] personDays; } \ No newline at end of file diff --git a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASValidates.java b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASValidates.java index a068d6d..038ca96 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/model/EPASValidates.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/model/EPASValidates.java @@ -14,8 +14,8 @@ public class EPASValidates implements Serializable { private static final long serialVersionUID = 1L; - Boolean allCertificationsValidated; - EPASPersons[] notValidatedPersons; - EPASPersons[] validatedPersons; + private Boolean allCertificationsValidated; + private EPASPersons[] notValidatedPersons; + private EPASPersons[] validatedPersons; } \ No newline at end of file diff --git a/src/main/java/it/cnr/isti/epasmed/epas/service/EPASCertificationsService.java b/src/main/java/it/cnr/isti/epasmed/epas/service/EPASCertificationsService.java index 2ff4b2c..64d6303 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/service/EPASCertificationsService.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/service/EPASCertificationsService.java @@ -15,15 +15,19 @@ public class EPASCertificationsService { EPASCertificationsClient epasCertificationsClient; public EPASCertifications getCertificationsByPersonId(String id, String year, String month) { - return epasCertificationsClient.getCertificationsByPersonId(id, year, month); + return epasCertificationsClient.getByPersonId(id, year, month); } public EPASCertifications getCertificationsByPersonFiscalCode(String fc, String year, String month) { - return epasCertificationsClient.getCertificationsByPersonFiscalCode(fc, year, month); + return epasCertificationsClient.getByPersonFiscalCode(fc, year, month); + } + + public EPASCertifications getCertificationsByPersonEmail(String email, String year, String month) { + return epasCertificationsClient.getByPersonEmail(email, year, month); } public List getCertificationsByOfficeCodeId(String id, String year, String month) { - return epasCertificationsClient.getCertificationsByOfficeCodeId(id, year, month); + return epasCertificationsClient.getByOfficeCodeId(id, year, month); } diff --git a/src/main/java/it/cnr/isti/epasmed/epas/service/EPASContractsService.java b/src/main/java/it/cnr/isti/epasmed/epas/service/EPASContractsService.java index a980b03..1820855 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/service/EPASContractsService.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/service/EPASContractsService.java @@ -28,6 +28,10 @@ public class EPASContractsService { public List getByPersonFiscalcode(String fc) { return epasContractsClient.getByPersonFiscalcode(fc); } + + public List getByPersonEmail(String email) { + return epasContractsClient.getByPersonEmail(email); + } public EPASContracts create(EPASContractsDTO epasContractsDTO) { return epasContractsClient.create(epasContractsDTO); diff --git a/src/main/java/it/cnr/isti/epasmed/epas/service/EPASLeavesService.java b/src/main/java/it/cnr/isti/epasmed/epas/service/EPASLeavesService.java new file mode 100644 index 0000000..730c637 --- /dev/null +++ b/src/main/java/it/cnr/isti/epasmed/epas/service/EPASLeavesService.java @@ -0,0 +1,33 @@ +package it.cnr.isti.epasmed.epas.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import it.cnr.isti.epasmed.epas.client.EPASLeavesCient; +import it.cnr.isti.epasmed.epas.model.EPASLeaves; + +@Service +public class EPASLeavesService { + + @Autowired + EPASLeavesCient epasLeavesClient; + + public List getLeavesByPersonId(String id, String year) { + return epasLeavesClient.getByPersonId(id, year); + } + + public List getLeavesByPersonFiscalcode(String fc, String year) { + return epasLeavesClient.getByFiscalcode(fc, year); + } + + public List getLeavesByPersonEmail(String email, String year) { + return epasLeavesClient.getByPersonEmail(email, year); + } + + public List getLeavesByOfficeCodeId(String officeCodeId, String year) { + return epasLeavesClient.getByOfficeCodeId(officeCodeId, year); + } + +} diff --git a/src/main/java/it/cnr/isti/epasmed/epas/service/EPASTimeCardsService.java b/src/main/java/it/cnr/isti/epasmed/epas/service/EPASTimeCardsService.java index 91ccb2e..94f46b7 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/service/EPASTimeCardsService.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/service/EPASTimeCardsService.java @@ -15,11 +15,11 @@ public class EPASTimeCardsService { EPASTimeCardsClient epasTimeCardsClient; public EPASTimeCards getTimeCardByPersonId(String id, String year, String month) { - return epasTimeCardsClient.getTimeCardByPersonId(id, year, month); + return epasTimeCardsClient.getByPersonId(id, year, month); } public List getTimeCardByOfficeCodeId(String id, String year, String month) { - return epasTimeCardsClient.getTimeCardByOfficeCodeId(id, year, month); + return epasTimeCardsClient.getByOfficeCodeId(id, year, month); } } diff --git a/src/main/java/it/cnr/isti/epasmed/epas/service/EPASValidatesService.java b/src/main/java/it/cnr/isti/epasmed/epas/service/EPASValidatesService.java index 7632bc7..a17e6b3 100644 --- a/src/main/java/it/cnr/isti/epasmed/epas/service/EPASValidatesService.java +++ b/src/main/java/it/cnr/isti/epasmed/epas/service/EPASValidatesService.java @@ -13,11 +13,11 @@ public class EPASValidatesService { EPASValidatesClient epasValidatesClient; public String isValidatesByPersonEmail(String email, String year, String month) { - return epasValidatesClient.isValidatesByPersonEmail(email, year, month); + return epasValidatesClient.isByPersonEmail(email, year, month); } public EPASValidates getValidatesByOfficeCodeId(String id, String year, String month) { - return epasValidatesClient.getValidatesByOfficeCodeId(id, year, month); + return epasValidatesClient.getByOfficeCodeId(id, year, month); } diff --git a/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java b/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java index 6697411..c4cc94c 100644 --- a/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java +++ b/src/main/java/it/cnr/isti/epasmed/sync/SyncService.java @@ -28,6 +28,7 @@ public class SyncService { private static final String ISTI_OFFICE_ID = "1"; private static final String SI_FLAG_DEL_TRUE = "1"; private static final String SI_RECAPITO_TELEFONICO_UFFICIO = "Ufficio"; + @SuppressWarnings("unused") private static final String SI_TIPO_EMAIL_ISTITUZIONALE = "Istituzionale"; private static final String SI_TIPO_EMAIL_CNR = "C.N.R."; @@ -59,8 +60,8 @@ public class SyncService { private boolean btelefoni; private boolean bgruppi; private boolean bgruppo_pers; - private boolean bposizioni; - private boolean bproroghe; + //private boolean bposizioni; + //private boolean bproroghe; private boolean borario; private boolean bcartellini; private boolean bcartellini_rendicontazioni; @@ -74,8 +75,8 @@ public class SyncService { btelefoni = false; bgruppi = false; bgruppo_pers = false; - bposizioni = false; - bproroghe = false; + //bposizioni = false; + //bproroghe = false; List tabsSI = tabsSIService.getAllTabsSI(); siMasterLogService.startFluxReads(); @@ -211,14 +212,15 @@ public class SyncService { EPASPersonsDTO epasPersonsDTO = epasPersonsMapper .epasPersonsToEPASPersonsDTO(epasPerson); switch (emailTipo) { - case SI_TIPO_EMAIL_ISTITUZIONALE: - epasPersonsDTO.setEmail(se.getEmail()); - epasPersonsService.updateByFiscalCode(epasPersonsDTO.getFiscalCode(), - epasPersonsDTO); - log.info("EPAS Updated Person: {}", epasPersonsDTO); - - break; + //case SI_TIPO_EMAIL_ISTITUZIONALE: + // epasPersonsDTO.setEmail(se.getEmail()); + // epasPersonsService.updateByFiscalCode(epasPersonsDTO.getFiscalCode(), + // epasPersonsDTO); + // log.info("EPAS Updated Person: {}", epasPersonsDTO); + // + // break; case SI_TIPO_EMAIL_CNR: + epasPersonsDTO.setEmail(se.getEmail()); epasPersonsDTO.setEppn(se.getEmail()); epasPersonsService.updateByFiscalCode(epasPersonsDTO.getFiscalCode(), epasPersonsDTO); diff --git a/src/main/java/it/cnr/isti/epasmed/web/rest/epas/EPASCertificationsResource.java b/src/main/java/it/cnr/isti/epasmed/web/rest/epas/EPASCertificationsResource.java new file mode 100644 index 0000000..835b3a6 --- /dev/null +++ b/src/main/java/it/cnr/isti/epasmed/web/rest/epas/EPASCertificationsResource.java @@ -0,0 +1,98 @@ +package it.cnr.isti.epasmed.web.rest.epas; + +import java.util.List; +import java.util.Optional; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import io.github.jhipster.web.util.HeaderUtil; +import io.github.jhipster.web.util.ResponseUtil; +import it.cnr.isti.epasmed.epas.model.EPASCertifications; +import it.cnr.isti.epasmed.epas.service.EPASCertificationsService; + +@RestController +@RequestMapping("/api/epas") +public class EPASCertificationsResource { + + private final Logger log = LoggerFactory.getLogger(getClass()); + + @Value("${jhipster.clientApp.name}") + private String applicationName; + + private final EPASCertificationsService epasCertificationsService; + + public EPASCertificationsResource(EPASCertificationsService epasCertificationsService) { + this.epasCertificationsService = epasCertificationsService; + + } + + /** + * {@code GET /certifications/getMonthSituation} : get certifications by person, year and month + * + * @param id the id of the person. + * @param fiscalCode the fiscal code of the person. + * @param email the email of the person. + * @param year the year. + * @param month the month. + * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body + * the EPAS Leaves, or with status {@code 404 (Not Found)}. + */ + @GetMapping("/certifications/getMonthSituation") + public ResponseEntity getEPASCertificationByPerson(@RequestParam("id") Optional id, + @RequestParam("fiscalCode") Optional fiscalCode, + @RequestParam("email") Optional email, + @RequestParam("year") String year,@RequestParam("month") String month) { + + + EPASCertifications epasCertifications = null; + if (id.isPresent()) { + log.info("REST request to get ePAS Certification by Person: {}", id.get()); + epasCertifications = epasCertificationsService.getCertificationsByPersonId(id.get(), year, month); + } else { + if (fiscalCode.isPresent()) { + log.info("REST request to get ePAS Certification by Person fiscal code: {}", fiscalCode.get()); + epasCertifications = epasCertificationsService.getCertificationsByPersonFiscalCode(fiscalCode.get(), year, month); + } else { + if (email.isPresent()) { + log.info("REST request to get ePAS Certification by Person email: {}", email.get()); + epasCertifications = epasCertificationsService.getCertificationsByPersonEmail(email.get(), year, month); + } else { + return ResponseUtil.wrapOrNotFound(Optional.of(epasCertifications), HeaderUtil.createFailureAlert(applicationName,false, + "","","Invalid parameter in call")); + + } + } + } + log.info("Retrieved Certification: {}", epasCertifications); + return ResponseUtil.wrapOrNotFound(Optional.of(epasCertifications)); + } + + + /** + * {@code GET /certifications/getMonthSituationByOffice} : get certifications by office, year and month. + * + * @param officeCodeId the office codeId. + * @param year the year. + * @param month the month. + * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body + * the list of EPAS Leaves, or with status {@code 404 (Not Found)}. + */ + @GetMapping("/certifications/getMonthSituationByOffice") + public ResponseEntity> getEPASCertificationByOfficeCodeId(@RequestParam("officeCodeId") String officeCodeId, + @RequestParam("year") String year, @RequestParam("month") String month) { + log.info("REST request to get ePAS Certification by office: codeId={}, year={}, month={}", officeCodeId, year, month); + List epasCertificationsList = epasCertificationsService.getCertificationsByOfficeCodeId(officeCodeId, year, month); + log.info("Retrieved Certification: {}", epasCertificationsList); + return ResponseUtil.wrapOrNotFound(Optional.of(epasCertificationsList)); + + } + + +} diff --git a/src/main/java/it/cnr/isti/epasmed/web/rest/epas/EPASContractsResource.java b/src/main/java/it/cnr/isti/epasmed/web/rest/epas/EPASContractsResource.java index a1b8f1c..9d91ad4 100644 --- a/src/main/java/it/cnr/isti/epasmed/web/rest/epas/EPASContractsResource.java +++ b/src/main/java/it/cnr/isti/epasmed/web/rest/epas/EPASContractsResource.java @@ -63,16 +63,18 @@ public class EPASContractsResource { } /** - * {@code GET /contracts/byPerson} : get contracts by Person id + * {@code GET /contracts/byPerson} : get contracts by Person * * @param id the id of the person. * @param fiscalCode the fiscal code of the person. + * @param email the email of the person. * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body * the EPAS Contracts, or with status {@code 404 (Not Found)}. */ @GetMapping("/contracts/byPerson") public ResponseEntity> getEPASContractsByPerson(@RequestParam("id") Optional id, - @RequestParam("fiscalCode") Optional fiscalCode) { + @RequestParam("fiscalCode") Optional fiscalCode, + @RequestParam("email") Optional email) { List epasContractsList = null; if (id.isPresent()) { log.info("REST request to get ePAS Contracts by Person: {}", id.get()); @@ -81,6 +83,11 @@ public class EPASContractsResource { if (fiscalCode.isPresent()) { log.info("REST request to get ePAS Contracts by Person fiscal code: {}", fiscalCode.get()); epasContractsList = epasContractsService.getByPersonFiscalcode(fiscalCode.get()); + } else { + if (email.isPresent()) { + log.info("REST request to get ePAS Contracts by Person email: {}", email.get()); + epasContractsList = epasContractsService.getByPersonEmail(email.get()); + } } } log.info("Retrieved List of Contracts: {}", epasContractsList); diff --git a/src/main/java/it/cnr/isti/epasmed/web/rest/epas/EPASLeavesResource.java b/src/main/java/it/cnr/isti/epasmed/web/rest/epas/EPASLeavesResource.java new file mode 100644 index 0000000..0604632 --- /dev/null +++ b/src/main/java/it/cnr/isti/epasmed/web/rest/epas/EPASLeavesResource.java @@ -0,0 +1,87 @@ +package it.cnr.isti.epasmed.web.rest.epas; + +import java.util.List; +import java.util.Optional; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import io.github.jhipster.web.util.ResponseUtil; +import it.cnr.isti.epasmed.epas.model.EPASLeaves; +import it.cnr.isti.epasmed.epas.service.EPASLeavesService; + +@RestController +@RequestMapping("/api/epas") +public class EPASLeavesResource { + + private final Logger log = LoggerFactory.getLogger(getClass()); + + @Value("${jhipster.clientApp.name}") + private String applicationName; + + private final EPASLeavesService epasLeavesService; + + public EPASLeavesResource(EPASLeavesService epasLeavesService) { + this.epasLeavesService = epasLeavesService; + + } + + /** + * {@code GET /leaves/byPersonAndYear} : get contracts by person and year + * + * @param id the id of the person. + * @param fiscalCode the fiscal code of the person. + * @param email the email of the person. + * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body + * the EPAS Leaves, or with status {@code 404 (Not Found)}. + */ + @GetMapping("/leaves/byPersonAndYear") + public ResponseEntity> getEPASContractsByPerson(@RequestParam("id") Optional id, + @RequestParam("fiscalCode") Optional fiscalCode, + @RequestParam("email") Optional email, + @RequestParam("year") String year) { + List epasLeavesList = null; + if (id.isPresent()) { + log.info("REST request to get ePAS Leaves by Person: {}", id.get()); + epasLeavesList = epasLeavesService.getLeavesByPersonId(id.get(),year); + } else { + if (fiscalCode.isPresent()) { + log.info("REST request to get ePAS Leaves by Person fiscal code: {}", fiscalCode.get()); + epasLeavesList = epasLeavesService.getLeavesByPersonFiscalcode(fiscalCode.get(), year); + } else { + if (email.isPresent()) { + log.info("REST request to get ePAS Leaves by Person email: {}", email.get()); + epasLeavesList = epasLeavesService.getLeavesByPersonEmail(email.get(), year); + } + } + } + log.info("Retrieved List of Leaves: {}", epasLeavesList); + return ResponseUtil.wrapOrNotFound(Optional.of(epasLeavesList)); + } + + + /** + * {@code GET /leaves/byOfficeAndYear} : get leaves by office and year. + * + * @param officeCodeId the office codeId. + * @param year the year. + * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body + * the list of EPAS Leaves, or with status {@code 404 (Not Found)}. + */ + @GetMapping("/leaves/byOfficeAndYear") + public ResponseEntity> getEPASLeavesByOfficeCodeId(@RequestParam("officeCodeId") String officeCodeId, + @RequestParam("year") String year) { + log.info("REST request to get ePAS Leaves by office: codeId={}, year={}", officeCodeId, year); + List epasLeavesList = epasLeavesService.getLeavesByOfficeCodeId(officeCodeId, year); + return ResponseUtil.wrapOrNotFound(Optional.of(epasLeavesList)); + + } + + +} diff --git a/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASAffiliationsResourceIT.java b/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASAffiliationsResourceIT.java index eb053ec..531df36 100644 --- a/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASAffiliationsResourceIT.java +++ b/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASAffiliationsResourceIT.java @@ -53,9 +53,9 @@ public class EPASAffiliationsResourceIT { private final Logger log = LoggerFactory.getLogger(getClass()); private static final String OFFICE_DEFAULT_ID = "1"; - private static final String OFFICE_DEFAULT_NAME = "ISTI - Pisa"; - private static final String OFFICE_DEFAULT_CODE = "074000"; - private static final String OFFICE_DEFAULT_CODEID = "225200"; + //private static final String OFFICE_DEFAULT_NAME = "ISTI - Pisa"; + //private static final String OFFICE_DEFAULT_CODE = "074000"; + //private static final String OFFICE_DEFAULT_CODEID = "225200"; private static final String AFFILIATION_DEFAULT_ID = "1"; private static final String AFFILIATION_DEFAULT_BEGINDATE = "2021-01-01"; @@ -65,7 +65,7 @@ public class EPASAffiliationsResourceIT { private static final String AFFILIATION_DEFAULT_PERSONID = "1"; private static final String AFFILIATION_DEFAULT_EXTERNALID = "1"; - private ArrayList epasAffiliationsDTOList; + //private ArrayList epasAffiliationsDTOList; @Autowired private MockMvc restEPASAffiliationsMockMvc; @@ -76,7 +76,7 @@ public class EPASAffiliationsResourceIT { @Autowired private Environment environment; - private EPASAffiliations epasAffiliations; + //private EPASAffiliations epasAffiliations; private EPASAffiliationsDTO epasAffiliationsDTO; diff --git a/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASCertificationsResourceIT.java b/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASCertificationsResourceIT.java new file mode 100644 index 0000000..f54815d --- /dev/null +++ b/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASCertificationsResourceIT.java @@ -0,0 +1,88 @@ +package it.cnr.isti.epasmed.web.rest.epas; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.core.env.Environment; +import org.springframework.security.test.context.support.WithMockUser; +import org.springframework.test.context.junit.jupiter.EnabledIf; +import org.springframework.test.web.servlet.MockMvc; + +import it.cnr.isti.epasmed.EpasmedApp; +import it.cnr.isti.epasmed.security.AuthoritiesConstants; + +/** + * Integration tests for the {@link EPASCertificationsResource} REST controller. + */ +@AutoConfigureMockMvc +@WithMockUser(authorities = AuthoritiesConstants.ADMIN) +@SpringBootTest(classes = EpasmedApp.class) +@EnabledIf("false") +public class EPASCertificationsResourceIT { + + private final Logger log = LoggerFactory.getLogger(getClass()); + + // private static final String OFFICE_DEFAULT_ID = "1"; + // private static final String OFFICE_DEFAULT_NAME = "ISTI - Pisa"; + // private static final String OFFICE_DEFAULT_CODE = "074000"; + private static final String OFFICE_DEFAULT_CODEID = "225200"; + + private static final String PERSON_DEFAULT_ID = "113"; + //private static final String PERSON_DEFAULT_NAME = "Giuseppe"; + //private static final String PERSON_DEFAULT_SURNAME = "Amato"; + private static final String PERSON_DEFAULT_FISCAL_CODE = "MTAGPP68D15D976W"; + private static final String PERSON_DEFAULT_EMAIL = "giuseppe.amato@cnr.it"; + //private static final String PERSON_DEFAULT_QUALIFICATION = "2"; + + + @Autowired + private MockMvc restEPASCertificationsMockMvc; + + @Autowired + private Environment environment; + + //private EPASLeaves epasLeaves; + + @BeforeEach + public void initTest() { + for (String profileName : environment.getActiveProfiles()) { + log.info("Currently active profile - " + profileName); + } + } + + @Test + public void getEPASCertificationsByPersonId() throws Exception { + restEPASCertificationsMockMvc.perform(get("/api/epas/certifications/getMonthSituation?id=" + PERSON_DEFAULT_ID + "&year=2021&month=10")) + .andExpect(status().isOk()); + } + + @Test + public void getEPASCertificationsByPersonFiscalcode() throws Exception { + restEPASCertificationsMockMvc + .perform( + get("/api/epas/certifications/getMonthSituation?fiscalCode=" + PERSON_DEFAULT_FISCAL_CODE + "&year=2021&month=10")) + .andExpect(status().isOk()); + } + + @Test + public void getEPASCertificationsByPersonEmail() throws Exception { + restEPASCertificationsMockMvc + .perform(get("/api/epas/certifications/getMonthSituation?email=" + PERSON_DEFAULT_EMAIL + "&year=2021&month=10")) + .andExpect(status().isOk()); + } + + @Test + public void getEPASCertificationsByOfficeCodeId() throws Exception { + restEPASCertificationsMockMvc + .perform(get("/api/epas/certifications/getMonthSituationByOffice?officeCodeId=" + OFFICE_DEFAULT_CODEID + "&year=2021&month=10")) + .andExpect(status().isOk()); + } + +} diff --git a/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASContractsResourceIT.java b/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASContractsResourceIT.java index d4f2f61..7f4dc72 100644 --- a/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASContractsResourceIT.java +++ b/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASContractsResourceIT.java @@ -61,7 +61,7 @@ public class EPASContractsResourceIT { private static final String PERSON_DEFAULT_EMAIL = "giancarlo.panichi@cnr.it"; private static final String PERSON_DEFAULT_QUALIFICATION = "6"; - private static final String CONTRACT_DEFAULT_ID = "1"; + private static final String CONTRACT_DEFAULT_ID = "175"; private static final String CONTRACT_DEFAULT_BEGINDATE = "2018-12-27"; private static final String CONTRACT_DEFAUL_ENDDATE = null; private static final String CONTRACT_DEFAULT_ENDCONTRACT = null; @@ -127,7 +127,7 @@ public class EPASContractsResourceIT { } @Test - public void getContract() throws Exception { + public void getContractById() throws Exception { restEPASContractsMockMvc.perform(get("/api/epas/contracts/" + CONTRACT_DEFAULT_ID)).andExpect(status().isOk()); } @@ -142,6 +142,12 @@ public class EPASContractsResourceIT { restEPASContractsMockMvc.perform(get("/api/epas/contracts/byPerson?fiscalCode=" + PERSON_DEFAULT_FISCAL_CODE)) .andExpect(status().isOk()); } + + @Test + public void getContractByPersonEmail() throws Exception { + restEPASContractsMockMvc.perform(get("/api/epas/contracts/byPerson?email=" + PERSON_DEFAULT_EMAIL)) + .andExpect(status().isOk()); + } @Test public void createContract() throws Exception { diff --git a/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASLeavesResourceIT.java b/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASLeavesResourceIT.java new file mode 100644 index 0000000..ac44278 --- /dev/null +++ b/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASLeavesResourceIT.java @@ -0,0 +1,88 @@ +package it.cnr.isti.epasmed.web.rest.epas; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.core.env.Environment; +import org.springframework.security.test.context.support.WithMockUser; +import org.springframework.test.context.junit.jupiter.EnabledIf; +import org.springframework.test.web.servlet.MockMvc; + +import it.cnr.isti.epasmed.EpasmedApp; +import it.cnr.isti.epasmed.security.AuthoritiesConstants; + +/** + * Integration tests for the {@link EPASLeavesResource} REST controller. + */ +@AutoConfigureMockMvc +@WithMockUser(authorities = AuthoritiesConstants.ADMIN) +@SpringBootTest(classes = EpasmedApp.class) +@EnabledIf("false") +public class EPASLeavesResourceIT { + + private final Logger log = LoggerFactory.getLogger(getClass()); + + // private static final String OFFICE_DEFAULT_ID = "1"; + // private static final String OFFICE_DEFAULT_NAME = "ISTI - Pisa"; + // private static final String OFFICE_DEFAULT_CODE = "074000"; + private static final String OFFICE_DEFAULT_CODEID = "225200"; + + private static final String PERSON_DEFAULT_ID = "113"; + //private static final String PERSON_DEFAULT_NAME = "Giuseppe"; + //private static final String PERSON_DEFAULT_SURNAME = "Amato"; + private static final String PERSON_DEFAULT_FISCAL_CODE = "MTAGPP68D15D976W"; + private static final String PERSON_DEFAULT_EMAIL = "giuseppe.amato@cnr.it"; + //private static final String PERSON_DEFAULT_QUALIFICATION = "2"; + + + @Autowired + private MockMvc restEPASLeavesMockMvc; + + @Autowired + private Environment environment; + + //private EPASLeaves epasLeaves; + + @BeforeEach + public void initTest() { + for (String profileName : environment.getActiveProfiles()) { + log.info("Currently active profile - " + profileName); + } + } + + @Test + public void getEPASLeavesByPersonId() throws Exception { + restEPASLeavesMockMvc.perform(get("/api/epas/leaves/byPersonAndYear?id=" + PERSON_DEFAULT_ID + "&year=2021")) + .andExpect(status().isOk()); + } + + @Test + public void getEPASLeaveByPersonFiscalcode() throws Exception { + restEPASLeavesMockMvc + .perform( + get("/api/epas/leaves/byPersonAndYear?fiscalCode=" + PERSON_DEFAULT_FISCAL_CODE + "&year=2021")) + .andExpect(status().isOk()); + } + + @Test + public void getEPASLeavesByPersonEmail() throws Exception { + restEPASLeavesMockMvc + .perform(get("/api/epas/leaves/byPersonAndYear?email=" + PERSON_DEFAULT_EMAIL + "&year=2021")) + .andExpect(status().isOk()); + } + + @Test + public void getEPASLeavesByOfficeCodeId() throws Exception { + restEPASLeavesMockMvc + .perform(get("/api/epas/leaves/byOfficeAndYear?officeCodeId=" + OFFICE_DEFAULT_CODEID + "&year=2021")) + .andExpect(status().isOk()); + } + +} diff --git a/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASPersonsResourceIT.java b/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASPersonsResourceIT.java index bf47965..3aa7026 100644 --- a/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASPersonsResourceIT.java +++ b/src/test/java/it/cnr/isti/epasmed/web/rest/epas/EPASPersonsResourceIT.java @@ -121,7 +121,7 @@ public class EPASPersonsResourceIT { @Test public void getPersonByFiscalCode() throws Exception { - restEPASPersonsMockMvc.perform(get("/api/epas/persons/show?fiscalCode=PRIGRL74E31G491R")).andExpect(status().isOk()); + restEPASPersonsMockMvc.perform(get("/api/epas/persons/show?fiscalCode=MTAGPP68D15D976W")).andExpect(status().isOk()); } @Test