Modifica import GSE
This commit is contained in:
@@ -186,6 +186,9 @@ public class OrdiniImportService {
|
|||||||
|
|
||||||
|
|
||||||
for (List<String> record : records) {
|
for (List<String> record : records) {
|
||||||
|
if (record.size() <=1){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
sql =
|
sql =
|
||||||
Query.format(
|
Query.format(
|
||||||
"SELECT * FROM getDatiDestPVGSE(%s, %s)",
|
"SELECT * FROM getDatiDestPVGSE(%s, %s)",
|
||||||
@@ -247,8 +250,14 @@ public class OrdiniImportService {
|
|||||||
citta
|
citta
|
||||||
);
|
);
|
||||||
|
|
||||||
|
boolean existError = false;
|
||||||
StringBuilder mailMessage = new StringBuilder();
|
StringBuilder mailMessage = new StringBuilder();
|
||||||
for (DtbOrdt dtbOrdt : dtbOrdtList) {
|
for (DtbOrdt dtbOrdt : dtbOrdtList) {
|
||||||
|
if (dtbOrdt.getException() != null){
|
||||||
|
existError = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
String msg;
|
String msg;
|
||||||
if (dtbOrdt.getDtbOrdr().size() == 1) {
|
if (dtbOrdt.getDtbOrdr().size() == 1) {
|
||||||
msg = String.format("Presente %s articolo", dtbOrdt.getDtbOrdr().size());
|
msg = String.format("Presente %s articolo", dtbOrdt.getDtbOrdr().size());
|
||||||
@@ -264,6 +273,7 @@ public class OrdiniImportService {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!existError){
|
||||||
if (alreadyExists != null){
|
if (alreadyExists != null){
|
||||||
mailMessage.append(String.format("<p style=\"color: red; font-weight:bold\">%s<br/></p>", alreadyExists));
|
mailMessage.append(String.format("<p style=\"color: red; font-weight:bold\">%s<br/></p>", alreadyExists));
|
||||||
}
|
}
|
||||||
@@ -277,6 +287,7 @@ public class OrdiniImportService {
|
|||||||
subject, htmlMailText, true, false, null, null,
|
subject, htmlMailText, true, false, null, null,
|
||||||
null, false, null);
|
null, false, null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return entityBases;
|
return entityBases;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user