Class MovementsService
java.lang.Object
es.kukenan.smartfi.microservice.contracts.service.MovementsService
Movements related services.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BackofficeClientManagerBack office clients manager.private CacheOperationCache operation.private DtoObfuscatorSecurity util to obfuscate sensible data in DTOs.private FilterOtpMovementsAuthorize show data in response.private ProductBackofficeRepositoryProducts Backoffice repository.private ProductRepositoryProducts DB repository.private ProductsServiceProducts service.products must require otp to show movements more than 90 days.private es.kukenan.smartfi.reports.generator.ReportsGeneratorReports generator. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMovementsParams(es.kukenan.smartfi.microservice.contracts.api.products.ProductDto productDto) private voidasociatedReference(es.kukenan.smartfi.common.service.jwt.enums.EntityBankEnum companyId, String userId, String sessionId, String userToken, String productId, String dateFrom, String dateTo, String type, String paginationKey, String number, String state, String reason, es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDto response) private voidcheckMovementsDocumentOtpRequired(es.kukenan.smartfi.common.service.jwt.enums.SecurityLevelEnum securityLevel, List<es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto> movements, javax.servlet.http.HttpServletRequest request) es.kukenan.smartfi.microservice.contracts.api.movement.DepositImpositionResponseDtofindDepositImpositions(String productId, String userId, String userToken, es.kukenan.smartfi.common.security.WalletAuthentication auth) Products withheld movement service method.es.kukenan.smartfi.microservice.contracts.api.movement.MovementDtofindMovement(String sessionId, String userId, String productId, String movementId, String userJwtToken) Specific movement service method.es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDtofindMovements(es.kukenan.smartfi.common.service.jwt.enums.EntityBankEnum companyId, String userId, String sessionId, String userToken, String productId, javax.servlet.http.HttpServletRequest request, String dateFrom, String dateTo, String type, String paginationKey, String number, String state, String reason, Boolean allMovements) Products movement service method.es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDtofindWithheldMovements(String productId, String userId, String userToken, es.kukenan.smartfi.common.security.WalletAuthentication auth) Products withheld movement service method.es.kukenan.smartfi.microservice.contracts.api.common.DocumentContentDtogetMovementDocument(String userId, es.kukenan.smartfi.common.service.jwt.enums.EntityBankEnum companyId, String sessionId, String productId, String userToken, String userIp, String contractId, String movementId, String reference, String reportType) Get movement document pdf or csv.private List<es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto>getMovementDtosFromCache(String userId, String productId, String reference) es.kukenan.smartfi.microservice.contracts.api.common.DocumentContentDtogetMovementsDocument(es.kukenan.smartfi.common.service.jwt.enums.SecurityLevelEnum securityLevel, String typeDocument, es.kukenan.smartfi.common.service.jwt.enums.EntityBankEnum companyId, String userId, String sessionId, String productId, String userToken, String userIp, String contractId, javax.servlet.http.HttpServletRequest request, String dateFrom, String dateTo, String type, String number, String state, String reason) Products movements list document pdf or csv.private es.kukenan.smartfi.microservice.contracts.api.products.ProductDtogetProductDto(String productId, List<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> productsList) private booleanisCreditCard(es.kukenan.smartfi.microservice.contracts.api.products.ProductDto productDto) private booleanisDebitCard(es.kukenan.smartfi.microservice.contracts.api.products.ProductDto productDto)
-
Field Details
-
productTypeSubTypeMovementsOtpRequired
@Value("#{${producttype.subtype.movements.otp.required}}") private HashMap<String,List<Integer>> productTypeSubTypeMovementsOtpRequiredproducts must require otp to show movements more than 90 days. -
backofficeClientManager
Back office clients manager. -
productRepository
Products DB repository. -
productBackofficeRepository
Products Backoffice repository. -
productsService
Products service. -
filterOtpMovements
Authorize show data in response. -
dtoObfuscator
Security util to obfuscate sensible data in DTOs. -
cacheOperation
Cache operation. -
reportsGenerator
@Autowired private es.kukenan.smartfi.reports.generator.ReportsGenerator reportsGeneratorReports generator.
-
-
Constructor Details
-
MovementsService
public MovementsService()
-
-
Method Details
-
findMovements
public es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDto findMovements(es.kukenan.smartfi.common.service.jwt.enums.EntityBankEnum companyId, String userId, String sessionId, String userToken, String productId, javax.servlet.http.HttpServletRequest request, String dateFrom, String dateTo, String type, String paginationKey, String number, String state, String reason, Boolean allMovements) Products movement service method.- Parameters:
companyId- company identifier.userId- user identifier.sessionId- session identifier.userToken- User JWT token.productId- product identifier which movements are to be retrieved.request- request information.dateFrom- full from date in RFC3339 format with no separators (yyyymmdd).dateTo- full to date in RFC3339 format with no separators (yyyymmdd).type- movement type code.paginationKey- pagination key used to request next result page.number- imposition number.state- imposition state.reason- reason.allMovements- all movements.- Returns:
- products movements.
-
asociatedReference
private void asociatedReference(es.kukenan.smartfi.common.service.jwt.enums.EntityBankEnum companyId, String userId, String sessionId, String userToken, String productId, String dateFrom, String dateTo, String type, String paginationKey, String number, String state, String reason, es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDto response) -
findWithheldMovements
public es.kukenan.smartfi.microservice.contracts.api.movement.MovementsResponseDto findWithheldMovements(String productId, String userId, String userToken, es.kukenan.smartfi.common.security.WalletAuthentication auth) Products withheld movement service method.- Parameters:
productId- product identifier.userId- user identifier.userToken- userToken.auth- authentication info.- Returns:
- WithheldMovementResponseDto.
-
findDepositImpositions
public es.kukenan.smartfi.microservice.contracts.api.movement.DepositImpositionResponseDto findDepositImpositions(String productId, String userId, String userToken, es.kukenan.smartfi.common.security.WalletAuthentication auth) Products withheld movement service method.- Parameters:
productId- product identifier.userId- user identifier.userToken- userToken.auth- authentication info.- Returns:
- WithheldMovementResponseDto.
-
findMovement
@Transactional public es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto findMovement(String sessionId, String userId, String productId, String movementId, String userJwtToken) Specific movement service method.- Parameters:
sessionId- session identifier.userId- user identifier.productId- product identifier which movements are to be retrieved.movementId- movement identifier.userJwtToken- bearer.- Returns:
- products movements.
-
getMovementsDocument
public es.kukenan.smartfi.microservice.contracts.api.common.DocumentContentDto getMovementsDocument(es.kukenan.smartfi.common.service.jwt.enums.SecurityLevelEnum securityLevel, String typeDocument, es.kukenan.smartfi.common.service.jwt.enums.EntityBankEnum companyId, String userId, String sessionId, String productId, String userToken, String userIp, String contractId, javax.servlet.http.HttpServletRequest request, String dateFrom, String dateTo, String type, String number, String state, String reason) Products movements list document pdf or csv.- Parameters:
securityLevel- User security leveltypeDocument- pdf or csv.companyId- company identifier.userId- user identifier.sessionId- session identifier.productId- product identifier which movements are to be retrieved.userToken- user beareruserIp- user ip.contractId- contract identifier.request- request information.dateFrom- full from date in RFC3339 format with no separators (yyyymmdd).dateTo- full to date in RFC3339 format with no separators (yyyymmdd).type- movement type code.number- imposition number.state- imposition state.reason- reason.- Returns:
- products movements document.
-
checkMovementsDocumentOtpRequired
private void checkMovementsDocumentOtpRequired(es.kukenan.smartfi.common.service.jwt.enums.SecurityLevelEnum securityLevel, List<es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto> movements, javax.servlet.http.HttpServletRequest request) -
getProductDto
-
isDebitCard
private boolean isDebitCard(es.kukenan.smartfi.microservice.contracts.api.products.ProductDto productDto) -
isCreditCard
private boolean isCreditCard(es.kukenan.smartfi.microservice.contracts.api.products.ProductDto productDto) -
addMovementsParams
-
getMovementDocument
public es.kukenan.smartfi.microservice.contracts.api.common.DocumentContentDto getMovementDocument(String userId, es.kukenan.smartfi.common.service.jwt.enums.EntityBankEnum companyId, String sessionId, String productId, String userToken, String userIp, String contractId, String movementId, String reference, String reportType) Get movement document pdf or csv.- Parameters:
userId- user identifier.companyId- company identifier.sessionId- session identifier.productId- product identifier which movements are to be retrieved.userToken- user beareruserIp- user ip.contractId- contract identifier.movementId- movement identifier.reference- cache reference.reportType- pdf or csv.- Returns:
- document.
-
getMovementDtosFromCache
-