Skip to content

Commit

Permalink
v1.2-RELEASE
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemaignent committed Oct 23, 2020
1 parent 00fb2ac commit 57f8ddc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 48 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</parent>
<groupId>org.esupportail</groupId>
<artifactId>esup-signature</artifactId>
<version>1.2.BUILD-SNAPSHOT</version>
<version>1.2</version>
<name>esup-signature</name>
<properties>
<start-class>org.esupportail.esupsignature.EsupSignatureApplication</start-class>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,22 @@ public List<LinkedHashMap<String, String>> getDatasToExport(Form form) {
for(Data data : datas) {
SignBook signBook = data.getSignBook();
if(signBook != null && signBook.getSignRequests().size() > 0) {
List<Log> logs = logRepository.findBySignRequestId(signBook.getSignRequests().get(0).getId()).stream().sorted(Comparator.comparing(Log::getLogDate).reversed()).collect(Collectors.toList());
LinkedHashMap<String, String> toExportDatas = new LinkedHashMap<>();
toExportDatas.put("form_name", form.getName());
toExportDatas.put("form_create_date", data.getCreateDate().toString());
toExportDatas.put("form_create_by", data.getCreateBy());
toExportDatas.put("form_current_status", signBook.getStatus().name());
List<Log> lastLogs = logRepository.findBySignRequestIdAndFinalStatus(signBook.getSignRequests().get(0).getId(), SignRequestStatus.completed.name());
if(lastLogs.size() > 0) {
toExportDatas.put("form_completed_date", lastLogs.get(0).getLogDate().toString());
toExportDatas.put("form_completed_by", lastLogs.get(0).getEppnFor());
if(logs.size() > 0) {
toExportDatas.put("form_completed_date", logs.get(0).getLogDate().toString());
toExportDatas.put("form_completed_by", logs.get(0).getEppnFor());
} else {
List<Log> refuseLogs = logRepository.findBySignRequestIdAndFinalStatus(signBook.getSignRequests().get(0).getId(), SignRequestStatus.refused.name());
if(refuseLogs.size() > 0) {
toExportDatas.put("form_completed_date", refuseLogs.get(0).getLogDate().toString());
toExportDatas.put("form_completed_by", refuseLogs.get(0).getEppnFor());
} else {
toExportDatas.put("form_completed_date", "");
toExportDatas.put("form_completed_by", "");
}
toExportDatas.put("form_completed_date", "");
toExportDatas.put("form_completed_by", "");
}
for (Map.Entry<String, String> entry : data.getDatas().entrySet()) {
toExportDatas.put("form_data_" + entry.getKey(), entry.getValue());
}
List<Log> logs = logRepository.findBySignRequestId(signBook.getSignRequests().get(0).getId()).stream().sorted(Comparator.comparing(Log::getLogDate)).collect(Collectors.toList());
int step = 1;
//for(WorkflowStep workflowStep : signBook.getWorkflowSteps()) {
for (Log log : logs) {
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/static/js/modules/utils/PdfViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,4 +581,4 @@ export class PdfViewer extends EventFactory {
source: self
});
}
}
}
2 changes: 1 addition & 1 deletion src/main/resources/update_1.2-RELEASE.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
-- "fk785uuku5axshwitce6byh7433" FOREIGN KEY (fields_id) REFERENCES field(id)


alter table form_fields drop constraint uk_qyes453jb4ho6jt8bwjcdninr;
alter table form_fields drop constraint uk_qyes453jb4ho6jt8bwjcdninr;

0 comments on commit 57f8ddc

Please sign in to comment.