Class MovementsService

java.lang.Object
es.kukenan.smartfi.microservice.contracts.service.MovementsService

@Service public class MovementsService extends Object
Movements related services.
  • Field Details

    • productTypeSubTypeMovementsOtpRequired

      @Value("#{${producttype.subtype.movements.otp.required}}") private HashMap<String,List<Integer>> productTypeSubTypeMovementsOtpRequired
      products must require otp to show movements more than 90 days.
    • backofficeClientManager

      @Autowired private BackofficeClientManager backofficeClientManager
      Back office clients manager.
    • productRepository

      @Autowired private ProductRepository productRepository
      Products DB repository.
    • productBackofficeRepository

      @Autowired private ProductBackofficeRepository productBackofficeRepository
      Products Backoffice repository.
    • productsService

      @Autowired private ProductsService productsService
      Products service.
    • filterOtpMovements

      @Autowired private FilterOtpMovements filterOtpMovements
      Authorize show data in response.
    • dtoObfuscator

      @Autowired private DtoObfuscator dtoObfuscator
      Security util to obfuscate sensible data in DTOs.
    • cacheOperation

      @Autowired private CacheOperation cacheOperation
      Cache operation.
    • reportsGenerator

      @Autowired private es.kukenan.smartfi.reports.generator.ReportsGenerator reportsGenerator
      Reports 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 level
      typeDocument - pdf or csv.
      companyId - company identifier.
      userId - user identifier.
      sessionId - session identifier.
      productId - product identifier which movements are to be retrieved.
      userToken - user bearer
      userIp - 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

      private es.kukenan.smartfi.microservice.contracts.api.products.ProductDto getProductDto(String productId, List<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> productsList)
    • 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

      private Map<String,Object> addMovementsParams(es.kukenan.smartfi.microservice.contracts.api.products.ProductDto productDto)
    • 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 bearer
      userIp - user ip.
      contractId - contract identifier.
      movementId - movement identifier.
      reference - cache reference.
      reportType - pdf or csv.
      Returns:
      document.
    • getMovementDtosFromCache

      private List<es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto> getMovementDtosFromCache(String userId, String productId, String reference)