Se me olvido cambiar el nombre del modelo
This commit is contained in:
75
.idea/workspace.xml
generated
75
.idea/workspace.xml
generated
@@ -10,16 +10,8 @@
|
|||||||
<bookmark url="file://$PROJECT_DIR$/src/danielcortes/xyz/models/informe/SQLiteInformeMensualContentDAO.java" line="149" mnemonic="0" />
|
<bookmark url="file://$PROJECT_DIR$/src/danielcortes/xyz/models/informe/SQLiteInformeMensualContentDAO.java" line="149" mnemonic="0" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="a633d35a-56a6-4479-b4c4-f97198052fb7" name="Default Changelist" comment="Cambiado el nombre del informe gener">
|
<list default="true" id="a633d35a-56a6-4479-b4c4-f97198052fb7" name="Default Changelist" comment="">
|
||||||
<change afterPath="$PROJECT_DIR$/src/danielcortes/xyz/utils/StringUtils.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/dist/caja.jar" beforeDir="false" afterPath="$PROJECT_DIR$/dist/caja.jar" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/danielcortes/xyz/controllers/InformesController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/danielcortes/xyz/controllers/InformesController.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/danielcortes/xyz/informes/InformeMensual.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/danielcortes/xyz/informes/InformeLibroDeVentas.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/danielcortes/xyz/views/InformeMensualDialog.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/danielcortes/xyz/views/MonthSelectDialog.form" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/danielcortes/xyz/views/InformeMensualDialog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/danielcortes/xyz/views/MonthSelectDialog.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/danielcortes/xyz/views/InformesView.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/danielcortes/xyz/views/InformesView.form" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/danielcortes/xyz/views/InformesView.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/danielcortes/xyz/views/InformesView.java" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<ignored path="$PROJECT_DIR$/target/" />
|
<ignored path="$PROJECT_DIR$/target/" />
|
||||||
<ignored path=".idea/" />
|
<ignored path=".idea/" />
|
||||||
@@ -81,22 +73,7 @@
|
|||||||
<favorites_list name="caja" />
|
<favorites_list name="caja" />
|
||||||
</component>
|
</component>
|
||||||
<component name="FileEditorManager">
|
<component name="FileEditorManager">
|
||||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300" />
|
||||||
<file pinned="false" current-in-tab="true">
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/danielcortes/xyz/controllers/InformesController.java">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="347">
|
|
||||||
<caret line="64" lean-forward="true" selection-start-line="64" selection-end-line="64" />
|
|
||||||
<folding>
|
|
||||||
<element signature="method#askForMonth#0;class#InformesController#0" />
|
|
||||||
<element signature="method#askForFile#0;class#InformesController#0" />
|
|
||||||
<element signature="method#showConfirmation#0;class#InformesController#0" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
</leaf>
|
|
||||||
</component>
|
</component>
|
||||||
<component name="FileTemplateManagerImpl">
|
<component name="FileTemplateManagerImpl">
|
||||||
<option name="RECENT_TEMPLATES">
|
<option name="RECENT_TEMPLATES">
|
||||||
@@ -275,20 +252,6 @@
|
|||||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="xyz" type="462c0819:PsiDirectoryNode" />
|
<item name="xyz" type="462c0819:PsiDirectoryNode" />
|
||||||
</path>
|
</path>
|
||||||
<path>
|
|
||||||
<item name="caja" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="caja" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="xyz" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="informes" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
|
||||||
<path>
|
|
||||||
<item name="caja" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="caja" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="xyz" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="utils" type="462c0819:PsiDirectoryNode" />
|
|
||||||
</path>
|
|
||||||
<path>
|
<path>
|
||||||
<item name="caja" type="b2602c69:ProjectViewProjectNode" />
|
<item name="caja" type="b2602c69:ProjectViewProjectNode" />
|
||||||
<item name="caja" type="462c0819:PsiDirectoryNode" />
|
<item name="caja" type="462c0819:PsiDirectoryNode" />
|
||||||
@@ -296,14 +259,6 @@
|
|||||||
<item name="xyz" type="462c0819:PsiDirectoryNode" />
|
<item name="xyz" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="views" type="462c0819:PsiDirectoryNode" />
|
<item name="views" type="462c0819:PsiDirectoryNode" />
|
||||||
</path>
|
</path>
|
||||||
<path>
|
|
||||||
<item name="caja" type="b2602c69:ProjectViewProjectNode" />
|
|
||||||
<item name="caja" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="xyz" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="views" type="462c0819:PsiDirectoryNode" />
|
|
||||||
<item name="MonthSelectDialog" type="e9f4de52:FormNode" />
|
|
||||||
</path>
|
|
||||||
</expand>
|
</expand>
|
||||||
<select />
|
<select />
|
||||||
</subPane>
|
</subPane>
|
||||||
@@ -323,7 +278,7 @@
|
|||||||
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.STATE" value="ToolWindow" />
|
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.STATE" value="ToolWindow" />
|
||||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||||
<property name="aspect.path.notification.shown" value="true" />
|
<property name="aspect.path.notification.shown" value="true" />
|
||||||
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1547581481351" />
|
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1547590220657" />
|
||||||
<property name="com.intellij.ide.scratch.LRUPopupBuilder$1/Change SQL Dialect" value="SQLite" />
|
<property name="com.intellij.ide.scratch.LRUPopupBuilder$1/Change SQL Dialect" value="SQLite" />
|
||||||
<property name="database.console.LAST_STATE" value="false" />
|
<property name="database.console.LAST_STATE" value="false" />
|
||||||
<property name="database.data.extractors.current.id" value="Tab-separated (TSV)_id" />
|
<property name="database.data.extractors.current.id" value="Tab-separated (TSV)_id" />
|
||||||
@@ -550,7 +505,7 @@
|
|||||||
<workItem from="1547341595934" duration="2081000" />
|
<workItem from="1547341595934" duration="2081000" />
|
||||||
<workItem from="1547421210768" duration="453000" />
|
<workItem from="1547421210768" duration="453000" />
|
||||||
<workItem from="1547521814953" duration="798000" />
|
<workItem from="1547521814953" duration="798000" />
|
||||||
<workItem from="1547574832331" duration="1485000" />
|
<workItem from="1547574832331" duration="3751000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="First!! :3 Existe una pequeña base de proyecto por ahora">
|
<task id="LOCAL-00001" summary="First!! :3 Existe una pequeña base de proyecto por ahora">
|
||||||
<created>1545280618093</created>
|
<created>1545280618093</created>
|
||||||
@@ -867,11 +822,18 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1547329170323</updated>
|
<updated>1547329170323</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="46" />
|
<task id="LOCAL-00046" summary="Cambiado el nombre del informe mensual a libro de ventas mensual, ademas se agrego una utilidad para strings que por ahora solo contiene el toUpperCase aunque se ira llenando a medida que se necesite.">
|
||||||
|
<created>1547581544647</created>
|
||||||
|
<option name="number" value="00046" />
|
||||||
|
<option name="presentableId" value="LOCAL-00046" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1547581544647</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="47" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TimeTrackingManager">
|
<component name="TimeTrackingManager">
|
||||||
<option name="totallyTimeSpent" value="302027000" />
|
<option name="totallyTimeSpent" value="304293000" />
|
||||||
</component>
|
</component>
|
||||||
<component name="TodoView">
|
<component name="TodoView">
|
||||||
<todo-panel id="selected-file">
|
<todo-panel id="selected-file">
|
||||||
@@ -884,7 +846,6 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ToolWindowManager">
|
<component name="ToolWindowManager">
|
||||||
<frame x="0" y="-18" width="1366" height="765" extended-state="6" />
|
<frame x="0" y="-18" width="1366" height="765" extended-state="6" />
|
||||||
<editor active="true" />
|
|
||||||
<layout>
|
<layout>
|
||||||
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.49438202" visible="true" weight="0.23211567" />
|
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.49438202" visible="true" weight="0.23211567" />
|
||||||
<window_info id="Image Layers" order="1" />
|
<window_info id="Image Layers" order="1" />
|
||||||
@@ -1012,7 +973,6 @@
|
|||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||||
<option name="CHECK_NEW_TODO" value="false" />
|
<option name="CHECK_NEW_TODO" value="false" />
|
||||||
<MESSAGE value="Creando documentacion basica" />
|
|
||||||
<MESSAGE value="Documentado el controlador de egresos" />
|
<MESSAGE value="Documentado el controlador de egresos" />
|
||||||
<MESSAGE value="Documentado el controlador de ingresos" />
|
<MESSAGE value="Documentado el controlador de ingresos" />
|
||||||
<MESSAGE value="Mas documentacion!! Bendita documentacion <3" />
|
<MESSAGE value="Mas documentacion!! Bendita documentacion <3" />
|
||||||
@@ -1037,7 +997,8 @@
|
|||||||
<MESSAGE value="Corregido error en la generacion del informe, mucho se tuvo que cambiar del mismo para que voliera a funcionar Presentaba errores al intentar conseguir los numeros de las distintos numeros de boleta dado a la query que se estaba realizando, se corrige creando 2 querys separadas y se comprueba que los numeros de boleta sean minimos o maimos en el codigo" />
|
<MESSAGE value="Corregido error en la generacion del informe, mucho se tuvo que cambiar del mismo para que voliera a funcionar Presentaba errores al intentar conseguir los numeros de las distintos numeros de boleta dado a la query que se estaba realizando, se corrige creando 2 querys separadas y se comprueba que los numeros de boleta sean minimos o maimos en el codigo" />
|
||||||
<MESSAGE value="Error en que los numeros de boletas eran comparados segun sus valor ascii y no de forma natural Se agrego una clase de otra persona que hace el trabajo, gracias buen hombre <3" />
|
<MESSAGE value="Error en que los numeros de boletas eran comparados segun sus valor ascii y no de forma natural Se agrego una clase de otra persona que hace el trabajo, gracias buen hombre <3" />
|
||||||
<MESSAGE value="Agregado en documentos el campo de retiros" />
|
<MESSAGE value="Agregado en documentos el campo de retiros" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Agregado en documentos el campo de retiros" />
|
<MESSAGE value="Cambiado el nombre del informe mensual a libro de ventas mensual, ademas se agrego una utilidad para strings que por ahora solo contiene el toUpperCase aunque se ira llenando a medida que se necesite." />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="Cambiado el nombre del informe mensual a libro de ventas mensual, ademas se agrego una utilidad para strings que por ahora solo contiene el toUpperCase aunque se ira llenando a medida que se necesite." />
|
||||||
</component>
|
</component>
|
||||||
<component name="antWorkspaceConfiguration">
|
<component name="antWorkspaceConfiguration">
|
||||||
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
|
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
|
||||||
@@ -1509,11 +1470,9 @@
|
|||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/danielcortes/xyz/controllers/InformesController.java">
|
<entry file="file://$PROJECT_DIR$/src/danielcortes/xyz/controllers/InformesController.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="347">
|
<state relative-caret-position="623">
|
||||||
<caret line="64" lean-forward="true" selection-start-line="64" selection-end-line="64" />
|
<caret line="79" column="50" lean-forward="true" selection-start-line="79" selection-start-column="50" selection-end-line="79" selection-end-column="50" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="method#askForMonth#0;class#InformesController#0" />
|
|
||||||
<element signature="method#askForFile#0;class#InformesController#0" />
|
|
||||||
<element signature="method#showConfirmation#0;class#InformesController#0" />
|
<element signature="method#showConfirmation#0;class#InformesController#0" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
|
|||||||
BIN
dist/caja.jar
vendored
BIN
dist/caja.jar
vendored
Binary file not shown.
@@ -38,7 +38,6 @@ import danielcortes.xyz.models.efectivo.SQLiteEfectivoDAO;
|
|||||||
import danielcortes.xyz.models.egreso.EgresoDAO;
|
import danielcortes.xyz.models.egreso.EgresoDAO;
|
||||||
import danielcortes.xyz.models.egreso.MysqlEgresoDAO;
|
import danielcortes.xyz.models.egreso.MysqlEgresoDAO;
|
||||||
import danielcortes.xyz.models.egreso.SQLiteEgresoDAO;
|
import danielcortes.xyz.models.egreso.SQLiteEgresoDAO;
|
||||||
import danielcortes.xyz.models.informe.SQLiteInformeMensualContentDAO;
|
|
||||||
import danielcortes.xyz.models.ingreso.IngresoDAO;
|
import danielcortes.xyz.models.ingreso.IngresoDAO;
|
||||||
import danielcortes.xyz.models.ingreso.MysqlIngresoDAO;
|
import danielcortes.xyz.models.ingreso.MysqlIngresoDAO;
|
||||||
import danielcortes.xyz.models.ingreso.SQLiteIngresoDAO;
|
import danielcortes.xyz.models.ingreso.SQLiteIngresoDAO;
|
||||||
@@ -50,7 +49,6 @@ import danielcortes.xyz.models.tipo_ingreso.SQLiteTipoIngresoDAO;
|
|||||||
import danielcortes.xyz.models.tipo_ingreso.TipoIngresoDAO;
|
import danielcortes.xyz.models.tipo_ingreso.TipoIngresoDAO;
|
||||||
import danielcortes.xyz.views.ManagerView;
|
import danielcortes.xyz.views.ManagerView;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
package danielcortes.xyz.informes;
|
package danielcortes.xyz.informes;
|
||||||
|
|
||||||
import danielcortes.xyz.models.caja.SQLiteCajaDAO;
|
import danielcortes.xyz.models.caja.SQLiteCajaDAO;
|
||||||
import danielcortes.xyz.models.informe.InformeMensualContent;
|
import danielcortes.xyz.models.informe.InformeLibroDeVentasContent;
|
||||||
import danielcortes.xyz.models.informe.SQLiteInformeMensualContentDAO;
|
import danielcortes.xyz.models.informe.SQLiteInformeLibroDeVentasContentDAO;
|
||||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
@@ -65,7 +65,7 @@ public class InformeLibroDeVentas {
|
|||||||
|
|
||||||
private final String[] dias = {"Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado"};
|
private final String[] dias = {"Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado"};
|
||||||
|
|
||||||
private ArrayList<InformeMensualContent> informe;
|
private ArrayList<InformeLibroDeVentasContent> informe;
|
||||||
private int informeSize;
|
private int informeSize;
|
||||||
private File saveFile;
|
private File saveFile;
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ public class InformeLibroDeVentas {
|
|||||||
public InformeLibroDeVentas(LocalDate date, File saveFile) {
|
public InformeLibroDeVentas(LocalDate date, File saveFile) {
|
||||||
new SQLiteCajaDAO().createCajasForMonth(date);
|
new SQLiteCajaDAO().createCajasForMonth(date);
|
||||||
|
|
||||||
this.informe = new ArrayList<>(new SQLiteInformeMensualContentDAO().getInformeMensual(date));
|
this.informe = new ArrayList<>(new SQLiteInformeLibroDeVentasContentDAO().getInformeMensual(date));
|
||||||
this.informeSize = this.informe.size();
|
this.informeSize = this.informe.size();
|
||||||
this.saveFile = saveFile;
|
this.saveFile = saveFile;
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ public class InformeLibroDeVentas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void sortInforme(){
|
private void sortInforme(){
|
||||||
this.informe.sort(Comparator.comparing(InformeMensualContent::getFecha));
|
this.informe.sort(Comparator.comparing(InformeLibroDeVentasContent::getFecha));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillHeaders() {
|
private void fillHeaders() {
|
||||||
@@ -108,7 +108,7 @@ public class InformeLibroDeVentas {
|
|||||||
private void fillData() {
|
private void fillData() {
|
||||||
int x = 2;
|
int x = 2;
|
||||||
|
|
||||||
for(InformeMensualContent data : this.informe){
|
for(InformeLibroDeVentasContent data : this.informe){
|
||||||
int y = 0;
|
int y = 0;
|
||||||
Row dataRow = sheet.createRow(x);
|
Row dataRow = sheet.createRow(x);
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ package danielcortes.xyz.models.informe;
|
|||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
public class InformeMensualContent {
|
public class InformeLibroDeVentasContent {
|
||||||
private int dia;
|
private int dia;
|
||||||
private LocalDate fecha;
|
private LocalDate fecha;
|
||||||
private String manualesInicial;
|
private String manualesInicial;
|
||||||
@@ -220,7 +220,7 @@ public class InformeMensualContent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "InformeMensualContent{" +
|
return "InformeLibroDeVentasContent{" +
|
||||||
"dia=" + dia +
|
"dia=" + dia +
|
||||||
", fecha=" + fecha +
|
", fecha=" + fecha +
|
||||||
", manualesInicial='" + manualesInicial + '\'' +
|
", manualesInicial='" + manualesInicial + '\'' +
|
||||||
@@ -27,11 +27,11 @@ package danielcortes.xyz.models.informe;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
public abstract class InformeMensualContentDAO {
|
public abstract class InformeLibroDeVentasContentDAO {
|
||||||
/**
|
/**
|
||||||
* Genera el contenido del informe mensual
|
* Genera el contenido del informe mensual
|
||||||
* @param date fecha que esta dentro del mes en el que se necesita el informe
|
* @param date fecha que esta dentro del mes en el que se necesita el informe
|
||||||
* @return Lista con las columnas principales necesarias para el informe
|
* @return Lista con las columnas principales necesarias para el informe
|
||||||
*/
|
*/
|
||||||
public abstract Collection<InformeMensualContent> getInformeMensual(LocalDate date);
|
public abstract Collection<InformeLibroDeVentasContent> getInformeMensual(LocalDate date);
|
||||||
}
|
}
|
||||||
@@ -34,15 +34,15 @@ import java.sql.SQLException;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class SQLiteInformeMensualContentDAO extends InformeMensualContentDAO {
|
public class SQLiteInformeLibroDeVentasContentDAO extends InformeLibroDeVentasContentDAO {
|
||||||
private HashMap<Integer, InformeMensualContent> map;
|
private HashMap<Integer, InformeLibroDeVentasContent> map;
|
||||||
|
|
||||||
public SQLiteInformeMensualContentDAO() {
|
public SQLiteInformeLibroDeVentasContentDAO() {
|
||||||
this.map = new HashMap<>();
|
this.map = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<InformeMensualContent> getInformeMensual(LocalDate date) {
|
public Collection<InformeLibroDeVentasContent> getInformeMensual(LocalDate date) {
|
||||||
try {
|
try {
|
||||||
Connection conn = new SQLiteConnectionHolder().getConnection();
|
Connection conn = new SQLiteConnectionHolder().getConnection();
|
||||||
String queryTotales =
|
String queryTotales =
|
||||||
@@ -96,7 +96,7 @@ public class SQLiteInformeMensualContentDAO extends InformeMensualContentDAO {
|
|||||||
|
|
||||||
private void fillTotalesFromResultSet(ResultSet rs) throws SQLException {
|
private void fillTotalesFromResultSet(ResultSet rs) throws SQLException {
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
InformeMensualContent informe = new InformeMensualContent();
|
InformeLibroDeVentasContent informe = new InformeLibroDeVentasContent();
|
||||||
informe.setDia(rs.getInt("dia"));
|
informe.setDia(rs.getInt("dia"));
|
||||||
informe.setFecha(LocalDate.parse(rs.getString("fecha")));
|
informe.setFecha(LocalDate.parse(rs.getString("fecha")));
|
||||||
informe.setManuales(rs.getInt("manuales"));
|
informe.setManuales(rs.getInt("manuales"));
|
||||||
@@ -113,7 +113,7 @@ public class SQLiteInformeMensualContentDAO extends InformeMensualContentDAO {
|
|||||||
private void fillBoletasFromResultSet(ResultSet rs) throws SQLException {
|
private void fillBoletasFromResultSet(ResultSet rs) throws SQLException {
|
||||||
Comparator<String> comparator = new NaturalOrderComparator();
|
Comparator<String> comparator = new NaturalOrderComparator();
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
InformeMensualContent informe = map.get(rs.getInt("caja"));
|
InformeLibroDeVentasContent informe = map.get(rs.getInt("caja"));
|
||||||
int tipoIngreso = rs.getInt("tipo_ingreso");
|
int tipoIngreso = rs.getInt("tipo_ingreso");
|
||||||
switch (tipoIngreso) {
|
switch (tipoIngreso) {
|
||||||
case 1:
|
case 1:
|
||||||
Reference in New Issue
Block a user