-
Notifications
You must be signed in to change notification settings - Fork 4
Dev/combined rawdata #367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devFixUsualSurveyUnitId
Are you sure you want to change the base?
Dev/combined rawdata #367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Rename it to combinedRawDataModel and create a similar DTO classed returned in the controller
| List<String> findInterrogationIdByCollectionInstrumentIdAndProcessDateIsNull(String collectionInstrumentId); | ||
|
|
||
| @Query(value = "{ 'interrogationId': ?0}") | ||
| List<RawResponseDocument> findByInterrogationId(String interrogationId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: add "@indexed" to interrogationId in rawResponseDocument
| List<LunaticJsonRawDataDocument> findModesByCampaignIdAndByModeAndinterrogationIdIninterrogationIdList(String campaignName, Mode mode, List<String> interrogationIdList); | ||
|
|
||
| @Query(value = "{ 'interrogationId': ?0}") | ||
| List<LunaticJsonRawDataDocument> findByInterrogationId(String interrogationId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: add @indexed to interrogationId in LunaticJsonRawDataDocument
| @Slf4j | ||
| public class CombinedRawDataService { | ||
|
|
||
| @Qualifier("lunaticJsonMongoAdapterNew") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: qualifier is used in the case we have differents beans implementing the same interface, it's not the case here during normal functionning for now but we put it in case we add another implementation.
suggestion: No implem has this qualifier. Rename it to "lunaticJsonMongoAdapter" to correspond with the mongo adapter qualifier
| @PreAuthorize("hasAnyRole('ADMIN', 'USER_PLATINE')") | ||
| public ResponseEntity<CombinedRawData> getCombinetRawData( | ||
| @RequestParam(INTERROGATION_ID) String interrogationId | ||
| ){CombinedRawData data = combinedRawDataService.getCombinedRawDataByInterrogationId(interrogationId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Use a DTO to be sure on what to return
Adds a new endpoint to retrieve combined raw responses and Lunatic JSON raw data by interrogationId.