aggiunto controllo in impotazione scontrini
This commit is contained in:
@@ -65,6 +65,14 @@ public class ReceiptsDialog implements IReceiptsParser {
|
||||
|
||||
receipts.setImportatoDa("EMS");
|
||||
|
||||
Integer idScont;
|
||||
String idScontrino = line.substring(25, 30).trim();
|
||||
if ( UtilityString.isNullOrEmpty(idScontrino)){
|
||||
throw new Exception("Id Scontrino non valido");
|
||||
} else {
|
||||
idScont = Integer.valueOf(idScontrino);
|
||||
}
|
||||
|
||||
codMdep = line.substring(1, 6).trim();
|
||||
receipts.setCodMdep(codMdep);
|
||||
codCassa = line.substring(6, 8).trim();
|
||||
@@ -72,7 +80,7 @@ public class ReceiptsDialog implements IReceiptsParser {
|
||||
receipts.setCodAnag(codAnag.toString());
|
||||
String data = line.substring(8, 16).trim();
|
||||
String ora = line.substring(16, 25).trim();
|
||||
receipts.setIdScontr(new Integer(line.substring(25, 30).trim()));
|
||||
receipts.setIdScontr(idScont);
|
||||
receipts.setCodOper(line.substring(30, 34).trim());
|
||||
receipts.setCausale(line.substring(34, 35).trim());
|
||||
receipts.setCodFidelity(line.substring(35, 48).trim());
|
||||
|
||||
@@ -64,6 +64,7 @@ public class ScontriniImportService {
|
||||
, requestDTO.getFileName(), ((String) requestDTO.getRawContent()).getBytes());
|
||||
|
||||
}
|
||||
logger.info(filePath);
|
||||
List<EntityBase> receipts = parser.parse(filePath, conn, typeImport, formatImport, anomalie);
|
||||
|
||||
if (!UtilityString.isNullOrEmpty(filePath) && !headless) {
|
||||
|
||||
Reference in New Issue
Block a user