diff --git a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Keys.java b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Keys.java index 88de130b..2c06ade1 100644 --- a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Keys.java +++ b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Keys.java @@ -5,14 +5,10 @@ package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangeloglock; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Files; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OkopfRecords; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OrgOkved; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Shedlock; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.DatabasechangeloglockRecord; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.FilesRecord; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.OkopfRecordsRecord; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.OrgOkvedRecord; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.ShedlockRecord; import org.jooq.TableField; @@ -33,9 +29,6 @@ public class Keys { // ------------------------------------------------------------------------- public static final UniqueKey DATABASECHANGELOGLOCK_PKEY = Internal.createUniqueKey(Databasechangeloglock.DATABASECHANGELOGLOCK, DSL.name("databasechangeloglock_pkey"), new TableField[] { Databasechangeloglock.DATABASECHANGELOGLOCK.ID }, true); - public static final UniqueKey FILES_PKEY = Internal.createUniqueKey(Files.FILES, DSL.name("files_pkey"), new TableField[] { Files.FILES.FILE_ID }, true); - public static final UniqueKey OKOPF_RECORDS_NAME_KEY = Internal.createUniqueKey(OkopfRecords.OKOPF_RECORDS, DSL.name("okopf_records_name_key"), new TableField[] { OkopfRecords.OKOPF_RECORDS.NAME }, true); public static final UniqueKey OKOPF_RECORDS_PKEY = Internal.createUniqueKey(OkopfRecords.OKOPF_RECORDS, DSL.name("okopf_records_pkey"), new TableField[] { OkopfRecords.OKOPF_RECORDS.OKOPF_RECORDS_ID }, true); - public static final UniqueKey ORG_OKVED_PKEY = Internal.createUniqueKey(OrgOkved.ORG_OKVED, DSL.name("org_okved_pkey"), new TableField[] { OrgOkved.ORG_OKVED.ID }, true); public static final UniqueKey SHEDLOCK_PK = Internal.createUniqueKey(Shedlock.SHEDLOCK, DSL.name("shedlock_pk"), new TableField[] { Shedlock.SHEDLOCK.NAME }, true); } diff --git a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Public.java b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Public.java index c622294d..e29a154a 100644 --- a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Public.java +++ b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Public.java @@ -7,10 +7,8 @@ package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.DefaultCatalog; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangelog; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangeloglock; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Files; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.InteractionLog; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OkopfRecords; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OrgOkved; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Shedlock; import java.util.Arrays; @@ -44,11 +42,6 @@ public class Public extends SchemaImpl { */ public final Databasechangeloglock DATABASECHANGELOGLOCK = Databasechangeloglock.DATABASECHANGELOGLOCK; - /** - * The table public.files. - */ - public final Files FILES = Files.FILES; - /** * The table public.interaction_log. */ @@ -59,11 +52,6 @@ public class Public extends SchemaImpl { */ public final OkopfRecords OKOPF_RECORDS = OkopfRecords.OKOPF_RECORDS; - /** - * The table public.org_okved. - */ - public final OrgOkved ORG_OKVED = OrgOkved.ORG_OKVED; - /** * The table public.shedlock. */ @@ -87,10 +75,8 @@ public class Public extends SchemaImpl { return Arrays.asList( Databasechangelog.DATABASECHANGELOG, Databasechangeloglock.DATABASECHANGELOGLOCK, - Files.FILES, InteractionLog.INTERACTION_LOG, OkopfRecords.OKOPF_RECORDS, - OrgOkved.ORG_OKVED, Shedlock.SHEDLOCK ); } diff --git a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Tables.java b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Tables.java index d35dfe07..a3352ecd 100644 --- a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Tables.java +++ b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/Tables.java @@ -6,10 +6,8 @@ package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangelog; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Databasechangeloglock; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Files; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.InteractionLog; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OkopfRecords; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OrgOkved; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Shedlock; @@ -29,11 +27,6 @@ public class Tables { */ public static final Databasechangeloglock DATABASECHANGELOGLOCK = Databasechangeloglock.DATABASECHANGELOGLOCK; - /** - * The table public.files. - */ - public static final Files FILES = Files.FILES; - /** * The table public.interaction_log. */ @@ -44,11 +37,6 @@ public class Tables { */ public static final OkopfRecords OKOPF_RECORDS = OkopfRecords.OKOPF_RECORDS; - /** - * The table public.org_okved. - */ - public static final OrgOkved ORG_OKVED = OrgOkved.ORG_OKVED; - /** * The table public.shedlock. */ diff --git a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/Files.java b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/Files.java deleted file mode 100644 index 50a0e23a..00000000 --- a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/Files.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables; - - -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Keys; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Public; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.FilesRecord; - -import java.util.Collection; - -import org.jooq.Condition; -import org.jooq.Field; -import org.jooq.Identity; -import org.jooq.Name; -import org.jooq.PlainSQL; -import org.jooq.QueryPart; -import org.jooq.SQL; -import org.jooq.Schema; -import org.jooq.Select; -import org.jooq.Stringly; -import org.jooq.Table; -import org.jooq.TableField; -import org.jooq.TableOptions; -import org.jooq.UniqueKey; -import org.jooq.impl.DSL; -import org.jooq.impl.SQLDataType; -import org.jooq.impl.TableImpl; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Files extends TableImpl { - - private static final long serialVersionUID = 1L; - - /** - * The reference instance of public.files - */ - public static final Files FILES = new Files(); - - /** - * The class holding records for this type - */ - @Override - public Class getRecordType() { - return FilesRecord.class; - } - - /** - * The column public.files.file_id. - */ - public final TableField FILE_ID = createField(DSL.name("file_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, ""); - - /** - * The column public.files.file. - */ - public final TableField FILE = createField(DSL.name("file"), SQLDataType.BLOB, this, ""); - - /** - * The column public.files.file_name. - */ - public final TableField FILE_NAME = createField(DSL.name("file_name"), SQLDataType.VARCHAR(10000), this, ""); - - /** - * The column public.files.interaction_log_id. - */ - public final TableField INTERACTION_LOG_ID = createField(DSL.name("interaction_log_id"), SQLDataType.BIGINT, this, ""); - - private Files(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null, null); - } - - private Files(Name alias, Table aliased, Field[] parameters, Condition where) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); - } - - /** - * Create an aliased public.files table reference - */ - public Files(String alias) { - this(DSL.name(alias), FILES); - } - - /** - * Create an aliased public.files table reference - */ - public Files(Name alias) { - this(alias, FILES); - } - - /** - * Create a public.files table reference - */ - public Files() { - this(DSL.name("files"), null); - } - - @Override - public Schema getSchema() { - return aliased() ? null : Public.PUBLIC; - } - - @Override - public Identity getIdentity() { - return (Identity) super.getIdentity(); - } - - @Override - public UniqueKey getPrimaryKey() { - return Keys.FILES_PKEY; - } - - @Override - public Files as(String alias) { - return new Files(DSL.name(alias), this); - } - - @Override - public Files as(Name alias) { - return new Files(alias, this); - } - - @Override - public Files as(Table alias) { - return new Files(alias.getQualifiedName(), this); - } - - /** - * Rename this table - */ - @Override - public Files rename(String name) { - return new Files(DSL.name(name), null); - } - - /** - * Rename this table - */ - @Override - public Files rename(Name name) { - return new Files(name, null); - } - - /** - * Rename this table - */ - @Override - public Files rename(Table name) { - return new Files(name.getQualifiedName(), null); - } - - /** - * Create an inline derived table from this table - */ - @Override - public Files where(Condition condition) { - return new Files(getQualifiedName(), aliased() ? this : null, null, condition); - } - - /** - * Create an inline derived table from this table - */ - @Override - public Files where(Collection conditions) { - return where(DSL.and(conditions)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public Files where(Condition... conditions) { - return where(DSL.and(conditions)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public Files where(Field condition) { - return where(DSL.condition(condition)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public Files where(SQL condition) { - return where(DSL.condition(condition)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public Files where(@Stringly.SQL String condition) { - return where(DSL.condition(condition)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public Files where(@Stringly.SQL String condition, Object... binds) { - return where(DSL.condition(condition, binds)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public Files where(@Stringly.SQL String condition, QueryPart... parts) { - return where(DSL.condition(condition, parts)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public Files whereExists(Select select) { - return where(DSL.exists(select)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public Files whereNotExists(Select select) { - return where(DSL.notExists(select)); - } -} diff --git a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/InteractionLog.java b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/InteractionLog.java index afd65e42..fb2043b6 100644 --- a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/InteractionLog.java +++ b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/InteractionLog.java @@ -99,6 +99,11 @@ public class InteractionLog extends TableImpl { */ public final TableField ERVU_ID = createField(DSL.name("ervu_id"), SQLDataType.VARCHAR(36), this, ""); + /** + * The column public.interaction_log.offset. + */ + public final TableField OFFSET = createField(DSL.name("offset"), SQLDataType.VARCHAR(10), this, ""); + private InteractionLog(Name alias, Table aliased) { this(alias, aliased, (Field[]) null, null); } diff --git a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/OkopfRecords.java b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/OkopfRecords.java index 7f2e0bfe..e9671919 100644 --- a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/OkopfRecords.java +++ b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/OkopfRecords.java @@ -8,9 +8,7 @@ import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Keys; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Public; import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.OkopfRecordsRecord; -import java.util.Arrays; import java.util.Collection; -import java.util.List; import org.jooq.Condition; import org.jooq.Field; @@ -105,11 +103,6 @@ public class OkopfRecords extends TableImpl { return Keys.OKOPF_RECORDS_PKEY; } - @Override - public List> getUniqueKeys() { - return Arrays.asList(Keys.OKOPF_RECORDS_NAME_KEY); - } - @Override public OkopfRecords as(String alias) { return new OkopfRecords(DSL.name(alias), this); diff --git a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/OrgOkved.java b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/OrgOkved.java deleted file mode 100644 index ba8d15a1..00000000 --- a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/OrgOkved.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables; - - -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Keys; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.Public; -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records.OrgOkvedRecord; - -import java.util.Collection; - -import org.jooq.Condition; -import org.jooq.Field; -import org.jooq.Identity; -import org.jooq.Name; -import org.jooq.PlainSQL; -import org.jooq.QueryPart; -import org.jooq.SQL; -import org.jooq.Schema; -import org.jooq.Select; -import org.jooq.Stringly; -import org.jooq.Table; -import org.jooq.TableField; -import org.jooq.TableOptions; -import org.jooq.UniqueKey; -import org.jooq.impl.DSL; -import org.jooq.impl.SQLDataType; -import org.jooq.impl.TableImpl; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class OrgOkved extends TableImpl { - - private static final long serialVersionUID = 1L; - - /** - * The reference instance of public.org_okved - */ - public static final OrgOkved ORG_OKVED = new OrgOkved(); - - /** - * The class holding records for this type - */ - @Override - public Class getRecordType() { - return OrgOkvedRecord.class; - } - - /** - * The column public.org_okved.id. - */ - public final TableField ID = createField(DSL.name("id"), SQLDataType.BIGINT.nullable(false).identity(true), this, ""); - - /** - * The column public.org_okved.code. - */ - public final TableField CODE = createField(DSL.name("code"), SQLDataType.VARCHAR(7), this, ""); - - /** - * The column public.org_okved.okved. - */ - public final TableField OKVED = createField(DSL.name("okved"), SQLDataType.CLOB, this, ""); - - /** - * The column public.org_okved.organization. - */ - public final TableField ORGANIZATION = createField(DSL.name("organization"), SQLDataType.CLOB, this, ""); - - /** - * The column public.org_okved.main_okved. - */ - public final TableField MAIN_OKVED = createField(DSL.name("main_okved"), SQLDataType.BOOLEAN, this, ""); - - private OrgOkved(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null, null); - } - - private OrgOkved(Name alias, Table aliased, Field[] parameters, Condition where) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); - } - - /** - * Create an aliased public.org_okved table reference - */ - public OrgOkved(String alias) { - this(DSL.name(alias), ORG_OKVED); - } - - /** - * Create an aliased public.org_okved table reference - */ - public OrgOkved(Name alias) { - this(alias, ORG_OKVED); - } - - /** - * Create a public.org_okved table reference - */ - public OrgOkved() { - this(DSL.name("org_okved"), null); - } - - @Override - public Schema getSchema() { - return aliased() ? null : Public.PUBLIC; - } - - @Override - public Identity getIdentity() { - return (Identity) super.getIdentity(); - } - - @Override - public UniqueKey getPrimaryKey() { - return Keys.ORG_OKVED_PKEY; - } - - @Override - public OrgOkved as(String alias) { - return new OrgOkved(DSL.name(alias), this); - } - - @Override - public OrgOkved as(Name alias) { - return new OrgOkved(alias, this); - } - - @Override - public OrgOkved as(Table alias) { - return new OrgOkved(alias.getQualifiedName(), this); - } - - /** - * Rename this table - */ - @Override - public OrgOkved rename(String name) { - return new OrgOkved(DSL.name(name), null); - } - - /** - * Rename this table - */ - @Override - public OrgOkved rename(Name name) { - return new OrgOkved(name, null); - } - - /** - * Rename this table - */ - @Override - public OrgOkved rename(Table name) { - return new OrgOkved(name.getQualifiedName(), null); - } - - /** - * Create an inline derived table from this table - */ - @Override - public OrgOkved where(Condition condition) { - return new OrgOkved(getQualifiedName(), aliased() ? this : null, null, condition); - } - - /** - * Create an inline derived table from this table - */ - @Override - public OrgOkved where(Collection conditions) { - return where(DSL.and(conditions)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public OrgOkved where(Condition... conditions) { - return where(DSL.and(conditions)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public OrgOkved where(Field condition) { - return where(DSL.condition(condition)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public OrgOkved where(SQL condition) { - return where(DSL.condition(condition)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public OrgOkved where(@Stringly.SQL String condition) { - return where(DSL.condition(condition)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public OrgOkved where(@Stringly.SQL String condition, Object... binds) { - return where(DSL.condition(condition, binds)); - } - - /** - * Create an inline derived table from this table - */ - @Override - @PlainSQL - public OrgOkved where(@Stringly.SQL String condition, QueryPart... parts) { - return where(DSL.condition(condition, parts)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public OrgOkved whereExists(Select select) { - return where(DSL.exists(select)); - } - - /** - * Create an inline derived table from this table - */ - @Override - public OrgOkved whereNotExists(Select select) { - return where(DSL.notExists(select)); - } -} diff --git a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/records/FilesRecord.java b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/records/FilesRecord.java deleted file mode 100644 index 504b1ec2..00000000 --- a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/records/FilesRecord.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records; - - -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.Files; - -import org.jooq.Record1; -import org.jooq.impl.UpdatableRecordImpl; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class FilesRecord extends UpdatableRecordImpl { - - private static final long serialVersionUID = 1L; - - /** - * Setter for public.files.file_id. - */ - public void setFileId(Long value) { - set(0, value); - } - - /** - * Getter for public.files.file_id. - */ - public Long getFileId() { - return (Long) get(0); - } - - /** - * Setter for public.files.file. - */ - public void setFile(byte[] value) { - set(1, value); - } - - /** - * Getter for public.files.file. - */ - public byte[] getFile() { - return (byte[]) get(1); - } - - /** - * Setter for public.files.file_name. - */ - public void setFileName(String value) { - set(2, value); - } - - /** - * Getter for public.files.file_name. - */ - public String getFileName() { - return (String) get(2); - } - - /** - * Setter for public.files.interaction_log_id. - */ - public void setInteractionLogId(Long value) { - set(3, value); - } - - /** - * Getter for public.files.interaction_log_id. - */ - public Long getInteractionLogId() { - return (Long) get(3); - } - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - @Override - public Record1 key() { - return (Record1) super.key(); - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached FilesRecord - */ - public FilesRecord() { - super(Files.FILES); - } - - /** - * Create a detached, initialised FilesRecord - */ - public FilesRecord(Long fileId, byte[] file, String fileName, Long interactionLogId) { - super(Files.FILES); - - setFileId(fileId); - setFile(file); - setFileName(fileName); - setInteractionLogId(interactionLogId); - resetChangedOnNotNull(); - } -} diff --git a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/records/InteractionLogRecord.java b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/records/InteractionLogRecord.java index a0d6ee23..3ae205b8 100644 --- a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/records/InteractionLogRecord.java +++ b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/records/InteractionLogRecord.java @@ -159,6 +159,20 @@ public class InteractionLogRecord extends TableRecordImpl return (String) get(9); } + /** + * Setter for public.interaction_log.offset. + */ + public void setOffset(String value) { + set(10, value); + } + + /** + * Getter for public.interaction_log.offset. + */ + public String getOffset() { + return (String) get(10); + } + // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- @@ -173,7 +187,7 @@ public class InteractionLogRecord extends TableRecordImpl /** * Create a detached, initialised InteractionLogRecord */ - public InteractionLogRecord(Long id, Timestamp sentDate, String form, String sender, String status, String fileName, Integer recordsSent, Integer recordsAccepted, String fileId, String ervuId) { + public InteractionLogRecord(Long id, Timestamp sentDate, String form, String sender, String status, String fileName, Integer recordsSent, Integer recordsAccepted, String fileId, String ervuId, String offset) { super(InteractionLog.INTERACTION_LOG); setId(id); @@ -186,6 +200,7 @@ public class InteractionLogRecord extends TableRecordImpl setRecordsAccepted(recordsAccepted); setFileId(fileId); setErvuId(ervuId); + setOffset(offset); resetChangedOnNotNull(); } } diff --git a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/records/OrgOkvedRecord.java b/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/records/OrgOkvedRecord.java deleted file mode 100644 index 7570d690..00000000 --- a/backend/src/main/java/ervu_lkrp_ul/ervu_lkrp_ul/db_beans/public_/tables/records/OrgOkvedRecord.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.records; - - -import ervu_lkrp_ul.ervu_lkrp_ul.db_beans.public_.tables.OrgOkved; - -import org.jooq.Record1; -import org.jooq.impl.UpdatableRecordImpl; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class OrgOkvedRecord extends UpdatableRecordImpl { - - private static final long serialVersionUID = 1L; - - /** - * Setter for public.org_okved.id. - */ - public void setId(Long value) { - set(0, value); - } - - /** - * Getter for public.org_okved.id. - */ - public Long getId() { - return (Long) get(0); - } - - /** - * Setter for public.org_okved.code. - */ - public void setCode(String value) { - set(1, value); - } - - /** - * Getter for public.org_okved.code. - */ - public String getCode() { - return (String) get(1); - } - - /** - * Setter for public.org_okved.okved. - */ - public void setOkved(String value) { - set(2, value); - } - - /** - * Getter for public.org_okved.okved. - */ - public String getOkved() { - return (String) get(2); - } - - /** - * Setter for public.org_okved.organization. - */ - public void setOrganization(String value) { - set(3, value); - } - - /** - * Getter for public.org_okved.organization. - */ - public String getOrganization() { - return (String) get(3); - } - - /** - * Setter for public.org_okved.main_okved. - */ - public void setMainOkved(Boolean value) { - set(4, value); - } - - /** - * Getter for public.org_okved.main_okved. - */ - public Boolean getMainOkved() { - return (Boolean) get(4); - } - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - @Override - public Record1 key() { - return (Record1) super.key(); - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached OrgOkvedRecord - */ - public OrgOkvedRecord() { - super(OrgOkved.ORG_OKVED); - } - - /** - * Create a detached, initialised OrgOkvedRecord - */ - public OrgOkvedRecord(Long id, String code, String okved, String organization, Boolean mainOkved) { - super(OrgOkved.ORG_OKVED); - - setId(id); - setCode(code); - setOkved(okved); - setOrganization(organization); - setMainOkved(mainOkved); - resetChangedOnNotNull(); - } -} diff --git a/backend/src/main/java/ru/micord/ervu/journal/mapper/JournalDtoMapper.java b/backend/src/main/java/ru/micord/ervu/journal/mapper/JournalDtoMapper.java index 0b60d816..b2dfbafa 100644 --- a/backend/src/main/java/ru/micord/ervu/journal/mapper/JournalDtoMapper.java +++ b/backend/src/main/java/ru/micord/ervu/journal/mapper/JournalDtoMapper.java @@ -1,6 +1,6 @@ package ru.micord.ervu.journal.mapper; -import java.sql.Timestamp; +import java.time.OffsetDateTime; import java.time.ZoneOffset; import java.time.ZonedDateTime; @@ -16,12 +16,11 @@ public class JournalDtoMapper { public static JournalDto mapToJournalDto(JournalFileInfo journalFileInfo, JournalFileInfo.JournalFileDetails journalFileDetails) { SenderInfo senderInfo = journalFileInfo.getSenderInfo(); - ZonedDateTime utcZoned = journalFileDetails.getDepartureDateTime().atZone(ZoneOffset.UTC); - ZoneOffset offset = ZoneOffset.of(journalFileDetails.getTimeZone()); - ZonedDateTime zonedDateTime = utcZoned.withZoneSameInstant(offset); + OffsetDateTime utcZoned = journalFileDetails.getDepartureDateTime() + .atOffset(ZoneOffset.of(journalFileDetails.getTimeZone())); return new JournalDto() .setFileId(journalFileDetails.getFileId()) - .setDepartureDateTime(zonedDateTime.toString()) + .setDepartureDateTime(utcZoned.toString()) .setFileName(journalFileDetails.getFileName()) .setFilePatternCode(journalFileDetails.getFilePatternCode()) .setSenderFio(convertToFio(senderInfo.getFirstName(), senderInfo.getMiddleName(), @@ -35,12 +34,15 @@ public class JournalDtoMapper { } public static JournalDto mapToJournalDto(InteractionLogRecord record) { - ZonedDateTime utcZoned = record.getSentDate().toInstant().atZone(ZoneOffset.UTC); - //заменит на offset после обновления бинов - ZoneOffset offset = ZoneOffset.of(record.getStatus()); - ZonedDateTime zonedDateTime = utcZoned.withZoneSameInstant(offset); + OffsetDateTime utcZoned; + if (record.getOffset() != null) { + utcZoned = record.getSentDate().toInstant().atOffset(ZoneOffset.of(record.getOffset())); + } + else { + utcZoned = record.getSentDate().toInstant().atOffset(ZoneOffset.UTC); + } return new JournalDto() - .setDepartureDateTime(zonedDateTime.toString()) + .setDepartureDateTime(utcZoned.toString()) .setFileName(record.getFileName()) .setFilePatternCode(Integer.valueOf(record.getForm())) .setSenderFio(record.getSender()) diff --git a/backend/src/main/java/ru/micord/ervu/service/InteractionServiceImpl.java b/backend/src/main/java/ru/micord/ervu/service/InteractionServiceImpl.java index 5a345458..3c2de213 100644 --- a/backend/src/main/java/ru/micord/ervu/service/InteractionServiceImpl.java +++ b/backend/src/main/java/ru/micord/ervu/service/InteractionServiceImpl.java @@ -42,7 +42,7 @@ public class InteractionServiceImpl implements InteractionService { .set(INTERACTION_LOG.SENDER, sender) .set(INTERACTION_LOG.FILE_NAME, fileName) .set(INTERACTION_LOG.ERVU_ID, ervuId) - //.set(INTERACTION_LOG.OFFSET, offset) + .set(INTERACTION_LOG.OFFSET, offset) .execute(); } diff --git a/frontend/src/ts/ervu/component/grid/formatter/ClientDateTimeFormatter.ts b/frontend/src/ts/ervu/component/grid/formatter/ZoneDateTimeFormatter.ts similarity index 50% rename from frontend/src/ts/ervu/component/grid/formatter/ClientDateTimeFormatter.ts rename to frontend/src/ts/ervu/component/grid/formatter/ZoneDateTimeFormatter.ts index 94e44b90..cae5f315 100644 --- a/frontend/src/ts/ervu/component/grid/formatter/ClientDateTimeFormatter.ts +++ b/frontend/src/ts/ervu/component/grid/formatter/ZoneDateTimeFormatter.ts @@ -1,9 +1,10 @@ import {DateTimeUtil, DefaultValueFormatter, GridValueFormatter} from "@webbpm/base-package"; import {ValueFormatterParams} from "ag-grid-community"; -export class ClientDateTimeFormatter extends DefaultValueFormatter implements GridValueFormatter { +export class ZoneDateTimeFormatter extends DefaultValueFormatter implements GridValueFormatter { public dateFormat: string = ''; + private defaultFormat = 'DD.MM.YYYY HH:mm:ss (Z)'; format(params: ValueFormatterParams): string { if (this.isValueEmpty(params)) { @@ -16,23 +17,22 @@ export class ClientDateTimeFormatter extends DefaultValueFormatter implements Gr } if (!this.dateFormat) { - return ClientDateTimeFormatter.parseForClientTimeZoneAndFormat(params.value, DateTimeUtil.TIMESTAMP_FORMAT); + return ZoneDateTimeFormatter.parseForTimeZoneAndFormat(params.value, this.defaultFormat); } - if (!ClientDateTimeFormatter.isValidFormat(this.dateFormat)) { + if (!ZoneDateTimeFormatter.isValidFormat(this.dateFormat)) { throw new Error('Invalid date format = ' + this.dateFormat); } - return ClientDateTimeFormatter.parseForClientTimeZoneAndFormat(params.value, this.dateFormat); + return ZoneDateTimeFormatter.parseForTimeZoneAndFormat(params.value, this.dateFormat); } private static isValidFormat(format: string): boolean { - const validCharsRegex = /^[YyMmDdHhSsTZ.:\[\] -]*$/; + const validCharsRegex = /^[YyMmDdHhSsTZ.:()\[\] -]*$/; return format && validCharsRegex.test(format); } - private static parseForClientTimeZoneAndFormat(value: string, dateFormat: string): string { - let timezone = Intl.DateTimeFormat().resolvedOptions().timeZone; - return DateTimeUtil.parseIsoDateTime(value).tz(timezone).format(dateFormat); + private static parseForTimeZoneAndFormat(value: string, dateFormat: string): string { + return DateTimeUtil.parseIsoDateTime(value).local().format(dateFormat); } } \ No newline at end of file diff --git a/resources/src/main/resources/business-model/Журнал взаимодействия.page b/resources/src/main/resources/business-model/Журнал взаимодействия.page index 55f09c32..8ee5bfee 100644 --- a/resources/src/main/resources/business-model/Журнал взаимодействия.page +++ b/resources/src/main/resources/business-model/Журнал взаимодействия.page @@ -1094,17 +1094,9 @@ valueFormatter - - - dateFormat - - "DD.MM.YYYY HH:mm:ss (Z)" - - - - DateFormatter - component.grid.formatters + ZoneDateTimeFormatter + ervu.component.grid.formatter @@ -1155,7 +1147,7 @@ type - "java.time.ZonedDateTime" + "java.time.OffsetDateTime"