- APARTADO PARA CAPTURAR EL IDENTIFICADOR DE FOLIOS POR EMPLEADO EN EL REGISTRO

- APARTADO PARA PODER EDITAR EL IDENTIFICADOR DE FOLIOS. 
- ACTUALIZACIÓN DEL WEB SERVIRSE PARA EL MANEJO DE LOS NUEVOS DATOS DE CAPTURA PARA LAS VENTAS "FACHADA DE LA CASA", "DESCRIPCIÓN", "LONGITUD" Y "LATITUD
- CORRECCIÓN DE ERROR AL CAPTURAR LOS PAGOS POR TRANSFERENCIA
- INVENTARIO DE PRODUCTOS SE AGREGARÁ USUARIO QUE HIZO EL MOVIMIENTO Y FECHA. TENDRA UNA EXPORTACION EN EXCEL.
This commit is contained in:
Brayan.Gonzalez 2025-07-28 12:19:25 -06:00
parent c25d8fb371
commit 0d10bf21e2
26 changed files with 3518 additions and 2836 deletions

View File

@ -1,8 +1,8 @@
/*
* Arrebol Consultancy copyright.
*
*
* 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.
*/
package com.arrebol.apc.controller.mobile.controller.login;
@ -24,57 +24,58 @@ import org.apache.logging.log4j.Logger;
*/
public class LoginWSController implements Serializable {
public UserMxy login(String userName, String password) throws Exception {
logger.debug("login");
public UserMxy login(String userName, String password) throws Exception {
logger.debug("login");
UserMxy userMxy;
List<UserPreferenceMxy> preferenceLst;
try {
MobileUser mobileUser = getAuthenticationRepository().findUser(userName, password);
UserMxy userMxy;
List<UserPreferenceMxy> preferenceLst;
try {
MobileUser mobileUser = getAuthenticationRepository().findUser(userName, password);
if (null == mobileUser) {
throw new Exception("Access denied");
} else {
userMxy = new UserMxy(
mobileUser.getId(),
mobileUser.getUserName(),
mobileUser.getAvatar(),
mobileUser.getOfficeId(),
mobileUser.getRouteId(),
mobileUser.getCertifier(),
mobileUser.getManagement().toString()
);
}
if (null == mobileUser) {
throw new Exception("Access denied");
} else {
userMxy = new UserMxy(
mobileUser.getId(),
mobileUser.getUserName(),
mobileUser.getAvatar(),
mobileUser.getOfficeId(),
mobileUser.getRouteId(),
mobileUser.getCertifier(),
mobileUser.getManagement().toString(),
mobileUser.getIdentificadorFolio()
);
}
List<UserMobilePreference> userMobilePreferences = getAuthenticationRepository().findAllMobilePreferenceByUser(userMxy.getId());
List<UserMobilePreference> userMobilePreferences = getAuthenticationRepository().findAllMobilePreferenceByUser(userMxy.getId());
if (!userMobilePreferences.isEmpty()) {
preferenceLst = new ArrayList<>();
if (!userMobilePreferences.isEmpty()) {
preferenceLst = new ArrayList<>();
userMobilePreferences.forEach((preference) -> {
preferenceLst.add(new UserPreferenceMxy(preference.getPreferenceName(), preference.getPreferenceValue()));
});
userMobilePreferences.forEach((preference) -> {
preferenceLst.add(new UserPreferenceMxy(preference.getPreferenceName(), preference.getPreferenceValue()));
});
userMxy.setPreferences(preferenceLst);
}
} catch (Exception e) {
logger.error("login", e);
throw e;
}
return userMxy;
}
userMxy.setPreferences(preferenceLst);
}
} catch (Exception e) {
logger.error("login", e);
throw e;
}
return userMxy;
}
public LoginWSController() {
this.authenticationRepository = new AuthenticationRepository();
}
public LoginWSController() {
this.authenticationRepository = new AuthenticationRepository();
}
public AuthenticationRepository getAuthenticationRepository() {
return authenticationRepository;
}
public AuthenticationRepository getAuthenticationRepository() {
return authenticationRepository;
}
private static final long serialVersionUID = 2795964728722199660L;
final Logger logger = LogManager.getLogger(LoginWSController.class);
private static final long serialVersionUID = 2795964728722199660L;
final Logger logger = LogManager.getLogger(LoginWSController.class);
private final AuthenticationRepository authenticationRepository;
private final AuthenticationRepository authenticationRepository;
}

View File

@ -1,8 +1,8 @@
/*
* Arrebol Consultancy copyright.
*
*
* 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.
*/
package com.arrebol.apc.controller.mobile.moxy.login;
@ -16,106 +16,117 @@ import java.util.List;
*/
public class UserMxy extends PersonMxy {
private String userName;
private String officeId;
private String routeId;
private String certifier;
private String management;
private String userName;
private String officeId;
private String routeId;
private String certifier;
private String management;
private String identificadorFolio;
private List<UserPreferenceMxy> preferences;
private List<UserPreferenceMxy> preferences;
public UserMxy() {
}
public UserMxy() {
}
/**
*
* @param id
* @param userName
* @param thumbnail
* @param officeId
* @param routeId
* @param certifier
*/
public UserMxy(String id, String userName, String thumbnail, String officeId, String routeId, String certifier) {
this.id = id;
this.userName = userName;
this.thumbnail = thumbnail;
this.officeId = officeId;
this.routeId = routeId;
this.certifier = certifier;
}
/**
*
* @param id
* @param userName
* @param thumbnail
* @param officeId
* @param routeId
* @param certifier
*/
public UserMxy(String id, String userName, String thumbnail, String officeId, String routeId, String certifier) {
this.id = id;
this.userName = userName;
this.thumbnail = thumbnail;
this.officeId = officeId;
this.routeId = routeId;
this.certifier = certifier;
}
/**
*
* @param id
* @param userName
* @param thumbnail
* @param officeId
* @param routeId
* @param certifier
* @param management
*/
public UserMxy(String id, String userName, String thumbnail, String officeId, String routeId, String certifier, String management) {
this.id = id;
this.userName = userName;
this.thumbnail = thumbnail;
this.officeId = officeId;
this.routeId = routeId;
this.certifier = certifier;
this.management = management;
}
/**
*
* @param id
* @param userName
* @param thumbnail
* @param officeId
* @param routeId
* @param certifier
* @param management
* @param identificadorFolio
*/
public UserMxy(String id, String userName, String thumbnail, String officeId, String routeId, String certifier, String management, String identificadorFolio) {
this.id = id;
this.userName = userName;
this.thumbnail = thumbnail;
this.officeId = officeId;
this.routeId = routeId;
this.certifier = certifier;
this.management = management;
this.identificadorFolio = identificadorFolio;
}
public String getUserName() {
return userName;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getOfficeId() {
return officeId;
}
public String getOfficeId() {
return officeId;
}
public void setOfficeId(String officeId) {
this.officeId = officeId;
}
public void setOfficeId(String officeId) {
this.officeId = officeId;
}
public void setPreferences(List<UserPreferenceMxy> preferences) {
this.preferences = preferences;
}
public void setPreferences(List<UserPreferenceMxy> preferences) {
this.preferences = preferences;
}
public List<UserPreferenceMxy> getPreferences() {
return preferences;
}
public List<UserPreferenceMxy> getPreferences() {
return preferences;
}
public String getRouteId() {
return routeId;
}
public String getRouteId() {
return routeId;
}
public void setRouteId(String routeId) {
this.routeId = routeId;
}
public void setRouteId(String routeId) {
this.routeId = routeId;
}
public String getCertifier() {
return certifier;
}
public String getCertifier() {
return certifier;
}
public void setCertifier(String certifier) {
this.certifier = certifier;
}
public void setCertifier(String certifier) {
this.certifier = certifier;
}
public String getManagement() {
return management;
}
public String getManagement() {
return management;
}
public void setManagement(String management) {
this.management = management;
}
public void setManagement(String management) {
this.management = management;
}
@Override
public String toString() {
return "UserMxy{" + "userName=" + userName + ", preferences=" + preferences + '}';
}
public String getIdentificadorFolio() {
return identificadorFolio;
}
public void setIdentificadorFolio(String identificadorFolio) {
this.identificadorFolio = identificadorFolio;
}
@Override
public String toString() {
return "UserMxy{" + "userName=" + userName + ", preferences=" + preferences + '}';
}
}

View File

@ -12,9 +12,14 @@ import com.arrebol.apc.model.ModelParameter;
import com.arrebol.apc.model.enums.LoanDetailsType;
import com.arrebol.apc.model.views.LoanApprovedDetailView;
import com.arrebol.apc.model.ws.parsed.LoanDetailJaxb;
import com.arrebol.apc.model.ws.parsed.LoanRequestedJaxb;
import com.arrebol.apc.model.ws.parsed.PersonJaxb;
import java.io.Serializable;
import java.math.BigDecimal;
import java.security.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.Tuple;
import org.apache.logging.log4j.LogManager;
@ -145,7 +150,8 @@ public class LoanApprovedDetailViewRepository extends GenericRepository implemen
tuple.get("fullNameVendedor", String.class),
tuple.get("fullNameCliente", String.class),
tuple.get("numeroCuenta", String.class),
tuple.get("fullNameCrobrador", String.class)
tuple.get("fullNameCrobrador", String.class),
tuple.get("folio", String.class)
);
results.add(detail);
@ -158,6 +164,73 @@ public class LoanApprovedDetailViewRepository extends GenericRepository implemen
}
}
/**
*
* @param xmlQuery
* @param parameters
* @return
* @throws Exception
*/
public LoanRequestedJaxb findLoanById(String xmlQuery, List<ModelParameter> parameters) throws Exception {
logger.debug("Consulta actual recibida: {}", xmlQuery);
logger.debug("findLoanById");
try {
List<Tuple> tuples = xmlQueryTuple(xmlQuery, parameters);
logger.info("Número de resultados: {}", tuples.size());
if (tuples.isEmpty()) {
return null;
}
Tuple tuple = tuples.get(0);
PersonJaxb customer = new PersonJaxb(tuple.get("customerName", String.class));
PersonJaxb endorsement = new PersonJaxb(tuple.get("endorsementName", String.class));
Object dateValue = tuple.get("strDate");
String formattedDate = null;
if (dateValue != null) {
if (dateValue instanceof Timestamp) {
formattedDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
.format((Timestamp) dateValue);
} else if (dateValue instanceof Date) {
formattedDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
.format((Date) dateValue);
} else if (dateValue instanceof String) {
formattedDate = (String) dateValue;
} else {
formattedDate = dateValue.toString();
}
}
String fachadaCasa = tuple.get("fachadaCasa") != null
? tuple.get("fachadaCasa", String.class) : "";
String descripcion = tuple.get("descripcion") != null
? tuple.get("descripcion", String.class) : "";
String latitud = tuple.get("latitud") != null
? tuple.get("latitud", String.class) : "";
String longitud = tuple.get("longitud") != null
? tuple.get("longitud", String.class) : "";
return new LoanRequestedJaxb(
customer,
endorsement,
formattedDate,
fachadaCasa,
descripcion,
latitud,
longitud,
tuple.get("loanDescription", String.class)
);
} catch (Exception e) {
logger.error("findLoanById", e);
throw e;
}
}
/**
*
* @param idLoan

View File

@ -105,6 +105,11 @@ public class EmployeeController implements Serializable {
return humanResourceRepository.updateByHumanResourceId(hr, updateAvatar);
}
public boolean updateHumanResource(HumanResource hr) {
logger.debug("updateHumanResource");
return genericEntityRepository.updateAPCEntity(hr);
}
/**
*
* @param status

View File

@ -115,6 +115,20 @@ public class HumanResource implements Serializable {
@Column(name = "created_by", nullable = false, length = 36)
private String createdBy;
@Column(name = "identificador_folio", nullable = false, length = 36)
private String identificadorFolio;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "ultima_modificacion_folio", length = 19)
private Date ultimaModificacionFolio;
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(
name = "usuario_ultima_modificacion_folio",
referencedColumnName = "id"
)
private User usuarioUltimaModificacionFolio;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "created_on", length = 19)
private Date createdOn;
@ -420,6 +434,30 @@ public class HumanResource implements Serializable {
this.fullName = fullName;
}
public String getIdentificadorFolio() {
return identificadorFolio;
}
public void setIdentificadorFolio(String identificadorFolio) {
this.identificadorFolio = identificadorFolio;
}
public Date getUltimaModificacionFolio() {
return ultimaModificacionFolio;
}
public void setUltimaModificacionFolio(Date ultimaModificacionFolio) {
this.ultimaModificacionFolio = ultimaModificacionFolio;
}
public User getUsuarioUltimaModificacionFolio() {
return usuarioUltimaModificacionFolio;
}
public void setUsuarioUltimaModificacionFolio(User usuarioUltimaModificacionFolio) {
this.usuarioUltimaModificacionFolio = usuarioUltimaModificacionFolio;
}
@Override
public String toString() {
return "HumanResource{" + "firstName=" + firstName + ", secondName=" + secondName + ", lastName=" + lastName + ", middleName=" + middleName + '}';

View File

@ -1,8 +1,8 @@
/*
* Arrebol Consultancy copyright.
*
*
* 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.
*/
package com.arrebol.apc.model.core.constance;
@ -13,51 +13,52 @@ package com.arrebol.apc.model.core.constance;
*/
public interface LoanCfg extends GenericCfg {
String QUERY_UPDATE_LOAN_BY_ID = "updateLoanById";
String QUERY_UPDATE_LOAN_FROM_RENOVATION = "updateLoanFromRenovation";
String QUERY_UPDATE_LOAN_STATUS_WHERE_ID_IN = "updateLoanStatusWhereIdIn";
String QUERY_UPDATE_LOAN_FROM_WEB = "updateLoanFromWeb";
String QUERY_FIND_LOAN_BY_CUSTOMER = "findLoansByCustomer";
String QUERY_FIND_LOAN_JURIDICAL = "findLoansJuridical";
String QUERY_FIND_LOAN_ZERO = "findLoansZero";
String QUERY_FIND_LOAN_FINISHED = "findLoansFinished";
String QUERY_FIND_LOAN_BY_ENDORSEMENT = "findLoansByEndorsement";
String QUERY_UPDATE_LOAN_BY_ID_FROM_CERTIFIER_VIEW = "updateLoanByIdFromCertifiedView";
String QUERY_UPDATE_LOAN_WITH_CREATED_ON_BY_ID_FROM_CERTIFIER_VIEW = "updateLoanWithCreatedOnByIdFromCertifiedView";
String QUERY_UPDATE_AND_FINISH_LOAN_BY_ID = "updateAndFinishLoanById";
String QUERY_UPDATE_DISCOUNT_AND_LOAN_BY_ID_FROM_CERTIFIER_VIEW = "updateDiscountAndLoanByIdFromCertifiedView";
String QUERY_FIND_LOAN_DETAILS_CURDATE_BY_LOAN = "findLoanDetailsPaymentCurdateByLoan";
String QUERY_DELETE_LOAN_DETAILS_CURDATE_BY_LOAN = "deleteLoanDetailsPaymentCurdateByLoan";
String QUERY_SEARCH_PAYMENT_DETAILS = "searchPaymentDetails";
String QUERY_UPDATE_ROUTE_BY_ID = "updateRouteFromLoan";
String QUERY_FIND_LOAN_DETAILS_FEE_CURDATE_BY_LOAN = "findLoanDetailsFeeCurdateByLoan";
String QUERY_DELETE_LOAN_DETAILS_FEE_CURDATE_BY_LOAN = "deleteLoanDetailsFeeCurdateByLoan";
String QUERY_DELETE_LOAN_FEE_NOTIFICATION_CURDATE_BY_LOAN = "deleteLoanFeeNotificationCurdateByLoan";
String QUERY_DELETE_LOAN_FEE_NOTIFICATION_BY_LOAN = "deleteLoanFeeNotificationByLoan";
String QUERY_UPDATE_LOAN_BONUS_NEW_CUSTOMER = "updateBonusNewCustomer";
String QUERY_FIND_LAST_REFERENCE_NUMBER_BY_LOAN = "findLastReferenceNumberByLoan";
String QUERY_COUNT_LOAN_IN_STATUSES = "countLoanInStatuses";
String QUERY_COUNT_LOAN_BY_CUSTOMER_IN_STATUSES = "countLoanByCustomerInStatuses";
String QUERY_SELECT_LOAN_ID_BY_CUSTOMER_IN_STATUSES = "selectLoanIdByCustomerInStatuses";
String QUERY_UPDATE_LOAN_BY_ID = "updateLoanById";
String QUERY_UPDATE_LOAN_FROM_RENOVATION = "updateLoanFromRenovation";
String QUERY_UPDATE_LOAN_STATUS_WHERE_ID_IN = "updateLoanStatusWhereIdIn";
String QUERY_UPDATE_LOAN_FROM_WEB = "updateLoanFromWeb";
String QUERY_FIND_LOAN_BY_ID = "findLoansById";
String QUERY_FIND_LOAN_BY_CUSTOMER = "findLoansByCustomer";
String QUERY_FIND_LOAN_JURIDICAL = "findLoansJuridical";
String QUERY_FIND_LOAN_ZERO = "findLoansZero";
String QUERY_FIND_LOAN_FINISHED = "findLoansFinished";
String QUERY_FIND_LOAN_BY_ENDORSEMENT = "findLoansByEndorsement";
String QUERY_UPDATE_LOAN_BY_ID_FROM_CERTIFIER_VIEW = "updateLoanByIdFromCertifiedView";
String QUERY_UPDATE_LOAN_WITH_CREATED_ON_BY_ID_FROM_CERTIFIER_VIEW = "updateLoanWithCreatedOnByIdFromCertifiedView";
String QUERY_UPDATE_AND_FINISH_LOAN_BY_ID = "updateAndFinishLoanById";
String QUERY_UPDATE_DISCOUNT_AND_LOAN_BY_ID_FROM_CERTIFIER_VIEW = "updateDiscountAndLoanByIdFromCertifiedView";
String QUERY_FIND_LOAN_DETAILS_CURDATE_BY_LOAN = "findLoanDetailsPaymentCurdateByLoan";
String QUERY_DELETE_LOAN_DETAILS_CURDATE_BY_LOAN = "deleteLoanDetailsPaymentCurdateByLoan";
String QUERY_SEARCH_PAYMENT_DETAILS = "searchPaymentDetails";
String QUERY_UPDATE_ROUTE_BY_ID = "updateRouteFromLoan";
String QUERY_FIND_LOAN_DETAILS_FEE_CURDATE_BY_LOAN = "findLoanDetailsFeeCurdateByLoan";
String QUERY_DELETE_LOAN_DETAILS_FEE_CURDATE_BY_LOAN = "deleteLoanDetailsFeeCurdateByLoan";
String QUERY_DELETE_LOAN_FEE_NOTIFICATION_CURDATE_BY_LOAN = "deleteLoanFeeNotificationCurdateByLoan";
String QUERY_DELETE_LOAN_FEE_NOTIFICATION_BY_LOAN = "deleteLoanFeeNotificationByLoan";
String QUERY_UPDATE_LOAN_BONUS_NEW_CUSTOMER = "updateBonusNewCustomer";
String QUERY_FIND_LAST_REFERENCE_NUMBER_BY_LOAN = "findLastReferenceNumberByLoan";
String QUERY_COUNT_LOAN_IN_STATUSES = "countLoanInStatuses";
String QUERY_COUNT_LOAN_BY_CUSTOMER_IN_STATUSES = "countLoanByCustomerInStatuses";
String QUERY_SELECT_LOAN_ID_BY_CUSTOMER_IN_STATUSES = "selectLoanIdByCustomerInStatuses";
String QUERY_FIND_LOAN_BY_STATUS_PENDING = "findLoansByStatusPending";
String QUERY_FIND_ALL_LOANS = "findAllLoans";
String QUERY_FIND_ALL_LOANS_VIEW = "findAllLoansView";
String QUERY_FIND_ALL_LOANS_VIEW_BY_START_AND_END_DATE = "findAllLoansViewByStartAndEndDate";
String QUERY_FIND_ALL_LOANS_JURIDICAL_VIEW_BY_START_AND_END_DATE = "findAllLoansJuridicalViewByStartAndEndDate";
String QUERY_FIND_LOAN_DETAILS_BY_ID = "findLoansDetailById";
String FIELD_AMOUNT_PAID = "amountPaid";
String FIELD_AMOUNT_TO_PAY = "amountToPay";
String FIELD_LAST_REFERENCE_NUMBER = "lastReferenceNumber";
String FIELD_LOAN_STATUS = "loanStatus";
String FIELD_NEW_CUSTOMER = "newCustomer";
String FIELD_CUSTOMER = "customer";
String FIELD_ENDORSEMENT = "endorsement";
String FIELD_CUSTOMER_OFFICE = "customer.office";
String FIELD_DETAILS_LOAN = "loan";
String FIELD_COMMENTS = "comments";
String FIELD_ROUTE = "routeCtlg";
String FIELD_CREATED_ON = "createdOn";
String FIELD_USER = "idUser";
String QUERY_FIND_LOAN_BY_STATUS_PENDING = "findLoansByStatusPending";
String QUERY_FIND_ALL_LOANS = "findAllLoans";
String QUERY_FIND_ALL_LOANS_VIEW = "findAllLoansView";
String QUERY_FIND_ALL_LOANS_VIEW_BY_START_AND_END_DATE = "findAllLoansViewByStartAndEndDate";
String QUERY_FIND_ALL_LOANS_JURIDICAL_VIEW_BY_START_AND_END_DATE = "findAllLoansJuridicalViewByStartAndEndDate";
String QUERY_FIND_LOAN_DETAILS_BY_ID = "findLoansDetailById";
String FIELD_AMOUNT_PAID = "amountPaid";
String FIELD_AMOUNT_TO_PAY = "amountToPay";
String FIELD_LAST_REFERENCE_NUMBER = "lastReferenceNumber";
String FIELD_LOAN_STATUS = "loanStatus";
String FIELD_NEW_CUSTOMER = "newCustomer";
String FIELD_CUSTOMER = "customer";
String FIELD_ENDORSEMENT = "endorsement";
String FIELD_CUSTOMER_OFFICE = "customer.office";
String FIELD_DETAILS_LOAN = "loan";
String FIELD_COMMENTS = "comments";
String FIELD_ROUTE = "routeCtlg";
String FIELD_CREATED_ON = "createdOn";
String FIELD_USER = "idUser";
}

View File

@ -1,8 +1,8 @@
/*
* Arrebol Consultancy copyright.
*
*
* 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.
*/
package com.arrebol.apc.model.core.constance;
@ -13,23 +13,24 @@ package com.arrebol.apc.model.core.constance;
*/
public interface LoanDetailsCfg extends GenericCfg {
String QUERY_FIND_LOAN_DETAILS_BY_LOAN = "findLoanDetailsByLoan";
String QUERY_FIND_LOAN_DETAILS_FROM_TIKET_BY_LOAN = "findLoanDetailsFromTikedByLoan";
String QUERY_FIND_FEES_TO_PAY_BY_LOAN_ID = "findFeesToPayByLoanId";
String QUERY_FIND_ALL_FEES_BY_LOAN_ID = "findAllFeesByLoanId";
String QUERY_UPDATE_PAID_FEES_STATUS_IN_LOAN_DETAILS_IDS = "updatePaidFeesStatusInLoanDetailIds";
String QUERY_COUNT_LOAN_DETAILS_IN_CURRDATE = "countLoanDetailsInCurrdate";
String QUERY_FIND_ALL_TRANSFERS_LOAN_DETAIL = "findAllTransfersLoanDetail";
String UPDATE_AUTHORIZE_LOAN_DETAIL = "updateAuthorizeTransferStatusInLoanDetailIds";
String UPDATE_TRANSFER_STATUS_WHERE_ID_IN = "updateTransferStatusWhereIdIn";
String UPDATE_REJECT_LOAN_DETAIL = "updateRejectTransferStatusInLoanDetailIds";
String COUNT_LOAN_DETAILS_AUTHORIZE = "countLoanDetailsAuthorize";
String QUERY_FIND_LOAN_DETAILS_BY_LOAN = "findLoanDetailsByLoan";
String QUERY_FIND_LOAN_DETAILS_FROM_TIKET_BY_LOAN = "findLoanDetailsFromTikedByLoan";
String QUERY_FIND_LAST_LOAN_BY_USER = "findLatestFolioByUser";
String QUERY_FIND_FEES_TO_PAY_BY_LOAN_ID = "findFeesToPayByLoanId";
String QUERY_FIND_ALL_FEES_BY_LOAN_ID = "findAllFeesByLoanId";
String QUERY_UPDATE_PAID_FEES_STATUS_IN_LOAN_DETAILS_IDS = "updatePaidFeesStatusInLoanDetailIds";
String QUERY_COUNT_LOAN_DETAILS_IN_CURRDATE = "countLoanDetailsInCurrdate";
String QUERY_FIND_ALL_TRANSFERS_LOAN_DETAIL = "findAllTransfersLoanDetail";
String UPDATE_AUTHORIZE_LOAN_DETAIL = "updateAuthorizeTransferStatusInLoanDetailIds";
String UPDATE_TRANSFER_STATUS_WHERE_ID_IN = "updateTransferStatusWhereIdIn";
String UPDATE_REJECT_LOAN_DETAIL = "updateRejectTransferStatusInLoanDetailIds";
String COUNT_LOAN_DETAILS_AUTHORIZE = "countLoanDetailsAuthorize";
String FIELD_ID_LOAN = "loan";
String FIELD_LOAN_DETAILS_TYPE = "loanDetailsType";
String FIELD_FEE_STATUS = "feeStatus";
String FIELD_USER = "user";
String FIELD_COMMENS = "comments";
String FIELD_TRANSFER_STATUS = "transferStatus";
String FIELD_ID_LOAN = "loan";
String FIELD_LOAN_DETAILS_TYPE = "loanDetailsType";
String FIELD_FEE_STATUS = "feeStatus";
String FIELD_USER = "user";
String FIELD_COMMENS = "comments";
String FIELD_TRANSFER_STATUS = "transferStatus";
}

View File

@ -121,6 +121,18 @@ public class Loan implements Serializable {
@Column(name = "frozen")
private ActiveStatus frozen;
@Column(name = "fachada_casa", length = 200)
private String fachadaCasa;
@Column(name = "descripcion", length = 200)
private String descripcion;
@Column(name = "latitud", length = 200)
private String latitud;
@Column(name = "longitud", length = 200)
private String longitud;
@OneToMany(
mappedBy = "loan",
cascade = CascadeType.ALL,
@ -230,6 +242,44 @@ public class Loan implements Serializable {
this.frozen = frozen;
}
/**
*
* @param loanType
* @param customer
* @param endorsement
* @param routeCtlg
* @param loanStatus
* @param amountPaid
* @param amountToPay
* @param lastReferenceNumber
* @param createdBy
* @param createdOn
* @param newCustomer
* @param frozen
* @param fachadaCasa
* @param descripcion
* @param latitud
* @param longitud
*/
public Loan(LoanType loanType, People customer, People endorsement, RouteCtlg routeCtlg, LoanStatus loanStatus, BigDecimal amountPaid, BigDecimal amountToPay, Integer lastReferenceNumber, String createdBy, Date createdOn, ActiveStatus newCustomer, ActiveStatus frozen, String fachadaCasa, String descripcion, String latitud, String longitud) {
this.loanType = loanType;
this.customer = customer;
this.endorsement = endorsement;
this.routeCtlg = routeCtlg;
this.loanStatus = loanStatus;
this.amountPaid = amountPaid;
this.amountToPay = amountToPay;
this.lastReferenceNumber = lastReferenceNumber;
this.createdBy = createdBy;
this.createdOn = createdOn;
this.newCustomer = newCustomer;
this.fachadaCasa = fachadaCasa;
this.frozen = frozen;
this.descripcion = descripcion;
this.latitud = latitud;
this.longitud = longitud;
}
/**
*
* @param id
@ -511,6 +561,38 @@ public class Loan implements Serializable {
this.frozen = frozen;
}
public String getFachadaCasa() {
return fachadaCasa;
}
public void setFachadaCasa(String fachadaCasa) {
this.fachadaCasa = fachadaCasa;
}
public String getDescripcion() {
return descripcion;
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
public String getLatitud() {
return latitud;
}
public void setLatitud(String latitud) {
this.latitud = latitud;
}
public String getLongitud() {
return longitud;
}
public void setLongitud(String longitud) {
this.longitud = longitud;
}
@Override
public String toString() {
return "Loan{" + "loanType=" + loanType + ", createdBy=" + createdBy + '}';

View File

@ -1,8 +1,8 @@
/*
* Arrebol Consultancy copyright.
*
*
* 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.
*/
package com.arrebol.apc.model.loan;
@ -38,308 +38,376 @@ import org.hibernate.annotations.GenericGenerator;
@Entity
@Table(name = "APC_LOAN_DETAIL",
uniqueConstraints = {
@UniqueConstraint(columnNames = {"id", "reference_number"}, name = "apc_loan_details_uk")
@UniqueConstraint(columnNames = {"id", "reference_number"}, name = "apc_loan_details_uk")
})
public class LoanDetails implements Serializable {
private static final long serialVersionUID = -6757564734339598051L;
private static final long serialVersionUID = -6757564734339598051L;
@Id
@GeneratedValue(generator = "uuid")
@GenericGenerator(name = "uuid", strategy = "uuid2")
@Column(name = "id", length = 36)
private String id;
@Id
@GeneratedValue(generator = "uuid")
@GenericGenerator(name = "uuid", strategy = "uuid2")
@Column(name = "id", length = 36)
private String id;
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(
name = "id_loan",
referencedColumnName = "id",
nullable = false
)
private Loan loan;
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(
name = "id_loan",
referencedColumnName = "id",
nullable = false
)
private Loan loan;
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(
name = "id_user",
referencedColumnName = "id",
nullable = false
)
private User user;
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(
name = "id_user",
referencedColumnName = "id",
nullable = false
)
private User user;
@Enumerated(EnumType.STRING)
@Column(name = "people_type", nullable = false)
private PeopleType peopleType;
@Enumerated(EnumType.STRING)
@Column(name = "people_type", nullable = false)
private PeopleType peopleType;
@Column(name = "payment_amount", nullable = false)
private BigDecimal paymentAmount;
@Column(name = "payment_amount", nullable = false)
private BigDecimal paymentAmount;
@Column(name = "reference_number")
private Integer referenceNumber;
@Column(name = "reference_number")
private Integer referenceNumber;
@Enumerated(EnumType.STRING)
@Column(name = "loan_details_type", nullable = false)
private LoanDetailsType loanDetailsType;
@Enumerated(EnumType.STRING)
@Column(name = "loan_details_type", nullable = false)
private LoanDetailsType loanDetailsType;
@Column(name = "loan_comments", length = 150)
private String comments;
@Column(name = "loan_comments", length = 150)
private String comments;
@Enumerated(EnumType.STRING)
@Column(name = "fee_status")
private FeeStatus feeStatus;
@Column(name = "folio", length = 150)
private String folio;
@Enumerated(EnumType.STRING)
@Column(name = "transfer_status")
private TransferStatus transferStatus;
@Enumerated(EnumType.STRING)
@Column(name = "fee_status")
private FeeStatus feeStatus;
@Column(name = "transfer_number", length = 150)
private String transferNumber;
@Enumerated(EnumType.STRING)
@Column(name = "transfer_status")
private TransferStatus transferStatus;
@Column(name = "created_by", nullable = false, length = 36)
private String createdBy;
@Column(name = "transfer_number", length = 150)
private String transferNumber;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "created_on", length = 19)
private Date createdOn;
@Column(name = "created_by", nullable = false, length = 36)
private String createdBy;
@Transient
private BigDecimal saldoInsoluto;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "created_on", length = 19)
private Date createdOn;
public LoanDetails() {
}
@Transient
private BigDecimal saldoInsoluto;
/**
*
* @param id
* @param createdOn
* @param feeStatus
*/
public LoanDetails(String id, Date createdOn, FeeStatus feeStatus) {
this.id = id;
this.createdOn = createdOn;
this.feeStatus = feeStatus;
}
public LoanDetails() {
}
/**
* Complete constructor.
*
* @param id
* @param loan
* @param peopleType
* @param paymentAmount
* @param loanDetailsType
* @param comments
* @param createdBy
* @param createdOn
*/
public LoanDetails(String id, Loan loan, PeopleType peopleType, BigDecimal paymentAmount, LoanDetailsType loanDetailsType, String comments, String createdBy, Date createdOn) {
this.id = id;
this.loan = loan;
this.peopleType = peopleType;
this.paymentAmount = paymentAmount;
this.loanDetailsType = loanDetailsType;
this.comments = comments;
this.createdBy = createdBy;
this.createdOn = createdOn;
}
/**
*
* @param id
* @param createdOn
* @param feeStatus
*/
public LoanDetails(String id, Date createdOn, FeeStatus feeStatus) {
this.id = id;
this.createdOn = createdOn;
this.feeStatus = feeStatus;
}
/**
*
* @param id
* @param loan
* @param user
* @param peopleType
* @param referenceNumber
* @param paymentAmount
* @param loanDetailsType
* @param comments
* @param createdBy
* @param createdOn
*/
public LoanDetails(String id, Loan loan, User user, PeopleType peopleType, Integer referenceNumber, BigDecimal paymentAmount, LoanDetailsType loanDetailsType, String comments, String createdBy, Date createdOn) {
this.id = id;
this.loan = loan;
this.user = user;
this.peopleType = peopleType;
this.referenceNumber = referenceNumber;
this.paymentAmount = paymentAmount;
this.loanDetailsType = loanDetailsType;
this.comments = comments;
this.createdBy = createdBy;
this.createdOn = createdOn;
}
/**
* Complete constructor.
*
* @param id
* @param loan
* @param peopleType
* @param paymentAmount
* @param loanDetailsType
* @param comments
* @param createdBy
* @param createdOn
*/
public LoanDetails(String id, Loan loan, PeopleType peopleType, BigDecimal paymentAmount, LoanDetailsType loanDetailsType, String comments, String createdBy, Date createdOn) {
this.id = id;
this.loan = loan;
this.peopleType = peopleType;
this.paymentAmount = paymentAmount;
this.loanDetailsType = loanDetailsType;
this.comments = comments;
this.createdBy = createdBy;
this.createdOn = createdOn;
}
/**
* Add new amount.
*
* @param loan
* @param user
* @param peopleType
* @param paymentAmount
* @param referenceNumber
* @param loanDetailsType
* @param createdBy
* @param createdOn
* @param comments
*/
public LoanDetails(Loan loan, User user, PeopleType peopleType, BigDecimal paymentAmount, Integer referenceNumber, LoanDetailsType loanDetailsType, String createdBy, Date createdOn, String comments) {
this.loan = loan;
this.user = user;
this.peopleType = peopleType;
this.paymentAmount = paymentAmount;
this.referenceNumber = referenceNumber;
this.loanDetailsType = loanDetailsType;
this.createdBy = createdBy;
this.createdOn = createdOn;
this.comments = comments;
}
/**
*
* @param id
* @param loan
* @param user
* @param peopleType
* @param referenceNumber
* @param paymentAmount
* @param loanDetailsType
* @param comments
* @param createdBy
* @param createdOn
*/
public LoanDetails(String id, Loan loan, User user, PeopleType peopleType, Integer referenceNumber, BigDecimal paymentAmount, LoanDetailsType loanDetailsType, String comments, String createdBy, Date createdOn) {
this.id = id;
this.loan = loan;
this.user = user;
this.peopleType = peopleType;
this.referenceNumber = referenceNumber;
this.paymentAmount = paymentAmount;
this.loanDetailsType = loanDetailsType;
this.comments = comments;
this.createdBy = createdBy;
this.createdOn = createdOn;
}
/**
*
* @param loan
* @param user
* @param peopleType
* @param paymentAmount
* @param referenceNumber
* @param loanDetailsType
* @param createdBy
* @param createdOn
* @param comments
* @param transferNumber
* @param transferStatus
*/
public LoanDetails(Loan loan, User user, PeopleType peopleType, BigDecimal paymentAmount, Integer referenceNumber, LoanDetailsType loanDetailsType, String createdBy, Date createdOn, String comments, String transferNumber, TransferStatus transferStatus) {
this.loan = loan;
this.user = user;
this.peopleType = peopleType;
this.paymentAmount = paymentAmount;
this.referenceNumber = referenceNumber;
this.loanDetailsType = loanDetailsType;
this.createdBy = createdBy;
this.createdOn = createdOn;
this.comments = comments;
this.transferNumber = transferNumber;
this.transferStatus = transferStatus;
}
/**
* Add new amount.
*
* @param loan
* @param user
* @param peopleType
* @param paymentAmount
* @param referenceNumber
* @param loanDetailsType
* @param createdBy
* @param createdOn
* @param comments
*/
public LoanDetails(Loan loan, User user, PeopleType peopleType, BigDecimal paymentAmount, Integer referenceNumber, LoanDetailsType loanDetailsType, String createdBy, Date createdOn, String comments) {
this.loan = loan;
this.user = user;
this.peopleType = peopleType;
this.paymentAmount = paymentAmount;
this.referenceNumber = referenceNumber;
this.loanDetailsType = loanDetailsType;
this.createdBy = createdBy;
this.createdOn = createdOn;
this.comments = comments;
}
public String getId() {
return id;
}
/**
* Add new amount.
*
* @param loan
* @param user
* @param peopleType
* @param paymentAmount
* @param referenceNumber
* @param loanDetailsType
* @param createdBy
* @param createdOn
* @param comments
* @param folio
*/
public LoanDetails(Loan loan, User user, PeopleType peopleType, BigDecimal paymentAmount, Integer referenceNumber, LoanDetailsType loanDetailsType, String createdBy, Date createdOn, String comments, String folio) {
this.loan = loan;
this.user = user;
this.peopleType = peopleType;
this.paymentAmount = paymentAmount;
this.referenceNumber = referenceNumber;
this.loanDetailsType = loanDetailsType;
this.createdBy = createdBy;
this.createdOn = createdOn;
this.comments = comments;
this.folio = folio;
}
public void setId(String id) {
this.id = id;
}
/**
*
* @param loan
* @param user
* @param peopleType
* @param paymentAmount
* @param referenceNumber
* @param loanDetailsType
* @param createdBy
* @param createdOn
* @param comments
* @param transferNumber
* @param transferStatus
*/
public LoanDetails(Loan loan, User user, PeopleType peopleType, BigDecimal paymentAmount, Integer referenceNumber, LoanDetailsType loanDetailsType, String createdBy, Date createdOn, String comments, String transferNumber, TransferStatus transferStatus) {
this.loan = loan;
this.user = user;
this.peopleType = peopleType;
this.paymentAmount = paymentAmount;
this.referenceNumber = referenceNumber;
this.loanDetailsType = loanDetailsType;
this.createdBy = createdBy;
this.createdOn = createdOn;
this.comments = comments;
this.transferNumber = transferNumber;
this.transferStatus = transferStatus;
}
public Loan getLoan() {
return loan;
}
/**
*
* @param loan
* @param user
* @param peopleType
* @param paymentAmount
* @param referenceNumber
* @param loanDetailsType
* @param createdBy
* @param createdOn
* @param comments
* @param transferNumber
* @param transferStatus
* @param folio
*/
public LoanDetails(Loan loan, User user, PeopleType peopleType, BigDecimal paymentAmount, Integer referenceNumber, LoanDetailsType loanDetailsType, String createdBy, Date createdOn, String comments, String transferNumber, TransferStatus transferStatus, String folio) {
this.loan = loan;
this.user = user;
this.peopleType = peopleType;
this.paymentAmount = paymentAmount;
this.referenceNumber = referenceNumber;
this.loanDetailsType = loanDetailsType;
this.createdBy = createdBy;
this.createdOn = createdOn;
this.comments = comments;
this.transferNumber = transferNumber;
this.transferStatus = transferStatus;
this.folio = folio;
}
public void setLoan(Loan loan) {
this.loan = loan;
}
public String getId() {
return id;
}
public PeopleType getPeopleType() {
return peopleType;
}
public void setId(String id) {
this.id = id;
}
public void setPeopleType(PeopleType peopleType) {
this.peopleType = peopleType;
}
public Loan getLoan() {
return loan;
}
public BigDecimal getPaymentAmount() {
return paymentAmount;
}
public void setLoan(Loan loan) {
this.loan = loan;
}
public void setPaymentAmount(BigDecimal paymentAmount) {
this.paymentAmount = paymentAmount;
}
public PeopleType getPeopleType() {
return peopleType;
}
public Integer getReferenceNumber() {
return referenceNumber;
}
public void setPeopleType(PeopleType peopleType) {
this.peopleType = peopleType;
}
public void setReferenceNumber(Integer referenceNumber) {
this.referenceNumber = referenceNumber;
}
public BigDecimal getPaymentAmount() {
return paymentAmount;
}
public LoanDetailsType getLoanDetailsType() {
return loanDetailsType;
}
public void setPaymentAmount(BigDecimal paymentAmount) {
this.paymentAmount = paymentAmount;
}
public void setLoanDetailsType(LoanDetailsType loanDetailsType) {
this.loanDetailsType = loanDetailsType;
}
public Integer getReferenceNumber() {
return referenceNumber;
}
public String getComments() {
return comments;
}
public void setReferenceNumber(Integer referenceNumber) {
this.referenceNumber = referenceNumber;
}
public void setComments(String comments) {
this.comments = comments;
}
public LoanDetailsType getLoanDetailsType() {
return loanDetailsType;
}
public FeeStatus getFeeStatus() {
return feeStatus;
}
public void setLoanDetailsType(LoanDetailsType loanDetailsType) {
this.loanDetailsType = loanDetailsType;
}
public void setFeeStatus(FeeStatus feeStatus) {
this.feeStatus = feeStatus;
}
public String getComments() {
return comments;
}
public TransferStatus getTransferStatus() {
return transferStatus;
}
public void setComments(String comments) {
this.comments = comments;
}
public void setTransferStatus(TransferStatus transferStatus) {
this.transferStatus = transferStatus;
}
public FeeStatus getFeeStatus() {
return feeStatus;
}
public String getTransferNumber() {
return transferNumber;
}
public void setFeeStatus(FeeStatus feeStatus) {
this.feeStatus = feeStatus;
}
public void setTransferNumber(String transferNumber) {
this.transferNumber = transferNumber;
}
public TransferStatus getTransferStatus() {
return transferStatus;
}
public String getCreatedBy() {
return createdBy;
}
public void setTransferStatus(TransferStatus transferStatus) {
this.transferStatus = transferStatus;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getTransferNumber() {
return transferNumber;
}
public Date getCreatedOn() {
return createdOn;
}
public void setTransferNumber(String transferNumber) {
this.transferNumber = transferNumber;
}
public void setCreatedOn(Date createdOn) {
this.createdOn = createdOn;
}
public String getCreatedBy() {
return createdBy;
}
public User getUser() {
return user;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public void setUser(User user) {
this.user = user;
}
public Date getCreatedOn() {
return createdOn;
}
public BigDecimal getSaldoInsoluto() {
return saldoInsoluto;
}
public void setCreatedOn(Date createdOn) {
this.createdOn = createdOn;
}
public void setSaldoInsoluto(BigDecimal saldoInsoluto) {
this.saldoInsoluto = saldoInsoluto;
}
public User getUser() {
return user;
}
public Double getAbonoD() {
return getPaymentAmount().doubleValue();
}
public void setUser(User user) {
this.user = user;
}
@Override
public String toString() {
return "LoanDetails{" + "referenceNumber=" + referenceNumber + ", comments=" + comments + ", createdBy=" + createdBy + '}';
}
public BigDecimal getSaldoInsoluto() {
return saldoInsoluto;
}
public void setSaldoInsoluto(BigDecimal saldoInsoluto) {
this.saldoInsoluto = saldoInsoluto;
}
public Double getAbonoD() {
return getPaymentAmount().doubleValue();
}
public String getFolio() {
return folio;
}
public void setFolio(String folio) {
this.folio = folio;
}
@Override
public String toString() {
return "LoanDetails{" + "referenceNumber=" + referenceNumber + ", comments=" + comments + ", createdBy=" + createdBy + '}';
}
}

View File

@ -8,6 +8,7 @@
package com.arrebol.apc.model.loan;
import com.arrebol.apc.model.core.Office;
import com.arrebol.apc.model.core.User;
import com.arrebol.apc.model.enums.ActiveStatus;
import com.arrebol.apc.model.enums.DaysInWeekend;
import java.io.Serializable;
@ -120,6 +121,16 @@ public class LoanType implements Serializable {
@Column(name = "last_updated_by", length = 36)
private String lastUpdatedBy;
@ManyToOne(fetch = FetchType.LAZY, optional = true)
@JoinColumn(
name = "last_updated_by",
referencedColumnName = "id",
nullable = true,
insertable = false,
updatable = false
)
private User lastUserModified;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "last_updated_on", length = 19)
private Date lastUpdatedOn;
@ -325,6 +336,14 @@ public class LoanType implements Serializable {
this.lastUpdatedBy = lastUpdatedBy;
}
public User getLastUserModified() {
return lastUserModified;
}
public void setLastUserModified(User lastUserModified) {
this.lastUserModified = lastUserModified;
}
public Date getLastUpdatedOn() {
return lastUpdatedOn;
}

View File

@ -1,8 +1,8 @@
/*
* Arrebol Consultancy copyright.
*
*
* 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.
*/
package com.arrebol.apc.model.mobile.access;
@ -26,109 +26,120 @@ import org.hibernate.annotations.Immutable;
@Table(name = "APC_SECURITY_AUTHENTICATION_MOBILE")
public class MobileUser implements Serializable {
private static final long serialVersionUID = -6025180801746858060L;
private static final long serialVersionUID = -6025180801746858060L;
@Id
@Column(name = "id", length = 36)
private String id;
@Id
@Column(name = "id", length = 36)
private String id;
@Column(name = "user_name", length = 36)
private String userName;
@Column(name = "user_name", length = 36)
private String userName;
@Column(name = "pwd", length = 100)
private String password;
@Column(name = "pwd", length = 100)
private String password;
@Column(name = "avatar", length = 150)
private String avatar;
@Column(name = "avatar", length = 150)
private String avatar;
@Column(name = "id_office", length = 36)
private String officeId;
@Column(name = "id_office", length = 36)
private String officeId;
@Column(name = "id_route", length = 36)
private String routeId;
@Column(name = "id_route", length = 36)
private String routeId;
@Column(name = "certifier", length = 25)
private String certifier;
@Column(name = "certifier", length = 25)
private String certifier;
@Enumerated(EnumType.STRING)
@Column(name = "management", nullable = false)
private ActiveStatus management;
@Enumerated(EnumType.STRING)
@Column(name = "management", nullable = false)
private ActiveStatus management;
public MobileUser() {
}
@Column(name = "identificador_folio", length = 25)
private String identificadorFolio;
public MobileUser(String userName, String password) {
this.userName = userName;
this.password = password;
}
public MobileUser() {
}
public String getId() {
return id;
}
public MobileUser(String userName, String password) {
this.userName = userName;
this.password = password;
}
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public String getUserName() {
return userName;
}
public void setId(String id) {
this.id = id;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserName() {
return userName;
}
public String getPassword() {
return password;
}
public void setUserName(String userName) {
this.userName = userName;
}
public void setPassword(String password) {
this.password = password;
}
public String getPassword() {
return password;
}
public String getAvatar() {
return avatar;
}
public void setPassword(String password) {
this.password = password;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getAvatar() {
return avatar;
}
public String getOfficeId() {
return officeId;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public void setOfficeId(String officeId) {
this.officeId = officeId;
}
public String getOfficeId() {
return officeId;
}
public String getRouteId() {
return routeId;
}
public void setOfficeId(String officeId) {
this.officeId = officeId;
}
public void setRouteId(String routeId) {
this.routeId = routeId;
}
public String getRouteId() {
return routeId;
}
public String getCertifier() {
return certifier;
}
public void setRouteId(String routeId) {
this.routeId = routeId;
}
public void setCertifier(String certifier) {
this.certifier = certifier;
}
public String getCertifier() {
return certifier;
}
public ActiveStatus getManagement() {
return management;
}
public void setCertifier(String certifier) {
this.certifier = certifier;
}
public void setManagement(ActiveStatus management) {
this.management = management;
}
public ActiveStatus getManagement() {
return management;
}
@Override
public String toString() {
return "Authentication{" + "userName=" + userName + '}';
}
public void setManagement(ActiveStatus management) {
this.management = management;
}
public String getIdentificadorFolio() {
return identificadorFolio;
}
public void setIdentificadorFolio(String identificadorFolio) {
this.identificadorFolio = identificadorFolio;
}
@Override
public String toString() {
return "Authentication{" + "userName=" + userName + '}';
}
}

View File

@ -28,6 +28,7 @@ public class LoanDetailJaxb {
private String fullNameCliente;
private String numeroCuenta;
private String fullNameCrobrador;
private String folio;
public LoanDetailJaxb() {
}
@ -45,7 +46,7 @@ public class LoanDetailJaxb {
* @param numeroCuenta
* @param fullNameCrobrador
*/
public LoanDetailJaxb(String paymentDate, double paymentOfDay, double toPay, String comment, String paymentType, String fullNameVendedor, String fullNameCliente, String numeroCuenta, String fullNameCrobrador) {
public LoanDetailJaxb(String paymentDate, double paymentOfDay, double toPay, String comment, String paymentType, String fullNameVendedor, String fullNameCliente, String numeroCuenta, String fullNameCrobrador, String folio) {
this.paymentDate = paymentDate;
this.paymentOfDay = paymentOfDay;
this.toPay = toPay;
@ -55,6 +56,7 @@ public class LoanDetailJaxb {
this.fullNameCliente = fullNameCliente;
this.numeroCuenta = numeroCuenta;
this.fullNameCrobrador = fullNameCrobrador;
this.folio = folio;
}
/**
@ -180,6 +182,15 @@ public class LoanDetailJaxb {
this.fullNameCrobrador = fullNameCrobrador;
}
@XmlElement(name = "folio")
public String getFolio() {
return folio;
}
public void setFolio(String folio) {
this.folio = folio;
}
@Override
public String toString() {
return "LoanDetailJaxb{" + "paymentDate=" + paymentDate + ", paymentOfDay=" + paymentOfDay + ", toPay=" + toPay + ", payment=" + payment + '}';

View File

@ -1,8 +1,8 @@
/*
* Arrebol Consultancy copyright.
*
*
* 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.
*/
package com.arrebol.apc.model.ws.parsed;
@ -17,96 +17,157 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "loanRequested")
public class LoanRequestedJaxb {
private String loanTypeId;
private String officeId;
private String userId;
private String routeId;
private PersonJaxb customer;
private PersonJaxb endorsement;
private String strDate;
private String routeIdNewClient;
private String loanTypeId;
private String officeId;
private String userId;
private String routeId;
private PersonJaxb customer;
private PersonJaxb endorsement;
private String strDate;
private String routeIdNewClient;
private String fachadaCasa;
private String descripcion;
private String latitud;
private String longitud;
private String loanDescription;
public LoanRequestedJaxb() {
}
public LoanRequestedJaxb(PersonJaxb customer, PersonJaxb endorsement, String strDate, String fachadaCasa, String descripcion, String latitud, String longitud, String loanDescription) {
this.customer = customer;
this.endorsement = endorsement;
this.strDate = strDate;
this.fachadaCasa = fachadaCasa;
this.descripcion = descripcion;
this.latitud = latitud;
this.longitud = longitud;
this.loanDescription = loanDescription;
}
@XmlElement(name = "loanTypeId")
public String getLoanTypeId() {
return loanTypeId;
}
public LoanRequestedJaxb() {
}
public void setLoanTypeId(String loanTypeId) {
this.loanTypeId = loanTypeId;
}
@XmlElement(name = "loanTypeId")
public String getLoanTypeId() {
return loanTypeId;
}
@XmlElement(name = "officeId")
public String getOfficeId() {
return officeId;
}
public void setLoanTypeId(String loanTypeId) {
this.loanTypeId = loanTypeId;
}
public void setOfficeId(String officeId) {
this.officeId = officeId;
}
@XmlElement(name = "officeId")
public String getOfficeId() {
return officeId;
}
@XmlElement(name = "userId")
public String getUserId() {
return userId;
}
public void setOfficeId(String officeId) {
this.officeId = officeId;
}
public void setUserId(String userId) {
this.userId = userId;
}
@XmlElement(name = "userId")
public String getUserId() {
return userId;
}
@XmlElement(name = "routeId")
public String getRouteId() {
return routeId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public void setRouteId(String routeId) {
this.routeId = routeId;
}
@XmlElement(name = "routeId")
public String getRouteId() {
return routeId;
}
@XmlElement(name = "customer")
public PersonJaxb getCustomer() {
return customer;
}
public void setRouteId(String routeId) {
this.routeId = routeId;
}
public void setCustomer(PersonJaxb customer) {
this.customer = customer;
}
@XmlElement(name = "customer")
public PersonJaxb getCustomer() {
return customer;
}
@XmlElement(name = "endorsement")
public PersonJaxb getEndorsement() {
return endorsement;
}
public void setCustomer(PersonJaxb customer) {
this.customer = customer;
}
public void setEndorsement(PersonJaxb endorsement) {
this.endorsement = endorsement;
}
@XmlElement(name = "endorsement")
public PersonJaxb getEndorsement() {
return endorsement;
}
@XmlElement(name = "strDate")
public String getStrDate() {
return strDate;
}
public void setEndorsement(PersonJaxb endorsement) {
this.endorsement = endorsement;
}
public void setStrDate(String strDate) {
this.strDate = strDate;
}
@XmlElement(name = "strDate")
public String getStrDate() {
return strDate;
}
@XmlElement(name = "routeIdNewClient")
public String getRouteIdNewClient() {
return routeIdNewClient;
}
public void setStrDate(String strDate) {
this.strDate = strDate;
}
public String chooseRouteId() {
try {
return null == getRouteIdNewClient() || "".equals(getRouteIdNewClient()) ? getRouteId() : getRouteIdNewClient();
} catch (Exception e) {
return getRouteId();
}
}
@XmlElement(name = "routeIdNewClient")
public String getRouteIdNewClient() {
return routeIdNewClient;
}
public void setRouteIdNewClient(String routeIdNewClient) {
this.routeIdNewClient = routeIdNewClient;
}
public String chooseRouteId() {
try {
return null == getRouteIdNewClient() || "".equals(getRouteIdNewClient()) ? getRouteId() : getRouteIdNewClient();
} catch (Exception e) {
return getRouteId();
}
}
public void setRouteIdNewClient(String routeIdNewClient) {
this.routeIdNewClient = routeIdNewClient;
}
@XmlElement(name = "fachadaCasa")
public String getFachadaCasa() {
return fachadaCasa;
}
public void setFachadaCasa(String fachadaCasa) {
this.fachadaCasa = fachadaCasa;
}
@XmlElement(name = "descripcion")
public String getDescripcion() {
return descripcion;
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
@XmlElement(name = "latitud")
public String getLatitud() {
return latitud;
}
public void setLatitud(String latitud) {
this.latitud = latitud;
}
@XmlElement(name = "longitud")
public String getLongitud() {
return longitud;
}
public void setLongitud(String longitud) {
this.longitud = longitud;
}
@XmlElement(name = "loanDescription")
public String getLoanDescription() {
return loanDescription;
}
public void setLoanDescription(String loanDescription) {
this.loanDescription = loanDescription;
}
}

View File

@ -1,8 +1,8 @@
/*
* Arrebol Consultancy copyright.
*
*
* 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.
*/
package com.arrebol.apc.model.ws.parsed;
@ -18,101 +18,111 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "newAmount")
public class NewAmountJaxb {
private String loanId;
private String userId;
private String officeId;
private boolean customer;
private BigDecimal amount;
private String strDate;
private boolean fee;
private String comments;
private Boolean manager;
private String loanId;
private String userId;
private String officeId;
private boolean customer;
private BigDecimal amount;
private String strDate;
private boolean fee;
private String comments;
private Boolean manager;
private String folio;
public NewAmountJaxb() {
}
public NewAmountJaxb() {
}
@XmlAttribute(name = "loanId")
public String getLoanId() {
return loanId;
}
@XmlAttribute(name = "loanId")
public String getLoanId() {
return loanId;
}
public void setLoanId(String loanId) {
this.loanId = loanId;
}
public void setLoanId(String loanId) {
this.loanId = loanId;
}
@XmlAttribute(name = "userId")
public String getUserId() {
return userId;
}
@XmlAttribute(name = "userId")
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
@XmlAttribute(name = "officeId")
public String getOfficeId() {
return officeId;
}
@XmlAttribute(name = "officeId")
public String getOfficeId() {
return officeId;
}
public void setOfficeId(String officeId) {
this.officeId = officeId;
}
public void setOfficeId(String officeId) {
this.officeId = officeId;
}
@XmlAttribute(name = "customer")
public boolean isCustomer() {
return customer;
}
@XmlAttribute(name = "customer")
public boolean isCustomer() {
return customer;
}
public void setCustomer(boolean customer) {
this.customer = customer;
}
public void setCustomer(boolean customer) {
this.customer = customer;
}
@XmlAttribute(name = "amount")
public BigDecimal getAmount() {
return amount;
}
@XmlAttribute(name = "amount")
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
@XmlAttribute(name = "strDate")
public String getStrDate() {
return strDate;
}
@XmlAttribute(name = "strDate")
public String getStrDate() {
return strDate;
}
public void setStrDate(String strDate) {
this.strDate = strDate;
}
public void setStrDate(String strDate) {
this.strDate = strDate;
}
@XmlAttribute(name = "fee")
public boolean isFee() {
return fee;
}
@XmlAttribute(name = "fee")
public boolean isFee() {
return fee;
}
public void setFee(boolean fee) {
this.fee = fee;
}
public void setFee(boolean fee) {
this.fee = fee;
}
@XmlAttribute(name = "comments")
public String getComments() {
return comments;
}
@XmlAttribute(name = "comments")
public String getComments() {
return comments;
}
public void setComments(String comments) {
this.comments = comments;
}
public void setComments(String comments) {
this.comments = comments;
}
@XmlAttribute(name = "manager")
public Boolean getManager() {
if (null == manager) {
manager = false;
}
return manager;
}
@XmlAttribute(name = "manager")
public Boolean getManager() {
if (null == manager) {
manager = false;
}
return manager;
}
public void setManager(Boolean manager) {
this.manager = manager;
}
public void setManager(Boolean manager) {
this.manager = manager;
}
@XmlAttribute(name = "folio")
public String getFolio() {
return folio;
}
public void setFolio(String folio) {
this.folio = folio;
}
}

View File

@ -1,8 +1,8 @@
/*
* Arrebol Consultancy copyright.
*
*
* 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.
*/
package com.arrebol.apc.model.ws.parsed;
@ -18,81 +18,90 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "newTransferAccount")
public class NewTransferAccountJaxb {
private String loanId;
private String userId;
private String officeId;
private BigDecimal amount;
private String comments;
private String transferReference;
private Boolean manager;
private String loanId;
private String userId;
private String officeId;
private BigDecimal amount;
private String comments;
private String transferReference;
private Boolean manager;
private String folio;
public NewTransferAccountJaxb() {
}
public NewTransferAccountJaxb() {
}
@XmlAttribute(name = "loanId")
public String getLoanId() {
return loanId;
}
@XmlAttribute(name = "loanId")
public String getLoanId() {
return loanId;
}
public void setLoanId(String loanId) {
this.loanId = loanId;
}
public void setLoanId(String loanId) {
this.loanId = loanId;
}
@XmlAttribute(name = "userId")
public String getUserId() {
return userId;
}
@XmlAttribute(name = "userId")
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
@XmlAttribute(name = "officeId")
public String getOfficeId() {
return officeId;
}
@XmlAttribute(name = "officeId")
public String getOfficeId() {
return officeId;
}
public void setOfficeId(String officeId) {
this.officeId = officeId;
}
public void setOfficeId(String officeId) {
this.officeId = officeId;
}
@XmlAttribute(name = "amount")
public BigDecimal getAmount() {
return amount;
}
@XmlAttribute(name = "amount")
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
@XmlAttribute(name = "comments")
public String getComments() {
return comments;
}
@XmlAttribute(name = "comments")
public String getComments() {
return comments;
}
public void setComments(String comments) {
this.comments = comments;
}
public void setComments(String comments) {
this.comments = comments;
}
@XmlAttribute(name = "transferReference")
public String getTransferReference() {
return transferReference;
}
@XmlAttribute(name = "transferReference")
public String getTransferReference() {
return transferReference;
}
public void setTransferReference(String transferReference) {
this.transferReference = transferReference;
}
public void setTransferReference(String transferReference) {
this.transferReference = transferReference;
}
@XmlAttribute(name = "manager")
public Boolean getManager() {
if (null == manager) {
manager = false;
}
return manager;
}
@XmlAttribute(name = "manager")
public Boolean getManager() {
if (null == manager) {
manager = false;
}
return manager;
}
public void setManager(Boolean manager) {
this.manager = manager;
}
public void setManager(Boolean manager) {
this.manager = manager;
}
@XmlAttribute(name = "folio")
public String getFolio() {
return folio;
}
public void setFolio(String folio) {
this.folio = folio;
}
}

View File

@ -1,8 +1,8 @@
/*
* Arrebol Consultancy copyright.
*
*
* 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.
*/
package com.arrebol.apc.model.ws.parsed;
@ -17,128 +17,132 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "person")
public class PersonJaxb {
private String id;
private String firstName;
private String secondName;
private String lastName;
private String middleName;
private String addressHome;
private String addressWork;
private String phoneHome;
private String phoneWork;
private String thumbnail;
private String companyName;
private boolean createPerson;
private String id;
private String firstName;
private String secondName;
private String lastName;
private String middleName;
private String addressHome;
private String addressWork;
private String phoneHome;
private String phoneWork;
private String thumbnail;
private String companyName;
private boolean createPerson;
public PersonJaxb() {
}
public PersonJaxb(String firstName) {
this.firstName = firstName;
}
@XmlElement(name = "id")
public String getId() {
return id;
}
public PersonJaxb() {
}
public void setId(String id) {
this.id = id;
}
@XmlElement(name = "id")
public String getId() {
return id;
}
@XmlElement(name = "firstName")
public String getFirstName() {
return firstName;
}
public void setId(String id) {
this.id = id;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
@XmlElement(name = "firstName")
public String getFirstName() {
return firstName;
}
@XmlElement(name = "secondName")
public String getSecondName() {
return secondName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public void setSecondName(String secondName) {
this.secondName = secondName;
}
@XmlElement(name = "secondName")
public String getSecondName() {
return secondName;
}
@XmlElement(name = "lastName")
public String getLastName() {
return lastName;
}
public void setSecondName(String secondName) {
this.secondName = secondName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
@XmlElement(name = "lastName")
public String getLastName() {
return lastName;
}
@XmlElement(name = "middleName")
public String getMiddleName() {
return middleName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public void setMiddleName(String middleName) {
this.middleName = middleName;
}
@XmlElement(name = "middleName")
public String getMiddleName() {
return middleName;
}
@XmlElement(name = "addressHome")
public String getAddressHome() {
return addressHome;
}
public void setMiddleName(String middleName) {
this.middleName = middleName;
}
public void setAddressHome(String addressHome) {
this.addressHome = addressHome;
}
@XmlElement(name = "addressHome")
public String getAddressHome() {
return addressHome;
}
@XmlElement(name = "addressWork")
public String getAddressWork() {
return addressWork;
}
public void setAddressHome(String addressHome) {
this.addressHome = addressHome;
}
public void setAddressWork(String addressWork) {
this.addressWork = addressWork;
}
@XmlElement(name = "addressWork")
public String getAddressWork() {
return addressWork;
}
@XmlElement(name = "phoneHome")
public String getPhoneHome() {
return phoneHome;
}
public void setAddressWork(String addressWork) {
this.addressWork = addressWork;
}
public void setPhoneHome(String phoneHome) {
this.phoneHome = phoneHome;
}
@XmlElement(name = "phoneHome")
public String getPhoneHome() {
return phoneHome;
}
@XmlElement(name = "phoneWork")
public String getPhoneWork() {
return phoneWork;
}
public void setPhoneHome(String phoneHome) {
this.phoneHome = phoneHome;
}
public void setPhoneWork(String phoneWork) {
this.phoneWork = phoneWork;
}
@XmlElement(name = "phoneWork")
public String getPhoneWork() {
return phoneWork;
}
@XmlElement(name = "thumbnail")
public String getThumbnail() {
return thumbnail;
}
public void setPhoneWork(String phoneWork) {
this.phoneWork = phoneWork;
}
public void setThumbnail(String thumbnail) {
this.thumbnail = thumbnail;
}
@XmlElement(name = "thumbnail")
public String getThumbnail() {
return thumbnail;
}
@XmlElement(name = "companyName")
public String getCompanyName() {
return companyName;
}
public void setThumbnail(String thumbnail) {
this.thumbnail = thumbnail;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
@XmlElement(name = "companyName")
public String getCompanyName() {
return companyName;
}
@XmlElement(name = "createPerson")
public boolean isCreatePerson() {
return createPerson;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public void setCreatePerson(boolean createPerson) {
this.createPerson = createPerson;
}
@XmlElement(name = "createPerson")
public boolean isCreatePerson() {
return createPerson;
}
public void setCreatePerson(boolean createPerson) {
this.createPerson = createPerson;
}
}

View File

@ -23,7 +23,7 @@
]]>
</query>
<query name="findLoanDetailsFromTikedByLoan">
<query name="findLoanDetailsFromTikedByLoan">
<![CDATA[
SELECT
DATE_FORMAT(ld.createdOn, '%d-%m-%Y') AS createdOn,
@ -43,7 +43,8 @@
CONCAT(perv.firstName, ' ',
IFNULL(CONCAT(perv.secondName, ' '), ''),
perv.lastName, ' ',
perv.middleName) AS fullNameCrobrador
perv.middleName) AS fullNameCrobrador,
ld.folio AS folio
FROM
LoanDetails ld
INNER JOIN Loan l ON ld.loan = l.id
@ -62,6 +63,46 @@
]]>
</query>
<query name="findLatestFolioByUser">
<![CDATA[
SELECT
DATE_FORMAT(ld.createdOn, '%d-%m-%Y') AS createdOn,
ld.paymentAmount AS paymentAmount,
ld.loanDetailsType AS loanDetailsType,
lt.paymentTotal AS amountToPay,
ld.comments AS comments,
CONCAT(per.firstName, ' ',
IFNULL(CONCAT(per.secondName, ' '), ''),
per.lastName, ' ',
per.middleName) AS fullNameVendedor,
CONCAT(peo.firstName, ' ',
IFNULL(CONCAT(peo.secondName, ' '), ''),
peo.lastName, ' ',
IFNULL(peo.middleName, '')) AS fullNameCliente,
CONCAT(IFNULL(peo.contrato, ''), ' - ', IFNULL(rut.route, '')) AS numeroCuenta,
CONCAT(perv.firstName, ' ',
IFNULL(CONCAT(perv.secondName, ' '), ''),
perv.lastName, ' ',
perv.middleName) AS fullNameCrobrador,
ld.folio AS folio
FROM
LoanDetails ld
INNER JOIN Loan l ON ld.loan = l.id
INNER JOIN LoanType lt ON l.loanType = lt.id
INNER JOIN People peo ON l.customer.id = peo.id
INNER JOIN RouteCtlg rut ON peo.routeCtlg.id = rut.id
INNER JOIN User us ON ld.user.id = us.id
LEFT JOIN HumanResource per ON us.humanResource.id = per.id
INNER JOIN User ven ON ld.createdBy = ven.id
LEFT JOIN HumanResource perv ON ven.humanResource.id = perv.id
WHERE
ld.user = :user
ORDER BY
ld.createdOn,
ld.referenceNumber
]]>
</query>
<query name="findLoanDetailsPaymentCurdateByLoan">
<![CDATA[
SELECT

View File

@ -272,6 +272,71 @@
]]>
</query>
<query name="findLoansById">
<![CDATA[
SELECT
CONCAT(
CASE
WHEN cstmr.firstName IS NOT NULL
THEN CONCAT(SUBSTR(UPPER(cstmr.firstName), 1, 1),SUBSTR(LOWER(cstmr.firstName), 2), ' ')
ELSE ''
END,
CASE
WHEN cstmr.secondName IS NOT NULL
THEN CONCAT(SUBSTR(UPPER(cstmr.secondName), 1, 1),SUBSTR(LOWER(cstmr.secondName), 2), ' ')
ELSE ''
END,
CASE
WHEN cstmr.lastName IS NOT NULL
THEN CONCAT(SUBSTR(UPPER(cstmr.lastName), 1, 1),SUBSTR(LOWER(cstmr.lastName), 2), ' ')
ELSE ''
END,
CASE
WHEN cstmr.middleName IS NOT NULL
THEN CONCAT(SUBSTR(UPPER(cstmr.middleName), 1, 1),SUBSTR(LOWER(cstmr.middleName), 2))
ELSE ''
END
) AS customerName,
CONCAT(
CASE
WHEN ndrsmnt.firstName IS NOT NULL
THEN CONCAT(SUBSTR(UPPER(ndrsmnt.firstName), 1, 1),SUBSTR(LOWER(ndrsmnt.firstName), 2), ' ')
ELSE ''
END,
CASE
WHEN ndrsmnt.secondName IS NOT NULL
THEN CONCAT(SUBSTR(UPPER(ndrsmnt.secondName), 1, 1),SUBSTR(LOWER(ndrsmnt.secondName), 2), ' ')
ELSE ''
END,
CASE
WHEN ndrsmnt.lastName IS NOT NULL
THEN CONCAT(SUBSTR(UPPER(ndrsmnt.lastName), 1, 1),SUBSTR(LOWER(ndrsmnt.lastName), 2), ' ')
ELSE ''
END,
CASE
WHEN ndrsmnt.middleName IS NOT NULL
THEN CONCAT(SUBSTR(UPPER(ndrsmnt.middleName), 1, 1),SUBSTR(LOWER(ndrsmnt.middleName), 2))
ELSE ''
END
) AS endorsementName,
lo.createdOn AS strDate,
lo.fachadaCasa AS fachadaCasa,
lo.descripcion AS descripcion,
lo.latitud AS latitud,
lo.longitud AS longitud,
CONCAT(CAST(lt.payment AS string), ' - ', lt.loanTypeName) AS loanDescription
FROM
Loan lo
INNER JOIN LoanType lt ON lo.loanType = lt.id
INNER JOIN People cstmr ON lo.customer = cstmr.id
INNER JOIN People ndrsmnt ON lo.endorsement = ndrsmnt.id
WHERE
lo.id = :id
ORDER BY
lo.createdOn
]]>
</query>
<query name="searchPaymentDetails">
<![CDATA[
SELECT

View File

@ -7,17 +7,18 @@ package com.arrebol.apc.web.beans.admin;
import com.arrebol.apc.controller.system.employee.EmployeeController;
import com.arrebol.apc.model.core.HumanResource;
import com.arrebol.apc.model.core.Office;
import com.arrebol.apc.model.enums.HumanResourceStatus;
import com.arrebol.apc.web.beans.Datatable;
import com.arrebol.apc.web.beans.GenericBean;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.application.FacesMessage;
import javax.faces.view.ViewScoped;
import javax.inject.Named;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.primefaces.event.ReorderEvent;
import org.primefaces.event.RowEditEvent;
@ -27,74 +28,87 @@ import org.primefaces.event.RowEditEvent;
*/
@Named("employeeListManager")
@ViewScoped
public class EmployeeListBean extends GenericBean implements Serializable, Datatable {
public class EmployeeListBean extends GenericBean implements Serializable, Datatable {
public List<HumanResource> fillDatatableEmployee() {
return getController().findEmployeesByType(
getLoggedUser().getOffice(),
HumanResourceStatus.ENEBLED,
getLoggedUser().getUser().getHumanResource().getId());
}
@Override
public void editRow(RowEditEvent event) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
public void editarIndetificadorDeFolios() {
try {
getSelectedHumanResource().setUltimaModificacionFolio(new Date());
getSelectedHumanResource().setUsuarioUltimaModificacionFolio(getLoggedUser().getUser());
getController().updateHumanResource(getSelectedHumanResource());
logger.info("Se actualizó el identificador de folios correctamente");
showMessage(FacesMessage.SEVERITY_INFO, "Registro actualizado", "Se actualizó el identificador de folios correctamente");
setSelectedHumanResource(null);
fillDatatableEmployee();
} catch (Exception e) {
logger.error("editarIndetificadorDeFolios(): " + e);
showMessage(FacesMessage.SEVERITY_ERROR, "Error", "Ocurrió un error al tratar de editar el identificador de  folios");
}
}
@Override
public void onRowCancel(RowEditEvent event) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
public List<HumanResource> fillDatatableEmployee() {
return getController().findEmployeesByType(getLoggedUser().getOffice(), HumanResourceStatus.ENEBLED, getLoggedUser().getUser().getHumanResource().getId());
}
@Override
public void onRowReorder(ReorderEvent event) {
showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1));
}
@Override
public void editRow(RowEditEvent event) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void addRow() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void onRowCancel(RowEditEvent event) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void deleteRow() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void onRowReorder(ReorderEvent event) {
showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1));
}
public EmployeeController getController() {
return controller;
}
@Override
public void addRow() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
public void setController(EmployeeController controller) {
this.controller = controller;
}
@Override
public void deleteRow() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
public List<HumanResource> getHumanResource() {
return humanResource;
}
public EmployeeController getController() {
return controller;
}
public void setHumanResource(List<HumanResource> humanResource) {
this.humanResource = humanResource;
}
public void setController(EmployeeController controller) {
this.controller = controller;
}
public List<HumanResource> getHumanResource() {
return humanResource;
}
private EmployeeController controller;
public void setHumanResource(List<HumanResource> humanResource) {
this.humanResource = humanResource;
}
private List<HumanResource> humanResource;
public HumanResource getSelectedHumanResource() {
return selectedHumanResource;
}
@PostConstruct()
public void init() {
loadBundlePropertyFile();
controller = new EmployeeController();
public void setSelectedHumanResource(HumanResource selectedHumanResource) {
this.selectedHumanResource = selectedHumanResource;
}
setHumanResource(fillDatatableEmployee());
}
final Logger logger = LogManager.getLogger(EmployeeListBean.class);
private EmployeeController controller;
private List<HumanResource> humanResource;
private HumanResource selectedHumanResource;
@PostConstruct()
public void init() {
loadBundlePropertyFile();
controller = new EmployeeController();
setHumanResource(fillDatatableEmployee());
}
}

View File

@ -47,6 +47,18 @@ public class EmployeeBean extends GenericBean implements Serializable {
getSaveHumanResource().setCreatedBy(getLoggedUser().getUser().getId());
getSaveHumanResource().setBalance(BigDecimal.ZERO);
//Se valida si el identificador del folio
if (getSaveHumanResource().getIdentificadorFolio() == null || !getSaveHumanResource().getIdentificadorFolio().equals(getIdentificadorFolio())) {
if (getController().verificarIdentificadorFolio(getIdentificadorFolio())) {
logger.error("Identificador de folio ya asignado");
buildAndSendMessage(null, "El identificador del folio ya ha sido asignado a otro usuario", FacesMessage.SEVERITY_WARN, "Error");
return;
}
getSaveHumanResource().setIdentificadorFolio(getIdentificadorFolio());
getSaveHumanResource().setUltimaModificacionFolio(new Date());
getSaveHumanResource().setUsuarioUltimaModificacionFolio(getLoggedUser().getUser());
}
if (getSaveHumanResource().getEmployeeSaving() == null) {
getSaveHumanResource().setEmployeeSaving(BigDecimal.ZERO);
}
@ -398,6 +410,7 @@ public class EmployeeBean extends GenericBean implements Serializable {
private String bonusId;
private List<Bonus> bonuses;
private String identificadorFolio;
private String updateBonusId;
@PostConstruct()
@ -619,4 +632,12 @@ public class EmployeeBean extends GenericBean implements Serializable {
this.updateBonusId = updateBonusId;
}
public String getIdentificadorFolio() {
return identificadorFolio;
}
public void setIdentificadorFolio(String identificadorFolio) {
this.identificadorFolio = identificadorFolio;
}
}

View File

@ -28,6 +28,15 @@
<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="dtLoanType" 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="dtLoanType" fileName="Listado de productos" />
</h:commandLink>
</div>
<p:button outcome="#{i18n['outcome.catalog.typeLoan.add']}" value="#{i18n['button.add']}" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" rendered="#{loginBean.isUserInRole('catalog.typeLoan.add')}"/>
<p:outputPanel>
@ -93,6 +102,16 @@
<h:outputText value="#{loanType.cantidadExistente}" />
</p:column>
<p:column headerText="Última modificación" sortBy="#{loanType.lastUpdatedOn}" style="width: 7em; text-align: center" filterBy="#{loanType.lastUpdatedOn}">
<h:outputText value="#{loanType.lastUpdatedOn}">
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
</h:outputText>
</p:column>
<p:column headerText="Usuario modifico" sortBy="#{loanType.lastUserModified.userName}" style="width: 7em; text-align: center" filterBy="#{loanType.lastUserModified.userName}">
<h:outputText value="#{loanType.lastUserModified.userName}" />
</p:column>
<p:column style="width:40px" headerText="Editar">
<p:rowEditor editTitle="#{i18n['button.edit']}" rendered="#{loginBean.isUserInRole('catalog.typeLoan.updated')}"/>
</p:column>

View File

@ -25,21 +25,24 @@
<!-- Top Side -->
<div class="ui-g-12" style="display: #{loginBean.isUserInRole('system.employee') ? 'block' : 'none'}">
<div class="card card-w-title">
<h1>
<h:outputFormat value="#{i18n['office.selected']}">
<f:param value="#{employeeBean.loggedUser.office.officeName}" />
</h:outputFormat>
</h1>
<h:form id="form" rendered="#{loginBean.isUserInRole('system.employee')}">
<h1>
<h:outputFormat value="#{i18n['office.selected']}">
<f:param value="#{employeeBean.loggedUser.office.officeName}" />
</h:outputFormat>
</h1>
<h:form id="form" rendered="#{loginBean.isUserInRole('system.employee')}">
<p:growl id="msgs" showDetail="true"/>
<p:panelGrid columns="3" layout="grid" styleClass="ui-panelgrid-blank form-group">
</p:panelGrid>
<p:dataTable widgetVar="dtEmployee" id="dtEmployee" var="humanResource" value="#{employeeListManager.humanResource}" style="margin-bottom:20px" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="#{i18n['admin.loans.datatable.empty']}"
rowKey="#{humanResource.id}" editable="true" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
<p:dataTable widgetVar="dtEmployee" id="dtEmployee" var="humanResource" value="#{employeeListManager.humanResource}"
selection="#{employeeListManager.selectedHumanResource}"
style="margin-bottom:20px" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="#{i18n['admin.loans.datatable.empty']}"
rowKey="#{humanResource.id}" editable="true" 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"/>
@ -63,32 +66,55 @@
<p:column headerText="Nombre" sortBy="#{humanResource.firstName} #{humanResource.lastName}" filterBy="#{humanResource.firstName} #{humanResource.lastName}" filterMatchMode="contains">
<h:outputText value="#{humanResource.firstName} #{humanResource.lastName}" />
</p:column>
<p:column headerText="Fecha de cumpleaños" sortBy="#{humanResource.birthdate}" filterBy="#{humanResource.birthdate}">
<h:outputText value="#{humanResource.birthdate}" />
</p:column>
<p:column headerText="Fecha de admision" sortBy="#{humanResource.admissionDate}" filterBy="#{humanResource.admissionDate}">
<h:outputText value="#{humanResource.admissionDate}" />
</p:column>
<p:column headerText="Puesto" sortBy="#{humanResource.roleCtlg.role}" filterBy="#{humanResource.roleCtlg.role}">
<h:outputText value="#{humanResource.roleCtlg.role}" />
</p:column>
<p:column headerText="Identificador de folios" sortBy="#{humanResource.identificadorFolio}" filterBy="#{humanResource.identificadorFolio}">
<h:outputText value="#{humanResource.identificadorFolio}" />
</p:column>
<p:column headerText="Acciones" style="text-align: center">
<p:commandButton
icon="ui-icon-pencil"
title="Folios"
value="Editar identificador de folios"
id="ctxMenuItem3"
update="editarFolioForm"
oncomplete="PF('editarFolioDialog').show();">
<f:setPropertyActionListener value="#{humanResource}" target="#{employeeListManager.selectedHumanResource}" />
</p:commandButton>
</p:column>
</p:dataTable>
</h:form>
<h:form id="editarFolioForm">
<p:growl id="msgsDialog" showDetail="true"/>
<p:dialog widgetVar="editarFolioDialog" width="30em" height="6em" id="editarFolioDialog" header="Editar identificador de folios" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
<h:panelGroup styleClass="md-inputfield" style="margin-top: 1em">
<p:inputText id="identificadorFolio" value="#{employeeListManager.selectedHumanResource.identificadorFolio}" style="width: 100%;"/>
<label>Identificador de folios</label>
<p:message for="identificadorFolio" display="text"/>
</h:panelGroup>
<h:panelGroup styleClass="md-inputfield" >
<p:commandButton id="addButton" value="Actualizar" actionListener="#{employeeListManager.editarIndetificadorDeFolios()}" update="editarFolioForm,form"/>
</h:panelGroup>
</p:dialog>
</h:form>
</div>
</div>
<!-- Left Side -->
<!-- Popup -->
</div>
</ui:define>

View File

@ -77,6 +77,14 @@
<label>#{i18n['middle.name']}</label>
<p:message for="middleName" display="icon"/>
</h:panelGroup>
<h:panelGroup id="identificadorFolioPnlGrp" styleClass="md-inputfield">
<p:inputText id="identificadorFolio"
style="width: 100%"
value="#{employeeBean.identificadorFolio}"
autocomplete="off"/>
<label>Identificador de folios </label>
<p:message for="middleName" display="icon"/>
</h:panelGroup>
</p:panelGrid>
<p:panelGrid columns="4" layout="grid" styleClass="ui-panelgrid-blank form-group">

View File

@ -195,8 +195,8 @@
<id>Localhost</id>
<properties>
<hibernate.connection.url>jdbc:mysql://localhost:3306/apo_pro_com_april_ten?serverTimezone=UTC</hibernate.connection.url>
<hibernate.connection.username>root</hibernate.connection.username>
<hibernate.connection.password>Saladeespera2_</hibernate.connection.password>
<hibernate.connection.username>apoprocomlocalhost</hibernate.connection.username>
<hibernate.connection.password>Yj$2Da0z!</hibernate.connection.password>
</properties>
</profile>
<profile>

File diff suppressed because it is too large Load Diff