forked from ddrilling/AsbCloudServer
grouping services and controllers
This commit is contained in:
parent
80434475db
commit
fa9486e44d
@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudApp.Data
|
||||
namespace AsbCloudApp.Data
|
||||
{
|
||||
public class FileCategoryDto : IId
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace AsbCloudApp.Data
|
||||
namespace AsbCloudApp.Data.SAUB
|
||||
{
|
||||
public class SetpointInfoDto
|
||||
{
|
@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudApp.Data
|
||||
namespace AsbCloudApp.Data.SAUB
|
||||
{
|
||||
public class SetpointsRequestDto : IId
|
||||
{
|
@ -1,5 +1,4 @@
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace AsbCloudApp.Data
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudApp.Data
|
||||
namespace AsbCloudApp.Data
|
||||
{
|
||||
public class UserRegistrationDto : UserDto
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AsbCloudApp.Data;
|
||||
using System;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
using AsbCloudApp.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AsbCloudApp.Data;
|
||||
|
||||
namespace AsbCloudApp.Services
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using AsbCloudApp.Data;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AsbCloudApp.Data;
|
||||
|
||||
namespace AsbCloudApp.Services
|
||||
{
|
||||
|
@ -1,6 +1,5 @@
|
||||
using AsbCloudApp.Data;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudApp.Services
|
||||
{
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
|
||||
namespace AsbCloudApp.Services
|
||||
{
|
||||
|
@ -1,8 +1,5 @@
|
||||
using AsbCloudApp.Data;
|
||||
using System;
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AsbCloudApp.Data;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudApp.Services
|
||||
{
|
||||
|
@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudApp
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System;
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System;
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System;
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using System;
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using System;
|
||||
|
||||
#nullable disable
|
||||
|
||||
|
@ -229,12 +229,14 @@ namespace AsbCloudDb.Model
|
||||
.HasConstraintName("t_relation_company_well_t_company_id_fk");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<RelationUserRoleUserRole>(entity => {
|
||||
modelBuilder.Entity<RelationUserRoleUserRole>(entity =>
|
||||
{
|
||||
entity.HasKey(x => new { x.Id, x.IdInclude })
|
||||
.HasName("t_relation_user_role_user_role_pk");
|
||||
});
|
||||
|
||||
modelBuilder.Entity<RelationUserDrillingProgramPart>(entity => {
|
||||
modelBuilder.Entity<RelationUserDrillingProgramPart>(entity =>
|
||||
{
|
||||
entity.HasKey(x => new { x.IdUser, x.IdDrillingProgramPart })
|
||||
.HasName("t_relation_user_drilling_program_part_pk");
|
||||
});
|
||||
@ -258,7 +260,8 @@ namespace AsbCloudDb.Model
|
||||
entity.HasIndex(d => d.IdWellOperationCategory);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<DrillingProgramPart>(entity => {
|
||||
modelBuilder.Entity<DrillingProgramPart>(entity =>
|
||||
{
|
||||
entity.HasIndex(x => new { x.IdWell, x.IdFileCategory })
|
||||
.IsUnique();
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace AsbCloudDb.Model
|
||||
{
|
||||
|
@ -1,6 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace AsbCloudDb.Model
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_10")]
|
||||
public class Record10: RecordBase {
|
||||
public class Record10 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 10,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_11")]
|
||||
public class Record11: RecordBase {
|
||||
public class Record11 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 11,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_12")]
|
||||
public class Record12: RecordBase {
|
||||
public class Record12 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 12,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_13")]
|
||||
public class Record13: RecordBase {
|
||||
public class Record13 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 13,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_14")]
|
||||
public class Record14: RecordBase {
|
||||
public class Record14 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 14,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#nullable enable
|
||||
|
||||
@ -10,7 +9,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_15")]
|
||||
public class Record15: RecordBase {
|
||||
public class Record15 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 15,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_16")]
|
||||
public class Record16: RecordBase {
|
||||
public class Record16 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 16,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_17")]
|
||||
public class Record17: RecordBase {
|
||||
public class Record17 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 17,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_18")]
|
||||
public class Record18: RecordBase {
|
||||
public class Record18 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 18,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_19")]
|
||||
public class Record19: RecordBase {
|
||||
public class Record19 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 19,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -8,7 +7,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description: Drilling data gathered at regular depth intervals
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_2")]
|
||||
public class Record2: RecordBase {
|
||||
public class Record2 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 2,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_20")]
|
||||
public class Record20: RecordBase {
|
||||
public class Record20 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 20,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_21")]
|
||||
public class Record21: RecordBase {
|
||||
public class Record21 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 21,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_22")]
|
||||
public class Record22: RecordBase {
|
||||
public class Record22 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 22,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_23")]
|
||||
public class Record23: RecordBase {
|
||||
public class Record23 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 23,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_24")]
|
||||
public class Record24: RecordBase {
|
||||
public class Record24 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 24,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_25")]
|
||||
public class Record25: RecordBase {
|
||||
public class Record25 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 25,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_3")]
|
||||
public class Record3: RecordBase {
|
||||
public class Record3 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 3,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_4")]
|
||||
public class Record4: RecordBase {
|
||||
public class Record4 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 4,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_5")]
|
||||
public class Record5: RecordBase {
|
||||
public class Record5 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 5,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_50")]
|
||||
public class Record50: RecordBase {
|
||||
public class Record50 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 50,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_6")]
|
||||
public class Record6: RecordBase {
|
||||
public class Record6 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 6,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_60")]
|
||||
public class Record60: RecordBase {
|
||||
public class Record60 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 60,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_61")]
|
||||
public class Record61: RecordBase {
|
||||
public class Record61 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 61,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_7")]
|
||||
public class Record7: RecordBase {
|
||||
public class Record7 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 7,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_8")]
|
||||
public class Record8: RecordBase {
|
||||
public class Record8 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 8,
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
|
||||
/// Description2:
|
||||
/// </summary>
|
||||
[Table("t_telemetry_wits_9")]
|
||||
public class Record9: RecordBase {
|
||||
public class Record9 : RecordBase
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// RecordId = 9,
|
||||
|
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.WITS
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
#nullable disable
|
||||
|
@ -1,20 +1,20 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services;
|
||||
using AsbCloudInfrastructure.Services.Analysis;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using AsbCloudInfrastructure.Services.DrillingProgram;
|
||||
using AsbCloudInfrastructure.Services.SAUB;
|
||||
using AsbCloudInfrastructure.Services.WellOperationService;
|
||||
using AsbCloudInfrastructure.Validators;
|
||||
using FluentValidation.AspNetCore;
|
||||
using Mapster;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using FluentValidation;
|
||||
using FluentValidation.AspNetCore;
|
||||
using AsbCloudInfrastructure.Services.DrillingProgram;
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
|
||||
namespace AsbCloudInfrastructure
|
||||
{
|
||||
|
@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AsbCloudApp.Exceptions;
|
||||
using AsbCloudApp.Exceptions;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbSaubReport.Model;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace AsbCloudInfrastructure
|
||||
{
|
||||
@ -97,7 +97,8 @@ namespace AsbCloudInfrastructure
|
||||
&& d.DateTime >= beginUtc
|
||||
&& d.DateTime <= endUtc)
|
||||
.OrderBy(d => d.DateTime)
|
||||
.Select(d => new DataSaubReport {
|
||||
.Select(d => new DataSaubReport
|
||||
{
|
||||
Date = d.DateTime.DateTime.AddHours(timezoneOffset),
|
||||
Mode = d.Mode,
|
||||
WellDepth = d.WellDepth,
|
||||
|
@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.Analysis
|
||||
{
|
||||
|
@ -1,13 +1,14 @@
|
||||
using System;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using AsbCloudInfrastructure.Services.SAUB;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Diagnostics;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.Analysis
|
||||
{
|
||||
|
@ -76,7 +76,8 @@ namespace AsbCloudInfrastructure.Services.Analysis
|
||||
var drillingPeriodsInfo = await db.TelemetryDataSaub
|
||||
.Where(t => t.IdTelemetry == telemetryId)
|
||||
.GroupBy(t => Math.Floor((((t.DateTime.DayOfYear * 24 + t.DateTime.Hour) * 60 + t.DateTime.Minute) * 60 + t.DateTime.Second + timezone.Hours - shiftStartSec) / intervalSeconds))
|
||||
.Select(g => new {
|
||||
.Select(g => new
|
||||
{
|
||||
WellDepthMin = g.Min(t => t.WellDepth),
|
||||
WellDepthMax = g.Max(t => t.WellDepth),
|
||||
DateMin = g.Min(t => t.DateTime),
|
||||
@ -363,7 +364,8 @@ namespace AsbCloudInfrastructure.Services.Analysis
|
||||
)
|
||||
.OrderBy(d => d.DateTime)
|
||||
.Take(countOfRecordsForInterpolation)
|
||||
.Select(d => new DataSaubAnalyse {
|
||||
.Select(d => new DataSaubAnalyse
|
||||
{
|
||||
IdTelemetry = d.IdTelemetry,
|
||||
Date = d.DateTime,
|
||||
BitDepth = d.BitDepth ?? 0,
|
||||
|
@ -1,18 +1,18 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using Mapster;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Mapster;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudApp.Services;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -1,9 +1,8 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using AsbCloudApp;
|
||||
using System.Linq;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.Cache
|
||||
{
|
||||
|
@ -1,11 +1,11 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.Cache
|
||||
{
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.Cache
|
||||
{
|
||||
|
@ -145,7 +145,8 @@ namespace AsbCloudInfrastructure.Services
|
||||
Caption = gCluster.Key.Caption,
|
||||
Latitude = gCluster.Key.Latitude,
|
||||
Longitude = gCluster.Key.Longitude,
|
||||
Wells = gCluster.Select(well => {
|
||||
Wells = gCluster.Select(well =>
|
||||
{
|
||||
var dto = well.Adapt<WellDto>();
|
||||
dto.WellType = well.WellType?.Caption;
|
||||
dto.LastTelemetryDate = wellService.GetLastTelemetryDate(well.Id).DateTime;
|
||||
|
@ -1,4 +1,3 @@
|
||||
using AsbCloudApp;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
@ -21,8 +20,10 @@ namespace AsbCloudInfrastructure.Services
|
||||
|
||||
public ISet<string> Includes { get; } = new SortedSet<string>();
|
||||
|
||||
protected CacheTable<TModel> Cache {
|
||||
get {
|
||||
protected CacheTable<TModel> Cache
|
||||
{
|
||||
get
|
||||
{
|
||||
if (cache is null)
|
||||
cache = cacheDb.GetCachedTable<TModel>((AsbCloudDbContext)db, Includes);
|
||||
return cache;
|
||||
|
@ -1,5 +1,4 @@
|
||||
using AsbCloudApp;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using Mapster;
|
||||
@ -93,7 +92,8 @@ namespace AsbCloudInfrastructure.Services
|
||||
|
||||
public virtual Task<int> InsertRangeAsync(IEnumerable<TDto> items, CancellationToken token = default)
|
||||
{
|
||||
var entities = items.Select(i => {
|
||||
var entities = items.Select(i =>
|
||||
{
|
||||
var entity = Convert(i);
|
||||
entity.Id = 0;
|
||||
return entity;
|
||||
|
@ -1,13 +1,13 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using Mapster;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Mapster;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
{
|
||||
@ -37,7 +37,8 @@ namespace AsbCloudInfrastructure.Services
|
||||
.ToListAsync(token)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var dtos = entities.Select(entity => {
|
||||
var dtos = entities.Select(entity =>
|
||||
{
|
||||
var dto = entity.Adapt<DrillFlowChartDto>();
|
||||
dto.LastUpdate = entity.LastUpdate.ToRemoteDateTime(timezone.Hours);
|
||||
return dto;
|
||||
|
@ -1,12 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using Mapster;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Mapster;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
{
|
||||
|
@ -1,14 +1,8 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Exceptions;
|
||||
using AsbCloudApp.Services;
|
||||
using ClosedXML.Excel;
|
||||
using ClosedXML.Excel;
|
||||
using ClosedXML.Excel.Drawings;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.DrillingProgram
|
||||
{
|
||||
|
@ -358,7 +358,8 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
||||
var marks = fileEntity.FileMarks?.Where(m => !m.IsDeleted);
|
||||
if (marks?.Any() == true)
|
||||
{
|
||||
part.File.FileMarks = marks.Select(m => {
|
||||
part.File.FileMarks = marks.Select(m =>
|
||||
{
|
||||
var mark = m.Adapt<FileMarkDto>();
|
||||
mark.DateCreated = m.DateCreated.ToRemoteDateTime(timezoneOffset);
|
||||
return mark;
|
||||
@ -401,9 +402,11 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
|
||||
await fileService.MoveAsync(idWell, null, idFileCategoryDrillingProgram, resultFileName, tempResultFilePath, token);
|
||||
}
|
||||
|
||||
Task funcOnErrorProgramMake(string workId, Exception exception, CancellationToken token) {
|
||||
Task funcOnErrorProgramMake(string workId, Exception exception, CancellationToken token)
|
||||
{
|
||||
var message = $"Не удалось сформировать программу бурения по скважине {well?.Caption}";
|
||||
drillingProgramCreateErrors[workId] = new() {
|
||||
drillingProgramCreateErrors[workId] = new()
|
||||
{
|
||||
Message = message,
|
||||
Exception = exception.Message,
|
||||
};
|
||||
|
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net.Mail;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
using System;
|
||||
using AsbCloudApp.Services;
|
||||
using Google.Apis.Auth.OAuth2;
|
||||
using Google.Apis.Auth.OAuth2.Flows;
|
||||
using Google.Apis.Services;
|
||||
using Google.Apis.Drive.v3;
|
||||
using Google.Apis.Util.Store;
|
||||
using Google.Apis.Drive.v3.Data;
|
||||
using System.IO;
|
||||
using Google.Apis.Services;
|
||||
using Google.Apis.Util.Store;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AsbCloudApp.Services;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
{
|
||||
|
@ -5,7 +5,6 @@ using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using Mapster;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
@ -47,7 +46,8 @@ namespace AsbCloudInfrastructure.Services
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var timezone = wellService.GetTimezone(idWell);
|
||||
var dto = entity?.Adapt<MeasureDto, Measure>((d, s) => {
|
||||
var dto = entity?.Adapt<MeasureDto, Measure>((d, s) =>
|
||||
{
|
||||
d.CategoryName = s.Category?.Name;
|
||||
d.Timestamp = s.Timestamp.ToRemoteDateTime(timezone.Hours);
|
||||
});
|
||||
@ -69,7 +69,8 @@ namespace AsbCloudInfrastructure.Services
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var timezone = wellService.GetTimezone(idWell);
|
||||
var dtos = entities.Adapt<MeasureDto, Measure>((d, s) => {
|
||||
var dtos = entities.Adapt<MeasureDto, Measure>((d, s) =>
|
||||
{
|
||||
d.CategoryName = s.Category?.Name;
|
||||
d.Timestamp = s.Timestamp.ToRemoteDateTime(timezone.Hours);
|
||||
});
|
||||
|
@ -1,11 +1,9 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
namespace AsbCloudInfrastructure.Services.SAUB
|
||||
{
|
||||
public class EventService : IEventService
|
||||
{
|
@ -11,7 +11,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
namespace AsbCloudInfrastructure.Services.SAUB
|
||||
{
|
||||
public class MessageService : IMessageService
|
||||
{
|
||||
@ -50,7 +50,7 @@ namespace AsbCloudInfrastructure.Services
|
||||
var query = db.TelemetryMessages.Where(m => m.IdTelemetry == idTelemetry)
|
||||
.OrderBy(m => m.DateTime).AsNoTracking();
|
||||
|
||||
if ((categoryids?.Any() == true) || !string.IsNullOrEmpty(searchString))
|
||||
if (categoryids?.Any() == true || !string.IsNullOrEmpty(searchString))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(searchString))
|
||||
events = events.Where(e => e.MessageTemplate.Contains(searchString, StringComparison.OrdinalIgnoreCase));
|
1
AsbCloudInfrastructure/Services/SAUB/Readme.md
Normal file
1
AsbCloudInfrastructure/Services/SAUB/Readme.md
Normal file
@ -0,0 +1 @@
|
||||
Папка содержит services для получаемых от панели оператора САУБ запросов.
|
@ -1,4 +1,4 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
@ -9,7 +9,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
namespace AsbCloudInfrastructure.Services.SAUB
|
||||
{
|
||||
public class SetpointsService : ISetpointsService, IConverter<SetpointsRequestDto, SetpointsRequest>
|
||||
{
|
@ -1,7 +1,6 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
@ -11,7 +10,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
namespace AsbCloudInfrastructure.Services.SAUB
|
||||
{
|
||||
public abstract class TelemetryDataBaseService<TDto, TModel> : ITelemetryDataService<TDto>
|
||||
where TDto : AsbCloudApp.Data.ITelemetryData
|
||||
@ -58,7 +57,8 @@ namespace AsbCloudInfrastructure.Services
|
||||
var idTelemetry = telemetryService.GetOrCreateTelemetryIdByUid(uid);
|
||||
var timezone = telemetryService.GetTimezone(idTelemetry);
|
||||
|
||||
var entities = dtosList.Select(dto => {
|
||||
var entities = dtosList.Select(dto =>
|
||||
{
|
||||
var entity = Convert(dto, timezone.Hours);
|
||||
entity.IdTelemetry = idTelemetry;
|
||||
return entity;
|
@ -4,7 +4,7 @@ using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using Mapster;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
namespace AsbCloudInfrastructure.Services.SAUB
|
||||
{
|
||||
public class TelemetryDataSaubService : TelemetryDataBaseService<TelemetryDataSaubDto, TelemetryDataSaub>
|
||||
{
|
@ -4,7 +4,7 @@ using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using Mapster;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
namespace AsbCloudInfrastructure.Services.SAUB
|
||||
{
|
||||
public class TelemetryDataSpinService : TelemetryDataBaseService<TelemetryDataSpinDto, TelemetryDataSpin>
|
||||
{
|
@ -1,18 +1,18 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using Mapster;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using AsbCloudDb;
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
namespace AsbCloudInfrastructure.Services.SAUB
|
||||
{
|
||||
public class TelemetryService : ITelemetryService
|
||||
{
|
||||
@ -88,7 +88,7 @@ namespace AsbCloudInfrastructure.Services
|
||||
if (dto is null)
|
||||
throw new Exception($"Telemetry id:{idTelemetry} has no data");
|
||||
|
||||
var timezone = GetTimezone((int)idTelemetry);
|
||||
var timezone = GetTimezone(idTelemetry);
|
||||
dto.From = dto.From.ToTimeZoneOffsetHours(timezone.Hours);
|
||||
dto.To = dto.To.ToTimeZoneOffsetHours(timezone.Hours);
|
||||
|
@ -1,16 +1,16 @@
|
||||
using AsbCloudApp.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using AsbCloudApp.Data;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
namespace AsbCloudInfrastructure.Services.SAUB
|
||||
{
|
||||
public class TelemetryTracker : ITelemetryTracker
|
||||
{
|
||||
@ -102,7 +102,7 @@ namespace AsbCloudInfrastructure.Services
|
||||
private static DateTimeOffset ParseDateFromUidOrDefault(string remoteUid, DateTime defaultValue = default)
|
||||
{
|
||||
//example: uid = 20211102_173407926
|
||||
if (string.IsNullOrEmpty(remoteUid) || (remoteUid.Length != 18))
|
||||
if (string.IsNullOrEmpty(remoteUid) || remoteUid.Length != 18)
|
||||
return defaultValue;
|
||||
|
||||
if (DateTime.TryParseExact(remoteUid, "yyyyMMdd_HHmmssfff",
|
||||
@ -116,9 +116,11 @@ namespace AsbCloudInfrastructure.Services
|
||||
|
||||
public void SaveRequestDate(string uid, DateTimeOffset remoteDate)
|
||||
{
|
||||
var stat = telemetriesStats.GetOrAdd(uid, _ => new TrackerStat {
|
||||
var stat = telemetriesStats.GetOrAdd(uid, _ => new TrackerStat
|
||||
{
|
||||
RemoteUid = uid,
|
||||
TelemetryDateUtcMin = remoteDate}
|
||||
TelemetryDateUtcMin = remoteDate
|
||||
}
|
||||
);
|
||||
|
||||
stat.LastTimeServer = DateTime.Now;
|
@ -6,7 +6,7 @@ using AsbCloudInfrastructure.Services.Cache;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
namespace AsbCloudInfrastructure.Services.SAUB
|
||||
{
|
||||
public class TelemetryUserService : ITelemetryUserService
|
||||
{
|
@ -1,10 +1,9 @@
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using System.Net.Http;
|
||||
using AsbCloudApp.Data;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
{
|
||||
|
@ -1,15 +1,15 @@
|
||||
using AsbCloudApp.Comparators;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Exceptions;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using Mapster;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using Mapster;
|
||||
using AsbCloudApp.Services;
|
||||
using System;
|
||||
using AsbCloudApp.Comparators;
|
||||
using AsbCloudApp.Exceptions;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services
|
||||
{
|
||||
@ -231,7 +231,8 @@ namespace AsbCloudInfrastructure.Services
|
||||
|
||||
if (entity.RelationUserRoleUserRoles?.Any() == true)
|
||||
{
|
||||
dto.Roles = entity.RelationUserRoleUserRoles.Select(rel => {
|
||||
dto.Roles = entity.RelationUserRoleUserRoles.Select(rel =>
|
||||
{
|
||||
var includedRole = cacheUserRoles.First(r => r.Id == rel.IdInclude);
|
||||
return Convert(includedRole);
|
||||
}).ToList();
|
||||
|
@ -1,13 +1,13 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ClosedXML.Excel;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using ClosedXML.Excel;
|
||||
using Mapster;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using AsbCloudApp.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace AsbCloudInfrastructure.Services.WellOperationService
|
||||
{
|
||||
@ -99,7 +99,8 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
||||
return MakeExelFileStream(operations, timezone.Hours);
|
||||
}
|
||||
|
||||
public Stream GetExcelTemplateStream() {
|
||||
public Stream GetExcelTemplateStream()
|
||||
{
|
||||
var stream = System.Reflection.Assembly.GetExecutingAssembly()
|
||||
.GetManifestResourceStream("AsbCloudInfrastructure.Services.WellOperationService.WellOperationImportTemplate.xlsx");
|
||||
return stream;
|
||||
@ -166,7 +167,8 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
|
||||
{
|
||||
if (deleteWellOperationsBeforeImport)
|
||||
db.WellOperations.RemoveRange(db.WellOperations.Where(o => o.IdWell == idWell));
|
||||
var entities = operations.Select(o => {
|
||||
var entities = operations.Select(o =>
|
||||
{
|
||||
var entity = o.Adapt<WellOperation>();
|
||||
entity.IdWell = idWell;
|
||||
entity.DateStart = o.DateStart.ToUtcDateTimeOffset(timezone.Hours);
|
||||
|
@ -1,7 +1,4 @@
|
||||
using AsbCloudApp.Data;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using FluentValidation;
|
||||
|
||||
namespace AsbCloudInfrastructure.Validators
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudWebApi.Controllers;
|
||||
using AsbCloudWebApi.Controllers.SAUB;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Moq;
|
||||
|
@ -2,8 +2,8 @@
|
||||
using AsbCloudApp.Data.SAUB;
|
||||
using AsbCloudApp.Services;
|
||||
using AsbCloudDb.Model;
|
||||
using AsbCloudInfrastructure.Services;
|
||||
using AsbCloudInfrastructure.Services.Cache;
|
||||
using AsbCloudInfrastructure.Services.SAUB;
|
||||
using Moq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -2,8 +2,6 @@
|
||||
using AsbCloudApp.Services;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudWebApi.Controllers
|
||||
{
|
||||
|
@ -2,11 +2,10 @@
|
||||
using AsbCloudApp.Services;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
namespace AsbCloudWebApi.Controllers
|
||||
|
@ -1,11 +1,11 @@
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using AsbCloudApp.Data;
|
||||
using AsbCloudApp.Services;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace AsbCloudWebApi.Controllers
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user