This commit is contained in:
parent
37ef9ec2d6
commit
557b9333b5
2 changed files with 4 additions and 7 deletions
|
|
@ -13,6 +13,7 @@ import com.linuxense.javadbf.DBFWriter;
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.sdf.SDf02;
|
||||||
import ru.spcex.clearing.dbf.exporter.config.SFTPConfig;
|
import ru.spcex.clearing.dbf.exporter.config.SFTPConfig;
|
||||||
import ru.spcex.clearing.dbf.exporter.config.settings.ExportDBFServiceSettings;
|
import ru.spcex.clearing.dbf.exporter.config.settings.ExportDBFServiceSettings;
|
||||||
import ru.spcex.clearing.dbf.exporter.exceptions.ConfigException;
|
import ru.spcex.clearing.dbf.exporter.exceptions.ConfigException;
|
||||||
|
|
@ -87,7 +88,7 @@ public class ExportFromHazelcast extends Stage implements InitializingBean {
|
||||||
if (Table.S_DF02 == resultContainer.getTableForExport()) {
|
if (Table.S_DF02 == resultContainer.getTableForExport()) {
|
||||||
log.trace("Sort S_DF02 items"); // Сортировка по возрастанию id, чтобы сохранить последовательность строк SDF02, как в SDF01
|
log.trace("Sort S_DF02 items"); // Сортировка по возрастанию id, чтобы сохранить последовательность строк SDF02, как в SDF01
|
||||||
tableRows = new ArrayList<SpcexObjectBase>(tableRows);
|
tableRows = new ArrayList<SpcexObjectBase>(tableRows);
|
||||||
((ArrayList<SpcexObjectBase>) tableRows).sort(Comparator.comparing(SpcexObjectBase::getId));
|
((ArrayList<SDf02>) tableRows).sort(Comparator.comparing(SDf02::getInSDfId));
|
||||||
}
|
}
|
||||||
DFConverter currentConverter = null;
|
DFConverter currentConverter = null;
|
||||||
for (SpcexObjectBase value : tableRows) {
|
for (SpcexObjectBase value : tableRows) {
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,8 @@ public class ExportFromHazelcast {
|
||||||
tableRows = map.getAllValues();
|
tableRows = map.getAllValues();
|
||||||
}
|
}
|
||||||
if (table == Table.S_DF02) {
|
if (table == Table.S_DF02) {
|
||||||
((ArrayList<SpcexObjectBase>) tableRows).sort(Comparator.comparing(SpcexObjectBase::getId));
|
tableRows = new ArrayList<SpcexObjectBase>(tableRows);
|
||||||
|
((ArrayList<SDf02>) tableRows).sort(Comparator.comparing(SDf02::getInSDfId));
|
||||||
}
|
}
|
||||||
if (tableRows.isEmpty()) {
|
if (tableRows.isEmpty()) {
|
||||||
log.info("uuid {}. Map {} is empty, generationId {}", resultContainer.getUuid(), resultContainer.getTableForExport().getHazelcastMapName(), resultContainer.getGroupId());
|
log.info("uuid {}. Map {} is empty, generationId {}", resultContainer.getUuid(), resultContainer.getTableForExport().getHazelcastMapName(), resultContainer.getGroupId());
|
||||||
|
|
@ -148,11 +149,6 @@ public class ExportFromHazelcast {
|
||||||
log.debug("uuid {}. Selected {} records from map {}, generationId {}", resultContainer.getUuid(),
|
log.debug("uuid {}. Selected {} records from map {}, generationId {}", resultContainer.getUuid(),
|
||||||
tableRows.size(), resultContainer.getTableForExport().getHazelcastMapName(), resultContainer.getGroupId());
|
tableRows.size(), resultContainer.getTableForExport().getHazelcastMapName(), resultContainer.getGroupId());
|
||||||
}
|
}
|
||||||
if (Table.S_DF02 == resultContainer.getTableForExport()) {
|
|
||||||
log.trace("Sort S_DF02 items"); // Сортировка по возрастанию id, чтобы сохранить последовательность строк SDF02, как в SDF01
|
|
||||||
tableRows = new ArrayList<SpcexObjectBase>(tableRows);
|
|
||||||
((ArrayList<SpcexObjectBase>) tableRows).sort(Comparator.comparing(SpcexObjectBase::getId));
|
|
||||||
}
|
|
||||||
|
|
||||||
String messageId = "";
|
String messageId = "";
|
||||||
for (SpcexObjectBase s : tableRows) {
|
for (SpcexObjectBase s : tableRows) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue