Merge branch 'report_25_26_29' into dev

This commit is contained in:
AKurakin 2023-01-11 17:08:20 +03:00
commit ef3c8046ad
3 changed files with 9 additions and 2 deletions

View file

@ -30,6 +30,10 @@ report-service
"endDate":null
}}
Параметр reportId определяет тип отчтов:
GREP - все ежемесчные
DAILY - все ежедневные
или можно указать по названию файла (пример: "REPBR.0420312_р1-1", см. enum ReportId)
Настройки
---------

View file

@ -18,6 +18,7 @@ import ru.spcex.platform.utils.log.ExceptionUtils;
import java.io.IOException;
import java.time.LocalDate;
import static ru.spcex.clearing.reports.services.ReportsServiceCommand.QUEUE_RUN_DAILY_REPORT_COMMAND;
import static ru.spcex.clearing.reports.services.ReportsServiceCommand.QUEUE_RUN_REPORT_COMMAND;
@Service
@ -64,7 +65,8 @@ public class QCommandExecutor extends QueueConsumer implements InitializingBean
throw new IllegalStateException("StartDate > EndDate");
try {
if (QUEUE_RUN_REPORT_COMMAND.equals(request.getReportId())) {
if (QUEUE_RUN_REPORT_COMMAND.equals(request.getReportId())
|| QUEUE_RUN_DAILY_REPORT_COMMAND.equals(request.getReportId())) {
log.info("Generate all report by command {}", request.getReportId());
reportsServiceCommand.generateReportAll(request.getReportId(), startDate, endDate);
} else {

View file

@ -28,6 +28,7 @@ import java.util.Map;
@Service
public class ReportsServiceCommand implements InitializingBean {
public static final String QUEUE_RUN_REPORT_COMMAND = "GREP"; // см. Task.createReport
public static final String QUEUE_RUN_DAILY_REPORT_COMMAND = "DAILY";
private final Logger log = LoggerFactory.getLogger(getClass());
@ -77,7 +78,7 @@ public class ReportsServiceCommand implements InitializingBean {
}
}
for (SimpleReportCollector<?> reportDataCollector : allSimpleReports) {
if (reportGroup == null || QUEUE_RUN_REPORT_COMMAND.equals(reportGroup)) {
if (reportGroup == null || QUEUE_RUN_DAILY_REPORT_COMMAND.equals(reportGroup)) {
makeSingleReport(reportDataCollector);
}
}