Class ConciliationController
java.lang.Object
es.kukenan.smartfi.microservice.backoffice.controller.ConciliationController
Controller to reply Core Conciliation endpoints definition.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAuthority (role) required in order to be able to invoke change application status.static final StringREST API Conciliation cards path.static final StringConciliation company file path.static final StringConciliation company path.static final StringREST API Conciliation list path.static final StringREST API Backoffice Conciliation base path.private ConciliationServiceCompany service.private es.kukenan.smartfi.common.context.RequestContextManagerRequest context manager.private es.kukenan.smartfi.common.service.jwt.JwtServiceImplJWT service for create a bearer to call products. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Company>>generateConciliationFile(Integer companyId, es.kukenan.smartfi.common.security.WalletAuthentication authentication) Generate Conciliation file.voidgetConciliationFile(Integer companyId, String fileId, javax.servlet.http.HttpServletResponse response, es.kukenan.smartfi.common.security.WalletAuthentication authentication) Get Conciliation file.org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.common.api.dtos.ResultsPageDto<es.kukenan.smartfi.microservice.backoffice.dtos.core.conciliation.ConciliationFileDto>>>getConciliationFiles(Integer companyId, Integer pageNumber, Integer pageSize, String sortedBy, Integer conciliationStatus, es.kukenan.smartfi.common.security.WalletAuthentication authentication) Retrieve Conciliation files list.org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<List<es.kukenan.smartfi.microservice.backoffice.dtos.core.conciliation.ConciliationFileCardsDto>>>getConciliationFilesCards(Integer companyId, es.kukenan.smartfi.common.security.WalletAuthentication authentication) Retrieve Conciliation files cards.
-
Field Details
-
API_PATH
REST API Backoffice Conciliation base path.- See Also:
-
API_CONCILIATION_COMPANY_PATH
Conciliation company path.- See Also:
-
API_CONCILIATION_COMPANY_FILE_PATH
Conciliation company file path.- See Also:
-
API_CONCILIATION_LIST_PATH
REST API Conciliation list path.- See Also:
-
API_CONCILIATION_CARDS_PATH
REST API Conciliation cards path.- See Also:
-
conciliationService
Company service. -
jwtService
@Autowired private es.kukenan.smartfi.common.service.jwt.JwtServiceImpl jwtServiceJWT service for create a bearer to call products. -
contextManager
@Autowired private es.kukenan.smartfi.common.context.RequestContextManager contextManagerRequest context manager. -
API_BACKOFFICE_AUTHORITIES
Authority (role) required in order to be able to invoke change application status.- See Also:
-
-
Constructor Details
-
ConciliationController
public ConciliationController()
-
-
Method Details
-
generateConciliationFile
@PreAuthorize("(hasRole(\'ROLE_ACCESS_ADMIN\') and hasRole(\'ROLE_LEVEL_BACKOFFICE_ADMIN\')) or (hasRole(\'ROLE_ACCESS_MODERATOR\') and hasRole(\'ROLE_LEVEL_USER_MODERATOR\')) or (hasRole(\'ROLE_ACCESS_COMPANY\') and hasRole(\'ROLE_LEVEL_USER_COMPANY\'))") @GetMapping(path="/api/v1/backoffice/conciliation/{companyId}") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.microservice.backoffice.dtos.core.contract.Company>> generateConciliationFile(@PathVariable("companyId") Integer companyId, es.kukenan.smartfi.common.security.WalletAuthentication authentication) Generate Conciliation file.- Parameters:
companyId- company identifier.authentication- user credentials.- Returns:
- Company detail.
-
getConciliationFile
@PreAuthorize("(hasRole(\'ROLE_ACCESS_ADMIN\') and hasRole(\'ROLE_LEVEL_BACKOFFICE_ADMIN\')) or (hasRole(\'ROLE_ACCESS_MODERATOR\') and hasRole(\'ROLE_LEVEL_USER_MODERATOR\')) or (hasRole(\'ROLE_ACCESS_COMPANY\') and hasRole(\'ROLE_LEVEL_USER_COMPANY\'))") @GetMapping(path="/api/v1/backoffice/conciliation/{companyId}/{fileId}") public void getConciliationFile(@PathVariable("companyId") Integer companyId, @PathVariable("fileId") String fileId, javax.servlet.http.HttpServletResponse response, es.kukenan.smartfi.common.security.WalletAuthentication authentication) throws IOException Get Conciliation file.- Parameters:
companyId- company identifier.fileId- file identifier.response- response.authentication- user credentials.- Throws:
IOException- file to write response.
-
getConciliationFiles
@PreAuthorize("(hasRole(\'ROLE_ACCESS_ADMIN\') and hasRole(\'ROLE_LEVEL_BACKOFFICE_ADMIN\')) or (hasRole(\'ROLE_ACCESS_MODERATOR\') and hasRole(\'ROLE_LEVEL_USER_MODERATOR\')) or (hasRole(\'ROLE_ACCESS_COMPANY\') and hasRole(\'ROLE_LEVEL_USER_COMPANY\'))") @GetMapping(path="/api/v1/backoffice/conciliation/{companyId}/list", produces="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<es.kukenan.smartfi.common.api.dtos.ResultsPageDto<es.kukenan.smartfi.microservice.backoffice.dtos.core.conciliation.ConciliationFileDto>>> getConciliationFiles(@PathVariable("companyId") Integer companyId, @RequestParam(name="pageNumber",required=false) Integer pageNumber, @RequestParam(name="pageSize",required=false) Integer pageSize, @RequestParam(name="sortedBy",required=false) String sortedBy, @RequestParam(name="conciliationStatus",required=false) Integer conciliationStatus, es.kukenan.smartfi.common.security.WalletAuthentication authentication) Retrieve Conciliation files list.- Parameters:
companyId- company identifier.pageNumber- number of page to get.pageSize- size of list to return.sortedBy- sort param.conciliationStatus- conciliation status.authentication- user credentials.- Returns:
- the Conciliation files.
-
getConciliationFilesCards
@PreAuthorize("(hasRole(\'ROLE_ACCESS_ADMIN\') and hasRole(\'ROLE_LEVEL_BACKOFFICE_ADMIN\')) or (hasRole(\'ROLE_ACCESS_MODERATOR\') and hasRole(\'ROLE_LEVEL_USER_MODERATOR\')) or (hasRole(\'ROLE_ACCESS_COMPANY\') and hasRole(\'ROLE_LEVEL_USER_COMPANY\'))") @GetMapping(path="/api/v1/backoffice/conciliation/{companyId}/cards", produces="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.dto.ResponseDTO<List<es.kukenan.smartfi.microservice.backoffice.dtos.core.conciliation.ConciliationFileCardsDto>>> getConciliationFilesCards(@PathVariable("companyId") Integer companyId, es.kukenan.smartfi.common.security.WalletAuthentication authentication) Retrieve Conciliation files cards.- Parameters:
companyId- company identifier.authentication- user credentials.- Returns:
- the Conciliation files.
-