CS2-43: Fixed 'Last data' tables saving issues

This commit is contained in:
KharchenkoVV 2021-08-04 14:22:00 +05:00
parent 17c07f8c8e
commit 433900a1ee
8 changed files with 30 additions and 15 deletions

View File

@ -1,8 +1,11 @@
namespace AsbCloudApp.Data using System;
namespace AsbCloudApp.Data
{ {
public class FluidDataDto public class FluidDataDto
{ {
public int Key { get; set; } public int Key { get; set; }
public DateTime LastUpdate { get; set; } = DateTime.Now;
public string Name { get; set; } public string Name { get; set; }
public double Temperature { get; set; } public double Temperature { get; set; }
public double Density { get; set; } public double Density { get; set; }

View File

@ -1,8 +1,11 @@
namespace AsbCloudApp.Data using System;
namespace AsbCloudApp.Data
{ {
public class MudDiagramDataDto public class MudDiagramDataDto
{ {
public int Key { get; set; } public int Key { get; set; }
public DateTime LastUpdate { get; set; } = DateTime.Now;
public double ProbeNumber { get; set; } public double ProbeNumber { get; set; }
public double ProbeExtractionDepth { get; set; } public double ProbeExtractionDepth { get; set; }
public double Sandstone { get; set; } public double Sandstone { get; set; }
@ -14,16 +17,16 @@
public double Clay { get; set; } public double Clay { get; set; }
public double Camstone { get; set; } public double Camstone { get; set; }
public double Cement { get; set; } public double Cement { get; set; }
public double Summary { get; set; } public string Summary { get; set; }
public double DrillingMud { get; set; } public double DrillingMud { get; set; }
public double Sludge { get; set; } public double Sludge { get; set; }
public double MaxSum { get; set; } public double MaxSum { get; set; }
public double Methane { get; set; } public double Methane { get; set; }
public double Ethan { get; set; } public double Ethane { get; set; }
public double Propane { get; set; } public double Propane { get; set; }
public double Butane { get; set; } public double Butane { get; set; }
public double Pentane { get; set; } public double Pentane { get; set; }
public double MechanicalSpeed { get; set; } public double MechanicalSpeed { get; set; }
public double PreliminaryConclusion { get; set; } public string PreliminaryConclusion { get; set; }
} }
} }

View File

@ -1,10 +1,14 @@
namespace AsbCloudApp.Data using System;
namespace AsbCloudApp.Data
{ {
public class NnbDataDto public class NnbDataDto
{ {
public int Key { get; set; } public int Key { get; set; }
public DateTime LastUpdate { get; set; } = DateTime.Now;
public double Depth { get; set; } public double Depth { get; set; }
public double ZenithAngle { get; set; } public double ZenithAngle { get; set; }
public double MagneticAzimuth { get; set; }
public double TrueAzimuth { get; set; } public double TrueAzimuth { get; set; }
public double ConditionalViscosity { get; set; } public double ConditionalViscosity { get; set; }
public double DirectAzimuth { get; set; } public double DirectAzimuth { get; set; }

View File

@ -1,8 +1,11 @@
namespace AsbCloudDb.Model using System;
namespace AsbCloudDb.Model
{ {
public class FluidData public class FluidData
{ {
public int Key { get; set; } public int Key { get; set; }
public DateTime LastUpdate { get; set; } = DateTime.Now;
public string Name { get; set; } public string Name { get; set; }
public double Temperature { get; set; } public double Temperature { get; set; }
public double Density { get; set; } public double Density { get; set; }

View File

@ -19,9 +19,6 @@ namespace AsbCloudDb.Model
[Column("id_category"), Comment("id категории")] [Column("id_category"), Comment("id категории")]
public int IdCategory { get; set; } public int IdCategory { get; set; }
[Column("last_update_date")]
public DateTime LastUpdateDate { get; set; }
[Column("data", TypeName = "jsonb"), Comment("Данные таблицы последних данных")] [Column("data", TypeName = "jsonb"), Comment("Данные таблицы последних данных")]
public object Data { get; set; } public object Data { get; set; }

View File

@ -1,8 +1,11 @@
namespace AsbCloudDb.Model using System;
namespace AsbCloudDb.Model
{ {
public class MudDiagramData public class MudDiagramData
{ {
public int Key { get; set; } public int Key { get; set; }
public DateTime LastUpdate { get; set; } = DateTime.Now;
public double ProbeNumber { get; set; } public double ProbeNumber { get; set; }
public double ProbeExtractionDepth { get; set; } public double ProbeExtractionDepth { get; set; }
public double Sandstone { get; set; } public double Sandstone { get; set; }
@ -19,7 +22,7 @@
public double Sludge { get; set; } public double Sludge { get; set; }
public double MaxSum { get; set; } public double MaxSum { get; set; }
public double Methane { get; set; } public double Methane { get; set; }
public double Ethan { get; set; } public double Ethane { get; set; }
public double Propane { get; set; } public double Propane { get; set; }
public double Butane { get; set; } public double Butane { get; set; }
public double Pentane { get; set; } public double Pentane { get; set; }

View File

@ -1,10 +1,14 @@
namespace AsbCloudDb.Model using System;
namespace AsbCloudDb.Model
{ {
public class NnbData public class NnbData
{ {
public int Key { get; set; } public int Key { get; set; }
public DateTime LastUpdate { get; set; } = DateTime.Now;
public double Depth { get; set; } public double Depth { get; set; }
public double ZenithAngle { get; set; } public double ZenithAngle { get; set; }
public double MagneticAzimuth { get; set; }
public double TrueAzimuth { get; set; } public double TrueAzimuth { get; set; }
public double ConditionalViscosity { get; set; } public double ConditionalViscosity { get; set; }
public double DirectAzimuth { get; set; } public double DirectAzimuth { get; set; }

View File

@ -37,7 +37,6 @@ namespace AsbCloudInfrastructure.Services
if (entity is not null) if (entity is not null)
{ {
entity.LastUpdateDate = DateTime.Now;
entity.Data = model; entity.Data = model;
db.LastData.Update(entity); db.LastData.Update(entity);
} }
@ -47,7 +46,6 @@ namespace AsbCloudInfrastructure.Services
{ {
IdWell = idWell, IdWell = idWell,
IdCategory = idCategory, IdCategory = idCategory,
LastUpdateDate = DateTime.Now,
Data = model Data = model
}; };
db.LastData.Add(newLastData); db.LastData.Add(newLastData);