SUPPORT-9337: last recording date

This commit is contained in:
adel.ka 2025-08-21 10:54:56 +03:00
parent 6f89db08b8
commit de194e4bb2
22 changed files with 1885 additions and 2 deletions

View file

@ -0,0 +1,24 @@
package ervu_business_metrics.controller;
import ervu_business_metrics.service.DataDateService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;
/**
* @author Adel Kalimullin
*/
@RestController
public class DataDateController {
private final DataDateService dataDateService;
public DataDateController(DataDateService dataDateService) {
this.dataDateService = dataDateService;
}
@GetMapping("/data-date")
public String getDataDate(@RequestHeader("Client-Time-Zone") String clientTimeZone) {
return dataDateService.getDataDate(clientTimeZone);
}
}

View file

@ -0,0 +1,31 @@
package ervu_business_metrics.dao;
import java.sql.Timestamp;
import org.jooq.DSLContext;
import org.springframework.stereotype.Repository;
import static ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.LastRecordingDate.LAST_RECORDING_DATE;;
/**
* @author Adel Kalimullin
*/
@Repository
public class DataDateDao {
private final DSLContext dslContext;
public DataDateDao(DSLContext dslContext) {
this.dslContext = dslContext;
}
public Timestamp getDataDate() {
return dslContext.select(LAST_RECORDING_DATE.LAST_RECORDING_DATE_)
.from(LAST_RECORDING_DATE)
.orderBy(LAST_RECORDING_DATE.LAST_RECORDING_DATE_.desc())
.limit(1)
.fetchOne(LAST_RECORDING_DATE.LAST_RECORDING_DATE_);
}
}

View file

@ -0,0 +1,26 @@
package ervu_business_metrics.service;
import java.sql.Timestamp;
import ervu_business_metrics.dao.DataDateDao;
import ervu_business_metrics.util.DateUtils;
import org.springframework.stereotype.Service;
/**
* @author Adel Kalimullin
*/
@Service
public class DataDateService {
private final DataDateDao dataDateDao;
public DataDateService(DataDateDao dataDateDao) {
this.dataDateDao = dataDateDao;
}
public String getDataDate(String clientTimeZone) {
Timestamp dataDate = dataDateDao.getDataDate();
String formattedClientDate = DateUtils.getFormattedClientDate(dataDate, clientTimeZone);
return "Данные на " + formattedClientDate + " г.";
}
}

View file

@ -0,0 +1,35 @@
package ervu_business_metrics.util;
import java.sql.Timestamp;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Locale;
/**
* @author Adel Kalimullin
*/
public final class DateUtils {
private static final DateTimeFormatter DATE_FORMATTER_RU = DateTimeFormatter.ofPattern(
"d MMMM yyyy", new Locale("ru", "RU")
);
private DateUtils() {
}
public static String getFormattedClientDate(Timestamp timestamp, String clientTimeZone) {
if (timestamp == null) {
return "";
}
ZoneId zoneId;
try {
zoneId = ZoneId.of(clientTimeZone);
}
catch (Exception e) {
zoneId = ZoneId.systemDefault();
}
return timestamp.toInstant()
.atZone(zoneId)
.format(DATE_FORMATTER_RU);
}
}

View file

@ -0,0 +1,76 @@
/*
* This file is generated by jOOQ.
*/
package ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics;
import java.util.Arrays;
import java.util.List;
import org.jooq.Catalog;
import org.jooq.Table;
import org.jooq.impl.SchemaImpl;
import ru.micord.webbpm.ervu.business_metrics.db_beans.DefaultCatalog;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.Databasechangelog;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.Databasechangeloglock;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.LastRecordingDate;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.Shedlock;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ErvuBusinessMetrics extends SchemaImpl {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>ervu_business_metrics</code>
*/
public static final ErvuBusinessMetrics ERVU_BUSINESS_METRICS = new ErvuBusinessMetrics();
/**
* The table <code>ervu_business_metrics.databasechangelog</code>.
*/
public final Databasechangelog DATABASECHANGELOG = Databasechangelog.DATABASECHANGELOG;
/**
* The table <code>ervu_business_metrics.databasechangeloglock</code>.
*/
public final Databasechangeloglock DATABASECHANGELOGLOCK = Databasechangeloglock.DATABASECHANGELOGLOCK;
/**
* Таблица для хранения даты и времени последней записи
*/
public final LastRecordingDate LAST_RECORDING_DATE = LastRecordingDate.LAST_RECORDING_DATE;
/**
* Таблица для хранения блокировок ShedLock
*/
public final Shedlock SHEDLOCK = Shedlock.SHEDLOCK;
/**
* No further instances allowed
*/
private ErvuBusinessMetrics() {
super("ervu_business_metrics", null);
}
@Override
public Catalog getCatalog() {
return DefaultCatalog.DEFAULT_CATALOG;
}
@Override
public final List<Table<?>> getTables() {
return Arrays.asList(
Databasechangelog.DATABASECHANGELOG,
Databasechangeloglock.DATABASECHANGELOGLOCK,
LastRecordingDate.LAST_RECORDING_DATE,
Shedlock.SHEDLOCK
);
}
}

View file

@ -0,0 +1,31 @@
/*
* This file is generated by jOOQ.
*/
package ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.Internal;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.Databasechangeloglock;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.Shedlock;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.records.DatabasechangeloglockRecord;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.records.ShedlockRecord;
/**
* A class modelling foreign key relationships and constraints of tables in
* ervu_business_metrics.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Keys {
// -------------------------------------------------------------------------
// UNIQUE and PRIMARY KEY definitions
// -------------------------------------------------------------------------
public static final UniqueKey<DatabasechangeloglockRecord> DATABASECHANGELOGLOCK_PKEY = Internal.createUniqueKey(Databasechangeloglock.DATABASECHANGELOGLOCK, DSL.name("databasechangeloglock_pkey"), new TableField[] { Databasechangeloglock.DATABASECHANGELOGLOCK.ID }, true);
public static final UniqueKey<ShedlockRecord> SHEDLOCK_PK = Internal.createUniqueKey(Shedlock.SHEDLOCK, DSL.name("shedlock_pk"), new TableField[] { Shedlock.SHEDLOCK.NAME }, true);
}

View file

@ -0,0 +1,38 @@
/*
* This file is generated by jOOQ.
*/
package ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.Databasechangelog;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.Databasechangeloglock;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.LastRecordingDate;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.Shedlock;
/**
* Convenience access to all tables in ervu_business_metrics.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Tables {
/**
* The table <code>ervu_business_metrics.databasechangelog</code>.
*/
public static final Databasechangelog DATABASECHANGELOG = Databasechangelog.DATABASECHANGELOG;
/**
* The table <code>ervu_business_metrics.databasechangeloglock</code>.
*/
public static final Databasechangeloglock DATABASECHANGELOGLOCK = Databasechangeloglock.DATABASECHANGELOGLOCK;
/**
* Таблица для хранения даты и времени последней записи
*/
public static final LastRecordingDate LAST_RECORDING_DATE = LastRecordingDate.LAST_RECORDING_DATE;
/**
* Таблица для хранения блокировок ShedLock
*/
public static final Shedlock SHEDLOCK = Shedlock.SHEDLOCK;
}

View file

@ -0,0 +1,286 @@
/*
* This file is generated by jOOQ.
*/
package ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables;
import java.sql.Timestamp;
import java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
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.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.ErvuBusinessMetrics;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.records.DatabasechangelogRecord;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Databasechangelog extends TableImpl<DatabasechangelogRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of
* <code>ervu_business_metrics.databasechangelog</code>
*/
public static final Databasechangelog DATABASECHANGELOG = new Databasechangelog();
/**
* The class holding records for this type
*/
@Override
public Class<DatabasechangelogRecord> getRecordType() {
return DatabasechangelogRecord.class;
}
/**
* The column <code>ervu_business_metrics.databasechangelog.id</code>.
*/
public final TableField<DatabasechangelogRecord, String> ID = createField(DSL.name("id"), SQLDataType.VARCHAR(255).nullable(false), this, "");
/**
* The column <code>ervu_business_metrics.databasechangelog.author</code>.
*/
public final TableField<DatabasechangelogRecord, String> AUTHOR = createField(DSL.name("author"), SQLDataType.VARCHAR(255).nullable(false), this, "");
/**
* The column <code>ervu_business_metrics.databasechangelog.filename</code>.
*/
public final TableField<DatabasechangelogRecord, String> FILENAME = createField(DSL.name("filename"), SQLDataType.VARCHAR(255).nullable(false), this, "");
/**
* The column
* <code>ervu_business_metrics.databasechangelog.dateexecuted</code>.
*/
public final TableField<DatabasechangelogRecord, Timestamp> DATEEXECUTED = createField(DSL.name("dateexecuted"), SQLDataType.TIMESTAMP(0).nullable(false), this, "");
/**
* The column
* <code>ervu_business_metrics.databasechangelog.orderexecuted</code>.
*/
public final TableField<DatabasechangelogRecord, Integer> ORDEREXECUTED = createField(DSL.name("orderexecuted"), SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>ervu_business_metrics.databasechangelog.exectype</code>.
*/
public final TableField<DatabasechangelogRecord, String> EXECTYPE = createField(DSL.name("exectype"), SQLDataType.VARCHAR(10).nullable(false), this, "");
/**
* The column <code>ervu_business_metrics.databasechangelog.md5sum</code>.
*/
public final TableField<DatabasechangelogRecord, String> MD5SUM = createField(DSL.name("md5sum"), SQLDataType.VARCHAR(35), this, "");
/**
* The column
* <code>ervu_business_metrics.databasechangelog.description</code>.
*/
public final TableField<DatabasechangelogRecord, String> DESCRIPTION = createField(DSL.name("description"), SQLDataType.VARCHAR(255), this, "");
/**
* The column <code>ervu_business_metrics.databasechangelog.comments</code>.
*/
public final TableField<DatabasechangelogRecord, String> COMMENTS = createField(DSL.name("comments"), SQLDataType.VARCHAR(255), this, "");
/**
* The column <code>ervu_business_metrics.databasechangelog.tag</code>.
*/
public final TableField<DatabasechangelogRecord, String> TAG = createField(DSL.name("tag"), SQLDataType.VARCHAR(255), this, "");
/**
* The column
* <code>ervu_business_metrics.databasechangelog.liquibase</code>.
*/
public final TableField<DatabasechangelogRecord, String> LIQUIBASE = createField(DSL.name("liquibase"), SQLDataType.VARCHAR(20), this, "");
/**
* The column <code>ervu_business_metrics.databasechangelog.contexts</code>.
*/
public final TableField<DatabasechangelogRecord, String> CONTEXTS = createField(DSL.name("contexts"), SQLDataType.VARCHAR(255), this, "");
/**
* The column <code>ervu_business_metrics.databasechangelog.labels</code>.
*/
public final TableField<DatabasechangelogRecord, String> LABELS = createField(DSL.name("labels"), SQLDataType.VARCHAR(255), this, "");
/**
* The column
* <code>ervu_business_metrics.databasechangelog.deployment_id</code>.
*/
public final TableField<DatabasechangelogRecord, String> DEPLOYMENT_ID = createField(DSL.name("deployment_id"), SQLDataType.VARCHAR(10), this, "");
private Databasechangelog(Name alias, Table<DatabasechangelogRecord> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}
private Databasechangelog(Name alias, Table<DatabasechangelogRecord> aliased, Field<?>[] parameters, Condition where) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
}
/**
* Create an aliased <code>ervu_business_metrics.databasechangelog</code>
* table reference
*/
public Databasechangelog(String alias) {
this(DSL.name(alias), DATABASECHANGELOG);
}
/**
* Create an aliased <code>ervu_business_metrics.databasechangelog</code>
* table reference
*/
public Databasechangelog(Name alias) {
this(alias, DATABASECHANGELOG);
}
/**
* Create a <code>ervu_business_metrics.databasechangelog</code> table
* reference
*/
public Databasechangelog() {
this(DSL.name("databasechangelog"), null);
}
@Override
public Schema getSchema() {
return aliased() ? null : ErvuBusinessMetrics.ERVU_BUSINESS_METRICS;
}
@Override
public Databasechangelog as(String alias) {
return new Databasechangelog(DSL.name(alias), this);
}
@Override
public Databasechangelog as(Name alias) {
return new Databasechangelog(alias, this);
}
@Override
public Databasechangelog as(Table<?> alias) {
return new Databasechangelog(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public Databasechangelog rename(String name) {
return new Databasechangelog(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public Databasechangelog rename(Name name) {
return new Databasechangelog(name, null);
}
/**
* Rename this table
*/
@Override
public Databasechangelog rename(Table<?> name) {
return new Databasechangelog(name.getQualifiedName(), null);
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangelog where(Condition condition) {
return new Databasechangelog(getQualifiedName(), aliased() ? this : null, null, condition);
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangelog where(Collection<? extends Condition> conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangelog where(Condition... conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangelog where(Field<Boolean> condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Databasechangelog where(SQL condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Databasechangelog where(@Stringly.SQL String condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Databasechangelog where(@Stringly.SQL String condition, Object... binds) {
return where(DSL.condition(condition, binds));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Databasechangelog where(@Stringly.SQL String condition, QueryPart... parts) {
return where(DSL.condition(condition, parts));
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangelog whereExists(Select<?> select) {
return where(DSL.exists(select));
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangelog whereNotExists(Select<?> select) {
return where(DSL.notExists(select));
}
}

View file

@ -0,0 +1,241 @@
/*
* This file is generated by jOOQ.
*/
package ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables;
import java.sql.Timestamp;
import java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
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;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.ErvuBusinessMetrics;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.Keys;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.records.DatabasechangeloglockRecord;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Databasechangeloglock extends TableImpl<DatabasechangeloglockRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of
* <code>ervu_business_metrics.databasechangeloglock</code>
*/
public static final Databasechangeloglock DATABASECHANGELOGLOCK = new Databasechangeloglock();
/**
* The class holding records for this type
*/
@Override
public Class<DatabasechangeloglockRecord> getRecordType() {
return DatabasechangeloglockRecord.class;
}
/**
* The column <code>ervu_business_metrics.databasechangeloglock.id</code>.
*/
public final TableField<DatabasechangeloglockRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column
* <code>ervu_business_metrics.databasechangeloglock.locked</code>.
*/
public final TableField<DatabasechangeloglockRecord, Boolean> LOCKED = createField(DSL.name("locked"), SQLDataType.BOOLEAN.nullable(false), this, "");
/**
* The column
* <code>ervu_business_metrics.databasechangeloglock.lockgranted</code>.
*/
public final TableField<DatabasechangeloglockRecord, Timestamp> LOCKGRANTED = createField(DSL.name("lockgranted"), SQLDataType.TIMESTAMP(0), this, "");
/**
* The column
* <code>ervu_business_metrics.databasechangeloglock.lockedby</code>.
*/
public final TableField<DatabasechangeloglockRecord, String> LOCKEDBY = createField(DSL.name("lockedby"), SQLDataType.VARCHAR(255), this, "");
private Databasechangeloglock(Name alias, Table<DatabasechangeloglockRecord> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}
private Databasechangeloglock(Name alias, Table<DatabasechangeloglockRecord> aliased, Field<?>[] parameters, Condition where) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
}
/**
* Create an aliased
* <code>ervu_business_metrics.databasechangeloglock</code> table reference
*/
public Databasechangeloglock(String alias) {
this(DSL.name(alias), DATABASECHANGELOGLOCK);
}
/**
* Create an aliased
* <code>ervu_business_metrics.databasechangeloglock</code> table reference
*/
public Databasechangeloglock(Name alias) {
this(alias, DATABASECHANGELOGLOCK);
}
/**
* Create a <code>ervu_business_metrics.databasechangeloglock</code> table
* reference
*/
public Databasechangeloglock() {
this(DSL.name("databasechangeloglock"), null);
}
@Override
public Schema getSchema() {
return aliased() ? null : ErvuBusinessMetrics.ERVU_BUSINESS_METRICS;
}
@Override
public UniqueKey<DatabasechangeloglockRecord> getPrimaryKey() {
return Keys.DATABASECHANGELOGLOCK_PKEY;
}
@Override
public Databasechangeloglock as(String alias) {
return new Databasechangeloglock(DSL.name(alias), this);
}
@Override
public Databasechangeloglock as(Name alias) {
return new Databasechangeloglock(alias, this);
}
@Override
public Databasechangeloglock as(Table<?> alias) {
return new Databasechangeloglock(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public Databasechangeloglock rename(String name) {
return new Databasechangeloglock(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public Databasechangeloglock rename(Name name) {
return new Databasechangeloglock(name, null);
}
/**
* Rename this table
*/
@Override
public Databasechangeloglock rename(Table<?> name) {
return new Databasechangeloglock(name.getQualifiedName(), null);
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangeloglock where(Condition condition) {
return new Databasechangeloglock(getQualifiedName(), aliased() ? this : null, null, condition);
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangeloglock where(Collection<? extends Condition> conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangeloglock where(Condition... conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangeloglock where(Field<Boolean> condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Databasechangeloglock where(SQL condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Databasechangeloglock where(@Stringly.SQL String condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Databasechangeloglock where(@Stringly.SQL String condition, Object... binds) {
return where(DSL.condition(condition, binds));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Databasechangeloglock where(@Stringly.SQL String condition, QueryPart... parts) {
return where(DSL.condition(condition, parts));
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangeloglock whereExists(Select<?> select) {
return where(DSL.exists(select));
}
/**
* Create an inline derived table from this table
*/
@Override
public Databasechangeloglock whereNotExists(Select<?> select) {
return where(DSL.notExists(select));
}
}

View file

@ -0,0 +1,222 @@
/*
* This file is generated by jOOQ.
*/
package ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables;
import java.sql.Timestamp;
import java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
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.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.ErvuBusinessMetrics;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.records.LastRecordingDateRecord;
/**
* Таблица для хранения даты и времени последней записи
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class LastRecordingDate extends TableImpl<LastRecordingDateRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of
* <code>ervu_business_metrics.last_recording_date</code>
*/
public static final LastRecordingDate LAST_RECORDING_DATE = new LastRecordingDate();
/**
* The class holding records for this type
*/
@Override
public Class<LastRecordingDateRecord> getRecordType() {
return LastRecordingDateRecord.class;
}
/**
* The column
* <code>ervu_business_metrics.last_recording_date.last_recording_date</code>.
*/
public final TableField<LastRecordingDateRecord, Timestamp> LAST_RECORDING_DATE_ = createField(DSL.name("last_recording_date"), SQLDataType.TIMESTAMP(0).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.TIMESTAMP)), this, "");
/**
* The column <code>ervu_business_metrics.last_recording_date.entry</code>.
*/
public final TableField<LastRecordingDateRecord, String> ENTRY = createField(DSL.name("entry"), SQLDataType.CLOB, this, "");
private LastRecordingDate(Name alias, Table<LastRecordingDateRecord> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}
private LastRecordingDate(Name alias, Table<LastRecordingDateRecord> aliased, Field<?>[] parameters, Condition where) {
super(alias, null, aliased, parameters, DSL.comment("Таблица для хранения даты и времени последней записи"), TableOptions.table(), where);
}
/**
* Create an aliased <code>ervu_business_metrics.last_recording_date</code>
* table reference
*/
public LastRecordingDate(String alias) {
this(DSL.name(alias), LAST_RECORDING_DATE);
}
/**
* Create an aliased <code>ervu_business_metrics.last_recording_date</code>
* table reference
*/
public LastRecordingDate(Name alias) {
this(alias, LAST_RECORDING_DATE);
}
/**
* Create a <code>ervu_business_metrics.last_recording_date</code> table
* reference
*/
public LastRecordingDate() {
this(DSL.name("last_recording_date"), null);
}
@Override
public Schema getSchema() {
return aliased() ? null : ErvuBusinessMetrics.ERVU_BUSINESS_METRICS;
}
@Override
public LastRecordingDate as(String alias) {
return new LastRecordingDate(DSL.name(alias), this);
}
@Override
public LastRecordingDate as(Name alias) {
return new LastRecordingDate(alias, this);
}
@Override
public LastRecordingDate as(Table<?> alias) {
return new LastRecordingDate(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public LastRecordingDate rename(String name) {
return new LastRecordingDate(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public LastRecordingDate rename(Name name) {
return new LastRecordingDate(name, null);
}
/**
* Rename this table
*/
@Override
public LastRecordingDate rename(Table<?> name) {
return new LastRecordingDate(name.getQualifiedName(), null);
}
/**
* Create an inline derived table from this table
*/
@Override
public LastRecordingDate where(Condition condition) {
return new LastRecordingDate(getQualifiedName(), aliased() ? this : null, null, condition);
}
/**
* Create an inline derived table from this table
*/
@Override
public LastRecordingDate where(Collection<? extends Condition> conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public LastRecordingDate where(Condition... conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public LastRecordingDate where(Field<Boolean> condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public LastRecordingDate where(SQL condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public LastRecordingDate where(@Stringly.SQL String condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public LastRecordingDate where(@Stringly.SQL String condition, Object... binds) {
return where(DSL.condition(condition, binds));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public LastRecordingDate where(@Stringly.SQL String condition, QueryPart... parts) {
return where(DSL.condition(condition, parts));
}
/**
* Create an inline derived table from this table
*/
@Override
public LastRecordingDate whereExists(Select<?> select) {
return where(DSL.exists(select));
}
/**
* Create an inline derived table from this table
*/
@Override
public LastRecordingDate whereNotExists(Select<?> select) {
return where(DSL.notExists(select));
}
}

View file

@ -0,0 +1,240 @@
/*
* This file is generated by jOOQ.
*/
package ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables;
import java.sql.Timestamp;
import java.util.Collection;
import org.jooq.Condition;
import org.jooq.Field;
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;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.ErvuBusinessMetrics;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.Keys;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.records.ShedlockRecord;
/**
* Таблица для хранения блокировок ShedLock
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Shedlock extends TableImpl<ShedlockRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>ervu_business_metrics.shedlock</code>
*/
public static final Shedlock SHEDLOCK = new Shedlock();
/**
* The class holding records for this type
*/
@Override
public Class<ShedlockRecord> getRecordType() {
return ShedlockRecord.class;
}
/**
* The column <code>ervu_business_metrics.shedlock.name</code>. Имя ресурса
* блокировки
*/
public final TableField<ShedlockRecord, String> NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(255).nullable(false), this, "Имя ресурса блокировки");
/**
* The column <code>ervu_business_metrics.shedlock.lock_until</code>. Время,
* до которого действует блокировка
*/
public final TableField<ShedlockRecord, Timestamp> LOCK_UNTIL = createField(DSL.name("lock_until"), SQLDataType.TIMESTAMP(0), this, "Время, до которого действует блокировка");
/**
* The column <code>ervu_business_metrics.shedlock.locked_at</code>. Время
* создания блокировки
*/
public final TableField<ShedlockRecord, Timestamp> LOCKED_AT = createField(DSL.name("locked_at"), SQLDataType.TIMESTAMP(0), this, "Время создания блокировки");
/**
* The column <code>ervu_business_metrics.shedlock.locked_by</code>.
* Идентификатор узла, установившего блокировку
*/
public final TableField<ShedlockRecord, String> LOCKED_BY = createField(DSL.name("locked_by"), SQLDataType.VARCHAR(255), this, "Идентификатор узла, установившего блокировку");
private Shedlock(Name alias, Table<ShedlockRecord> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}
private Shedlock(Name alias, Table<ShedlockRecord> aliased, Field<?>[] parameters, Condition where) {
super(alias, null, aliased, parameters, DSL.comment("Таблица для хранения блокировок ShedLock"), TableOptions.table(), where);
}
/**
* Create an aliased <code>ervu_business_metrics.shedlock</code> table
* reference
*/
public Shedlock(String alias) {
this(DSL.name(alias), SHEDLOCK);
}
/**
* Create an aliased <code>ervu_business_metrics.shedlock</code> table
* reference
*/
public Shedlock(Name alias) {
this(alias, SHEDLOCK);
}
/**
* Create a <code>ervu_business_metrics.shedlock</code> table reference
*/
public Shedlock() {
this(DSL.name("shedlock"), null);
}
@Override
public Schema getSchema() {
return aliased() ? null : ErvuBusinessMetrics.ERVU_BUSINESS_METRICS;
}
@Override
public UniqueKey<ShedlockRecord> getPrimaryKey() {
return Keys.SHEDLOCK_PK;
}
@Override
public Shedlock as(String alias) {
return new Shedlock(DSL.name(alias), this);
}
@Override
public Shedlock as(Name alias) {
return new Shedlock(alias, this);
}
@Override
public Shedlock as(Table<?> alias) {
return new Shedlock(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public Shedlock rename(String name) {
return new Shedlock(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public Shedlock rename(Name name) {
return new Shedlock(name, null);
}
/**
* Rename this table
*/
@Override
public Shedlock rename(Table<?> name) {
return new Shedlock(name.getQualifiedName(), null);
}
/**
* Create an inline derived table from this table
*/
@Override
public Shedlock where(Condition condition) {
return new Shedlock(getQualifiedName(), aliased() ? this : null, null, condition);
}
/**
* Create an inline derived table from this table
*/
@Override
public Shedlock where(Collection<? extends Condition> conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public Shedlock where(Condition... conditions) {
return where(DSL.and(conditions));
}
/**
* Create an inline derived table from this table
*/
@Override
public Shedlock where(Field<Boolean> condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Shedlock where(SQL condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Shedlock where(@Stringly.SQL String condition) {
return where(DSL.condition(condition));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Shedlock where(@Stringly.SQL String condition, Object... binds) {
return where(DSL.condition(condition, binds));
}
/**
* Create an inline derived table from this table
*/
@Override
@PlainSQL
public Shedlock where(@Stringly.SQL String condition, QueryPart... parts) {
return where(DSL.condition(condition, parts));
}
/**
* Create an inline derived table from this table
*/
@Override
public Shedlock whereExists(Select<?> select) {
return where(DSL.exists(select));
}
/**
* Create an inline derived table from this table
*/
@Override
public Shedlock whereNotExists(Select<?> select) {
return where(DSL.notExists(select));
}
}

View file

@ -0,0 +1,261 @@
/*
* This file is generated by jOOQ.
*/
package ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.records;
import java.sql.Timestamp;
import org.jooq.impl.TableRecordImpl;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.Databasechangelog;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DatabasechangelogRecord extends TableRecordImpl<DatabasechangelogRecord> {
private static final long serialVersionUID = 1L;
/**
* Setter for <code>ervu_business_metrics.databasechangelog.id</code>.
*/
public void setId(String value) {
set(0, value);
}
/**
* Getter for <code>ervu_business_metrics.databasechangelog.id</code>.
*/
public String getId() {
return (String) get(0);
}
/**
* Setter for <code>ervu_business_metrics.databasechangelog.author</code>.
*/
public void setAuthor(String value) {
set(1, value);
}
/**
* Getter for <code>ervu_business_metrics.databasechangelog.author</code>.
*/
public String getAuthor() {
return (String) get(1);
}
/**
* Setter for <code>ervu_business_metrics.databasechangelog.filename</code>.
*/
public void setFilename(String value) {
set(2, value);
}
/**
* Getter for <code>ervu_business_metrics.databasechangelog.filename</code>.
*/
public String getFilename() {
return (String) get(2);
}
/**
* Setter for
* <code>ervu_business_metrics.databasechangelog.dateexecuted</code>.
*/
public void setDateexecuted(Timestamp value) {
set(3, value);
}
/**
* Getter for
* <code>ervu_business_metrics.databasechangelog.dateexecuted</code>.
*/
public Timestamp getDateexecuted() {
return (Timestamp) get(3);
}
/**
* Setter for
* <code>ervu_business_metrics.databasechangelog.orderexecuted</code>.
*/
public void setOrderexecuted(Integer value) {
set(4, value);
}
/**
* Getter for
* <code>ervu_business_metrics.databasechangelog.orderexecuted</code>.
*/
public Integer getOrderexecuted() {
return (Integer) get(4);
}
/**
* Setter for <code>ervu_business_metrics.databasechangelog.exectype</code>.
*/
public void setExectype(String value) {
set(5, value);
}
/**
* Getter for <code>ervu_business_metrics.databasechangelog.exectype</code>.
*/
public String getExectype() {
return (String) get(5);
}
/**
* Setter for <code>ervu_business_metrics.databasechangelog.md5sum</code>.
*/
public void setMd5sum(String value) {
set(6, value);
}
/**
* Getter for <code>ervu_business_metrics.databasechangelog.md5sum</code>.
*/
public String getMd5sum() {
return (String) get(6);
}
/**
* Setter for
* <code>ervu_business_metrics.databasechangelog.description</code>.
*/
public void setDescription(String value) {
set(7, value);
}
/**
* Getter for
* <code>ervu_business_metrics.databasechangelog.description</code>.
*/
public String getDescription() {
return (String) get(7);
}
/**
* Setter for <code>ervu_business_metrics.databasechangelog.comments</code>.
*/
public void setComments(String value) {
set(8, value);
}
/**
* Getter for <code>ervu_business_metrics.databasechangelog.comments</code>.
*/
public String getComments() {
return (String) get(8);
}
/**
* Setter for <code>ervu_business_metrics.databasechangelog.tag</code>.
*/
public void setTag(String value) {
set(9, value);
}
/**
* Getter for <code>ervu_business_metrics.databasechangelog.tag</code>.
*/
public String getTag() {
return (String) get(9);
}
/**
* Setter for
* <code>ervu_business_metrics.databasechangelog.liquibase</code>.
*/
public void setLiquibase(String value) {
set(10, value);
}
/**
* Getter for
* <code>ervu_business_metrics.databasechangelog.liquibase</code>.
*/
public String getLiquibase() {
return (String) get(10);
}
/**
* Setter for <code>ervu_business_metrics.databasechangelog.contexts</code>.
*/
public void setContexts(String value) {
set(11, value);
}
/**
* Getter for <code>ervu_business_metrics.databasechangelog.contexts</code>.
*/
public String getContexts() {
return (String) get(11);
}
/**
* Setter for <code>ervu_business_metrics.databasechangelog.labels</code>.
*/
public void setLabels(String value) {
set(12, value);
}
/**
* Getter for <code>ervu_business_metrics.databasechangelog.labels</code>.
*/
public String getLabels() {
return (String) get(12);
}
/**
* Setter for
* <code>ervu_business_metrics.databasechangelog.deployment_id</code>.
*/
public void setDeploymentId(String value) {
set(13, value);
}
/**
* Getter for
* <code>ervu_business_metrics.databasechangelog.deployment_id</code>.
*/
public String getDeploymentId() {
return (String) get(13);
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached DatabasechangelogRecord
*/
public DatabasechangelogRecord() {
super(Databasechangelog.DATABASECHANGELOG);
}
/**
* Create a detached, initialised DatabasechangelogRecord
*/
public DatabasechangelogRecord(String id, String author, String filename, Timestamp dateexecuted, Integer orderexecuted, String exectype, String md5sum, String description, String comments, String tag, String liquibase, String contexts, String labels, String deploymentId) {
super(Databasechangelog.DATABASECHANGELOG);
setId(id);
setAuthor(author);
setFilename(filename);
setDateexecuted(dateexecuted);
setOrderexecuted(orderexecuted);
setExectype(exectype);
setMd5sum(md5sum);
setDescription(description);
setComments(comments);
setTag(tag);
setLiquibase(liquibase);
setContexts(contexts);
setLabels(labels);
setDeploymentId(deploymentId);
resetChangedOnNotNull();
}
}

View file

@ -0,0 +1,117 @@
/*
* This file is generated by jOOQ.
*/
package ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.records;
import java.sql.Timestamp;
import org.jooq.Record1;
import org.jooq.impl.UpdatableRecordImpl;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.Databasechangeloglock;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DatabasechangeloglockRecord extends UpdatableRecordImpl<DatabasechangeloglockRecord> {
private static final long serialVersionUID = 1L;
/**
* Setter for <code>ervu_business_metrics.databasechangeloglock.id</code>.
*/
public void setId(Integer value) {
set(0, value);
}
/**
* Getter for <code>ervu_business_metrics.databasechangeloglock.id</code>.
*/
public Integer getId() {
return (Integer) get(0);
}
/**
* Setter for
* <code>ervu_business_metrics.databasechangeloglock.locked</code>.
*/
public void setLocked(Boolean value) {
set(1, value);
}
/**
* Getter for
* <code>ervu_business_metrics.databasechangeloglock.locked</code>.
*/
public Boolean getLocked() {
return (Boolean) get(1);
}
/**
* Setter for
* <code>ervu_business_metrics.databasechangeloglock.lockgranted</code>.
*/
public void setLockgranted(Timestamp value) {
set(2, value);
}
/**
* Getter for
* <code>ervu_business_metrics.databasechangeloglock.lockgranted</code>.
*/
public Timestamp getLockgranted() {
return (Timestamp) get(2);
}
/**
* Setter for
* <code>ervu_business_metrics.databasechangeloglock.lockedby</code>.
*/
public void setLockedby(String value) {
set(3, value);
}
/**
* Getter for
* <code>ervu_business_metrics.databasechangeloglock.lockedby</code>.
*/
public String getLockedby() {
return (String) get(3);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
@Override
public Record1<Integer> key() {
return (Record1) super.key();
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached DatabasechangeloglockRecord
*/
public DatabasechangeloglockRecord() {
super(Databasechangeloglock.DATABASECHANGELOGLOCK);
}
/**
* Create a detached, initialised DatabasechangeloglockRecord
*/
public DatabasechangeloglockRecord(Integer id, Boolean locked, Timestamp lockgranted, String lockedby) {
super(Databasechangeloglock.DATABASECHANGELOGLOCK);
setId(id);
setLocked(locked);
setLockgranted(lockgranted);
setLockedby(lockedby);
resetChangedOnNotNull();
}
}

View file

@ -0,0 +1,73 @@
/*
* This file is generated by jOOQ.
*/
package ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.records;
import java.sql.Timestamp;
import org.jooq.impl.TableRecordImpl;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.LastRecordingDate;
/**
* Таблица для хранения даты и времени последней записи
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class LastRecordingDateRecord extends TableRecordImpl<LastRecordingDateRecord> {
private static final long serialVersionUID = 1L;
/**
* Setter for
* <code>ervu_business_metrics.last_recording_date.last_recording_date</code>.
*/
public void setLastRecordingDate(Timestamp value) {
set(0, value);
}
/**
* Getter for
* <code>ervu_business_metrics.last_recording_date.last_recording_date</code>.
*/
public Timestamp getLastRecordingDate() {
return (Timestamp) get(0);
}
/**
* Setter for <code>ervu_business_metrics.last_recording_date.entry</code>.
*/
public void setEntry(String value) {
set(1, value);
}
/**
* Getter for <code>ervu_business_metrics.last_recording_date.entry</code>.
*/
public String getEntry() {
return (String) get(1);
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached LastRecordingDateRecord
*/
public LastRecordingDateRecord() {
super(LastRecordingDate.LAST_RECORDING_DATE);
}
/**
* Create a detached, initialised LastRecordingDateRecord
*/
public LastRecordingDateRecord(Timestamp lastRecordingDate, String entry) {
super(LastRecordingDate.LAST_RECORDING_DATE);
setLastRecordingDate(lastRecordingDate);
setEntry(entry);
resetChangedOnNotNull();
}
}

View file

@ -0,0 +1,119 @@
/*
* This file is generated by jOOQ.
*/
package ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.records;
import java.sql.Timestamp;
import org.jooq.Record1;
import org.jooq.impl.UpdatableRecordImpl;
import ru.micord.webbpm.ervu.business_metrics.db_beans.ervu_business_metrics.tables.Shedlock;
/**
* Таблица для хранения блокировок ShedLock
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ShedlockRecord extends UpdatableRecordImpl<ShedlockRecord> {
private static final long serialVersionUID = 1L;
/**
* Setter for <code>ervu_business_metrics.shedlock.name</code>. Имя ресурса
* блокировки
*/
public void setName(String value) {
set(0, value);
}
/**
* Getter for <code>ervu_business_metrics.shedlock.name</code>. Имя ресурса
* блокировки
*/
public String getName() {
return (String) get(0);
}
/**
* Setter for <code>ervu_business_metrics.shedlock.lock_until</code>. Время,
* до которого действует блокировка
*/
public void setLockUntil(Timestamp value) {
set(1, value);
}
/**
* Getter for <code>ervu_business_metrics.shedlock.lock_until</code>. Время,
* до которого действует блокировка
*/
public Timestamp getLockUntil() {
return (Timestamp) get(1);
}
/**
* Setter for <code>ervu_business_metrics.shedlock.locked_at</code>. Время
* создания блокировки
*/
public void setLockedAt(Timestamp value) {
set(2, value);
}
/**
* Getter for <code>ervu_business_metrics.shedlock.locked_at</code>. Время
* создания блокировки
*/
public Timestamp getLockedAt() {
return (Timestamp) get(2);
}
/**
* Setter for <code>ervu_business_metrics.shedlock.locked_by</code>.
* Идентификатор узла, установившего блокировку
*/
public void setLockedBy(String value) {
set(3, value);
}
/**
* Getter for <code>ervu_business_metrics.shedlock.locked_by</code>.
* Идентификатор узла, установившего блокировку
*/
public String getLockedBy() {
return (String) get(3);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
@Override
public Record1<String> key() {
return (Record1) super.key();
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached ShedlockRecord
*/
public ShedlockRecord() {
super(Shedlock.SHEDLOCK);
}
/**
* Create a detached, initialised ShedlockRecord
*/
public ShedlockRecord(String name, Timestamp lockUntil, Timestamp lockedAt, String lockedBy) {
super(Shedlock.SHEDLOCK);
setName(name);
setLockUntil(lockUntil);
setLockedAt(lockedAt);
setLockedBy(lockedBy);
resetChangedOnNotNull();
}
}

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<changeSet id="0001" author="adel.ka">
<comment>fix view deregistration.view_generated_solutions </comment>
<sql>
CREATE TABLE IF NOT EXISTS ervu_business_metrics.last_recording_date(
last_recording_date TIMESTAMP DEFAULT now(),
entry text
);
COMMENT ON TABLE ervu_business_metrics.last_recording_date IS 'Таблица для хранения даты и времени последней записи';
</sql>
</changeSet>
</databaseChangeLog>

View file

@ -38,4 +38,5 @@
<include file="20250522-db_changes.xml" relativeToChangelogFile="true"/>
<include file="20250530-SUPPORT-9212_idmv3.xml" relativeToChangelogFile="true"/>
<include file="20250815-view_fix.xml" relativeToChangelogFile="true"/>
<include file="20250821-last_recording_date.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

View file

@ -1,5 +1,10 @@
<nav class="header" id="webbpm-header">
<div class="header-logo">
<div class="logo-title">Бизнес-метрики</div>
</div>
</div>
<div class="header-menu">
<div class="update-data">
<data-date></data-date>
</div>
</div>
</nav>

View file

@ -0,0 +1 @@
<span id="data-date">{{dataDate}}</span>

View file

@ -25,6 +25,7 @@ import {DropdownTreeViewComponent} from "../../component/field/DropdownTreeViewC
import {DropdownTreeviewSelectComponent} from "../../component/external/ngx-treeview/dropdown-treeview-select/dropdown-treeview-select.component";
import {TreeviewModule} from "ngx-treeview";
import {ErvuChartTooltip} from "../../ervu_business_metrics/component/chart/ErvuChartTooltip";
import {DataDateComponent} from "./component/data-date.component";
registerLocaleData(localeRu);
export const DIRECTIVES = [
@ -36,7 +37,8 @@ export const DIRECTIVES = [
forwardRef(() => FilterContainer),
forwardRef(() => DropdownTreeViewComponent),
forwardRef(() => DropdownTreeviewSelectComponent),
forwardRef(() => ErvuChartTooltip)
forwardRef(() => ErvuChartTooltip),
forwardRef(() => DataDateComponent)
];
@NgModule({

View file

@ -0,0 +1,31 @@
import {ChangeDetectionStrategy, ChangeDetectorRef, Component} from "@angular/core";
import {HttpClient} from "@angular/common/http";
@Component({
moduleId: module.id,
selector: 'data-date',
templateUrl: '../../../../../src/resources/template/app/component/data-date.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class DataDateComponent {
public dataDate: string;
constructor(private httpClient: HttpClient, private cd: ChangeDetectorRef) {
this.getLastRecordDate();
}
private getLastRecordDate(): void {
const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
this.httpClient.get("data-date",
{
headers: {
"Client-Time-Zone": timeZone,
}
}
).toPromise()
.then((dataDate: string) => {
this.dataDate = dataDate;
this.cd.markForCheck();
});
}
}

View file

@ -11,6 +11,7 @@
<schemas>admin_indicators</schemas>
<schemas>auth</schemas>
<schemas>deregistration</schemas>
<schemas>ervu_business_metrics</schemas>
<schemas>idm_reconcile</schemas>
<schemas>init_registration_info</schemas>
<schemas>journal_log</schemas>