From 192397fee77b956e8b8ba1d513ccd6af9458e152 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 19 Aug 2021 22:59:59 +0000 Subject: [PATCH] --- server/AyaNova/DataList/UnitMeterReadingDataList.cs | 8 ++++---- server/AyaNova/biz/UnitMeterReadingBiz.cs | 2 +- server/AyaNova/models/UnitMeterReading.cs | 2 +- server/AyaNova/util/AySchema.cs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/AyaNova/DataList/UnitMeterReadingDataList.cs b/server/AyaNova/DataList/UnitMeterReadingDataList.cs index bb56ad32..ac53dad5 100644 --- a/server/AyaNova/DataList/UnitMeterReadingDataList.cs +++ b/server/AyaNova/DataList/UnitMeterReadingDataList.cs @@ -16,8 +16,8 @@ namespace AyaNova.DataList + "left join aworkorder on (aworkorderitem.workorderid = aworkorder.id)"; var RoleSet = BizRoles.GetRoleSet(DefaultListAType); AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; - DefaultColumns = new List() { "notedate", "UnitMeterReadingDescription", "Unit" }; - DefaultSortBy = new Dictionary() { { "notedate", "-" } }; + DefaultColumns = new List() { "UnitMeterReadingMeterDate", "UnitMeterReadingMeter", "UnitMeterReadingDescription" }; + DefaultSortBy = new Dictionary() { { "UnitMeterReadingMeterDate", "-" } }; FieldDefinitions = new List(); @@ -28,7 +28,7 @@ namespace AyaNova.DataList AType = (int)AyaType.Unit, UiFieldDataType = (int)UiFieldDataType.Text, SqlIdColumnName = "aunit.id", - SqlValueColumnName = "aunit.name", + SqlValueColumnName = "aunit.serial", IsRowId = false }); @@ -39,7 +39,7 @@ namespace AyaNova.DataList AType = (int)AyaType.UnitMeterReading, UiFieldDataType = (int)UiFieldDataType.Text, SqlIdColumnName = "aunitmeterreading.id", - SqlValueColumnName = "aunitmeterreading.description", + SqlValueColumnName = "aunitmeterreading.notes", IsRowId = false }); diff --git a/server/AyaNova/biz/UnitMeterReadingBiz.cs b/server/AyaNova/biz/UnitMeterReadingBiz.cs index f20967c8..9afa80e6 100644 --- a/server/AyaNova/biz/UnitMeterReadingBiz.cs +++ b/server/AyaNova/biz/UnitMeterReadingBiz.cs @@ -94,7 +94,7 @@ namespace AyaNova.Biz public void DigestSearchText(UnitMeterReading obj, Search.SearchIndexProcessObjectParameters searchParams) { if (obj != null) - searchParams.AddText(obj.Description) + searchParams.AddText(obj.Notes) .AddText(obj.Meter); } diff --git a/server/AyaNova/models/UnitMeterReading.cs b/server/AyaNova/models/UnitMeterReading.cs index 6d21c1cf..a15c3f9d 100644 --- a/server/AyaNova/models/UnitMeterReading.cs +++ b/server/AyaNova/models/UnitMeterReading.cs @@ -14,7 +14,7 @@ namespace AyaNova.Models { public long Id { get; set; } public uint Concurrency { get; set; } - public string Description { get; set; } + public string Notes { get; set; } public long Meter { get; set; } public DateTime MeterDate { get; set; } public long UnitId { get; set; } diff --git a/server/AyaNova/util/AySchema.cs b/server/AyaNova/util/AySchema.cs index dd45f730..7468d3fe 100644 --- a/server/AyaNova/util/AySchema.cs +++ b/server/AyaNova/util/AySchema.cs @@ -1119,7 +1119,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); + "objectid BIGINT NOT NULL, notifysubscriptionid BIGINT NOT NULL, fail BOOL NOT NULL, error TEXT)"); //UNITMETERREADING - await ExecQueryAsync("CREATE TABLE aunitmeterreading (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, meterdate TIMESTAMP NOT NULL, description TEXT, " + await ExecQueryAsync("CREATE TABLE aunitmeterreading (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, meterdate TIMESTAMP 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)"); //LOGO