reports-service: fixes

This commit is contained in:
akulikov 2024-05-20 14:41:40 +03:00
parent c5cad4d27c
commit 09e47209aa
2 changed files with 32 additions and 18 deletions

View file

@ -48,6 +48,10 @@ public class KSRepCashRegisterSumsReport {
@CsvBindByPosition(position = 8) @CsvBindByPosition(position = 8)
private String operType; private String operType;
@CsvBindByName(column = "CURRENCY")
@CsvBindByPosition(position = 9)
private String currency;
public String getFirmId() { public String getFirmId() {
return firmId; return firmId;
@ -120,4 +124,12 @@ public class KSRepCashRegisterSumsReport {
public void setOperType(String operType) { public void setOperType(String operType) {
this.operType = operType; this.operType = operType;
} }
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
} }

View file

@ -107,7 +107,8 @@ public class KSRepCashRegisterSumsReportBuilder extends CSVReportBuilder<EmptyPa
pairRegistryPredicate pairRegistryPredicate
) )
); );
if (pairRegistries.isEmpty()) log.warn("Pair AM_T registry for registry (id = {}) not found", registry.getId()); if (pairRegistries.isEmpty())
log.warn("Pair AM_T registry for registry (id = {}) not found", registry.getId());
pairRegistry = pairRegistries.iterator().next(); pairRegistry = pairRegistries.iterator().next();
if (pairRegistries.size() > 1) { if (pairRegistries.size() > 1) {
log.warn("For registry (id = {}) found > 1 AM_T registry, use first (id = {})", log.warn("For registry (id = {}) found > 1 AM_T registry, use first (id = {})",
@ -146,6 +147,7 @@ public class KSRepCashRegisterSumsReportBuilder extends CSVReportBuilder<EmptyPa
ksRepCashRegisterSumsReport.setAddTime(LocalTime.ofInstant(addTime, getReportZoneId())); ksRepCashRegisterSumsReport.setAddTime(LocalTime.ofInstant(addTime, getReportZoneId()));
ksRepCashRegisterSumsReport.setAddDate(addDate); ksRepCashRegisterSumsReport.setAddDate(addDate);
ksRepCashRegisterSumsReport.setOperType(operType.getCode()); ksRepCashRegisterSumsReport.setOperType(operType.getCode());
ksRepCashRegisterSumsReport.setCurrency(registry.getSecuritySymbol());
rows.add(ksRepCashRegisterSumsReport); rows.add(ksRepCashRegisterSumsReport);
} }
} }