@@ -112,10 +112,10 @@ public class ViolationHandler implements RequestHandler {
|
||||
);
|
||||
} else {
|
||||
violationPage = violationService.getViolationsByFiles(
|
||||
targetFiles,
|
||||
violationRequest.getPage(), violationRequest.getSize(), violationRequest.getSortDirection()
|
||||
);
|
||||
targetFiles, violationRequest.getPage(), violationRequest.getSize(),
|
||||
violationRequest.getSortDirection());
|
||||
}
|
||||
|
||||
ViolationResponse.ViolationDto firstShowViolation = null;
|
||||
List<Violation> content = violationPage.getContent();
|
||||
List<ViolationResponse.ViolationDto> violationDtos = new ArrayList<>();
|
||||
@@ -129,7 +129,8 @@ public class ViolationHandler implements RequestHandler {
|
||||
}
|
||||
|
||||
for (Violation violation : content) {
|
||||
if (firstShowViolation != null && Objects.equals(firstShowViolation.getId(), violation.getId())) continue;
|
||||
if (violation.getStatus().equals(ViolationStatus.NOT_OWNER_FILE.name()) ||
|
||||
firstShowViolation != null && Objects.equals(firstShowViolation.getId(), violation.getId())) continue;
|
||||
|
||||
ViolationResponse.ViolationDto violationDto = ViolationResponse.ViolationDto.fromEntity(violation);
|
||||
violationDto.setCountry(geoCountryService.getCountryName(violation.getPageUrl()));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package ru.soune.nocopy.service.violation;
|
||||
|
||||
public enum ViolationStatus {
|
||||
NEW , SHOWED, LEGAL_IN_WORK, COMPLAINT_IN_WORK, COMPLAINT_AND_LEGAL_IN_WORK , AUTHORIZED_USE
|
||||
NEW , SHOWED, LEGAL_IN_WORK, COMPLAINT_IN_WORK, COMPLAINT_AND_LEGAL_IN_WORK , AUTHORIZED_USE, NOT_OWNER_FILE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user