Commit 8b3c0feb authored by Passam KASSEM's avatar Passam KASSEM Committed by Ro3034
Browse files

[VAS] Item 8331 : Accession Register Advanced Search implementation

parent 1d88d322
......@@ -240,7 +240,7 @@
<executable>true</executable>
<attach>false</attach> <!-- Need to use the original jar for integration-tests -->
<mainClass>fr.gouv.vitamui.ingest.internal.server.ApiIngestInternalServerApplication</mainClass>
<jvmArguments>-Xmx512m -Dvitam.config.folder=${basedir}/src/main/resources/dev/vitam</jvmArguments>
<jvmArguments>-Xmx512m</jvmArguments>
<arguments>
<!-- use src/main/config/application-dev.yml when using mvn spring-boot:run -->
<!-- See : https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files -->
......
......@@ -36,10 +36,7 @@
*/
package fr.gouv.vitamui.referential.common.dsl;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import fr.gouv.vitam.common.database.builder.query.BooleanQuery;
......@@ -53,16 +50,27 @@ import fr.gouv.vitamui.commons.api.domain.DirectionDto;
import fr.gouv.vitamui.commons.api.logger.VitamUILogger;
import fr.gouv.vitamui.commons.api.logger.VitamUILoggerFactory;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.*;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.and;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.eq;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.gt;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.in;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.lt;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.lte;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.matchPhrasePrefix;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.ne;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.nin;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.or;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.range;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.wildcard;
public class VitamQueryHelper {
private static final VitamUILogger LOGGER = VitamUILoggerFactory.getInstance(VitamQueryHelper.class);
......@@ -87,7 +95,23 @@ public class VitamQueryHelper {
private static final String EV_DATE_TIME_END = "evDateTime_End";
private static final String OPI = "Opi";
private static final String ORIGINATING_AGENCY = "OriginatingAgency";
private static final String START_DATE = "StartDate";
private static final String ORIGINATING_AGENCIES = "originatingAgencies";
private static final String END_DATE = "EndDate";
private static final String ARCHIVAL_AGREEMENT = "ArchivalAgreement";
private static final String ARCHIVAL_AGREEMENTS = "archivalAgreements";
private static final String ARCHIVAL_PROFILE = "ArchivalProfile";
private static final String ARCHIVAL_PROFILES = "archivalProfiles";
private static final String ACQUISITION_INFORMATION = "AcquisitionInformation";
private static final String ACQUISITION_INFORMATIONS = "acquisitionInformations";
private static final String EVENTS_OPTYPE = "Events.OpType";
private static final String ELIMINATION = "elimination";
private static final String TRANSFER = "transfer";
private static final String PRESERVATION = "preservation";
/* */
private static final String DATE_FORMAT = "dd/MM/yyyy";
public static final Collection<String> staticAcquisitionInformations = List.of("Versement", "Protocole", "Achat",
"Copie", "Dation", "Dépôt", "Dévolution", "Don", "Legs", "Réintégration", "Autres", "Non renseigné");
private VitamQueryHelper() {
throw new UnsupportedOperationException("Utility class");
......@@ -111,14 +135,7 @@ public class VitamQueryHelper {
boolean isEmpty = true;
boolean haveOrParameters = false;
// Manage Filters
if (orderBy.isPresent()) {
if (direction.isPresent() && DirectionDto.DESC.equals(direction.get())) {
select.addOrderByDescFilter(orderBy.get());
} else {
select.addOrderByAscFilter(orderBy.get());
}
}
manageFilters(orderBy, direction, select);
select.setLimitFilter(pageNumber * size, size);
// Manage Query
......@@ -140,6 +157,7 @@ public class VitamQueryHelper {
queryOr.add(eq(searchKey, stringValue));
haveOrParameters = true;
break;
case EV_TYPE_PROC:
case RULE_TYPE:
// string equals operation filter as a and
final String ruleType = (String) entry.getValue();
......@@ -159,11 +177,6 @@ public class VitamQueryHelper {
queryOr.add(matchPhrasePrefix(searchKey, ruleValue));
haveOrParameters = true;
break;
case EV_TYPE_PROC:
// string equals operation
final String evTypeProc = (String) entry.getValue();
query.add(eq(searchKey, evTypeProc));
break;
case EV_TYPE:
// Special case EvType can be String or String[]
if (entry.getValue() instanceof String) {
......@@ -171,6 +184,7 @@ public class VitamQueryHelper {
query.add(eq(searchKey, evType));
break;
}
break;
case STATUS:
// in list of string operation
final List<String> stringValues = (ArrayList<String>) entry.getValue();
......@@ -182,8 +196,28 @@ public class VitamQueryHelper {
case EV_DATE_TIME_END:
query.add(lt("evDateTime", (String) entry.getValue()));
break;
case START_DATE:
addStartDateToQuery(query, entry.getValue());
case END_DATE:
addEndDateToQuery(query, entry.getValue());
break;
case ORIGINATING_AGENCIES:
List<String> originatingAgencies = (ArrayList<String>) entry.getValue();
query.add(in(ORIGINATING_AGENCY, originatingAgencies.toArray(new String[] {})));
break;
case ARCHIVAL_AGREEMENTS:
List<String> archivalAgreements = (ArrayList<String>) entry.getValue();
query.add(in(ARCHIVAL_AGREEMENT, archivalAgreements.toArray(new String[] {})));
break;
case ARCHIVAL_PROFILES:
List<String> archivalProfiles = (ArrayList<String>) entry.getValue();
query.add(in(ARCHIVAL_PROFILE, archivalProfiles.toArray(new String[] {})));
break;
case ACQUISITION_INFORMATIONS:
addAcquisitionInformationsToQuery(query, (ArrayList<String>) entry.getValue());
break;
case ELIMINATION:
case TRANSFER:
case PRESERVATION:
addEventsToQuery(query, (String) entry.getValue(), searchKey.toUpperCase());
break;
default:
LOGGER.error("Can not find binding for key: {}", searchKey);
......@@ -192,37 +226,74 @@ public class VitamQueryHelper {
}
}
setQuery(select, query, queryOr, isEmpty, haveOrParameters);
LOGGER.debug("Final query: {}", select.getFinalSelect().toPrettyString());
return select.getFinalSelect();
}
private static void manageFilters(Optional<String> orderBy, Optional<DirectionDto> direction, Select select)
throws InvalidParseOperationException {
// Manage Filters
if (orderBy.isPresent()) {
if (direction.isPresent() && DirectionDto.DESC.equals(direction.get())) {
select.addOrderByDescFilter(orderBy.get());
} else {
select.addOrderByAscFilter(orderBy.get());
}
}
}
private static void setQuery(Select select, BooleanQuery query, BooleanQuery queryOr, boolean isEmpty,
boolean haveOrParameters) throws InvalidCreateOperationException {
if (!isEmpty) {
if (haveOrParameters) {
query.add(queryOr);
}
if(!query.getQueries().isEmpty()) {
select.setQuery(query);
}
}
}
select.setQuery(query);
private static void addEventsToQuery(BooleanQuery query, String value, String searchKeyUpperCase) throws InvalidCreateOperationException {
if(!value.equals("all")) {
boolean cond = Boolean.parseBoolean(value);
if(cond) {
query.add(eq(EVENTS_OPTYPE, searchKeyUpperCase));
} else {
query.add(ne(EVENTS_OPTYPE, searchKeyUpperCase));
}
}
}
LOGGER.debug("Final query: {}", select.getFinalSelect().toPrettyString());
return select.getFinalSelect();
private static void addAcquisitionInformationsToQuery(BooleanQuery query, List<String> data) throws InvalidCreateOperationException {
List<String> acquisitionInformations = new ArrayList<>(staticAcquisitionInformations);
acquisitionInformations.removeAll(data);
if(!acquisitionInformations.isEmpty()) {
query.add(nin(ACQUISITION_INFORMATION, acquisitionInformations.toArray(new String[] {})));
}
}
private static void addStartDateToQuery(BooleanQuery query, Object value) {
private static void addEndDateToQuery(BooleanQuery query, Object value) {
try {
ObjectMapper mapper = new ObjectMapper();
AccessionRegisterDetailsSearchStatsDto.DateInterval dateInterval = mapper.convertValue(value, new TypeReference<>() {});
AccessionRegisterDetailsSearchStatsDto.EndDateInterval dateInterval = mapper.convertValue(value, new TypeReference<>() {});
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
String dateMinStr = dateInterval.getStartDateMin();
String dateMaxStr = dateInterval.getStartDateMax();
SimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT);
String dateMinStr = dateInterval.getEndDateMin();
String dateMaxStr = dateInterval.getEndDateMax();
if(dateMinStr != null && dateMaxStr == null) {
query.add(lte(START_DATE, formatter.parse(dateMinStr)));
query.add(lte(END_DATE, formatter.parse(dateMinStr)));
}
if(dateMinStr == null && dateMaxStr != null) {
query.add(lte(START_DATE, formatter.parse(dateMaxStr)));
query.add(lte(END_DATE, formatter.parse(dateMaxStr)));
}
if(dateMinStr != null && dateMaxStr != null) {
query.add(range(START_DATE, formatter.parse(dateMinStr), true, formatter.parse(dateMaxStr), false));
query.add(range(END_DATE, formatter.parse(dateMinStr), true, formatter.parse(dateMaxStr), false));
}
} catch (InvalidCreateOperationException | ParseException e) {
......@@ -244,7 +315,6 @@ public class VitamQueryHelper {
return select.getFinalSelect();
}
public static JsonNode buildOperationQuery(final String obId) throws InvalidCreateOperationException {
final Select select = new Select();
final CompareQuery obIdQuery;
......
......@@ -59,6 +59,7 @@ import fr.gouv.vitamui.commons.api.exception.InternalServerException;
import fr.gouv.vitamui.commons.api.logger.VitamUILogger;
import fr.gouv.vitamui.commons.api.logger.VitamUILoggerFactory;
import fr.gouv.vitamui.commons.vitam.api.administration.AgencyService;
import fr.gouv.vitamui.commons.vitam.api.model.HitsDto;
import fr.gouv.vitamui.referential.common.dsl.VitamQueryHelper;
import fr.gouv.vitamui.referential.common.dto.AccessionRegisterDetailDto;
import fr.gouv.vitamui.referential.common.dto.AccessionRegisterDetailResponseDto;
......@@ -110,7 +111,15 @@ public class AccessionRegisterDetailInternalService {
//Fetch agencies to complete return Dto 'originatingAgencyLabel' property
Map<String, String> agenciesMap = findAgencies(vitamContext, results);
boolean hasMore = pageNumber * size + results.getHits().getSize() < results.getHits().getTotal();
HitsDto hits = results.getHits();
Integer resultSize = 0;
Integer resultTotal = 0;
if(hits != null) {
resultSize = hits.getSize();
resultTotal = hits.getTotal();
}
boolean hasMore = pageNumber * size + resultSize < resultTotal;
List<AccessionRegisterDetailDto> valuesDto = AccessionRegisterDetailConverter.convertVitamsToDtos(results.getResults());
valuesDto.forEach(value -> value.setOriginatingAgencyLabel(agenciesMap.get(value.getOriginatingAgency())));
......
......@@ -40,7 +40,6 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import fr.gouv.vitam.access.external.client.AdminExternalClient;
import fr.gouv.vitam.common.PropertiesUtils;
import fr.gouv.vitam.common.client.VitamContext;
import fr.gouv.vitam.common.database.builder.query.BooleanQuery;
import fr.gouv.vitam.common.database.builder.query.VitamFieldsHelper;
......@@ -58,16 +57,16 @@ import fr.gouv.vitamui.commons.api.domain.AccessionRegisterDetailsSearchStatsDto
import fr.gouv.vitamui.commons.api.exception.InternalServerException;
import fr.gouv.vitamui.commons.api.logger.VitamUILogger;
import fr.gouv.vitamui.commons.api.logger.VitamUILoggerFactory;
import fr.gouv.vitamui.referential.common.dsl.VitamQueryHelper;
import fr.gouv.vitamui.referential.common.dto.AccessionRegisterDetailResponseDto;
import fr.gouv.vitamui.referential.common.dto.AccessionRegisterStatsDto;
import fr.gouv.vitamui.referential.common.dto.AccessionRegisterSummaryDto;
import fr.gouv.vitamui.referential.common.dto.AccessionRegisterSummaryResponseDto;
import fr.gouv.vitamui.referential.common.service.AccessionRegisterService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.File;
import java.io.FileNotFoundException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
......@@ -79,8 +78,11 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.and;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.eq;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.in;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.lte;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.ne;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.nin;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.range;
import static fr.gouv.vitam.common.database.builder.query.QueryHelper.wildcard;
......@@ -99,7 +101,14 @@ public class AccessionRegisterSummaryInternalService {
private static final String STATUS = "Status";
private static final String ORIGINATING_AGENCY = "OriginatingAgency";
private static final String DATE_FORMAT = "dd/MM/yyyy";
private static final String START_DATE = "StartDate";
private static final String END_DATE = "EndDate";
private static final String ARCHIVAL_AGREEMENT = "ArchivalAgreement";
private static final String ARCHIVAL_PROFILE = "ArchivalProfile";
private static final String ACQUISITION_INFORMATION = "AcquisitionInformation";
private static final String EVENTS_OPTYPE = "Events.OpType";
private static final String ELIMINATION = "ELIMINATION";
private static final String TRANSFER = "TRANSFER";
private static final String PRESERVATION = "PRESERVATION";
@Autowired
AccessionRegisterSummaryInternalService(AccessionRegisterService accessionRegisterService,
......@@ -129,26 +138,25 @@ public class AccessionRegisterSummaryInternalService {
List<AccessionRegisterSummaryDto> customAccessionRegisterSummaries =
getCustomAccessionRegisterSummaries(vitamContext, detailsSearchDto);
LOGGER.info("################ customAccessionRegisterSummaries : {} ", customAccessionRegisterSummaries);
if(customAccessionRegisterSummaries == null) {
throw new InternalServerException("Unable to find accessionRegister Summaries");
}
long totalUnits = customAccessionRegisterSummaries.stream().parallel()
.map(AccessionRegisterSummaryDto::getTotalUnits)
.map(RegisterValueDetailModel::getRemained).mapToLong(Long::longValue).sum();
.map(RegisterValueDetailModel::getIngested).mapToLong(Long::longValue).sum();
long totalObjectsGroups = customAccessionRegisterSummaries.stream().parallel()
.map(AccessionRegisterSummaryDto::getTotalObjectsGroups)
.map(RegisterValueDetailModel::getRemained).mapToLong(Long::longValue).sum();
.map(RegisterValueDetailModel::getIngested).mapToLong(Long::longValue).sum();
long totalObjects = customAccessionRegisterSummaries.stream().parallel()
.map(AccessionRegisterSummaryDto::getTotalObjects)
.map(RegisterValueDetailModel::getRemained).mapToLong(Long::longValue).sum();
.map(RegisterValueDetailModel::getIngested).mapToLong(Long::longValue).sum();
long objectSizes = customAccessionRegisterSummaries.stream().parallel()
.map(AccessionRegisterSummaryDto::getObjectSize)
.map(RegisterValueDetailModel::getRemained).mapToLong(Long::longValue).sum();
.map(RegisterValueDetailModel::getIngested).mapToLong(Long::longValue).sum();
return new AccessionRegisterStatsDto(totalUnits, totalObjectsGroups, totalObjects, objectSizes);
}
......@@ -156,16 +164,16 @@ public class AccessionRegisterSummaryInternalService {
public List<AccessionRegisterSummaryDto> getCustomAccessionRegisterSummaries(VitamContext context, AccessionRegisterDetailsSearchStatsDto detailsSearchDto) {
RequestResponse<AccessionRegisterSummaryModel> requestResponse;
try {
LOGGER.info("Context application Session ID : {} ", context.getApplicationSessionId());
LOGGER.debug("Context application Session ID : {} ", context.getApplicationSessionId());
JsonNode detailsQuery = buildCustomAccessionRegisterDetailsQuery(detailsSearchDto);
LOGGER.info("################ detailsQuery : {} ", detailsQuery);
RequestResponse<AccessionRegisterDetailModel> accessionRegisterDetails = adminExternalClient
.findAccessionRegisterDetails(context, detailsQuery);
LOGGER.info("################ accessionRegisterDetails : {} ", accessionRegisterDetails);
AccessionRegisterDetailResponseDto results = objectMapper
.treeToValue(accessionRegisterDetails.toJsonNode(), AccessionRegisterDetailResponseDto.class);
LOGGER.info("################ results : {} ", results);
List<String> distinctOriginatingAgencies = new ArrayList<>();
if (results != null) {
......@@ -175,16 +183,13 @@ public class AccessionRegisterSummaryInternalService {
.filter(originatingAgency -> ConcurrentHashMap.newKeySet().add(originatingAgency))
.collect(Collectors.toList());
}
LOGGER.info("################ distinctOriginatingAgencies : {} ", distinctOriginatingAgencies);
LOGGER.debug("Distinct Originating Agencies : {} ", distinctOriginatingAgencies);
JsonNode query = buildCustomAccessionRegisterSummariesQuery(distinctOriginatingAgencies);
LOGGER.info("################ query : {} ", query);
requestResponse = accessionRegisterService.findAccessionRegisterSummaryByQuery(context, query);
LOGGER.info("################ requestResponse.toJsonNode() : {} ", requestResponse.toJsonNode());
final AccessionRegisterSummaryResponseDto accessionRegisterSummaryResponseDto = objectMapper
.treeToValue(requestResponse.toJsonNode(), AccessionRegisterSummaryResponseDto.class);
LOGGER.info("################ accessionRegisterSummaryResponseDto : {} ", accessionRegisterSummaryResponseDto);
return AccessionRegisterSummaryConverter.convertVitamsToDtos(accessionRegisterSummaryResponseDto.getResults());
} catch (JsonProcessingException | VitamClientException | InvalidCreateOperationException | ParseException e) {
throw new InternalServerException("Unable to find accessionRegister Summaries", e);
......@@ -199,7 +204,6 @@ public class AccessionRegisterSummaryInternalService {
if(detailsSearchDto.getSearchText() != null) {
query.add(wildcard(ORIGINATING_AGENCY, "*"+detailsSearchDto.getSearchText()+"*"));
select.setQuery(query);
}
if(detailsSearchDto.getStatusFilter() != null && !detailsSearchDto.getStatusFilter().isEmpty()
......@@ -208,27 +212,75 @@ public class AccessionRegisterSummaryInternalService {
query.add(in(STATUS, stringValues.toArray(new String[] {})));
}
if(detailsSearchDto.getDateInterval() != null) {
AccessionRegisterDetailsSearchStatsDto.DateInterval dateInterval = detailsSearchDto.getDateInterval();
addStartDateToQuery(query, detailsSearchDto.getDateInterval());
if(detailsSearchDto.getAdvancedSearch() != null) {
AccessionRegisterDetailsSearchStatsDto.AdvancedSearchData advancedSearch = detailsSearchDto.getAdvancedSearch();
addQueryFrom(query, advancedSearch.getOriginatingAgencies(), ORIGINATING_AGENCY);
addQueryFrom(query, advancedSearch.getArchivalAgreements(), ARCHIVAL_AGREEMENT);
addQueryFrom(query, advancedSearch.getArchivalProfiles(), ARCHIVAL_PROFILE);
if(CollectionUtils.isNotEmpty(advancedSearch.getAcquisitionInformations())) {
List<String> acquisitionInformations = new ArrayList<>(VitamQueryHelper.staticAcquisitionInformations);
acquisitionInformations.removeAll(advancedSearch.getAcquisitionInformations());
if(!acquisitionInformations.isEmpty()) {
query.add(nin(ACQUISITION_INFORMATION, acquisitionInformations.toArray(new String[] {})));
}
}
addEventOpTypeQuery(query, advancedSearch.getElimination(), ELIMINATION);
addEventOpTypeQuery(query, advancedSearch.getElimination(), TRANSFER);
addEventOpTypeQuery(query, advancedSearch.getElimination(), PRESERVATION);
}
if(!query.getQueries().isEmpty()) {
select.setQuery(query);
}
return select.getFinalSelect();
}
private static void addStartDateToQuery(BooleanQuery query, AccessionRegisterDetailsSearchStatsDto.EndDateInterval dateInterval)
throws ParseException, InvalidCreateOperationException {
if(dateInterval != null) {
SimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT);
String dateMinStr = dateInterval.getStartDateMin();
String dateMaxStr = dateInterval.getStartDateMax();
String dateMinStr = dateInterval.getEndDateMin();
String dateMaxStr = dateInterval.getEndDateMax();
if(dateMinStr != null && dateMaxStr == null) {
query.add(lte(START_DATE, formatter.parse(dateMinStr)));
if (dateMinStr != null && dateMaxStr == null) {
query.add(lte(END_DATE, formatter.parse(dateMinStr)));
}
if(dateMinStr == null && dateMaxStr != null) {
query.add(lte(START_DATE, formatter.parse(dateMaxStr)));
if (dateMinStr == null && dateMaxStr != null) {
query.add(lte(END_DATE, formatter.parse(dateMaxStr)));
}
if(dateMinStr != null && dateMaxStr != null) {
query.add(range(START_DATE, formatter.parse(dateMinStr), true, formatter.parse(dateMaxStr), false));
if (dateMinStr != null && dateMaxStr != null) {
query.add(range(END_DATE, formatter.parse(dateMinStr), true, formatter.parse(dateMaxStr), false));
}
}
}
return select.getFinalSelect();
private static void addQueryFrom(BooleanQuery query, List<String> values, String searchKeyUpperCase)
throws InvalidCreateOperationException {
if(CollectionUtils.isNotEmpty(values)) {
query.add(in(searchKeyUpperCase, values.toArray(new String[] {})));
}
}
private static void addEventOpTypeQuery(BooleanQuery query, String value, String searchKeyUpperCase)
throws InvalidCreateOperationException {
if(value != null && !value.equals("all")) {
boolean cond = Boolean.parseBoolean(value);
if(cond) {
query.add(eq(EVENTS_OPTYPE, searchKeyUpperCase));
} else {
query.add(ne(EVENTS_OPTYPE, searchKeyUpperCase));
}
}
}
public static JsonNode buildCustomAccessionRegisterSummariesQuery(List<String> distinctOriginatingAgencies)
......
......@@ -9,12 +9,24 @@ import java.util.Map;
public class AccessionRegisterDetailsSearchStatsDto {
private String searchText;
private Map<String, List<String>> statusFilter;
private DateInterval dateInterval;
private EndDateInterval dateInterval;
private AdvancedSearchData advancedSearch;
@Data
public static class DateInterval {
private String startDateMin;
private String startDateMax;
public static class EndDateInterval {
private String endDateMin;
private String endDateMax;
}
@Data
public static class AdvancedSearchData {
private List<String> originatingAgencies;
private List<String> archivalAgreements;
private List<String> archivalProfiles;
private List<String> acquisitionInformations;
private String elimination;
private String transfer;
private String preservation;
}
}
......@@ -41,8 +41,9 @@ import { AsyncValidatorFn, ControlValueAccessor, FormControl, ValidatorFn } from