Skip to content

Commit

Permalink
FIX recupero allegati missione
Browse files Browse the repository at this point in the history
  • Loading branch information
mspasiano committed Sep 18, 2017
1 parent 614ca1d commit 447a069
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Expand Up @@ -2775,7 +2775,7 @@ public OggettoBulk initializeModelForEditAllegati(ActionContext actioncontext, O
allegato.setNome(storageObject.getPropertyValue(StoragePropertyNames.NAME.value()));
allegato.setDescrizione(storageObject.getPropertyValue(StoragePropertyNames.DESCRIPTION.value()));
allegato.setTitolo(storageObject.getPropertyValue(StoragePropertyNames.TITLE.value()));
completeAllegato(allegato);
allegato.setAspectName(AllegatoMissioneBulk.FLUSSO_RIMBORSO);
allegato.setCrudStatus(OggettoBulk.NORMAL);
allegatoParentBulk.addToArchivioAllegati(allegato);
}
Expand All @@ -2788,7 +2788,7 @@ public OggettoBulk initializeModelForEditAllegati(ActionContext actioncontext, O
allegato.setNome(storageObject.getPropertyValue(StoragePropertyNames.NAME.value()));
allegato.setDescrizione(storageObject.getPropertyValue(StoragePropertyNames.DESCRIPTION.value()));
allegato.setTitolo(storageObject.getPropertyValue(StoragePropertyNames.TITLE.value()));
completeAllegato(allegato);
allegato.setAspectName(AllegatoMissioneBulk.FLUSSO_ORDINE);
allegato.setCrudStatus(OggettoBulk.NORMAL);
allegatoParentBulk.addToArchivioAllegati(allegato);
}
Expand Down Expand Up @@ -2882,7 +2882,8 @@ protected void completeAllegato(AllegatoMissioneBulk allegato) throws Applicatio
.map(storageObject -> storageObject.<List<String>>getPropertyValue(StoragePropertyNames.SECONDARY_OBJECT_TYPE_IDS.value()))
.map(list -> list.stream().filter(
o -> AllegatoMissioneBulk.aspectNamesKeys.get(o) != null
).findFirst().get()).orElse(null));
).findAny().orElse(MissioniCMISService.ASPECT_ALLEGATI_MISSIONE_SIGLA)
).orElse(null));
super.completeAllegato(allegato);
}

Expand Down
Expand Up @@ -15,6 +15,9 @@ public class AllegatoMissioneBulk extends AllegatoGenericoBulk {
public static final String FLUSSO_ORDINE = "FLUSSO_ORDINE";
public static final String FLUSSO_RIMBORSO = "FLUSSO_RIMBORSO";

public static final String FLUSSO_ORDINE_LABEL = "Flusso Ordine di Missione";
public static final String FLUSSO_RIMBORSO_LABEL = "Flusso Rimborso Missione";

public static OrderedHashtable aspectNamesKeys = new OrderedHashtable();

static {
Expand All @@ -26,8 +29,8 @@ public class AllegatoMissioneBulk extends AllegatoGenericoBulk {
aspectNamesKeys.put("P:missioni_rimborso_attachment:scontrini","Giustificativo");
aspectNamesKeys.put("P:missioni_ordine_attachment:ordine","Ordine Di Missione");
aspectNamesKeys.put("P:missioni_rimborso_attachment:rimborso","Rimborso Missione");
aspectNamesKeys.put(FLUSSO_ORDINE,"Flusso Ordine di Missione");
aspectNamesKeys.put(FLUSSO_RIMBORSO,"Flusso Rimborso Missione");
aspectNamesKeys.put(FLUSSO_ORDINE,FLUSSO_ORDINE_LABEL);
aspectNamesKeys.put(FLUSSO_RIMBORSO,FLUSSO_RIMBORSO_LABEL);
aspectNamesKeys.put(MissioniCMISService.ASPECT_ALLEGATI_MISSIONE_SIGLA,"Allegati vari alla Missione SIGLA");
}
private String aspectName;
Expand Down
Expand Up @@ -66,7 +66,7 @@ private List<StorageObject> getDocuments(String folder, String tipoAllegato) {
}

public StorageObject recuperoFlows(String idFlusso) throws DetailedException{
StringBuffer query = new StringBuffer("SELECT alfcmis:nodeRef,cmis:name from wfcnr:parametriFlusso ");
StringBuffer query = new StringBuffer("SELECT alfcmis:nodeRef, cmis:name, cmis:objectId from wfcnr:parametriFlusso ");
query.append(" where wfcnr:wfInstanceId = '").append(idFlusso).append("'");
query.append(" and wfcnr:tipologiaDocSpecifica = 'Riepilogo Flusso'");
List<StorageObject> resultsFolder = search(query.toString());
Expand Down

0 comments on commit 447a069

Please sign in to comment.