reports-service поправил тип ReportDataCollector

This commit is contained in:
AKurakin 2022-12-26 17:20:54 +03:00
parent 47df118474
commit 8f79cf6056
5 changed files with 10 additions and 8 deletions

View file

@ -11,7 +11,7 @@ import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.List;
public abstract class ReportDataCollector<T extends AbstractReport, R> {
public abstract class ReportDataCollector<T extends AbstractReport> {
public static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("dd.MM.yyyy");
public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("dd.MM.yyyy'T'HH:mm:ss");
@ -22,7 +22,7 @@ public abstract class ReportDataCollector<T extends AbstractReport, R> {
* T extends ReportWithPeriod
* @return
*/
abstract public R collectReportWithPeriod(LocalDate startDate, LocalDate endDate);
abstract public T collectReportWithPeriod(LocalDate startDate, LocalDate endDate);
// /**
// * T extends ReportWithClearingStatus
@ -33,14 +33,16 @@ public abstract class ReportDataCollector<T extends AbstractReport, R> {
// abstract public List<T> collectReportWithClearingStatus(LocalDate startDate, LocalDate endDate, String clearingStatus);
/**
*
* todo убрать метод, он уже лишний
* @param startDate
* @param endDate
* @param dateTimeNow LocalDateTime.now()
* @return
*/
@Deprecated
abstract public String getFileName(LocalDate startDate, LocalDate endDate, LocalDateTime dateTimeNow);
public String getFileName(LocalDate startDate, LocalDate endDate, LocalDateTime dateTimeNow) {
throw new IllegalArgumentException("deprecated");
}
protected String toString(Long val) {

View file

@ -23,7 +23,7 @@ import java.util.*;
import java.util.stream.Collectors;
@Component
public class Bt17_1_P1_collector extends ReportDataCollector<ReportBR_0420315_P1, ReportBR_0420315_P1> {
public class Bt17_1_P1_collector extends ReportDataCollector<ReportBR_0420315_P1> {
protected static final List<String> ALLOW_CLEARING_MEMBER_CATEGORY = Arrays.asList(ClearingCategory.I.getKey(), ClearingCategory.V.getKey());
protected static final String ALLOW_CLEARING_STATUS = ClearingStatus.OK.getKey();

View file

@ -15,7 +15,7 @@ import java.time.LocalDateTime;
import java.util.*;
@Component
public class Bt17_1_P2_collector extends ReportDataCollector<ReportBR_0420315_P2, ReportBR_0420315_P2> {
public class Bt17_1_P2_collector extends ReportDataCollector<ReportBR_0420315_P2> {
private Imdg<LiabilitiesClaimsAssets> liabilitiesClaimsAssetsImdg;
@Autowired

View file

@ -18,7 +18,7 @@ import java.time.LocalDateTime;
import java.util.*;
@Component
public class Bt17_2_collector extends ReportDataCollector<ReportBR_0420317, ReportBR_0420317> {
public class Bt17_2_collector extends ReportDataCollector<ReportBR_0420317> {
private Imdg<Company> companyImdg;
private Imdg<Relation> relationImdg;
private Imdg<CompanySymbols> companySymbolsImdg;

View file

@ -18,7 +18,7 @@ import java.util.Collection;
import java.util.Map;
@Component
public class Bt17_5_P1_collector extends ReportDataCollector<ReportBR_0420312_P1, ReportBR_0420312_P1> {
public class Bt17_5_P1_collector extends ReportDataCollector<ReportBR_0420312_P1> {
private Imdg<Company> companyImdg;
private Imdg<Relation> relationImdg;
private Imdg<CompanySymbols> companySymbolsImdg;