dbf-exporter/clearing-service: изменил заполнение SDf05#TM и DBF тип DATE -> CHARACTER(8)

This commit is contained in:
ialbert 2023-07-03 18:47:51 +03:00
parent ccc6538225
commit df4802c856
2 changed files with 5 additions and 2 deletions

View file

@ -32,6 +32,7 @@ import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.Collection;
import static ru.spcex.clearing.error.ClearingErrorInternal.SessionGeneralError;
@ -136,12 +137,14 @@ public class FinishingSession implements ISessionStage {
return result;
}
private static DateTimeFormatter tmTimeFormatter = DateTimeFormatter.ofPattern("hh:mm:ss");
private void sendSdf05() {
SDf05 sdf05 = new SDf05();
sdf05.setId(imdgProvider.getImdgIdGenerator().nextId());
sdf05.setTp(BigDecimal.valueOf(753));
sdf05.setDt(LocalDate.now());
sdf05.setTm(LocalTime.now().toString()); // todo уточнить формат для sdf05
sdf05.setTm(LocalTime.now().format(tmTimeFormatter));
sdf05.setPr("3");
sdf05.setGenerationTime(Instant.now());
sdf05.setGenerationId(imdgProvider.getImdgIdGenerator().nextId());

View file

@ -27,7 +27,7 @@ public class S_DF05_Converter extends DFConverter<SDf05> {
Date date = new Date();
dbfFields.add(new DBFField("TP", DBFDataType.NUMERIC, 32, 18));
dbfFields.add(new DBFField("DT", DBFDataType.DATE));
dbfFields.add(new DBFField("TM", DBFDataType.DATE));
dbfFields.add(new DBFField("TM", DBFDataType.CHARACTER, 8));
dbfFields.add(new DBFField("PR", DBFDataType.CHARACTER, 1));
return dbfFields.toArray(DBFField[]::new);
}