- DASHBOARD - AGREGAR TABLA "Detalle de avance del día por asesor"
- VENTAS - POR AUTORIZAR - AL APROBAR PASAR DIRECTAMENTE AL ESTATUS DE 'AUTORIZADA' - ADMINISTRACIÓN - CAJA CHICA - CORTE DÍA - AJUSTAR PARA QUE TOME EN CUENTA LOS MOVIMIENTOS A PARTIR DEL ÚLTIMO CORTE
This commit is contained in:
parent
ecf4937bb6
commit
63cf262e38
@ -73,11 +73,13 @@
|
|||||||
<mapping class="com.arrebol.apc.model.views.LoanToDeliveryByCertifierView"/>
|
<mapping class="com.arrebol.apc.model.views.LoanToDeliveryByCertifierView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.ExchangeEnebledUsersView"/>
|
<mapping class="com.arrebol.apc.model.views.ExchangeEnebledUsersView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.TotalCashByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.TotalCashByCurdateView"/>
|
||||||
|
<mapping class="com.arrebol.apc.model.views.TotalCashByLastClosingDayView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.PersonSearchHistoricalDetailsView"/>
|
<mapping class="com.arrebol.apc.model.views.PersonSearchHistoricalDetailsView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.TotalClosingDayByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.TotalClosingDayByCurdateView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.TotalLoansByOfficeView"/>
|
<mapping class="com.arrebol.apc.model.views.TotalLoansByOfficeView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.PaymentDetailFromUserByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.PaymentDetailFromUserByCurdateView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView"/>
|
||||||
|
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByLastClosingDayView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.LoanApprovedDetailView"/>
|
<mapping class="com.arrebol.apc.model.views.LoanApprovedDetailView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.GeneralBoxView"/>
|
<mapping class="com.arrebol.apc.model.views.GeneralBoxView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.LoanByUserPaymentZeroView"/>
|
<mapping class="com.arrebol.apc.model.views.LoanByUserPaymentZeroView"/>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Arrebol Consultancy copyright.
|
* Arrebol Consultancy copyright.
|
||||||
*
|
*
|
||||||
* This code belongs to Arrebol Consultancy
|
* This code belongs to Arrebol Consultancy
|
||||||
* its use, redistribution or modification are prohibited
|
* its use, redistribution or modification are prohibited
|
||||||
* without written authorization from Arrebol Consultancy.
|
* without written authorization from Arrebol Consultancy.
|
||||||
*/
|
*/
|
||||||
package com.arrebol.apc.controller.admin;
|
package com.arrebol.apc.controller.admin;
|
||||||
@ -19,11 +19,14 @@ import com.arrebol.apc.model.core.Office;
|
|||||||
import com.arrebol.apc.model.core.User;
|
import com.arrebol.apc.model.core.User;
|
||||||
import com.arrebol.apc.model.enums.ActiveStatus;
|
import com.arrebol.apc.model.enums.ActiveStatus;
|
||||||
import com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView;
|
import com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView;
|
||||||
|
import com.arrebol.apc.model.views.ClosingDailyDetailFromUserByLastClosingDayView;
|
||||||
import com.arrebol.apc.model.views.LoanByUserPaymentZeroView;
|
import com.arrebol.apc.model.views.LoanByUserPaymentZeroView;
|
||||||
import com.arrebol.apc.model.views.TotalCashByCurdateDashboardView;
|
import com.arrebol.apc.model.views.TotalCashByCurdateDashboardView;
|
||||||
import com.arrebol.apc.model.views.TotalCashByCurdateView;
|
import com.arrebol.apc.model.views.TotalCashByCurdateView;
|
||||||
|
import com.arrebol.apc.model.views.TotalCashByLastClosingDayView;
|
||||||
import com.arrebol.apc.model.views.TotalClosingDayByCurdateView;
|
import com.arrebol.apc.model.views.TotalClosingDayByCurdateView;
|
||||||
import com.arrebol.apc.model.views.constance.ClosingDailyDetailFromUserByCurdateCfg;
|
import com.arrebol.apc.model.views.constance.ClosingDailyDetailFromUserByCurdateCfg;
|
||||||
|
import com.arrebol.apc.model.views.constance.ClosingDailyDetailFromUserByLastClosingDayCfg;
|
||||||
import com.arrebol.apc.model.views.constance.LoanByUserPaymentZeroViewCfg;
|
import com.arrebol.apc.model.views.constance.LoanByUserPaymentZeroViewCfg;
|
||||||
import com.arrebol.apc.model.views.constance.TotalLoansByOfficeViewCfg;
|
import com.arrebol.apc.model.views.constance.TotalLoansByOfficeViewCfg;
|
||||||
import com.arrebol.apc.repository.GenericEntityRepository;
|
import com.arrebol.apc.repository.GenericEntityRepository;
|
||||||
@ -42,398 +45,437 @@ import org.hibernate.Transaction;
|
|||||||
*
|
*
|
||||||
* @author Oscar Armando Vargas Cardenas <oscar.vargas@arrebol.com.mx>
|
* @author Oscar Armando Vargas Cardenas <oscar.vargas@arrebol.com.mx>
|
||||||
*/
|
*/
|
||||||
public class ClosingDayController extends ConnectionManager implements Serializable {
|
public class ClosingDayController extends ConnectionManager implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Searching all closing day by office.
|
* Searching all closing day by office.
|
||||||
*
|
*
|
||||||
* @param officeId
|
* @param officeId
|
||||||
* @param startDate
|
* @param startDate
|
||||||
* @param endDate
|
* @param endDate
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<ClosingDay> fillClosingDayDatatable(String officeId, Date startDate, Date endDate) {
|
public List<ClosingDay> fillClosingDayDatatable(String officeId, Date startDate, Date endDate) {
|
||||||
logger.debug("fillClosingDayDatatable");
|
logger.debug("fillClosingDayDatatable");
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
|
||||||
Calendar calendar = Calendar.getInstance();
|
|
||||||
calendar.setTime(startDate);
|
|
||||||
calendar.add(Calendar.DAY_OF_YEAR, 1);
|
|
||||||
startDate = calendar.getTime();
|
|
||||||
|
|
||||||
Calendar calendarF = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
calendarF.setTime(endDate);
|
calendar.setTime(startDate);
|
||||||
calendarF.add(Calendar.DAY_OF_YEAR, 1);
|
calendar.add(Calendar.DAY_OF_YEAR, 1);
|
||||||
endDate = calendarF.getTime();
|
startDate = calendar.getTime();
|
||||||
|
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_OFFICE, new Office(officeId)));
|
|
||||||
//parameters.add(new ModelParameter(ClosingDayCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED));
|
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.PARAM_START_DATE, startDate));
|
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.PARAM_END_DATE, endDate));
|
|
||||||
|
|
||||||
return genericEntityRepository.xmlQueryAPCEntities(ClosingDay.class, ClosingDayCfg.QUERY_FIND_ALL_CLOSING_DAY_BY_OFFICE_BETWEEN_DATES, parameters);
|
Calendar calendarF = Calendar.getInstance();
|
||||||
}
|
calendarF.setTime(endDate);
|
||||||
|
calendarF.add(Calendar.DAY_OF_YEAR, 1);
|
||||||
|
endDate = calendarF.getTime();
|
||||||
|
|
||||||
/**
|
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_OFFICE, new Office(officeId)));
|
||||||
*
|
//parameters.add(new ModelParameter(ClosingDayCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED));
|
||||||
* @param status
|
parameters.add(new ModelParameter(ClosingDayCfg.PARAM_START_DATE, startDate));
|
||||||
* @param closingDayIdToUpdate
|
parameters.add(new ModelParameter(ClosingDayCfg.PARAM_END_DATE, endDate));
|
||||||
* @param lastUpdatedBy
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean updateClosingDayByStatus(ActiveStatus status, String closingDayIdToUpdate, String lastUpdatedBy) {
|
|
||||||
logger.debug("updateClosingDayByStatus");
|
|
||||||
|
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
return genericEntityRepository.xmlQueryAPCEntities(ClosingDay.class, ClosingDayCfg.QUERY_FIND_ALL_CLOSING_DAY_BY_OFFICE_BETWEEN_DATES, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_ACTIVE_STATUS, status));
|
/**
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy));
|
*
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_LAST_UPDATED_ON, new Date()));
|
* @param status
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_ID, closingDayIdToUpdate));
|
* @param closingDayIdToUpdate
|
||||||
|
* @param lastUpdatedBy
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean updateClosingDayByStatus(ActiveStatus status, String closingDayIdToUpdate, String lastUpdatedBy) {
|
||||||
|
logger.debug("updateClosingDayByStatus");
|
||||||
|
|
||||||
return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(ClosingDayCfg.QUERY_UPDATE_CLOSING_DAY_BY_STATUS, parameters);
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_ACTIVE_STATUS, status));
|
||||||
*
|
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy));
|
||||||
* @param closingDay
|
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_LAST_UPDATED_ON, new Date()));
|
||||||
* @return boolean
|
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_ID, closingDayIdToUpdate));
|
||||||
*/
|
|
||||||
public boolean saveClosingDay(ClosingDay closingDay) {
|
|
||||||
logger.debug("saveClosingDay");
|
|
||||||
boolean success = genericEntityRepository.insertAPCEntity(closingDay);
|
|
||||||
|
|
||||||
return success;
|
return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(ClosingDayCfg.QUERY_UPDATE_CLOSING_DAY_BY_STATUS, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Searching TotalCashByCurdateView by id.
|
* @param closingDay
|
||||||
*
|
* @return boolean
|
||||||
* @param id
|
*/
|
||||||
* @return
|
public boolean saveClosingDay(ClosingDay closingDay) {
|
||||||
*/
|
logger.debug("saveClosingDay");
|
||||||
public TotalCashByCurdateView getTotalCashByCurdateViewById(String id) {
|
boolean success = genericEntityRepository.insertAPCEntity(closingDay);
|
||||||
logger.debug("getTotalCashByCurdateViewById");
|
|
||||||
|
|
||||||
return (TotalCashByCurdateView) genericEntityRepository.selectAPCEntityById(TotalCashByCurdateView.class, id);
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Searching all total money day by office.
|
* Searching TotalCashByCurdateView by id.
|
||||||
*
|
*
|
||||||
* @param officeId
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<TotalCashByCurdateView> getAllTotalCashByCurdateView(String officeId) {
|
public TotalCashByCurdateView getTotalCashByCurdateViewById(String id) {
|
||||||
logger.debug("getAllTotalCashByCurdateView");
|
logger.debug("getTotalCashByCurdateViewById");
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
|
||||||
|
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_VIEW_OFFICE, officeId));
|
return (TotalCashByCurdateView) genericEntityRepository.selectAPCEntityById(TotalCashByCurdateView.class, id);
|
||||||
|
}
|
||||||
|
|
||||||
return genericEntityRepository.xmlQueryAPCEntities(TotalCashByCurdateView.class, ClosingDayCfg.QUERY_FIND_TOTAL_BY_OFFICE, parameters);
|
/**
|
||||||
}
|
*
|
||||||
|
* Searching TotalCashByLastClosingDayView by id.
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public TotalCashByLastClosingDayView getTotalCashByLastClosingDayViewById(String id) {
|
||||||
|
logger.debug("getTotalCashByLastClosingDayViewById");
|
||||||
|
return (TotalCashByLastClosingDayView) genericEntityRepository.selectAPCEntityById(TotalCashByLastClosingDayView.class, id);
|
||||||
|
}
|
||||||
|
|
||||||
public List<TotalCashByCurdateDashboardView> getAllTotalCashByCurdateDashboardView(String officeId) {
|
/**
|
||||||
logger.debug("getAllTotalCashByCurdateDashboardView");
|
*
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
* Searching all total money day by office.
|
||||||
|
*
|
||||||
|
* @param officeId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<TotalCashByCurdateView> getAllTotalCashByCurdateView(String officeId) {
|
||||||
|
logger.debug("getAllTotalCashByCurdateView");
|
||||||
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_VIEW_OFFICE, officeId));
|
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_VIEW_OFFICE, officeId));
|
||||||
|
|
||||||
return genericEntityRepository.xmlQueryAPCEntities(TotalCashByCurdateDashboardView.class, ClosingDayCfg.QUERY_FIND_TOTAL_DASHBOARD_BY_OFFICE, parameters);
|
return genericEntityRepository.xmlQueryAPCEntities(TotalCashByCurdateView.class, ClosingDayCfg.QUERY_FIND_TOTAL_BY_OFFICE, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public List<TotalCashByCurdateDashboardView> getAllTotalCashByCurdateDashboardView(String officeId) {
|
||||||
*
|
logger.debug("getAllTotalCashByCurdateDashboardView");
|
||||||
* Searching all TotalClosingDayByCurdateView by curdate.
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
*
|
|
||||||
* @param officeId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<TotalClosingDayByCurdateView> findAllClosingDayByCurdate(String officeId) {
|
|
||||||
logger.debug("findAllClosingDayByCurdate");
|
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
|
||||||
|
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_VIEW_OFFICE, officeId));
|
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_VIEW_OFFICE, officeId));
|
||||||
|
|
||||||
return genericEntityRepository.xmlQueryAPCEntities(TotalClosingDayByCurdateView.class, ClosingDayCfg.QUERY_FIND_ALL_CLOSING_DAY_BY_CURDATE, parameters);
|
return genericEntityRepository.xmlQueryAPCEntities(TotalCashByCurdateDashboardView.class, ClosingDayCfg.QUERY_FIND_TOTAL_DASHBOARD_BY_OFFICE, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Searching all ClosingDailyDetailFromUserByCurdateView by curdate.
|
* Searching all TotalClosingDayByCurdateView by curdate.
|
||||||
*
|
*
|
||||||
* @param userId
|
* @param officeId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<ClosingDailyDetailFromUserByCurdateView> findAllClosingDailyDetailFromUserByCurdateView(String userId) {
|
public List<TotalClosingDayByCurdateView> findAllClosingDayByCurdate(String officeId) {
|
||||||
logger.debug("findAllClosingDailyDetailFromUserByCurdateView");
|
logger.debug("findAllClosingDayByCurdate");
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
|
||||||
parameters.add(new ModelParameter(ClosingDailyDetailFromUserByCurdateCfg.FIELD_VIEW_USER, userId));
|
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_VIEW_OFFICE, officeId));
|
||||||
|
|
||||||
return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByCurdateView.class, ClosingDailyDetailFromUserByCurdateCfg.QUERY_FIND_ALL_DETAILS, parameters);
|
return genericEntityRepository.xmlQueryAPCEntities(TotalClosingDayByCurdateView.class, ClosingDayCfg.QUERY_FIND_ALL_CLOSING_DAY_BY_CURDATE, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Searching all ClosingDailyDetailFromUserByCurdateView by curdate.
|
* Searching all ClosingDailyDetailFromUserByCurdateView by curdate.
|
||||||
*
|
*
|
||||||
* @param userId
|
* @param userId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<ClosingDailyDetailFromUserByCurdateView> findAllClosingDailyDetailFromUserCertifierByCurdateView(String userId) {
|
public List<ClosingDailyDetailFromUserByCurdateView> findAllClosingDailyDetailFromUserByCurdateView(String userId) {
|
||||||
logger.debug("findAllClosingDailyDetailFromUserCertifierByCurdateView");
|
logger.debug("findAllClosingDailyDetailFromUserByCurdateView");
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
|
||||||
parameters.add(new ModelParameter(ClosingDailyDetailFromUserByCurdateCfg.FIELD_VIEW_USER, userId));
|
parameters.add(new ModelParameter(ClosingDailyDetailFromUserByCurdateCfg.FIELD_VIEW_USER, userId));
|
||||||
|
|
||||||
return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByCurdateView.class, ClosingDailyDetailFromUserByCurdateCfg.QUERY_FIND_ALL_DETAILS_CERTIFIER, parameters);
|
return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByCurdateView.class, ClosingDailyDetailFromUserByCurdateCfg.QUERY_FIND_ALL_DETAILS, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Searching the num by closing day
|
* Searching all ClosingDailyDetailFromUserByLastClosingDayView by curdate.
|
||||||
*
|
*
|
||||||
* @param num for closing day
|
* @param userId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Long getClosingDayCurdateByUserId(String userId, String officeid) {
|
public List<ClosingDailyDetailFromUserByLastClosingDayView> findAllClosingDailyDetailFromUserByLastClosingDayView(String userId) {
|
||||||
logger.debug("getClosingDayCurdateByUserId");
|
logger.debug("findAllClosingDailyDetailFromUserByLastClosingDayView");
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
parameters.add(new ModelParameter(ClosingDailyDetailFromUserByLastClosingDayCfg.FIELD_VIEW_USER, userId));
|
||||||
|
return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByLastClosingDayView.class, ClosingDailyDetailFromUserByLastClosingDayCfg.QUERY_FIND_ALL_DETAILS, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_USER, new User(userId)));
|
/**
|
||||||
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_OFFICE, new Office(officeid)));
|
*
|
||||||
|
* Searching all ClosingDailyDetailFromUserByCurdateView by curdate.
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<ClosingDailyDetailFromUserByCurdateView> findAllClosingDailyDetailFromUserCertifierByCurdateView(String userId) {
|
||||||
|
logger.debug("findAllClosingDailyDetailFromUserCertifierByCurdateView");
|
||||||
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
|
||||||
return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, ClosingDayCfg.QUERY_COUNT_CLOSING_DATE_BY_USER_AND_OFFICE, parameters);
|
parameters.add(new ModelParameter(ClosingDailyDetailFromUserByCurdateCfg.FIELD_VIEW_USER, userId));
|
||||||
}
|
|
||||||
|
|
||||||
public Long getLoansCountDailyByUser(String userId) {
|
return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByCurdateView.class, ClosingDailyDetailFromUserByCurdateCfg.QUERY_FIND_ALL_DETAILS_CERTIFIER, parameters);
|
||||||
logger.debug("getLoansCountDailyByUser");
|
}
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
|
||||||
|
|
||||||
parameters.add(new ModelParameter(TotalLoansByOfficeViewCfg.FIELD_VIEW_USER, userId));
|
/**
|
||||||
|
*
|
||||||
|
* Searching all ClosingDailyDetailFromUserByLastClosingDayView by curdate.
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<ClosingDailyDetailFromUserByLastClosingDayView> findAllClosingDailyDetailFromUserCertifierByLastClosingDayView(String userId) {
|
||||||
|
logger.debug("findAllClosingDailyDetailFromUserCertifierByLastClosingDayView");
|
||||||
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
parameters.add(new ModelParameter(ClosingDailyDetailFromUserByLastClosingDayCfg.FIELD_VIEW_USER, userId));
|
||||||
|
return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByLastClosingDayView.class, ClosingDailyDetailFromUserByLastClosingDayCfg.QUERY_FIND_ALL_DETAILS_CERTIFIER, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, TotalLoansByOfficeViewCfg.QUERY_COUNT_ALL_LOANS_BY_USER, parameters);
|
/**
|
||||||
}
|
*
|
||||||
|
* Searching the num by closing day
|
||||||
|
*
|
||||||
|
* @param num for closing day
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getClosingDayCurdateByUserId(String userId, String officeid) {
|
||||||
|
logger.debug("getClosingDayCurdateByUserId");
|
||||||
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
|
||||||
public List<LoanByUserPaymentZeroView> getLoansPaymentZeroByUser(String userId) {
|
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_USER, new User(userId)));
|
||||||
logger.debug("getLoansPaymentZeroByUser");
|
parameters.add(new ModelParameter(ClosingDayCfg.FIELD_OFFICE, new Office(officeid)));
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
|
||||||
|
|
||||||
parameters.add(new ModelParameter(LoanByUserPaymentZeroViewCfg.FIELD_VIEW_USER, new User(userId)));
|
return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, ClosingDayCfg.QUERY_COUNT_CLOSING_DATE_BY_USER_AND_OFFICE, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
return genericEntityRepository.xmlQueryAPCEntities(LoanByUserPaymentZeroView.class, LoanByUserPaymentZeroViewCfg.QUERY_FIND_ALL_LOANS_PAYMENT_ZERO_BY_USER, parameters);
|
public Long getLoansCountDailyByUser(String userId) {
|
||||||
}
|
logger.debug("getLoansCountDailyByUser");
|
||||||
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
parameters.add(new ModelParameter(TotalLoansByOfficeViewCfg.FIELD_VIEW_USER, userId));
|
||||||
*
|
|
||||||
* @param details
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public boolean saveClosingDayDetail(List<ClosingDayDetail> details) {
|
|
||||||
logger.debug("saveClosingDayDetail");
|
|
||||||
boolean success = genericEntityRepository.insertManyAPCEntity(details);
|
|
||||||
|
|
||||||
return success;
|
return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, TotalLoansByOfficeViewCfg.QUERY_COUNT_ALL_LOANS_BY_USER, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public List<LoanByUserPaymentZeroView> getLoansPaymentZeroByUser(String userId) {
|
||||||
*
|
logger.debug("getLoansPaymentZeroByUser");
|
||||||
* Searching closing day by id.
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
*
|
|
||||||
* @param closingDayId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public ClosingDay getClosingDayById(String closingDayId) {
|
|
||||||
logger.debug("getClosingDayById");
|
|
||||||
|
|
||||||
return (ClosingDay) genericEntityRepository.selectAPCEntityById(ClosingDay.class, closingDayId);
|
parameters.add(new ModelParameter(LoanByUserPaymentZeroViewCfg.FIELD_VIEW_USER, new User(userId)));
|
||||||
}
|
|
||||||
|
|
||||||
public List<ClosingDayDetail> getClosingDayDetailByIdClosingDay(String closingDay) {
|
return genericEntityRepository.xmlQueryAPCEntities(LoanByUserPaymentZeroView.class, LoanByUserPaymentZeroViewCfg.QUERY_FIND_ALL_LOANS_PAYMENT_ZERO_BY_USER, parameters);
|
||||||
logger.debug("getClosingDayDetailByIdClosingDay");
|
}
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
|
||||||
|
|
||||||
parameters.add(new ModelParameter(ClosingDayDetailCfg.FIELD_CLOSING_DAY, new ClosingDay(closingDay)));
|
/**
|
||||||
|
*
|
||||||
|
* @param details
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public boolean saveClosingDayDetail(List<ClosingDayDetail> details) {
|
||||||
|
logger.debug("saveClosingDayDetail");
|
||||||
|
boolean success = genericEntityRepository.insertManyAPCEntity(details);
|
||||||
|
|
||||||
return genericEntityRepository.xmlQueryAPCEntities(ClosingDayDetail.class, ClosingDayDetailCfg.QUERY_FIND_ALL_CLOSING_DAY_DETAIL_BY_ID, parameters);
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
public User getUserById(String userId) {
|
/**
|
||||||
logger.debug("getUserById");
|
*
|
||||||
|
* Searching closing day by id.
|
||||||
|
*
|
||||||
|
* @param closingDayId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ClosingDay getClosingDayById(String closingDayId) {
|
||||||
|
logger.debug("getClosingDayById");
|
||||||
|
|
||||||
return (User) genericEntityRepository.selectAPCEntityById(User.class, userId);
|
return (ClosingDay) genericEntityRepository.selectAPCEntityById(ClosingDay.class, closingDayId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public List<ClosingDayDetail> getClosingDayDetailByIdClosingDay(String closingDay) {
|
||||||
*
|
logger.debug("getClosingDayDetailByIdClosingDay");
|
||||||
* @param date
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean existNextPaidClosingDayByCreatedOn(Date date) {
|
|
||||||
logger.info("existNextPaidClosingDayByCreatedOn");
|
|
||||||
|
|
||||||
String query = "SELECT cd.id "
|
parameters.add(new ModelParameter(ClosingDayDetailCfg.FIELD_CLOSING_DAY, new ClosingDay(closingDay)));
|
||||||
+ "FROM APC_CLOSING_DAY cd "
|
|
||||||
+ "WHERE DATE(cd.created_on) >= DATE_ADD(DATE(:date), INTERVAL 1 DAY) "
|
|
||||||
+ "AND cd.active_status = 'ENEBLED'";
|
|
||||||
|
|
||||||
return genericEntityRepository.existRecordsUsingSQLQueryFindByCreatedOnField(date, query);
|
return genericEntityRepository.xmlQueryAPCEntities(ClosingDayDetail.class, ClosingDayDetailCfg.QUERY_FIND_ALL_CLOSING_DAY_DETAIL_BY_ID, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public User getUserById(String userId) {
|
||||||
*
|
logger.debug("getUserById");
|
||||||
* @param date
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public boolean existStableSmallBoxByCreatedOn(Date date) {
|
|
||||||
logger.info("existStableSmallBoxByCreatedOn");
|
|
||||||
|
|
||||||
String query = "SELECT ssb.id "
|
return (User) genericEntityRepository.selectAPCEntityById(User.class, userId);
|
||||||
+ "FROM APC_STABLE_SMALL_BOX ssb "
|
}
|
||||||
+ "WHERE DATE(ssb.created_on) = DATE(:date) "
|
|
||||||
+ "AND ssb.active_status = 'ENEBLED'";
|
|
||||||
|
|
||||||
return genericEntityRepository.existRecordsUsingSQLQueryFindByCreatedOnField(date, query);
|
/**
|
||||||
}
|
*
|
||||||
|
* @param date
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean existNextPaidClosingDayByCreatedOn(Date date) {
|
||||||
|
logger.info("existNextPaidClosingDayByCreatedOn");
|
||||||
|
|
||||||
/**
|
String query = "SELECT cd.id "
|
||||||
*
|
+ "FROM APC_CLOSING_DAY cd "
|
||||||
* @param userId
|
+ "WHERE DATE(cd.created_on) >= DATE_ADD(DATE(:date), INTERVAL 1 DAY) "
|
||||||
* @return
|
+ "AND cd.active_status = 'ENEBLED'";
|
||||||
*/
|
|
||||||
public List<Object> findDetailsFromClosingDayCurDate(String userId){
|
|
||||||
logger.debug("findDetailsFromClosingDayCurDate");
|
|
||||||
|
|
||||||
List<Object> rows = new ArrayList<>();
|
return genericEntityRepository.existRecordsUsingSQLQueryFindByCreatedOnField(date, query);
|
||||||
Transaction transaction = null;
|
}
|
||||||
|
|
||||||
try {
|
/**
|
||||||
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
|
*
|
||||||
transaction = session.beginTransaction();
|
* @param date
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean existStableSmallBoxByCreatedOn(Date date) {
|
||||||
|
logger.info("existStableSmallBoxByCreatedOn");
|
||||||
|
|
||||||
rows = session.createNativeQuery(queryClosingDayReport).setParameter("userId", userId).getResultList();
|
String query = "SELECT ssb.id "
|
||||||
|
+ "FROM APC_STABLE_SMALL_BOX ssb "
|
||||||
|
+ "WHERE DATE(ssb.created_on) = DATE(:date) "
|
||||||
|
+ "AND ssb.active_status = 'ENEBLED'";
|
||||||
|
|
||||||
transaction.commit();
|
return genericEntityRepository.existRecordsUsingSQLQueryFindByCreatedOnField(date, query);
|
||||||
|
}
|
||||||
} catch (HibernateException e) {
|
|
||||||
logger.error("Driver", e);
|
|
||||||
rollback(transaction);
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("Method findDetailsFromClosingDayCurDate(" + userId + " " + ") ", e);
|
|
||||||
rollback(transaction);
|
|
||||||
}
|
|
||||||
|
|
||||||
return rows;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Object> findDetailsFromClosingDayHisotry(String idClosingDay){
|
|
||||||
logger.debug("findDetailsFromClosingDayCurDate");
|
|
||||||
|
|
||||||
List<Object> rows = new ArrayList<>();
|
/**
|
||||||
Transaction transaction = null;
|
*
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Object> findDetailsFromClosingDayCurDate(String userId) {
|
||||||
|
logger.debug("findDetailsFromClosingDayCurDate");
|
||||||
|
|
||||||
try {
|
List<Object> rows = new ArrayList<>();
|
||||||
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
|
Transaction transaction = null;
|
||||||
transaction = session.beginTransaction();
|
|
||||||
|
|
||||||
rows = session.createNativeQuery(queryClosingDayReportHistory).setParameter("idClosingDay", idClosingDay).getResultList();
|
try {
|
||||||
|
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
|
||||||
|
transaction = session.beginTransaction();
|
||||||
|
|
||||||
transaction.commit();
|
rows = session.createNativeQuery(queryClosingDayReport).setParameter("userId", userId).getResultList();
|
||||||
|
|
||||||
} catch (HibernateException e) {
|
|
||||||
logger.error("Driver", e);
|
|
||||||
rollback(transaction);
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("Method findDetailsFromClosingDayHistory(" + idClosingDay + " " + ") ", e);
|
|
||||||
rollback(transaction);
|
|
||||||
}
|
|
||||||
|
|
||||||
return rows;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Searching people.
|
|
||||||
*
|
|
||||||
* @param peopleId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public People findPeopleById(String peopleId) {
|
|
||||||
logger.debug("findPeopleById");
|
|
||||||
|
|
||||||
return (People) genericEntityRepository.selectAPCEntityById(User.class, peopleId);
|
transaction.commit();
|
||||||
}
|
|
||||||
|
|
||||||
final Logger logger = LogManager.getLogger(ClosingDayController.class);
|
|
||||||
private final GenericEntityRepository genericEntityRepository;
|
|
||||||
|
|
||||||
public ClosingDayController() {
|
} catch (HibernateException e) {
|
||||||
this.genericEntityRepository = new GenericEntityRepository();
|
logger.error("Driver", e);
|
||||||
}
|
rollback(transaction);
|
||||||
|
} catch (Exception e) {
|
||||||
private final String queryClosingDayReport =
|
logger.error("Method findDetailsFromClosingDayCurDate(" + userId + " " + ") ", e);
|
||||||
"SELECT " +
|
rollback(transaction);
|
||||||
"cldd.comments, " +
|
}
|
||||||
"cldd.amount, " +
|
|
||||||
"cldd.type, " +
|
return rows;
|
||||||
"cldd.saldo, " +
|
}
|
||||||
"cldd.created_on, " +
|
|
||||||
"cldd.comisionApertura, " +
|
public List<Object> findDetailsFromClosingDayHisotry(String idClosingDay) {
|
||||||
"cldd.prestamoAnterior, " +
|
logger.debug("findDetailsFromClosingDayCurDate");
|
||||||
"cldd.route, " +
|
|
||||||
"CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS username, " +
|
List<Object> rows = new ArrayList<>();
|
||||||
"(SELECT sum(tc.total_amount_payment) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as total_amount_payment, " +
|
Transaction transaction = null;
|
||||||
"(SELECT sum(tc.total_amount_deposit) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as total_amount_deposit, " +
|
|
||||||
"(SELECT sum(tc.transfer_sender) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_sender, " +
|
try {
|
||||||
"(SELECT sum(tc.transfer_receiver) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_receiver, " +
|
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
|
||||||
"(SELECT sum(tc.money_daily) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as money_daily, " +
|
transaction = session.beginTransaction();
|
||||||
"(SELECT sum(tc.other_expense) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as other_expense, " +
|
|
||||||
"(SELECT sum(tc.delivery) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as delivery, " +
|
rows = session.createNativeQuery(queryClosingDayReportHistory).setParameter("idClosingDay", idClosingDay).getResultList();
|
||||||
"(SELECT sum(tc.transfer_pending) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_pending " +
|
|
||||||
"FROM " +
|
transaction.commit();
|
||||||
" APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW_REPORT cldd " +
|
|
||||||
"INNER JOIN " +
|
} catch (HibernateException e) {
|
||||||
" APC_USER u ON u.id = cldd.id_user " +
|
logger.error("Driver", e);
|
||||||
"INNER JOIN " +
|
rollback(transaction);
|
||||||
" APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource " +
|
} catch (Exception e) {
|
||||||
"WHERE " +
|
logger.error("Method findDetailsFromClosingDayHistory(" + idClosingDay + " " + ") ", e);
|
||||||
" cldd.id_user = :userId " +
|
rollback(transaction);
|
||||||
"ORDER BY " +
|
}
|
||||||
" cldd.created_on ASC";
|
|
||||||
|
return rows;
|
||||||
|
}
|
||||||
private final String queryClosingDayReportHistory =
|
|
||||||
" SELECT " +
|
/**
|
||||||
" cldd.comments, " +
|
*
|
||||||
" cldd.amount, " +
|
* Searching people.
|
||||||
" cldd.type, " +
|
*
|
||||||
" cldd.created_on, " +
|
* @param peopleId
|
||||||
" cd.amount_expected, " +
|
* @return
|
||||||
" cd.amount_paid, " +
|
*/
|
||||||
" CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS username, " +
|
public People findPeopleById(String peopleId) {
|
||||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Abono' AND cld.id_closing_day = :idClosingDay) as total_amount_payment, " +
|
logger.debug("findPeopleById");
|
||||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Depósito' AND cld.id_closing_day = :idClosingDay) as total_amount_deposit, " +
|
|
||||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Transferencia enviada' AND cld.id_closing_day = :idClosingDay) as transfer_sender, " +
|
return (People) genericEntityRepository.selectAPCEntityById(User.class, peopleId);
|
||||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Transferencia recibida' AND cld.id_closing_day = :idClosingDay) as transfer_receiver, " +
|
}
|
||||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Inicio' AND cld.id_closing_day = :idClosingDay) as money_daily, " +
|
|
||||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Gasto' AND cld.id_closing_day = :idClosingDay) as other_expense, " +
|
final Logger logger = LogManager.getLogger(ClosingDayController.class);
|
||||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Entrega de préstamo' AND cld.id_closing_day = :idClosingDay) as delivery, " +
|
private final GenericEntityRepository genericEntityRepository;
|
||||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Multa' AND cld.id_closing_day = :idClosingDay) as total_amount_fee, " +
|
|
||||||
" cldd.dateDetail "+
|
public ClosingDayController() {
|
||||||
" FROM " +
|
this.genericEntityRepository = new GenericEntityRepository();
|
||||||
" APC_CLOSING_DAY_DETAIL cldd " +
|
}
|
||||||
" INNER JOIN " +
|
|
||||||
" APC_CLOSING_DAY cd on cldd.id_closing_day = cd.id" +
|
private final String queryClosingDayReport
|
||||||
" INNER JOIN" +
|
= "SELECT "
|
||||||
" APC_USER u ON u.id = cd.id_user " +
|
+ "cldd.comments, "
|
||||||
" INNER JOIN " +
|
+ "cldd.amount, "
|
||||||
" APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource " +
|
+ "cldd.type, "
|
||||||
" WHERE " +
|
+ "cldd.saldo, "
|
||||||
" cldd.id_closing_day = :idClosingDay" +
|
+ "cldd.created_on, "
|
||||||
" ORDER BY" +
|
+ "cldd.comisionApertura, "
|
||||||
" cldd.created_on ASC; ";
|
+ "cldd.prestamoAnterior, "
|
||||||
|
+ "cldd.route, "
|
||||||
|
+ "CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS username, "
|
||||||
|
+ "(SELECT sum(tc.total_amount_payment) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as total_amount_payment, "
|
||||||
|
+ "(SELECT sum(tc.total_amount_deposit) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as total_amount_deposit, "
|
||||||
|
+ "(SELECT sum(tc.transfer_sender) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_sender, "
|
||||||
|
+ "(SELECT sum(tc.transfer_receiver) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_receiver, "
|
||||||
|
+ "(SELECT sum(tc.money_daily) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as money_daily, "
|
||||||
|
+ "(SELECT sum(tc.other_expense) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as other_expense, "
|
||||||
|
+ "(SELECT sum(tc.delivery) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as delivery, "
|
||||||
|
+ "(SELECT sum(tc.transfer_pending) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_pending "
|
||||||
|
+ "FROM "
|
||||||
|
+ " APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_LAST_CLOSING_VIEW_REPORT cldd "
|
||||||
|
+ "INNER JOIN "
|
||||||
|
+ " APC_USER u ON u.id = cldd.id_user "
|
||||||
|
+ "INNER JOIN "
|
||||||
|
+ " APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource "
|
||||||
|
+ "WHERE "
|
||||||
|
+ " cldd.id_user = :userId "
|
||||||
|
+ "ORDER BY "
|
||||||
|
+ " cldd.created_on ASC";
|
||||||
|
|
||||||
|
private final String queryClosingDayReportHistory
|
||||||
|
= " SELECT "
|
||||||
|
+ " cldd.comments, "
|
||||||
|
+ " cldd.amount, "
|
||||||
|
+ " cldd.type, "
|
||||||
|
+ " cldd.created_on, "
|
||||||
|
+ " cd.amount_expected, "
|
||||||
|
+ " cd.amount_paid, "
|
||||||
|
+ " CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS username, "
|
||||||
|
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Abono' AND cld.id_closing_day = :idClosingDay) as total_amount_payment, "
|
||||||
|
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Depósito' AND cld.id_closing_day = :idClosingDay) as total_amount_deposit, "
|
||||||
|
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Transferencia enviada' AND cld.id_closing_day = :idClosingDay) as transfer_sender, "
|
||||||
|
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Transferencia recibida' AND cld.id_closing_day = :idClosingDay) as transfer_receiver, "
|
||||||
|
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Inicio' AND cld.id_closing_day = :idClosingDay) as money_daily, "
|
||||||
|
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Gasto' AND cld.id_closing_day = :idClosingDay) as other_expense, "
|
||||||
|
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Entrega de préstamo' AND cld.id_closing_day = :idClosingDay) as delivery, "
|
||||||
|
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Multa' AND cld.id_closing_day = :idClosingDay) as total_amount_fee, "
|
||||||
|
+ " cldd.dateDetail "
|
||||||
|
+ " FROM "
|
||||||
|
+ " APC_CLOSING_DAY_DETAIL cldd "
|
||||||
|
+ " INNER JOIN "
|
||||||
|
+ " APC_CLOSING_DAY cd on cldd.id_closing_day = cd.id"
|
||||||
|
+ " INNER JOIN"
|
||||||
|
+ " APC_USER u ON u.id = cd.id_user "
|
||||||
|
+ " INNER JOIN "
|
||||||
|
+ " APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource "
|
||||||
|
+ " WHERE "
|
||||||
|
+ " cldd.id_closing_day = :idClosingDay"
|
||||||
|
+ " ORDER BY"
|
||||||
|
+ " cldd.created_on ASC; ";
|
||||||
}
|
}
|
||||||
|
@ -73,11 +73,13 @@
|
|||||||
<mapping class="com.arrebol.apc.model.views.LoanToDeliveryByCertifierView"/>
|
<mapping class="com.arrebol.apc.model.views.LoanToDeliveryByCertifierView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.ExchangeEnebledUsersView"/>
|
<mapping class="com.arrebol.apc.model.views.ExchangeEnebledUsersView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.TotalCashByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.TotalCashByCurdateView"/>
|
||||||
|
<mapping class="com.arrebol.apc.model.views.TotalCashByLastClosingDayView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.PersonSearchHistoricalDetailsView"/>
|
<mapping class="com.arrebol.apc.model.views.PersonSearchHistoricalDetailsView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.TotalClosingDayByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.TotalClosingDayByCurdateView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.TotalLoansByOfficeView"/>
|
<mapping class="com.arrebol.apc.model.views.TotalLoansByOfficeView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.PaymentDetailFromUserByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.PaymentDetailFromUserByCurdateView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView"/>
|
||||||
|
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByLastClosingDayView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.LoanApprovedDetailView"/>
|
<mapping class="com.arrebol.apc.model.views.LoanApprovedDetailView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.GeneralBoxView"/>
|
<mapping class="com.arrebol.apc.model.views.GeneralBoxView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.LoanByUserPaymentZeroView"/>
|
<mapping class="com.arrebol.apc.model.views.LoanByUserPaymentZeroView"/>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Arrebol Consultancy copyright.
|
* Arrebol Consultancy copyright.
|
||||||
*
|
*
|
||||||
* This code belongs to Arrebol Consultancy
|
* This code belongs to Arrebol Consultancy
|
||||||
* its use, redistribution or modification are prohibited
|
* its use, redistribution or modification are prohibited
|
||||||
* without written authorization from Arrebol Consultancy.
|
* without written authorization from Arrebol Consultancy.
|
||||||
*/
|
*/
|
||||||
package com.arrebol.apc.model.views;
|
package com.arrebol.apc.model.views;
|
||||||
@ -22,167 +22,141 @@ import org.hibernate.annotations.Immutable;
|
|||||||
@Entity
|
@Entity
|
||||||
@Immutable
|
@Immutable
|
||||||
@Table(name = "APC_ADVANCE_USER_DAILY_DETAIL_VIEW")
|
@Table(name = "APC_ADVANCE_USER_DAILY_DETAIL_VIEW")
|
||||||
public class AdvanceUserDailyDetail implements Serializable{
|
public class AdvanceUserDailyDetail implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -4849944622024557288L;
|
private static final long serialVersionUID = -4849944622024557288L;
|
||||||
|
|
||||||
@Id
|
|
||||||
@Column(name = "id", length = 36)
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Column(name = "id_user")
|
|
||||||
private String idUser;
|
|
||||||
|
|
||||||
@Column(name = "customer_name")
|
|
||||||
private String customerName;
|
|
||||||
|
|
||||||
@Column(name = "payment_amount")
|
|
||||||
private String paymentAmount;
|
|
||||||
|
|
||||||
@Column(name = "created_on")
|
|
||||||
private Date createdOn;
|
|
||||||
|
|
||||||
@Column(name = "address_business")
|
|
||||||
private String address;
|
|
||||||
|
|
||||||
@Column(name = "type_ayment")
|
|
||||||
private String typePayment;
|
|
||||||
|
|
||||||
@Column(name = "amount_paid")
|
|
||||||
private String amountPaid;
|
|
||||||
|
|
||||||
@Column(name = "amount_to_pay")
|
|
||||||
private String amountToPay;
|
|
||||||
|
|
||||||
@Column(name = "last_reference_number")
|
|
||||||
private String lastReference;
|
|
||||||
|
|
||||||
@Column(name = "loan_status")
|
|
||||||
private String loanStatus;
|
|
||||||
|
|
||||||
@Column(name = "num_fee")
|
|
||||||
private String numFee;
|
|
||||||
|
|
||||||
@Column(name = "saldo_insoluto")
|
|
||||||
private String saldoInsoluto;
|
|
||||||
|
|
||||||
@Column(name = "amount_loan")
|
|
||||||
private String amountLoan;
|
|
||||||
|
|
||||||
|
|
||||||
public String getId() {
|
@Id
|
||||||
return id;
|
@Column(name = "id", length = 36)
|
||||||
}
|
private String id;
|
||||||
|
|
||||||
public void setId(String id) {
|
@Column(name = "id_user")
|
||||||
this.id = id;
|
private String idUser;
|
||||||
}
|
|
||||||
|
|
||||||
public String getIdUser() {
|
@Column(name = "customer_name")
|
||||||
return idUser;
|
private String customerName;
|
||||||
}
|
|
||||||
|
|
||||||
public void setIdUser(String idUser) {
|
@Column(name = "payment_amount")
|
||||||
this.idUser = idUser;
|
private String paymentAmount;
|
||||||
}
|
|
||||||
|
|
||||||
public String getCustomerName() {
|
@Column(name = "created_on")
|
||||||
return customerName;
|
private Date createdOn;
|
||||||
}
|
|
||||||
|
|
||||||
public void setCustomerName(String customerName) {
|
@Column(name = "address_business")
|
||||||
this.customerName = customerName;
|
private String address;
|
||||||
}
|
|
||||||
|
|
||||||
public String getPaymentAmount() {
|
@Column(name = "type_ayment")
|
||||||
return paymentAmount;
|
private String typePayment;
|
||||||
}
|
|
||||||
|
|
||||||
public void setPaymentAmount(String paymentAmount) {
|
@Column(name = "amount_paid")
|
||||||
this.paymentAmount = paymentAmount;
|
private String amountPaid;
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreatedOn() {
|
@Column(name = "amount_to_pay")
|
||||||
return createdOn;
|
private String amountToPay;
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreatedOn(Date createdOn) {
|
@Column(name = "last_reference_number")
|
||||||
this.createdOn = createdOn;
|
private String lastReference;
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddress() {
|
@Column(name = "loan_status")
|
||||||
return address;
|
private String loanStatus;
|
||||||
}
|
|
||||||
|
|
||||||
public void setAddress(String address) {
|
@Column(name = "num_fee")
|
||||||
this.address = address;
|
private String numFee;
|
||||||
}
|
|
||||||
|
|
||||||
public String getTypePayment() {
|
public String getId() {
|
||||||
return typePayment;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTypePayment(String typePayment) {
|
public void setId(String id) {
|
||||||
this.typePayment = typePayment;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAmountPaid() {
|
public String getIdUser() {
|
||||||
return amountPaid;
|
return idUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAmountPaid(String amountPaid) {
|
public void setIdUser(String idUser) {
|
||||||
this.amountPaid = amountPaid;
|
this.idUser = idUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAmountToPay() {
|
public String getCustomerName() {
|
||||||
return amountToPay;
|
return customerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAmountToPay(String amountToPay) {
|
public void setCustomerName(String customerName) {
|
||||||
this.amountToPay = amountToPay;
|
this.customerName = customerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLastReference() {
|
public String getPaymentAmount() {
|
||||||
return lastReference;
|
return paymentAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastReference(String lastReference) {
|
public void setPaymentAmount(String paymentAmount) {
|
||||||
this.lastReference = lastReference;
|
this.paymentAmount = paymentAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLoanStatus() {
|
public Date getCreatedOn() {
|
||||||
return loanStatus;
|
return createdOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanStatus(String loanStatus) {
|
public void setCreatedOn(Date createdOn) {
|
||||||
this.loanStatus = loanStatus;
|
this.createdOn = createdOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNumFee() {
|
public String getAddress() {
|
||||||
return numFee;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumFee(String numFee) {
|
public void setAddress(String address) {
|
||||||
this.numFee = numFee;
|
this.address = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSaldoInsoluto() {
|
public String getTypePayment() {
|
||||||
return saldoInsoluto;
|
return typePayment;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSaldoInsoluto(String saldoInsoluto) {
|
public void setTypePayment(String typePayment) {
|
||||||
this.saldoInsoluto = saldoInsoluto;
|
this.typePayment = typePayment;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAmountLoan() {
|
public String getAmountPaid() {
|
||||||
return amountLoan;
|
return amountPaid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAmountPaid(String amountPaid) {
|
||||||
|
this.amountPaid = amountPaid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAmountToPay() {
|
||||||
|
return amountToPay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAmountToPay(String amountToPay) {
|
||||||
|
this.amountToPay = amountToPay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastReference() {
|
||||||
|
return lastReference;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastReference(String lastReference) {
|
||||||
|
this.lastReference = lastReference;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLoanStatus() {
|
||||||
|
return loanStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLoanStatus(String loanStatus) {
|
||||||
|
this.loanStatus = loanStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumFee() {
|
||||||
|
return numFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumFee(String numFee) {
|
||||||
|
this.numFee = numFee;
|
||||||
|
}
|
||||||
|
|
||||||
public void setAmountLoan(String amountLoan) {
|
|
||||||
this.amountLoan = amountLoan;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Arrebol Consultancy copyright.
|
* Arrebol Consultancy copyright.
|
||||||
*
|
*
|
||||||
* This code belongs to Arrebol Consultancy
|
* This code belongs to Arrebol Consultancy
|
||||||
* its use, redistribution or modification are prohibited
|
* its use, redistribution or modification are prohibited
|
||||||
* without written authorization from Arrebol Consultancy.
|
* without written authorization from Arrebol Consultancy.
|
||||||
*/
|
*/
|
||||||
package com.arrebol.apc.model.views;
|
package com.arrebol.apc.model.views;
|
||||||
@ -23,112 +23,112 @@ import org.hibernate.annotations.Immutable;
|
|||||||
@Entity
|
@Entity
|
||||||
@Immutable
|
@Immutable
|
||||||
@Table(name = "APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW")
|
@Table(name = "APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW")
|
||||||
public class ClosingDailyDetailFromUserByCurdateView implements Serializable{
|
public class ClosingDailyDetailFromUserByCurdateView implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -4593609182109393813L;
|
private static final long serialVersionUID = -4593609182109393813L;
|
||||||
|
|
||||||
@Id
|
|
||||||
@Column(name = "id", length = 36)
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Column(name = "comments")
|
|
||||||
private String comments;
|
|
||||||
|
|
||||||
@Column(name = "amount")
|
|
||||||
private BigDecimal amount;
|
|
||||||
|
|
||||||
@Column(name = "type")
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
@Column(name = "created_on")
|
|
||||||
private Date createdOn;
|
|
||||||
|
|
||||||
@Column(name = "id_user")
|
|
||||||
private String idUser;
|
|
||||||
|
|
||||||
@Column(name = "route")
|
|
||||||
private String route;
|
|
||||||
|
|
||||||
@Column(name = "fechaFiltro")
|
|
||||||
private Date fechaFiltro;
|
|
||||||
|
|
||||||
@Column(name = "saldo")
|
|
||||||
private BigDecimal saldo;
|
|
||||||
|
|
||||||
public ClosingDailyDetailFromUserByCurdateView(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getId() {
|
@Id
|
||||||
return id;
|
@Column(name = "id", length = 36)
|
||||||
}
|
private String id;
|
||||||
|
|
||||||
public void setId(String id) {
|
@Column(name = "comments")
|
||||||
this.id = id;
|
private String comments;
|
||||||
}
|
|
||||||
|
|
||||||
public String getComments() {
|
@Column(name = "amount")
|
||||||
return comments;
|
private BigDecimal amount;
|
||||||
}
|
|
||||||
|
|
||||||
public void setComments(String comments) {
|
@Column(name = "type")
|
||||||
this.comments = comments;
|
private String type;
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getAmount() {
|
@Column(name = "created_on")
|
||||||
return amount;
|
private Date createdOn;
|
||||||
}
|
|
||||||
|
|
||||||
public void setAmount(BigDecimal amount) {
|
@Column(name = "id_user")
|
||||||
this.amount = amount;
|
private String idUser;
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
@Column(name = "route")
|
||||||
return type;
|
private String route;
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type) {
|
@Column(name = "fechaFiltro")
|
||||||
this.type = type;
|
private Date fechaFiltro;
|
||||||
}
|
|
||||||
|
|
||||||
public String getIdUser() {
|
@Column(name = "saldo")
|
||||||
return idUser;
|
private BigDecimal saldo;
|
||||||
}
|
|
||||||
|
|
||||||
public void setIdUser(String idUser) {
|
public ClosingDailyDetailFromUserByCurdateView() {
|
||||||
this.idUser = idUser;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreatedOn() {
|
}
|
||||||
return createdOn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreatedOn(Date createdOn) {
|
public String getId() {
|
||||||
this.createdOn = createdOn;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRoute() {
|
public void setId(String id) {
|
||||||
return route;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRoute(String route) {
|
public String getComments() {
|
||||||
this.route = route;
|
return comments;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getFechaFiltro() {
|
public void setComments(String comments) {
|
||||||
return fechaFiltro;
|
this.comments = comments;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFechaFiltro(Date fechaFiltro) {
|
public BigDecimal getAmount() {
|
||||||
this.fechaFiltro = fechaFiltro;
|
return amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getSaldo() {
|
public void setAmount(BigDecimal amount) {
|
||||||
return saldo;
|
this.amount = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSaldo(BigDecimal saldo) {
|
public String getType() {
|
||||||
this.saldo = saldo;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdUser() {
|
||||||
|
return idUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdUser(String idUser) {
|
||||||
|
this.idUser = idUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreatedOn() {
|
||||||
|
return createdOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedOn(Date createdOn) {
|
||||||
|
this.createdOn = createdOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRoute() {
|
||||||
|
return route;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoute(String route) {
|
||||||
|
this.route = route;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFechaFiltro() {
|
||||||
|
return fechaFiltro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaFiltro(Date fechaFiltro) {
|
||||||
|
this.fechaFiltro = fechaFiltro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getSaldo() {
|
||||||
|
return saldo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSaldo(BigDecimal saldo) {
|
||||||
|
this.saldo = saldo;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,134 @@
|
|||||||
|
/*
|
||||||
|
* Arrebol Consultancy copyright.
|
||||||
|
*
|
||||||
|
* This code belongs to Arrebol Consultancy
|
||||||
|
* its use, redistribution or modification are prohibited
|
||||||
|
* without written authorization from Arrebol Consultancy.
|
||||||
|
*/
|
||||||
|
package com.arrebol.apc.model.views;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import org.hibernate.annotations.Immutable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Oscar Armando Vargas Cardenas <oscar.vargas@arrebol.com.mx>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Immutable
|
||||||
|
@Table(name = "APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_LAST_CLOSING_DAY_VIEW")
|
||||||
|
public class ClosingDailyDetailFromUserByLastClosingDayView implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -4593609182109393813L;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "id", length = 36)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column(name = "comments")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@Column(name = "amount")
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
@Column(name = "type")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Column(name = "created_on")
|
||||||
|
private Date createdOn;
|
||||||
|
|
||||||
|
@Column(name = "id_user")
|
||||||
|
private String idUser;
|
||||||
|
|
||||||
|
@Column(name = "route")
|
||||||
|
private String route;
|
||||||
|
|
||||||
|
@Column(name = "fechaFiltro")
|
||||||
|
private Date fechaFiltro;
|
||||||
|
|
||||||
|
@Column(name = "saldo")
|
||||||
|
private BigDecimal saldo;
|
||||||
|
|
||||||
|
public ClosingDailyDetailFromUserByLastClosingDayView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getComments() {
|
||||||
|
return comments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setComments(String comments) {
|
||||||
|
this.comments = comments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getAmount() {
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAmount(BigDecimal amount) {
|
||||||
|
this.amount = amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdUser() {
|
||||||
|
return idUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdUser(String idUser) {
|
||||||
|
this.idUser = idUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreatedOn() {
|
||||||
|
return createdOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedOn(Date createdOn) {
|
||||||
|
this.createdOn = createdOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRoute() {
|
||||||
|
return route;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoute(String route) {
|
||||||
|
this.route = route;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFechaFiltro() {
|
||||||
|
return fechaFiltro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaFiltro(Date fechaFiltro) {
|
||||||
|
this.fechaFiltro = fechaFiltro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getSaldo() {
|
||||||
|
return saldo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSaldo(BigDecimal saldo) {
|
||||||
|
this.saldo = saldo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Arrebol Consultancy copyright.
|
* Arrebol Consultancy copyright.
|
||||||
*
|
*
|
||||||
* This code belongs to Arrebol Consultancy
|
* This code belongs to Arrebol Consultancy
|
||||||
* its use, redistribution or modification are prohibited
|
* its use, redistribution or modification are prohibited
|
||||||
* without written authorization from Arrebol Consultancy.
|
* without written authorization from Arrebol Consultancy.
|
||||||
*/
|
*/
|
||||||
package com.arrebol.apc.model.views;
|
package com.arrebol.apc.model.views;
|
||||||
@ -25,148 +25,148 @@ import org.hibernate.annotations.Immutable;
|
|||||||
@Table(name = "APC_TOTAL_CASH_BY_CURDATE_VIEW")
|
@Table(name = "APC_TOTAL_CASH_BY_CURDATE_VIEW")
|
||||||
public class TotalCashByCurdateView implements Serializable {
|
public class TotalCashByCurdateView implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 617629469188727880L;
|
private static final long serialVersionUID = 617629469188727880L;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "id", length = 36)
|
@Column(name = "id", length = 36)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Column(name = "id_office")
|
@Column(name = "id_office")
|
||||||
private String idOffice;
|
private String idOffice;
|
||||||
|
|
||||||
@Column(name = "total_amount_payment")
|
@Column(name = "total_amount_payment")
|
||||||
private BigDecimal paymentDaily;
|
private BigDecimal paymentDaily;
|
||||||
|
|
||||||
@Column(name = "total_amount_deposit")
|
|
||||||
private BigDecimal depositDaily;
|
|
||||||
|
|
||||||
@Column(name = "transfer_sender")
|
@Column(name = "total_amount_deposit")
|
||||||
private BigDecimal transferSender;
|
private BigDecimal depositDaily;
|
||||||
|
|
||||||
@Column(name = "transfer_receiver")
|
@Column(name = "transfer_sender")
|
||||||
private BigDecimal transferReceiver;
|
private BigDecimal transferSender;
|
||||||
|
|
||||||
@Column(name = "money_daily")
|
@Column(name = "transfer_receiver")
|
||||||
private BigDecimal moneyDaily;
|
private BigDecimal transferReceiver;
|
||||||
|
|
||||||
@Column(name = "other_expense")
|
@Column(name = "money_daily")
|
||||||
private BigDecimal otherExpense;
|
private BigDecimal moneyDaily;
|
||||||
|
|
||||||
@Column(name = "delivery")
|
@Column(name = "other_expense")
|
||||||
private BigDecimal delivery;
|
private BigDecimal otherExpense;
|
||||||
|
|
||||||
@Column(name = "transfer_pending")
|
@Column(name = "delivery")
|
||||||
private BigDecimal transferPending;
|
private BigDecimal delivery;
|
||||||
|
|
||||||
@Transient
|
@Column(name = "transfer_pending")
|
||||||
private BigDecimal total;
|
private BigDecimal transferPending;
|
||||||
|
|
||||||
public TotalCashByCurdateView() {
|
@Transient
|
||||||
}
|
private BigDecimal total;
|
||||||
|
|
||||||
public String getId() {
|
public TotalCashByCurdateView() {
|
||||||
return id;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(String id) {
|
public String getId() {
|
||||||
this.id = id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getPaymentDaily() {
|
public void setId(String id) {
|
||||||
return paymentDaily;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPaymentDaily(BigDecimal paymentDaily) {
|
public BigDecimal getPaymentDaily() {
|
||||||
this.paymentDaily = paymentDaily;
|
return paymentDaily;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getTransferSender() {
|
public void setPaymentDaily(BigDecimal paymentDaily) {
|
||||||
return transferSender;
|
this.paymentDaily = paymentDaily;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTransferSender(BigDecimal transferSender) {
|
public BigDecimal getTransferSender() {
|
||||||
this.transferSender = transferSender;
|
return transferSender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getTransferReceiver() {
|
public void setTransferSender(BigDecimal transferSender) {
|
||||||
return transferReceiver;
|
this.transferSender = transferSender;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTransferReceiver(BigDecimal transferReceiver) {
|
public BigDecimal getTransferReceiver() {
|
||||||
this.transferReceiver = transferReceiver;
|
return transferReceiver;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getMoneyDaily() {
|
public void setTransferReceiver(BigDecimal transferReceiver) {
|
||||||
return moneyDaily;
|
this.transferReceiver = transferReceiver;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMoneyDaily(BigDecimal moneyDaily) {
|
public BigDecimal getMoneyDaily() {
|
||||||
this.moneyDaily = moneyDaily;
|
return moneyDaily;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getOtherExpense() {
|
public void setMoneyDaily(BigDecimal moneyDaily) {
|
||||||
return otherExpense;
|
this.moneyDaily = moneyDaily;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOtherExpense(BigDecimal otherExpense) {
|
public BigDecimal getOtherExpense() {
|
||||||
this.otherExpense = otherExpense;
|
return otherExpense;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getDelivery() {
|
public void setOtherExpense(BigDecimal otherExpense) {
|
||||||
return delivery;
|
this.otherExpense = otherExpense;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDelivery(BigDecimal delivery) {
|
public BigDecimal getDelivery() {
|
||||||
this.delivery = delivery;
|
return delivery;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getIdOffice() {
|
public void setDelivery(BigDecimal delivery) {
|
||||||
return idOffice;
|
this.delivery = delivery;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIdOffice(String idOffice) {
|
public String getIdOffice() {
|
||||||
this.idOffice = idOffice;
|
return idOffice;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getTransferPending() {
|
public void setIdOffice(String idOffice) {
|
||||||
return transferPending;
|
this.idOffice = idOffice;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTransferPending(BigDecimal transferPending) {
|
public BigDecimal getTransferPending() {
|
||||||
this.transferPending = transferPending;
|
return transferPending;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getDepositDaily() {
|
public void setTransferPending(BigDecimal transferPending) {
|
||||||
return depositDaily;
|
this.transferPending = transferPending;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDepositDaily(BigDecimal depositDaily) {
|
public BigDecimal getDepositDaily() {
|
||||||
this.depositDaily = depositDaily;
|
return depositDaily;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getTotal() {
|
|
||||||
if (null == total) {
|
|
||||||
total = BigDecimal.ZERO;
|
|
||||||
}
|
|
||||||
total = BigDecimal.ZERO;
|
|
||||||
total = total
|
|
||||||
.add(getPaymentDaily())
|
|
||||||
.add(getTransferReceiver())
|
|
||||||
.subtract(getTransferSender())
|
|
||||||
.add(getMoneyDaily())
|
|
||||||
.subtract(getOtherExpense())
|
|
||||||
.subtract(getDelivery());
|
|
||||||
|
|
||||||
return total;
|
public void setDepositDaily(BigDecimal depositDaily) {
|
||||||
}
|
this.depositDaily = depositDaily;
|
||||||
|
}
|
||||||
|
|
||||||
public void setTotal(BigDecimal total) {
|
public BigDecimal getTotal() {
|
||||||
this.total = total;
|
if (null == total) {
|
||||||
}
|
total = BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
total = BigDecimal.ZERO;
|
||||||
|
total = total
|
||||||
|
.add(getPaymentDaily())
|
||||||
|
.add(getTransferReceiver())
|
||||||
|
.subtract(getTransferSender())
|
||||||
|
.add(getMoneyDaily())
|
||||||
|
.subtract(getOtherExpense())
|
||||||
|
.subtract(getDelivery());
|
||||||
|
|
||||||
@Override
|
return total;
|
||||||
public String toString() {
|
}
|
||||||
return "TotalCashByCurdateView{" + "id=" + id + '}';
|
|
||||||
}
|
public void setTotal(BigDecimal total) {
|
||||||
|
this.total = total;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TotalCashByCurdateView{" + "id=" + id + '}';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,172 @@
|
|||||||
|
/*
|
||||||
|
* Arrebol Consultancy copyright.
|
||||||
|
*
|
||||||
|
* This code belongs to Arrebol Consultancy
|
||||||
|
* its use, redistribution or modification are prohibited
|
||||||
|
* without written authorization from Arrebol Consultancy.
|
||||||
|
*/
|
||||||
|
package com.arrebol.apc.model.views;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
import org.hibernate.annotations.Immutable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Carlos Janitzio Zavala Lopez <janitzio.zavala@arrebol.com.mx>
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Immutable
|
||||||
|
@Table(name = "APC_TOTAL_CASH_BY_LAST_CLOSING_DAY_VIEW")
|
||||||
|
public class TotalCashByLastClosingDayView implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 617629469188727880L;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(name = "id", length = 36)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Column(name = "id_office")
|
||||||
|
private String idOffice;
|
||||||
|
|
||||||
|
@Column(name = "total_amount_payment")
|
||||||
|
private BigDecimal paymentDaily;
|
||||||
|
|
||||||
|
@Column(name = "total_amount_deposit")
|
||||||
|
private BigDecimal depositDaily;
|
||||||
|
|
||||||
|
@Column(name = "transfer_sender")
|
||||||
|
private BigDecimal transferSender;
|
||||||
|
|
||||||
|
@Column(name = "transfer_receiver")
|
||||||
|
private BigDecimal transferReceiver;
|
||||||
|
|
||||||
|
@Column(name = "money_daily")
|
||||||
|
private BigDecimal moneyDaily;
|
||||||
|
|
||||||
|
@Column(name = "other_expense")
|
||||||
|
private BigDecimal otherExpense;
|
||||||
|
|
||||||
|
@Column(name = "delivery")
|
||||||
|
private BigDecimal delivery;
|
||||||
|
|
||||||
|
@Column(name = "transfer_pending")
|
||||||
|
private BigDecimal transferPending;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private BigDecimal total;
|
||||||
|
|
||||||
|
public TotalCashByLastClosingDayView() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPaymentDaily() {
|
||||||
|
return paymentDaily;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPaymentDaily(BigDecimal paymentDaily) {
|
||||||
|
this.paymentDaily = paymentDaily;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTransferSender() {
|
||||||
|
return transferSender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransferSender(BigDecimal transferSender) {
|
||||||
|
this.transferSender = transferSender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTransferReceiver() {
|
||||||
|
return transferReceiver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransferReceiver(BigDecimal transferReceiver) {
|
||||||
|
this.transferReceiver = transferReceiver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getMoneyDaily() {
|
||||||
|
return moneyDaily;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMoneyDaily(BigDecimal moneyDaily) {
|
||||||
|
this.moneyDaily = moneyDaily;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getOtherExpense() {
|
||||||
|
return otherExpense;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOtherExpense(BigDecimal otherExpense) {
|
||||||
|
this.otherExpense = otherExpense;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getDelivery() {
|
||||||
|
return delivery;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDelivery(BigDecimal delivery) {
|
||||||
|
this.delivery = delivery;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdOffice() {
|
||||||
|
return idOffice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdOffice(String idOffice) {
|
||||||
|
this.idOffice = idOffice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTransferPending() {
|
||||||
|
return transferPending;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransferPending(BigDecimal transferPending) {
|
||||||
|
this.transferPending = transferPending;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getDepositDaily() {
|
||||||
|
return depositDaily;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepositDaily(BigDecimal depositDaily) {
|
||||||
|
this.depositDaily = depositDaily;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTotal() {
|
||||||
|
if (null == total) {
|
||||||
|
total = BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
total = BigDecimal.ZERO;
|
||||||
|
total = total
|
||||||
|
.add(getPaymentDaily())
|
||||||
|
.add(getTransferReceiver())
|
||||||
|
.subtract(getTransferSender())
|
||||||
|
.add(getMoneyDaily())
|
||||||
|
.subtract(getOtherExpense())
|
||||||
|
.subtract(getDelivery());
|
||||||
|
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotal(BigDecimal total) {
|
||||||
|
this.total = total;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TotalCashByCurdateView{" + "id=" + id + '}';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* Arrebol Consultancy copyright.
|
||||||
|
*
|
||||||
|
* This code belongs to Arrebol Consultancy
|
||||||
|
* its use, redistribution or modification are prohibited
|
||||||
|
* without written authorization from Arrebol Consultancy.
|
||||||
|
*/
|
||||||
|
package com.arrebol.apc.model.views.constance;
|
||||||
|
|
||||||
|
import com.arrebol.apc.model.core.constance.GenericCfg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Oscar Armando Vargas Cardenas <oscar.vargas@arrebol.com.mx>
|
||||||
|
*/
|
||||||
|
public interface ClosingDailyDetailFromUserByLastClosingDayCfg extends GenericCfg {
|
||||||
|
|
||||||
|
String QUERY_FIND_ALL_DETAILS = "findAllClosingDailyDetailFromUserByLastClosingDayView";
|
||||||
|
String QUERY_FIND_ALL_DETAILS_CERTIFIER = "findAllClosingDailyDetailFromUserCertifierByLastClosingDayView";
|
||||||
|
|
||||||
|
String FIELD_VIEW_USER = "idUser";
|
||||||
|
|
||||||
|
}
|
@ -73,11 +73,13 @@
|
|||||||
<mapping class="com.arrebol.apc.model.views.LoanToDeliveryByCertifierView"/>
|
<mapping class="com.arrebol.apc.model.views.LoanToDeliveryByCertifierView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.ExchangeEnebledUsersView"/>
|
<mapping class="com.arrebol.apc.model.views.ExchangeEnebledUsersView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.TotalCashByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.TotalCashByCurdateView"/>
|
||||||
|
<mapping class="com.arrebol.apc.model.views.TotalCashByLastClosingDayView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.PersonSearchHistoricalDetailsView"/>
|
<mapping class="com.arrebol.apc.model.views.PersonSearchHistoricalDetailsView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.TotalClosingDayByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.TotalClosingDayByCurdateView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.TotalLoansByOfficeView"/>
|
<mapping class="com.arrebol.apc.model.views.TotalLoansByOfficeView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.PaymentDetailFromUserByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.PaymentDetailFromUserByCurdateView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView"/>
|
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView"/>
|
||||||
|
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByLastClosingDayView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.LoanApprovedDetailView"/>
|
<mapping class="com.arrebol.apc.model.views.LoanApprovedDetailView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.GeneralBoxView"/>
|
<mapping class="com.arrebol.apc.model.views.GeneralBoxView"/>
|
||||||
<mapping class="com.arrebol.apc.model.views.LoanByUserPaymentZeroView"/>
|
<mapping class="com.arrebol.apc.model.views.LoanByUserPaymentZeroView"/>
|
||||||
@ -185,6 +187,7 @@
|
|||||||
<mapping resource="com/arrebol/apc/model/queries/view/total.closing.day.by.curdate.view.hbm.xml"/>
|
<mapping resource="com/arrebol/apc/model/queries/view/total.closing.day.by.curdate.view.hbm.xml"/>
|
||||||
<mapping resource="com/arrebol/apc/model/queries/view/payment.detail.from.user.by.curdate.view.hbm.xml"/>
|
<mapping resource="com/arrebol/apc/model/queries/view/payment.detail.from.user.by.curdate.view.hbm.xml"/>
|
||||||
<mapping resource="com/arrebol/apc/model/queries/view/total.closing.daily.detail.from.user.by.curdate.view.hbm.xml"/>
|
<mapping resource="com/arrebol/apc/model/queries/view/total.closing.daily.detail.from.user.by.curdate.view.hbm.xml"/>
|
||||||
|
<mapping resource="com/arrebol/apc/model/queries/view/total.closing.daily.detail.from.user.by.last.closing.day.view.hbm.xml"/>
|
||||||
<mapping resource="com/arrebol/apc/model/queries/view/general.box.view.hbm.xml"/>
|
<mapping resource="com/arrebol/apc/model/queries/view/general.box.view.hbm.xml"/>
|
||||||
<mapping resource="com/arrebol/apc/model/queries/view/loan.by.user.payment.zero.view.hbm.xml"/>
|
<mapping resource="com/arrebol/apc/model/queries/view/loan.by.user.payment.zero.view.hbm.xml"/>
|
||||||
<mapping resource="com/arrebol/apc/model/queries/view/advance.user.daily.view.hbm.xml"/>
|
<mapping resource="com/arrebol/apc/model/queries/view/advance.user.daily.view.hbm.xml"/>
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||||
|
"https://hibernate.org/dtd/hibernate-mapping-3.0.dtd">
|
||||||
|
<hibernate-mapping>
|
||||||
|
|
||||||
|
<query name="findAllClosingDailyDetailFromUserByLastClosingDayView">
|
||||||
|
<![CDATA[
|
||||||
|
SELECT
|
||||||
|
t
|
||||||
|
FROM ClosingDailyDetailFromUserByLastClosingDayView t
|
||||||
|
WHERE idUser = :idUser
|
||||||
|
ORDER BY fechaFiltro ASC
|
||||||
|
]]>
|
||||||
|
</query>
|
||||||
|
|
||||||
|
<query name="findAllClosingDailyDetailFromUserCertifierByLastClosingDayView">
|
||||||
|
<![CDATA[
|
||||||
|
SELECT
|
||||||
|
t
|
||||||
|
FROM ClosingDailyDetailFromUserByLastClosingDayView t
|
||||||
|
WHERE idUser = :idUser
|
||||||
|
ORDER BY route ASC
|
||||||
|
]]>
|
||||||
|
</query>
|
||||||
|
|
||||||
|
</hibernate-mapping>
|
File diff suppressed because it is too large
Load Diff
@ -70,13 +70,13 @@ public class LoanPendingBean extends GenericBean implements Serializable, Datata
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void approvedLoan() {
|
public void approvedLoan() {
|
||||||
loanCtrl.updateLoanByStatus(LoanStatus.TO_DELIVERY, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
loanCtrl.updateLoanByStatus(LoanStatus.APPROVED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
loanCtrl.updateLoanByUserByStatus(LoanStatus.TO_DELIVERY, selectedLoan);
|
loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, selectedLoan);
|
||||||
loan.remove(selectedLoan);
|
loan.remove(selectedLoan);
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "la venta se cambió a estatus 'A conciliar' de forma correcta.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "la venta se cambió a estatus 'Aprobado' de forma correcta.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -166,6 +166,86 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="ui-g-12">
|
||||||
|
<div class="card">
|
||||||
|
<h4>Detalle de avance del día por asesor</h4>
|
||||||
|
<p:panelGrid columns="2" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
||||||
|
|
||||||
|
<h:panelGroup id="userPnlGrp" styleClass="md-inputfield">
|
||||||
|
<p:selectOneMenu style="width:100%"
|
||||||
|
filter="true"
|
||||||
|
filterMatchMode="contains"
|
||||||
|
value="#{dashboardManager.userId}"
|
||||||
|
id="user"
|
||||||
|
>
|
||||||
|
<f:selectItem itemLabel="Selecciona un usuario.." itemValue="" />
|
||||||
|
<f:selectItems value="#{dashboardManager.users}" var="user" itemLabel="#{user.humanResource.firstName} #{user.humanResource.lastName}" itemValue="#{user.id}" />
|
||||||
|
</p:selectOneMenu>
|
||||||
|
<p:message for="user" display="text"/>
|
||||||
|
</h:panelGroup>
|
||||||
|
<h:panelGroup styleClass="md-inputfield">
|
||||||
|
<p:commandButton value="#{i18n['general.search']}"
|
||||||
|
update="dtAdvancesDetail"
|
||||||
|
action="#{dashboardManager.getAdvanceDetailsByUser()}">
|
||||||
|
</p:commandButton>
|
||||||
|
</h:panelGroup>
|
||||||
|
</p:panelGrid>
|
||||||
|
<p:dataTable widgetVar="dtAdvancesDetail" id="dtAdvancesDetail" var="advancesDetail" draggableRows="true" draggableColumns="true" value="#{dashboardManager.advancesDetail}" style="margin-bottom:20px" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="#{i18n['admin.transfers.datatable.empty']}"
|
||||||
|
rowKey="#{advancesDetail.id}" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
||||||
|
|
||||||
|
<f:facet name="header">
|
||||||
|
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
||||||
|
<p:columnToggler datasource="dtAdvancesDetail" trigger="toggler" />
|
||||||
|
<div style="float:right;padding-top: 5px;padding-left: 5px;padding-right: 5px">
|
||||||
|
<h:commandLink title="Exportar a Excel">
|
||||||
|
<p:graphicImage name="images/excel-xls-icon.png" library="serenity-layout" width="48"/>
|
||||||
|
<p:dataExporter type="xls" target="dtAdvancesDetail" fileName="AvancePorUsuario" />
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
<p:outputPanel>
|
||||||
|
<h:outputText value="#{i18n['general.search']}: " />
|
||||||
|
<p:inputText id="globalFilter" onkeyup="PF('dtAdvancesDetail').filter()" style="width:150px;color: #000000;"/>
|
||||||
|
</p:outputPanel>
|
||||||
|
</f:facet>
|
||||||
|
|
||||||
|
<p:column headerText="Cliente" sortBy="#{advancesDetail.customerName}" filterBy="#{advancesDetail.customerName}">
|
||||||
|
<h:outputText value="#{advancesDetail.customerName}" />
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Domicilio" sortBy="#{advancesDetail.address}" filterBy="#{advancesDetail.address}">
|
||||||
|
<h:outputText value="#{advancesDetail.address}" />
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Cobro" sortBy="#{advancesDetail.paymentAmount}" filterBy="#{advancesDetail.paymentAmount}">
|
||||||
|
<h:outputText value="#{advancesDetail.paymentAmount}" />
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Tipo" sortBy="#{advancesDetail.typePayment}" filterBy="#{advancesDetail.typePayment}">
|
||||||
|
<h:outputText value="#{advancesDetail.typePayment}" />
|
||||||
|
</p:column>
|
||||||
|
<p:column visible="false" headerText="Cantidad Pagada" sortBy="#{advancesDetail.amountPaid}" filterBy="#{advancesDetail.amountPaid}">
|
||||||
|
<h:outputText value="#{advancesDetail.amountPaid}" />
|
||||||
|
</p:column >
|
||||||
|
<p:column visible="false" headerText="Cantidad a Pagar" sortBy="#{advancesDetail.amountToPay}" filterBy="#{advancesDetail.amountToPay}">
|
||||||
|
<h:outputText value="#{advancesDetail.amountToPay}" />
|
||||||
|
</p:column>
|
||||||
|
<p:column visible="false" headerText="Numero de Accion" sortBy="#{advancesDetail.lastReference}" filterBy="#{advancesDetail.lastReference}">
|
||||||
|
<h:outputText value="#{advancesDetail.lastReference}" />
|
||||||
|
</p:column>
|
||||||
|
<p:column visible="false" headerText="Numero de multas" sortBy="#{advancesDetail.numFee}" filterBy="#{advancesDetail.numFee}">
|
||||||
|
<h:outputText value="#{advancesDetail.numFee}" />
|
||||||
|
</p:column>
|
||||||
|
<p:column visible="false" headerText="Estatus" sortBy="#{advancesDetail.loanStatus}" filterBy="#{advancesDetail.loanStatus}">
|
||||||
|
<h:outputText value="#{advancesDetail.loanStatus}" />
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha" sortBy="#{advancesDetail.createdOn}" filterBy="#{advancesDetail.createdOn}">
|
||||||
|
<h:outputText value="#{advancesDetail.createdOn}">
|
||||||
|
<f:convertDateTime type="date" locale="es" timeZone="GMT-6" pattern="dd - MMMM - yyyy "/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
</p:dataTable>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</h:form>
|
</h:form>
|
||||||
|
|
||||||
<h:form id="loanForm">
|
<h:form id="loanForm">
|
||||||
|
Loading…
Reference in New Issue
Block a user