Esportazione ed importazione conti correnti corretta
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
build/classes/gui/GUIMyBank$6.class
Normal file
BIN
build/classes/gui/GUIMyBank$6.class
Normal file
Binary file not shown.
Binary file not shown.
@@ -26,7 +26,9 @@
|
|||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace min="-2" pref="99" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="99" max="-2" attributes="0"/>
|
||||||
<Component id="btnAprireContoCorrente" min="-2" max="-2" attributes="0"/>
|
<Component id="btnAprireContoCorrente" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="187" max="32767" attributes="0"/>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
|
<Component id="btnChiudereContoCorrente" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
|
||||||
@@ -60,7 +62,7 @@
|
|||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace pref="39" max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||||
<Component id="lblNumeroContoCorrente" max="32767" attributes="0"/>
|
<Component id="lblNumeroContoCorrente" max="32767" attributes="0"/>
|
||||||
<Component id="btnVersamento" min="-2" max="-2" attributes="0"/>
|
<Component id="btnVersamento" min="-2" max="-2" attributes="0"/>
|
||||||
@@ -120,7 +122,10 @@
|
|||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
<Component id="btnAprireContoCorrente" min="-2" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="btnAprireContoCorrente" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="btnChiudereContoCorrente" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jScrollPane1" max="32767" attributes="0"/>
|
<Component id="jScrollPane1" max="32767" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
|
||||||
@@ -238,5 +243,13 @@
|
|||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JTextField" name="txtNumeroContoCorrente">
|
<Component class="javax.swing.JTextField" name="txtNumeroContoCorrente">
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JButton" name="btnChiudereContoCorrente">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Chiudere conto corrente"/>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnChiudereContoCorrenteActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"nome" : "Verde",
|
|
||||||
"cognome" : "Bassanetti",
|
|
||||||
"codiceFiscale" : "AAAAAA12A123Z",
|
|
||||||
"saldo" : 200.0,
|
|
||||||
"numeroContoCorrente" : 692979128,
|
|
||||||
"dataDiNascita" : "04/07/2008"
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
[12:04:00.000 03/03/2026] Apertura del conto con saldo iniziale di 200.0
|
|
||||||
[12:04:02.002 03/03/2026] Versamento di 5000.0 effettuato con successo.
|
|
||||||
[12:04:02.002 03/03/2026] Saldo corrente: 5200.0
|
|
||||||
[12:04:05.005 03/03/2026] Prelievo di 20.0 effettuato con successo.
|
|
||||||
[12:04:05.005 03/03/2026] Saldo corrente: 5180.0
|
|
||||||
[16:33:26.026 03/03/2026] Versamento di 2.0E11 effettuato con successo.
|
|
||||||
[16:33:26.026 03/03/2026] Saldo corrente: 2.000000002E11
|
|
||||||
[16:33:48.048 03/03/2026] Prelievo di 2.0E10 effettuato con successo.
|
|
||||||
[16:33:48.048 03/03/2026] Saldo corrente: 1.800000002E11
|
|
||||||
[16:33:57.057 03/03/2026] Tentato prelievo di 2.0E11 fallito per superamento saldo.
|
|
||||||
[16:33:57.057 03/03/2026] Saldo corrente: 1.800000002E11
|
|
||||||
[16:34:00.000 03/03/2026] Prelievo di 2000000.0 effettuato con successo.
|
|
||||||
[16:34:00.000 03/03/2026] Saldo corrente: 1.799980002E11
|
|
||||||
[16:34:05.005 03/03/2026] Tentato prelievo di 2.0E11 fallito per superamento saldo.
|
|
||||||
[16:34:05.005 03/03/2026] Saldo corrente: 1.799980002E11
|
|
||||||
[16:34:08.008 03/03/2026] Prelievo di 9.9999999E7 effettuato con successo.
|
|
||||||
[16:34:08.008 03/03/2026] Saldo corrente: 1.79898000201E11
|
|
||||||
[16:34:13.013 03/03/2026] Prelievo di 9.99999999E8 effettuato con successo.
|
|
||||||
[16:34:13.013 03/03/2026] Saldo corrente: 1.78898000202E11
|
|
||||||
[16:34:17.017 03/03/2026] Prelievo di 9.999999999E9 effettuato con successo.
|
|
||||||
[16:34:17.017 03/03/2026] Saldo corrente: 1.68898000203E11
|
|
||||||
[16:34:21.021 03/03/2026] Tentato prelievo di 1.0E17 fallito per superamento saldo.
|
|
||||||
[16:34:21.021 03/03/2026] Saldo corrente: 1.68898000203E11
|
|
||||||
[16:34:23.023 03/03/2026] Tentato prelievo di 9.999999999999E12 fallito per superamento saldo.
|
|
||||||
[16:34:23.023 03/03/2026] Saldo corrente: 1.68898000203E11
|
|
||||||
[16:34:25.025 03/03/2026] Prelievo di 9.99999999E8 effettuato con successo.
|
|
||||||
[16:34:25.025 03/03/2026] Saldo corrente: 1.67898000204E11
|
|
||||||
[16:34:29.029 03/03/2026] Prelievo di 9.999999999E9 effettuato con successo.
|
|
||||||
[16:34:29.029 03/03/2026] Saldo corrente: 1.57898000205E11
|
|
||||||
[16:34:37.037 03/03/2026] Prelievo di 1.0E11 effettuato con successo.
|
|
||||||
[16:34:37.037 03/03/2026] Saldo corrente: 5.7898000205E10
|
|
||||||
[16:34:43.043 03/03/2026] Prelievo di 5.0E10 effettuato con successo.
|
|
||||||
[16:34:43.043 03/03/2026] Saldo corrente: 7.898000205E9
|
|
||||||
[16:34:47.047 03/03/2026] Prelievo di 7.0E9 effettuato con successo.
|
|
||||||
[16:34:47.047 03/03/2026] Saldo corrente: 8.98000205E8
|
|
||||||
[16:34:50.050 03/03/2026] Prelievo di 8.0E8 effettuato con successo.
|
|
||||||
[16:34:50.050 03/03/2026] Saldo corrente: 9.8000205E7
|
|
||||||
[16:34:53.053 03/03/2026] Prelievo di 9.0E7 effettuato con successo.
|
|
||||||
[16:34:53.053 03/03/2026] Saldo corrente: 8000205.0
|
|
||||||
@@ -26,7 +26,9 @@
|
|||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace min="-2" pref="99" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="99" max="-2" attributes="0"/>
|
||||||
<Component id="btnAprireContoCorrente" min="-2" max="-2" attributes="0"/>
|
<Component id="btnAprireContoCorrente" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="187" max="32767" attributes="0"/>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
|
<Component id="btnChiudereContoCorrente" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
|
||||||
@@ -60,7 +62,7 @@
|
|||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace pref="39" max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||||
<Component id="lblNumeroContoCorrente" max="32767" attributes="0"/>
|
<Component id="lblNumeroContoCorrente" max="32767" attributes="0"/>
|
||||||
<Component id="btnVersamento" min="-2" max="-2" attributes="0"/>
|
<Component id="btnVersamento" min="-2" max="-2" attributes="0"/>
|
||||||
@@ -120,7 +122,10 @@
|
|||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||||
<Component id="btnAprireContoCorrente" min="-2" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
|
<Component id="btnAprireContoCorrente" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Component id="btnChiudereContoCorrente" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jScrollPane1" max="32767" attributes="0"/>
|
<Component id="jScrollPane1" max="32767" attributes="0"/>
|
||||||
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
|
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
|
||||||
@@ -238,5 +243,13 @@
|
|||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JTextField" name="txtNumeroContoCorrente">
|
<Component class="javax.swing.JTextField" name="txtNumeroContoCorrente">
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JButton" name="btnChiudereContoCorrente">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" value="Chiudere conto corrente"/>
|
||||||
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnChiudereContoCorrenteActionPerformed"/>
|
||||||
|
</Events>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ package gui;
|
|||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import logic.MyBank;
|
import logic.MyBank;
|
||||||
import logic.ContoCorrente;
|
import logic.ContoCorrente;
|
||||||
@@ -36,10 +35,10 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
public GUIMyBank() {
|
public GUIMyBank() {
|
||||||
initComponents();
|
initComponents();
|
||||||
try {
|
try {
|
||||||
ArrayList<ContoCorrente> conti = (ArrayList<ContoCorrente>) MyBank.importaConti();
|
MyBank.importaConti();
|
||||||
MyBank.setConti(conti);
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
JOptionPane.showMessageDialog(null, e.getMessage());
|
JOptionPane.showMessageDialog(null, e.getMessage());
|
||||||
|
System.exit(3);
|
||||||
}
|
}
|
||||||
lblNumeroContoCorrente.setVisible(false);
|
lblNumeroContoCorrente.setVisible(false);
|
||||||
txtNumeroContoCorrente.setVisible(false);
|
txtNumeroContoCorrente.setVisible(false);
|
||||||
@@ -49,6 +48,14 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
btnListaMovimenti.setVisible(false);
|
btnListaMovimenti.setVisible(false);
|
||||||
txtaListaMovimenti.setVisible(false);
|
txtaListaMovimenti.setVisible(false);
|
||||||
txtaListaMovimenti.setEditable(false);
|
txtaListaMovimenti.setEditable(false);
|
||||||
|
btnChiudereContoCorrente.setVisible(false);
|
||||||
|
|
||||||
|
addWindowListener(new java.awt.event.WindowAdapter() {
|
||||||
|
@Override
|
||||||
|
public void windowClosing(java.awt.event.WindowEvent e) {
|
||||||
|
salva(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,6 +69,7 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
// <editor-fold defaultstate="collapsed" desc="Generated
|
// <editor-fold defaultstate="collapsed" desc="Generated
|
||||||
// <editor-fold defaultstate="collapsed" desc="Generated
|
// <editor-fold defaultstate="collapsed" desc="Generated
|
||||||
// <editor-fold defaultstate="collapsed" desc="Generated
|
// <editor-fold defaultstate="collapsed" desc="Generated
|
||||||
|
// <editor-fold defaultstate="collapsed" desc="Generated
|
||||||
// Code">//GEN-BEGIN:initComponents
|
// Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
|
||||||
@@ -84,6 +92,7 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
txtaListaMovimenti = new javax.swing.JTextArea();
|
txtaListaMovimenti = new javax.swing.JTextArea();
|
||||||
lblNumeroContoCorrente = new javax.swing.JLabel();
|
lblNumeroContoCorrente = new javax.swing.JLabel();
|
||||||
txtNumeroContoCorrente = new javax.swing.JTextField();
|
txtNumeroContoCorrente = new javax.swing.JTextField();
|
||||||
|
btnChiudereContoCorrente = new javax.swing.JButton();
|
||||||
|
|
||||||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||||||
|
|
||||||
@@ -147,6 +156,9 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
|
|
||||||
lblNumeroContoCorrente.setText("Numero conto corrente:");
|
lblNumeroContoCorrente.setText("Numero conto corrente:");
|
||||||
|
|
||||||
|
btnChiudereContoCorrente.setText("Chiudere conto corrente");
|
||||||
|
btnChiudereContoCorrente.addActionListener(this::btnChiudereContoCorrenteActionPerformed);
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||||
getContentPane().setLayout(layout);
|
getContentPane().setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
@@ -154,7 +166,9 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addGap(99, 99, 99)
|
.addGap(99, 99, 99)
|
||||||
.addComponent(btnAprireContoCorrente)
|
.addComponent(btnAprireContoCorrente)
|
||||||
.addContainerGap(187, Short.MAX_VALUE))
|
.addGap(18, 18, 18)
|
||||||
|
.addComponent(btnChiudereContoCorrente)
|
||||||
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addGap(17, 17, 17)
|
.addGap(17, 17, 17)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
@@ -194,8 +208,8 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
.addComponent(txtCognome,
|
.addComponent(txtCognome,
|
||||||
javax.swing.GroupLayout.PREFERRED_SIZE, 113,
|
javax.swing.GroupLayout.PREFERRED_SIZE, 113,
|
||||||
javax.swing.GroupLayout.PREFERRED_SIZE))))
|
javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39,
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
|
||||||
Short.MAX_VALUE)
|
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||||
.addComponent(lblNumeroContoCorrente, javax.swing.GroupLayout.DEFAULT_SIZE,
|
.addComponent(lblNumeroContoCorrente, javax.swing.GroupLayout.DEFAULT_SIZE,
|
||||||
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||||
@@ -261,7 +275,9 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
.addGap(18, 18, 18)
|
.addGap(18, 18, 18)
|
||||||
.addComponent(btnListaMovimenti)))
|
.addComponent(btnListaMovimenti)))
|
||||||
.addGap(18, 18, 18)
|
.addGap(18, 18, 18)
|
||||||
.addComponent(btnAprireContoCorrente)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
|
.addComponent(btnAprireContoCorrente)
|
||||||
|
.addComponent(btnChiudereContoCorrente))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(jScrollPane1)
|
.addComponent(jScrollPane1)
|
||||||
.addGap(14, 14, 14)));
|
.addGap(14, 14, 14)));
|
||||||
@@ -269,13 +285,63 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
pack();
|
pack();
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void btnListaMovimentiActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnListaMovimentiActionPerformed
|
private void btnChiudereContoCorrenteActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnChiudereContoCorrenteActionPerformed
|
||||||
try {
|
salva(false);
|
||||||
txtaListaMovimenti.setText(contoCorrenteAperto.getLog());
|
lblNumeroContoCorrente.setVisible(false);
|
||||||
txtaListaMovimenti.setVisible(true);
|
txtNumeroContoCorrente.setVisible(false);
|
||||||
} catch (IOException e) {
|
btnVersamento.setVisible(false);
|
||||||
JOptionPane.showMessageDialog(null, e.getMessage());
|
btnPrelievo.setVisible(false);
|
||||||
|
btnListaMovimenti.setVisible(false);
|
||||||
|
txtNome.setEditable(true);
|
||||||
|
txtCognome.setEditable(true);
|
||||||
|
txtCodiceFiscale.setEditable(true);
|
||||||
|
txtDataDiNascita.setEditable(true);
|
||||||
|
txtSaldoIniziale.setEditable(true);
|
||||||
|
btnAprireContoCorrente.setEnabled(true);
|
||||||
|
btnDataDiNascita.setEnabled(true);
|
||||||
|
btnChiudereContoCorrente.setVisible(false);
|
||||||
|
txtaListaMovimenti.setVisible(false);
|
||||||
|
lblSaldoIniziale.setText("Saldo iniziale");
|
||||||
|
txtNome.setText("");
|
||||||
|
txtCognome.setText("");
|
||||||
|
txtCodiceFiscale.setText("");
|
||||||
|
txtDataDiNascita.setText("");
|
||||||
|
txtSaldoIniziale.setText("");
|
||||||
|
}// GEN-LAST:event_btnChiudereContoCorrenteActionPerformed
|
||||||
|
|
||||||
|
private void salva(boolean isProgramQuitting) {
|
||||||
|
String messaggioSalvataggio = isProgramQuitting ? "Conti correnti salvati correttamente."
|
||||||
|
: "Conto corrente salvato correttamente.";
|
||||||
|
switch (JOptionPane.showConfirmDialog(null, "Salvare?", "Esci", JOptionPane.YES_NO_OPTION)) {
|
||||||
|
case 0:
|
||||||
|
try {
|
||||||
|
if (isProgramQuitting) {
|
||||||
|
MyBank.salvaContiCorrenti();
|
||||||
|
} else {
|
||||||
|
MyBank.salvaContoCorrente(contoCorrenteAperto);
|
||||||
|
}
|
||||||
|
JOptionPane.showMessageDialog(null, messaggioSalvataggio);
|
||||||
|
} catch (IOException e) {
|
||||||
|
JOptionPane.showMessageDialog(null, e.getMessage());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (!isProgramQuitting) {
|
||||||
|
try {
|
||||||
|
MyBank.annullaUltimoContoCorrente();
|
||||||
|
} catch (IOException e) {
|
||||||
|
JOptionPane.showMessageDialog(null, e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnListaMovimentiActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnListaMovimentiActionPerformed
|
||||||
|
txtaListaMovimenti.setText(contoCorrenteAperto.getLogAsString());
|
||||||
|
txtaListaMovimenti.setVisible(true);
|
||||||
}// GEN-LAST:event_btnListaMovimentiActionPerformed
|
}// GEN-LAST:event_btnListaMovimentiActionPerformed
|
||||||
|
|
||||||
private void txtNomeFocusGained(java.awt.event.FocusEvent evt) {// GEN-FIRST:event_txtNomeFocusGained
|
private void txtNomeFocusGained(java.awt.event.FocusEvent evt) {// GEN-FIRST:event_txtNomeFocusGained
|
||||||
@@ -313,8 +379,6 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
} catch (NumberFormatException _) {
|
} catch (NumberFormatException _) {
|
||||||
JOptionPane.showMessageDialog(null, "L'importo che si desidera versare non è valido.");
|
JOptionPane.showMessageDialog(null, "L'importo che si desidera versare non è valido.");
|
||||||
error = true;
|
error = true;
|
||||||
} catch (IOException e) {
|
|
||||||
JOptionPane.showMessageDialog(null, e.getMessage());
|
|
||||||
}
|
}
|
||||||
} while (error);
|
} while (error);
|
||||||
}// GEN-LAST:event_btnVersamentoActionPerformed
|
}// GEN-LAST:event_btnVersamentoActionPerformed
|
||||||
@@ -337,8 +401,6 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
JOptionPane.showMessageDialog(null, e.getMessage());
|
JOptionPane.showMessageDialog(null, e.getMessage());
|
||||||
error = true;
|
error = true;
|
||||||
} catch (IOException e) {
|
|
||||||
JOptionPane.showMessageDialog(null, e.getMessage());
|
|
||||||
}
|
}
|
||||||
} while (error);
|
} while (error);
|
||||||
}// GEN-LAST:event_btnPrelievoActionPerformed
|
}// GEN-LAST:event_btnPrelievoActionPerformed
|
||||||
@@ -399,13 +461,13 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
ContoCorrenteWrapper conto = MyBank.aggiungiConto(nome, cognome, codiceFiscale, dataDiNascita,
|
||||||
ContoCorrenteWrapper conto = MyBank.aggiungiConto(nome, cognome, codiceFiscale, dataDiNascita,
|
|
||||||
saldoIniziale);
|
saldoIniziale);
|
||||||
contoCorrenteAperto = conto.getConto();
|
contoCorrenteAperto = conto.getConto();
|
||||||
|
|
||||||
if (conto.isImported()) {
|
if (conto.isImported()) {
|
||||||
JOptionPane.showMessageDialog(null, "Esiste già un conto corrente per il codice fiscale specificato.\nVerrà aperto il conto corrente esistente.");
|
JOptionPane.showMessageDialog(null,
|
||||||
|
"Esiste già un conto corrente per il codice fiscale specificato.\nVerrà aperto il conto corrente esistente.");
|
||||||
txtNome.setText(contoCorrenteAperto.getNome());
|
txtNome.setText(contoCorrenteAperto.getNome());
|
||||||
txtCognome.setText(contoCorrenteAperto.getCognome());
|
txtCognome.setText(contoCorrenteAperto.getCognome());
|
||||||
txtCodiceFiscale.setText(contoCorrenteAperto.getCodiceFiscale());
|
txtCodiceFiscale.setText(contoCorrenteAperto.getCodiceFiscale());
|
||||||
@@ -430,9 +492,7 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
txtSaldoIniziale.setEditable(false);
|
txtSaldoIniziale.setEditable(false);
|
||||||
btnAprireContoCorrente.setEnabled(false);
|
btnAprireContoCorrente.setEnabled(false);
|
||||||
btnDataDiNascita.setEnabled(false);
|
btnDataDiNascita.setEnabled(false);
|
||||||
} catch (IOException e) {
|
btnChiudereContoCorrente.setVisible(true);
|
||||||
JOptionPane.showMessageDialog(null, e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}// GEN-LAST:event_btnAprireContoCorrenteActionPerformed
|
}// GEN-LAST:event_btnAprireContoCorrenteActionPerformed
|
||||||
|
|
||||||
@@ -467,6 +527,7 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JButton btnAprireContoCorrente;
|
private javax.swing.JButton btnAprireContoCorrente;
|
||||||
|
private javax.swing.JButton btnChiudereContoCorrente;
|
||||||
private javax.swing.JButton btnDataDiNascita;
|
private javax.swing.JButton btnDataDiNascita;
|
||||||
private javax.swing.JButton btnListaMovimenti;
|
private javax.swing.JButton btnListaMovimenti;
|
||||||
private javax.swing.JButton btnPrelievo;
|
private javax.swing.JButton btnPrelievo;
|
||||||
|
|||||||
@@ -4,9 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
package logic;
|
package logic;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -30,15 +28,16 @@ public class ContoCorrente {
|
|||||||
|
|
||||||
private static ArrayList<Integer> numeriContiCorrenti = new ArrayList<>();
|
private static ArrayList<Integer> numeriContiCorrenti = new ArrayList<>();
|
||||||
|
|
||||||
@JsonFormat
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd/MM/yyyy")
|
||||||
(shape = JsonFormat.Shape.STRING, pattern = "dd/MM/yyyy")
|
|
||||||
private Date dataDiNascita;
|
private Date dataDiNascita;
|
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
public ContoCorrente() {
|
public ContoCorrente() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContoCorrente(String nome, String cognome, String codiceFiscale, Date dataDiNascita, double saldo,
|
public ContoCorrente(String nome, String cognome, String codiceFiscale, Date dataDiNascita, double saldo,
|
||||||
int numeroContoCorrente) throws IOException{
|
int numeroContoCorrente) {
|
||||||
this.nome = nome;
|
this.nome = nome;
|
||||||
this.cognome = cognome;
|
this.cognome = cognome;
|
||||||
this.codiceFiscale = codiceFiscale;
|
this.codiceFiscale = codiceFiscale;
|
||||||
@@ -48,67 +47,67 @@ public class ContoCorrente {
|
|||||||
numeriContiCorrenti.add(numeroContoCorrente);
|
numeriContiCorrenti.add(numeroContoCorrente);
|
||||||
log("Apertura del conto con saldo iniziale di " + this.saldo);
|
log("Apertura del conto con saldo iniziale di " + this.saldo);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<Integer> getNumeriContiCorrenti() {
|
public static List<Integer> getNumeriContiCorrenti() {
|
||||||
return numeriContiCorrenti;
|
return numeriContiCorrenti;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setNumeriContiCorrenti(List<Integer> numeriContiCorrenti) {
|
public static void setNumeriContiCorrenti(List<Integer> numeriContiCorrenti) {
|
||||||
ContoCorrente.numeriContiCorrenti = (ArrayList<Integer>)numeriContiCorrenti;
|
ContoCorrente.numeriContiCorrenti = (ArrayList<Integer>) numeriContiCorrenti;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNumeroContoCorrente() {
|
public int getNumeroContoCorrente() {
|
||||||
return numeroContoCorrente;
|
return numeroContoCorrente;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void versa(double quantita) throws IOException{
|
public void delNumeroContoCorrente() {
|
||||||
|
numeriContiCorrenti.removeLast();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void versa(double quantita) {
|
||||||
this.saldo += quantita;
|
this.saldo += quantita;
|
||||||
log("Versamento di " + quantita + " effettuato con successo.");
|
log("Versamento di " + quantita + " effettuato con successo.");
|
||||||
logSaldoCorrente();
|
logSaldoCorrente();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void preleva(double quantita) throws IllegalArgumentException, IOException{
|
public void preleva(double quantita) throws IllegalArgumentException {
|
||||||
if (quantita > this.saldo) {
|
if (quantita > this.saldo) {
|
||||||
log("Tentato prelievo di " + quantita + " fallito per superamento saldo.");
|
log("Tentato prelievo di " + quantita + " fallito per superamento saldo.");
|
||||||
logSaldoCorrente();
|
logSaldoCorrente();
|
||||||
throw new IllegalArgumentException("La quantità desiderata eccede il saldo corrente.");
|
throw new IllegalArgumentException("La quantità desiderata eccede il saldo corrente.");
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.saldo -= quantita;
|
this.saldo -= quantita;
|
||||||
log("Prelievo di " + quantita + " effettuato con successo.");
|
log("Prelievo di " + quantita + " effettuato con successo.");
|
||||||
logSaldoCorrente();
|
logSaldoCorrente();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void logSaldoCorrente() throws IOException{
|
private void logSaldoCorrente() {
|
||||||
log("Saldo corrente: " + this.saldo);
|
log("Saldo corrente: " + this.saldo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void log(String messaggio) throws IOException{
|
private void log(String messaggio) {
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss.sss dd/MM/yyyy");
|
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss.sss dd/MM/yyyy");
|
||||||
try (BufferedWriter bw = new BufferedWriter(
|
sb.append("[");
|
||||||
new FileWriter(MyBank.PATH_CONTI + "movimenti_" + this.numeroContoCorrente + ".txt", true))) {
|
sb.append(sdf.format(new Date()));
|
||||||
sb.append("[");
|
sb.append("] ");
|
||||||
sb.append(sdf.format(new Date()));
|
sb.append(messaggio);
|
||||||
sb.append("] ");
|
sb.append("\n");
|
||||||
sb.append(messaggio);
|
}
|
||||||
sb.append("\n");
|
|
||||||
|
|
||||||
bw.write(sb.toString());
|
public void salvaLog() throws IOException {
|
||||||
|
try (BufferedWriter bw = new BufferedWriter(
|
||||||
|
new FileWriter(MyBank.PATH_CONTI + "movimenti_" + this.numeroContoCorrente + ".txt"))) {
|
||||||
|
|
||||||
|
bw.write(this.sb.toString());
|
||||||
} catch (IOException _) {
|
} catch (IOException _) {
|
||||||
throw new IOException("Errore nella scrittura del movimento.");
|
throw new IOException("Errore nella scrittura del movimento.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
public String getLog() throws IOException{
|
public String getLogAsString() {
|
||||||
try (BufferedReader br = new BufferedReader(
|
return this.sb.toString();
|
||||||
new FileReader(MyBank.PATH_CONTI + "movimenti_" + this.numeroContoCorrente + ".txt"))) {
|
|
||||||
return br.readAllAsString();
|
|
||||||
} catch (IOException _) {
|
|
||||||
throw new IOException("Errore nella lettura dei movimenti.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNome() {
|
public String getNome() {
|
||||||
@@ -130,4 +129,8 @@ public class ContoCorrente {
|
|||||||
public double getSaldo() {
|
public double getSaldo() {
|
||||||
return saldo;
|
return saldo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StringBuilder getSb() {
|
||||||
|
return this.sb;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,6 @@ import java.text.ParseException;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@@ -36,53 +35,55 @@ public class MyBank {
|
|||||||
static final String ERRORE_CONTI_VUOTO = "Errore: è necessario aggiungere almeno un conto corrente prima di proseguire.";
|
static final String ERRORE_CONTI_VUOTO = "Errore: è necessario aggiungere almeno un conto corrente prima di proseguire.";
|
||||||
public static final String PATH_CONTI = "./src/logic/conti/";
|
public static final String PATH_CONTI = "./src/logic/conti/";
|
||||||
static final String FORMATO_DATA = "dd/MM/yyyy";
|
static final String FORMATO_DATA = "dd/MM/yyyy";
|
||||||
private static ArrayList<ContoCorrente> conti;
|
static final String ESTENSIONE_FILE = ".json";
|
||||||
|
private static ArrayList<ContoCorrente> conti = new ArrayList<>();
|
||||||
public static void setConti(ArrayList<ContoCorrente> conti) {
|
|
||||||
MyBank.conti = conti;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ArrayList<ContoCorrente> getConti() {
|
public static ArrayList<ContoCorrente> getConti() {
|
||||||
return conti;
|
return conti;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<ContoCorrente> importaConti() throws IOException{
|
public static void importaConti() throws IOException {
|
||||||
ArrayList<ContoCorrente> conti = new ArrayList<>();
|
|
||||||
File percorsoConti = new File(PATH_CONTI);
|
File percorsoConti = new File(PATH_CONTI);
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
|
||||||
mapper.setDateFormat(new SimpleDateFormat(FORMATO_DATA));
|
|
||||||
StringBuilder sb;
|
|
||||||
String riga;
|
|
||||||
|
|
||||||
if (percorsoConti.exists() && percorsoConti.listFiles().length != 0) {
|
if (percorsoConti.exists() && percorsoConti.listFiles().length != 0) {
|
||||||
for (File conto : percorsoConti.listFiles()) {
|
for (File conto : percorsoConti.listFiles()) {
|
||||||
if (conto.getName().substring(conto.getName().lastIndexOf(".")).equals(".json")) {
|
if (conto.getName().substring(conto.getName().lastIndexOf(".")).equals(ESTENSIONE_FILE)) {
|
||||||
try (BufferedReader bf = new BufferedReader(new FileReader(conto))) {
|
importaConto(conto);
|
||||||
sb = new StringBuilder();
|
|
||||||
riga = bf.readLine();
|
|
||||||
|
|
||||||
while (riga != null) {
|
|
||||||
sb.append(riga);
|
|
||||||
riga = bf.readLine();
|
|
||||||
}
|
|
||||||
conti.add(mapper.readerFor(ContoCorrente.class).readValue(sb.toString()));
|
|
||||||
|
|
||||||
ArrayList<Integer> numeriContiCorrenti = (ArrayList<Integer>) ContoCorrente
|
|
||||||
.getNumeriContiCorrenti();
|
|
||||||
numeriContiCorrenti.add(conti.getLast().getNumeroContoCorrente());
|
|
||||||
ContoCorrente.setNumeriContiCorrenti(numeriContiCorrenti);
|
|
||||||
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new IOException("Errore nella lettura del file di conto corrente:\n" + e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return conti;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ContoCorrenteWrapper aggiungiConto(String nome, String cognome, String codiceFiscale, Date dataDiNascita,
|
static ContoCorrente importaConto(File conto) throws IOException {
|
||||||
double saldoIniziale) throws IOException{
|
StringBuilder sb;
|
||||||
|
String riga;
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
mapper.setDateFormat(new SimpleDateFormat(FORMATO_DATA));
|
||||||
|
|
||||||
|
try (BufferedReader bf = new BufferedReader(new FileReader(conto))) {
|
||||||
|
sb = new StringBuilder();
|
||||||
|
riga = bf.readLine();
|
||||||
|
|
||||||
|
while (riga != null) {
|
||||||
|
sb.append(riga);
|
||||||
|
riga = bf.readLine();
|
||||||
|
}
|
||||||
|
conti.add(mapper.readerFor(ContoCorrente.class).readValue(sb.toString()));
|
||||||
|
|
||||||
|
ArrayList<Integer> numeriContiCorrenti = (ArrayList<Integer>) ContoCorrente
|
||||||
|
.getNumeriContiCorrenti();
|
||||||
|
numeriContiCorrenti.add(conti.getLast().getNumeroContoCorrente());
|
||||||
|
ContoCorrente.setNumeriContiCorrenti(numeriContiCorrenti);
|
||||||
|
|
||||||
|
return conti.getLast();
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new IOException("Errore nella lettura del file di conto corrente:\n" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ContoCorrenteWrapper aggiungiConto(String nome, String cognome, String codiceFiscale,
|
||||||
|
Date dataDiNascita,
|
||||||
|
double saldoIniziale) {
|
||||||
int numeroContoCorrente;
|
int numeroContoCorrente;
|
||||||
ContoCorrente contoCorrente;
|
ContoCorrente contoCorrente;
|
||||||
boolean exit = false;
|
boolean exit = false;
|
||||||
@@ -92,10 +93,10 @@ public class MyBank {
|
|||||||
numeroContoCorrente = Math.abs(codiceFiscale.hashCode());
|
numeroContoCorrente = Math.abs(codiceFiscale.hashCode());
|
||||||
|
|
||||||
if (ContoCorrente.getNumeriContiCorrenti().contains(numeroContoCorrente)) {
|
if (ContoCorrente.getNumeriContiCorrenti().contains(numeroContoCorrente)) {
|
||||||
for (; i < conti.size() && exit; i++) {
|
for (; i < conti.size() && !exit; i++) {
|
||||||
exit = conti.get(i).getNumeroContoCorrente() == numeroContoCorrente;
|
exit = conti.get(i).getNumeroContoCorrente() == numeroContoCorrente;
|
||||||
}
|
}
|
||||||
contoCorrente = conti.get(i);
|
contoCorrente = conti.get(i - 1);
|
||||||
isImported = true;
|
isImported = true;
|
||||||
} else {
|
} else {
|
||||||
File percorsoConti = new File(PATH_CONTI);
|
File percorsoConti = new File(PATH_CONTI);
|
||||||
@@ -105,7 +106,6 @@ public class MyBank {
|
|||||||
contoCorrente = new ContoCorrente(nome, cognome, codiceFiscale, dataDiNascita, saldoIniziale,
|
contoCorrente = new ContoCorrente(nome, cognome, codiceFiscale, dataDiNascita, saldoIniziale,
|
||||||
numeroContoCorrente);
|
numeroContoCorrente);
|
||||||
conti.add(contoCorrente);
|
conti.add(contoCorrente);
|
||||||
salvaContoCorrente(contoCorrente);
|
|
||||||
isImported = false;
|
isImported = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,13 +141,32 @@ public class MyBank {
|
|||||||
return valoreDouble;
|
return valoreDouble;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void salvaContoCorrente(ContoCorrente conto) {
|
public static void salvaContoCorrente(ContoCorrente conto) throws IOException {
|
||||||
try (BufferedWriter bw = new BufferedWriter(
|
try (BufferedWriter bw = new BufferedWriter(
|
||||||
new FileWriter(PATH_CONTI + "conto_" + conto.getNumeroContoCorrente() + ".json"))) {
|
new FileWriter(PATH_CONTI + "conto_" + conto.getNumeroContoCorrente() + ESTENSIONE_FILE))) {
|
||||||
ObjectWriter ow = new ObjectMapper().writer().withDefaultPrettyPrinter();
|
ObjectWriter ow = new ObjectMapper().writer().withDefaultPrettyPrinter();
|
||||||
bw.write(ow.writeValueAsString(conto));
|
bw.write(ow.writeValueAsString(conto));
|
||||||
} catch (IOException _) {
|
conto.salvaLog();
|
||||||
System.out.println("Errore: impossibile salvare il conto corrente.");
|
} catch (IOException e) {
|
||||||
|
throw new IOException(
|
||||||
|
"Errore: impossibile salvare il conto corrente.\n" + e.getMessage() + "\n" + e.getStackTrace());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void salvaContiCorrenti() throws IOException {
|
||||||
|
for (ContoCorrente contoCorrente : conti) {
|
||||||
|
salvaContoCorrente(contoCorrente);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void annullaUltimoContoCorrente() throws IOException{
|
||||||
|
int numeroUltimoConto = conti.getLast().getNumeroContoCorrente();
|
||||||
|
conti.getLast().delNumeroContoCorrente();
|
||||||
|
conti.removeLast();
|
||||||
|
File percorsoUltimoConto = new File(PATH_CONTI + "conto_" + numeroUltimoConto + ESTENSIONE_FILE);
|
||||||
|
if (percorsoUltimoConto.exists()) {
|
||||||
|
importaConto(percorsoUltimoConto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"nome" : "Verde",
|
|
||||||
"cognome" : "Bassanetti",
|
|
||||||
"codiceFiscale" : "AAAAAA12A123Z",
|
|
||||||
"saldo" : 200.0,
|
|
||||||
"numeroContoCorrente" : 692979128,
|
|
||||||
"dataDiNascita" : "04/07/2008"
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
[12:04:00.000 03/03/2026] Apertura del conto con saldo iniziale di 200.0
|
|
||||||
[12:04:02.002 03/03/2026] Versamento di 5000.0 effettuato con successo.
|
|
||||||
[12:04:02.002 03/03/2026] Saldo corrente: 5200.0
|
|
||||||
[12:04:05.005 03/03/2026] Prelievo di 20.0 effettuato con successo.
|
|
||||||
[12:04:05.005 03/03/2026] Saldo corrente: 5180.0
|
|
||||||
[16:33:26.026 03/03/2026] Versamento di 2.0E11 effettuato con successo.
|
|
||||||
[16:33:26.026 03/03/2026] Saldo corrente: 2.000000002E11
|
|
||||||
[16:33:48.048 03/03/2026] Prelievo di 2.0E10 effettuato con successo.
|
|
||||||
[16:33:48.048 03/03/2026] Saldo corrente: 1.800000002E11
|
|
||||||
[16:33:57.057 03/03/2026] Tentato prelievo di 2.0E11 fallito per superamento saldo.
|
|
||||||
[16:33:57.057 03/03/2026] Saldo corrente: 1.800000002E11
|
|
||||||
[16:34:00.000 03/03/2026] Prelievo di 2000000.0 effettuato con successo.
|
|
||||||
[16:34:00.000 03/03/2026] Saldo corrente: 1.799980002E11
|
|
||||||
[16:34:05.005 03/03/2026] Tentato prelievo di 2.0E11 fallito per superamento saldo.
|
|
||||||
[16:34:05.005 03/03/2026] Saldo corrente: 1.799980002E11
|
|
||||||
[16:34:08.008 03/03/2026] Prelievo di 9.9999999E7 effettuato con successo.
|
|
||||||
[16:34:08.008 03/03/2026] Saldo corrente: 1.79898000201E11
|
|
||||||
[16:34:13.013 03/03/2026] Prelievo di 9.99999999E8 effettuato con successo.
|
|
||||||
[16:34:13.013 03/03/2026] Saldo corrente: 1.78898000202E11
|
|
||||||
[16:34:17.017 03/03/2026] Prelievo di 9.999999999E9 effettuato con successo.
|
|
||||||
[16:34:17.017 03/03/2026] Saldo corrente: 1.68898000203E11
|
|
||||||
[16:34:21.021 03/03/2026] Tentato prelievo di 1.0E17 fallito per superamento saldo.
|
|
||||||
[16:34:21.021 03/03/2026] Saldo corrente: 1.68898000203E11
|
|
||||||
[16:34:23.023 03/03/2026] Tentato prelievo di 9.999999999999E12 fallito per superamento saldo.
|
|
||||||
[16:34:23.023 03/03/2026] Saldo corrente: 1.68898000203E11
|
|
||||||
[16:34:25.025 03/03/2026] Prelievo di 9.99999999E8 effettuato con successo.
|
|
||||||
[16:34:25.025 03/03/2026] Saldo corrente: 1.67898000204E11
|
|
||||||
[16:34:29.029 03/03/2026] Prelievo di 9.999999999E9 effettuato con successo.
|
|
||||||
[16:34:29.029 03/03/2026] Saldo corrente: 1.57898000205E11
|
|
||||||
[16:34:37.037 03/03/2026] Prelievo di 1.0E11 effettuato con successo.
|
|
||||||
[16:34:37.037 03/03/2026] Saldo corrente: 5.7898000205E10
|
|
||||||
[16:34:43.043 03/03/2026] Prelievo di 5.0E10 effettuato con successo.
|
|
||||||
[16:34:43.043 03/03/2026] Saldo corrente: 7.898000205E9
|
|
||||||
[16:34:47.047 03/03/2026] Prelievo di 7.0E9 effettuato con successo.
|
|
||||||
[16:34:47.047 03/03/2026] Saldo corrente: 8.98000205E8
|
|
||||||
[16:34:50.050 03/03/2026] Prelievo di 8.0E8 effettuato con successo.
|
|
||||||
[16:34:50.050 03/03/2026] Saldo corrente: 9.8000205E7
|
|
||||||
[16:34:53.053 03/03/2026] Prelievo di 9.0E7 effettuato con successo.
|
|
||||||
[16:34:53.053 03/03/2026] Saldo corrente: 8000205.0
|
|
||||||
Reference in New Issue
Block a user