Commit 53ba5bb7 authored by Hando Lukats's avatar Hando Lukats
Browse files

TEIS-2380 updated pdf current time

parent 44a63a21
......@@ -82,12 +82,11 @@ public class RiskAssessmentPDFService {
.filter(AssessedBusinessTypePublicDto::isPrimary)
.findFirst();
String secondaryBusinessTypeNames = getSecondaryBusinessTypeNames(riskAssessment);
Calendar calendar = Calendar.getInstance();
SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy HH:mm");
String time = getTime();
RiskAssessmentPdfDto dto = new RiskAssessmentPdfDto();
dto.setTitle(riskAssessment.getTitle());
dto.setArchivedDate(riskAssessment.getArchivedDate());
dto.setCurrentDate(formatter.format(calendar.getTime()));
dto.setCurrentDate(time);
dto.setStatus(riskAssessment.getStatus().getName());
dto.setEmployerName(employer.getLegalPerson().getName());
dto.setRegCode(employer.getLegalPerson().getRegCode());
......@@ -97,6 +96,14 @@ public class RiskAssessmentPDFService {
return dto;
}
private String getTime() {
Calendar calendar = Calendar.getInstance();
SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy HH:mm");
TimeZone timeZone = TimeZone.getTimeZone("Europe/Tallinn");
calendar.setTimeZone(timeZone);
return formatter.format(calendar.getTime());
}
private List<RiskFactorPdfCategoryDto> composeRiskFactorCategories(UUID riskAssessmentId,
RequestMetaDTO requestMetaDTO, List<RiskFactorAssessmentEntity> riskFactorAssessments) {
List<RiskFactorPdfCategoryDto> categoryList = new ArrayList<>();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment