Movidas un poco las carpetas del repo :3

This commit is contained in:
Daniel Cortes
2019-01-20 18:24:42 -03:00
parent e34c2be7d1
commit 9fa56f0a0e
20 changed files with 16 additions and 36 deletions

3
.gitignore vendored
View File

@@ -1,5 +1,4 @@
out
lib
.idea
dist/*.dat
workspace.xml
tasks.xml

BIN
dist/Programa Caja.jar vendored

Binary file not shown.

View File

@@ -9,7 +9,7 @@
# database_uri es la uri de la base de datos con la que se conectara el sistema.
# por ahora soporte solo a sqlite asi que debe ser la uri correspondiente
sqlite_database_uri = jdbc:sqlite:rodriguez.dat
sqlite_database_uri = jdbc:sqlite:data/rodriguez.dat
# look_and_feel elige el look and feel que intentara utilizar la aplicacion, si el seleccionado no funciona en el sistema operativo se hara fallback a metal.

View File

@@ -1,32 +1,8 @@
#
# MIT License
#
# Copyright (c) 2018-2019 Daniel Cortes
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#handlers= java.util.logging.ConsoleHandler
handlers= java.util.logging.FileHandler
java.util.logging.FileHandler.level = ALL
java.util.logging.FileHandler.pattern = logs.xml
java.util.logging.FileHandler.pattern = logs/logs-%u.xml
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
#java.util.logging.ConsoleHandler.level = ALL

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -41,7 +41,7 @@ public class Configuration {
try {
LOGGER.log(Level.INFO, "Leyendo y llenando el objeto de properties");
FileInputStream in = new FileInputStream("conf.properties");
FileInputStream in = new FileInputStream("config/app.properties");
config.load(in);
in.close();

View File

@@ -55,10 +55,10 @@ public class SQLiteCajaDAO extends CajaDAO {
List<Caja> cajaList = new ArrayList<>();
try (Connection conn = connectionHolder.getConnection()) {
String query = "select * from caja";
PreparedStatement ps = conn.prepareStatement("select * from caja");
PreparedStatement ps = conn.prepareStatement(query);
ResultSet rs = ps.executeQuery();
LOGGER.log(Level.FINE, "Se ejecuta query: {0}", query);
LOGGER.log(Level.FINE, "QUERY: {0}", new Object[]{query});
cajaList = this.cajasFromResultSet(rs);
@@ -80,7 +80,7 @@ public class SQLiteCajaDAO extends CajaDAO {
ps.setInt(1, id);
ResultSet rs = ps.executeQuery();
LOGGER.log(Level.FINE, "Se ejecuta query: {0}, con id = {1}", new Object[]{query, id});
LOGGER.log(Level.FINE, "QUERY: {0} | values [{1}]", new Object[]{query, id});
caja = this.cajasFromResultSet(rs).get(0);
@@ -102,7 +102,7 @@ public class SQLiteCajaDAO extends CajaDAO {
ps.setString(1, fecha.toString());
ResultSet rs = ps.executeQuery();
LOGGER.log(Level.FINE, "Se ejecuta query: {0}, con fecha = {1}", new Object[]{query, fecha});
LOGGER.log(Level.FINE, "QUERY: {0} | values [{1}]", new Object[]{query, fecha});
List<Caja> cajaList = this.cajasFromResultSet(rs);
@@ -128,7 +128,7 @@ public class SQLiteCajaDAO extends CajaDAO {
updates = ps.executeUpdate();
LOGGER.log(Level.FINE, "Se ejecuta query: {0}, con fecha = {1}", new Object[]{query, caja.getFecha().toString()});
LOGGER.log(Level.FINE, "QUERY: {0} values [{1}]", new Object[]{query, caja.getFecha().toString()});
ps.close();
@@ -137,7 +137,7 @@ public class SQLiteCajaDAO extends CajaDAO {
ps = conn.prepareStatement("select last_insert_rowid()");
ResultSet rs = ps.executeQuery();
LOGGER.log(Level.FINE, "Se ejecuta query: {0}", new Object[]{query});
LOGGER.log(Level.FINE, "QUERY: {0}", new Object[]{query});
rs.next();
caja.setId(rs.getInt(1));
@@ -161,7 +161,8 @@ public class SQLiteCajaDAO extends CajaDAO {
ps.setInt(2, caja.getId());
updates = ps.executeUpdate();
LOGGER.log(Level.FINE, "Se ejecuta query: {0}, con fecha = {1} y id = {2}", new Object[]{query, caja.getFecha(), caja.getId()});
LOGGER.log(Level.FINE, "QUERY: {0} | values [{1},{2}]", new Object[]{query, caja.getFecha().toString(), caja.getId()});
ps.close();
} catch (SQLException e) {
@@ -175,6 +176,7 @@ public class SQLiteCajaDAO extends CajaDAO {
public void createCajasForMonth(LocalDate month) {
LocalDate date = month.withDayOfMonth(1);
LocalDate endDate = date.withDayOfMonth(date.lengthOfMonth()).plusDays(1);
int count = 0;
LOGGER.log(Level.FINE, "Se intentara crear las cajas para un mes para las fechas entre {0} y {1}", new Object[]{date, endDate});
@@ -199,6 +201,9 @@ public class SQLiteCajaDAO extends CajaDAO {
documentosDAO.insertDefaultDocumentos(documentos);
date = date.plusDays(1);
count++;
}
LOGGER.log(Level.FINE, "Terminado de intentar crear las cajas y se crearon {2}", new Object[]{date, endDate, count});
}
}