Finish Hotfix-100
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -1654,13 +1654,18 @@ public class DocumentiDialogoImportServices {
|
||||
|
||||
boolean existOrd = isExistOrdA(codAnag, codMdep, dataOrd, numOrd);
|
||||
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(rifOrd)) {
|
||||
if (!existOrd) {
|
||||
//Vs. Ord. N. 11490 del 06-09-2013
|
||||
String[] datiOrdine = rifOrd.split(" ");
|
||||
numOrd = Integer.parseInt(datiOrdine[3]);
|
||||
dataOrd = UtilityString.parseDate(datiOrdine[5]);
|
||||
if ( UtilityString.isNumber(datiOrdine[3]))
|
||||
numOrd = Integer.parseInt(datiOrdine[3]);
|
||||
|
||||
try {
|
||||
dataOrd = UtilityString.parseDate(datiOrdine[5]);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
existOrd = isExistOrdA(codAnag, codMdep, dataOrd, numOrd);
|
||||
|
||||
@@ -388,6 +388,8 @@ public class DocumentiExportManagerService {
|
||||
query = UtilityDB.addwhereCond(query, whereCondDoc, false);
|
||||
|
||||
List<HashMap<String, Object>> listaDoc = UtilityDB.executeSimpleQuery(conn, query);
|
||||
if (listaDoc == null || listaDoc.isEmpty())
|
||||
throw new Exception("Nessun documento esportato");
|
||||
|
||||
for (HashMap<String, Object> doc : listaDoc) {
|
||||
String codAnag = UtilityHashMap.getValueIfExists(doc, "cod_anag");
|
||||
@@ -731,7 +733,21 @@ public class DocumentiExportManagerService {
|
||||
query = UtilityDB.addwhereCond(query, whereCond, true);
|
||||
query = UtilityDB.addwhereCond(query, whereCondFiltro, true);
|
||||
|
||||
String stringFile = new ResultSetMapper().mapQueryToCSV(conn, query, DocumentiDialogoDTO.Export.class, '\t', true, true);
|
||||
PreparedStatement psRow = multiDBTransactionManager.getPrimaryConnection()
|
||||
.prepareStatement(query,
|
||||
ResultSet.TYPE_SCROLL_INSENSITIVE,
|
||||
ResultSet.CONCUR_READ_ONLY);
|
||||
ResultSet rsRow = psRow.executeQuery();
|
||||
rsRow.last();
|
||||
int count = rsRow.getRow(); // numero righe
|
||||
rsRow.beforeFirst();
|
||||
String stringFile = new ResultSetMapper().mapResultSetToCSV(rsRow, DocumentiDialogoDTO.Export.class, '\t', true, true);
|
||||
rsRow.close();
|
||||
psRow.close();
|
||||
|
||||
if (count == 0 ) {
|
||||
throw new Exception("La query di estrazione righe non ha ritornato nessun risultato");
|
||||
}
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(stringFile)) {
|
||||
String filePath = pathFile + File.separator + fileName;
|
||||
|
||||
Reference in New Issue
Block a user