grouping services and controllers

This commit is contained in:
ngfrolov 2022-04-11 18:00:34 +05:00
parent 80434475db
commit fa9486e44d
190 changed files with 13729 additions and 13771 deletions

View File

@ -1,10 +1,4 @@
using System; namespace AsbCloudApp.Data
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsbCloudApp.Data
{ {
public class FileCategoryDto : IId public class FileCategoryDto : IId
{ {

View File

@ -1,4 +1,4 @@
namespace AsbCloudApp.Data namespace AsbCloudApp.Data.SAUB
{ {
public class SetpointInfoDto public class SetpointInfoDto
{ {

View File

@ -1,10 +1,7 @@
using System; using System;
using System.Collections.Generic; 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 public class SetpointsRequestDto : IId
{ {

View File

@ -1,5 +1,4 @@
using AsbCloudApp.Data.SAUB; using AsbCloudApp.Data.SAUB;
using System.Text.Json.Serialization;
namespace AsbCloudApp.Data namespace AsbCloudApp.Data
{ {

View File

@ -1,6 +1,4 @@
using System.Collections.Generic; namespace AsbCloudApp.Data
namespace AsbCloudApp.Data
{ {
public class UserRegistrationDto : UserDto public class UserRegistrationDto : UserDto
{ {

View File

@ -1,5 +1,4 @@
using AsbCloudApp.Data; using System;
using System;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -1,8 +1,8 @@
using AsbCloudApp.Data;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AsbCloudApp.Data;
namespace AsbCloudApp.Services namespace AsbCloudApp.Services
{ {

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using AsbCloudApp.Data;
using System.Collections.Generic;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AsbCloudApp.Data;
namespace AsbCloudApp.Services namespace AsbCloudApp.Services
{ {

View File

@ -1,6 +1,5 @@
using AsbCloudApp.Data; using AsbCloudApp.Data;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
namespace AsbCloudApp.Services namespace AsbCloudApp.Services
{ {

View File

@ -1,6 +1,5 @@
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.IO;
namespace AsbCloudApp.Services namespace AsbCloudApp.Services
{ {

View File

@ -1,8 +1,5 @@
using AsbCloudApp.Data; using AsbCloudApp.Data.SAUB;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -1,5 +1,4 @@
using AsbCloudApp.Data; using AsbCloudApp.Data;
using System;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic;
namespace AsbCloudApp.Services namespace AsbCloudApp.Services
{ {

View File

@ -1,10 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsbCloudApp namespace AsbCloudApp
{ {

View File

@ -1,6 +1,6 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using System;
namespace AsbCloudDb.Migrations namespace AsbCloudDb.Migrations
{ {

View File

@ -1,6 +1,6 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using System;
namespace AsbCloudDb.Migrations namespace AsbCloudDb.Migrations
{ {

View File

@ -1,6 +1,6 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using System;
namespace AsbCloudDb.Migrations namespace AsbCloudDb.Migrations
{ {

View File

@ -1,7 +1,7 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using System;
using System.Collections.Generic;
namespace AsbCloudDb.Migrations namespace AsbCloudDb.Migrations
{ {

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using System.Collections.Generic;
namespace AsbCloudDb.Migrations namespace AsbCloudDb.Migrations
{ {

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using System.Collections.Generic;
namespace AsbCloudDb.Migrations namespace AsbCloudDb.Migrations
{ {

View File

@ -1,5 +1,5 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations; using System;
namespace AsbCloudDb.Migrations namespace AsbCloudDb.Migrations
{ {

View File

@ -1,5 +1,5 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations; using System;
#nullable disable #nullable disable

View File

@ -229,12 +229,14 @@ namespace AsbCloudDb.Model
.HasConstraintName("t_relation_company_well_t_company_id_fk"); .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 }) entity.HasKey(x => new { x.Id, x.IdInclude })
.HasName("t_relation_user_role_user_role_pk"); .HasName("t_relation_user_role_user_role_pk");
}); });
modelBuilder.Entity<RelationUserDrillingProgramPart>(entity => { modelBuilder.Entity<RelationUserDrillingProgramPart>(entity =>
{
entity.HasKey(x => new { x.IdUser, x.IdDrillingProgramPart }) entity.HasKey(x => new { x.IdUser, x.IdDrillingProgramPart })
.HasName("t_relation_user_drilling_program_part_pk"); .HasName("t_relation_user_drilling_program_part_pk");
}); });
@ -258,7 +260,8 @@ namespace AsbCloudDb.Model
entity.HasIndex(d => d.IdWellOperationCategory); entity.HasIndex(d => d.IdWellOperationCategory);
}); });
modelBuilder.Entity<DrillingProgramPart>(entity => { modelBuilder.Entity<DrillingProgramPart>(entity =>
{
entity.HasIndex(x => new { x.IdWell, x.IdFileCategory }) entity.HasIndex(x => new { x.IdWell, x.IdFileCategory })
.IsUnique(); .IsUnique();
}); });

View File

@ -1,5 +1,5 @@
using System;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;

View File

@ -1,6 +1,6 @@
using System; using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;

View File

@ -1,8 +1,8 @@
using System;
using System.Text.Json.Serialization;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace AsbCloudDb.Model namespace AsbCloudDb.Model
{ {

View File

@ -1,6 +1,5 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace AsbCloudDb.Model namespace AsbCloudDb.Model
{ {

View File

@ -1,6 +1,6 @@
using System; using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;

View File

@ -1,6 +1,5 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System; using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_10")] [Table("t_telemetry_wits_10")]
public class Record10: RecordBase { public class Record10 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 10, /// RecordId = 10,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_11")] [Table("t_telemetry_wits_11")]
public class Record11: RecordBase { public class Record11 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 11, /// RecordId = 11,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_12")] [Table("t_telemetry_wits_12")]
public class Record12: RecordBase { public class Record12 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 12, /// RecordId = 12,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_13")] [Table("t_telemetry_wits_13")]
public class Record13: RecordBase { public class Record13 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 13, /// RecordId = 13,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_14")] [Table("t_telemetry_wits_14")]
public class Record14: RecordBase { public class Record14 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 14, /// RecordId = 14,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
#nullable enable #nullable enable
@ -10,7 +9,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_15")] [Table("t_telemetry_wits_15")]
public class Record15: RecordBase { public class Record15 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 15, /// RecordId = 15,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_16")] [Table("t_telemetry_wits_16")]
public class Record16: RecordBase { public class Record16 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 16, /// RecordId = 16,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_17")] [Table("t_telemetry_wits_17")]
public class Record17: RecordBase { public class Record17 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 17, /// RecordId = 17,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_18")] [Table("t_telemetry_wits_18")]
public class Record18: RecordBase { public class Record18 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 18, /// RecordId = 18,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_19")] [Table("t_telemetry_wits_19")]
public class Record19: RecordBase { public class Record19 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 19, /// RecordId = 19,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -8,7 +7,8 @@ namespace AsbCloudDb.Model.WITS
/// Description: Drilling data gathered at regular depth intervals /// Description: Drilling data gathered at regular depth intervals
/// </summary> /// </summary>
[Table("t_telemetry_wits_2")] [Table("t_telemetry_wits_2")]
public class Record2: RecordBase { public class Record2 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 2, /// RecordId = 2,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_20")] [Table("t_telemetry_wits_20")]
public class Record20: RecordBase { public class Record20 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 20, /// RecordId = 20,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_21")] [Table("t_telemetry_wits_21")]
public class Record21: RecordBase { public class Record21 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 21, /// RecordId = 21,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_22")] [Table("t_telemetry_wits_22")]
public class Record22: RecordBase { public class Record22 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 22, /// RecordId = 22,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_23")] [Table("t_telemetry_wits_23")]
public class Record23: RecordBase { public class Record23 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 23, /// RecordId = 23,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_24")] [Table("t_telemetry_wits_24")]
public class Record24: RecordBase { public class Record24 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 24, /// RecordId = 24,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_25")] [Table("t_telemetry_wits_25")]
public class Record25: RecordBase { public class Record25 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 25, /// RecordId = 25,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_3")] [Table("t_telemetry_wits_3")]
public class Record3: RecordBase { public class Record3 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 3, /// RecordId = 3,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_4")] [Table("t_telemetry_wits_4")]
public class Record4: RecordBase { public class Record4 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 4, /// RecordId = 4,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_5")] [Table("t_telemetry_wits_5")]
public class Record5: RecordBase { public class Record5 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 5, /// RecordId = 5,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_50")] [Table("t_telemetry_wits_50")]
public class Record50: RecordBase { public class Record50 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 50, /// RecordId = 50,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_6")] [Table("t_telemetry_wits_6")]
public class Record6: RecordBase { public class Record6 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 6, /// RecordId = 6,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_60")] [Table("t_telemetry_wits_60")]
public class Record60: RecordBase { public class Record60 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 60, /// RecordId = 60,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_61")] [Table("t_telemetry_wits_61")]
public class Record61: RecordBase { public class Record61 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 61, /// RecordId = 61,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_7")] [Table("t_telemetry_wits_7")]
public class Record7: RecordBase { public class Record7 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 7, /// RecordId = 7,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_8")] [Table("t_telemetry_wits_8")]
public class Record8: RecordBase { public class Record8 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 8, /// RecordId = 8,

View File

@ -1,4 +1,3 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS
@ -9,7 +8,8 @@ namespace AsbCloudDb.Model.WITS
/// Description2: /// Description2:
/// </summary> /// </summary>
[Table("t_telemetry_wits_9")] [Table("t_telemetry_wits_9")]
public class Record9: RecordBase { public class Record9 : RecordBase
{
/// <summary> /// <summary>
/// RecordId = 9, /// RecordId = 9,

View File

@ -1,5 +1,4 @@
using System; using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model.WITS namespace AsbCloudDb.Model.WITS

View File

@ -1,5 +1,4 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
#nullable disable #nullable disable

View File

@ -1,20 +1,20 @@
using AsbCloudApp.Data; using AsbCloudApp.Data;
using AsbCloudApp.Data.SAUB;
using AsbCloudApp.Services; using AsbCloudApp.Services;
using AsbCloudDb.Model; using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services; using AsbCloudInfrastructure.Services;
using AsbCloudInfrastructure.Services.Analysis; using AsbCloudInfrastructure.Services.Analysis;
using AsbCloudInfrastructure.Services.Cache; using AsbCloudInfrastructure.Services.Cache;
using AsbCloudInfrastructure.Services.DrillingProgram;
using AsbCloudInfrastructure.Services.SAUB;
using AsbCloudInfrastructure.Services.WellOperationService; using AsbCloudInfrastructure.Services.WellOperationService;
using AsbCloudInfrastructure.Validators; using AsbCloudInfrastructure.Validators;
using FluentValidation.AspNetCore;
using Mapster; using Mapster;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using System; using System;
using FluentValidation;
using FluentValidation.AspNetCore;
using AsbCloudInfrastructure.Services.DrillingProgram;
using AsbCloudApp.Data.SAUB;
namespace AsbCloudInfrastructure namespace AsbCloudInfrastructure
{ {

View File

@ -1,10 +1,10 @@
using System; using AsbCloudApp.Exceptions;
using System.Collections.Generic;
using System.Linq;
using AsbCloudApp.Exceptions;
using AsbCloudDb.Model; using AsbCloudDb.Model;
using AsbSaubReport.Model; using AsbSaubReport.Model;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
namespace AsbCloudInfrastructure namespace AsbCloudInfrastructure
{ {
@ -97,7 +97,8 @@ namespace AsbCloudInfrastructure
&& d.DateTime >= beginUtc && d.DateTime >= beginUtc
&& d.DateTime <= endUtc) && d.DateTime <= endUtc)
.OrderBy(d => d.DateTime) .OrderBy(d => d.DateTime)
.Select(d => new DataSaubReport { .Select(d => new DataSaubReport
{
Date = d.DateTime.DateTime.AddHours(timezoneOffset), Date = d.DateTime.DateTime.AddHours(timezoneOffset),
Mode = d.Mode, Mode = d.Mode,
WellDepth = d.WellDepth, WellDepth = d.WellDepth,

View File

@ -1,6 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
namespace AsbCloudInfrastructure.Services.Analysis namespace AsbCloudInfrastructure.Services.Analysis
{ {

View File

@ -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;
using System.Threading.Tasks; 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 namespace AsbCloudInfrastructure.Services.Analysis
{ {

View File

@ -76,7 +76,8 @@ namespace AsbCloudInfrastructure.Services.Analysis
var drillingPeriodsInfo = await db.TelemetryDataSaub var drillingPeriodsInfo = await db.TelemetryDataSaub
.Where(t => t.IdTelemetry == telemetryId) .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)) .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), WellDepthMin = g.Min(t => t.WellDepth),
WellDepthMax = g.Max(t => t.WellDepth), WellDepthMax = g.Max(t => t.WellDepth),
DateMin = g.Min(t => t.DateTime), DateMin = g.Min(t => t.DateTime),
@ -363,7 +364,8 @@ namespace AsbCloudInfrastructure.Services.Analysis
) )
.OrderBy(d => d.DateTime) .OrderBy(d => d.DateTime)
.Take(countOfRecordsForInterpolation) .Take(countOfRecordsForInterpolation)
.Select(d => new DataSaubAnalyse { .Select(d => new DataSaubAnalyse
{
IdTelemetry = d.IdTelemetry, IdTelemetry = d.IdTelemetry,
Date = d.DateTime, Date = d.DateTime,
BitDepth = d.BitDepth ?? 0, BitDepth = d.BitDepth ?? 0,

View File

@ -1,18 +1,18 @@
using AsbCloudApp.Data; using AsbCloudApp.Data;
using AsbCloudApp.Services; using AsbCloudApp.Services;
using AsbCloudDb.Model; using AsbCloudDb.Model;
using Mapster;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.IdentityModel.Tokens; using Microsoft.IdentityModel.Tokens;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IdentityModel.Tokens.Jwt;
using System.Linq; using System.Linq;
using System.Security.Claims; using System.Security.Claims;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Mapster;
using System.IdentityModel.Tokens.Jwt;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services
{ {

View File

@ -1,5 +1,4 @@
using AsbCloudApp.Data; using AsbCloudApp.Services;
using AsbCloudApp.Services;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

View File

@ -1,9 +1,8 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System.Linq; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System; using System.Linq;
using AsbCloudApp;
namespace AsbCloudInfrastructure.Services.Cache namespace AsbCloudInfrastructure.Services.Cache
{ {

View File

@ -1,11 +1,11 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Collections;
using System.Diagnostics;
namespace AsbCloudInfrastructure.Services.Cache namespace AsbCloudInfrastructure.Services.Cache
{ {

View File

@ -1,6 +1,5 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic;
namespace AsbCloudInfrastructure.Services.Cache namespace AsbCloudInfrastructure.Services.Cache
{ {

View File

@ -145,7 +145,8 @@ namespace AsbCloudInfrastructure.Services
Caption = gCluster.Key.Caption, Caption = gCluster.Key.Caption,
Latitude = gCluster.Key.Latitude, Latitude = gCluster.Key.Latitude,
Longitude = gCluster.Key.Longitude, Longitude = gCluster.Key.Longitude,
Wells = gCluster.Select(well => { Wells = gCluster.Select(well =>
{
var dto = well.Adapt<WellDto>(); var dto = well.Adapt<WellDto>();
dto.WellType = well.WellType?.Caption; dto.WellType = well.WellType?.Caption;
dto.LastTelemetryDate = wellService.GetLastTelemetryDate(well.Id).DateTime; dto.LastTelemetryDate = wellService.GetLastTelemetryDate(well.Id).DateTime;

View File

@ -1,4 +1,3 @@
using AsbCloudApp;
using AsbCloudApp.Services; using AsbCloudApp.Services;
using AsbCloudDb.Model; using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services.Cache; using AsbCloudInfrastructure.Services.Cache;
@ -21,8 +20,10 @@ namespace AsbCloudInfrastructure.Services
public ISet<string> Includes { get; } = new SortedSet<string>(); public ISet<string> Includes { get; } = new SortedSet<string>();
protected CacheTable<TModel> Cache { protected CacheTable<TModel> Cache
get { {
get
{
if (cache is null) if (cache is null)
cache = cacheDb.GetCachedTable<TModel>((AsbCloudDbContext)db, Includes); cache = cacheDb.GetCachedTable<TModel>((AsbCloudDbContext)db, Includes);
return cache; return cache;

View File

@ -1,5 +1,4 @@
using AsbCloudApp; using AsbCloudApp.Data;
using AsbCloudApp.Data;
using AsbCloudApp.Services; using AsbCloudApp.Services;
using AsbCloudDb.Model; using AsbCloudDb.Model;
using Mapster; using Mapster;
@ -93,7 +92,8 @@ namespace AsbCloudInfrastructure.Services
public virtual Task<int> InsertRangeAsync(IEnumerable<TDto> items, CancellationToken token = default) 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); var entity = Convert(i);
entity.Id = 0; entity.Id = 0;
return entity; return entity;

View File

@ -1,13 +1,13 @@
using AsbCloudApp.Data;
using AsbCloudApp.Services;
using AsbCloudDb.Model;
using Mapster;
using Microsoft.EntityFrameworkCore;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AsbCloudApp.Data;
using AsbCloudApp.Services;
using AsbCloudDb.Model;
using Microsoft.EntityFrameworkCore;
using Mapster;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services
{ {
@ -37,7 +37,8 @@ namespace AsbCloudInfrastructure.Services
.ToListAsync(token) .ToListAsync(token)
.ConfigureAwait(false); .ConfigureAwait(false);
var dtos = entities.Select(entity => { var dtos = entities.Select(entity =>
{
var dto = entity.Adapt<DrillFlowChartDto>(); var dto = entity.Adapt<DrillFlowChartDto>();
dto.LastUpdate = entity.LastUpdate.ToRemoteDateTime(timezone.Hours); dto.LastUpdate = entity.LastUpdate.ToRemoteDateTime(timezone.Hours);
return dto; return dto;

View File

@ -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.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AsbCloudApp.Data;
using AsbCloudApp.Services;
using AsbCloudDb.Model;
using Microsoft.EntityFrameworkCore;
using Mapster;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services
{ {

View File

@ -1,14 +1,8 @@
using AsbCloudApp.Data; using ClosedXML.Excel;
using AsbCloudApp.Exceptions;
using AsbCloudApp.Services;
using ClosedXML.Excel;
using ClosedXML.Excel.Drawings; using ClosedXML.Excel.Drawings;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services.DrillingProgram namespace AsbCloudInfrastructure.Services.DrillingProgram
{ {

View File

@ -358,7 +358,8 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
var marks = fileEntity.FileMarks?.Where(m => !m.IsDeleted); var marks = fileEntity.FileMarks?.Where(m => !m.IsDeleted);
if (marks?.Any() == true) if (marks?.Any() == true)
{ {
part.File.FileMarks = marks.Select(m => { part.File.FileMarks = marks.Select(m =>
{
var mark = m.Adapt<FileMarkDto>(); var mark = m.Adapt<FileMarkDto>();
mark.DateCreated = m.DateCreated.ToRemoteDateTime(timezoneOffset); mark.DateCreated = m.DateCreated.ToRemoteDateTime(timezoneOffset);
return mark; return mark;
@ -401,9 +402,11 @@ namespace AsbCloudInfrastructure.Services.DrillingProgram
await fileService.MoveAsync(idWell, null, idFileCategoryDrillingProgram, resultFileName, tempResultFilePath, token); 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}"; var message = $"Не удалось сформировать программу бурения по скважине {well?.Caption}";
drillingProgramCreateErrors[workId] = new() { drillingProgramCreateErrors[workId] = new()
{
Message = message, Message = message,
Exception = exception.Message, Exception = exception.Message,
}; };

View File

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Net.Mail; using System.Net.Mail;
using System.Text.RegularExpressions;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -1,16 +1,16 @@
using System; using AsbCloudApp.Services;
using Google.Apis.Auth.OAuth2; using Google.Apis.Auth.OAuth2;
using Google.Apis.Auth.OAuth2.Flows; using Google.Apis.Auth.OAuth2.Flows;
using Google.Apis.Services;
using Google.Apis.Drive.v3; using Google.Apis.Drive.v3;
using Google.Apis.Util.Store;
using Google.Apis.Drive.v3.Data; 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.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using AsbCloudApp.Services;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services
{ {

View File

@ -5,7 +5,6 @@ using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services.Cache; using AsbCloudInfrastructure.Services.Cache;
using Mapster; using Mapster;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
@ -47,7 +46,8 @@ namespace AsbCloudInfrastructure.Services
.ConfigureAwait(false); .ConfigureAwait(false);
var timezone = wellService.GetTimezone(idWell); 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.CategoryName = s.Category?.Name;
d.Timestamp = s.Timestamp.ToRemoteDateTime(timezone.Hours); d.Timestamp = s.Timestamp.ToRemoteDateTime(timezone.Hours);
}); });
@ -69,7 +69,8 @@ namespace AsbCloudInfrastructure.Services
.ConfigureAwait(false); .ConfigureAwait(false);
var timezone = wellService.GetTimezone(idWell); 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.CategoryName = s.Category?.Name;
d.Timestamp = s.Timestamp.ToRemoteDateTime(timezone.Hours); d.Timestamp = s.Timestamp.ToRemoteDateTime(timezone.Hours);
}); });

View File

@ -1,11 +1,9 @@
using AsbCloudApp.Data; using AsbCloudApp.Data;
using AsbCloudApp.Services; using AsbCloudApp.Services;
using System; using System;
using System.Collections.Generic;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services
{ {

View File

@ -7,7 +7,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services.SAUB
{ {
public class EventService : IEventService public class EventService : IEventService
{ {

View File

@ -11,7 +11,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services.SAUB
{ {
public class MessageService : IMessageService public class MessageService : IMessageService
{ {
@ -50,7 +50,7 @@ namespace AsbCloudInfrastructure.Services
var query = db.TelemetryMessages.Where(m => m.IdTelemetry == idTelemetry) var query = db.TelemetryMessages.Where(m => m.IdTelemetry == idTelemetry)
.OrderBy(m => m.DateTime).AsNoTracking(); .OrderBy(m => m.DateTime).AsNoTracking();
if ((categoryids?.Any() == true) || !string.IsNullOrEmpty(searchString)) if (categoryids?.Any() == true || !string.IsNullOrEmpty(searchString))
{ {
if (!string.IsNullOrEmpty(searchString)) if (!string.IsNullOrEmpty(searchString))
events = events.Where(e => e.MessageTemplate.Contains(searchString, StringComparison.OrdinalIgnoreCase)); events = events.Where(e => e.MessageTemplate.Contains(searchString, StringComparison.OrdinalIgnoreCase));

View File

@ -0,0 +1 @@
Папка содержит services для получаемых от панели оператора САУБ запросов.

View File

@ -1,4 +1,4 @@
using AsbCloudApp.Data; using AsbCloudApp.Data.SAUB;
using AsbCloudApp.Services; using AsbCloudApp.Services;
using AsbCloudDb.Model; using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services.Cache; using AsbCloudInfrastructure.Services.Cache;
@ -9,7 +9,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services.SAUB
{ {
public class SetpointsService : ISetpointsService, IConverter<SetpointsRequestDto, SetpointsRequest> public class SetpointsService : ISetpointsService, IConverter<SetpointsRequestDto, SetpointsRequest>
{ {

View File

@ -1,7 +1,6 @@
using AsbCloudApp.Data; using AsbCloudApp.Services;
using AsbCloudApp.Services;
using AsbCloudDb.Model;
using AsbCloudDb; using AsbCloudDb;
using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services.Cache; using AsbCloudInfrastructure.Services.Cache;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System; using System;
@ -11,7 +10,7 @@ using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services.SAUB
{ {
public abstract class TelemetryDataBaseService<TDto, TModel> : ITelemetryDataService<TDto> public abstract class TelemetryDataBaseService<TDto, TModel> : ITelemetryDataService<TDto>
where TDto : AsbCloudApp.Data.ITelemetryData where TDto : AsbCloudApp.Data.ITelemetryData
@ -58,7 +57,8 @@ namespace AsbCloudInfrastructure.Services
var idTelemetry = telemetryService.GetOrCreateTelemetryIdByUid(uid); var idTelemetry = telemetryService.GetOrCreateTelemetryIdByUid(uid);
var timezone = telemetryService.GetTimezone(idTelemetry); var timezone = telemetryService.GetTimezone(idTelemetry);
var entities = dtosList.Select(dto => { var entities = dtosList.Select(dto =>
{
var entity = Convert(dto, timezone.Hours); var entity = Convert(dto, timezone.Hours);
entity.IdTelemetry = idTelemetry; entity.IdTelemetry = idTelemetry;
return entity; return entity;

View File

@ -4,7 +4,7 @@ using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services.Cache; using AsbCloudInfrastructure.Services.Cache;
using Mapster; using Mapster;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services.SAUB
{ {
public class TelemetryDataSaubService : TelemetryDataBaseService<TelemetryDataSaubDto, TelemetryDataSaub> public class TelemetryDataSaubService : TelemetryDataBaseService<TelemetryDataSaubDto, TelemetryDataSaub>
{ {

View File

@ -4,7 +4,7 @@ using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services.Cache; using AsbCloudInfrastructure.Services.Cache;
using Mapster; using Mapster;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services.SAUB
{ {
public class TelemetryDataSpinService : TelemetryDataBaseService<TelemetryDataSpinDto, TelemetryDataSpin> public class TelemetryDataSpinService : TelemetryDataBaseService<TelemetryDataSpinDto, TelemetryDataSpin>
{ {

View File

@ -1,18 +1,18 @@
using AsbCloudApp.Data; using AsbCloudApp.Data;
using AsbCloudApp.Data.SAUB;
using AsbCloudApp.Services; using AsbCloudApp.Services;
using AsbCloudDb;
using AsbCloudDb.Model; using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services.Cache; using AsbCloudInfrastructure.Services.Cache;
using Mapster; using Mapster;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks;
using System;
using System.Threading; using System.Threading;
using Microsoft.EntityFrameworkCore; using System.Threading.Tasks;
using AsbCloudDb;
using AsbCloudApp.Data.SAUB;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services.SAUB
{ {
public class TelemetryService : ITelemetryService public class TelemetryService : ITelemetryService
{ {
@ -88,7 +88,7 @@ namespace AsbCloudInfrastructure.Services
if (dto is null) if (dto is null)
throw new Exception($"Telemetry id:{idTelemetry} has no data"); 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.From = dto.From.ToTimeZoneOffsetHours(timezone.Hours);
dto.To = dto.To.ToTimeZoneOffsetHours(timezone.Hours); dto.To = dto.To.ToTimeZoneOffsetHours(timezone.Hours);

View File

@ -1,16 +1,16 @@
using AsbCloudApp.Services; using AsbCloudApp.Data;
using System; using AsbCloudApp.Services;
using System.Collections.Generic;
using System.Linq;
using AsbCloudDb.Model; using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services.Cache; using AsbCloudInfrastructure.Services.Cache;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using System.Collections.Concurrent;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration; 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 public class TelemetryTracker : ITelemetryTracker
{ {
@ -102,7 +102,7 @@ namespace AsbCloudInfrastructure.Services
private static DateTimeOffset ParseDateFromUidOrDefault(string remoteUid, DateTime defaultValue = default) private static DateTimeOffset ParseDateFromUidOrDefault(string remoteUid, DateTime defaultValue = default)
{ {
//example: uid = 20211102_173407926 //example: uid = 20211102_173407926
if (string.IsNullOrEmpty(remoteUid) || (remoteUid.Length != 18)) if (string.IsNullOrEmpty(remoteUid) || remoteUid.Length != 18)
return defaultValue; return defaultValue;
if (DateTime.TryParseExact(remoteUid, "yyyyMMdd_HHmmssfff", if (DateTime.TryParseExact(remoteUid, "yyyyMMdd_HHmmssfff",
@ -116,9 +116,11 @@ namespace AsbCloudInfrastructure.Services
public void SaveRequestDate(string uid, DateTimeOffset remoteDate) public void SaveRequestDate(string uid, DateTimeOffset remoteDate)
{ {
var stat = telemetriesStats.GetOrAdd(uid, _ => new TrackerStat { var stat = telemetriesStats.GetOrAdd(uid, _ => new TrackerStat
{
RemoteUid = uid, RemoteUid = uid,
TelemetryDateUtcMin = remoteDate} TelemetryDateUtcMin = remoteDate
}
); );
stat.LastTimeServer = DateTime.Now; stat.LastTimeServer = DateTime.Now;

View File

@ -6,7 +6,7 @@ using AsbCloudInfrastructure.Services.Cache;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services.SAUB
{ {
public class TelemetryUserService : ITelemetryUserService public class TelemetryUserService : ITelemetryUserService
{ {

View File

@ -1,10 +1,9 @@
using AsbCloudApp.Services; using AsbCloudApp.Data;
using AsbCloudApp.Services;
using System.Net.Http; using System.Net.Http;
using AsbCloudApp.Data;
using System.Text.Json; using System.Text.Json;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System;
namespace AsbCloudInfrastructure.Services namespace AsbCloudInfrastructure.Services
{ {

View File

@ -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.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; 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 namespace AsbCloudInfrastructure.Services
{ {
@ -231,7 +231,8 @@ namespace AsbCloudInfrastructure.Services
if (entity.RelationUserRoleUserRoles?.Any() == true) 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); var includedRole = cacheUserRoles.First(r => r.Id == rel.IdInclude);
return Convert(includedRole); return Convert(includedRole);
}).ToList(); }).ToList();

View File

@ -1,13 +1,13 @@
using System; using AsbCloudApp.Data;
using System.IO; using AsbCloudApp.Services;
using System.Collections.Generic;
using System.Linq;
using ClosedXML.Excel;
using AsbCloudApp.Data;
using AsbCloudDb.Model; using AsbCloudDb.Model;
using ClosedXML.Excel;
using Mapster; using Mapster;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using AsbCloudApp.Services; using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace AsbCloudInfrastructure.Services.WellOperationService namespace AsbCloudInfrastructure.Services.WellOperationService
{ {
@ -99,7 +99,8 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
return MakeExelFileStream(operations, timezone.Hours); return MakeExelFileStream(operations, timezone.Hours);
} }
public Stream GetExcelTemplateStream() { public Stream GetExcelTemplateStream()
{
var stream = System.Reflection.Assembly.GetExecutingAssembly() var stream = System.Reflection.Assembly.GetExecutingAssembly()
.GetManifestResourceStream("AsbCloudInfrastructure.Services.WellOperationService.WellOperationImportTemplate.xlsx"); .GetManifestResourceStream("AsbCloudInfrastructure.Services.WellOperationService.WellOperationImportTemplate.xlsx");
return stream; return stream;
@ -166,7 +167,8 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
{ {
if (deleteWellOperationsBeforeImport) if (deleteWellOperationsBeforeImport)
db.WellOperations.RemoveRange(db.WellOperations.Where(o => o.IdWell == idWell)); 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>(); var entity = o.Adapt<WellOperation>();
entity.IdWell = idWell; entity.IdWell = idWell;
entity.DateStart = o.DateStart.ToUtcDateTimeOffset(timezone.Hours); entity.DateStart = o.DateStart.ToUtcDateTimeOffset(timezone.Hours);

View File

@ -1,7 +1,4 @@
using AsbCloudApp.Data;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using FluentValidation;
namespace AsbCloudInfrastructure.Validators namespace AsbCloudInfrastructure.Validators
{ {

View File

@ -1,6 +1,6 @@
using AsbCloudApp.Data; using AsbCloudApp.Data;
using AsbCloudApp.Services; using AsbCloudApp.Services;
using AsbCloudWebApi.Controllers; using AsbCloudWebApi.Controllers.SAUB;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Moq; using Moq;

View File

@ -2,8 +2,8 @@
using AsbCloudApp.Data.SAUB; using AsbCloudApp.Data.SAUB;
using AsbCloudApp.Services; using AsbCloudApp.Services;
using AsbCloudDb.Model; using AsbCloudDb.Model;
using AsbCloudInfrastructure.Services;
using AsbCloudInfrastructure.Services.Cache; using AsbCloudInfrastructure.Services.Cache;
using AsbCloudInfrastructure.Services.SAUB;
using Moq; using Moq;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

View File

@ -2,8 +2,6 @@
using AsbCloudApp.Services; using AsbCloudApp.Services;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudWebApi.Controllers namespace AsbCloudWebApi.Controllers
{ {

View File

@ -2,11 +2,10 @@
using AsbCloudApp.Services; using AsbCloudApp.Services;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using System.Threading;
using System.Linq;
using System.Threading.Tasks;
using System.Collections.Generic;
using System; 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 // For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
namespace AsbCloudWebApi.Controllers namespace AsbCloudWebApi.Controllers

View File

@ -1,11 +1,11 @@
using AsbCloudApp.Data;
using AsbCloudApp.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using AsbCloudApp.Data;
using AsbCloudApp.Services;
using Microsoft.AspNetCore.Authorization;
namespace AsbCloudWebApi.Controllers namespace AsbCloudWebApi.Controllers
{ {

Some files were not shown because too many files have changed in this diff Show More