From df4802c8561dbc7763f92118f177956ca3e72cce Mon Sep 17 00:00:00 2001 From: ialbert Date: Mon, 3 Jul 2023 18:47:51 +0300 Subject: [PATCH] =?UTF-8?q?dbf-exporter/clearing-service:=20=D0=B8=D0=B7?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB=20=D0=B7=D0=B0=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=20SDf05#TM=20=D0=B8=20DBF=20?= =?UTF-8?q?=D1=82=D0=B8=D0=BF=20DATE=20->=20CHARACTER(8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../spcex/clearing/session/stage/impl/FinishingSession.java | 5 ++++- .../dbf/exporter/services/converters/S_DF05_Converter.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/session/stage/impl/FinishingSession.java b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/session/stage/impl/FinishingSession.java index 7d4fc50dd..26e433093 100644 --- a/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/session/stage/impl/FinishingSession.java +++ b/clearing-parent/clearing-service/src/main/java/ru/spcex/clearing/session/stage/impl/FinishingSession.java @@ -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()); diff --git a/clearing-parent/dbf-exporter/src/main/java/ru/spcex/clearing/dbf/exporter/services/converters/S_DF05_Converter.java b/clearing-parent/dbf-exporter/src/main/java/ru/spcex/clearing/dbf/exporter/services/converters/S_DF05_Converter.java index 74922f6df..592ca73e9 100644 --- a/clearing-parent/dbf-exporter/src/main/java/ru/spcex/clearing/dbf/exporter/services/converters/S_DF05_Converter.java +++ b/clearing-parent/dbf-exporter/src/main/java/ru/spcex/clearing/dbf/exporter/services/converters/S_DF05_Converter.java @@ -27,7 +27,7 @@ public class S_DF05_Converter extends DFConverter { 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); }