Bug Fixing Pianta Fine Scavo managing multiple inputs

This commit is contained in:
Francesco Mangiacrapa 2021-01-27 10:43:57 +01:00
parent 0be83c5bdb
commit 8f648bab44
1 changed files with 14 additions and 12 deletions

View File

@ -95,7 +95,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
LOG.debug("Built " + ConcessioniFormCardTitle.INFORMAZIONI_DI_PROGETTO + " as server obj: " + concessione); LOG.debug("Built " + ConcessioniFormCardTitle.INFORMAZIONI_DI_PROGETTO + " as server obj: " + concessione);
// saving into back-end // saving into back-end
//SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true); SessionUtil.getCurrentContext(this.getThreadLocalRequest(), true);
manager = ManagerFactory.registerNew(concessione); manager = ManagerFactory.registerNew(concessione);
// ABSTRACT_RELAZIONE_DI_SCAVO // ABSTRACT_RELAZIONE_DI_SCAVO
@ -180,17 +180,19 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
"Error: no data found for " + ConcessioniFormCardTitle.PIANTA_DI_FINE_SCAVO.getTitle()); "Error: no data found for " + ConcessioniFormCardTitle.PIANTA_DI_FINE_SCAVO.getTitle());
listGDB = list.get(0).getListGDB(); listGDB = list.get(0).getListGDB();
GenericDatasetBean pfs = listGDB.get(0); //Managing N:N
LOG.debug("\n\n"); for (GenericDatasetBean pfs : listGDB) {
LOG.debug(ConcessioniFormCardTitle.PIANTA_DI_FINE_SCAVO + " building with client obj: " + pfs); LOG.debug("\n\n");
LayerConcessione layerPfs = ConvertToServiceModel.toLayerConcessione(pfs); LOG.debug(ConcessioniFormCardTitle.PIANTA_DI_FINE_SCAVO + " building with client obj: " + pfs);
LOG.debug("Built " + ConcessioniFormCardTitle.PIANTA_DI_FINE_SCAVO + " as server obj: " + layerPfs); LayerConcessione layerPfs = ConvertToServiceModel.toLayerConcessione(pfs);
for (FileUploaded fileUploaded : pfs.getFilesUploaded()) { LOG.debug("Built " + ConcessioniFormCardTitle.PIANTA_DI_FINE_SCAVO + " as server obj: " + layerPfs);
LOG.debug("Adding uploaded file: " + fileUploaded.getFileName() + " to " + layerPfs); for (FileUploaded fileUploaded : pfs.getFilesUploaded()) {
FileInputStream fis = new FileInputStream(fileUploaded.getTempSystemPath()); LOG.debug("Adding uploaded file: " + fileUploaded.getFileName() + " to " + layerPfs);
InputStreamDescriptor isd = new InputStreamDescriptor(fis, fileUploaded.getFileName()); FileInputStream fis = new FileInputStream(fileUploaded.getTempSystemPath());
// saving into back-end InputStreamDescriptor isd = new InputStreamDescriptor(fis, fileUploaded.getFileName());
manager.addPiantaFineScavo(layerPfs, isd); // saving into back-end
manager.addPiantaFineScavo(layerPfs, isd);
}
} }
} catch (Exception e) { } catch (Exception e) {
LOG.error("Error on converting form data: ", e); LOG.error("Error on converting form data: ", e);