This commit is contained in:
2022-03-06 16:08:44 +00:00
parent cc69f6b3d3
commit 5eab2c43bd
3 changed files with 26 additions and 11 deletions

View File

@@ -359,7 +359,7 @@ namespace AyaNova.Biz
var pdfDate=new DateTime().ToShortDateString(); var pdfDate=new DateTime().ToShortDateString();
var pdfTime=new DateTime().ToShortTimeString(); var pdfTime=new DateTime().ToShortTimeString();
reportRequest.ClientMeta = JToken.Parse($"{{'UserName':'AyaNova SuperUser','Authorization':'Bearer {jwt}','TimeZoneName':'America/Los_Angeles','LanguageName':'en-US','Hour12':true,'CurrencyName':'USD','DefaultLocale':'en','PDFDate':'{pdfDate}','PDFTime':'{pdfTime}'}}"); reportRequest.ClientMeta = JToken.Parse($"{{'UserName':'-','Authorization':'Bearer {jwt}','TimeZoneName':'America/Los_Angeles','LanguageName':'en-US','Hour12':true,'CurrencyName':'USD','DefaultLocale':'en','PDFDate':'{pdfDate}','PDFTime':'{pdfTime}'}}");
//get port number //get port number
var match = System.Text.RegularExpressions.Regex.Match(ServerBootConfig.AYANOVA_USE_URLS, "[0-9]+"); var match = System.Text.RegularExpressions.Regex.Match(ServerBootConfig.AYANOVA_USE_URLS, "[0-9]+");
var API_URL = $"http://127.0.0.1:{match.Value}/api/{AyaNovaVersion.CurrentApiVersion}/"; var API_URL = $"http://127.0.0.1:{match.Value}/api/{AyaNovaVersion.CurrentApiVersion}/";

View File

@@ -12,6 +12,18 @@ namespace AyaNova.Models
{ {
public long Id { get; set; } public long Id { get; set; }
public uint Concurrency { get; set; } public uint Concurrency { get; set; }
[Required]
public long TranslationId { get; set; }
[Required]
public string LanguageOverride { get; set; }
[Required]
public string TimeZoneOverride { get; set; }
[Required]
public string CurrencyName { get; set; }
[Required]
public bool Hour12 { get; set; }
public List<string> CustomerTags { get; set; }//Tags to match customer with this notification public List<string> CustomerTags { get; set; }//Tags to match customer with this notification
public TimeSpan AdvanceNotice { get; set; } public TimeSpan AdvanceNotice { get; set; }
public long? LinkReportId { get; set; } public long? LinkReportId { get; set; }
@@ -37,6 +49,7 @@ namespace AyaNova.Models
AgeValue = TimeSpan.Zero; AgeValue = TimeSpan.Zero;
AdvanceNotice = TimeSpan.Zero; AdvanceNotice = TimeSpan.Zero;
LinkReportId = 0; LinkReportId = 0;
} }
}//eoc }//eoc

View File

@@ -22,17 +22,16 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 1; private const int DESIRED_SCHEMA_LEVEL = 1;
internal const long EXPECTED_COLUMN_COUNT = 1336; internal const long EXPECTED_COLUMN_COUNT = 1341;
internal const long EXPECTED_INDEX_COUNT = 154; internal const long EXPECTED_INDEX_COUNT = 154;
internal const long EXPECTED_CHECK_CONSTRAINTS = 527; internal const long EXPECTED_CHECK_CONSTRAINTS = 532;
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 198; internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 199;
internal const long EXPECTED_VIEWS = 11; internal const long EXPECTED_VIEWS = 11;
internal const long EXPECTED_ROUTINES = 2; internal const long EXPECTED_ROUTINES = 2;
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
///////////////////////////////////////// (C1336:I154:CC527:FC198:V11:R2 ///////////////////////////////////////// C1341:I154:CC532:FC199:V11:R2)
/* /*
@@ -1208,6 +1207,8 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
//CUSTOMER "proxy" NOTIFICATION //CUSTOMER "proxy" NOTIFICATION
await ExecQueryAsync("CREATE TABLE acustomernotifysubscription (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, " await ExecQueryAsync("CREATE TABLE acustomernotifysubscription (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, "
+ "translationid BIGINT NOT NULL REFERENCES atranslation (id) NOT NULL, languageoverride TEXT NOT NULL, timezoneoverride TEXT NOT NULL, "
+ "currencyname TEXT NOT NULL, hour12 BOOL NOT NULL, "
+ "customertags VARCHAR(255) ARRAY, ayatype INTEGER NOT NULL, eventtype INTEGER NOT NULL, advancenotice INTERVAL NOT NULL, " + "customertags VARCHAR(255) ARRAY, ayatype INTEGER NOT NULL, eventtype INTEGER NOT NULL, advancenotice INTERVAL NOT NULL, "
+ "idvalue BIGINT NOT NULL, decvalue DECIMAL(38,18) NOT NULL, agevalue INTERVAL NOT NULL, " + "idvalue BIGINT NOT NULL, decvalue DECIMAL(38,18) NOT NULL, agevalue INTERVAL NOT NULL, "
+ "linkreportid BIGINT, tags VARCHAR(255) ARRAY)"); + "linkreportid BIGINT, tags VARCHAR(255) ARRAY)");
@@ -1215,6 +1216,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
//UNITMETERREADING //UNITMETERREADING
await ExecQueryAsync("CREATE TABLE aunitmeterreading (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, meterdate TIMESTAMPTZ NOT NULL, notes TEXT, " await ExecQueryAsync("CREATE TABLE aunitmeterreading (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, meterdate TIMESTAMPTZ NOT NULL, notes TEXT, "
+ "meter BIGINT NOT NULL, unitid BIGINT NOT NULL REFERENCES aunit(id) ON DELETE CASCADE, workorderitemunitid BIGINT REFERENCES aworkorderitemunit(id) ON DELETE SET NULL)"); + "meter BIGINT NOT NULL, unitid BIGINT NOT NULL REFERENCES aunit(id) ON DELETE CASCADE, workorderitemunitid BIGINT REFERENCES aworkorderitemunit(id) ON DELETE SET NULL)");