SDF07 SUM/CLIENTN/INN/BIC/SPEC/NUMBER/RESULT
swt-exporter Charset.forName("windows-1251")
This commit is contained in:
parent
4316830043
commit
f00cf0ee3b
2 changed files with 9 additions and 8 deletions
|
|
@ -31,16 +31,16 @@ public class S_DF07_Converter extends DFConverter<SDf07> {
|
||||||
public DBFField[] getDBFHeaders() {
|
public DBFField[] getDBFHeaders() {
|
||||||
List<DBFField> dbfFields = new LinkedList<>();
|
List<DBFField> dbfFields = new LinkedList<>();
|
||||||
dbfFields.add(new DBFField("ACCOUNT", DBFDataType.CHARACTER, 20));
|
dbfFields.add(new DBFField("ACCOUNT", DBFDataType.CHARACTER, 20));
|
||||||
dbfFields.add(new DBFField("SUM", DBFDataType.NUMERIC, 32, 18));
|
dbfFields.add(new DBFField("SUM", DBFDataType.NUMERIC, 32, 2));
|
||||||
dbfFields.add(new DBFField("MARKET", DBFDataType.CHARACTER, 1));
|
dbfFields.add(new DBFField("MARKET", DBFDataType.CHARACTER, 1));
|
||||||
dbfFields.add(new DBFField("TYPE", DBFDataType.CHARACTER, 2));
|
dbfFields.add(new DBFField("TYPE", DBFDataType.CHARACTER, 2));
|
||||||
dbfFields.add(new DBFField("DEAL", DBFDataType.CHARACTER, 10));
|
dbfFields.add(new DBFField("DEAL", DBFDataType.CHARACTER, 10));
|
||||||
dbfFields.add(new DBFField("CLIENT_N", DBFDataType.CHARACTER, 35));
|
dbfFields.add(new DBFField("CLIENTN", DBFDataType.CHARACTER, 35));
|
||||||
dbfFields.add(new DBFField("_I_N_N", DBFDataType.NUMERIC, 32, 18));
|
dbfFields.add(new DBFField("INN", DBFDataType.NUMERIC, 32, 18));
|
||||||
dbfFields.add(new DBFField("_B_I_C", DBFDataType.NUMERIC, 32, 18));
|
dbfFields.add(new DBFField("BIC", DBFDataType.NUMERIC, 32, 18));
|
||||||
dbfFields.add(new DBFField("_S_P_E_C", DBFDataType.CHARACTER, 254));
|
dbfFields.add(new DBFField("SPEC", DBFDataType.CHARACTER, 254));
|
||||||
dbfFields.add(new DBFField("NUMBER", DBFDataType.NUMERIC, 32, 18));
|
dbfFields.add(new DBFField("NUMBER", DBFDataType.NUMERIC, 10));
|
||||||
dbfFields.add(new DBFField("RESULT", DBFDataType.NUMERIC, 32, 18));
|
dbfFields.add(new DBFField("RESULT", DBFDataType.NUMERIC, 1));
|
||||||
return dbfFields.toArray(DBFField[]::new);
|
return dbfFields.toArray(DBFField[]::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
@ -137,7 +138,7 @@ public abstract class AbstractExporterService<T extends SpcexObjectBase> {
|
||||||
// protected abstract String[] swtHeader();
|
// protected abstract String[] swtHeader();
|
||||||
|
|
||||||
protected void makeSWTData(SWTHeaderData header, Collection<T> records, OutputStream outStream) {
|
protected void makeSWTData(SWTHeaderData header, Collection<T> records, OutputStream outStream) {
|
||||||
try (PrintWriter out = new PrintWriter(outStream)) {
|
try (PrintWriter out = new PrintWriter(outStream, false, Charset.forName("windows-1251"))) {
|
||||||
out.print(header.buildString());
|
out.print(header.buildString());
|
||||||
int totalSize = records.size();
|
int totalSize = records.size();
|
||||||
int counter = totalSize == 0 ? 0 : 1; // нумерация начинается с 1
|
int counter = totalSize == 0 ? 0 : 1; // нумерация начинается с 1
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue