From 654b5f235ec46b47c7b0a5e7244e296a89dfeb56 Mon Sep 17 00:00:00 2001 From: "ng.frolov" Date: Thu, 4 Jul 2024 11:02:45 +0500 Subject: [PATCH] fix encoding to utf8 (without bom), u200b, line endings, tabs to 3 spaces, variants of minus char to base minus char --- AsbCloudApp/Comparators/ComparerIId.cs | 2 +- .../Comparators/TelemetryUserDtoComparer.cs | 2 +- AsbCloudApp/CyclicArray.cs | 2 +- AsbCloudApp/Data/AuthDto.cs | 2 +- AsbCloudApp/Data/BackgroundWorkDto.cs | 2 +- AsbCloudApp/Data/ChangeLogDto.cs | 2 +- AsbCloudApp/Data/ClusterDto.cs | 2 +- AsbCloudApp/Data/ClusterRopStatDto.cs | 6 +- AsbCloudApp/Data/CompanyDto.cs | 2 +- AsbCloudApp/Data/CompanyTypeDto.cs | 2 +- .../Blocks/ProcessMapWellDrillingRecordDto.cs | 20 +- .../DailyReport/Blocks/ScheduleRecordDto.cs | 40 +- .../DailyReport/Blocks/Sign/SignBlockDto.cs | 16 +- .../DailyReport/Blocks/Sign/SignRecordDto.cs | 30 +- .../Blocks/Subsystems/SubsystemBlockDto.cs | 52 +- .../Subsystems/SubsystemParametersDto.cs | 28 +- .../Blocks/Subsystems/SubsystemRecordDto.cs | 30 +- .../Blocks/TimeBalance/TimeBalanceBlockDto.cs | 46 +- .../TimeBalance/TimeBalanceRecordDto.cs | 50 +- .../DailyReport/Blocks/TrajectoryBlockDto.cs | 36 +- .../WellOperation/WellOperationBlockDto.cs | 12 +- .../WellOperation/WellOperationRecordDto.cs | 16 +- .../Data/DailyReport/DailyReportDto.cs | 106 ++-- AsbCloudApp/Data/DataSaubStatDto.cs | 2 +- AsbCloudApp/Data/DatesRangeDto.cs | 2 +- AsbCloudApp/Data/DepositDto.cs | 2 +- .../DetectedOperationDrillersStatDto.cs | 2 +- .../DetectedOperation/DetectedOperationDto.cs | 138 ++--- .../DetectedOperationListDto.cs | 2 +- .../DetectedOperationStatDto.cs | 2 +- .../DetectedOperationWithDrillerDto.cs | 2 +- .../DetectedOperation/EnabledSubsystems.cs | 170 +++--- .../EnabledSubsystemsFlags.cs | 64 +- AsbCloudApp/Data/DrillParamsDto.cs | 4 +- .../DrillTestReport/DrillTestReportDataDto.cs | 2 +- .../DrillTestReport/DrillTestReportInfoDto.cs | 2 +- .../Data/DrillerDetectedOperationStatDto.cs | 8 +- AsbCloudApp/Data/DrillerDto.cs | 2 +- AsbCloudApp/Data/DrillingProgramPartDto.cs | 2 +- AsbCloudApp/Data/DrillingProgramStateDto.cs | 2 +- AsbCloudApp/Data/FaqDto.cs | 2 +- AsbCloudApp/Data/FileCategoryDto.cs | 2 +- AsbCloudApp/Data/FileInfoDto.cs | 2 +- AsbCloudApp/Data/FileMarkDto.cs | 26 +- AsbCloudApp/Data/GTR/GtrWitsDto.cs | 368 +++++------ AsbCloudApp/Data/GTR/JsonValue.cs | 2 +- AsbCloudApp/Data/GTR/WitsItemRecordDto.cs | 2 +- AsbCloudApp/Data/GTR/WitsRecordDto.cs | 2 +- AsbCloudApp/Data/HelpPageDto.cs | 2 +- AsbCloudApp/Data/IId.cs | 2 +- AsbCloudApp/Data/IMapPoint.cs | 2 +- AsbCloudApp/Data/ITelemetryData.cs | 2 +- AsbCloudApp/Data/IWellRelated.cs | 2 +- AsbCloudApp/Data/ItemInfoDto.cs | 2 +- AsbCloudApp/Data/JobDto.cs | 2 +- AsbCloudApp/Data/LimitingParameterDataDto.cs | 2 +- AsbCloudApp/Data/LimitingParameterDto.cs | 2 +- .../Data/Manuals/ManualDirectoryDto.cs | 38 +- AsbCloudApp/Data/Manuals/ManualDto.cs | 52 +- AsbCloudApp/Data/MapPointBaseDto.cs | 2 +- AsbCloudApp/Data/MeasureDto.cs | 2 +- AsbCloudApp/Data/MessageDto.cs | 2 +- AsbCloudApp/Data/MinMaxDto.cs | 2 +- AsbCloudApp/Data/MinMaxExtendedViewDto.cs | 2 +- AsbCloudApp/Data/NotificationCategoryDto.cs | 10 +- AsbCloudApp/Data/NotificationDto.cs | 94 +-- AsbCloudApp/Data/OperationValueDto.cs | 2 +- AsbCloudApp/Data/PaginationContainer.cs | 2 +- AsbCloudApp/Data/ParserResultDto.cs | 10 +- AsbCloudApp/Data/PermissionDto.cs | 2 +- AsbCloudApp/Data/PlanFactDto.cs | 2 +- AsbCloudApp/Data/PlanFactPredictBase.cs | 2 +- AsbCloudApp/Data/PlanLimitDto.cs | 2 +- .../ProcessMapPlanAntiCrashRotationDto.cs | 2 +- .../Functions/ProcessMapPlanAutoHoldTFDto.cs | 2 +- .../Functions/ProcessMapPlanDamperDto.cs | 2 +- .../Functions/ProcessMapPlanDrillTestDto.cs | 2 +- .../Functions/ProcessMapPlanOscillationDto.cs | 2 +- .../Functions/ProcessMapPlanShockTestDto.cs | 2 +- ...rocessMapPlanStaticMeasurementOutputDto.cs | 2 +- .../ProcessMapPlanLoadCapacityDto.cs | 2 +- .../ProcessMapPlanOscillationAnglesDto.cs | 2 +- ...rocessMapPlanPositioningOffTheBottomDto.cs | 2 +- .../ProcessMapPlanReamingRotorDto.cs | 2 +- .../ProcessMapPlanReamingSlideDto.cs | 2 +- ...essMapPlanRecordingStaticMeasurementDto.cs | 2 +- .../Operations/ProcessMapPlanRotorDto.cs | 2 +- .../Operations/ProcessMapPlanSlideDto.cs | 2 +- .../ProcessMapPlanSwitchingOffThePumpDto.cs | 2 +- .../ProcessMapPlanSwitchingToTheModeDto.cs | 2 +- .../ProcessMapPlanTFOrientationDto.cs | 2 +- .../Data/ProcessMaps/ProcessMapPlanBaseDto.cs | 2 +- .../Report/ProcessMapReportDataSaubStatDto.cs | 116 ++-- .../ProcessMapReportDataSaubStatParamsDto.cs | 2 +- .../Report/ProcessMapReportWellDrillingDto.cs | 148 ++--- .../ProcessMapReportWellDrillingParamsDto.cs | 2 +- .../Data/ProcessMaps/WellSectionPlanDto.cs | 94 +-- AsbCloudApp/Data/Progress/ProgressDto.cs | 2 +- .../Data/Progress/ProgressExceptionDto.cs | 2 +- .../Data/Progress/ReportProgressDto.cs | 2 +- .../Data/Progress/ReportProgressFinalDto.cs | 2 +- AsbCloudApp/Data/ReportInfoDto.cs | 2 +- AsbCloudApp/Data/ReportPropertiesDto.cs | 2 +- AsbCloudApp/Data/RequestLogDto.cs | 2 +- AsbCloudApp/Data/RequestLogUserDto.cs | 2 +- AsbCloudApp/Data/SAUB/DrillTestBaseDto.cs | 2 +- AsbCloudApp/Data/SAUB/DrillTestDto.cs | 2 +- AsbCloudApp/Data/SAUB/DrillTestParamsDto.cs | 2 +- AsbCloudApp/Data/SAUB/EventDto.cs | 2 +- AsbCloudApp/Data/SAUB/Readme.md | 2 +- AsbCloudApp/Data/SAUB/SetpointInfoDto.cs | 2 +- AsbCloudApp/Data/SAUB/SetpointsRequestDto.cs | 2 +- AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs | 2 +- .../Data/SAUB/TelemetryDataSaubStatDto.cs | 2 +- AsbCloudApp/Data/SAUB/TelemetryDataSpinDto.cs | 2 +- AsbCloudApp/Data/SAUB/TelemetryDataStatDto.cs | 2 +- AsbCloudApp/Data/SAUB/TelemetryInfoDto.cs | 2 +- AsbCloudApp/Data/SAUB/TelemetryMessageDto.cs | 2 +- AsbCloudApp/Data/SAUB/TelemetryUserDto.cs | 2 +- .../Data/SAUB/TelemetryWirelineRunOutDto.cs | 2 +- AsbCloudApp/Data/ScheduleDto.cs | 2 +- AsbCloudApp/Data/SectionByOperationsDto.cs | 2 +- AsbCloudApp/Data/SlipsStatDto.cs | 2 +- AsbCloudApp/Data/StatClusterDto.cs | 2 +- AsbCloudApp/Data/StatOperationsDto.cs | 2 +- AsbCloudApp/Data/StatSectionDto.cs | 2 +- AsbCloudApp/Data/StatWellDto.cs | 2 +- .../Subsystems/SubsystemActiveWellStatDto.cs | 36 +- AsbCloudApp/Data/Subsystems/SubsystemDto.cs | 2 +- .../Data/Subsystems/SubsystemStatDto.cs | 2 +- AsbCloudApp/Data/TelemetryDto.cs | 2 +- AsbCloudApp/Data/TimeDto.cs | 2 +- .../Trajectory/TrajectoryCartesianFactDto.cs | 2 +- .../Trajectory/TrajectoryCartesianPlanDto.cs | 2 +- .../Data/Trajectory/TrajectoryGeoDto.cs | 2 +- .../Data/Trajectory/TrajectoryGeoFactDto.cs | 2 +- .../Data/Trajectory/TrajectoryGeoPlanDto.cs | 2 +- .../Data/Trajectory/TrajectoryPlanFactDto.cs | 2 +- AsbCloudApp/Data/User/ContactDto.cs | 2 +- AsbCloudApp/Data/User/UserDto.cs | 2 +- AsbCloudApp/Data/User/UserExtendedDto.cs | 2 +- AsbCloudApp/Data/User/UserRegistrationDto.cs | 2 +- AsbCloudApp/Data/User/UserRoleDto.cs | 2 +- AsbCloudApp/Data/User/UserTokenDto.cs | 2 +- AsbCloudApp/Data/ValidationResultDto.cs | 26 +- AsbCloudApp/Data/WITS/Readme.md | 2 +- AsbCloudApp/Data/WITS/RecordBaseDto.cs | 2 +- AsbCloudApp/Data/WellCaseDto.cs | 2 +- AsbCloudApp/Data/WellCompositeDto.cs | 2 +- AsbCloudApp/Data/WellCompositeOperationDto.cs | 2 +- .../Data/WellCompositeOperationSourceDto.cs | 2 +- AsbCloudApp/Data/WellDto.cs | 2 +- AsbCloudApp/Data/WellFinalDocumentDBDto.cs | 2 +- AsbCloudApp/Data/WellFinalDocumentDto.cs | 2 +- AsbCloudApp/Data/WellFinalDocumentInputDto.cs | 2 +- .../Data/WellFinalDocumentsHistoryDto.cs | 2 +- AsbCloudApp/Data/WellInfoDto.cs | 2 +- AsbCloudApp/Data/WellMapInfoDto.cs | 2 +- .../WellOperation/WellGroupOpertionDto.cs | 2 +- .../WellOperation/WellOperationCategoryDto.cs | 2 +- .../Data/WellOperation/WellOperationDto.cs | 180 +++--- .../Options/IWellOperationImportOptions.cs | 2 +- .../WellOperationImportDefaultOptionsDto.cs | 2 +- .../Data/WellOperationImport/RowDto.cs | 84 +-- .../Data/WellOperationImport/SheetDto.cs | 2 +- AsbCloudApp/Data/WellSectionTypeDto.cs | 22 +- AsbCloudApp/Data/WellboreDto.cs | 58 +- .../Exceptions/ArgumentInvalidException.cs | 2 +- AsbCloudApp/Exceptions/ForbidException.cs | 2 +- AsbCloudApp/Extensions/ChangeLogExtensions.cs | 2 +- .../Interfaces/IIntegrationEventHandler.cs | 14 +- .../Repositories/IChangeLogQueryBuilder.cs | 2 +- .../Repositories/IChangeLogRepository.cs | 2 +- .../Repositories/IDailyReportRepository.cs | 32 +- .../Repositories/IDataSaubStatRepository.cs | 2 +- .../Repositories/IDepositRepository.cs | 2 +- .../IDetectedOperationRepository.cs | 2 +- .../Repositories/IDrillTestRepository.cs | 2 +- AsbCloudApp/Repositories/IFaqRepository.cs | 2 +- AsbCloudApp/Repositories/IFileRepository.cs | 2 +- .../Repositories/IFileStorageRepository.cs | 2 +- AsbCloudApp/Repositories/IGtrRepository.cs | 2 +- .../Repositories/IHelpPageRepository.cs | 2 +- .../ILimitingParameterRepository.cs | 2 +- .../IManualDirectoryRepository.cs | 42 +- .../Repositories/INotificationRepository.cs | 74 +-- .../Repositories/ITelemetryDataCache.cs | 2 +- .../ITelemetryWirelineRunOutRepository.cs | 2 +- .../ITrajectoryEditableRepository.cs | 2 +- .../Repositories/ITrajectoryNnbRepository.cs | 2 +- .../Repositories/ITrajectoryRepository.cs | 2 +- AsbCloudApp/Repositories/IUserRepository.cs | 2 +- .../Repositories/IUserRoleRepository.cs | 2 +- .../Repositories/IWellCompositeRepository.cs | 2 +- .../IWellFinalDocumentsRepository.cs | 2 +- .../IWellOperationCategoryRepository.cs | 2 +- .../Repositories/IWellOperationRepository.cs | 2 +- .../IWellSectionPlanRepository.cs | 14 +- AsbCloudApp/Requests/ChangeLogRequest.cs | 2 +- AsbCloudApp/Requests/DataSaubStatRequest.cs | 2 +- .../Requests/DetectedOperationRequest.cs | 2 +- .../WellOperationExportRequest.cs | 22 +- .../ExportOptions/WellRelatedExportRequest.cs | 26 +- AsbCloudApp/Requests/FaqRequest.cs | 2 +- AsbCloudApp/Requests/FileRequest.cs | 2 +- AsbCloudApp/Requests/GtrRequest.cs | 26 +- .../Requests/LimitingParameterRequest.cs | 2 +- AsbCloudApp/Requests/MessageRequest.cs | 2 +- .../Requests/NotificationDeleteRequest.cs | 28 +- AsbCloudApp/Requests/NotificationRequest.cs | 16 +- AsbCloudApp/Requests/NotifyRequest.cs | 54 +- AsbCloudApp/Requests/OperationStatRequest.cs | 2 +- .../ParserOptions/IParserOptionsRequest.cs | 18 +- .../WellOperationParserRequest.cs | 36 +- .../ParserOptions/WellRelatedParserRequest.cs | 26 +- .../Requests/ProcessMapPlanBaseRequest.cs | 2 +- .../Requests/ReportParametersRequest.cs | 26 +- AsbCloudApp/Requests/RequestBase.cs | 2 +- AsbCloudApp/Requests/SubsystemRequest.cs | 2 +- AsbCloudApp/Requests/TelemetryRequest.cs | 2 +- AsbCloudApp/Requests/TrajectoryRequest.cs | 28 +- AsbCloudApp/Requests/WellOperationRequest.cs | 2 +- AsbCloudApp/Requests/WellRequest.cs | 2 +- .../DailyReport/IDailyReportExportService.cs | 16 +- .../DailyReport/IDailyReportService.cs | 56 +- AsbCloudApp/Services/Export/IExportService.cs | 18 +- .../Services/Export/IExportServiceFactory.cs | 18 +- AsbCloudApp/Services/FileService.cs | 2 +- AsbCloudApp/Services/IAuthService.cs | 2 +- AsbCloudApp/Services/ICrudRepository.cs | 2 +- .../Services/IDetectedOperationService.cs | 2 +- AsbCloudApp/Services/IDrillParamsService.cs | 2 +- .../Services/IDrillTestReportService.cs | 2 +- .../Services/IDrillingProgramService.cs | 2 +- AsbCloudApp/Services/IEventService.cs | 2 +- AsbCloudApp/Services/IFileCategoryService.cs | 2 +- AsbCloudApp/Services/IHelpPageService.cs | 2 +- .../Services/ILimitingParameterService.cs | 2 +- AsbCloudApp/Services/IManualCatalogService.cs | 94 +-- AsbCloudApp/Services/IMeasureService.cs | 2 +- AsbCloudApp/Services/IMessageService.cs | 2 +- .../Services/IOperationsStatService.cs | 2 +- .../Services/IReduceSamplingService.cs | 2 +- AsbCloudApp/Services/IReportService.cs | 2 +- .../Services/IRepositoryWellRelated.cs | 2 +- AsbCloudApp/Services/IRequestTracker.cs | 2 +- .../Services/IScheduleReportService.cs | 2 +- AsbCloudApp/Services/IScheduleService.cs | 2 +- AsbCloudApp/Services/ISetpointsService.cs | 2 +- AsbCloudApp/Services/ISlipsStatService.cs | 2 +- AsbCloudApp/Services/ISubsystemService.cs | 48 +- .../Services/ITelemetryDataSaubService.cs | 2 +- AsbCloudApp/Services/ITelemetryDataService.cs | 2 +- AsbCloudApp/Services/ITelemetryService.cs | 2 +- AsbCloudApp/Services/ITelemetryUserService.cs | 2 +- AsbCloudApp/Services/ITimeZoneService.cs | 2 +- .../Services/IUserSettingsRepository.cs | 2 +- .../IWellCompositeOperationService.cs | 2 +- AsbCloudApp/Services/IWellContactService.cs | 2 +- .../Services/IWellFinalDocumentsService.cs | 2 +- AsbCloudApp/Services/IWellService.cs | 2 +- AsbCloudApp/Services/IWitsRepository.cs | 2 +- .../INotificationTransportService.cs | 42 +- .../Services/Parsers/IParserFactory.cs | 20 +- .../Services/Parsers/IParserService.cs | 28 +- .../IProcessMapReportDrillingExportService.cs | 2 +- .../IProcessMapReportDrillingService.cs | 2 +- AsbCloudDb/EFExtensions.cs | 2 +- AsbCloudDb/EFExtensionsExceptionHandling.cs | 2 +- AsbCloudDb/EFExtensionsInitialization.cs | 2 +- AsbCloudDb/EFExtensionsSortBy.cs | 2 +- ...ms_table_t_telemetry_data_spin.Designer.cs | 2 +- ...lete_colums_table_t_telemetry_data_spin.cs | 2 +- ..._AddTable_t_limiting_parameter.Designer.cs | 2 +- ...109104346_AddTable_t_limiting_parameter.cs | 2 +- ...dateTable_t_limiting_parameter.Designer.cs | 2 +- ...052925_UpdateTable_t_limiting_parameter.cs | 2 +- ...010_RemoveTable_t_drill_params.Designer.cs | 2 +- ...221202040010_RemoveTable_t_drill_params.cs | 2 +- ...lOperationCategory_editDBmodel.Designer.cs | 2 +- ...84302_WellOperationCategory_editDBmodel.cs | 2 +- ...rationCategory_editDefaultData.Designer.cs | 2 +- ...1_WellOperationCategory_editDefaultData.cs | 2 +- ...ration_Manual_updateIdCategory.Designer.cs | 2 +- ...6_WellOperation_Manual_updateIdCategory.cs | 2 +- ...lete_old_WellOperationCategory.Designer.cs | 2 +- ...195803_delete_old_WellOperationCategory.cs | 2 +- ...DeleteTable_t_drill_flow_chart.Designer.cs | 2 +- ...05063810_DeleteTable_t_drill_flow_chart.cs | 2 +- ...5064341_AddTable_t_process_map.Designer.cs | 4 +- .../20221205064341_AddTable_t_process_map.cs | 4 +- ...3310_UpdateTable_t_process_map.Designer.cs | 4 +- ...0221206053310_UpdateTable_t_process_map.cs | 2 +- ...able_t_process_map_add_user_id.Designer.cs | 4 +- ...3_UpdateTable_t_process_map_add_user_id.cs | 2 +- ...eTable_t_process_map_delete_fk.Designer.cs | 4 +- ...419_UpdateTable_t_process_map_delete_fk.cs | 2 +- ...llOperations_delete_categories.Designer.cs | 2 +- ...095511_WellOperations_delete_categories.cs | 2 +- ...ellOperations_unite_categiries.Designer.cs | 2 +- ...8101110_WellOperations_unite_categiries.cs | 2 +- ...llOperations_delete_categiries.Designer.cs | 2 +- ...105512_WellOperations_delete_categiries.cs | 2 +- ...3_Truncate_detected_operations.Designer.cs | 2 +- ...1208115223_Truncate_detected_operations.cs | 2 +- ...Add_lost_WellOperationCategory.Designer.cs | 2 +- ...08122327_Add_lost_WellOperationCategory.cs | 2 +- ...OperationCategory_ids_ordering.Designer.cs | 2 +- ...2130_WellOperationCategory_ids_ordering.cs | 2 +- ...OperationCategory_name_notNull.Designer.cs | 2 +- ...Make_wellOperationCategory_name_notNull.cs | 2 +- ...newSection_t_well_section_type.Designer.cs | 2 +- ...5622_Add_newSection_t_well_section_type.cs | 2 +- ...423_AddTable_PlannedTrajectory.Designer.cs | 4 +- ...221222094423_AddTable_PlannedTrajectory.cs | 2 +- ...03_editTable_PlannedTrajectory.Designer.cs | 4 +- ...21226164803_editTable_PlannedTrajectory.cs | 2 +- ...e_t_telemetry_wireline_run_out.Designer.cs | 4 +- ...5_AddTable_t_telemetry_wireline_run_out.cs | 2 +- ...e_t_telemetry_wireline_run_out.Designer.cs | 4 +- ...pdateTable_t_telemetry_wireline_run_out.cs | 2 +- ...metry_wireline_run_out_comment.Designer.cs | 4 +- ...le_t_telemetry_wireline_run_out_comment.cs | 2 +- ...ons_wireline_plannedTrajectory.Designer.cs | 4 +- ...dPermissions_wireline_plannedTrajectory.cs | 2 +- ..._PlannedTrajectory_permissions.Designer.cs | 4 +- ...00243_Fix_PlannedTrajectory_permissions.cs | 2 +- ...Add_permissions_for_ProcessMap.Designer.cs | 4 +- ...03040530_Add_permissions_for_ProcessMap.cs | 2 +- ...PlanOperation_to_WellOperation.Designer.cs | 4 +- ...1_Add_FK_PlanOperation_to_WellOperation.cs | 2 +- ...PlanOperation_to_WellOperation.Designer.cs | 4 +- ...dd_IX_FK_PlanOperation_to_WellOperation.cs | 2 +- ...ter_well_company_wellOperation.Designer.cs | 4 +- ...osit_cluster_well_company_wellOperation.cs | 2 +- ...FileCategory_FileInfo_FileMark.Designer.cs | 4 +- ...gramPart_FileCategory_FileInfo_FileMark.cs | 2 +- ...nullable_on_Permission_Measure.Designer.cs | 4 +- ...1_Enable_nullable_on_Permission_Measure.cs | 2 +- ...able_nullable_on_user_userRole.Designer.cs | 4 +- ...062152_Enable_nullable_on_user_userRole.cs | 2 +- ...ullable_on_setpoints_finalDocs.Designer.cs | 4 +- ..._Enable_nullable_on_setpoints_finalDocs.cs | 2 +- ..._Enable_nullable_on_telemetry_.Designer.cs | 4 +- ...220095933_Enable_nullable_on_telemetry_.cs | 2 +- ...Enable_nullable_on_daylyReport.Designer.cs | 4 +- ...20100934_Enable_nullable_on_daylyReport.cs | 2 +- ...3610_add_new_OperationCategory.Designer.cs | 4 +- ...0230301063610_add_new_OperationCategory.cs | 2 +- ..._OperationCategory_Rotor_Slide.Designer.cs | 4 +- ...21_rename_OperationCategory_Rotor_Slide.cs | 2 +- ...pdateType_startDate_toDateOnly.Designer.cs | 4 +- ..._report_UpdateType_startDate_toDateOnly.cs | 2 +- ...1_Add_new_permissions_for_root.Designer.cs | 4 +- ...0307100501_Add_new_permissions_for_root.cs | 2 +- ...p_add_LimitMax_and_delete_fact.Designer.cs | 4 +- ...ProcessMap_add_LimitMax_and_delete_fact.cs | 2 +- ...120948_Add_Usage_to_ProcessMap.Designer.cs | 4 +- .../20230321120948_Add_Usage_to_ProcessMap.cs | 2 +- ...rEditor_To_WellOperation_Table.Designer.cs | 4 +- ...1_Add_UserEditor_To_WellOperation_Table.cs | 2 +- ...ateTable_t_telemetry_data_saub.Designer.cs | 4 +- ...33303_UpdateTable_t_telemetry_data_saub.cs | 2 +- ...ditTable_t_telemetry_data_saub.Designer.cs | 4 +- ...4072923_EditTable_t_telemetry_data_saub.cs | 2 +- ...entTable_t_telemetry_data_saub.Designer.cs | 4 +- ..._EditCommentTable_t_telemetry_data_saub.cs | 2 +- .../20230418051912_AddTable_t_faq.Designer.cs | 4 +- .../20230418051912_AddTable_t_faq.cs | 2 +- .../20230418055848_Add_GTR.Designer.cs | 4 +- .../Migrations/20230418055848_Add_GTR.cs | 2 +- ..._t_faq_Nullable_IdAuthorAnswer.Designer.cs | 4 +- ...dateTable_t_faq_Nullable_IdAuthorAnswer.cs | 2 +- ...ateTable_t_faq_Nullable_Answer.Designer.cs | 4 +- ...75021_UpdateTable_t_faq_Nullable_Answer.cs | 2 +- ..._faq_Field_IsFrequently_Rename.Designer.cs | 4 +- ...teTable_t_faq_Field_IsFrequently_Rename.cs | 2 +- ...dateTable_t_faq_Id_Well_Remove.Designer.cs | 4 +- ...071633_UpdateTable_t_faq_Id_Well_Remove.cs | 2 +- ...d_Permission_For_FaqStatistics.Designer.cs | 4 +- ...111955_Add_Permission_For_FaqStatistics.cs | 2 +- ...iusTarget_To_PlannedTrajectory.Designer.cs | 4 +- ...7_Add_RadiusTarget_To_PlannedTrajectory.cs | 2 +- ...tory_Field_RadiusTarget_Rename.Designer.cs | 4 +- ...ed_trajectory_Field_RadiusTarget_Rename.cs | 2 +- ...Field_IsContact_To_CompanyType.Designer.cs | 4 +- ...Well_And_Field_IsContact_To_CompanyType.cs | 2 +- ...16_Add_Permissions_WellContact.Designer.cs | 4 +- ...30628043716_Add_Permissions_WellContact.cs | 2 +- .../20230628095801_Add_HelpPage.Designer.cs | 4 +- .../Migrations/20230628095801_Add_HelpPage.cs | 2 +- ...ew_Init_Value_For_FileCategory.Designer.cs | 4 +- ...326_Add_New_Init_Value_For_FileCategory.cs | 2 +- ..._New_Init_Value_For_Permission.Designer.cs | 4 +- ...03733_Add_New_Init_Value_For_Permission.cs | 2 +- ...130529_Update_IdState_For_User.Designer.cs | 4 +- .../20230711130529_Update_IdState_For_User.cs | 2 +- ...0230711130624_Add_Notification.Designer.cs | 4 +- .../20230711130624_Add_Notification.cs | 2 +- ...0032_Add_Order_For_CompanyType.Designer.cs | 4 +- ...0230713050032_Add_Order_For_CompanyType.cs | 2 +- ...0713085928_Update_Notification.Designer.cs | 4 +- .../20230713085928_Update_Notification.cs | 2 +- ...4843_Add_Order_For_SectionType.Designer.cs | 4 +- ...0230719064843_Add_Order_For_SectionType.cs | 2 +- ...Registration_Date_Notification.Designer.cs | 4 +- ...2154_Add_Registration_Date_Notification.cs | 2 +- ...Permission_UserSettings_delete.Designer.cs | 4 +- ...2743_Add_Permission_UserSettings_delete.cs | 2 +- ...10455_Update_PlannedTrajectory.Designer.cs | 4 +- ...20230821110455_Update_PlannedTrajectory.cs | 2 +- ...90612_Add_separated_subsystems.Designer.cs | 4 +- ...20230906090612_Add_separated_subsystems.cs | 2 +- .../20230907070954_Add_Manuals.Designer.cs | 4 +- .../Migrations/20230907070954_Add_Manuals.cs | 2 +- ...0913063219_Add_New_Permissions.Designer.cs | 4 +- .../20230913063219_Add_New_Permissions.cs | 2 +- ..._ProcessMapWellboreDevelopment.Designer.cs | 4 +- ...52808_Add_ProcessMapWellboreDevelopment.cs | 2 +- ...Add_New_Permission_For_Manuals.Designer.cs | 4 +- ...25081405_Add_New_Permission_For_Manuals.cs | 2 +- ..._ProcessMapWellboreDevelopment.Designer.cs | 4 +- ...19_Update_ProcessMapWellboreDevelopment.cs | 2 +- ..._Add_OnDelete_SetNull_Behavior.Designer.cs | 4 +- ...perations_Add_OnDelete_SetNull_Behavior.cs | 2 +- .../20231012063505_Add_Contacts.Designer.cs | 4 +- .../Migrations/20231012063505_Add_Contacts.cs | 2 +- ...mission_Delete_To_Well_Contact.Designer.cs | 4 +- ...1_Add_Permission_Delete_To_Well_Contact.cs | 2 +- ...012064318_Add_Well_To_Contacts.Designer.cs | 4 +- .../20231012064318_Add_Well_To_Contacts.cs | 2 +- ...1012070239_Update_Process_Maps.Designer.cs | 2 +- .../20231012070239_Update_Process_Maps.cs | 6 +- ...date_WellContacts_Set_FullName.Designer.cs | 4 +- ...103735_Update_WellContacts_Set_FullName.cs | 2 +- .../20231017094813_Add_Drill_Test.Designer.cs | 2 +- .../20231017094813_Add_Drill_Test.cs | 2 +- ...2_Update_EntityFillerSubsystem.Designer.cs | 2 +- ...1101110412_Update_EntityFillerSubsystem.cs | 2 +- ...Field_IsContact_In_CompanyType.Designer.cs | 2 +- ...1_Rename_Field_IsContact_In_CompanyType.cs | 2 +- ..._Or_Update_Data_In_CompanyType.Designer.cs | 2 +- ...45600_Add_Or_Update_Data_In_CompanyType.cs | 2 +- ...39_Add_Data_To_WellSectionType.Designer.cs | 2 +- ...31107091439_Add_Data_To_WellSectionType.cs | 2 +- ...a_Set_ImportantColumns_NotNull.Designer.cs | 2 +- ...metry_data_Set_ImportantColumns_NotNull.cs | 2 +- ...t_Set_Email_and_Phone_Nullable.Designer.cs | 2 +- ..._t_contact_Set_Email_and_Phone_Nullable.cs | 2 +- ...31114051111_Update_DailyReport.Designer.cs | 2 +- .../20231114051111_Update_DailyReport.cs | 2 +- ...0948_Add_Fact_Trajectory_Table.Designer.cs | 2 +- ...0231115120948_Add_Fact_Trajectory_Table.cs | 2 +- ...dd_New_WellOperationCategories.Designer.cs | 2 +- ...3085551_Add_New_WellOperationCategories.cs | 2 +- ...17_Update_t_planned_trajectory.Designer.cs | 2 +- ...31127114017_Update_t_planned_trajectory.cs | 2 +- ...11522_Rename_t_trajectory_plan.Designer.cs | 2 +- ...20231129111522_Rename_t_trajectory_plan.cs | 2 +- ...1204094830_Add_WellSectionPlan.Designer.cs | 2 +- .../20231204094830_Add_WellSectionPlan.cs | 2 +- ...14_Daily_report_lost_migration.Designer.cs | 2 +- ...31205062914_Daily_report_lost_migration.cs | 2 +- ...n_add_subsystems_and_extraData.Designer.cs | 2 +- ...dOperation_add_subsystems_and_extraData.cs | 2 +- ...231216060437_Update_Subsystems.Designer.cs | 2 +- .../20231216060437_Update_Subsystems.cs | 2 +- ...ectedOperations_And_Subsystems.Designer.cs | 2 +- ...pdate_DetectedOperations_And_Subsystems.cs | 2 +- ...3_UpdateDateFormat_DailyReport.Designer.cs | 2 +- ...1220091403_UpdateDateFormat_DailyReport.cs | 2 +- ...e_WellOperation_set_Categories.Designer.cs | 2 +- ...date_Table_WellOperation_set_Categories.cs | 2 +- ...p_plan_drilling_with_changeLog.Designer.cs | 2 +- ...processmap_plan_drilling_with_changeLog.cs | 2 +- ...1060511_Add_Table_DataSaubStat.Designer.cs | 2 +- .../20240201060511_Add_Table_DataSaubStat.cs | 2 +- ...Migrate_ProcessMapPlanDrilling.Designer.cs | 2 +- ...21064802_Migrate_ProcessMapPlanDrilling.cs | 6 +- ...075904_Add_ProcessMapPlanReams.Designer.cs | 2 +- .../20240221075904_Add_ProcessMapPlanReams.cs | 2 +- ...530_Remove_old_ProcessMapPlans.Designer.cs | 2 +- ...240221091530_Remove_old_ProcessMapPlans.cs | 2 +- ...erationCategory_IdConditioning.Designer.cs | 2 +- ...te_WellOperationCategory_IdConditioning.cs | 2 +- ...94602_Update_DetectedOperation.Designer.cs | 2 +- ...20240401094602_Update_DetectedOperation.cs | 2 +- ...Add_NewWellOperationCategories.Designer.cs | 2 +- ...08112202_Add_NewWellOperationCategories.cs | 2 +- ...43251_Update_WellOperationName.Designer.cs | 2 +- ...20240415043251_Update_WellOperationName.cs | 2 +- ..._ProcessMapPlanRotor_And_Slide.Designer.cs | 2 +- ...10103_Add_ProcessMapPlanRotor_And_Slide.cs | 2 +- ...ocessMapOperationsAndFunctions.Designer.cs | 4 +- ...Tables_ProcessMapOperationsAndFunctions.cs | 4 +- ...ocessMapOperationsAndFunctions.Designer.cs | 4 +- ...Tables_ProcessMapOperationsAndFunctions.cs | 2 +- ...26_Remove_some_processMapsPlan.Designer.cs | 4 +- ...40701104026_Remove_some_processMapsPlan.cs | 2 +- .../AsbCloudDbContextModelSnapshot.cs | 4 +- AsbCloudDb/Model/AsbCloudDbContext.cs | 2 +- AsbCloudDb/Model/ChangeLogAbstract.cs | 2 +- AsbCloudDb/Model/Cluster.cs | 2 +- AsbCloudDb/Model/Company.cs | 2 +- AsbCloudDb/Model/CompanyType.cs | 2 +- AsbCloudDb/Model/Contact.cs | 2 +- .../DailyReports/Blocks/Sign/SignBlock.cs | 6 +- .../DailyReports/Blocks/Sign/SignRecord.cs | 8 +- .../Blocks/Subsystem/SubsystemBlock.cs | 16 +- .../Blocks/Subsystem/SubsystemParameters.cs | 10 +- .../Blocks/Subsystem/SubsystemRecord.cs | 8 +- .../Blocks/TimeBalance/TimeBalanceBlock.cs | 12 +- .../Blocks/TimeBalance/TimeBalanceRecord.cs | 20 +- AsbCloudDb/Model/DailyReports/DailyReport.cs | 42 +- AsbCloudDb/Model/DataSaubStat.cs | 2 +- .../Model/DefaultData/DefaultContextData.cs | 2 +- AsbCloudDb/Model/DefaultData/EntityFiller.cs | 2 +- .../Model/DefaultData/EntityFillerCompany.cs | 2 +- .../DefaultData/EntityFillerCompanyType.cs | 2 +- .../DefaultData/EntityFillerFileCategory.cs | 2 +- .../EntityFillerMeasureCategory.cs | 2 +- .../DefaultData/EntityFillerPermission.cs | 2 +- .../EntityFillerRelationUserRolePermission.cs | 2 +- .../EntityFillerRelationUserRoleUserRole.cs | 2 +- .../EntityFillerRelationUserUserRole.cs | 2 +- .../DefaultData/EntityFillerSubsystem.cs | 2 +- .../Model/DefaultData/EntityFillerUser.cs | 2 +- .../Model/DefaultData/EntityFillerUserRole.cs | 2 +- .../EntityFillerWellOperationCategory.cs | 2 +- .../EntityFillerWellSectionType.cs | 2 +- .../Model/DefaultData/EntityFillerWellType.cs | 2 +- .../DefaultData/EntityNotificationCategory.cs | 8 +- AsbCloudDb/Model/DefaultData/IEntityFiller.cs | 2 +- AsbCloudDb/Model/Deposit.cs | 2 +- AsbCloudDb/Model/DetectedOperation.cs | 2 +- AsbCloudDb/Model/DrillTest.cs | 2 +- AsbCloudDb/Model/DrillTestParameter.cs | 2 +- AsbCloudDb/Model/Driller.cs | 2 +- AsbCloudDb/Model/DrillingProgramPart.cs | 2 +- AsbCloudDb/Model/Faq.cs | 2 +- AsbCloudDb/Model/FileCategory.cs | 2 +- AsbCloudDb/Model/FileInfo.cs | 2 +- AsbCloudDb/Model/GTR/WitsItemBase.cs | 2 +- AsbCloudDb/Model/HelpPage.cs | 2 +- AsbCloudDb/Model/IAsbCloudDbContext.cs | 2 +- AsbCloudDb/Model/IId.cs | 2 +- AsbCloudDb/Model/IMapPoint.cs | 2 +- AsbCloudDb/Model/ITelemetryData.cs | 2 +- AsbCloudDb/Model/IWellRelated.cs | 2 +- AsbCloudDb/Model/ItemInfo.cs | 2 +- AsbCloudDb/Model/LimitingParameter.cs | 2 +- AsbCloudDb/Model/Manuals/Manual.cs | 42 +- AsbCloudDb/Model/Manuals/ManualDirectory.cs | 28 +- AsbCloudDb/Model/Measure.cs | 2 +- AsbCloudDb/Model/MeasureCategory.cs | 2 +- AsbCloudDb/Model/Notification.cs | 54 +- AsbCloudDb/Model/NotificationCategory.cs | 12 +- AsbCloudDb/Model/OperationValue.cs | 2 +- .../ProcessMapPlanAntiCrashRotation.cs | 2 +- .../Functions/ProcessMapPlanAutoHoldTF.cs | 2 +- .../Functions/ProcessMapPlanDamper.cs | 2 +- .../Functions/ProcessMapPlanDrillTest.cs | 2 +- .../Functions/ProcessMapPlanOscillation.cs | 4 +- .../Functions/ProcessMapPlanShockTest.cs | 2 +- .../ProcessMapPlanStaticMeasurementOutput.cs | 2 +- .../Operations/ProcessMapPlanLoadCapacity.cs | 2 +- .../ProcessMapPlanOscillationAngles.cs | 2 +- .../ProcessMapPlanPositioningOffTheBottom.cs | 2 +- .../Operations/ProcessMapPlanReamingRotor.cs | 2 +- .../Operations/ProcessMapPlanReamingSlide.cs | 2 +- ...rocessMapPlanRecordingStaticMeasurement.cs | 2 +- .../ProcessMapPlanSwitchingOffThePump.cs | 2 +- .../ProcessMapPlanSwitchingToTheMode.cs | 2 +- .../Operations/ProcessMapPlanTFOrientation.cs | 2 +- .../ProcessMapPlan/ProcessMapPlanBase.cs | 2 +- AsbCloudDb/Model/RawData.cs | 2 +- AsbCloudDb/Model/RelationCompanyWell.cs | 2 +- AsbCloudDb/Model/RelationContactWell.cs | 2 +- .../Model/RelationUserDrillingProgramPart.cs | 2 +- AsbCloudDb/Model/RelationUserRoleUserRole.cs | 2 +- AsbCloudDb/Model/ReportProperty.cs | 2 +- AsbCloudDb/Model/Schedule.cs | 2 +- AsbCloudDb/Model/SetpointsRequest.cs | 2 +- AsbCloudDb/Model/Subsystem.cs | 2 +- AsbCloudDb/Model/Telemetry.cs | 2 +- AsbCloudDb/Model/TelemetryDataSaub.cs | 2 +- AsbCloudDb/Model/TelemetryDataSaubStat.cs | 2 +- AsbCloudDb/Model/TelemetryDataSpin.cs | 2 +- AsbCloudDb/Model/TelemetryEvent.cs | 2 +- AsbCloudDb/Model/TelemetryInfo.cs | 2 +- AsbCloudDb/Model/TelemetryMessage.cs | 2 +- AsbCloudDb/Model/TelemetryUser.cs | 2 +- AsbCloudDb/Model/TelemetryWirelineRunOut.cs | 2 +- AsbCloudDb/Model/Trajectory/Trajectory.cs | 2 +- AsbCloudDb/Model/Trajectory/TrajectoryFact.cs | 2 +- AsbCloudDb/Model/Trajectory/TrajectoryPlan.cs | 2 +- AsbCloudDb/Model/User.cs | 2 +- AsbCloudDb/Model/UserRole.cs | 2 +- AsbCloudDb/Model/UserSetting.cs | 2 +- AsbCloudDb/Model/WITS/Record7.cs | 6 +- AsbCloudDb/Model/Well.cs | 2 +- AsbCloudDb/Model/WellComposite.cs | 2 +- AsbCloudDb/Model/WellFinalDocument.cs | 2 +- AsbCloudDb/Model/WellOperation.cs | 2 +- AsbCloudDb/Model/WellOperationCategory.cs | 2 +- AsbCloudDb/Model/WellSectionType.cs | 2 +- .../Model/WellSections/WellSectionPlan.cs | 48 +- AsbCloudDb/Model/WellType.cs | 2 +- AsbCloudDb/Readme.md | 2 +- .../Add permission to company for cluster.sql | 2 +- AsbCloudDb/UsefulQueries/Export_for_LMK.sql | 6 +- AsbCloudDb/UsefulQueries/TimescaleDB.sql | 2 +- AsbCloudDb/UsefulQueries/Update sequence.sql | 2 +- .../add_all_permissions_to_root.sql | 20 +- AsbCloudDb/UsefulQueries/lost_telemetries.sql | 2 +- .../UsefulQueries/telemetryOperations.sql | 2 +- .../UsefulQueries/timescale_restore_dump.sql | 12 +- AsbCloudDb/install pg timescale.md | 2 +- AsbCloudInfrastructure/AssemblyExtensions.cs | 66 +- .../Background/BackgroundWorker.cs | 2 +- .../NotificationBackgroundWorker.cs | 6 +- .../Background/PeriodicBackgroundWorker.cs | 2 +- .../PeriodicWorks/WorkDataSaubStat.cs | 2 +- .../WorkLimitingParameterCalc.cs | 2 +- .../PeriodicWorks/WorkToDeleteOldReports.cs | 2 +- AsbCloudInfrastructure/Background/Work.cs | 2 +- .../Background/WorkPeriodic.cs | 2 +- .../Background/WorkToCreateReport.cs | 2 +- .../Background/WorkToSendEmail.cs | 2 +- AsbCloudInfrastructure/Background/readme.md | 12 +- AsbCloudInfrastructure/CommonLibs/Readme.md | 2 +- AsbCloudInfrastructure/DateTimeExtensions.cs | 2 +- AsbCloudInfrastructure/DependencyInjection.cs | 2 +- AsbCloudInfrastructure/LinqExtensions.cs | 2 +- .../MemoryCacheExtentions.cs | 2 +- AsbCloudInfrastructure/PredicateBuilder.cs | 2 +- .../ReportDataSourcePgCloud.cs | 2 +- .../Repository/CacheBase.cs | 2 +- .../Repository/ChangeLogRepositoryAbstract.cs | 2 +- .../Repository/CrudCacheRepositoryBase.cs | 4 +- .../Repository/CrudRepositoryBase.cs | 2 +- .../CrudWellRelatedCacheRepositoryBase.cs | 2 +- .../CrudWellRelatedRepositoryBase.cs | 2 +- .../Repository/DataSaubStatRepository.cs | 2 +- .../Repository/DepositRepository.cs | 2 +- .../Repository/DetectedOperationRepository.cs | 2 +- .../Repository/DrillTestRepository.cs | 2 +- .../Repository/FaqRepository.cs | 2 +- .../Repository/FileRepository.cs | 2 +- .../Repository/FileStorageRepository.cs | 2 +- .../Repository/GtrWitsRepository.cs | 2 +- .../Repository/HelpPageRepository.cs | 2 +- .../Repository/LimitingParameterRepository.cs | 2 +- .../Repository/ManualDirectoryRepository.cs | 74 +-- .../Repository/NotificationRepository.cs | 210 +++---- .../ProcessMapPlanBaseRepository.cs | 2 +- .../Repository/QueryContainer.cs | 2 +- .../Repository/ScheduleRepository.cs | 2 +- .../Repository/SetpointsRequestRepository.cs | 2 +- .../TelemetryWirelineRunOutRepository.cs | 2 +- .../TrajectoryEditableRepository.cs | 2 +- .../Repository/TrajectoryNnbRepository.cs | 2 +- .../Repository/UserRepository.cs | 2 +- .../Repository/UserRoleRepository.cs | 2 +- .../Repository/UserSettingsRepository.cs | 2 +- .../Repository/WellCompositeRepository.cs | 2 +- .../WellFinalDocumentsRepository.cs | 2 +- .../WellOperationCategoryRepository.cs | 2 +- .../Repository/WellOperationRepository.cs | 2 +- .../Repository/WellSectionPlanRepository.cs | 112 ++-- .../Repository/WitsRecordRepository.cs | 2 +- .../Services/AuthService.cs | 2 +- .../DailyReport/DailyReportExportService.cs | 374 ++++++------ .../DailyReport/DailyReportService.cs | 578 +++++++++--------- .../DetectOperations/DetectableTelemetry.cs | 2 +- .../DetectedOperationExportService.cs | 272 ++++----- .../DetectedOperationService.cs | 2 +- .../Detectors/DetectorAbstract.cs | 2 +- .../Detectors/DetectorConditioning.cs | 2 +- .../Detectors/DetectorDevelopment.cs | 2 +- .../Detectors/DetectorDrilling.cs | 72 +-- .../Detectors/DetectorFlashing.cs | 2 +- .../DetectorFlashingBeforeConnection.cs | 2 +- .../Detectors/DetectorRotor.cs | 2 +- .../Detectors/DetectorSlide.cs | 2 +- .../Detectors/DetectorSlipsTime.cs | 88 +-- .../Detectors/DetectorStaticSurveying.cs | 2 +- .../Detectors/DetectorTemplating.cs | 2 +- .../DetectorTemplatingWhileDrilling.cs | 2 +- .../Detectors/OperationDetectorResult.cs | 14 +- .../EnabledSubsystemsFlagsExtensions.cs | 16 +- .../DetectOperations/InterpolationLine.cs | 2 +- .../Services/DetectOperations/Readme.md | 2 +- .../Промывка перед наращиванием.md | 26 +- .../Specifications/Промывка.md | 28 +- .../Проработка перед наращиванием.md | 32 +- .../Specifications/Проработка.md | 24 +- .../Specifications/Удержание в клиньях.md | 8 +- .../Шаблонировка при бурении.md | 22 +- .../Шаблонировки перед наращиванием.md | 32 +- .../WorkOperationDetection.cs | 2 +- .../DrillTestReportMakerService.cs | 2 +- .../DrillTestReport/DrillTestReportService.cs | 2 +- .../DrillingProgram/ContentListSheet.cs | 2 +- .../DrillingProgram/Convert/ConvertToPdf.cs | 2 +- .../DrillingProgram/DrillingProgramService.cs | 2 +- .../Services/DrillingProgram/ImageInfo.cs | 2 +- .../DrillingProgram/TitleListSheet.cs | 2 +- .../Services/Email/BaseFactory.cs | 2 +- .../Services/Email/DrillingMailBodyFactory.cs | 2 +- .../EmailNotificationTransportService.cs | 2 +- .../WellFinalDocumentMailBodyFactory .cs | 34 +- .../Services/ExcelServices/Cell.cs | 146 ++--- .../ExcelServices/ExcelExportService.cs | 92 +-- .../Services/ExcelServices/ExcelParser.cs | 192 +++--- .../ExcelServices/ExcelWellRelatedParser.cs | 20 +- .../ExcelServices/ExportExcelService.cs | 90 +-- .../ExcelServices/ParserExcelService.cs | 190 +++--- .../Templates/ITemplateParameters.cs | 8 +- .../ProcessMapPlanReamingRotorTemplate.cs | 10 +- .../ProcessMapPlanRotorTemplate.cs | 44 +- .../ProcessMapPlanSlideTemplate.cs | 16 +- .../TrajectoryFactManualTemplate.cs | 24 +- .../TrajectoryFactNnbTemplate.cs | 24 +- .../TrajectoryPlanTemplate.cs | 26 +- .../WellOperationFactTemplate.cs | 28 +- .../WellOperationPlanTemplate.cs | 28 +- .../Services/FileCategoryService.cs | 2 +- .../Services/HelpPageService.cs | 2 +- .../Services/LimitingParameterService.cs | 2 +- .../Services/ManualCatalogService.cs | 242 ++++---- .../Services/MeasureService.cs | 2 +- .../ProcessMapPlanAntiCrashRotationParser.cs | 44 +- .../Parser/ProcessMapPlanAutoHoldTFParser.cs | 44 +- .../Parser/ProcessMapPlanDamperParser.cs | 44 +- .../Parser/ProcessMapPlanDrillTestParser.cs | 44 +- .../ProcessMapPlanLoadCapacityParser.cs | 44 +- .../ProcessMapPlanOscillationAnglesParser.cs | 44 +- .../Parser/ProcessMapPlanOscillationParser.cs | 44 +- .../Parser/ProcessMapPlanParser.cs | 30 +- ...essMapPlanPositioningOffTheBottomParser.cs | 44 +- .../ProcessMapPlanReamingRotorParser.cs | 44 +- .../ProcessMapPlanReamingSlideParser.cs | 44 +- ...MapPlanRecordingStaticMeasurementParser.cs | 44 +- .../Parser/ProcessMapPlanRotorParser.cs | 44 +- .../Parser/ProcessMapPlanShockTestParser.cs | 44 +- .../Parser/ProcessMapPlanSlideParser.cs | 44 +- ...essMapPlanStaticMeasurementOutputParser.cs | 44 +- ...ProcessMapPlanSwitchingOffThePumpParser.cs | 44 +- .../ProcessMapPlanSwitchingToTheModeParser.cs | 44 +- .../ProcessMapPlanTFOrientationParser.cs | 44 +- .../ProcessMaps/Report/Data/ParamStat.cs | 2 +- .../ProcessMaps/Report/Data/TelemetryStat.cs | 2 +- ...ocessMapReportDataSaubStatExportService.cs | 2 +- .../Report/ProcessMapReportDrillingService.cs | 2 +- .../Services/ReduceSamplingService.cs | 2 +- .../Services/ReportService.cs | 2 +- .../Services/RequestTrackerService.cs | 2 +- .../Services/SAUB/CsvSerializer.cs | 2 +- .../Services/SAUB/EventService.cs | 2 +- .../Services/SAUB/MessageService.cs | 2 +- .../Services/SAUB/Readme.md | 2 +- .../Services/SAUB/SetpointsService.cs | 2 +- .../Services/SAUB/TelemetryDataBaseService.cs | 2 +- .../Services/SAUB/TelemetryDataCache.cs | 2 +- .../Services/SAUB/TelemetryDataSaubService.cs | 2 +- .../Services/SAUB/TelemetryDataSpinService.cs | 2 +- .../Services/SAUB/TelemetryService.cs | 2 +- .../Services/SAUB/TelemetryUserService.cs | 2 +- .../SAUB/TelemetryWithSoftwareVersionsDto.cs | 2 +- .../Services/SlipsStatService.cs | 2 +- .../Services/Subsystems/DepthInterpolation.cs | 2 +- .../Services/Subsystems/SubsystemService.cs | 18 +- .../Services/TimeZoneService.cs | 2 +- .../Export/TrajectoryExportService.cs | 22 +- .../TrajectoryFactManualExportService.cs | 26 +- .../Export/TrajectoryFactNnbExportService.cs | 24 +- .../Export/TrajectoryPlanExportService.cs | 24 +- .../Parser/TrajectoryFactManualParser.cs | 4 +- .../Trajectory/Parser/TrajectoryParser.cs | 16 +- .../Trajectory/Parser/TrajectoryPlanParser.cs | 4 +- .../Services/Trajectory/Templates/password.md | 2 +- .../Services/Trajectory/TrajectoryService.cs | 2 +- .../Services/WellCompositeOperationService.cs | 2 +- .../Services/WellContactService.cs | 2 +- .../Services/WellFinalDocumentsService.cs | 2 +- .../Services/WellInfoService.cs | 2 +- .../OperationsStatService.cs | 12 +- .../Services/WellOperationService/Race.cs | 2 +- .../ScheduleReportService.cs | 4 +- .../WellOperationExportServiceFactory.cs | 48 +- .../Factories/WellOperationParserFactory.cs | 48 +- .../WellOperations/WellOperationExport.cs | 56 +- .../WellOperations/WellOperationParser.cs | 102 ++-- .../Services/WellService.cs | 2 +- .../Services/WellboreService.cs | 106 ++-- .../Services/WitsInfoService.cs | 2 +- AsbCloudInfrastructure/Services/_Readme.md | 2 +- AsbCloudInfrastructure/Startup.cs | 2 +- .../ValidationExtensions.cs | 16 +- AsbCloudInfrastructure/XLExtentions.cs | 44 +- .../ApiTokenHelper.cs | 68 +-- .../AssemblyExtensions.cs | 28 +- .../BaseIntegrationTest.cs | 28 +- .../Clients/IAdminDepositClient.cs | 28 +- .../Clients/ICrudWellRelatedClient.cs | 2 +- .../Clients/IDetectedOperationClient.cs | 18 +- .../Clients/IGtrWitsClient.cs | 6 +- .../Clients/IProcessMapPlanClient.cs | 2 +- .../Clients/IProcessMapPlanDrillingClient.cs | 2 +- .../Clients/IProcessMapReportDrilling.cs | 2 +- .../Clients/ISetpointsClient.cs | 6 +- .../Clients/ISlipsTimeClient.cs | 6 +- .../Clients/ITelemetryControllerClient.cs | 2 +- .../Clients/IWellClient.cs | 6 +- .../Clients/IWellOperationClient.cs | 32 +- .../Controllers/AdminDepositControllerTest.cs | 262 ++++---- .../DetectedOperationControllerTests.cs | 270 ++++---- .../Controllers/DrillControllerTest.cs | 36 +- .../Controllers/GtrControllerTests.cs | 106 ++-- ...sMapPlanAntiCrashRotationControllerTest.cs | 2 +- .../ProcessMapPlanAutoHoldTFControllerTest.cs | 2 +- .../ProcessMapPlanDamperControllerTest.cs | 2 +- .../ProcessMapPlanDrillTestControllerTest.cs | 2 +- ...ProcessMapPlanOscillationControllerTest.cs | 2 +- .../ProcessMapPlanShockTestControllerTest.cs | 2 +- ...anStaticMeasurementOutputControllerTest.cs | 2 +- ...nUpdatingNoloadParametersControllerTest.cs | 2 +- ...rocessMapPlanLoadCapacityControllerTest.cs | 2 +- ...sMapPlanOscillationAnglesControllerTest.cs | 2 +- ...anPositioningOffTheBottomControllerTest.cs | 2 +- ...rocessMapPlanReamingRotorControllerTest.cs | 2 +- ...rocessMapPlanReamingSlideControllerTest.cs | 2 +- ...ecordingStaticMeasurementControllerTest.cs | 2 +- .../ProcessMapPlanRotorControllerTest.cs | 2 +- ...pPlanRotorRpmAccelerationControllerTest.cs | 2 +- .../ProcessMapPlanSlideControllerTest.cs | 2 +- ...apPlanSwitchingOffThePumpControllerTest.cs | 2 +- ...MapPlanSwitchingToTheModeControllerTest.cs | 2 +- ...ocessMapPlanTFOrientationControllerTest.cs | 2 +- .../ProcessMapPlanBaseControllerTest.cs | 2 +- .../ProcessMapReportDrillingControllerTest.cs | 444 +++++++------- .../Controllers/ScheduleControllerTest.cs | 2 +- .../Controllers/SetpointsControllerTest.cs | 74 +-- .../Controllers/SlipsStatControllerTest.cs | 168 ++--- .../Controllers/TelemetryControllerTest.cs | 2 +- .../WellOperationControllerTest.cs | 66 +- .../Converters/ValidationResultConverter.cs | 102 ++-- .../Data/Defaults.cs | 104 ++-- .../DbConnection.cs | 12 +- .../EFCoreExtensions.cs | 14 +- .../MatchHelper.cs | 44 +- .../Repository/DataSaubStatRepositoryTest.cs | 224 +++---- .../WebAppFactoryFixture.cs | 120 ++-- AsbCloudWebApi.IntegrationTests/readme.md | 2 +- AsbCloudWebApi.Tests/AspExtensions.cs | 2 +- .../Background/BackgroundWorkerTest.cs | 2 +- .../PeriodicBackgroundWorkerTest.cs | 2 +- AsbCloudWebApi.Tests/Background/WorkTest.cs | 2 +- AsbCloudWebApi.Tests/CommonExtensions.cs | 2 +- AsbCloudWebApi.Tests/ReflectionExtensions.cs | 2 +- .../Detectors/DetectorDrillingTests.cs | 512 ++++++++-------- .../Detectors/DetectorSlipsTimeTests.cs | 102 ++-- .../EnabledSubsystemsTests.cs | 68 +-- .../Services/FileServiceTest.cs | 2 +- .../EmailNotificationTransportServiceTests.cs | 2 +- ...ProcessMapReportDataSaubStatServiceTest.cs | 2 +- .../Trajectory/TrajectoryExportTest.cs | 2 +- .../Trajectory/TrajectoryParserTest.cs | 50 +- .../TrajectoryVisualizationServiceTest.cs | 2 +- .../WellCompositeOperationServiceTest.cs | 2 +- .../Services/WellFinalDocumentsServiceTest.cs | 2 +- .../Services/WellboreServiceTest.cs | 2 +- AsbCloudWebApi.Tests/XLExtensionsTests.cs | 282 ++++----- AsbCloudWebApi.Tests/readme.md | 2 +- .../Controllers/AdminClusterController.cs | 2 +- .../Controllers/AdminCompanyController.cs | 2 +- .../Controllers/AdminCompanyTypeController.cs | 2 +- .../Controllers/AdminDepositController.cs | 2 +- .../Controllers/AdminPermissionController.cs | 2 +- .../Controllers/AdminTelemetryController.cs | 2 +- .../Controllers/AdminUserController.cs | 2 +- .../Controllers/AdminUserRoleController.cs | 2 +- .../Controllers/AdminWellController.cs | 2 +- AsbCloudWebApi/Controllers/AuthController.cs | 2 +- .../Controllers/BackgroundWorkController.cs | 2 +- AsbCloudWebApi/Controllers/CrudController.cs | 2 +- .../Controllers/CrudWellRelatedController.cs | 2 +- .../Controllers/DailyReportController.cs | 296 ++++----- .../Controllers/DepositController.cs | 2 +- .../Controllers/DrillerController.cs | 2 +- .../Controllers/DrillingProgramController.cs | 2 +- AsbCloudWebApi/Controllers/FaqController.cs | 2 +- AsbCloudWebApi/Controllers/FileController.cs | 2 +- .../Controllers/HelpPageController.cs | 2 +- .../LimitingParameterController.cs | 2 +- .../Controllers/ManualController.cs | 124 ++-- .../Controllers/ManualDirectoryController.cs | 142 ++--- .../Controllers/MeasureController.cs | 2 +- AsbCloudWebApi/Controllers/MockController.cs | 2 +- .../Controllers/NotificationController.cs | 198 +++--- .../Controllers/OperationStatController.cs | 2 +- .../Controllers/OperationValueController.cs | 2 +- .../PeriodicBackgroundWorkerController.cs | 2 +- ...ocessMapPlanAntiCrashRotationController.cs | 2 +- .../ProcessMapPlanAutoHoldTFController.cs | 2 +- .../ProcessMapPlanDamperController.cs | 2 +- .../ProcessMapPlanDrillTestController.cs | 2 +- .../ProcessMapPlanOscillationController.cs | 2 +- .../ProcessMapPlanShockTestController.cs | 2 +- ...apPlanStaticMeasurementOutputController.cs | 2 +- .../ProcessMapPlanLoadCapacityController.cs | 2 +- ...ocessMapPlanOscillationAnglesController.cs | 2 +- ...apPlanPositioningOffTheBottomController.cs | 2 +- .../ProcessMapPlanReamingRotorController.cs | 2 +- .../ProcessMapPlanReamingSlideController.cs | 2 +- ...lanRecordingStaticMeasurementController.cs | 2 +- .../ProcessMapPlanRotorController.cs | 2 +- .../ProcessMapPlanSlideController.cs | 2 +- ...essMapPlanSwitchingOffThePumpController.cs | 2 +- ...cessMapPlanSwitchingToTheModeController.cs | 2 +- .../ProcessMapPlanTFOrientationController.cs | 2 +- .../ProcessMapPlanBaseController.cs | 2 +- .../ProcessMapReportDrillingController.cs | 2 +- .../Controllers/ProtobufController.cs | 2 +- .../Controllers/ReduceSamplingController.cs | 2 +- .../Controllers/ReportController.cs | 2 +- .../Controllers/RequestTrackerController.cs | 2 +- .../SAUB/DetectedOperationController.cs | 306 +++++----- .../Controllers/SAUB/GtrWitsController.cs | 2 +- .../Controllers/SAUB/MessageController.cs | 2 +- AsbCloudWebApi/Controllers/SAUB/Readme.md | 2 +- .../Controllers/SAUB/SetpointsController.cs | 2 +- .../Controllers/SAUB/TelemetryController.cs | 2 +- .../SAUB/TelemetryDataBaseController.cs | 2 +- .../SAUB/TelemetryDataSaubController.cs | 2 +- .../SAUB/TelemetryDataSpinController.cs | 2 +- .../SAUB/TelemetryWirelineRunOutController.cs | 2 +- .../Controllers/ScheduleController.cs | 2 +- .../Controllers/SlipsStatController.cs | 2 +- .../Subsystems/AdminSubsystemController.cs | 2 +- .../Subsystems/SubsystemController.cs | 2 +- .../Trajectory/TrajectoryController.cs | 2 +- .../TrajectoryEditableController.cs | 210 +++---- .../TrajectoryFactManualController.cs | 16 +- .../Trajectory/TrajectoryPlanController.cs | 76 +-- .../Controllers/UserSettingsController.cs | 2 +- .../WITS/WitsControllerAbstract.cs | 2 +- .../Controllers/WITS/WitsInfoController.cs | 2 +- .../Controllers/WITS/WitsRecord1Controller.cs | 2 +- .../WITS/WitsRecord50Controller.cs | 2 +- .../WITS/WitsRecord60Controller.cs | 2 +- .../WITS/WitsRecord61Controller.cs | 2 +- .../Controllers/WITS/WitsRecord7Controller.cs | 2 +- .../Controllers/WITS/WitsRecord8Controller.cs | 2 +- .../Controllers/WellCompositeController.cs | 2 +- .../WellCompositeOperationController.cs | 2 +- .../Controllers/WellContactController.cs | 2 +- AsbCloudWebApi/Controllers/WellController.cs | 2 +- .../WellFinalDocumentsController.cs | 2 +- .../Controllers/WellOperationController.cs | 2 +- .../Controllers/WellSectionsController.cs | 2 +- .../Controllers/WellboreController.cs | 20 +- .../ApiExplorerGroupPerVersionConvention.cs | 2 +- .../Converters/DateOnlyJsonConverter.cs | 2 +- .../Converters/DateOnlyTypeConverter.cs | 2 +- .../Converters/JsonValueJsonConverter.cs | 2 +- .../Converters/TimeOnlyTypeConverter.cs | 2 +- AsbCloudWebApi/DependencyInjection.cs | 2 +- .../Docs/about using DateTime[Offset].md | 2 +- .../Docs/googleDrive publish manual.md | 2 +- AsbCloudWebApi/Extensions.cs | 2 +- .../Middlewares/PermissionsMiddlware.cs | 2 +- .../Middlewares/RequerstTrackerMiddleware.cs | 2 +- .../SimplifyExceptionsMiddleware.cs | 2 +- .../UserConnectionsLimitMiddlware.cs | 2 +- AsbCloudWebApi/PermissionAttribute.cs | 2 +- AsbCloudWebApi/ProtobufModel.cs | 2 +- AsbCloudWebApi/Rest/DrillTest.http | 6 +- AsbCloudWebApi/Rest/Readme.md | 8 +- AsbCloudWebApi/Rest/WellContact.http | 22 +- AsbCloudWebApi/SignalR/BaseHub.cs | 8 +- .../SignalR/Clients/INotificationHubClient.cs | 2 +- .../SignalR/Clients/IReportHubClient.cs | 2 +- .../SignalR/Clients/ITelemetryHubClient.cs | 2 +- .../SignalR/Clients/IWellInfoHubClient.cs | 2 +- .../SignalR/Messages/NotificationMessage.cs | 6 +- AsbCloudWebApi/SignalR/NotificationHub.cs | 64 +- AsbCloudWebApi/SignalR/ReportsHub.cs | 2 +- .../Services/ConnectionManagerService.cs | 30 +- .../SignalR/Services/NotificationPublisher.cs | 108 ++-- .../SignalRNotificationTransportService.cs | 64 +- AsbCloudWebApi/SignalR/TelemetryHub.cs | 2 +- AsbCloudWebApi/SignalR/WellInfoHub.cs | 64 +- SignalRTestClient/Program.cs | 2 +- 995 files changed, 7443 insertions(+), 7443 deletions(-) diff --git a/AsbCloudApp/Comparators/ComparerIId.cs b/AsbCloudApp/Comparators/ComparerIId.cs index 4c02af80..b3fb0e15 100644 --- a/AsbCloudApp/Comparators/ComparerIId.cs +++ b/AsbCloudApp/Comparators/ComparerIId.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; diff --git a/AsbCloudApp/Comparators/TelemetryUserDtoComparer.cs b/AsbCloudApp/Comparators/TelemetryUserDtoComparer.cs index 2c8035ed..d993cc3d 100644 --- a/AsbCloudApp/Comparators/TelemetryUserDtoComparer.cs +++ b/AsbCloudApp/Comparators/TelemetryUserDtoComparer.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using System.Collections.Generic; namespace AsbCloudApp.Comparators diff --git a/AsbCloudApp/CyclicArray.cs b/AsbCloudApp/CyclicArray.cs index 384b0fdd..b9a87956 100644 --- a/AsbCloudApp/CyclicArray.cs +++ b/AsbCloudApp/CyclicArray.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; namespace System.Collections.Generic { diff --git a/AsbCloudApp/Data/AuthDto.cs b/AsbCloudApp/Data/AuthDto.cs index 9369e4c1..f2e2c20d 100644 --- a/AsbCloudApp/Data/AuthDto.cs +++ b/AsbCloudApp/Data/AuthDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/BackgroundWorkDto.cs b/AsbCloudApp/Data/BackgroundWorkDto.cs index 500f818a..d0e15b50 100644 --- a/AsbCloudApp/Data/BackgroundWorkDto.cs +++ b/AsbCloudApp/Data/BackgroundWorkDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/ChangeLogDto.cs b/AsbCloudApp/Data/ChangeLogDto.cs index 7d47be9c..503e156d 100644 --- a/AsbCloudApp/Data/ChangeLogDto.cs +++ b/AsbCloudApp/Data/ChangeLogDto.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.User; +using AsbCloudApp.Data.User; using System; namespace AsbCloudApp.Data; diff --git a/AsbCloudApp/Data/ClusterDto.cs b/AsbCloudApp/Data/ClusterDto.cs index 38dd282f..80eedfe4 100644 --- a/AsbCloudApp/Data/ClusterDto.cs +++ b/AsbCloudApp/Data/ClusterDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/ClusterRopStatDto.cs b/AsbCloudApp/Data/ClusterRopStatDto.cs index c941c082..386614dc 100644 --- a/AsbCloudApp/Data/ClusterRopStatDto.cs +++ b/AsbCloudApp/Data/ClusterRopStatDto.cs @@ -3,18 +3,18 @@ using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { /// - /// () + /// Статистика механической скорости проходки (МСП) по кусту /// public class ClusterRopStatDto { /// - /// . + /// Макс. механическая скорость проходки по кусту /// [Required] public double RopMax { get; set; } /// - /// + /// Средняя механическая скорость проходки по кусту /// [Required] public double RopAverage { get; set; } diff --git a/AsbCloudApp/Data/CompanyDto.cs b/AsbCloudApp/Data/CompanyDto.cs index f394e40e..84ac8cb6 100644 --- a/AsbCloudApp/Data/CompanyDto.cs +++ b/AsbCloudApp/Data/CompanyDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/CompanyTypeDto.cs b/AsbCloudApp/Data/CompanyTypeDto.cs index dc29e85e..b543a1ae 100644 --- a/AsbCloudApp/Data/CompanyTypeDto.cs +++ b/AsbCloudApp/Data/CompanyTypeDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/DailyReport/Blocks/ProcessMapWellDrillingRecordDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/ProcessMapWellDrillingRecordDto.cs index b5c85244..b2cf8345 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/ProcessMapWellDrillingRecordDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/ProcessMapWellDrillingRecordDto.cs @@ -7,22 +7,22 @@ namespace AsbCloudApp.Data.DailyReport.Blocks; /// public class ProcessMapWellDrillingRecordDto { - /// - /// Режим бурения - /// - [Required] - public string DrillingMode { get; set; } = null!; + /// + /// Режим бурения + /// + [Required] + public string DrillingMode { get; set; } = null!; /// /// Мех. скорость /// [Required] public PlanFactDto Rop { get; set; } = new(); - - /// - /// Глубина ствола - /// - public double? WellBoreDepth { get; set; } + + /// + /// Глубина ствола + /// + public double? WellBoreDepth { get; set; } /// /// Часы бурения diff --git a/AsbCloudApp/Data/DailyReport/Blocks/ScheduleRecordDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/ScheduleRecordDto.cs index 91f11af4..72c9045f 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/ScheduleRecordDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/ScheduleRecordDto.cs @@ -5,28 +5,28 @@ namespace AsbCloudApp.Data.DailyReport.Blocks; /// public class ScheduleRecordDto { - /// - /// Начало смены - /// - public TimeDto? ShiftStart { get; set; } + /// + /// Начало смены + /// + public TimeDto? ShiftStart { get; set; } - /// - /// Конец смены - /// - public TimeDto? ShiftEnd { get; set; } + /// + /// Конец смены + /// + public TimeDto? ShiftEnd { get; set; } - /// - /// Имя бурильщика - /// - public string? Name { get; set; } + /// + /// Имя бурильщика + /// + public string? Name { get; set; } - /// - /// Фамилия бурильщика - /// - public string? Surname { get; set; } + /// + /// Фамилия бурильщика + /// + public string? Surname { get; set; } - /// - /// Отчество бурильщика - /// - public string? Patronymic { get; set; } + /// + /// Отчество бурильщика + /// + public string? Patronymic { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/DailyReport/Blocks/Sign/SignBlockDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/Sign/SignBlockDto.cs index d425f360..f35cd0cb 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/Sign/SignBlockDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/Sign/SignBlockDto.cs @@ -5,13 +5,13 @@ namespace AsbCloudApp.Data.DailyReport.Blocks.Sign; /// public class SignBlockDto : ItemInfoDto { - /// - /// Подпись мастера буровой - /// - public SignRecordDto? DrillingMaster { get; set; } + /// + /// Подпись мастера буровой + /// + public SignRecordDto? DrillingMaster { get; set; } - /// - /// Подпись супервайзера - /// - public SignRecordDto? Supervisor { get; set; } + /// + /// Подпись супервайзера + /// + public SignRecordDto? Supervisor { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/DailyReport/Blocks/Sign/SignRecordDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/Sign/SignRecordDto.cs index b071a2fb..01475d70 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/Sign/SignRecordDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/Sign/SignRecordDto.cs @@ -7,11 +7,11 @@ namespace AsbCloudApp.Data.DailyReport.Blocks.Sign; /// public class SignRecordDto { - /// - /// Имя - /// - [Required] - public string Name { get; set; } = null!; + /// + /// Имя + /// + [Required] + public string Name { get; set; } = null!; /// /// Фамилия @@ -19,14 +19,14 @@ public class SignRecordDto [Required] public string Surname { get; set; } = null!; - /// - /// Отчество - /// - public string? Patronymic { get; set; } - - /// - public override string ToString() - { - return $"{Surname} {Name} {Patronymic}"; - } + /// + /// Отчество + /// + public string? Patronymic { get; set; } + + /// + public override string ToString() + { + return $"{Surname} {Name} {Patronymic}"; + } } \ No newline at end of file diff --git a/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemBlockDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemBlockDto.cs index 3e997cb5..5f4113ab 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemBlockDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemBlockDto.cs @@ -9,34 +9,34 @@ namespace AsbCloudApp.Data.DailyReport.Blocks.Subsystems; /// public class SubsystemBlockDto : ItemInfoDto { - /// - /// Длина ствола скважины - /// - public double? Wellbore { get; set; } + /// + /// Длина ствола скважины + /// + public double? Wellbore { get; set; } - /// - /// Кол-во замеров за сутки - /// - public double? MeasurementsPerDay { get; set; } + /// + /// Кол-во замеров за сутки + /// + public double? MeasurementsPerDay { get; set; } - /// - /// Общая плановая мех. скорость - /// - public double? TotalRopPlan { get; set; } - - /// - /// Отклонение по ГГД, сут - /// - public double? TvgLagDays { get; set; } + /// + /// Общая плановая мех. скорость + /// + public double? TotalRopPlan { get; set; } + + /// + /// Отклонение по ГГД, сут + /// + public double? TvgLagDays { get; set; } - /// - /// Рекомендации специалиста - /// - public string? Comment { get; set; } + /// + /// Рекомендации специалиста + /// + public string? Comment { get; set; } - /// - /// Подсистемы - /// - [Required] - public IEnumerable Subsystems { get; set; } = Enumerable.Empty(); + /// + /// Подсистемы + /// + [Required] + public IEnumerable Subsystems { get; set; } = Enumerable.Empty(); } \ No newline at end of file diff --git a/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemParametersDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemParametersDto.cs index e02d8714..2457f102 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemParametersDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemParametersDto.cs @@ -7,19 +7,19 @@ namespace AsbCloudApp.Data.DailyReport.Blocks.Subsystems; /// public class SubsystemParametersDto { - /// - /// Сумма изменения глубин при включенной подсистеме - /// - public double? SumDepthInterval { get; set; } - - /// - /// Наработка подсистемы - /// - public double? UsedTimeHours { get; set; } + /// + /// Сумма изменения глубин при включенной подсистеме + /// + public double? SumDepthInterval { get; set; } + + /// + /// Наработка подсистемы + /// + public double? UsedTimeHours { get; set; } - /// - /// Коэффициент использования - /// - [Range(0, 1)] - public double? KUsage { get; set; } + /// + /// Коэффициент использования + /// + [Range(0, 1)] + public double? KUsage { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemRecordDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemRecordDto.cs index 99811775..aa16880c 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemRecordDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/Subsystems/SubsystemRecordDto.cs @@ -7,19 +7,19 @@ namespace AsbCloudApp.Data.DailyReport.Blocks.Subsystems; /// public class SubsystemRecordDto { - /// - /// Название подсистемы - /// - [Required] - public string Name { get; set; } = null!; - - /// - /// Использование подсистемы за сутки - /// - public SubsystemParametersDto? UsagePerDay { get; set; } - - /// - /// Использование подсистемы за скважину - /// - public SubsystemParametersDto? UsagePerWell { get; set; } + /// + /// Название подсистемы + /// + [Required] + public string Name { get; set; } = null!; + + /// + /// Использование подсистемы за сутки + /// + public SubsystemParametersDto? UsagePerDay { get; set; } + + /// + /// Использование подсистемы за скважину + /// + public SubsystemParametersDto? UsagePerWell { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/DailyReport/Blocks/TimeBalance/TimeBalanceBlockDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/TimeBalance/TimeBalanceBlockDto.cs index f58ed0ac..d1a333e3 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/TimeBalance/TimeBalanceBlockDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/TimeBalance/TimeBalanceBlockDto.cs @@ -9,29 +9,29 @@ namespace AsbCloudApp.Data.DailyReport.Blocks.TimeBalance; /// public class TimeBalanceBlockDto : ItemInfoDto { - /// - /// Идентификатор секции - /// - [Range(1, int.MaxValue)] - public int IdSection { get; set; } - - /// - /// Название секции - /// - public string? SectionName { get; set; } - - /// - /// Проходка скважины - /// - public PlanFactDto WellDepth { get; set; } = new(); + /// + /// Идентификатор секции + /// + [Range(1, int.MaxValue)] + public int IdSection { get; set; } + + /// + /// Название секции + /// + public string? SectionName { get; set; } + + /// + /// Проходка скважины + /// + public PlanFactDto WellDepth { get; set; } = new(); - /// - /// Кол-во наращиваний за сутки - /// - public double? WellOperationSlipsTimeCount { get; set; } + /// + /// Кол-во наращиваний за сутки + /// + public double? WellOperationSlipsTimeCount { get; set; } - /// - /// Операции на скважине - /// - public IEnumerable WellOperations { get; set; } = Enumerable.Empty(); + /// + /// Операции на скважине + /// + public IEnumerable WellOperations { get; set; } = Enumerable.Empty(); } \ No newline at end of file diff --git a/AsbCloudApp/Data/DailyReport/Blocks/TimeBalance/TimeBalanceRecordDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/TimeBalance/TimeBalanceRecordDto.cs index 5bdbec9a..9a7daf03 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/TimeBalance/TimeBalanceRecordDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/TimeBalance/TimeBalanceRecordDto.cs @@ -5,31 +5,31 @@ namespace AsbCloudApp.Data.DailyReport.Blocks.TimeBalance; /// public class TimeBalanceRecordDto { - /// - /// Мех. бурение - 1 - /// Снятие замера, ориентирование - 2 - /// Наращивание, выход на режим - 3 - /// Промывка, проработка - 4 - /// - public int IdWellOperation { get; set; } + /// + /// Мех. бурение - 1 + /// Снятие замера, ориентирование - 2 + /// Наращивание, выход на режим - 3 + /// Промывка, проработка - 4 + /// + public int IdWellOperation { get; set; } - /// - /// Продолжительность операции, ч - /// - public PlanFactDto DurationHours { get; set; } = new(); + /// + /// Продолжительность операции, ч + /// + public PlanFactDto DurationHours { get; set; } = new(); - /// - /// Отклонение за секцию - /// - public double? DrillingDeviationPerSection { get; set; } - - /// - /// Отклонение за сутки - /// - public double? DrillingDeviationPerDay { get; set; } - - /// - /// Причина отклонения - /// - public string? ReasonDeviation { get; set; } + /// + /// Отклонение за секцию + /// + public double? DrillingDeviationPerSection { get; set; } + + /// + /// Отклонение за сутки + /// + public double? DrillingDeviationPerDay { get; set; } + + /// + /// Причина отклонения + /// + public string? ReasonDeviation { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/DailyReport/Blocks/TrajectoryBlockDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/TrajectoryBlockDto.cs index 39e49b54..47255ace 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/TrajectoryBlockDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/TrajectoryBlockDto.cs @@ -5,23 +5,23 @@ namespace AsbCloudApp.Data.DailyReport.Blocks; /// public class TrajectoryBlockDto { - /// - /// Глубина по стволу - /// - public double? WellboreDepth { get; set; } - - /// - /// Глубина вертикальная - /// - public double? VerticalDepth { get; set; } - - /// - /// Угол зенитный - /// - public double? ZenithAngle { get; set; } + /// + /// Глубина по стволу + /// + public double? WellboreDepth { get; set; } + + /// + /// Глубина вертикальная + /// + public double? VerticalDepth { get; set; } + + /// + /// Угол зенитный + /// + public double? ZenithAngle { get; set; } - /// - /// Азимут Географ. - /// - public double? AzimuthGeo { get; set; } + /// + /// Азимут Географ. + /// + public double? AzimuthGeo { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationBlockDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationBlockDto.cs index 1030a826..371a6a9a 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationBlockDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationBlockDto.cs @@ -13,11 +13,11 @@ public class WellOperationBlockDto /// Продолжительность бурения за секцию /// [Required] - public double SectionDrillingHours { get; set; } + public double SectionDrillingHours { get; set; } - /// - /// Операции проводимые на скважине - /// - [Required] - public IEnumerable WellOperations { get; set; } = Enumerable.Empty(); + /// + /// Операции проводимые на скважине + /// + [Required] + public IEnumerable WellOperations { get; set; } = Enumerable.Empty(); } \ No newline at end of file diff --git a/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationRecordDto.cs b/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationRecordDto.cs index 1d627282..a72b3021 100644 --- a/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationRecordDto.cs +++ b/AsbCloudApp/Data/DailyReport/Blocks/WellOperation/WellOperationRecordDto.cs @@ -5,13 +5,13 @@ namespace AsbCloudApp.Data.DailyReport.Blocks.WellOperation; /// public class WellOperationRecordDto { - /// - /// Название категории - /// - public string? CategoryName { get; set; } + /// + /// Название категории + /// + public string? CategoryName { get; set; } - /// - /// Продолжительность операции - /// - public double? DurationHours { get; set; } + /// + /// Продолжительность операции + /// + public double? DurationHours { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/DailyReport/DailyReportDto.cs b/AsbCloudApp/Data/DailyReport/DailyReportDto.cs index c31dd73c..b651b628 100644 --- a/AsbCloudApp/Data/DailyReport/DailyReportDto.cs +++ b/AsbCloudApp/Data/DailyReport/DailyReportDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; @@ -14,15 +14,15 @@ namespace AsbCloudApp.Data.DailyReport; /// Суточный отчёт /// public class DailyReportDto : IId, - IWellRelated + IWellRelated { - /// - [Required] - public int Id { get; set; } + /// + [Required] + public int Id { get; set; } - /// - [Required] - public int IdWell { get; set; } + /// + [Required] + public int IdWell { get; set; } /// /// Название скважины @@ -30,51 +30,51 @@ public class DailyReportDto : IId, [Required] public string WellCaption { get; set; } = null!; - /// - /// Название типа скважины - /// - public string? WellType { get; set; } + /// + /// Название типа скважины + /// + public string? WellType { get; set; } - /// - /// Название куста - /// - public string? Cluster { get; set; } + /// + /// Название куста + /// + public string? Cluster { get; set; } - /// - /// Заказчик - /// - public string? Customer { get; set; } + /// + /// Заказчик + /// + public string? Customer { get; set; } - /// - /// Подрядчик - /// - public string? Contractor { get; set; } + /// + /// Подрядчик + /// + public string? Contractor { get; set; } - /// - /// Месторождение - /// - public string? Deposit { get; set; } + /// + /// Месторождение + /// + public string? Deposit { get; set; } - /// - /// Глубина забоя на дату начала интервала - /// - public double? DepthStart { get; set; } + /// + /// Глубина забоя на дату начала интервала + /// + public double? DepthStart { get; set; } - /// - /// Глубина забоя на дату окончания интервала - /// - public double? DepthEnd { get; set; } + /// + /// Глубина забоя на дату окончания интервала + /// + public double? DepthEnd { get; set; } /// /// Дата формирования отчёта /// [Required] public DateOnly Date { get; set; } - - /// - /// Дата последнего обновления - /// - public DateTimeOffset? DateLastUpdate { get; set; } + + /// + /// Дата последнего обновления + /// + public DateTimeOffset? DateLastUpdate { get; set; } /// /// Блок фактической траектории @@ -88,20 +88,20 @@ public class DailyReportDto : IId, [Required] public WellOperationBlockDto FactWellOperationBlock { get; set; } = null!; - /// - /// Баланс времени - /// - public TimeBalanceBlockDto? TimeBalanceBlock { get; set; } + /// + /// Баланс времени + /// + public TimeBalanceBlockDto? TimeBalanceBlock { get; set; } - /// - /// Наработка подсистем - /// - public SubsystemBlockDto? SubsystemBlock { get; set; } + /// + /// Наработка подсистем + /// + public SubsystemBlockDto? SubsystemBlock { get; set; } - /// - /// Подпись - /// - public SignBlockDto? SignBlock { get; set; } + /// + /// Подпись + /// + public SignBlockDto? SignBlock { get; set; } /// /// Блок расписания diff --git a/AsbCloudApp/Data/DataSaubStatDto.cs b/AsbCloudApp/Data/DataSaubStatDto.cs index 30a09081..b8e27b37 100644 --- a/AsbCloudApp/Data/DataSaubStatDto.cs +++ b/AsbCloudApp/Data/DataSaubStatDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using AsbCloudApp.Data.WellOperation; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/DatesRangeDto.cs b/AsbCloudApp/Data/DatesRangeDto.cs index a61034b6..0b0e5ef9 100644 --- a/AsbCloudApp/Data/DatesRangeDto.cs +++ b/AsbCloudApp/Data/DatesRangeDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/DepositDto.cs b/AsbCloudApp/Data/DepositDto.cs index 6f39cc87..a0011022 100644 --- a/AsbCloudApp/Data/DepositDto.cs +++ b/AsbCloudApp/Data/DepositDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/DetectedOperation/DetectedOperationDrillersStatDto.cs b/AsbCloudApp/Data/DetectedOperation/DetectedOperationDrillersStatDto.cs index c0be17d8..122ad081 100644 --- a/AsbCloudApp/Data/DetectedOperation/DetectedOperationDrillersStatDto.cs +++ b/AsbCloudApp/Data/DetectedOperation/DetectedOperationDrillersStatDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.DetectedOperation { diff --git a/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs b/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs index 13af0e6e..20aa3a3c 100644 --- a/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs +++ b/AsbCloudApp/Data/DetectedOperation/DetectedOperationDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using AsbCloudApp.Data.WellOperation; @@ -10,82 +10,82 @@ namespace AsbCloudApp.Data.DetectedOperation; /// public class DetectedOperationDto : IId { - /// - [Required] - public int Id { get; set; } + /// + [Required] + public int Id { get; set; } - /// - /// Id телеметрии - /// - [Required] - public int IdTelemetry { get; set; } + /// + /// Id телеметрии + /// + [Required] + public int IdTelemetry { get; set; } - /// - /// Id названия/описания операции - /// - [Required] - public int IdCategory { get; set; } + /// + /// Id названия/описания операции + /// + [Required] + public int IdCategory { get; set; } - /// - /// Id пользователя панели на момент начала операции - /// - public int? IdUserAtStart { get; set; } - - /// - /// Id пользователя изменившего операцию - /// - public int? IdEditor { get; set; } + /// + /// Id пользователя панели на момент начала операции + /// + public int? IdUserAtStart { get; set; } + + /// + /// Id пользователя изменившего операцию + /// + public int? IdEditor { get; set; } - /// - /// Дата завершения операции в часовом поясе скважины - /// - [Required] - public DateTimeOffset DateEnd { get; set; } + /// + /// Дата завершения операции в часовом поясе скважины + /// + [Required] + public DateTimeOffset DateEnd { get; set; } - /// - /// Дата начала операции в часовом поясе скважины - /// - [Required] - public DateTimeOffset DateStart { get; set; } + /// + /// Дата начала операции в часовом поясе скважины + /// + [Required] + public DateTimeOffset DateStart { get; set; } - /// - /// глубина на завершения операции, м - /// - [Required] - public double DepthEnd { get; set; } + /// + /// глубина на завершения операции, м + /// + [Required] + public double DepthEnd { get; set; } - /// - /// глубина на начало операции, м - /// - [Required] - public double DepthStart { get; set; } + /// + /// глубина на начало операции, м + /// + [Required] + public double DepthStart { get; set; } - /// - /// Продолжительность операции в минутах - /// - [Required] - public double DurationMinutes => (DateEnd - DateStart).TotalMinutes; - - /// - /// название/описание операции - /// - [Required] - public WellOperationCategoryDto OperationCategory { get; set; } = null!; - - /// - /// Включенные подсистемы - /// - [Required] - public EnabledSubsystems EnabledSubsystems { get; set; } + /// + /// Продолжительность операции в минутах + /// + [Required] + public double DurationMinutes => (DateEnd - DateStart).TotalMinutes; + + /// + /// название/описание операции + /// + [Required] + public WellOperationCategoryDto OperationCategory { get; set; } = null!; + + /// + /// Включенные подсистемы + /// + [Required] + public EnabledSubsystems EnabledSubsystems { get; set; } - /// - /// Значение ключевой параметра операции - /// - [Required] - public double Value { get; set; } + /// + /// Значение ключевой параметра операции + /// + [Required] + public double Value { get; set; } - /// - /// Доп. инфо по операции - /// - public IDictionary ExtraData { get; set; } = new Dictionary(); + /// + /// Доп. инфо по операции + /// + public IDictionary ExtraData { get; set; } = new Dictionary(); } \ No newline at end of file diff --git a/AsbCloudApp/Data/DetectedOperation/DetectedOperationListDto.cs b/AsbCloudApp/Data/DetectedOperation/DetectedOperationListDto.cs index 32dd6040..08c6b108 100644 --- a/AsbCloudApp/Data/DetectedOperation/DetectedOperationListDto.cs +++ b/AsbCloudApp/Data/DetectedOperation/DetectedOperationListDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/DetectedOperation/DetectedOperationStatDto.cs b/AsbCloudApp/Data/DetectedOperation/DetectedOperationStatDto.cs index e922bf6c..b8007c85 100644 --- a/AsbCloudApp/Data/DetectedOperation/DetectedOperationStatDto.cs +++ b/AsbCloudApp/Data/DetectedOperation/DetectedOperationStatDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.DetectedOperation { diff --git a/AsbCloudApp/Data/DetectedOperation/DetectedOperationWithDrillerDto.cs b/AsbCloudApp/Data/DetectedOperation/DetectedOperationWithDrillerDto.cs index 612b079c..af5ff539 100644 --- a/AsbCloudApp/Data/DetectedOperation/DetectedOperationWithDrillerDto.cs +++ b/AsbCloudApp/Data/DetectedOperation/DetectedOperationWithDrillerDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.DetectedOperation +namespace AsbCloudApp.Data.DetectedOperation { /// /// Автоматически определяемая операция diff --git a/AsbCloudApp/Data/DetectedOperation/EnabledSubsystems.cs b/AsbCloudApp/Data/DetectedOperation/EnabledSubsystems.cs index ee3c3459..5f21e8ad 100644 --- a/AsbCloudApp/Data/DetectedOperation/EnabledSubsystems.cs +++ b/AsbCloudApp/Data/DetectedOperation/EnabledSubsystems.cs @@ -5,101 +5,101 @@ namespace AsbCloudApp.Data.DetectedOperation; /// public struct EnabledSubsystems { - private int value; + private int value; - private EnabledSubsystems(int value) - { - this.value = value; - } - - /// - public static implicit operator int(EnabledSubsystems param) => - param.value; + private EnabledSubsystems(int value) + { + this.value = value; + } + + /// + public static implicit operator int(EnabledSubsystems param) => + param.value; - /// - public static implicit operator EnabledSubsystems(int param) => - new(param); + /// + public static implicit operator EnabledSubsystems(int param) => + new(param); - /// - /// Бурение ротором - /// - public bool IsAutoRotor - { - get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoRotor); - set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoRotor); - } + /// + /// Бурение ротором + /// + public bool IsAutoRotor + { + get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoRotor); + set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoRotor); + } - /// - /// Бурение слайдом - /// - public bool IsAutoSlide - { - get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoSlide); - set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoSlide); - } + /// + /// Бурение слайдом + /// + public bool IsAutoSlide + { + get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoSlide); + set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoSlide); + } - /// - /// ПРОРАБОТКА - /// - public bool IsAutoConditionig - { - get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoConditionig); - set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoConditionig); - } + /// + /// ПРОРАБОТКА + /// + public bool IsAutoConditionig + { + get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoConditionig); + set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoConditionig); + } - /// - /// СПУСК СПО - /// - public bool IsAutoSinking - { - get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoSinking); - set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoSinking); - } + /// + /// СПУСК СПО + /// + public bool IsAutoSinking + { + get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoSinking); + set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoSinking); + } - /// - /// ПОДЪЕМ СПО - /// - public bool IsAutoLifting - { - get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoLifting); - set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoLifting); - } + /// + /// ПОДЪЕМ СПО + /// + public bool IsAutoLifting + { + get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoLifting); + set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoLifting); + } - /// - /// ПОДЪЕМ С ПРОРАБОТКОЙ - /// - public bool IsAutoLiftingWithConditionig - { - get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoLiftingWithConditionig); - set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoLiftingWithConditionig); - } + /// + /// ПОДЪЕМ С ПРОРАБОТКОЙ + /// + public bool IsAutoLiftingWithConditionig + { + get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoLiftingWithConditionig); + set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoLiftingWithConditionig); + } - /// - /// Блокировка - /// - public bool IsAutoBlocknig - { - get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoBlocknig); - set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoBlocknig); - } + /// + /// Блокировка + /// + public bool IsAutoBlocknig + { + get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoBlocknig); + set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoBlocknig); + } - /// - /// Осцилляция - /// - public bool IsAutoOscillation - { - get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoOscillation); - set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoOscillation); - } + /// + /// Осцилляция + /// + public bool IsAutoOscillation + { + get => IsEnabledSubsystem(EnabledSubsystemsFlags.AutoOscillation); + set => UpdateEnabledSubsystems(value, EnabledSubsystemsFlags.AutoOscillation); + } - private bool IsEnabledSubsystem(EnabledSubsystemsFlags flag) => - (value & (int)flag) > 0; + private bool IsEnabledSubsystem(EnabledSubsystemsFlags flag) => + (value & (int)flag) > 0; - private void UpdateEnabledSubsystems(bool isEnable, EnabledSubsystemsFlags flag) - { - if (isEnable) - value |= (int)flag; - else - value &= ~(int)flag; - } + private void UpdateEnabledSubsystems(bool isEnable, EnabledSubsystemsFlags flag) + { + if (isEnable) + value |= (int)flag; + else + value &= ~(int)flag; + } } \ No newline at end of file diff --git a/AsbCloudApp/Data/DetectedOperation/EnabledSubsystemsFlags.cs b/AsbCloudApp/Data/DetectedOperation/EnabledSubsystemsFlags.cs index 7011a272..a84dfac8 100644 --- a/AsbCloudApp/Data/DetectedOperation/EnabledSubsystemsFlags.cs +++ b/AsbCloudApp/Data/DetectedOperation/EnabledSubsystemsFlags.cs @@ -8,43 +8,43 @@ namespace AsbCloudApp.Data.DetectedOperation; [Flags] public enum EnabledSubsystemsFlags { - /// - /// Автоподача долота - /// - AutoRotor = 1 << 0, + /// + /// Автоподача долота + /// + AutoRotor = 1 << 0, - /// - /// БУРЕНИЕ В СЛАЙДЕ - /// - AutoSlide = 1 << 1, + /// + /// БУРЕНИЕ В СЛАЙДЕ + /// + AutoSlide = 1 << 1, - /// - /// ПРОРАБОТКА - /// - AutoConditionig = 1 << 2, + /// + /// ПРОРАБОТКА + /// + AutoConditionig = 1 << 2, - /// - /// СПУСК СПО - /// - AutoSinking = 1 << 3, + /// + /// СПУСК СПО + /// + AutoSinking = 1 << 3, - /// - /// ПОДЪЕМ СПО - /// - AutoLifting = 1 << 4, + /// + /// ПОДЪЕМ СПО + /// + AutoLifting = 1 << 4, - /// - /// ПОДЪЕМ С ПРОРАБОТКОЙ - /// - AutoLiftingWithConditionig = 1 << 5, + /// + /// ПОДЪЕМ С ПРОРАБОТКОЙ + /// + AutoLiftingWithConditionig = 1 << 5, - /// - /// блокировка - /// - AutoBlocknig = 1 << 6, + /// + /// блокировка + /// + AutoBlocknig = 1 << 6, - /// - /// осцилляция - /// - AutoOscillation = 1 << 7, + /// + /// осцилляция + /// + AutoOscillation = 1 << 7, } \ No newline at end of file diff --git a/AsbCloudApp/Data/DrillParamsDto.cs b/AsbCloudApp/Data/DrillParamsDto.cs index b8111410..788d5207 100644 --- a/AsbCloudApp/Data/DrillParamsDto.cs +++ b/AsbCloudApp/Data/DrillParamsDto.cs @@ -4,7 +4,7 @@ namespace AsbCloudApp.Data { /// - /// DTO + /// DTO параметров бурения /// public class DrillParamsDto : IId, IWellRelated { @@ -15,7 +15,7 @@ namespace AsbCloudApp.Data public int IdWell { get; set; } /// - /// + /// Глубина интервала /// public MinMaxDto Depth { get; set; } = null!; diff --git a/AsbCloudApp/Data/DrillTestReport/DrillTestReportDataDto.cs b/AsbCloudApp/Data/DrillTestReport/DrillTestReportDataDto.cs index b45783e6..1e7a529e 100644 --- a/AsbCloudApp/Data/DrillTestReport/DrillTestReportDataDto.cs +++ b/AsbCloudApp/Data/DrillTestReport/DrillTestReportDataDto.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using System; namespace AsbCloudApp.Data.DrillTestReport diff --git a/AsbCloudApp/Data/DrillTestReport/DrillTestReportInfoDto.cs b/AsbCloudApp/Data/DrillTestReport/DrillTestReportInfoDto.cs index a178e6fe..38730eef 100644 --- a/AsbCloudApp/Data/DrillTestReport/DrillTestReportInfoDto.cs +++ b/AsbCloudApp/Data/DrillTestReport/DrillTestReportInfoDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.DrillTestReport diff --git a/AsbCloudApp/Data/DrillerDetectedOperationStatDto.cs b/AsbCloudApp/Data/DrillerDetectedOperationStatDto.cs index 96a5a232..f6e76353 100644 --- a/AsbCloudApp/Data/DrillerDetectedOperationStatDto.cs +++ b/AsbCloudApp/Data/DrillerDetectedOperationStatDto.cs @@ -4,22 +4,22 @@ using AsbCloudApp.Data.Subsystems; namespace AsbCloudApp.Data; /// -/// +/// статистика наработки по бурильщикам /// public class DrillerDetectedOperationStatDto { /// - /// + /// Статистики подсистем /// public IEnumerable Statistic { get; set; } = null!; /// - /// + /// Расписание бурильщика /// public ScheduleDto Schedule { get; set; } = null!; /// - /// + /// Скважина /// public WellDto Well { get; set; } = null!; } \ No newline at end of file diff --git a/AsbCloudApp/Data/DrillerDto.cs b/AsbCloudApp/Data/DrillerDto.cs index f2c8b6b0..e920f111 100644 --- a/AsbCloudApp/Data/DrillerDto.cs +++ b/AsbCloudApp/Data/DrillerDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/DrillingProgramPartDto.cs b/AsbCloudApp/Data/DrillingProgramPartDto.cs index d4cc66fb..0e9917ba 100644 --- a/AsbCloudApp/Data/DrillingProgramPartDto.cs +++ b/AsbCloudApp/Data/DrillingProgramPartDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using AsbCloudApp.Data.User; diff --git a/AsbCloudApp/Data/DrillingProgramStateDto.cs b/AsbCloudApp/Data/DrillingProgramStateDto.cs index b2abcef0..4368f4a3 100644 --- a/AsbCloudApp/Data/DrillingProgramStateDto.cs +++ b/AsbCloudApp/Data/DrillingProgramStateDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/FaqDto.cs b/AsbCloudApp/Data/FaqDto.cs index e69c0579..28cc829b 100644 --- a/AsbCloudApp/Data/FaqDto.cs +++ b/AsbCloudApp/Data/FaqDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/FileCategoryDto.cs b/AsbCloudApp/Data/FileCategoryDto.cs index 0b837a7a..f55fdb30 100644 --- a/AsbCloudApp/Data/FileCategoryDto.cs +++ b/AsbCloudApp/Data/FileCategoryDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/FileInfoDto.cs b/AsbCloudApp/Data/FileInfoDto.cs index ab44b317..2e673ed0 100644 --- a/AsbCloudApp/Data/FileInfoDto.cs +++ b/AsbCloudApp/Data/FileInfoDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/FileMarkDto.cs b/AsbCloudApp/Data/FileMarkDto.cs index 305fad5c..ad48f018 100644 --- a/AsbCloudApp/Data/FileMarkDto.cs +++ b/AsbCloudApp/Data/FileMarkDto.cs @@ -5,7 +5,7 @@ using AsbCloudApp.Data.User; namespace AsbCloudApp.Data { /// - /// + /// Отметка для файла /// public class FileMarkDto: IId { @@ -14,42 +14,42 @@ namespace AsbCloudApp.Data public int Id { get; set; } /// - /// id + /// id файла /// [Required] - [Range(1, int.MaxValue, ErrorMessage = "Id 1")] + [Range(1, int.MaxValue, ErrorMessage = "Id файла не может быть меньше 1")] public int IdFile { get; set; } /// - /// 0 - - /// 1 - + /// 0 - отклонен + /// 1 - согласован /// [Required] - [Range(0, int.MaxValue, ErrorMessage = "Id 1")] + [Range(0, int.MaxValue, ErrorMessage = "Id категории действия с файлом не может быть меньше 1")] public int IdMarkType { get; set; } /// - /// / . - /// . + /// дата/время добавления. + /// Необязательно указывать в запросе на создание. /// [Required] public DateTimeOffset DateCreated { get; set; } /// - /// + /// Полезный комментарий /// - [StringLength(4096, MinimumLength = 1, ErrorMessage = " 1 4096 ")] + [StringLength(4096, MinimumLength = 1, ErrorMessage = "Допустимое имя компании от 1 до 4096 символов")] public string? Comment { get; set; } /// - /// + /// признак удаления отметки /// [Required] public bool IsDeleted { get; set; } /// - /// . - /// . + /// Пользователь создающий отметку. + /// Необязательно указывать в запросе на создание. /// public UserDto? User { get; set; } } diff --git a/AsbCloudApp/Data/GTR/GtrWitsDto.cs b/AsbCloudApp/Data/GTR/GtrWitsDto.cs index 20d08dd6..bb4a4785 100644 --- a/AsbCloudApp/Data/GTR/GtrWitsDto.cs +++ b/AsbCloudApp/Data/GTR/GtrWitsDto.cs @@ -7,228 +7,228 @@ namespace AsbCloudApp.Data.GTR; /// public class GtrWitsDto { - /// - /// Дата получения записи - /// - public DateTimeOffset DateTime { get; set; } - - /// - /// Забой (скважины), м - /// - public float? DEPTMEAS { get; set; } - - /// - /// Долото, м - /// - public float DEPTBITM { get; set; } - - /// - /// Вес на крюке - /// - public float? HKLA { get; set; } + /// + /// Дата получения записи + /// + public DateTimeOffset DateTime { get; set; } + + /// + /// Забой (скважины), м + /// + public float? DEPTMEAS { get; set; } + + /// + /// Долото, м + /// + public float DEPTBITM { get; set; } + + /// + /// Вес на крюке + /// + public float? HKLA { get; set; } - /// - /// Высота крюка - /// - public float? BLKPOS { get; set; } + /// + /// Высота крюка + /// + public float? BLKPOS { get; set; } - /// - /// Нагрузка на долото - /// - public float? WOBA { get; set; } + /// + /// Нагрузка на долото + /// + public float? WOBA { get; set; } - /// - /// Момент на роторе/ВСП - /// - public float? TORQA { get; set; } + /// + /// Момент на роторе/ВСП + /// + public float? TORQA { get; set; } - /// - /// Давление на входе (на стояке) - /// - public float? SPPA { get; set; } + /// + /// Давление на входе (на стояке) + /// + public float? SPPA { get; set; } - /// - /// Обороты ротора/ВСП - /// - public float? RPMA { get; set; } + /// + /// Обороты ротора/ВСП + /// + public float? RPMA { get; set; } - /// - /// Механическая скорость - /// - public float? ROPA { get; set; } + /// + /// Механическая скорость + /// + public float? ROPA { get; set; } - /// - /// Скорость инструмента вверх - /// - public float? RSUX { get; set; } + /// + /// Скорость инструмента вверх + /// + public float? RSUX { get; set; } - /// - /// Скорость инструмента вниз - /// - public float? RSDX { get; set; } + /// + /// Скорость инструмента вниз + /// + public float? RSDX { get; set; } - /// - /// Расход на входе - /// - public float? MFIA { get; set; } + /// + /// Расход на входе + /// + public float? MFIA { get; set; } - /// - /// Расход на выходе - /// - public float? MFOA { get; set; } + /// + /// Расход на выходе + /// + public float? MFOA { get; set; } - /// - /// Температура на входе - /// - public float? MTIA { get; set; } + /// + /// Температура на входе + /// + public float? MTIA { get; set; } - /// - /// Температура на выходе - /// - public float? MTOA { get; set; } + /// + /// Температура на выходе + /// + public float? MTOA { get; set; } - /// - /// Ходы насоса №1 - /// - public float? SPM1 { get; set; } + /// + /// Ходы насоса №1 + /// + public float? SPM1 { get; set; } - /// - /// Ходы насоса №2 - /// - public float? SPM2 { get; set; } + /// + /// Ходы насоса №2 + /// + public float? SPM2 { get; set; } - /// - /// Ходы насоса №3 - /// - public float? SPM3 { get; set; } + /// + /// Ходы насоса №3 + /// + public float? SPM3 { get; set; } - /// - /// Общий объем бурового раствора на поверхности - /// - public float? TVOLACT { get; set; } + /// + /// Общий объем бурового раствора на поверхности + /// + public float? TVOLACT { get; set; } - /// - /// Объем бурового раствора в доливной емкости №1 - /// - public float? TTVOL1 { get; set; } + /// + /// Объем бурового раствора в доливной емкости №1 + /// + public float? TTVOL1 { get; set; } - /// - /// Объем бурового раствора в доливной емкости №2 - /// - public float? TTVOL2 { get; set; } + /// + /// Объем бурового раствора в доливной емкости №2 + /// + public float? TTVOL2 { get; set; } - /// - /// Объем бурового раствора в емкости №1 - /// - public float? TVOL01 { get; set; } + /// + /// Объем бурового раствора в емкости №1 + /// + public float? TVOL01 { get; set; } - /// - /// Объем бурового раствора в емкости №2 - /// - public float? TVOL02 { get; set; } + /// + /// Объем бурового раствора в емкости №2 + /// + public float? TVOL02 { get; set; } - /// - /// Объем бурового раствора в емкости №3 - /// - public float? TVOL03 { get; set; } + /// + /// Объем бурового раствора в емкости №3 + /// + public float? TVOL03 { get; set; } - /// - /// Объем бурового раствора в емкости №4 - /// - public float? TVOL04 { get; set; } + /// + /// Объем бурового раствора в емкости №4 + /// + public float? TVOL04 { get; set; } - /// - /// Объем бурового раствора в емкости №5 - /// - public float? TVOL05 { get; set; } + /// + /// Объем бурового раствора в емкости №5 + /// + public float? TVOL05 { get; set; } - /// - /// Объем бурового раствора в емкости №6 - /// - public float? TVOL06 { get; set; } + /// + /// Объем бурового раствора в емкости №6 + /// + public float? TVOL06 { get; set; } - /// - /// Объем бурового раствора в емкости №7 - /// - public float? TVOL07 { get; set; } + /// + /// Объем бурового раствора в емкости №7 + /// + public float? TVOL07 { get; set; } - /// - /// Объем бурового раствора в емкости №8 - /// - public float? TVOL08 { get; set; } + /// + /// Объем бурового раствора в емкости №8 + /// + public float? TVOL08 { get; set; } - /// - /// Объем бурового раствора в емкости №9 - /// - public float? TVOL09 { get; set; } + /// + /// Объем бурового раствора в емкости №9 + /// + public float? TVOL09 { get; set; } - /// - /// Объем бурового раствора в емкости №10 - /// - public float? TVOL10 { get; set; } + /// + /// Объем бурового раствора в емкости №10 + /// + public float? TVOL10 { get; set; } - /// - /// Объем бурового раствора в емкости №11 - /// - public float? TVOL11 { get; set; } + /// + /// Объем бурового раствора в емкости №11 + /// + public float? TVOL11 { get; set; } - /// - /// Объем бурового раствора в емкости №12 - /// - public float? TVOL12 { get; set; } + /// + /// Объем бурового раствора в емкости №12 + /// + public float? TVOL12 { get; set; } - /// - /// Объем бурового раствора в емкости №13 - /// - public float? TVOL13 { get; set; } + /// + /// Объем бурового раствора в емкости №13 + /// + public float? TVOL13 { get; set; } - /// - /// Объем бурового раствора в емкости №14 - /// - public float? TVOL14 { get; set; } + /// + /// Объем бурового раствора в емкости №14 + /// + public float? TVOL14 { get; set; } - /// - /// Плотность (удельный вес) бурового раствора на выходе - /// - public float? MDOA { get; set; } + /// + /// Плотность (удельный вес) бурового раствора на выходе + /// + public float? MDOA { get; set; } - /// - /// Плотность (удельный вес) бурового раствора на входе - /// - public float? MDIA { get; set; } + /// + /// Плотность (удельный вес) бурового раствора на входе + /// + public float? MDIA { get; set; } - /// - /// Процентное содержание метана - /// - public float? METHANE { get; set; } + /// + /// Процентное содержание метана + /// + public float? METHANE { get; set; } - /// - /// Процентное содержание этана - /// - public float? ETHANE { get; set; } + /// + /// Процентное содержание этана + /// + public float? ETHANE { get; set; } - /// - /// Процентное содержание пропана - /// - public float? PROPANE { get; set; } + /// + /// Процентное содержание пропана + /// + public float? PROPANE { get; set; } - /// - /// Процентное содержание бутана - /// - public float? IBUTANE { get; set; } + /// + /// Процентное содержание бутана + /// + public float? IBUTANE { get; set; } - /// - /// Процентное содержание пентана - /// - public float? NBUTANE { get; set; } + /// + /// Процентное содержание пентана + /// + public float? NBUTANE { get; set; } - /// - /// Процентное содержание углеводородов - /// - public float? HydrocarbonPercentage => METHANE + ETHANE + PROPANE + IBUTANE + NBUTANE; - - /// - /// Процентное содержание газов - /// - public float? GASA { get; set; } + /// + /// Процентное содержание углеводородов + /// + public float? HydrocarbonPercentage => METHANE + ETHANE + PROPANE + IBUTANE + NBUTANE; + + /// + /// Процентное содержание газов + /// + public float? GASA { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/GTR/JsonValue.cs b/AsbCloudApp/Data/GTR/JsonValue.cs index cd37abea..15df0604 100644 --- a/AsbCloudApp/Data/GTR/JsonValue.cs +++ b/AsbCloudApp/Data/GTR/JsonValue.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.GTR +namespace AsbCloudApp.Data.GTR { /// /// Класс позволяющий хранить значение неопределенного типа. diff --git a/AsbCloudApp/Data/GTR/WitsItemRecordDto.cs b/AsbCloudApp/Data/GTR/WitsItemRecordDto.cs index 0137754e..f6dfde81 100644 --- a/AsbCloudApp/Data/GTR/WitsItemRecordDto.cs +++ b/AsbCloudApp/Data/GTR/WitsItemRecordDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.GTR diff --git a/AsbCloudApp/Data/GTR/WitsRecordDto.cs b/AsbCloudApp/Data/GTR/WitsRecordDto.cs index 4e5da733..e5469b9a 100644 --- a/AsbCloudApp/Data/GTR/WitsRecordDto.cs +++ b/AsbCloudApp/Data/GTR/WitsRecordDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudApp/Data/HelpPageDto.cs b/AsbCloudApp/Data/HelpPageDto.cs index 9044397f..124b6954 100644 --- a/AsbCloudApp/Data/HelpPageDto.cs +++ b/AsbCloudApp/Data/HelpPageDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data; diff --git a/AsbCloudApp/Data/IId.cs b/AsbCloudApp/Data/IId.cs index e5ad455e..4449fa23 100644 --- a/AsbCloudApp/Data/IId.cs +++ b/AsbCloudApp/Data/IId.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data +namespace AsbCloudApp.Data { /// /// Интерфейс данных с Id diff --git a/AsbCloudApp/Data/IMapPoint.cs b/AsbCloudApp/Data/IMapPoint.cs index f71bd7fa..1c373685 100644 --- a/AsbCloudApp/Data/IMapPoint.cs +++ b/AsbCloudApp/Data/IMapPoint.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data +namespace AsbCloudApp.Data { /// /// точка на карте diff --git a/AsbCloudApp/Data/ITelemetryData.cs b/AsbCloudApp/Data/ITelemetryData.cs index 3769eeac..a2dc4924 100644 --- a/AsbCloudApp/Data/ITelemetryData.cs +++ b/AsbCloudApp/Data/ITelemetryData.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/IWellRelated.cs b/AsbCloudApp/Data/IWellRelated.cs index f79a03a9..55877a9e 100644 --- a/AsbCloudApp/Data/IWellRelated.cs +++ b/AsbCloudApp/Data/IWellRelated.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data +namespace AsbCloudApp.Data { /// /// Well related DTO diff --git a/AsbCloudApp/Data/ItemInfoDto.cs b/AsbCloudApp/Data/ItemInfoDto.cs index 95a07e8d..0022b1c1 100644 --- a/AsbCloudApp/Data/ItemInfoDto.cs +++ b/AsbCloudApp/Data/ItemInfoDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/JobDto.cs b/AsbCloudApp/Data/JobDto.cs index b55a9467..0dfb82e3 100644 --- a/AsbCloudApp/Data/JobDto.cs +++ b/AsbCloudApp/Data/JobDto.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/LimitingParameterDataDto.cs b/AsbCloudApp/Data/LimitingParameterDataDto.cs index c5692729..11ecde24 100644 --- a/AsbCloudApp/Data/LimitingParameterDataDto.cs +++ b/AsbCloudApp/Data/LimitingParameterDataDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/LimitingParameterDto.cs b/AsbCloudApp/Data/LimitingParameterDto.cs index 19b182a5..13a23b80 100644 --- a/AsbCloudApp/Data/LimitingParameterDto.cs +++ b/AsbCloudApp/Data/LimitingParameterDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/Manuals/ManualDirectoryDto.cs b/AsbCloudApp/Data/Manuals/ManualDirectoryDto.cs index e0513cf9..15b791da 100644 --- a/AsbCloudApp/Data/Manuals/ManualDirectoryDto.cs +++ b/AsbCloudApp/Data/Manuals/ManualDirectoryDto.cs @@ -8,26 +8,26 @@ namespace AsbCloudApp.Data.Manuals; /// public class ManualDirectoryDto : IId { - /// - public int Id { get; set; } + /// + public int Id { get; set; } - /// - /// Название - /// - public string Name { get; set; } = null!; - - /// - /// Id родительской директории - /// - public int? IdParent { get; set; } + /// + /// Название + /// + public string Name { get; set; } = null!; + + /// + /// Id родительской директории + /// + public int? IdParent { get; set; } - /// - /// Вложенные директории - /// - public IEnumerable Children { get; set; } = Enumerable.Empty(); + /// + /// Вложенные директории + /// + public IEnumerable Children { get; set; } = Enumerable.Empty(); - /// - /// Хранимые инструкции - /// - public IEnumerable Manuals { get; set; } = Enumerable.Empty(); + /// + /// Хранимые инструкции + /// + public IEnumerable Manuals { get; set; } = Enumerable.Empty(); } \ No newline at end of file diff --git a/AsbCloudApp/Data/Manuals/ManualDto.cs b/AsbCloudApp/Data/Manuals/ManualDto.cs index c5aa92c4..01756714 100644 --- a/AsbCloudApp/Data/Manuals/ManualDto.cs +++ b/AsbCloudApp/Data/Manuals/ManualDto.cs @@ -7,31 +7,31 @@ namespace AsbCloudApp.Data.Manuals; /// public class ManualDto : IId { - /// - public int Id { get; set; } + /// + public int Id { get; set; } - /// - /// Название - /// - public string Name { get; set; } = null!; - - /// - /// Дата загрузки - /// - public DateTimeOffset DateDownload { get; set; } - - /// - /// Id автора - /// - public int IdAuthor { get; set; } - - /// - /// Id директории - /// - public int IdDirectory { get; set; } - - /// - /// Id категории файла - /// - public int IdCategory { get; set; } + /// + /// Название + /// + public string Name { get; set; } = null!; + + /// + /// Дата загрузки + /// + public DateTimeOffset DateDownload { get; set; } + + /// + /// Id автора + /// + public int IdAuthor { get; set; } + + /// + /// Id директории + /// + public int IdDirectory { get; set; } + + /// + /// Id категории файла + /// + public int IdCategory { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/MapPointBaseDto.cs b/AsbCloudApp/Data/MapPointBaseDto.cs index b0567dba..61713a8f 100644 --- a/AsbCloudApp/Data/MapPointBaseDto.cs +++ b/AsbCloudApp/Data/MapPointBaseDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/MeasureDto.cs b/AsbCloudApp/Data/MeasureDto.cs index 4eddd78f..17ba3968 100644 --- a/AsbCloudApp/Data/MeasureDto.cs +++ b/AsbCloudApp/Data/MeasureDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudApp/Data/MessageDto.cs b/AsbCloudApp/Data/MessageDto.cs index 7234db7a..5272e237 100644 --- a/AsbCloudApp/Data/MessageDto.cs +++ b/AsbCloudApp/Data/MessageDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/MinMaxDto.cs b/AsbCloudApp/Data/MinMaxDto.cs index ac2a2aa1..d7d8703a 100644 --- a/AsbCloudApp/Data/MinMaxDto.cs +++ b/AsbCloudApp/Data/MinMaxDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data +namespace AsbCloudApp.Data { /// /// Минимальное и максимальное значение diff --git a/AsbCloudApp/Data/MinMaxExtendedViewDto.cs b/AsbCloudApp/Data/MinMaxExtendedViewDto.cs index 9b1b07b5..6e1aab48 100644 --- a/AsbCloudApp/Data/MinMaxExtendedViewDto.cs +++ b/AsbCloudApp/Data/MinMaxExtendedViewDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data +namespace AsbCloudApp.Data { /// /// Расширение для класса MinMaxDto diff --git a/AsbCloudApp/Data/NotificationCategoryDto.cs b/AsbCloudApp/Data/NotificationCategoryDto.cs index 274366e4..f7e077dd 100644 --- a/AsbCloudApp/Data/NotificationCategoryDto.cs +++ b/AsbCloudApp/Data/NotificationCategoryDto.cs @@ -7,11 +7,11 @@ namespace AsbCloudApp.Data; /// public class NotificationCategoryDto : IId { - /// - /// Id категории - /// - [Required] - public int Id { get; set; } + /// + /// Id категории + /// + [Required] + public int Id { get; set; } /// /// Название категории diff --git a/AsbCloudApp/Data/NotificationDto.cs b/AsbCloudApp/Data/NotificationDto.cs index 0fd8b673..34f46fa2 100644 --- a/AsbCloudApp/Data/NotificationDto.cs +++ b/AsbCloudApp/Data/NotificationDto.cs @@ -8,11 +8,11 @@ namespace AsbCloudApp.Data; /// public class NotificationDto : IId { - /// - /// Id уведомления - /// - [Required] - public int Id { get; set; } + /// + /// Id уведомления + /// + [Required] + public int Id { get; set; } /// /// Id получателя уведомления @@ -26,11 +26,11 @@ public class NotificationDto : IId [Required] public int IdNotificationCategory { get; set; } - /// - /// Заголовок уведомления - /// - [Required, StringLength(300, MinimumLength = 1, ErrorMessage = "Заголовок должен мыть не меньше 1-го знака и не больше 300")] - public string Title { get; set; } = null!; + /// + /// Заголовок уведомления + /// + [Required, StringLength(300, MinimumLength = 1, ErrorMessage = "Заголовок должен мыть не меньше 1-го знака и не больше 300")] + public string Title { get; set; } = null!; /// /// Сообщение уведомления @@ -44,15 +44,15 @@ public class NotificationDto : IId [Required] public DateTimeOffset RegistrationDate { get; set; } - /// - /// Дата отправки уведомления - /// - public DateTimeOffset? SentDate { get; set; } + /// + /// Дата отправки уведомления + /// + public DateTimeOffset? SentDate { get; set; } - /// - /// Дата прочтения уведомления - /// - public DateTimeOffset? ReadDate { get; set; } + /// + /// Дата прочтения уведомления + /// + public DateTimeOffset? ReadDate { get; set; } /// /// Состояние уведомления @@ -62,36 +62,36 @@ public class NotificationDto : IId /// [Required] public int IdState - { - get - { - if (SentDate is not null && ReadDate is not null) - return 2; + { + get + { + if (SentDate is not null && ReadDate is not null) + return 2; - if (SentDate is not null) - return 1; + if (SentDate is not null) + return 1; - return 0; - } - set - { - switch (value) - { - case 0: - SentDate = null; - ReadDate = null; - break; - case 1: - SentDate = DateTimeOffset.UtcNow; - ReadDate = null; - break; - case 2: - SentDate = DateTimeOffset.UtcNow; - ReadDate = DateTimeOffset.UtcNow; - break; - } - } - } + return 0; + } + set + { + switch (value) + { + case 0: + SentDate = null; + ReadDate = null; + break; + case 1: + SentDate = DateTimeOffset.UtcNow; + ReadDate = null; + break; + case 2: + SentDate = DateTimeOffset.UtcNow; + ReadDate = DateTimeOffset.UtcNow; + break; + } + } + } /// /// Id типа доставки уведомления @@ -100,7 +100,7 @@ public class NotificationDto : IId /// [Required] [Range(0,1)] - public int IdTransportType { get; set; } + public int IdTransportType { get; set; } /// /// DTO категории уведомления diff --git a/AsbCloudApp/Data/OperationValueDto.cs b/AsbCloudApp/Data/OperationValueDto.cs index f7d9edcf..587b8e1c 100644 --- a/AsbCloudApp/Data/OperationValueDto.cs +++ b/AsbCloudApp/Data/OperationValueDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/PaginationContainer.cs b/AsbCloudApp/Data/PaginationContainer.cs index 61840893..30d3bdec 100644 --- a/AsbCloudApp/Data/PaginationContainer.cs +++ b/AsbCloudApp/Data/PaginationContainer.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/ParserResultDto.cs b/AsbCloudApp/Data/ParserResultDto.cs index ffb24d50..1203df4e 100644 --- a/AsbCloudApp/Data/ParserResultDto.cs +++ b/AsbCloudApp/Data/ParserResultDto.cs @@ -8,10 +8,10 @@ namespace AsbCloudApp.Data; /// /// public class ParserResultDto : ValidationResultDto>> - where TDto : class, IId + where TDto : class, IId { - /// - /// Объекты полученные из файла - /// - public override IEnumerable> Item { get; set; } = Enumerable.Empty>(); + /// + /// Объекты полученные из файла + /// + public override IEnumerable> Item { get; set; } = Enumerable.Empty>(); } \ No newline at end of file diff --git a/AsbCloudApp/Data/PermissionDto.cs b/AsbCloudApp/Data/PermissionDto.cs index 62aad5c4..8436ae73 100644 --- a/AsbCloudApp/Data/PermissionDto.cs +++ b/AsbCloudApp/Data/PermissionDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/PlanFactDto.cs b/AsbCloudApp/Data/PlanFactDto.cs index 669121d6..8d20c382 100644 --- a/AsbCloudApp/Data/PlanFactDto.cs +++ b/AsbCloudApp/Data/PlanFactDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data +namespace AsbCloudApp.Data { /// /// DTO объединяющее плановые и фактические значения diff --git a/AsbCloudApp/Data/PlanFactPredictBase.cs b/AsbCloudApp/Data/PlanFactPredictBase.cs index 636e0620..ffbd5e61 100644 --- a/AsbCloudApp/Data/PlanFactPredictBase.cs +++ b/AsbCloudApp/Data/PlanFactPredictBase.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data +namespace AsbCloudApp.Data { /// /// Lines container for Time Vs Depth chart diff --git a/AsbCloudApp/Data/PlanLimitDto.cs b/AsbCloudApp/Data/PlanLimitDto.cs index e0559de8..76e9173b 100644 --- a/AsbCloudApp/Data/PlanLimitDto.cs +++ b/AsbCloudApp/Data/PlanLimitDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanAntiCrashRotationDto.cs b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanAntiCrashRotationDto.cs index 32c6e9a6..43e41acb 100644 --- a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanAntiCrashRotationDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanAntiCrashRotationDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Functions; diff --git a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanAutoHoldTFDto.cs b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanAutoHoldTFDto.cs index 37da8dd5..e3c0035a 100644 --- a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanAutoHoldTFDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanAutoHoldTFDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Functions; diff --git a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanDamperDto.cs b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanDamperDto.cs index 2f271f02..b1a9a07b 100644 --- a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanDamperDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanDamperDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Functions; diff --git a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanDrillTestDto.cs b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanDrillTestDto.cs index af7139a5..3ccc008a 100644 --- a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanDrillTestDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanDrillTestDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Functions; diff --git a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanOscillationDto.cs b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanOscillationDto.cs index b444d59a..11b4a0b5 100644 --- a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanOscillationDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanOscillationDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Functions; diff --git a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanShockTestDto.cs b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanShockTestDto.cs index f00b339c..bdc4173b 100644 --- a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanShockTestDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanShockTestDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Functions; diff --git a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanStaticMeasurementOutputDto.cs b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanStaticMeasurementOutputDto.cs index 9965e632..11ca16a2 100644 --- a/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanStaticMeasurementOutputDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Functions/ProcessMapPlanStaticMeasurementOutputDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Functions; diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanLoadCapacityDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanLoadCapacityDto.cs index 52972803..e1e9f69a 100644 --- a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanLoadCapacityDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanLoadCapacityDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Operations; diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanOscillationAnglesDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanOscillationAnglesDto.cs index 3da9631e..49e0769d 100644 --- a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanOscillationAnglesDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanOscillationAnglesDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Operations; diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanPositioningOffTheBottomDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanPositioningOffTheBottomDto.cs index e1e58d66..f7df77c2 100644 --- a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanPositioningOffTheBottomDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanPositioningOffTheBottomDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudApp.Data.ProcessMaps.Operations; diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanReamingRotorDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanReamingRotorDto.cs index 84bbfc36..6a5864d3 100644 --- a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanReamingRotorDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanReamingRotorDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Operations; diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanReamingSlideDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanReamingSlideDto.cs index f2ef28fd..229d821d 100644 --- a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanReamingSlideDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanReamingSlideDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Operations; diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanRecordingStaticMeasurementDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanRecordingStaticMeasurementDto.cs index 28ba53bd..7be6ef31 100644 --- a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanRecordingStaticMeasurementDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanRecordingStaticMeasurementDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Operations; diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanRotorDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanRotorDto.cs index 938732c2..9835772a 100644 --- a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanRotorDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanRotorDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Operations; diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSlideDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSlideDto.cs index 2ad24fdf..8d566c0f 100644 --- a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSlideDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSlideDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Operations; diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSwitchingOffThePumpDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSwitchingOffThePumpDto.cs index befdce47..26cf2eeb 100644 --- a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSwitchingOffThePumpDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSwitchingOffThePumpDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Operations; diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSwitchingToTheModeDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSwitchingToTheModeDto.cs index 1142cb59..db7d162d 100644 --- a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSwitchingToTheModeDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanSwitchingToTheModeDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudApp.Data.ProcessMaps.Operations; diff --git a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanTFOrientationDto.cs b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanTFOrientationDto.cs index cc3652a3..a3d7eabb 100644 --- a/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanTFOrientationDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Operations/ProcessMapPlanTFOrientationDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.ProcessMaps.Operations; diff --git a/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanBaseDto.cs b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanBaseDto.cs index 13eb6583..482b0f50 100644 --- a/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanBaseDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/ProcessMapPlanBaseDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportDataSaubStatDto.cs b/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportDataSaubStatDto.cs index 4bf221de..28366a6c 100644 --- a/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportDataSaubStatDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportDataSaubStatDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data.ProcessMaps.Report; @@ -12,69 +12,69 @@ public class ProcessMapReportDataSaubStatDto /// public double DrilledTime { get; set; } = 0; - /// - /// Id секции скважины - /// - public int IdWellSectionType { get; set; } + /// + /// Id секции скважины + /// + public int IdWellSectionType { get; set; } - /// - /// Название секции скважины - /// - public string WellSectionTypeName { get; set; } = null!; + /// + /// Название секции скважины + /// + public string WellSectionTypeName { get; set; } = null!; - /// - /// Глубина по стволу от, м - /// - /// на начало интервала - /// - /// - public double DepthStart { get; set; } + /// + /// Глубина по стволу от, м + /// + /// на начало интервала + /// + /// + public double DepthStart { get; set; } - /// - /// Глубина по стволу до, м - /// - /// на конец интервала - /// - /// - public double DepthEnd { get; set; } + /// + /// Глубина по стволу до, м + /// + /// на конец интервала + /// + /// + public double DepthEnd { get; set; } - /// - /// Дата/ время - /// - /// на начало интервала - /// - /// - public DateTimeOffset DateStart { get; set; } + /// + /// Дата/ время + /// + /// на начало интервала + /// + /// + public DateTimeOffset DateStart { get; set; } - /// - /// Режим бурения (Ротор/слайд/ручной) - /// - public string DrillingMode { get; set; } = null!; + /// + /// Режим бурения (Ротор/слайд/ручной) + /// + public string DrillingMode { get; set; } = null!; - /// - /// Проходка, м - /// - public double? DeltaDepth { get; set; } + /// + /// Проходка, м + /// + public double? DeltaDepth { get; set; } - /// - /// Перепад давления, атм - /// - public ProcessMapReportDataSaubStatParamsDto PressureDiff { get; set; } = new(); + /// + /// Перепад давления, атм + /// + public ProcessMapReportDataSaubStatParamsDto PressureDiff { get; set; } = new(); - /// - /// Нагрузка, т - /// - public ProcessMapReportDataSaubStatParamsDto AxialLoad { get; set; } = new(); + /// + /// Нагрузка, т + /// + public ProcessMapReportDataSaubStatParamsDto AxialLoad { get; set; } = new(); - /// - /// Момент на ВСП, кНхМ - /// - public ProcessMapReportDataSaubStatParamsDto TopDriveTorque { get; set; } = new(); + /// + /// Момент на ВСП, кНхМ + /// + public ProcessMapReportDataSaubStatParamsDto TopDriveTorque { get; set; } = new(); - /// - /// Ограничение скорости, м/ч - /// - public ProcessMapReportDataSaubStatParamsDto SpeedLimit { get; set; } = new(); + /// + /// Ограничение скорости, м/ч + /// + public ProcessMapReportDataSaubStatParamsDto SpeedLimit { get; set; } = new(); /// /// Обороты ВСП, об/мин @@ -86,8 +86,8 @@ public class ProcessMapReportDataSaubStatDto /// public ProcessMapReportDataSaubStatParamsDto Flow { get; set; } = new(); - /// - /// Механическая скорость, м/ч - /// - public PlanFactDto Rop { get; set; } = new(); + /// + /// Механическая скорость, м/ч + /// + public PlanFactDto Rop { get; set; } = new(); } \ No newline at end of file diff --git a/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportDataSaubStatParamsDto.cs b/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportDataSaubStatParamsDto.cs index 1ed34027..710fcd4e 100644 --- a/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportDataSaubStatParamsDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportDataSaubStatParamsDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.ProcessMaps.Report; +namespace AsbCloudApp.Data.ProcessMaps.Report; /// /// Параметры РТК diff --git a/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportWellDrillingDto.cs b/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportWellDrillingDto.cs index cee53050..a7a0f28c 100644 --- a/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportWellDrillingDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportWellDrillingDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data.ProcessMaps.Report; @@ -7,92 +7,92 @@ namespace AsbCloudApp.Data.ProcessMaps.Report; /// public class ProcessMapReportWellDrillingDto { - /// - /// Идентификатор скважины - /// - public int IdWell { get; set; } + /// + /// Идентификатор скважины + /// + public int IdWell { get; set; } - /// - /// Id секции скважины - /// - public int IdWellSectionType { get; set; } + /// + /// Id секции скважины + /// + public int IdWellSectionType { get; set; } - /// - /// Название секции скважины - /// - public string WellSectionTypeName { get; set; } = null!; + /// + /// Название секции скважины + /// + public string WellSectionTypeName { get; set; } = null!; - /// - /// Глубина по стволу от, м - /// - /// на начало интервала - /// - /// - public double DepthStart { get; set; } + /// + /// Глубина по стволу от, м + /// + /// на начало интервала + /// + /// + public double DepthStart { get; set; } - /// - /// Глубина по стволу до, м - /// - /// на конец интервала - /// - /// - public double DepthEnd { get; set; } + /// + /// Глубина по стволу до, м + /// + /// на конец интервала + /// + /// + public double DepthEnd { get; set; } - /// - /// Дата/ время - /// - /// на начало интервала - /// - /// - public DateTimeOffset DateStart { get; set; } + /// + /// Дата/ время + /// + /// на начало интервала + /// + /// + public DateTimeOffset DateStart { get; set; } - /// - /// Время мех бурения, ч - /// - public double MechDrillingHours { get; set; } + /// + /// Время мех бурения, ч + /// + public double MechDrillingHours { get; set; } - /// - /// Режим бурения (Ротор/слайд/ручной) - /// - public string DrillingMode { get; set; } = null!; + /// + /// Режим бурения (Ротор/слайд/ручной) + /// + public string DrillingMode { get; set; } = null!; - /// - /// Проходка, м - /// - public double? DeltaDepth { get; set; } + /// + /// Проходка, м + /// + public double? DeltaDepth { get; set; } - /// - /// Перепад давления, атм - /// - public ProcessMapReportWellDrillingParamsDto PressureDiff { get; set; } = new(); + /// + /// Перепад давления, атм + /// + public ProcessMapReportWellDrillingParamsDto PressureDiff { get; set; } = new(); - /// - /// Нагрузка, т - /// - public ProcessMapReportWellDrillingParamsDto AxialLoad { get; set; } = new(); + /// + /// Нагрузка, т + /// + public ProcessMapReportWellDrillingParamsDto AxialLoad { get; set; } = new(); - /// - /// Момент на ВСП, кНхМ - /// - public ProcessMapReportWellDrillingParamsDto TopDriveTorque { get; set; } = new(); + /// + /// Момент на ВСП, кНхМ + /// + public ProcessMapReportWellDrillingParamsDto TopDriveTorque { get; set; } = new(); - /// - /// Ограничение скорости, м/ч - /// - public ProcessMapReportWellDrillingParamsDto SpeedLimit { get; set; } = new(); + /// + /// Ограничение скорости, м/ч + /// + public ProcessMapReportWellDrillingParamsDto SpeedLimit { get; set; } = new(); - /// - /// Процент использования системы АПД план, % - /// - public double UsagePlan { get; set; } + /// + /// Процент использования системы АПД план, % + /// + public double UsagePlan { get; set; } - /// - /// Процент использования системы АПД факт, % - /// - public double UsageFact { get; set; } + /// + /// Процент использования системы АПД факт, % + /// + public double UsageFact { get; set; } - /// - /// Механическая скорость, м/ч - /// - public PlanFactDto Rop { get; set; } = new(); + /// + /// Механическая скорость, м/ч + /// + public PlanFactDto Rop { get; set; } = new(); } \ No newline at end of file diff --git a/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportWellDrillingParamsDto.cs b/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportWellDrillingParamsDto.cs index cc3dc899..43f82156 100644 --- a/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportWellDrillingParamsDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/Report/ProcessMapReportWellDrillingParamsDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.ProcessMaps.Report; +namespace AsbCloudApp.Data.ProcessMaps.Report; /// /// Параметры РТК diff --git a/AsbCloudApp/Data/ProcessMaps/WellSectionPlanDto.cs b/AsbCloudApp/Data/ProcessMaps/WellSectionPlanDto.cs index 35a99e7c..c6ecbed9 100644 --- a/AsbCloudApp/Data/ProcessMaps/WellSectionPlanDto.cs +++ b/AsbCloudApp/Data/ProcessMaps/WellSectionPlanDto.cs @@ -7,64 +7,64 @@ namespace AsbCloudApp.Data.ProcessMaps; /// Секция скважины - план /// public class WellSectionPlanDto : ItemInfoDto, - IId, - IWellRelated, - IValidatableObject + IId, + IWellRelated, + IValidatableObject { - /// - public int Id { get; set; } + /// + public int Id { get; set; } /// [Required] - public int IdWell { get; set; } + public int IdWell { get; set; } - /// - /// Тип секции - /// - [Required(ErrorMessage = "Поле обязательно для заполнение")] - [Range(1, int.MaxValue)] - public int IdSectionType { get; set; } + /// + /// Тип секции + /// + [Required(ErrorMessage = "Поле обязательно для заполнение")] + [Range(1, int.MaxValue)] + public int IdSectionType { get; set; } - /// - /// Начальная глубина бурения, м - /// - [Required(ErrorMessage = "Поле обязательно для заполнение")] - [Range(0, 10000, ErrorMessage = "Допустимое значение от 0 до 10000")] - public double DepthStart { get; set; } + /// + /// Начальная глубина бурения, м + /// + [Required(ErrorMessage = "Поле обязательно для заполнение")] + [Range(0, 10000, ErrorMessage = "Допустимое значение от 0 до 10000")] + public double DepthStart { get; set; } - /// - /// Конечная глубина бурения, м - /// - [Required(ErrorMessage = "Поле обязательно для заполнение")] - [Range(0, 10000, ErrorMessage = "Допустимое значение от 0 до 10000")] - public double DepthEnd { get; set; } + /// + /// Конечная глубина бурения, м + /// + [Required(ErrorMessage = "Поле обязательно для заполнение")] + [Range(0, 10000, ErrorMessage = "Допустимое значение от 0 до 10000")] + public double DepthEnd { get; set; } - /// - /// Внешний диаметр - /// - [Range(1, 10000, ErrorMessage = "Допустимое значение от 1 до 10000")] - public double? OuterDiameter { get; set; } + /// + /// Внешний диаметр + /// + [Range(1, 10000, ErrorMessage = "Допустимое значение от 1 до 10000")] + public double? OuterDiameter { get; set; } - /// - /// Внутренний диаметр - /// - [Range(1, 10000, ErrorMessage = "Допустимое значение от 1 до 10000")] - public double? InnerDiameter { get; set; } + /// + /// Внутренний диаметр + /// + [Range(1, 10000, ErrorMessage = "Допустимое значение от 1 до 10000")] + public double? InnerDiameter { get; set; } - /// - public IEnumerable Validate(ValidationContext validationContext) - { - if (!OuterDiameter.HasValue && !InnerDiameter.HasValue) - yield break; + /// + public IEnumerable Validate(ValidationContext validationContext) + { + if (!OuterDiameter.HasValue && !InnerDiameter.HasValue) + yield break; - if (!OuterDiameter.HasValue) - yield return new ValidationResult("Поле обязательно для заполнение", new[] { nameof(OuterDiameter) }); + if (!OuterDiameter.HasValue) + yield return new ValidationResult("Поле обязательно для заполнение", new[] { nameof(OuterDiameter) }); - if (!InnerDiameter.HasValue) - yield return new ValidationResult("Поле обязательно для заполнение", new[] { nameof(InnerDiameter) }); + if (!InnerDiameter.HasValue) + yield return new ValidationResult("Поле обязательно для заполнение", new[] { nameof(InnerDiameter) }); - if (OuterDiameter <= InnerDiameter) - yield return new ValidationResult("Внешний диаметр не должен быть больше или равен внутреннему", - new[] { nameof(OuterDiameter) }); - } + if (OuterDiameter <= InnerDiameter) + yield return new ValidationResult("Внешний диаметр не должен быть больше или равен внутреннему", + new[] { nameof(OuterDiameter) }); + } } \ No newline at end of file diff --git a/AsbCloudApp/Data/Progress/ProgressDto.cs b/AsbCloudApp/Data/Progress/ProgressDto.cs index 3ad2c50a..71f08cfd 100644 --- a/AsbCloudApp/Data/Progress/ProgressDto.cs +++ b/AsbCloudApp/Data/Progress/ProgressDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.Progress; +namespace AsbCloudApp.Data.Progress; /// /// DTO прогресса diff --git a/AsbCloudApp/Data/Progress/ProgressExceptionDto.cs b/AsbCloudApp/Data/Progress/ProgressExceptionDto.cs index a8eb4fdd..56932705 100644 --- a/AsbCloudApp/Data/Progress/ProgressExceptionDto.cs +++ b/AsbCloudApp/Data/Progress/ProgressExceptionDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data.Progress; diff --git a/AsbCloudApp/Data/Progress/ReportProgressDto.cs b/AsbCloudApp/Data/Progress/ReportProgressDto.cs index 8bfb07d2..09eb8fc3 100644 --- a/AsbCloudApp/Data/Progress/ReportProgressDto.cs +++ b/AsbCloudApp/Data/Progress/ReportProgressDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.Progress; +namespace AsbCloudApp.Data.Progress; /// /// DTO завершенного прогресса генерации рапорта-диаграммы diff --git a/AsbCloudApp/Data/Progress/ReportProgressFinalDto.cs b/AsbCloudApp/Data/Progress/ReportProgressFinalDto.cs index b5ce965a..e74b79b8 100644 --- a/AsbCloudApp/Data/Progress/ReportProgressFinalDto.cs +++ b/AsbCloudApp/Data/Progress/ReportProgressFinalDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.Progress; +namespace AsbCloudApp.Data.Progress; /// /// DTO прогресса генерации рапорта-диаграммы diff --git a/AsbCloudApp/Data/ReportInfoDto.cs b/AsbCloudApp/Data/ReportInfoDto.cs index bd55d33c..277d0eaa 100644 --- a/AsbCloudApp/Data/ReportInfoDto.cs +++ b/AsbCloudApp/Data/ReportInfoDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data +namespace AsbCloudApp.Data { /// /// Справочная информация об отчете diff --git a/AsbCloudApp/Data/ReportPropertiesDto.cs b/AsbCloudApp/Data/ReportPropertiesDto.cs index f802a7e0..dc024620 100644 --- a/AsbCloudApp/Data/ReportPropertiesDto.cs +++ b/AsbCloudApp/Data/ReportPropertiesDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/RequestLogDto.cs b/AsbCloudApp/Data/RequestLogDto.cs index b930df52..e326043f 100644 --- a/AsbCloudApp/Data/RequestLogDto.cs +++ b/AsbCloudApp/Data/RequestLogDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/RequestLogUserDto.cs b/AsbCloudApp/Data/RequestLogUserDto.cs index a1149653..562acc36 100644 --- a/AsbCloudApp/Data/RequestLogUserDto.cs +++ b/AsbCloudApp/Data/RequestLogUserDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; using AsbCloudApp.Data.User; diff --git a/AsbCloudApp/Data/SAUB/DrillTestBaseDto.cs b/AsbCloudApp/Data/SAUB/DrillTestBaseDto.cs index 6e9f56bf..1a87d73a 100644 --- a/AsbCloudApp/Data/SAUB/DrillTestBaseDto.cs +++ b/AsbCloudApp/Data/SAUB/DrillTestBaseDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/SAUB/DrillTestDto.cs b/AsbCloudApp/Data/SAUB/DrillTestDto.cs index 0af9cb9c..32814d35 100644 --- a/AsbCloudApp/Data/SAUB/DrillTestDto.cs +++ b/AsbCloudApp/Data/SAUB/DrillTestDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.SAUB { diff --git a/AsbCloudApp/Data/SAUB/DrillTestParamsDto.cs b/AsbCloudApp/Data/SAUB/DrillTestParamsDto.cs index 2e6920f3..adc3d1db 100644 --- a/AsbCloudApp/Data/SAUB/DrillTestParamsDto.cs +++ b/AsbCloudApp/Data/SAUB/DrillTestParamsDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.SAUB { diff --git a/AsbCloudApp/Data/SAUB/EventDto.cs b/AsbCloudApp/Data/SAUB/EventDto.cs index 302ad145..66b5fa7f 100644 --- a/AsbCloudApp/Data/SAUB/EventDto.cs +++ b/AsbCloudApp/Data/SAUB/EventDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.SAUB { diff --git a/AsbCloudApp/Data/SAUB/Readme.md b/AsbCloudApp/Data/SAUB/Readme.md index 8a09cd11..ef73b9c7 100644 --- a/AsbCloudApp/Data/SAUB/Readme.md +++ b/AsbCloudApp/Data/SAUB/Readme.md @@ -1,2 +1,2 @@ -Папка содержит dto для получаемые от панели оператора САУБ. +Папка содержит dto для получаемые от панели оператора САУБ. Данные WITS вынесены в отдельную папку. \ No newline at end of file diff --git a/AsbCloudApp/Data/SAUB/SetpointInfoDto.cs b/AsbCloudApp/Data/SAUB/SetpointInfoDto.cs index b704d0a5..a5cc0277 100644 --- a/AsbCloudApp/Data/SAUB/SetpointInfoDto.cs +++ b/AsbCloudApp/Data/SAUB/SetpointInfoDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.SAUB { diff --git a/AsbCloudApp/Data/SAUB/SetpointsRequestDto.cs b/AsbCloudApp/Data/SAUB/SetpointsRequestDto.cs index 192805a6..003f50c4 100644 --- a/AsbCloudApp/Data/SAUB/SetpointsRequestDto.cs +++ b/AsbCloudApp/Data/SAUB/SetpointsRequestDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using AsbCloudApp.Data.User; diff --git a/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs b/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs index 8f2794fc..71c95c20 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryDataSaubDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.SAUB diff --git a/AsbCloudApp/Data/SAUB/TelemetryDataSaubStatDto.cs b/AsbCloudApp/Data/SAUB/TelemetryDataSaubStatDto.cs index d08df130..329839be 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryDataSaubStatDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryDataSaubStatDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data.SAUB { diff --git a/AsbCloudApp/Data/SAUB/TelemetryDataSpinDto.cs b/AsbCloudApp/Data/SAUB/TelemetryDataSpinDto.cs index bf575e5d..83c55520 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryDataSpinDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryDataSpinDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.SAUB diff --git a/AsbCloudApp/Data/SAUB/TelemetryDataStatDto.cs b/AsbCloudApp/Data/SAUB/TelemetryDataStatDto.cs index c9eab606..c2cb8926 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryDataStatDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryDataStatDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudInfrastructure.Services.SAUB { diff --git a/AsbCloudApp/Data/SAUB/TelemetryInfoDto.cs b/AsbCloudApp/Data/SAUB/TelemetryInfoDto.cs index 66501c18..8e89d474 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryInfoDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryInfoDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data.SAUB { diff --git a/AsbCloudApp/Data/SAUB/TelemetryMessageDto.cs b/AsbCloudApp/Data/SAUB/TelemetryMessageDto.cs index ee86fc46..7c8e4d92 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryMessageDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryMessageDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data.SAUB { diff --git a/AsbCloudApp/Data/SAUB/TelemetryUserDto.cs b/AsbCloudApp/Data/SAUB/TelemetryUserDto.cs index 5d93813e..ad7a8aab 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryUserDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryUserDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.SAUB +namespace AsbCloudApp.Data.SAUB { /// /// Пользователь панели оператора diff --git a/AsbCloudApp/Data/SAUB/TelemetryWirelineRunOutDto.cs b/AsbCloudApp/Data/SAUB/TelemetryWirelineRunOutDto.cs index 213b67ec..c6a52965 100644 --- a/AsbCloudApp/Data/SAUB/TelemetryWirelineRunOutDto.cs +++ b/AsbCloudApp/Data/SAUB/TelemetryWirelineRunOutDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data.SAUB { diff --git a/AsbCloudApp/Data/ScheduleDto.cs b/AsbCloudApp/Data/ScheduleDto.cs index a8c8d652..e9c8d991 100644 --- a/AsbCloudApp/Data/ScheduleDto.cs +++ b/AsbCloudApp/Data/ScheduleDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudApp/Data/SectionByOperationsDto.cs b/AsbCloudApp/Data/SectionByOperationsDto.cs index 5c353dd5..06d927d5 100644 --- a/AsbCloudApp/Data/SectionByOperationsDto.cs +++ b/AsbCloudApp/Data/SectionByOperationsDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data; diff --git a/AsbCloudApp/Data/SlipsStatDto.cs b/AsbCloudApp/Data/SlipsStatDto.cs index dba3228b..13e381fa 100644 --- a/AsbCloudApp/Data/SlipsStatDto.cs +++ b/AsbCloudApp/Data/SlipsStatDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/AsbCloudApp/Data/StatClusterDto.cs b/AsbCloudApp/Data/StatClusterDto.cs index ce3c3c06..d407dda8 100644 --- a/AsbCloudApp/Data/StatClusterDto.cs +++ b/AsbCloudApp/Data/StatClusterDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/StatOperationsDto.cs b/AsbCloudApp/Data/StatOperationsDto.cs index ec59eae0..06d4cd8b 100644 --- a/AsbCloudApp/Data/StatOperationsDto.cs +++ b/AsbCloudApp/Data/StatOperationsDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/StatSectionDto.cs b/AsbCloudApp/Data/StatSectionDto.cs index 19a82518..e1cb8d91 100644 --- a/AsbCloudApp/Data/StatSectionDto.cs +++ b/AsbCloudApp/Data/StatSectionDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/StatWellDto.cs b/AsbCloudApp/Data/StatWellDto.cs index 9cf27fe4..2906267d 100644 --- a/AsbCloudApp/Data/StatWellDto.cs +++ b/AsbCloudApp/Data/StatWellDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/Subsystems/SubsystemActiveWellStatDto.cs b/AsbCloudApp/Data/Subsystems/SubsystemActiveWellStatDto.cs index 774ebfe6..72009908 100644 --- a/AsbCloudApp/Data/Subsystems/SubsystemActiveWellStatDto.cs +++ b/AsbCloudApp/Data/Subsystems/SubsystemActiveWellStatDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.Subsystems; @@ -7,21 +7,21 @@ namespace AsbCloudApp.Data.Subsystems; /// public class SubsystemActiveWellStatDto { - /// - /// Активная скважина - /// - [Required] - public WellInfoDto Well { get; set; } = null!; - /// - /// Наработки подсистемы АПД - /// - public SubsystemStatDto? SubsystemAPD { get; set; } - /// - /// Наработки подсистемы с осцилляцией - /// - public SubsystemStatDto? SubsystemOscillation { get; set; } - /// - /// Наработки подсистемы ТОРК - /// - public SubsystemStatDto? SubsystemTorqueMaster { get; set; } + /// + /// Активная скважина + /// + [Required] + public WellInfoDto Well { get; set; } = null!; + /// + /// Наработки подсистемы АПД + /// + public SubsystemStatDto? SubsystemAPD { get; set; } + /// + /// Наработки подсистемы с осцилляцией + /// + public SubsystemStatDto? SubsystemOscillation { get; set; } + /// + /// Наработки подсистемы ТОРК + /// + public SubsystemStatDto? SubsystemTorqueMaster { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/Subsystems/SubsystemDto.cs b/AsbCloudApp/Data/Subsystems/SubsystemDto.cs index 0e648de5..fa5c02d1 100644 --- a/AsbCloudApp/Data/Subsystems/SubsystemDto.cs +++ b/AsbCloudApp/Data/Subsystems/SubsystemDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.Subsystems { diff --git a/AsbCloudApp/Data/Subsystems/SubsystemStatDto.cs b/AsbCloudApp/Data/Subsystems/SubsystemStatDto.cs index fa83bdfd..3c566dea 100644 --- a/AsbCloudApp/Data/Subsystems/SubsystemStatDto.cs +++ b/AsbCloudApp/Data/Subsystems/SubsystemStatDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.Subsystems diff --git a/AsbCloudApp/Data/TelemetryDto.cs b/AsbCloudApp/Data/TelemetryDto.cs index e4e3be80..2934b721 100644 --- a/AsbCloudApp/Data/TelemetryDto.cs +++ b/AsbCloudApp/Data/TelemetryDto.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/TimeDto.cs b/AsbCloudApp/Data/TimeDto.cs index 20ffa4ac..34bcba3e 100644 --- a/AsbCloudApp/Data/TimeDto.cs +++ b/AsbCloudApp/Data/TimeDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/Trajectory/TrajectoryCartesianFactDto.cs b/AsbCloudApp/Data/Trajectory/TrajectoryCartesianFactDto.cs index c9df8dfd..218462db 100644 --- a/AsbCloudApp/Data/Trajectory/TrajectoryCartesianFactDto.cs +++ b/AsbCloudApp/Data/Trajectory/TrajectoryCartesianFactDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.Trajectory +namespace AsbCloudApp.Data.Trajectory { diff --git a/AsbCloudApp/Data/Trajectory/TrajectoryCartesianPlanDto.cs b/AsbCloudApp/Data/Trajectory/TrajectoryCartesianPlanDto.cs index 923498eb..91096ad6 100644 --- a/AsbCloudApp/Data/Trajectory/TrajectoryCartesianPlanDto.cs +++ b/AsbCloudApp/Data/Trajectory/TrajectoryCartesianPlanDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.Trajectory +namespace AsbCloudApp.Data.Trajectory { /// /// Визуализация траектории 3D для построения радиуса цели diff --git a/AsbCloudApp/Data/Trajectory/TrajectoryGeoDto.cs b/AsbCloudApp/Data/Trajectory/TrajectoryGeoDto.cs index 11b88141..2c940043 100644 --- a/AsbCloudApp/Data/Trajectory/TrajectoryGeoDto.cs +++ b/AsbCloudApp/Data/Trajectory/TrajectoryGeoDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/Trajectory/TrajectoryGeoFactDto.cs b/AsbCloudApp/Data/Trajectory/TrajectoryGeoFactDto.cs index 8ab23fc6..03529042 100644 --- a/AsbCloudApp/Data/Trajectory/TrajectoryGeoFactDto.cs +++ b/AsbCloudApp/Data/Trajectory/TrajectoryGeoFactDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.Trajectory; +namespace AsbCloudApp.Data.Trajectory; /// /// Формирование данных по фактической географической траектории diff --git a/AsbCloudApp/Data/Trajectory/TrajectoryGeoPlanDto.cs b/AsbCloudApp/Data/Trajectory/TrajectoryGeoPlanDto.cs index 292add96..6730e6db 100644 --- a/AsbCloudApp/Data/Trajectory/TrajectoryGeoPlanDto.cs +++ b/AsbCloudApp/Data/Trajectory/TrajectoryGeoPlanDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Data.Trajectory { diff --git a/AsbCloudApp/Data/Trajectory/TrajectoryPlanFactDto.cs b/AsbCloudApp/Data/Trajectory/TrajectoryPlanFactDto.cs index 7176f36f..f691fb76 100644 --- a/AsbCloudApp/Data/Trajectory/TrajectoryPlanFactDto.cs +++ b/AsbCloudApp/Data/Trajectory/TrajectoryPlanFactDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.Trajectory +namespace AsbCloudApp.Data.Trajectory { /// /// DTO объединяющее плановые и фактические значения траекторий diff --git a/AsbCloudApp/Data/User/ContactDto.cs b/AsbCloudApp/Data/User/ContactDto.cs index 904d4ca2..dd6b3212 100644 --- a/AsbCloudApp/Data/User/ContactDto.cs +++ b/AsbCloudApp/Data/User/ContactDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.User; diff --git a/AsbCloudApp/Data/User/UserDto.cs b/AsbCloudApp/Data/User/UserDto.cs index 5ff08203..ce1d6f4a 100644 --- a/AsbCloudApp/Data/User/UserDto.cs +++ b/AsbCloudApp/Data/User/UserDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.User { diff --git a/AsbCloudApp/Data/User/UserExtendedDto.cs b/AsbCloudApp/Data/User/UserExtendedDto.cs index d59518de..9cec40a6 100644 --- a/AsbCloudApp/Data/User/UserExtendedDto.cs +++ b/AsbCloudApp/Data/User/UserExtendedDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; namespace AsbCloudApp.Data.User diff --git a/AsbCloudApp/Data/User/UserRegistrationDto.cs b/AsbCloudApp/Data/User/UserRegistrationDto.cs index dc6b289a..26530fa4 100644 --- a/AsbCloudApp/Data/User/UserRegistrationDto.cs +++ b/AsbCloudApp/Data/User/UserRegistrationDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.User { diff --git a/AsbCloudApp/Data/User/UserRoleDto.cs b/AsbCloudApp/Data/User/UserRoleDto.cs index cc34713c..68f54434 100644 --- a/AsbCloudApp/Data/User/UserRoleDto.cs +++ b/AsbCloudApp/Data/User/UserRoleDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/User/UserTokenDto.cs b/AsbCloudApp/Data/User/UserTokenDto.cs index cfd538f7..e11a1f8f 100644 --- a/AsbCloudApp/Data/User/UserTokenDto.cs +++ b/AsbCloudApp/Data/User/UserTokenDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; namespace AsbCloudApp.Data.User diff --git a/AsbCloudApp/Data/ValidationResultDto.cs b/AsbCloudApp/Data/ValidationResultDto.cs index 1fe0f918..4228c11d 100644 --- a/AsbCloudApp/Data/ValidationResultDto.cs +++ b/AsbCloudApp/Data/ValidationResultDto.cs @@ -8,20 +8,20 @@ namespace AsbCloudApp.Data; /// Результат валидации объекта /// public class ValidationResultDto - where T : class + where T : class { - /// - /// Флаг валидности - /// - public bool IsValid => !Warnings.Any(); + /// + /// Флаг валидности + /// + public bool IsValid => !Warnings.Any(); - /// - /// Объект валидации - /// - public virtual T Item { get; set; } = null!; + /// + /// Объект валидации + /// + public virtual T Item { get; set; } = null!; - /// - /// Предупреждения - /// - public IEnumerable Warnings { get; set; } = Enumerable.Empty(); + /// + /// Предупреждения + /// + public IEnumerable Warnings { get; set; } = Enumerable.Empty(); } \ No newline at end of file diff --git a/AsbCloudApp/Data/WITS/Readme.md b/AsbCloudApp/Data/WITS/Readme.md index ac6325ef..76520237 100644 --- a/AsbCloudApp/Data/WITS/Readme.md +++ b/AsbCloudApp/Data/WITS/Readme.md @@ -1,2 +1,2 @@ -Данные WITS см.: http://www.petrospec-technologies.com/resource/wits_doc.htm. +Данные WITS см.: http://www.petrospec-technologies.com/resource/wits_doc.htm. Дополнительное описание параметров в сборке AsbWitsInf.dll \ No newline at end of file diff --git a/AsbCloudApp/Data/WITS/RecordBaseDto.cs b/AsbCloudApp/Data/WITS/RecordBaseDto.cs index 34cd0f5b..8c874136 100644 --- a/AsbCloudApp/Data/WITS/RecordBaseDto.cs +++ b/AsbCloudApp/Data/WITS/RecordBaseDto.cs @@ -20,7 +20,7 @@ namespace AsbCloudApp.Data.WITS public DateTime DateTime { get; set; } /// - /// + /// отметка времени /// [Required] public int TimeStamp { get; set; } diff --git a/AsbCloudApp/Data/WellCaseDto.cs b/AsbCloudApp/Data/WellCaseDto.cs index 0241faf6..b3a50693 100644 --- a/AsbCloudApp/Data/WellCaseDto.cs +++ b/AsbCloudApp/Data/WellCaseDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/WellCompositeDto.cs b/AsbCloudApp/Data/WellCompositeDto.cs index 6fe39a40..af9a91a8 100644 --- a/AsbCloudApp/Data/WellCompositeDto.cs +++ b/AsbCloudApp/Data/WellCompositeDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/WellCompositeOperationDto.cs b/AsbCloudApp/Data/WellCompositeOperationDto.cs index ce8e44f9..97c1ff90 100644 --- a/AsbCloudApp/Data/WellCompositeOperationDto.cs +++ b/AsbCloudApp/Data/WellCompositeOperationDto.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.WellOperation; +using AsbCloudApp.Data.WellOperation; using System; using System.Collections.Generic; using System.Linq; diff --git a/AsbCloudApp/Data/WellCompositeOperationSourceDto.cs b/AsbCloudApp/Data/WellCompositeOperationSourceDto.cs index 04ec7b3b..e991dd3f 100644 --- a/AsbCloudApp/Data/WellCompositeOperationSourceDto.cs +++ b/AsbCloudApp/Data/WellCompositeOperationSourceDto.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.WellOperation; +using AsbCloudApp.Data.WellOperation; using System.Collections.Generic; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/WellDto.cs b/AsbCloudApp/Data/WellDto.cs index 368e58c9..223aad41 100644 --- a/AsbCloudApp/Data/WellDto.cs +++ b/AsbCloudApp/Data/WellDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/WellFinalDocumentDBDto.cs b/AsbCloudApp/Data/WellFinalDocumentDBDto.cs index db229147..d69c793e 100644 --- a/AsbCloudApp/Data/WellFinalDocumentDBDto.cs +++ b/AsbCloudApp/Data/WellFinalDocumentDBDto.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data +namespace AsbCloudApp.Data { /// /// DTO Дело скважины diff --git a/AsbCloudApp/Data/WellFinalDocumentDto.cs b/AsbCloudApp/Data/WellFinalDocumentDto.cs index a60afd6c..7fe90b6a 100644 --- a/AsbCloudApp/Data/WellFinalDocumentDto.cs +++ b/AsbCloudApp/Data/WellFinalDocumentDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using AsbCloudApp.Data.User; diff --git a/AsbCloudApp/Data/WellFinalDocumentInputDto.cs b/AsbCloudApp/Data/WellFinalDocumentInputDto.cs index 75cb0ca3..82e2072d 100644 --- a/AsbCloudApp/Data/WellFinalDocumentInputDto.cs +++ b/AsbCloudApp/Data/WellFinalDocumentInputDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Data/WellFinalDocumentsHistoryDto.cs b/AsbCloudApp/Data/WellFinalDocumentsHistoryDto.cs index f08c67e3..b69bb415 100644 --- a/AsbCloudApp/Data/WellFinalDocumentsHistoryDto.cs +++ b/AsbCloudApp/Data/WellFinalDocumentsHistoryDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data diff --git a/AsbCloudApp/Data/WellInfoDto.cs b/AsbCloudApp/Data/WellInfoDto.cs index b42d90b4..58ce537d 100644 --- a/AsbCloudApp/Data/WellInfoDto.cs +++ b/AsbCloudApp/Data/WellInfoDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data { diff --git a/AsbCloudApp/Data/WellMapInfoDto.cs b/AsbCloudApp/Data/WellMapInfoDto.cs index 55098f4b..2b49ad3f 100644 --- a/AsbCloudApp/Data/WellMapInfoDto.cs +++ b/AsbCloudApp/Data/WellMapInfoDto.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using System; using System.Collections.Generic; using System.Linq; diff --git a/AsbCloudApp/Data/WellOperation/WellGroupOpertionDto.cs b/AsbCloudApp/Data/WellOperation/WellGroupOpertionDto.cs index acd8221d..20e27151 100644 --- a/AsbCloudApp/Data/WellOperation/WellGroupOpertionDto.cs +++ b/AsbCloudApp/Data/WellOperation/WellGroupOpertionDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; diff --git a/AsbCloudApp/Data/WellOperation/WellOperationCategoryDto.cs b/AsbCloudApp/Data/WellOperation/WellOperationCategoryDto.cs index 2fe0b177..46e7dbe5 100644 --- a/AsbCloudApp/Data/WellOperation/WellOperationCategoryDto.cs +++ b/AsbCloudApp/Data/WellOperation/WellOperationCategoryDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.WellOperation { diff --git a/AsbCloudApp/Data/WellOperation/WellOperationDto.cs b/AsbCloudApp/Data/WellOperation/WellOperationDto.cs index 6a0a473e..b940a9ae 100644 --- a/AsbCloudApp/Data/WellOperation/WellOperationDto.cs +++ b/AsbCloudApp/Data/WellOperation/WellOperationDto.cs @@ -8,112 +8,112 @@ namespace AsbCloudApp.Data.WellOperation; /// Операция по скважине /// public class WellOperationDto : ItemInfoDto, - IId, - IWellRelated, - IValidatableObject + IId, + IWellRelated, + IValidatableObject { - /// - [Required] - public int Id { get; set; } + /// + [Required] + public int Id { get; set; } - /// - [Required] - public int IdWell { get; set; } + /// + [Required] + public int IdWell { get; set; } - /// - /// Id секции скважины - /// - public int IdWellSectionType { get; set; } + /// + /// Id секции скважины + /// + public int IdWellSectionType { get; set; } - /// - /// 0 = план или 1 = факт или прогноз = 2 - /// - [Required] - public int IdType { get; set; } + /// + /// 0 = план или 1 = факт или прогноз = 2 + /// + [Required] + public int IdType { get; set; } - /// - /// id категории операции - /// - public int IdCategory { get; set; } + /// + /// id категории операции + /// + public int IdCategory { get; set; } - /// - /// Глубина на начало операции, м - /// - public double DepthStart { get; set; } + /// + /// Глубина на начало операции, м + /// + public double DepthStart { get; set; } - /// - /// Глубина после завершения операции, м - /// - [Required] - [Range(0, 50_000)] - public double DepthEnd { get; set; } + /// + /// Глубина после завершения операции, м + /// + [Required] + [Range(0, 50_000)] + public double DepthEnd { get; set; } - /// - /// Дата начала операции - /// - [Required] - public DateTimeOffset DateStart { get; set; } + /// + /// Дата начала операции + /// + [Required] + public DateTimeOffset DateStart { get; set; } - /// - /// Продолжительность, часы - /// - public double DurationHours { get; set; } + /// + /// Продолжительность, часы + /// + public double DurationHours { get; set; } - /// - /// Наименование секции - /// - public string? WellSectionTypeCaption { get; set; } + /// + /// Наименование секции + /// + public string? WellSectionTypeCaption { get; set; } - /// - /// Наименование категории - /// - public string? OperationCategoryName { get; set; } + /// + /// Наименование категории + /// + public string? OperationCategoryName { get; set; } - /// - /// id плановой операции для сопоставления - /// - public int? IdPlan { get; set; } + /// + /// id плановой операции для сопоставления + /// + public int? IdPlan { get; set; } - /// - /// Ключ родителя у категории - /// - public int? IdParentCategory { get; set; } + /// + /// Ключ родителя у категории + /// + public int? IdParentCategory { get; set; } - /// - /// дополнительная информация по операции - /// - [StringLength(8192)] - public string? CategoryInfo { get; set; } + /// + /// дополнительная информация по операции + /// + [StringLength(8192)] + public string? CategoryInfo { get; set; } - /// - /// Кол-во дней от даты начала первой плановой (а если её нет, то фактической) операции - /// - [Required] - public double Day { get; set; } + /// + /// Кол-во дней от даты начала первой плановой (а если её нет, то фактической) операции + /// + [Required] + public double Day { get; set; } - /// - /// Кол-во часов НПВ от даты начала первой плановой (а если её нет, то фактической) операции - /// - [Required] - public double NptHours { get; set; } + /// + /// Кол-во часов НПВ от даты начала первой плановой (а если её нет, то фактической) операции + /// + [Required] + public double NptHours { get; set; } - /// - /// Полезный комментарий - /// - [StringLength(4096, ErrorMessage = "Комментарий не может быть длиннее 4096 символов")] - public string? Comment { get; set; } + /// + /// Полезный комментарий + /// + [StringLength(4096, ErrorMessage = "Комментарий не может быть длиннее 4096 символов")] + public string? Comment { get; set; } - /// - /// Валидация даты - /// - /// - /// - public IEnumerable Validate(ValidationContext validationContext) - { - var gtDate = new DateTimeOffset(2010, 1, 1, 0, 0, 0, TimeSpan.Zero); - if (DateStart <= gtDate) - yield return new ValidationResult( - $"{nameof(DateStart)}: DateStart не может быть меньше {gtDate}", - new[] { nameof(DateStart) }); - } + /// + /// Валидация даты + /// + /// + /// + public IEnumerable Validate(ValidationContext validationContext) + { + var gtDate = new DateTimeOffset(2010, 1, 1, 0, 0, 0, TimeSpan.Zero); + if (DateStart <= gtDate) + yield return new ValidationResult( + $"{nameof(DateStart)}: DateStart не может быть меньше {gtDate}", + new[] { nameof(DateStart) }); + } } \ No newline at end of file diff --git a/AsbCloudApp/Data/WellOperationImport/Options/IWellOperationImportOptions.cs b/AsbCloudApp/Data/WellOperationImport/Options/IWellOperationImportOptions.cs index 30b9cf8c..8171a20f 100644 --- a/AsbCloudApp/Data/WellOperationImport/Options/IWellOperationImportOptions.cs +++ b/AsbCloudApp/Data/WellOperationImport/Options/IWellOperationImportOptions.cs @@ -1,4 +1,4 @@ -namespace AsbCloudApp.Data.WellOperationImport.Options; +namespace AsbCloudApp.Data.WellOperationImport.Options; /// /// Опции для парсинга diff --git a/AsbCloudApp/Data/WellOperationImport/Options/WellOperationImportDefaultOptionsDto.cs b/AsbCloudApp/Data/WellOperationImport/Options/WellOperationImportDefaultOptionsDto.cs index a1db3d35..7c8316c9 100644 --- a/AsbCloudApp/Data/WellOperationImport/Options/WellOperationImportDefaultOptionsDto.cs +++ b/AsbCloudApp/Data/WellOperationImport/Options/WellOperationImportDefaultOptionsDto.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Data.WellOperationImport.Options; diff --git a/AsbCloudApp/Data/WellOperationImport/RowDto.cs b/AsbCloudApp/Data/WellOperationImport/RowDto.cs index 8f15c3bf..06bb6247 100644 --- a/AsbCloudApp/Data/WellOperationImport/RowDto.cs +++ b/AsbCloudApp/Data/WellOperationImport/RowDto.cs @@ -7,48 +7,48 @@ namespace AsbCloudApp.Data.WellOperationImport; /// public class RowDto { - /// - /// Номер строки - /// - public int Number { get; set; } - - /// - /// Название секции - /// - public string? Section { get; set; } + /// + /// Номер строки + /// + public int Number { get; set; } + + /// + /// Название секции + /// + public string? Section { get; set; } - /// - /// Категория - /// - public string? Category { get; set; } + /// + /// Категория + /// + public string? Category { get; set; } - /// - /// Описание категории - /// - public string? CategoryInfo { get; set; } - - /// - /// Начальная глубина операции - /// - public double DepthStart { get; set; } - - /// - /// Конечная глубина операции - /// - public double DepthEnd { get; set; } - - /// - /// Дата начала операции - /// - public DateTime Date { get; set; } - - /// - /// Длительность операции - /// - public double Duration { get; set; } - - /// - /// Комментарий - /// - public string? Comment { get; set; } + /// + /// Описание категории + /// + public string? CategoryInfo { get; set; } + + /// + /// Начальная глубина операции + /// + public double DepthStart { get; set; } + + /// + /// Конечная глубина операции + /// + public double DepthEnd { get; set; } + + /// + /// Дата начала операции + /// + public DateTime Date { get; set; } + + /// + /// Длительность операции + /// + public double Duration { get; set; } + + /// + /// Комментарий + /// + public string? Comment { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/WellOperationImport/SheetDto.cs b/AsbCloudApp/Data/WellOperationImport/SheetDto.cs index 32091283..fc7c3e79 100644 --- a/AsbCloudApp/Data/WellOperationImport/SheetDto.cs +++ b/AsbCloudApp/Data/WellOperationImport/SheetDto.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; namespace AsbCloudApp.Data.WellOperationImport; diff --git a/AsbCloudApp/Data/WellSectionTypeDto.cs b/AsbCloudApp/Data/WellSectionTypeDto.cs index f8eef939..58aba47c 100644 --- a/AsbCloudApp/Data/WellSectionTypeDto.cs +++ b/AsbCloudApp/Data/WellSectionTypeDto.cs @@ -11,17 +11,17 @@ public class WellSectionTypeDto : IId /// Id секции /// [Required] - public int Id { get; set; } + public int Id { get; set; } - /// - /// Название типа секции - /// - [Required] - public string Caption { get; set; } = null!; + /// + /// Название типа секции + /// + [Required] + public string Caption { get; set; } = null!; - /// - /// Порядок - /// - [Required] - public float Order { get; set; } + /// + /// Порядок + /// + [Required] + public float Order { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Data/WellboreDto.cs b/AsbCloudApp/Data/WellboreDto.cs index 4edf6256..60f745db 100644 --- a/AsbCloudApp/Data/WellboreDto.cs +++ b/AsbCloudApp/Data/WellboreDto.cs @@ -8,44 +8,44 @@ namespace AsbCloudApp.Data; /// public class WellboreDto { - /// - /// Скважина - /// + /// + /// Скважина + /// public WellDto Well { get; set; } = null!; /// /// Идентификатор /// - [Required] + [Required] public int Id { get; set; } - /// - /// Название - /// - [Required] - public string Name { get; set; } = null!; + /// + /// Название + /// + [Required] + public string Name { get; set; } = null!; - /// - /// Начальная глубина ствола - /// - [Required] - public double DepthStart { get; set; } + /// + /// Начальная глубина ствола + /// + [Required] + public double DepthStart { get; set; } - /// - /// Конечная глубина скважины - /// - [Required] - public double DepthEnd { get; set; } + /// + /// Конечная глубина скважины + /// + [Required] + public double DepthEnd { get; set; } - /// - /// Дата начала первой операции - /// - [Required] - public DateTimeOffset DateStart { get; set; } + /// + /// Дата начала первой операции + /// + [Required] + public DateTimeOffset DateStart { get; set; } - /// - /// Дата завершения последней операции - /// - [Required] - public DateTimeOffset DateEnd { get; set; } + /// + /// Дата завершения последней операции + /// + [Required] + public DateTimeOffset DateEnd { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Exceptions/ArgumentInvalidException.cs b/AsbCloudApp/Exceptions/ArgumentInvalidException.cs index 641f18ce..93c37fa7 100644 --- a/AsbCloudApp/Exceptions/ArgumentInvalidException.cs +++ b/AsbCloudApp/Exceptions/ArgumentInvalidException.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; diff --git a/AsbCloudApp/Exceptions/ForbidException.cs b/AsbCloudApp/Exceptions/ForbidException.cs index fccf1ca4..daad3d49 100644 --- a/AsbCloudApp/Exceptions/ForbidException.cs +++ b/AsbCloudApp/Exceptions/ForbidException.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Exceptions { diff --git a/AsbCloudApp/Extensions/ChangeLogExtensions.cs b/AsbCloudApp/Extensions/ChangeLogExtensions.cs index c963201b..32b636ed 100644 --- a/AsbCloudApp/Extensions/ChangeLogExtensions.cs +++ b/AsbCloudApp/Extensions/ChangeLogExtensions.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.ProcessMaps; using System; using System.Collections.Generic; diff --git a/AsbCloudApp/IntegrationEvents/Interfaces/IIntegrationEventHandler.cs b/AsbCloudApp/IntegrationEvents/Interfaces/IIntegrationEventHandler.cs index 18695f07..ab4a1857 100644 --- a/AsbCloudApp/IntegrationEvents/Interfaces/IIntegrationEventHandler.cs +++ b/AsbCloudApp/IntegrationEvents/Interfaces/IIntegrationEventHandler.cs @@ -9,11 +9,11 @@ namespace AsbCloudApp.IntegrationEvents.Interfaces; /// public interface IIntegrationEventHandler where T: IIntegrationEvent { - /// - /// Метод обработки события - /// - /// - /// - /// - Task HandleAsync(T integrationEvent, CancellationToken cancellationToken); + /// + /// Метод обработки события + /// + /// + /// + /// + Task HandleAsync(T integrationEvent, CancellationToken cancellationToken); } \ No newline at end of file diff --git a/AsbCloudApp/Repositories/IChangeLogQueryBuilder.cs b/AsbCloudApp/Repositories/IChangeLogQueryBuilder.cs index b7952c1a..346adbd5 100644 --- a/AsbCloudApp/Repositories/IChangeLogQueryBuilder.cs +++ b/AsbCloudApp/Repositories/IChangeLogQueryBuilder.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Repositories/IChangeLogRepository.cs b/AsbCloudApp/Repositories/IChangeLogRepository.cs index bd8cbe85..2c3e97c0 100644 --- a/AsbCloudApp/Repositories/IChangeLogRepository.cs +++ b/AsbCloudApp/Repositories/IChangeLogRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using System; using System.Collections.Generic; diff --git a/AsbCloudApp/Repositories/IDailyReportRepository.cs b/AsbCloudApp/Repositories/IDailyReportRepository.cs index 39de97e5..cd0dd186 100644 --- a/AsbCloudApp/Repositories/IDailyReportRepository.cs +++ b/AsbCloudApp/Repositories/IDailyReportRepository.cs @@ -13,21 +13,21 @@ namespace AsbCloudApp.Repositories; /// public interface IDailyReportRepository : ICrudRepository { - /// - /// Получить список суточный отчёт по скважине - /// - /// - /// - /// - /// - Task> GetAsync(int idWell, FileReportRequest request, CancellationToken cancellationToken); + /// + /// Получить список суточный отчёт по скважине + /// + /// + /// + /// + /// + Task> GetAsync(int idWell, FileReportRequest request, CancellationToken cancellationToken); - /// - /// Получить суточный отчёт - /// - /// - /// - /// - /// - Task GetOrDefaultAsync(int idWell, DateOnly date, CancellationToken cancellationToken); + /// + /// Получить суточный отчёт + /// + /// + /// + /// + /// + Task GetOrDefaultAsync(int idWell, DateOnly date, CancellationToken cancellationToken); } \ No newline at end of file diff --git a/AsbCloudApp/Repositories/IDataSaubStatRepository.cs b/AsbCloudApp/Repositories/IDataSaubStatRepository.cs index 9dfa351c..d0e3c5a7 100644 --- a/AsbCloudApp/Repositories/IDataSaubStatRepository.cs +++ b/AsbCloudApp/Repositories/IDataSaubStatRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Repositories/IDepositRepository.cs b/AsbCloudApp/Repositories/IDepositRepository.cs index 8f2e421a..4185c9e3 100644 --- a/AsbCloudApp/Repositories/IDepositRepository.cs +++ b/AsbCloudApp/Repositories/IDepositRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Repositories/IDetectedOperationRepository.cs b/AsbCloudApp/Repositories/IDetectedOperationRepository.cs index a748984d..c588a168 100644 --- a/AsbCloudApp/Repositories/IDetectedOperationRepository.cs +++ b/AsbCloudApp/Repositories/IDetectedOperationRepository.cs @@ -1,4 +1,4 @@ -using System; +using System; using AsbCloudApp.Data.DetectedOperation; using AsbCloudApp.Requests; using System.Collections.Generic; diff --git a/AsbCloudApp/Repositories/IDrillTestRepository.cs b/AsbCloudApp/Repositories/IDrillTestRepository.cs index b009273b..b7dce27b 100644 --- a/AsbCloudApp/Repositories/IDrillTestRepository.cs +++ b/AsbCloudApp/Repositories/IDrillTestRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Requests; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Repositories/IFaqRepository.cs b/AsbCloudApp/Repositories/IFaqRepository.cs index 7931b506..f4079159 100644 --- a/AsbCloudApp/Repositories/IFaqRepository.cs +++ b/AsbCloudApp/Repositories/IFaqRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; using System.Threading.Tasks; using System.Threading; diff --git a/AsbCloudApp/Repositories/IFileRepository.cs b/AsbCloudApp/Repositories/IFileRepository.cs index 8967f08c..7ed4d574 100644 --- a/AsbCloudApp/Repositories/IFileRepository.cs +++ b/AsbCloudApp/Repositories/IFileRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Requests; +using AsbCloudApp.Requests; using AsbCloudApp.Data; using AsbCloudApp.Services; using System.Collections.Generic; diff --git a/AsbCloudApp/Repositories/IFileStorageRepository.cs b/AsbCloudApp/Repositories/IFileStorageRepository.cs index 1f511f31..22635e52 100644 --- a/AsbCloudApp/Repositories/IFileStorageRepository.cs +++ b/AsbCloudApp/Repositories/IFileStorageRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; using System.IO; using System.Threading; diff --git a/AsbCloudApp/Repositories/IGtrRepository.cs b/AsbCloudApp/Repositories/IGtrRepository.cs index 39fbef07..7ed3df25 100644 --- a/AsbCloudApp/Repositories/IGtrRepository.cs +++ b/AsbCloudApp/Repositories/IGtrRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.GTR; +using AsbCloudApp.Data.GTR; using System; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Repositories/IHelpPageRepository.cs b/AsbCloudApp/Repositories/IHelpPageRepository.cs index a9e5b8b3..7b5a38ea 100644 --- a/AsbCloudApp/Repositories/IHelpPageRepository.cs +++ b/AsbCloudApp/Repositories/IHelpPageRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Repositories/ILimitingParameterRepository.cs b/AsbCloudApp/Repositories/ILimitingParameterRepository.cs index e8d7198b..63706248 100644 --- a/AsbCloudApp/Repositories/ILimitingParameterRepository.cs +++ b/AsbCloudApp/Repositories/ILimitingParameterRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/AsbCloudApp/Repositories/IManualDirectoryRepository.cs b/AsbCloudApp/Repositories/IManualDirectoryRepository.cs index 0db9d90f..3c4bf8ee 100644 --- a/AsbCloudApp/Repositories/IManualDirectoryRepository.cs +++ b/AsbCloudApp/Repositories/IManualDirectoryRepository.cs @@ -11,27 +11,27 @@ namespace AsbCloudApp.Repositories; /// public interface IManualDirectoryRepository : ICrudRepository { - /// - /// Получение дерева директорий - /// - /// - /// - Task> GetTreeAsync(CancellationToken cancellationToken); + /// + /// Получение дерева директорий + /// + /// + /// + Task> GetTreeAsync(CancellationToken cancellationToken); - /// - /// Получение одной директории по параметрам - /// - /// - /// - /// - /// - Task GetOrDefaultAsync(string name, int? idParent, CancellationToken cancellationToken); + /// + /// Получение одной директории по параметрам + /// + /// + /// + /// + /// + Task GetOrDefaultAsync(string name, int? idParent, CancellationToken cancellationToken); - /// - /// Проверка директории на существование - /// - /// - /// - /// - Task IsExistsAsync(int id, CancellationToken cancellationToken); + /// + /// Проверка директории на существование + /// + /// + /// + /// + Task IsExistsAsync(int id, CancellationToken cancellationToken); } \ No newline at end of file diff --git a/AsbCloudApp/Repositories/INotificationRepository.cs b/AsbCloudApp/Repositories/INotificationRepository.cs index 74ab9dd9..ebb10271 100644 --- a/AsbCloudApp/Repositories/INotificationRepository.cs +++ b/AsbCloudApp/Repositories/INotificationRepository.cs @@ -12,50 +12,50 @@ namespace AsbCloudApp.Repositories; /// public interface INotificationRepository : ICrudRepository { - /// - /// Получение уведомлений по параметрам - /// - /// - /// - /// - /// - Task> GetNotificationsAsync(int idUser, - NotificationRequest request, - CancellationToken cancellationToken); + /// + /// Получение уведомлений по параметрам + /// + /// + /// + /// + /// + Task> GetNotificationsAsync(int idUser, + NotificationRequest request, + CancellationToken cancellationToken); - /// - /// Получение всех уведомлений - /// - /// - /// - /// - /// - /// - Task> GetAllAsync(int? idUser, bool? isSent, int? idTransportType, - CancellationToken cancellationToken); + /// + /// Получение всех уведомлений + /// + /// + /// + /// + /// + /// + Task> GetAllAsync(int? idUser, bool? isSent, int? idTransportType, + CancellationToken cancellationToken); - /// - /// Обновление уведомлений - /// - /// - /// - /// - Task UpdateRangeAsync(IEnumerable notifications, CancellationToken cancellationToken); - - /// - /// Удаление уведомлений по параметрам - /// - /// - /// - /// - Task DeleteAsync(NotificationDeleteRequest request, - CancellationToken cancellationToken); + /// + /// Обновление уведомлений + /// + /// + /// + /// + Task UpdateRangeAsync(IEnumerable notifications, CancellationToken cancellationToken); + + /// + /// Удаление уведомлений по параметрам + /// + /// + /// + /// + Task DeleteAsync(NotificationDeleteRequest request, + CancellationToken cancellationToken); /// /// Получение количества непрочтенных уведомлений /// /// - /// + /// /// /// Task GetUnreadCountAsync(int idUser, int idTransportType, CancellationToken cancellationToken); diff --git a/AsbCloudApp/Repositories/ITelemetryDataCache.cs b/AsbCloudApp/Repositories/ITelemetryDataCache.cs index f2fa41b0..0e4d83b1 100644 --- a/AsbCloudApp/Repositories/ITelemetryDataCache.cs +++ b/AsbCloudApp/Repositories/ITelemetryDataCache.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using AsbCloudInfrastructure.Services.SAUB; using System; diff --git a/AsbCloudApp/Repositories/ITelemetryWirelineRunOutRepository.cs b/AsbCloudApp/Repositories/ITelemetryWirelineRunOutRepository.cs index 194a00fe..3166a301 100644 --- a/AsbCloudApp/Repositories/ITelemetryWirelineRunOutRepository.cs +++ b/AsbCloudApp/Repositories/ITelemetryWirelineRunOutRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.SAUB; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Repositories/ITrajectoryEditableRepository.cs b/AsbCloudApp/Repositories/ITrajectoryEditableRepository.cs index f1bf0671..ff438112 100644 --- a/AsbCloudApp/Repositories/ITrajectoryEditableRepository.cs +++ b/AsbCloudApp/Repositories/ITrajectoryEditableRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Repositories/ITrajectoryNnbRepository.cs b/AsbCloudApp/Repositories/ITrajectoryNnbRepository.cs index cba8a707..2d3d89e0 100644 --- a/AsbCloudApp/Repositories/ITrajectoryNnbRepository.cs +++ b/AsbCloudApp/Repositories/ITrajectoryNnbRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Requests; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Repositories/ITrajectoryRepository.cs b/AsbCloudApp/Repositories/ITrajectoryRepository.cs index fb676d2d..0c51ec85 100644 --- a/AsbCloudApp/Repositories/ITrajectoryRepository.cs +++ b/AsbCloudApp/Repositories/ITrajectoryRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Repositories/IUserRepository.cs b/AsbCloudApp/Repositories/IUserRepository.cs index 1b4e86af..db6a32ea 100644 --- a/AsbCloudApp/Repositories/IUserRepository.cs +++ b/AsbCloudApp/Repositories/IUserRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.User; using AsbCloudApp.Services; using System.Collections.Generic; diff --git a/AsbCloudApp/Repositories/IUserRoleRepository.cs b/AsbCloudApp/Repositories/IUserRoleRepository.cs index 7fa59e62..b2ca7f4f 100644 --- a/AsbCloudApp/Repositories/IUserRoleRepository.cs +++ b/AsbCloudApp/Repositories/IUserRoleRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Services; +using AsbCloudApp.Services; using System.Collections.Generic; using System.Threading.Tasks; using System.Threading; diff --git a/AsbCloudApp/Repositories/IWellCompositeRepository.cs b/AsbCloudApp/Repositories/IWellCompositeRepository.cs index 148109f7..1023ba8d 100644 --- a/AsbCloudApp/Repositories/IWellCompositeRepository.cs +++ b/AsbCloudApp/Repositories/IWellCompositeRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.ProcessMaps; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Repositories/IWellFinalDocumentsRepository.cs b/AsbCloudApp/Repositories/IWellFinalDocumentsRepository.cs index 3f3ad72e..252c1e5b 100644 --- a/AsbCloudApp/Repositories/IWellFinalDocumentsRepository.cs +++ b/AsbCloudApp/Repositories/IWellFinalDocumentsRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.User; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Repositories/IWellOperationCategoryRepository.cs b/AsbCloudApp/Repositories/IWellOperationCategoryRepository.cs index 044dbd44..12d7995e 100644 --- a/AsbCloudApp/Repositories/IWellOperationCategoryRepository.cs +++ b/AsbCloudApp/Repositories/IWellOperationCategoryRepository.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using AsbCloudApp.Data.WellOperation; namespace AsbCloudApp.Repositories diff --git a/AsbCloudApp/Repositories/IWellOperationRepository.cs b/AsbCloudApp/Repositories/IWellOperationRepository.cs index 12246578..fcf31f00 100644 --- a/AsbCloudApp/Repositories/IWellOperationRepository.cs +++ b/AsbCloudApp/Repositories/IWellOperationRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.WellOperation; using AsbCloudApp.Requests; using System.Collections.Generic; diff --git a/AsbCloudApp/Repositories/IWellSectionPlanRepository.cs b/AsbCloudApp/Repositories/IWellSectionPlanRepository.cs index 972fac66..c836276e 100644 --- a/AsbCloudApp/Repositories/IWellSectionPlanRepository.cs +++ b/AsbCloudApp/Repositories/IWellSectionPlanRepository.cs @@ -12,11 +12,11 @@ namespace AsbCloudApp.Repositories; /// public interface IWellSectionPlanRepository : IRepositoryWellRelated { - /// - /// Получить типы секций - /// - /// - /// - /// - Task> GetWellSectionTypesAsync(int idWell, CancellationToken cancellationToken); + /// + /// Получить типы секций + /// + /// + /// + /// + Task> GetWellSectionTypesAsync(int idWell, CancellationToken cancellationToken); } \ No newline at end of file diff --git a/AsbCloudApp/Requests/ChangeLogRequest.cs b/AsbCloudApp/Requests/ChangeLogRequest.cs index 4af94018..bf1604aa 100644 --- a/AsbCloudApp/Requests/ChangeLogRequest.cs +++ b/AsbCloudApp/Requests/ChangeLogRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Requests; diff --git a/AsbCloudApp/Requests/DataSaubStatRequest.cs b/AsbCloudApp/Requests/DataSaubStatRequest.cs index a9bcbf7d..1fe186b5 100644 --- a/AsbCloudApp/Requests/DataSaubStatRequest.cs +++ b/AsbCloudApp/Requests/DataSaubStatRequest.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Requests { diff --git a/AsbCloudApp/Requests/DetectedOperationRequest.cs b/AsbCloudApp/Requests/DetectedOperationRequest.cs index 243d6e9f..f91c8b5d 100644 --- a/AsbCloudApp/Requests/DetectedOperationRequest.cs +++ b/AsbCloudApp/Requests/DetectedOperationRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudApp/Requests/ExportOptions/WellOperationExportRequest.cs b/AsbCloudApp/Requests/ExportOptions/WellOperationExportRequest.cs index facbba72..6456f8ca 100644 --- a/AsbCloudApp/Requests/ExportOptions/WellOperationExportRequest.cs +++ b/AsbCloudApp/Requests/ExportOptions/WellOperationExportRequest.cs @@ -5,16 +5,16 @@ namespace AsbCloudApp.Requests.ExportOptions; /// public class WellOperationExportRequest : WellRelatedExportRequest { - /// - public WellOperationExportRequest(int idWell, - int idType) - : base(idWell) - { - IdType = idType; - } + /// + public WellOperationExportRequest(int idWell, + int idType) + : base(idWell) + { + IdType = idType; + } - /// - /// Тип операций - /// - public int IdType { get; } + /// + /// Тип операций + /// + public int IdType { get; } } \ No newline at end of file diff --git a/AsbCloudApp/Requests/ExportOptions/WellRelatedExportRequest.cs b/AsbCloudApp/Requests/ExportOptions/WellRelatedExportRequest.cs index 63b185cd..7235a526 100644 --- a/AsbCloudApp/Requests/ExportOptions/WellRelatedExportRequest.cs +++ b/AsbCloudApp/Requests/ExportOptions/WellRelatedExportRequest.cs @@ -5,17 +5,17 @@ namespace AsbCloudApp.Requests.ExportOptions; /// public class WellRelatedExportRequest : IExportOptionsRequest { - /// - /// Конструктор - /// - /// Id скважины - public WellRelatedExportRequest(int idWell) - { - IdWell = idWell; - } - - /// - /// Id скважины - /// - public int IdWell { get; } + /// + /// Конструктор + /// + /// Id скважины + public WellRelatedExportRequest(int idWell) + { + IdWell = idWell; + } + + /// + /// Id скважины + /// + public int IdWell { get; } } \ No newline at end of file diff --git a/AsbCloudApp/Requests/FaqRequest.cs b/AsbCloudApp/Requests/FaqRequest.cs index c52631fa..3094d12c 100644 --- a/AsbCloudApp/Requests/FaqRequest.cs +++ b/AsbCloudApp/Requests/FaqRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; diff --git a/AsbCloudApp/Requests/FileRequest.cs b/AsbCloudApp/Requests/FileRequest.cs index 403c0655..d8b05364 100644 --- a/AsbCloudApp/Requests/FileRequest.cs +++ b/AsbCloudApp/Requests/FileRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Requests diff --git a/AsbCloudApp/Requests/GtrRequest.cs b/AsbCloudApp/Requests/GtrRequest.cs index 89d281a3..ab54f255 100644 --- a/AsbCloudApp/Requests/GtrRequest.cs +++ b/AsbCloudApp/Requests/GtrRequest.cs @@ -7,19 +7,19 @@ namespace AsbCloudApp.Requests; /// public class GtrRequest { - /// - /// Дата начала выборки.По умолчанию: текущее время - IntervalSec - /// - public DateTimeOffset? Begin { get; set; } + /// + /// Дата начала выборки.По умолчанию: текущее время - IntervalSec + /// + public DateTimeOffset? Begin { get; set; } - /// - /// Интервал времени даты начала выборки, секунды - /// - public int IntervalSec { get; set; } = 600; + /// + /// Интервал времени даты начала выборки, секунды + /// + public int IntervalSec { get; set; } = 600; - /// - /// Желаемое количество точек. Если в выборке точек будет больше, то выборка будет прорежена. - /// - [Obsolete] - public int ApproxPointsCount { get; set; } = 1024; + /// + /// Желаемое количество точек. Если в выборке точек будет больше, то выборка будет прорежена. + /// + [Obsolete] + public int ApproxPointsCount { get; set; } = 1024; } \ No newline at end of file diff --git a/AsbCloudApp/Requests/LimitingParameterRequest.cs b/AsbCloudApp/Requests/LimitingParameterRequest.cs index 4e1b5d98..6bf0b11d 100644 --- a/AsbCloudApp/Requests/LimitingParameterRequest.cs +++ b/AsbCloudApp/Requests/LimitingParameterRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Requests diff --git a/AsbCloudApp/Requests/MessageRequest.cs b/AsbCloudApp/Requests/MessageRequest.cs index a474c7b9..db814e82 100644 --- a/AsbCloudApp/Requests/MessageRequest.cs +++ b/AsbCloudApp/Requests/MessageRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; namespace AsbCloudApp.Requests diff --git a/AsbCloudApp/Requests/NotificationDeleteRequest.cs b/AsbCloudApp/Requests/NotificationDeleteRequest.cs index 56921d70..8955c844 100644 --- a/AsbCloudApp/Requests/NotificationDeleteRequest.cs +++ b/AsbCloudApp/Requests/NotificationDeleteRequest.cs @@ -7,18 +7,18 @@ namespace AsbCloudApp.Requests; /// public class NotificationDeleteRequest { - /// - /// Идентификатор категории - /// - public int? IdCategory { get; set; } - - /// - /// Меньше или равно дате отправки - /// - public DateTimeOffset? LtSentDate { get; set; } - - /// - /// Меньше или равно дате прочтения - /// - public DateTimeOffset? LtReadDate { get; set; } + /// + /// Идентификатор категории + /// + public int? IdCategory { get; set; } + + /// + /// Меньше или равно дате отправки + /// + public DateTimeOffset? LtSentDate { get; set; } + + /// + /// Меньше или равно дате прочтения + /// + public DateTimeOffset? LtReadDate { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Requests/NotificationRequest.cs b/AsbCloudApp/Requests/NotificationRequest.cs index 197b142a..2382db7b 100644 --- a/AsbCloudApp/Requests/NotificationRequest.cs +++ b/AsbCloudApp/Requests/NotificationRequest.cs @@ -5,13 +5,13 @@ namespace AsbCloudApp.Requests; /// public class NotificationRequest : RequestBase { - /// - /// Получение отправленных/не отправленных уведомлений - /// - public bool? IsSent { get; set; } = false; + /// + /// Получение отправленных/не отправленных уведомлений + /// + public bool? IsSent { get; set; } = false; - /// - /// Id типа доставки уведомления - /// - public int? IdTransportType { get; set; } + /// + /// Id типа доставки уведомления + /// + public int? IdTransportType { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Requests/NotifyRequest.cs b/AsbCloudApp/Requests/NotifyRequest.cs index fdd4a1e5..3f013ffe 100644 --- a/AsbCloudApp/Requests/NotifyRequest.cs +++ b/AsbCloudApp/Requests/NotifyRequest.cs @@ -7,34 +7,34 @@ namespace AsbCloudApp.Requests; /// public class NotifyRequest { - /// - /// Id получателя уведомления - /// - [Required] - public int IdUser { get; set; } + /// + /// Id получателя уведомления + /// + [Required] + public int IdUser { get; set; } - /// - /// Id категории уведомления. Допустимое значение параметра: 1 - /// - [Required] - [Range(minimum: 1, maximum: 1, ErrorMessage = "Id категории уведомления недоступно. Допустимые: 1")] - public int IdNotificationCategory { get; set; } + /// + /// Id категории уведомления. Допустимое значение параметра: 1 + /// + [Required] + [Range(minimum: 1, maximum: 1, ErrorMessage = "Id категории уведомления недоступно. Допустимые: 1")] + public int IdNotificationCategory { get; set; } - /// - /// Заголовок уведомления - /// - [Required] - public string Title { get; set; } = null!; + /// + /// Заголовок уведомления + /// + [Required] + public string Title { get; set; } = null!; - /// - /// Сообщение уведомления - /// - [Required] - public string Message { get; set; } = null!; - - /// - /// Id типа доставки уведомления. Допустимое значение: 0, 1 - /// - [Required] - public int IdTransportType { get; set; } + /// + /// Сообщение уведомления + /// + [Required] + public string Message { get; set; } = null!; + + /// + /// Id типа доставки уведомления. Допустимое значение: 0, 1 + /// + [Required] + public int IdTransportType { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Requests/OperationStatRequest.cs b/AsbCloudApp/Requests/OperationStatRequest.cs index ac6b50c4..c9a384e3 100644 --- a/AsbCloudApp/Requests/OperationStatRequest.cs +++ b/AsbCloudApp/Requests/OperationStatRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Requests { diff --git a/AsbCloudApp/Requests/ParserOptions/IParserOptionsRequest.cs b/AsbCloudApp/Requests/ParserOptions/IParserOptionsRequest.cs index b3b12f51..61205bc2 100644 --- a/AsbCloudApp/Requests/ParserOptions/IParserOptionsRequest.cs +++ b/AsbCloudApp/Requests/ParserOptions/IParserOptionsRequest.cs @@ -5,15 +5,15 @@ namespace AsbCloudApp.Requests.ParserOptions; /// public interface IParserOptionsRequest { - private static DummyOptions empty => new(); + private static DummyOptions empty => new(); - private class DummyOptions : IParserOptionsRequest - { - } + private class DummyOptions : IParserOptionsRequest + { + } - /// - /// Получение пустого объекта опций - /// - /// - public static IParserOptionsRequest Empty() => empty; + /// + /// Получение пустого объекта опций + /// + /// + public static IParserOptionsRequest Empty() => empty; } \ No newline at end of file diff --git a/AsbCloudApp/Requests/ParserOptions/WellOperationParserRequest.cs b/AsbCloudApp/Requests/ParserOptions/WellOperationParserRequest.cs index efb9aad2..db808a0f 100644 --- a/AsbCloudApp/Requests/ParserOptions/WellOperationParserRequest.cs +++ b/AsbCloudApp/Requests/ParserOptions/WellOperationParserRequest.cs @@ -7,23 +7,23 @@ namespace AsbCloudApp.Requests.ParserOptions; /// public class WellOperationParserRequest : WellRelatedParserRequest { - /// - public WellOperationParserRequest(int idWell, - int idType, - SimpleTimezoneDto wellTimezone) - : base(idWell) - { - IdType = idType; - WellTimezone = wellTimezone; - } + /// + public WellOperationParserRequest(int idWell, + int idType, + SimpleTimezoneDto wellTimezone) + : base(idWell) + { + IdType = idType; + WellTimezone = wellTimezone; + } - /// - /// Тип операции - /// - public int IdType { get; } - - /// - /// Часовой пояс в котором находится скважина - /// - public SimpleTimezoneDto WellTimezone { get; } + /// + /// Тип операции + /// + public int IdType { get; } + + /// + /// Часовой пояс в котором находится скважина + /// + public SimpleTimezoneDto WellTimezone { get; } } \ No newline at end of file diff --git a/AsbCloudApp/Requests/ParserOptions/WellRelatedParserRequest.cs b/AsbCloudApp/Requests/ParserOptions/WellRelatedParserRequest.cs index 3ffbf4d5..eccc8b28 100644 --- a/AsbCloudApp/Requests/ParserOptions/WellRelatedParserRequest.cs +++ b/AsbCloudApp/Requests/ParserOptions/WellRelatedParserRequest.cs @@ -5,17 +5,17 @@ namespace AsbCloudApp.Requests.ParserOptions; /// public class WellRelatedParserRequest : IParserOptionsRequest { - /// - /// Конструктор - /// - /// Id скважины - public WellRelatedParserRequest(int idWell) - { - IdWell = idWell; - } - - /// - /// Id скважины - /// - public int IdWell { get; } + /// + /// Конструктор + /// + /// Id скважины + public WellRelatedParserRequest(int idWell) + { + IdWell = idWell; + } + + /// + /// Id скважины + /// + public int IdWell { get; } } \ No newline at end of file diff --git a/AsbCloudApp/Requests/ProcessMapPlanBaseRequest.cs b/AsbCloudApp/Requests/ProcessMapPlanBaseRequest.cs index 2b4cd30d..9191d82d 100644 --- a/AsbCloudApp/Requests/ProcessMapPlanBaseRequest.cs +++ b/AsbCloudApp/Requests/ProcessMapPlanBaseRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudApp.Requests; diff --git a/AsbCloudApp/Requests/ReportParametersRequest.cs b/AsbCloudApp/Requests/ReportParametersRequest.cs index 74bc358a..0a9eb339 100644 --- a/AsbCloudApp/Requests/ReportParametersRequest.cs +++ b/AsbCloudApp/Requests/ReportParametersRequest.cs @@ -14,28 +14,28 @@ public class ReportParametersRequest: IValidatableObject /// [Range(1, 86400)] public int StepSeconds { get; set; } - - /// - /// формат отчета (0-PDF, 1-LAS) - /// - [Range(0, 1)] - public int Format { get; set; } + + /// + /// формат отчета (0-PDF, 1-LAS) + /// + [Range(0, 1)] + public int Format { get; set; } - /// - /// Дата начала интервала - /// - public DateTimeOffset Begin { get; set; } = default; + /// + /// Дата начала интервала + /// + public DateTimeOffset Begin { get; set; } = default; /// /// Дата окончания интервала /// public DateTimeOffset End { get; set; } = default; - /// + /// public IEnumerable Validate(ValidationContext validationContext) { - if (End < Begin) - yield return new("End mast be less then begin"); + if (End < Begin) + yield return new("End mast be less then begin"); if (Begin < new DateTimeOffset(2000, 1, 1, 0, 0, 0, TimeSpan.Zero)) yield return new("Begin mast be > 2000-1-1"); diff --git a/AsbCloudApp/Requests/RequestBase.cs b/AsbCloudApp/Requests/RequestBase.cs index c5d70a68..3f045fd5 100644 --- a/AsbCloudApp/Requests/RequestBase.cs +++ b/AsbCloudApp/Requests/RequestBase.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace AsbCloudApp.Requests { diff --git a/AsbCloudApp/Requests/SubsystemRequest.cs b/AsbCloudApp/Requests/SubsystemRequest.cs index 08b980ab..f427dcec 100644 --- a/AsbCloudApp/Requests/SubsystemRequest.cs +++ b/AsbCloudApp/Requests/SubsystemRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudApp/Requests/TelemetryRequest.cs b/AsbCloudApp/Requests/TelemetryRequest.cs index 66b43cb5..732d8075 100644 --- a/AsbCloudApp/Requests/TelemetryRequest.cs +++ b/AsbCloudApp/Requests/TelemetryRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; namespace AsbCloudApp.Requests; diff --git a/AsbCloudApp/Requests/TrajectoryRequest.cs b/AsbCloudApp/Requests/TrajectoryRequest.cs index 35eca8c3..0d86c56a 100644 --- a/AsbCloudApp/Requests/TrajectoryRequest.cs +++ b/AsbCloudApp/Requests/TrajectoryRequest.cs @@ -7,18 +7,18 @@ namespace AsbCloudApp.Requests; /// public class TrajectoryRequest : RequestBase { - /// - /// Идентификатор скважины - /// - public int IdWell { get; set; } - - /// - /// Больше или равно дате - /// - public DateTimeOffset? GeDate { get; set; } - - /// - /// Меньше или равно дате - /// - public DateTimeOffset? LeDate { get; set; } + /// + /// Идентификатор скважины + /// + public int IdWell { get; set; } + + /// + /// Больше или равно дате + /// + public DateTimeOffset? GeDate { get; set; } + + /// + /// Меньше или равно дате + /// + public DateTimeOffset? LeDate { get; set; } } \ No newline at end of file diff --git a/AsbCloudApp/Requests/WellOperationRequest.cs b/AsbCloudApp/Requests/WellOperationRequest.cs index fa866378..f80f4544 100644 --- a/AsbCloudApp/Requests/WellOperationRequest.cs +++ b/AsbCloudApp/Requests/WellOperationRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudApp/Requests/WellRequest.cs b/AsbCloudApp/Requests/WellRequest.cs index 3f5195d0..8be9dee8 100644 --- a/AsbCloudApp/Requests/WellRequest.cs +++ b/AsbCloudApp/Requests/WellRequest.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace AsbCloudApp.Requests { diff --git a/AsbCloudApp/Services/DailyReport/IDailyReportExportService.cs b/AsbCloudApp/Services/DailyReport/IDailyReportExportService.cs index eb09874a..f7329471 100644 --- a/AsbCloudApp/Services/DailyReport/IDailyReportExportService.cs +++ b/AsbCloudApp/Services/DailyReport/IDailyReportExportService.cs @@ -10,12 +10,12 @@ namespace AsbCloudApp.Services.DailyReport; /// public interface IDailyReportExportService { - /// - /// Экспортировать - /// - /// - /// - /// - /// - Task<(string FileName, Stream File)> ExportAsync(int idWell, DateOnly dailyReportDate, CancellationToken cancellationToken); + /// + /// Экспортировать + /// + /// + /// + /// + /// + Task<(string FileName, Stream File)> ExportAsync(int idWell, DateOnly dailyReportDate, CancellationToken cancellationToken); } \ No newline at end of file diff --git a/AsbCloudApp/Services/DailyReport/IDailyReportService.cs b/AsbCloudApp/Services/DailyReport/IDailyReportService.cs index b39375a6..d23759d0 100644 --- a/AsbCloudApp/Services/DailyReport/IDailyReportService.cs +++ b/AsbCloudApp/Services/DailyReport/IDailyReportService.cs @@ -12,34 +12,34 @@ namespace AsbCloudApp.Services.DailyReport; /// public interface IDailyReportService { - /// - /// Обновить или создать суточный отчёт - /// - /// - /// - /// - /// - /// - /// - Task UpdateOrInsertAsync(int idWell, DateOnly dateDailyReport, int idUser, TBlock editableBlock, - CancellationToken cancellationToken) - where TBlock : ItemInfoDto; + /// + /// Обновить или создать суточный отчёт + /// + /// + /// + /// + /// + /// + /// + Task UpdateOrInsertAsync(int idWell, DateOnly dateDailyReport, int idUser, TBlock editableBlock, + CancellationToken cancellationToken) + where TBlock : ItemInfoDto; - /// - /// Получить сформированный суточный отчёт - /// - /// - /// - /// - /// - Task GetAsync(int idWell, DateOnly dateDailyReport, CancellationToken cancellationToken); + /// + /// Получить сформированный суточный отчёт + /// + /// + /// + /// + /// + Task GetAsync(int idWell, DateOnly dateDailyReport, CancellationToken cancellationToken); - /// - /// Получить список суточных отчётов по скважине - /// - /// - /// - /// - /// - Task> GetAsync(int idWell, FileReportRequest request, CancellationToken cancellationToken); + /// + /// Получить список суточных отчётов по скважине + /// + /// + /// + /// + /// + Task> GetAsync(int idWell, FileReportRequest request, CancellationToken cancellationToken); } \ No newline at end of file diff --git a/AsbCloudApp/Services/Export/IExportService.cs b/AsbCloudApp/Services/Export/IExportService.cs index ddfd50f9..332da86f 100644 --- a/AsbCloudApp/Services/Export/IExportService.cs +++ b/AsbCloudApp/Services/Export/IExportService.cs @@ -9,15 +9,15 @@ namespace AsbCloudApp.Services.Export; /// Экспорт данных /// public interface IExportService : IExportService - where TOptions : IExportOptionsRequest + where TOptions : IExportOptionsRequest { - /// - /// Экспортировать данные - /// - /// - /// - /// - Task<(string FileName, Stream File)> ExportAsync(TOptions options, CancellationToken token); + /// + /// Экспортировать данные + /// + /// + /// + /// + Task<(string FileName, Stream File)> ExportAsync(TOptions options, CancellationToken token); } /// @@ -25,5 +25,5 @@ public interface IExportService : IExportService /// public interface IExportService { - + } \ No newline at end of file diff --git a/AsbCloudApp/Services/Export/IExportServiceFactory.cs b/AsbCloudApp/Services/Export/IExportServiceFactory.cs index fb6b5fc9..d482b769 100644 --- a/AsbCloudApp/Services/Export/IExportServiceFactory.cs +++ b/AsbCloudApp/Services/Export/IExportServiceFactory.cs @@ -7,14 +7,14 @@ namespace AsbCloudApp.Services.Export; /// /// public interface IExportServiceFactory - where TId : struct + where TId : struct { - /// - /// Создать сервис экспорта - /// - /// - /// - /// - IExportService CreateExportService(TId id) - where TOptions : IExportOptionsRequest; + /// + /// Создать сервис экспорта + /// + /// + /// + /// + IExportService CreateExportService(TId id) + where TOptions : IExportOptionsRequest; } \ No newline at end of file diff --git a/AsbCloudApp/Services/FileService.cs b/AsbCloudApp/Services/FileService.cs index 0513881b..6065d310 100644 --- a/AsbCloudApp/Services/FileService.cs +++ b/AsbCloudApp/Services/FileService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using System.Collections.Generic; diff --git a/AsbCloudApp/Services/IAuthService.cs b/AsbCloudApp/Services/IAuthService.cs index 00bbae86..ac470f73 100644 --- a/AsbCloudApp/Services/IAuthService.cs +++ b/AsbCloudApp/Services/IAuthService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.User; +using AsbCloudApp.Data.User; using System.Security.Claims; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/ICrudRepository.cs b/AsbCloudApp/Services/ICrudRepository.cs index 55cfad99..b4ab2459 100644 --- a/AsbCloudApp/Services/ICrudRepository.cs +++ b/AsbCloudApp/Services/ICrudRepository.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/IDetectedOperationService.cs b/AsbCloudApp/Services/IDetectedOperationService.cs index 262b193f..ac7d650c 100644 --- a/AsbCloudApp/Services/IDetectedOperationService.cs +++ b/AsbCloudApp/Services/IDetectedOperationService.cs @@ -1,4 +1,4 @@ -using System; +using System; using AsbCloudApp.Data.DetectedOperation; using AsbCloudApp.Requests; using System.Collections.Generic; diff --git a/AsbCloudApp/Services/IDrillParamsService.cs b/AsbCloudApp/Services/IDrillParamsService.cs index edb5067f..c40ecf59 100644 --- a/AsbCloudApp/Services/IDrillParamsService.cs +++ b/AsbCloudApp/Services/IDrillParamsService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/IDrillTestReportService.cs b/AsbCloudApp/Services/IDrillTestReportService.cs index 6dd97b83..f13f0aa2 100644 --- a/AsbCloudApp/Services/IDrillTestReportService.cs +++ b/AsbCloudApp/Services/IDrillTestReportService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.DrillTestReport; using AsbCloudApp.Requests; using System.IO; diff --git a/AsbCloudApp/Services/IDrillingProgramService.cs b/AsbCloudApp/Services/IDrillingProgramService.cs index fb1e45f2..f8742ac5 100644 --- a/AsbCloudApp/Services/IDrillingProgramService.cs +++ b/AsbCloudApp/Services/IDrillingProgramService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.User; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Services/IEventService.cs b/AsbCloudApp/Services/IEventService.cs index 4adf287c..8efb1b2c 100644 --- a/AsbCloudApp/Services/IEventService.cs +++ b/AsbCloudApp/Services/IEventService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/IFileCategoryService.cs b/AsbCloudApp/Services/IFileCategoryService.cs index f660d0fa..bc00acea 100644 --- a/AsbCloudApp/Services/IFileCategoryService.cs +++ b/AsbCloudApp/Services/IFileCategoryService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/IHelpPageService.cs b/AsbCloudApp/Services/IHelpPageService.cs index 4fd675d7..f929ea05 100644 --- a/AsbCloudApp/Services/IHelpPageService.cs +++ b/AsbCloudApp/Services/IHelpPageService.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/ILimitingParameterService.cs b/AsbCloudApp/Services/ILimitingParameterService.cs index 670448e5..1424e392 100644 --- a/AsbCloudApp/Services/ILimitingParameterService.cs +++ b/AsbCloudApp/Services/ILimitingParameterService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Services/IManualCatalogService.cs b/AsbCloudApp/Services/IManualCatalogService.cs index a38bd49b..4a488211 100644 --- a/AsbCloudApp/Services/IManualCatalogService.cs +++ b/AsbCloudApp/Services/IManualCatalogService.cs @@ -9,56 +9,56 @@ namespace AsbCloudApp.Services; /// public interface IManualCatalogService { - /// - /// Сохранение файла - /// - /// - /// - /// - /// - /// - /// - Task SaveFileAsync(int idDirectory, int idAuthor, string name, Stream stream, CancellationToken cancellationToken); + /// + /// Сохранение файла + /// + /// + /// + /// + /// + /// + /// + Task SaveFileAsync(int idDirectory, int idAuthor, string name, Stream stream, CancellationToken cancellationToken); - /// - /// Добавление директории - /// - /// - /// - /// - /// - Task AddDirectoryAsync(string name, int? idParent, CancellationToken cancellationToken); + /// + /// Добавление директории + /// + /// + /// + /// + /// + Task AddDirectoryAsync(string name, int? idParent, CancellationToken cancellationToken); - /// - /// Обновление директории - /// - /// - /// - /// - /// - Task UpdateDirectoryAsync(int id, string name, CancellationToken cancellationToken); + /// + /// Обновление директории + /// + /// + /// + /// + /// + Task UpdateDirectoryAsync(int id, string name, CancellationToken cancellationToken); - /// - /// Удаление директории - /// - /// - /// - /// - Task DeleteDirectoryAsync(int id, CancellationToken cancellationToken); + /// + /// Удаление директории + /// + /// + /// + /// + Task DeleteDirectoryAsync(int id, CancellationToken cancellationToken); - /// - /// Удаление файла - /// - /// - /// - /// - Task DeleteFileAsync(int id, CancellationToken cancellationToken); + /// + /// Удаление файла + /// + /// + /// + /// + Task DeleteFileAsync(int id, CancellationToken cancellationToken); - /// - /// Получение файла - /// - /// - /// - /// - Task<(Stream stream, string fileName)?> GetFileAsync(int id, CancellationToken cancellationToken); + /// + /// Получение файла + /// + /// + /// + /// + Task<(Stream stream, string fileName)?> GetFileAsync(int id, CancellationToken cancellationToken); } \ No newline at end of file diff --git a/AsbCloudApp/Services/IMeasureService.cs b/AsbCloudApp/Services/IMeasureService.cs index ceb99ce1..e3b89111 100644 --- a/AsbCloudApp/Services/IMeasureService.cs +++ b/AsbCloudApp/Services/IMeasureService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/IMessageService.cs b/AsbCloudApp/Services/IMessageService.cs index 68592619..a461b3e8 100644 --- a/AsbCloudApp/Services/IMessageService.cs +++ b/AsbCloudApp/Services/IMessageService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.SAUB; using AsbCloudApp.Requests; using System.Collections.Generic; diff --git a/AsbCloudApp/Services/IOperationsStatService.cs b/AsbCloudApp/Services/IOperationsStatService.cs index f5ec7c7c..1f9ed6a6 100644 --- a/AsbCloudApp/Services/IOperationsStatService.cs +++ b/AsbCloudApp/Services/IOperationsStatService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/IReduceSamplingService.cs b/AsbCloudApp/Services/IReduceSamplingService.cs index ce4d491d..eb7dacf5 100644 --- a/AsbCloudApp/Services/IReduceSamplingService.cs +++ b/AsbCloudApp/Services/IReduceSamplingService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; namespace AsbCloudApp.Services diff --git a/AsbCloudApp/Services/IReportService.cs b/AsbCloudApp/Services/IReportService.cs index 4b259240..19c0d70b 100644 --- a/AsbCloudApp/Services/IReportService.cs +++ b/AsbCloudApp/Services/IReportService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.Progress; using AsbCloudApp.Requests; using System; diff --git a/AsbCloudApp/Services/IRepositoryWellRelated.cs b/AsbCloudApp/Services/IRepositoryWellRelated.cs index 9c771657..ac98cfd1 100644 --- a/AsbCloudApp/Services/IRepositoryWellRelated.cs +++ b/AsbCloudApp/Services/IRepositoryWellRelated.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/IRequestTracker.cs b/AsbCloudApp/Services/IRequestTracker.cs index b83d5146..efaf6048 100644 --- a/AsbCloudApp/Services/IRequestTracker.cs +++ b/AsbCloudApp/Services/IRequestTracker.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System; using System.Collections.Generic; diff --git a/AsbCloudApp/Services/IScheduleReportService.cs b/AsbCloudApp/Services/IScheduleReportService.cs index 8b6ebcce..5c7e535f 100644 --- a/AsbCloudApp/Services/IScheduleReportService.cs +++ b/AsbCloudApp/Services/IScheduleReportService.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/IScheduleService.cs b/AsbCloudApp/Services/IScheduleService.cs index 81c0d385..8181ba59 100644 --- a/AsbCloudApp/Services/IScheduleService.cs +++ b/AsbCloudApp/Services/IScheduleService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Services/ISetpointsService.cs b/AsbCloudApp/Services/ISetpointsService.cs index cd80feef..59936e85 100644 --- a/AsbCloudApp/Services/ISetpointsService.cs +++ b/AsbCloudApp/Services/ISetpointsService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/ISlipsStatService.cs b/AsbCloudApp/Services/ISlipsStatService.cs index 55dd0c0a..c2b2aa98 100644 --- a/AsbCloudApp/Services/ISlipsStatService.cs +++ b/AsbCloudApp/Services/ISlipsStatService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using System; using System.Collections.Generic; diff --git a/AsbCloudApp/Services/ISubsystemService.cs b/AsbCloudApp/Services/ISubsystemService.cs index b82563f8..9a14b01e 100644 --- a/AsbCloudApp/Services/ISubsystemService.cs +++ b/AsbCloudApp/Services/ISubsystemService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Subsystems; +using AsbCloudApp.Data.Subsystems; using AsbCloudApp.Requests; using System; using System.Collections.Generic; @@ -13,28 +13,28 @@ namespace AsbCloudApp.Services; /// public interface ISubsystemService { - /// - /// Статистика о наработке подсистем - /// - /// - /// - /// - Task> GetStatAsync(SubsystemRequest request, CancellationToken token); - - /// - /// Получение статистики по наработке подсистем по активным скважинам - /// - /// - /// - /// - Task> GetStatByActiveWells(IEnumerable wellIds, CancellationToken token); + /// + /// Статистика о наработке подсистем + /// + /// + /// + /// + Task> GetStatAsync(SubsystemRequest request, CancellationToken token); + + /// + /// Получение статистики по наработке подсистем по активным скважинам + /// + /// + /// + /// + Task> GetStatByActiveWells(IEnumerable wellIds, CancellationToken token); - /// - /// Получение статистики по бурильщику - /// - /// - /// - /// - Task> GetByWellsAsync(GetStatRequest request, - CancellationToken token); + /// + /// Получение статистики по бурильщику + /// + /// + /// + /// + Task> GetByWellsAsync(GetStatRequest request, + CancellationToken token); } \ No newline at end of file diff --git a/AsbCloudApp/Services/ITelemetryDataSaubService.cs b/AsbCloudApp/Services/ITelemetryDataSaubService.cs index e13240c0..e9f2d1ac 100644 --- a/AsbCloudApp/Services/ITelemetryDataSaubService.cs +++ b/AsbCloudApp/Services/ITelemetryDataSaubService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using System; using System.Collections.Generic; using System.IO; diff --git a/AsbCloudApp/Services/ITelemetryDataService.cs b/AsbCloudApp/Services/ITelemetryDataService.cs index 9cf4a805..6b42c490 100644 --- a/AsbCloudApp/Services/ITelemetryDataService.cs +++ b/AsbCloudApp/Services/ITelemetryDataService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using System; using System.Collections.Generic; diff --git a/AsbCloudApp/Services/ITelemetryService.cs b/AsbCloudApp/Services/ITelemetryService.cs index a981be33..49b28388 100644 --- a/AsbCloudApp/Services/ITelemetryService.cs +++ b/AsbCloudApp/Services/ITelemetryService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.SAUB; using System; using System.Collections.Generic; diff --git a/AsbCloudApp/Services/ITelemetryUserService.cs b/AsbCloudApp/Services/ITelemetryUserService.cs index 2b9204ab..8635f666 100644 --- a/AsbCloudApp/Services/ITelemetryUserService.cs +++ b/AsbCloudApp/Services/ITelemetryUserService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using System; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Services/ITimeZoneService.cs b/AsbCloudApp/Services/ITimeZoneService.cs index 55e18a6a..06993884 100644 --- a/AsbCloudApp/Services/ITimeZoneService.cs +++ b/AsbCloudApp/Services/ITimeZoneService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/IUserSettingsRepository.cs b/AsbCloudApp/Services/IUserSettingsRepository.cs index 3093eaa4..63605d4b 100644 --- a/AsbCloudApp/Services/IUserSettingsRepository.cs +++ b/AsbCloudApp/Services/IUserSettingsRepository.cs @@ -1,4 +1,4 @@ -using System.Threading; +using System.Threading; using System.Threading.Tasks; namespace AsbCloudApp.Services diff --git a/AsbCloudApp/Services/IWellCompositeOperationService.cs b/AsbCloudApp/Services/IWellCompositeOperationService.cs index f1af9865..98be1494 100644 --- a/AsbCloudApp/Services/IWellCompositeOperationService.cs +++ b/AsbCloudApp/Services/IWellCompositeOperationService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudApp/Services/IWellContactService.cs b/AsbCloudApp/Services/IWellContactService.cs index 2c4026e1..4868e3b2 100644 --- a/AsbCloudApp/Services/IWellContactService.cs +++ b/AsbCloudApp/Services/IWellContactService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.User; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Services/IWellFinalDocumentsService.cs b/AsbCloudApp/Services/IWellFinalDocumentsService.cs index 8169b890..06daee1e 100644 --- a/AsbCloudApp/Services/IWellFinalDocumentsService.cs +++ b/AsbCloudApp/Services/IWellFinalDocumentsService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System.Collections.Generic; using System.IO; using System.Threading; diff --git a/AsbCloudApp/Services/IWellService.cs b/AsbCloudApp/Services/IWellService.cs index 4279f587..2decf61b 100644 --- a/AsbCloudApp/Services/IWellService.cs +++ b/AsbCloudApp/Services/IWellService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using System; using System.Collections.Generic; diff --git a/AsbCloudApp/Services/IWitsRepository.cs b/AsbCloudApp/Services/IWitsRepository.cs index 71c7c3a2..e9a81278 100644 --- a/AsbCloudApp/Services/IWitsRepository.cs +++ b/AsbCloudApp/Services/IWitsRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudApp/Services/Notifications/INotificationTransportService.cs b/AsbCloudApp/Services/Notifications/INotificationTransportService.cs index a18f4246..aca408e8 100644 --- a/AsbCloudApp/Services/Notifications/INotificationTransportService.cs +++ b/AsbCloudApp/Services/Notifications/INotificationTransportService.cs @@ -10,26 +10,26 @@ namespace AsbCloudApp.Services.Notifications; /// public interface INotificationTransportService { - /// - /// Id типа доставки уведомления - /// - int IdTransportType { get; } - - /// - /// Отправка одного уведомления - /// - /// - /// - /// - Task SendAsync(NotificationDto notification, - CancellationToken cancellationToken); + /// + /// Id типа доставки уведомления + /// + int IdTransportType { get; } + + /// + /// Отправка одного уведомления + /// + /// + /// + /// + Task SendAsync(NotificationDto notification, + CancellationToken cancellationToken); - /// - /// Отправка нескольких уведомлений - /// - /// - /// - /// - Task SendRangeAsync(IEnumerable notifications, - CancellationToken cancellationToken); + /// + /// Отправка нескольких уведомлений + /// + /// + /// + /// + Task SendRangeAsync(IEnumerable notifications, + CancellationToken cancellationToken); } \ No newline at end of file diff --git a/AsbCloudApp/Services/Parsers/IParserFactory.cs b/AsbCloudApp/Services/Parsers/IParserFactory.cs index e0fc1aa2..02f5e64c 100644 --- a/AsbCloudApp/Services/Parsers/IParserFactory.cs +++ b/AsbCloudApp/Services/Parsers/IParserFactory.cs @@ -9,15 +9,15 @@ namespace AsbCloudApp.Services.Parsers; /// /// public interface IParserFactory - where TId : struct - where TDto : class, IId + where TId : struct + where TDto : class, IId { - /// - /// Создать парсер - /// - /// - /// - /// - IParserService CreateParser(TId id) - where TOptions : IParserOptionsRequest; + /// + /// Создать парсер + /// + /// + /// + /// + IParserService CreateParser(TId id) + where TOptions : IParserOptionsRequest; } \ No newline at end of file diff --git a/AsbCloudApp/Services/Parsers/IParserService.cs b/AsbCloudApp/Services/Parsers/IParserService.cs index 672c9e2b..57460ef5 100644 --- a/AsbCloudApp/Services/Parsers/IParserService.cs +++ b/AsbCloudApp/Services/Parsers/IParserService.cs @@ -10,22 +10,22 @@ namespace AsbCloudApp.Services.Parsers; /// /// public interface IParserService : IParserService - where TDto : class, IId - where TOptions : IParserOptionsRequest + where TDto : class, IId + where TOptions : IParserOptionsRequest { - /// - /// Распарсить файл - /// - /// - /// - /// - ParserResultDto Parse(Stream file, TOptions options); + /// + /// Распарсить файл + /// + /// + /// + /// + ParserResultDto Parse(Stream file, TOptions options); - /// - /// Получение шаблона для заполнения - /// - /// - Stream GetTemplateFile(); + /// + /// Получение шаблона для заполнения + /// + /// + Stream GetTemplateFile(); } /// diff --git a/AsbCloudApp/Services/ProcessMaps/WellDrilling/IProcessMapReportDrillingExportService.cs b/AsbCloudApp/Services/ProcessMaps/WellDrilling/IProcessMapReportDrillingExportService.cs index 8d09e153..d0d0fc32 100644 --- a/AsbCloudApp/Services/ProcessMaps/WellDrilling/IProcessMapReportDrillingExportService.cs +++ b/AsbCloudApp/Services/ProcessMaps/WellDrilling/IProcessMapReportDrillingExportService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Requests; +using AsbCloudApp.Requests; using System; using System.Collections.Generic; using System.IO; diff --git a/AsbCloudApp/Services/ProcessMaps/WellDrilling/IProcessMapReportDrillingService.cs b/AsbCloudApp/Services/ProcessMaps/WellDrilling/IProcessMapReportDrillingService.cs index 33aa8f44..2f484ba3 100644 --- a/AsbCloudApp/Services/ProcessMaps/WellDrilling/IProcessMapReportDrillingService.cs +++ b/AsbCloudApp/Services/ProcessMaps/WellDrilling/IProcessMapReportDrillingService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Report; +using AsbCloudApp.Data.ProcessMaps.Report; using AsbCloudApp.Requests; using System.Collections.Generic; using System.Threading; diff --git a/AsbCloudDb/EFExtensions.cs b/AsbCloudDb/EFExtensions.cs index 8829462a..7df62c52 100644 --- a/AsbCloudDb/EFExtensions.cs +++ b/AsbCloudDb/EFExtensions.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.Metadata; using System; diff --git a/AsbCloudDb/EFExtensionsExceptionHandling.cs b/AsbCloudDb/EFExtensionsExceptionHandling.cs index aa1996b5..431e3b3c 100644 --- a/AsbCloudDb/EFExtensionsExceptionHandling.cs +++ b/AsbCloudDb/EFExtensionsExceptionHandling.cs @@ -1,4 +1,4 @@ -using AsbCloudDb.Model; +using AsbCloudDb.Model; using Microsoft.EntityFrameworkCore; using Npgsql; using System; diff --git a/AsbCloudDb/EFExtensionsInitialization.cs b/AsbCloudDb/EFExtensionsInitialization.cs index b2f41aff..56e21103 100644 --- a/AsbCloudDb/EFExtensionsInitialization.cs +++ b/AsbCloudDb/EFExtensionsInitialization.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.Linq; using Microsoft.EntityFrameworkCore.Infrastructure; diff --git a/AsbCloudDb/EFExtensionsSortBy.cs b/AsbCloudDb/EFExtensionsSortBy.cs index 933281c7..797daaf2 100644 --- a/AsbCloudDb/EFExtensionsSortBy.cs +++ b/AsbCloudDb/EFExtensionsSortBy.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; diff --git a/AsbCloudDb/Migrations/20221013040242_Delete_colums_table_t_telemetry_data_spin.Designer.cs b/AsbCloudDb/Migrations/20221013040242_Delete_colums_table_t_telemetry_data_spin.Designer.cs index d42e6b13..25381927 100644 --- a/AsbCloudDb/Migrations/20221013040242_Delete_colums_table_t_telemetry_data_spin.Designer.cs +++ b/AsbCloudDb/Migrations/20221013040242_Delete_colums_table_t_telemetry_data_spin.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221013040242_Delete_colums_table_t_telemetry_data_spin.cs b/AsbCloudDb/Migrations/20221013040242_Delete_colums_table_t_telemetry_data_spin.cs index 0ebf1f57..da06c056 100644 --- a/AsbCloudDb/Migrations/20221013040242_Delete_colums_table_t_telemetry_data_spin.cs +++ b/AsbCloudDb/Migrations/20221013040242_Delete_colums_table_t_telemetry_data_spin.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221109104346_AddTable_t_limiting_parameter.Designer.cs b/AsbCloudDb/Migrations/20221109104346_AddTable_t_limiting_parameter.Designer.cs index 7fda59c5..8d6d371b 100644 --- a/AsbCloudDb/Migrations/20221109104346_AddTable_t_limiting_parameter.Designer.cs +++ b/AsbCloudDb/Migrations/20221109104346_AddTable_t_limiting_parameter.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221109104346_AddTable_t_limiting_parameter.cs b/AsbCloudDb/Migrations/20221109104346_AddTable_t_limiting_parameter.cs index ac1134e8..168422b0 100644 --- a/AsbCloudDb/Migrations/20221109104346_AddTable_t_limiting_parameter.cs +++ b/AsbCloudDb/Migrations/20221109104346_AddTable_t_limiting_parameter.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20221123052925_UpdateTable_t_limiting_parameter.Designer.cs b/AsbCloudDb/Migrations/20221123052925_UpdateTable_t_limiting_parameter.Designer.cs index 2d271e8c..7dd399a9 100644 --- a/AsbCloudDb/Migrations/20221123052925_UpdateTable_t_limiting_parameter.Designer.cs +++ b/AsbCloudDb/Migrations/20221123052925_UpdateTable_t_limiting_parameter.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221123052925_UpdateTable_t_limiting_parameter.cs b/AsbCloudDb/Migrations/20221123052925_UpdateTable_t_limiting_parameter.cs index c2a61c44..ce71bcc3 100644 --- a/AsbCloudDb/Migrations/20221123052925_UpdateTable_t_limiting_parameter.cs +++ b/AsbCloudDb/Migrations/20221123052925_UpdateTable_t_limiting_parameter.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221202040010_RemoveTable_t_drill_params.Designer.cs b/AsbCloudDb/Migrations/20221202040010_RemoveTable_t_drill_params.Designer.cs index b4bf4f7b..48d8ec34 100644 --- a/AsbCloudDb/Migrations/20221202040010_RemoveTable_t_drill_params.Designer.cs +++ b/AsbCloudDb/Migrations/20221202040010_RemoveTable_t_drill_params.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221202040010_RemoveTable_t_drill_params.cs b/AsbCloudDb/Migrations/20221202040010_RemoveTable_t_drill_params.cs index 2c715ced..82569ead 100644 --- a/AsbCloudDb/Migrations/20221202040010_RemoveTable_t_drill_params.cs +++ b/AsbCloudDb/Migrations/20221202040010_RemoveTable_t_drill_params.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/AsbCloudDb/Migrations/20221202184302_WellOperationCategory_editDBmodel.Designer.cs b/AsbCloudDb/Migrations/20221202184302_WellOperationCategory_editDBmodel.Designer.cs index a007475e..ca13f50d 100644 --- a/AsbCloudDb/Migrations/20221202184302_WellOperationCategory_editDBmodel.Designer.cs +++ b/AsbCloudDb/Migrations/20221202184302_WellOperationCategory_editDBmodel.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221202184302_WellOperationCategory_editDBmodel.cs b/AsbCloudDb/Migrations/20221202184302_WellOperationCategory_editDBmodel.cs index 04072bd5..f4ae27d4 100644 --- a/AsbCloudDb/Migrations/20221202184302_WellOperationCategory_editDBmodel.cs +++ b/AsbCloudDb/Migrations/20221202184302_WellOperationCategory_editDBmodel.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221202190521_WellOperationCategory_editDefaultData.Designer.cs b/AsbCloudDb/Migrations/20221202190521_WellOperationCategory_editDefaultData.Designer.cs index 3739e67c..b9819642 100644 --- a/AsbCloudDb/Migrations/20221202190521_WellOperationCategory_editDefaultData.Designer.cs +++ b/AsbCloudDb/Migrations/20221202190521_WellOperationCategory_editDefaultData.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221202190521_WellOperationCategory_editDefaultData.cs b/AsbCloudDb/Migrations/20221202190521_WellOperationCategory_editDefaultData.cs index 41146bc1..5096ae56 100644 --- a/AsbCloudDb/Migrations/20221202190521_WellOperationCategory_editDefaultData.cs +++ b/AsbCloudDb/Migrations/20221202190521_WellOperationCategory_editDefaultData.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221202193616_WellOperation_Manual_updateIdCategory.Designer.cs b/AsbCloudDb/Migrations/20221202193616_WellOperation_Manual_updateIdCategory.Designer.cs index c3eded8f..2848cf4e 100644 --- a/AsbCloudDb/Migrations/20221202193616_WellOperation_Manual_updateIdCategory.Designer.cs +++ b/AsbCloudDb/Migrations/20221202193616_WellOperation_Manual_updateIdCategory.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221202193616_WellOperation_Manual_updateIdCategory.cs b/AsbCloudDb/Migrations/20221202193616_WellOperation_Manual_updateIdCategory.cs index 4cde82fa..32ef435d 100644 --- a/AsbCloudDb/Migrations/20221202193616_WellOperation_Manual_updateIdCategory.cs +++ b/AsbCloudDb/Migrations/20221202193616_WellOperation_Manual_updateIdCategory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221202195803_delete_old_WellOperationCategory.Designer.cs b/AsbCloudDb/Migrations/20221202195803_delete_old_WellOperationCategory.Designer.cs index fa9f7959..1ea59044 100644 --- a/AsbCloudDb/Migrations/20221202195803_delete_old_WellOperationCategory.Designer.cs +++ b/AsbCloudDb/Migrations/20221202195803_delete_old_WellOperationCategory.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221202195803_delete_old_WellOperationCategory.cs b/AsbCloudDb/Migrations/20221202195803_delete_old_WellOperationCategory.cs index 2d0f5b65..ed344951 100644 --- a/AsbCloudDb/Migrations/20221202195803_delete_old_WellOperationCategory.cs +++ b/AsbCloudDb/Migrations/20221202195803_delete_old_WellOperationCategory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221205063810_DeleteTable_t_drill_flow_chart.Designer.cs b/AsbCloudDb/Migrations/20221205063810_DeleteTable_t_drill_flow_chart.Designer.cs index 53ae6e0b..723fd803 100644 --- a/AsbCloudDb/Migrations/20221205063810_DeleteTable_t_drill_flow_chart.Designer.cs +++ b/AsbCloudDb/Migrations/20221205063810_DeleteTable_t_drill_flow_chart.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221205063810_DeleteTable_t_drill_flow_chart.cs b/AsbCloudDb/Migrations/20221205063810_DeleteTable_t_drill_flow_chart.cs index 0e8be4a8..16bb1dd2 100644 --- a/AsbCloudDb/Migrations/20221205063810_DeleteTable_t_drill_flow_chart.cs +++ b/AsbCloudDb/Migrations/20221205063810_DeleteTable_t_drill_flow_chart.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20221205064341_AddTable_t_process_map.Designer.cs b/AsbCloudDb/Migrations/20221205064341_AddTable_t_process_map.Designer.cs index 38093865..c7309b82 100644 --- a/AsbCloudDb/Migrations/20221205064341_AddTable_t_process_map.Designer.cs +++ b/AsbCloudDb/Migrations/20221205064341_AddTable_t_process_map.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -1857,7 +1857,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20221205064341_AddTable_t_process_map.cs b/AsbCloudDb/Migrations/20221205064341_AddTable_t_process_map.cs index 32f173c6..440fd299 100644 --- a/AsbCloudDb/Migrations/20221205064341_AddTable_t_process_map.cs +++ b/AsbCloudDb/Migrations/20221205064341_AddTable_t_process_map.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; @@ -37,7 +37,7 @@ namespace AsbCloudDb.Migrations { table.PrimaryKey("PK_t_process_map", x => x.id); }, - comment: "Операции по скважине – РТК"); + comment: "Операции по скважине - РТК"); } protected override void Down(MigrationBuilder migrationBuilder) diff --git a/AsbCloudDb/Migrations/20221206053310_UpdateTable_t_process_map.Designer.cs b/AsbCloudDb/Migrations/20221206053310_UpdateTable_t_process_map.Designer.cs index 31ada5f8..7ad2dd3d 100644 --- a/AsbCloudDb/Migrations/20221206053310_UpdateTable_t_process_map.Designer.cs +++ b/AsbCloudDb/Migrations/20221206053310_UpdateTable_t_process_map.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -1861,7 +1861,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20221206053310_UpdateTable_t_process_map.cs b/AsbCloudDb/Migrations/20221206053310_UpdateTable_t_process_map.cs index 4da3fa7e..d6c4008f 100644 --- a/AsbCloudDb/Migrations/20221206053310_UpdateTable_t_process_map.cs +++ b/AsbCloudDb/Migrations/20221206053310_UpdateTable_t_process_map.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221206091023_UpdateTable_t_process_map_add_user_id.Designer.cs b/AsbCloudDb/Migrations/20221206091023_UpdateTable_t_process_map_add_user_id.Designer.cs index f041f30a..437a196b 100644 --- a/AsbCloudDb/Migrations/20221206091023_UpdateTable_t_process_map_add_user_id.Designer.cs +++ b/AsbCloudDb/Migrations/20221206091023_UpdateTable_t_process_map_add_user_id.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -1868,7 +1868,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20221206091023_UpdateTable_t_process_map_add_user_id.cs b/AsbCloudDb/Migrations/20221206091023_UpdateTable_t_process_map_add_user_id.cs index 16e3a5c7..be41943d 100644 --- a/AsbCloudDb/Migrations/20221206091023_UpdateTable_t_process_map_add_user_id.cs +++ b/AsbCloudDb/Migrations/20221206091023_UpdateTable_t_process_map_add_user_id.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221207034419_UpdateTable_t_process_map_delete_fk.Designer.cs b/AsbCloudDb/Migrations/20221207034419_UpdateTable_t_process_map_delete_fk.Designer.cs index 96f1cb98..d2f0f5c9 100644 --- a/AsbCloudDb/Migrations/20221207034419_UpdateTable_t_process_map_delete_fk.Designer.cs +++ b/AsbCloudDb/Migrations/20221207034419_UpdateTable_t_process_map_delete_fk.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -1866,7 +1866,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20221207034419_UpdateTable_t_process_map_delete_fk.cs b/AsbCloudDb/Migrations/20221207034419_UpdateTable_t_process_map_delete_fk.cs index 37c3525d..0f982b7c 100644 --- a/AsbCloudDb/Migrations/20221207034419_UpdateTable_t_process_map_delete_fk.cs +++ b/AsbCloudDb/Migrations/20221207034419_UpdateTable_t_process_map_delete_fk.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221208095511_WellOperations_delete_categories.Designer.cs b/AsbCloudDb/Migrations/20221208095511_WellOperations_delete_categories.Designer.cs index 9d55264e..f0e177f6 100644 --- a/AsbCloudDb/Migrations/20221208095511_WellOperations_delete_categories.Designer.cs +++ b/AsbCloudDb/Migrations/20221208095511_WellOperations_delete_categories.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221208095511_WellOperations_delete_categories.cs b/AsbCloudDb/Migrations/20221208095511_WellOperations_delete_categories.cs index 2fb082bb..a6562bd8 100644 --- a/AsbCloudDb/Migrations/20221208095511_WellOperations_delete_categories.cs +++ b/AsbCloudDb/Migrations/20221208095511_WellOperations_delete_categories.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221208101110_WellOperations_unite_categiries.Designer.cs b/AsbCloudDb/Migrations/20221208101110_WellOperations_unite_categiries.Designer.cs index 33d6c0d5..a11c0772 100644 --- a/AsbCloudDb/Migrations/20221208101110_WellOperations_unite_categiries.Designer.cs +++ b/AsbCloudDb/Migrations/20221208101110_WellOperations_unite_categiries.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221208101110_WellOperations_unite_categiries.cs b/AsbCloudDb/Migrations/20221208101110_WellOperations_unite_categiries.cs index 209eb14f..294d9a30 100644 --- a/AsbCloudDb/Migrations/20221208101110_WellOperations_unite_categiries.cs +++ b/AsbCloudDb/Migrations/20221208101110_WellOperations_unite_categiries.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221208105512_WellOperations_delete_categiries.Designer.cs b/AsbCloudDb/Migrations/20221208105512_WellOperations_delete_categiries.Designer.cs index d2bfb59f..33ff6442 100644 --- a/AsbCloudDb/Migrations/20221208105512_WellOperations_delete_categiries.Designer.cs +++ b/AsbCloudDb/Migrations/20221208105512_WellOperations_delete_categiries.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221208105512_WellOperations_delete_categiries.cs b/AsbCloudDb/Migrations/20221208105512_WellOperations_delete_categiries.cs index 63b19071..9df9bcb0 100644 --- a/AsbCloudDb/Migrations/20221208105512_WellOperations_delete_categiries.cs +++ b/AsbCloudDb/Migrations/20221208105512_WellOperations_delete_categiries.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221208115223_Truncate_detected_operations.Designer.cs b/AsbCloudDb/Migrations/20221208115223_Truncate_detected_operations.Designer.cs index 335be14c..d30a850c 100644 --- a/AsbCloudDb/Migrations/20221208115223_Truncate_detected_operations.Designer.cs +++ b/AsbCloudDb/Migrations/20221208115223_Truncate_detected_operations.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221208115223_Truncate_detected_operations.cs b/AsbCloudDb/Migrations/20221208115223_Truncate_detected_operations.cs index b04e912b..42d8e652 100644 --- a/AsbCloudDb/Migrations/20221208115223_Truncate_detected_operations.cs +++ b/AsbCloudDb/Migrations/20221208115223_Truncate_detected_operations.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221208122327_Add_lost_WellOperationCategory.Designer.cs b/AsbCloudDb/Migrations/20221208122327_Add_lost_WellOperationCategory.Designer.cs index eb6f6839..4ac0874c 100644 --- a/AsbCloudDb/Migrations/20221208122327_Add_lost_WellOperationCategory.Designer.cs +++ b/AsbCloudDb/Migrations/20221208122327_Add_lost_WellOperationCategory.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221208122327_Add_lost_WellOperationCategory.cs b/AsbCloudDb/Migrations/20221208122327_Add_lost_WellOperationCategory.cs index 5378b392..93a2ea15 100644 --- a/AsbCloudDb/Migrations/20221208122327_Add_lost_WellOperationCategory.cs +++ b/AsbCloudDb/Migrations/20221208122327_Add_lost_WellOperationCategory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221208142130_WellOperationCategory_ids_ordering.Designer.cs b/AsbCloudDb/Migrations/20221208142130_WellOperationCategory_ids_ordering.Designer.cs index aa614e91..2e8ba476 100644 --- a/AsbCloudDb/Migrations/20221208142130_WellOperationCategory_ids_ordering.Designer.cs +++ b/AsbCloudDb/Migrations/20221208142130_WellOperationCategory_ids_ordering.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221208142130_WellOperationCategory_ids_ordering.cs b/AsbCloudDb/Migrations/20221208142130_WellOperationCategory_ids_ordering.cs index de918bc7..e7e55b4c 100644 --- a/AsbCloudDb/Migrations/20221208142130_WellOperationCategory_ids_ordering.cs +++ b/AsbCloudDb/Migrations/20221208142130_WellOperationCategory_ids_ordering.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221209133046_Make_wellOperationCategory_name_notNull.Designer.cs b/AsbCloudDb/Migrations/20221209133046_Make_wellOperationCategory_name_notNull.Designer.cs index 71793eb1..3c2e2878 100644 --- a/AsbCloudDb/Migrations/20221209133046_Make_wellOperationCategory_name_notNull.Designer.cs +++ b/AsbCloudDb/Migrations/20221209133046_Make_wellOperationCategory_name_notNull.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221209133046_Make_wellOperationCategory_name_notNull.cs b/AsbCloudDb/Migrations/20221209133046_Make_wellOperationCategory_name_notNull.cs index a7d80927..049497ef 100644 --- a/AsbCloudDb/Migrations/20221209133046_Make_wellOperationCategory_name_notNull.cs +++ b/AsbCloudDb/Migrations/20221209133046_Make_wellOperationCategory_name_notNull.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221209215622_Add_newSection_t_well_section_type.Designer.cs b/AsbCloudDb/Migrations/20221209215622_Add_newSection_t_well_section_type.Designer.cs index 8e51d456..b57f3c92 100644 --- a/AsbCloudDb/Migrations/20221209215622_Add_newSection_t_well_section_type.Designer.cs +++ b/AsbCloudDb/Migrations/20221209215622_Add_newSection_t_well_section_type.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20221209215622_Add_newSection_t_well_section_type.cs b/AsbCloudDb/Migrations/20221209215622_Add_newSection_t_well_section_type.cs index 3b0504f1..7df4da5c 100644 --- a/AsbCloudDb/Migrations/20221209215622_Add_newSection_t_well_section_type.cs +++ b/AsbCloudDb/Migrations/20221209215622_Add_newSection_t_well_section_type.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20221222094423_AddTable_PlannedTrajectory.Designer.cs b/AsbCloudDb/Migrations/20221222094423_AddTable_PlannedTrajectory.Designer.cs index 803ba90c..90542cb8 100644 --- a/AsbCloudDb/Migrations/20221222094423_AddTable_PlannedTrajectory.Designer.cs +++ b/AsbCloudDb/Migrations/20221222094423_AddTable_PlannedTrajectory.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -1976,7 +1976,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20221222094423_AddTable_PlannedTrajectory.cs b/AsbCloudDb/Migrations/20221222094423_AddTable_PlannedTrajectory.cs index 08140e60..578ba899 100644 --- a/AsbCloudDb/Migrations/20221222094423_AddTable_PlannedTrajectory.cs +++ b/AsbCloudDb/Migrations/20221222094423_AddTable_PlannedTrajectory.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.Designer.cs b/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.Designer.cs index 9349fd24..e3912f6b 100644 --- a/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.Designer.cs +++ b/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -1976,7 +1976,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.cs b/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.cs index 5fa4654c..d2a04981 100644 --- a/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.cs +++ b/AsbCloudDb/Migrations/20221226164803_editTable_PlannedTrajectory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230110035135_AddTable_t_telemetry_wireline_run_out.Designer.cs b/AsbCloudDb/Migrations/20230110035135_AddTable_t_telemetry_wireline_run_out.Designer.cs index 93deff6e..74a446d8 100644 --- a/AsbCloudDb/Migrations/20230110035135_AddTable_t_telemetry_wireline_run_out.Designer.cs +++ b/AsbCloudDb/Migrations/20230110035135_AddTable_t_telemetry_wireline_run_out.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -1866,7 +1866,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230110035135_AddTable_t_telemetry_wireline_run_out.cs b/AsbCloudDb/Migrations/20230110035135_AddTable_t_telemetry_wireline_run_out.cs index 837cf2b3..0346fa3e 100644 --- a/AsbCloudDb/Migrations/20230110035135_AddTable_t_telemetry_wireline_run_out.cs +++ b/AsbCloudDb/Migrations/20230110035135_AddTable_t_telemetry_wireline_run_out.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20230110043915_UpdateTable_t_telemetry_wireline_run_out.Designer.cs b/AsbCloudDb/Migrations/20230110043915_UpdateTable_t_telemetry_wireline_run_out.Designer.cs index 39d3369c..b57e67c6 100644 --- a/AsbCloudDb/Migrations/20230110043915_UpdateTable_t_telemetry_wireline_run_out.Designer.cs +++ b/AsbCloudDb/Migrations/20230110043915_UpdateTable_t_telemetry_wireline_run_out.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -1866,7 +1866,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230110043915_UpdateTable_t_telemetry_wireline_run_out.cs b/AsbCloudDb/Migrations/20230110043915_UpdateTable_t_telemetry_wireline_run_out.cs index 299492d2..ac3824b5 100644 --- a/AsbCloudDb/Migrations/20230110043915_UpdateTable_t_telemetry_wireline_run_out.cs +++ b/AsbCloudDb/Migrations/20230110043915_UpdateTable_t_telemetry_wireline_run_out.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230111043034_UpdateTable_t_telemetry_wireline_run_out_comment.Designer.cs b/AsbCloudDb/Migrations/20230111043034_UpdateTable_t_telemetry_wireline_run_out_comment.Designer.cs index 3d98559f..001474f4 100644 --- a/AsbCloudDb/Migrations/20230111043034_UpdateTable_t_telemetry_wireline_run_out_comment.Designer.cs +++ b/AsbCloudDb/Migrations/20230111043034_UpdateTable_t_telemetry_wireline_run_out_comment.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -1866,7 +1866,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230111043034_UpdateTable_t_telemetry_wireline_run_out_comment.cs b/AsbCloudDb/Migrations/20230111043034_UpdateTable_t_telemetry_wireline_run_out_comment.cs index b1551031..a57d5120 100644 --- a/AsbCloudDb/Migrations/20230111043034_UpdateTable_t_telemetry_wireline_run_out_comment.cs +++ b/AsbCloudDb/Migrations/20230111043034_UpdateTable_t_telemetry_wireline_run_out_comment.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20230118054304_AddPermissions_wireline_plannedTrajectory.Designer.cs b/AsbCloudDb/Migrations/20230118054304_AddPermissions_wireline_plannedTrajectory.Designer.cs index d8a36330..365c002a 100644 --- a/AsbCloudDb/Migrations/20230118054304_AddPermissions_wireline_plannedTrajectory.Designer.cs +++ b/AsbCloudDb/Migrations/20230118054304_AddPermissions_wireline_plannedTrajectory.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2000,7 +2000,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230118054304_AddPermissions_wireline_plannedTrajectory.cs b/AsbCloudDb/Migrations/20230118054304_AddPermissions_wireline_plannedTrajectory.cs index 63a6db16..7d77c465 100644 --- a/AsbCloudDb/Migrations/20230118054304_AddPermissions_wireline_plannedTrajectory.cs +++ b/AsbCloudDb/Migrations/20230118054304_AddPermissions_wireline_plannedTrajectory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230124100243_Fix_PlannedTrajectory_permissions.Designer.cs b/AsbCloudDb/Migrations/20230124100243_Fix_PlannedTrajectory_permissions.Designer.cs index 25ef346e..0358e807 100644 --- a/AsbCloudDb/Migrations/20230124100243_Fix_PlannedTrajectory_permissions.Designer.cs +++ b/AsbCloudDb/Migrations/20230124100243_Fix_PlannedTrajectory_permissions.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2000,7 +2000,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230124100243_Fix_PlannedTrajectory_permissions.cs b/AsbCloudDb/Migrations/20230124100243_Fix_PlannedTrajectory_permissions.cs index 94a7bbc8..dd914e7f 100644 --- a/AsbCloudDb/Migrations/20230124100243_Fix_PlannedTrajectory_permissions.cs +++ b/AsbCloudDb/Migrations/20230124100243_Fix_PlannedTrajectory_permissions.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230203040530_Add_permissions_for_ProcessMap.Designer.cs b/AsbCloudDb/Migrations/20230203040530_Add_permissions_for_ProcessMap.Designer.cs index 8ea5dc81..83a6ef79 100644 --- a/AsbCloudDb/Migrations/20230203040530_Add_permissions_for_ProcessMap.Designer.cs +++ b/AsbCloudDb/Migrations/20230203040530_Add_permissions_for_ProcessMap.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2018,7 +2018,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230203040530_Add_permissions_for_ProcessMap.cs b/AsbCloudDb/Migrations/20230203040530_Add_permissions_for_ProcessMap.cs index 913fb232..2089c859 100644 --- a/AsbCloudDb/Migrations/20230203040530_Add_permissions_for_ProcessMap.cs +++ b/AsbCloudDb/Migrations/20230203040530_Add_permissions_for_ProcessMap.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230213055821_Add_FK_PlanOperation_to_WellOperation.Designer.cs b/AsbCloudDb/Migrations/20230213055821_Add_FK_PlanOperation_to_WellOperation.Designer.cs index 6614ac94..1a962bac 100644 --- a/AsbCloudDb/Migrations/20230213055821_Add_FK_PlanOperation_to_WellOperation.Designer.cs +++ b/AsbCloudDb/Migrations/20230213055821_Add_FK_PlanOperation_to_WellOperation.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2018,7 +2018,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230213055821_Add_FK_PlanOperation_to_WellOperation.cs b/AsbCloudDb/Migrations/20230213055821_Add_FK_PlanOperation_to_WellOperation.cs index a234302c..7ac4b12f 100644 --- a/AsbCloudDb/Migrations/20230213055821_Add_FK_PlanOperation_to_WellOperation.cs +++ b/AsbCloudDb/Migrations/20230213055821_Add_FK_PlanOperation_to_WellOperation.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230217071110_Add_IX_FK_PlanOperation_to_WellOperation.Designer.cs b/AsbCloudDb/Migrations/20230217071110_Add_IX_FK_PlanOperation_to_WellOperation.Designer.cs index 33f0ba24..e028970a 100644 --- a/AsbCloudDb/Migrations/20230217071110_Add_IX_FK_PlanOperation_to_WellOperation.Designer.cs +++ b/AsbCloudDb/Migrations/20230217071110_Add_IX_FK_PlanOperation_to_WellOperation.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2018,7 +2018,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230217071110_Add_IX_FK_PlanOperation_to_WellOperation.cs b/AsbCloudDb/Migrations/20230217071110_Add_IX_FK_PlanOperation_to_WellOperation.cs index 574084a2..abb4f9f2 100644 --- a/AsbCloudDb/Migrations/20230217071110_Add_IX_FK_PlanOperation_to_WellOperation.cs +++ b/AsbCloudDb/Migrations/20230217071110_Add_IX_FK_PlanOperation_to_WellOperation.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230217093242_Enable_nullable_on_deposit_cluster_well_company_wellOperation.Designer.cs b/AsbCloudDb/Migrations/20230217093242_Enable_nullable_on_deposit_cluster_well_company_wellOperation.Designer.cs index de6976a9..8b4dedeb 100644 --- a/AsbCloudDb/Migrations/20230217093242_Enable_nullable_on_deposit_cluster_well_company_wellOperation.Designer.cs +++ b/AsbCloudDb/Migrations/20230217093242_Enable_nullable_on_deposit_cluster_well_company_wellOperation.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2024,7 +2024,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230217093242_Enable_nullable_on_deposit_cluster_well_company_wellOperation.cs b/AsbCloudDb/Migrations/20230217093242_Enable_nullable_on_deposit_cluster_well_company_wellOperation.cs index 009ccf87..e314682b 100644 --- a/AsbCloudDb/Migrations/20230217093242_Enable_nullable_on_deposit_cluster_well_company_wellOperation.cs +++ b/AsbCloudDb/Migrations/20230217093242_Enable_nullable_on_deposit_cluster_well_company_wellOperation.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230217115524_Enable_nullable_on_DetectedOperation_DrillingProgramPart_FileCategory_FileInfo_FileMark.Designer.cs b/AsbCloudDb/Migrations/20230217115524_Enable_nullable_on_DetectedOperation_DrillingProgramPart_FileCategory_FileInfo_FileMark.Designer.cs index 05dfaf6b..998e4404 100644 --- a/AsbCloudDb/Migrations/20230217115524_Enable_nullable_on_DetectedOperation_DrillingProgramPart_FileCategory_FileInfo_FileMark.Designer.cs +++ b/AsbCloudDb/Migrations/20230217115524_Enable_nullable_on_DetectedOperation_DrillingProgramPart_FileCategory_FileInfo_FileMark.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2026,7 +2026,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230217115524_Enable_nullable_on_DetectedOperation_DrillingProgramPart_FileCategory_FileInfo_FileMark.cs b/AsbCloudDb/Migrations/20230217115524_Enable_nullable_on_DetectedOperation_DrillingProgramPart_FileCategory_FileInfo_FileMark.cs index cec7d802..d270bb10 100644 --- a/AsbCloudDb/Migrations/20230217115524_Enable_nullable_on_DetectedOperation_DrillingProgramPart_FileCategory_FileInfo_FileMark.cs +++ b/AsbCloudDb/Migrations/20230217115524_Enable_nullable_on_DetectedOperation_DrillingProgramPart_FileCategory_FileInfo_FileMark.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230217124751_Enable_nullable_on_Permission_Measure.Designer.cs b/AsbCloudDb/Migrations/20230217124751_Enable_nullable_on_Permission_Measure.Designer.cs index c3fef747..48ea1e4a 100644 --- a/AsbCloudDb/Migrations/20230217124751_Enable_nullable_on_Permission_Measure.Designer.cs +++ b/AsbCloudDb/Migrations/20230217124751_Enable_nullable_on_Permission_Measure.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2029,7 +2029,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230217124751_Enable_nullable_on_Permission_Measure.cs b/AsbCloudDb/Migrations/20230217124751_Enable_nullable_on_Permission_Measure.cs index c892820c..dc45943e 100644 --- a/AsbCloudDb/Migrations/20230217124751_Enable_nullable_on_Permission_Measure.cs +++ b/AsbCloudDb/Migrations/20230217124751_Enable_nullable_on_Permission_Measure.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230220062152_Enable_nullable_on_user_userRole.Designer.cs b/AsbCloudDb/Migrations/20230220062152_Enable_nullable_on_user_userRole.Designer.cs index 6f7f43da..ea72ab03 100644 --- a/AsbCloudDb/Migrations/20230220062152_Enable_nullable_on_user_userRole.Designer.cs +++ b/AsbCloudDb/Migrations/20230220062152_Enable_nullable_on_user_userRole.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2029,7 +2029,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230220062152_Enable_nullable_on_user_userRole.cs b/AsbCloudDb/Migrations/20230220062152_Enable_nullable_on_user_userRole.cs index 56a7b0f5..c9ab47e1 100644 --- a/AsbCloudDb/Migrations/20230220062152_Enable_nullable_on_user_userRole.cs +++ b/AsbCloudDb/Migrations/20230220062152_Enable_nullable_on_user_userRole.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230220091227_Enable_nullable_on_setpoints_finalDocs.Designer.cs b/AsbCloudDb/Migrations/20230220091227_Enable_nullable_on_setpoints_finalDocs.Designer.cs index a2c05772..6e21b3d3 100644 --- a/AsbCloudDb/Migrations/20230220091227_Enable_nullable_on_setpoints_finalDocs.Designer.cs +++ b/AsbCloudDb/Migrations/20230220091227_Enable_nullable_on_setpoints_finalDocs.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2029,7 +2029,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230220091227_Enable_nullable_on_setpoints_finalDocs.cs b/AsbCloudDb/Migrations/20230220091227_Enable_nullable_on_setpoints_finalDocs.cs index 24c36b33..2e5fbfe4 100644 --- a/AsbCloudDb/Migrations/20230220091227_Enable_nullable_on_setpoints_finalDocs.cs +++ b/AsbCloudDb/Migrations/20230220091227_Enable_nullable_on_setpoints_finalDocs.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230220095933_Enable_nullable_on_telemetry_.Designer.cs b/AsbCloudDb/Migrations/20230220095933_Enable_nullable_on_telemetry_.Designer.cs index 5854f613..90cad4e5 100644 --- a/AsbCloudDb/Migrations/20230220095933_Enable_nullable_on_telemetry_.Designer.cs +++ b/AsbCloudDb/Migrations/20230220095933_Enable_nullable_on_telemetry_.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2029,7 +2029,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230220095933_Enable_nullable_on_telemetry_.cs b/AsbCloudDb/Migrations/20230220095933_Enable_nullable_on_telemetry_.cs index 7a2c4874..ddc2a458 100644 --- a/AsbCloudDb/Migrations/20230220095933_Enable_nullable_on_telemetry_.cs +++ b/AsbCloudDb/Migrations/20230220095933_Enable_nullable_on_telemetry_.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230220100934_Enable_nullable_on_daylyReport.Designer.cs b/AsbCloudDb/Migrations/20230220100934_Enable_nullable_on_daylyReport.Designer.cs index a8e5a0a5..f054b778 100644 --- a/AsbCloudDb/Migrations/20230220100934_Enable_nullable_on_daylyReport.Designer.cs +++ b/AsbCloudDb/Migrations/20230220100934_Enable_nullable_on_daylyReport.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2030,7 +2030,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230220100934_Enable_nullable_on_daylyReport.cs b/AsbCloudDb/Migrations/20230220100934_Enable_nullable_on_daylyReport.cs index 521b9dd7..be0a03aa 100644 --- a/AsbCloudDb/Migrations/20230220100934_Enable_nullable_on_daylyReport.cs +++ b/AsbCloudDb/Migrations/20230220100934_Enable_nullable_on_daylyReport.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230301063610_add_new_OperationCategory.Designer.cs b/AsbCloudDb/Migrations/20230301063610_add_new_OperationCategory.Designer.cs index 1b157a9a..a1fdc28c 100644 --- a/AsbCloudDb/Migrations/20230301063610_add_new_OperationCategory.Designer.cs +++ b/AsbCloudDb/Migrations/20230301063610_add_new_OperationCategory.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2030,7 +2030,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230301063610_add_new_OperationCategory.cs b/AsbCloudDb/Migrations/20230301063610_add_new_OperationCategory.cs index 4d07600c..de54f4d6 100644 --- a/AsbCloudDb/Migrations/20230301063610_add_new_OperationCategory.cs +++ b/AsbCloudDb/Migrations/20230301063610_add_new_OperationCategory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230301070621_rename_OperationCategory_Rotor_Slide.Designer.cs b/AsbCloudDb/Migrations/20230301070621_rename_OperationCategory_Rotor_Slide.Designer.cs index 1cd98faf..eedc4484 100644 --- a/AsbCloudDb/Migrations/20230301070621_rename_OperationCategory_Rotor_Slide.Designer.cs +++ b/AsbCloudDb/Migrations/20230301070621_rename_OperationCategory_Rotor_Slide.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2030,7 +2030,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230301070621_rename_OperationCategory_Rotor_Slide.cs b/AsbCloudDb/Migrations/20230301070621_rename_OperationCategory_Rotor_Slide.cs index df7941e6..dc9d0ccb 100644 --- a/AsbCloudDb/Migrations/20230301070621_rename_OperationCategory_Rotor_Slide.cs +++ b/AsbCloudDb/Migrations/20230301070621_rename_OperationCategory_Rotor_Slide.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230306085943_UpdateTable_t_daily_report_UpdateType_startDate_toDateOnly.Designer.cs b/AsbCloudDb/Migrations/20230306085943_UpdateTable_t_daily_report_UpdateType_startDate_toDateOnly.Designer.cs index b073c342..32e51f5a 100644 --- a/AsbCloudDb/Migrations/20230306085943_UpdateTable_t_daily_report_UpdateType_startDate_toDateOnly.Designer.cs +++ b/AsbCloudDb/Migrations/20230306085943_UpdateTable_t_daily_report_UpdateType_startDate_toDateOnly.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2030,7 +2030,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230306085943_UpdateTable_t_daily_report_UpdateType_startDate_toDateOnly.cs b/AsbCloudDb/Migrations/20230306085943_UpdateTable_t_daily_report_UpdateType_startDate_toDateOnly.cs index df7a0156..944ab2a2 100644 --- a/AsbCloudDb/Migrations/20230306085943_UpdateTable_t_daily_report_UpdateType_startDate_toDateOnly.cs +++ b/AsbCloudDb/Migrations/20230306085943_UpdateTable_t_daily_report_UpdateType_startDate_toDateOnly.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230307100501_Add_new_permissions_for_root.Designer.cs b/AsbCloudDb/Migrations/20230307100501_Add_new_permissions_for_root.Designer.cs index 4a2bfd9a..55c571f9 100644 --- a/AsbCloudDb/Migrations/20230307100501_Add_new_permissions_for_root.Designer.cs +++ b/AsbCloudDb/Migrations/20230307100501_Add_new_permissions_for_root.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2030,7 +2030,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230307100501_Add_new_permissions_for_root.cs b/AsbCloudDb/Migrations/20230307100501_Add_new_permissions_for_root.cs index 61db9ba7..b9536296 100644 --- a/AsbCloudDb/Migrations/20230307100501_Add_new_permissions_for_root.cs +++ b/AsbCloudDb/Migrations/20230307100501_Add_new_permissions_for_root.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230321073247_edit_ProcessMap_add_LimitMax_and_delete_fact.Designer.cs b/AsbCloudDb/Migrations/20230321073247_edit_ProcessMap_add_LimitMax_and_delete_fact.Designer.cs index a181ad4d..872e1e2f 100644 --- a/AsbCloudDb/Migrations/20230321073247_edit_ProcessMap_add_LimitMax_and_delete_fact.Designer.cs +++ b/AsbCloudDb/Migrations/20230321073247_edit_ProcessMap_add_LimitMax_and_delete_fact.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2035,7 +2035,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230321073247_edit_ProcessMap_add_LimitMax_and_delete_fact.cs b/AsbCloudDb/Migrations/20230321073247_edit_ProcessMap_add_LimitMax_and_delete_fact.cs index 267a5758..25180076 100644 --- a/AsbCloudDb/Migrations/20230321073247_edit_ProcessMap_add_LimitMax_and_delete_fact.cs +++ b/AsbCloudDb/Migrations/20230321073247_edit_ProcessMap_add_LimitMax_and_delete_fact.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230321120948_Add_Usage_to_ProcessMap.Designer.cs b/AsbCloudDb/Migrations/20230321120948_Add_Usage_to_ProcessMap.Designer.cs index 2cd6c3f6..35db1a73 100644 --- a/AsbCloudDb/Migrations/20230321120948_Add_Usage_to_ProcessMap.Designer.cs +++ b/AsbCloudDb/Migrations/20230321120948_Add_Usage_to_ProcessMap.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2045,7 +2045,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230321120948_Add_Usage_to_ProcessMap.cs b/AsbCloudDb/Migrations/20230321120948_Add_Usage_to_ProcessMap.cs index ba9c92e9..f0a020ee 100644 --- a/AsbCloudDb/Migrations/20230321120948_Add_Usage_to_ProcessMap.cs +++ b/AsbCloudDb/Migrations/20230321120948_Add_Usage_to_ProcessMap.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230404045901_Add_UserEditor_To_WellOperation_Table.Designer.cs b/AsbCloudDb/Migrations/20230404045901_Add_UserEditor_To_WellOperation_Table.Designer.cs index 33afd7b9..231ee0b3 100644 --- a/AsbCloudDb/Migrations/20230404045901_Add_UserEditor_To_WellOperation_Table.Designer.cs +++ b/AsbCloudDb/Migrations/20230404045901_Add_UserEditor_To_WellOperation_Table.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2045,7 +2045,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230404045901_Add_UserEditor_To_WellOperation_Table.cs b/AsbCloudDb/Migrations/20230404045901_Add_UserEditor_To_WellOperation_Table.cs index 09871f08..c91910cc 100644 --- a/AsbCloudDb/Migrations/20230404045901_Add_UserEditor_To_WellOperation_Table.cs +++ b/AsbCloudDb/Migrations/20230404045901_Add_UserEditor_To_WellOperation_Table.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230414033303_UpdateTable_t_telemetry_data_saub.Designer.cs b/AsbCloudDb/Migrations/20230414033303_UpdateTable_t_telemetry_data_saub.Designer.cs index 2176db06..6578e6b8 100644 --- a/AsbCloudDb/Migrations/20230414033303_UpdateTable_t_telemetry_data_saub.Designer.cs +++ b/AsbCloudDb/Migrations/20230414033303_UpdateTable_t_telemetry_data_saub.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2045,7 +2045,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230414033303_UpdateTable_t_telemetry_data_saub.cs b/AsbCloudDb/Migrations/20230414033303_UpdateTable_t_telemetry_data_saub.cs index 70563dcd..eb559809 100644 --- a/AsbCloudDb/Migrations/20230414033303_UpdateTable_t_telemetry_data_saub.cs +++ b/AsbCloudDb/Migrations/20230414033303_UpdateTable_t_telemetry_data_saub.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230414072923_EditTable_t_telemetry_data_saub.Designer.cs b/AsbCloudDb/Migrations/20230414072923_EditTable_t_telemetry_data_saub.Designer.cs index 007b3763..97721dc8 100644 --- a/AsbCloudDb/Migrations/20230414072923_EditTable_t_telemetry_data_saub.Designer.cs +++ b/AsbCloudDb/Migrations/20230414072923_EditTable_t_telemetry_data_saub.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2045,7 +2045,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230414072923_EditTable_t_telemetry_data_saub.cs b/AsbCloudDb/Migrations/20230414072923_EditTable_t_telemetry_data_saub.cs index c5e7dd19..136143d2 100644 --- a/AsbCloudDb/Migrations/20230414072923_EditTable_t_telemetry_data_saub.cs +++ b/AsbCloudDb/Migrations/20230414072923_EditTable_t_telemetry_data_saub.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230414084427_EditCommentTable_t_telemetry_data_saub.Designer.cs b/AsbCloudDb/Migrations/20230414084427_EditCommentTable_t_telemetry_data_saub.Designer.cs index 5d42825a..83dc280e 100644 --- a/AsbCloudDb/Migrations/20230414084427_EditCommentTable_t_telemetry_data_saub.Designer.cs +++ b/AsbCloudDb/Migrations/20230414084427_EditCommentTable_t_telemetry_data_saub.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2045,7 +2045,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230414084427_EditCommentTable_t_telemetry_data_saub.cs b/AsbCloudDb/Migrations/20230414084427_EditCommentTable_t_telemetry_data_saub.cs index 5b7a55a0..28fbe670 100644 --- a/AsbCloudDb/Migrations/20230414084427_EditCommentTable_t_telemetry_data_saub.cs +++ b/AsbCloudDb/Migrations/20230414084427_EditCommentTable_t_telemetry_data_saub.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230418051912_AddTable_t_faq.Designer.cs b/AsbCloudDb/Migrations/20230418051912_AddTable_t_faq.Designer.cs index d49f3d0a..f01ca754 100644 --- a/AsbCloudDb/Migrations/20230418051912_AddTable_t_faq.Designer.cs +++ b/AsbCloudDb/Migrations/20230418051912_AddTable_t_faq.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2130,7 +2130,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230418051912_AddTable_t_faq.cs b/AsbCloudDb/Migrations/20230418051912_AddTable_t_faq.cs index e1461c79..fe319c5b 100644 --- a/AsbCloudDb/Migrations/20230418051912_AddTable_t_faq.cs +++ b/AsbCloudDb/Migrations/20230418051912_AddTable_t_faq.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20230418055848_Add_GTR.Designer.cs b/AsbCloudDb/Migrations/20230418055848_Add_GTR.Designer.cs index b8aea936..5fa4eacc 100644 --- a/AsbCloudDb/Migrations/20230418055848_Add_GTR.Designer.cs +++ b/AsbCloudDb/Migrations/20230418055848_Add_GTR.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2133,7 +2133,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230418055848_Add_GTR.cs b/AsbCloudDb/Migrations/20230418055848_Add_GTR.cs index 0eafb5c3..c3e45517 100644 --- a/AsbCloudDb/Migrations/20230418055848_Add_GTR.cs +++ b/AsbCloudDb/Migrations/20230418055848_Add_GTR.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230418072820_UpdateTable_t_faq_Nullable_IdAuthorAnswer.Designer.cs b/AsbCloudDb/Migrations/20230418072820_UpdateTable_t_faq_Nullable_IdAuthorAnswer.Designer.cs index f269201a..2f955185 100644 --- a/AsbCloudDb/Migrations/20230418072820_UpdateTable_t_faq_Nullable_IdAuthorAnswer.Designer.cs +++ b/AsbCloudDb/Migrations/20230418072820_UpdateTable_t_faq_Nullable_IdAuthorAnswer.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2130,7 +2130,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230418072820_UpdateTable_t_faq_Nullable_IdAuthorAnswer.cs b/AsbCloudDb/Migrations/20230418072820_UpdateTable_t_faq_Nullable_IdAuthorAnswer.cs index 577f05ea..d0a3c73c 100644 --- a/AsbCloudDb/Migrations/20230418072820_UpdateTable_t_faq_Nullable_IdAuthorAnswer.cs +++ b/AsbCloudDb/Migrations/20230418072820_UpdateTable_t_faq_Nullable_IdAuthorAnswer.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230418075021_UpdateTable_t_faq_Nullable_Answer.Designer.cs b/AsbCloudDb/Migrations/20230418075021_UpdateTable_t_faq_Nullable_Answer.Designer.cs index c2553a06..c8b34cbf 100644 --- a/AsbCloudDb/Migrations/20230418075021_UpdateTable_t_faq_Nullable_Answer.Designer.cs +++ b/AsbCloudDb/Migrations/20230418075021_UpdateTable_t_faq_Nullable_Answer.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2129,7 +2129,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230418075021_UpdateTable_t_faq_Nullable_Answer.cs b/AsbCloudDb/Migrations/20230418075021_UpdateTable_t_faq_Nullable_Answer.cs index 11de732a..679297c3 100644 --- a/AsbCloudDb/Migrations/20230418075021_UpdateTable_t_faq_Nullable_Answer.cs +++ b/AsbCloudDb/Migrations/20230418075021_UpdateTable_t_faq_Nullable_Answer.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230418103709_UpdateTable_t_faq_Field_IsFrequently_Rename.Designer.cs b/AsbCloudDb/Migrations/20230418103709_UpdateTable_t_faq_Field_IsFrequently_Rename.Designer.cs index 2b142dd2..5a5105da 100644 --- a/AsbCloudDb/Migrations/20230418103709_UpdateTable_t_faq_Field_IsFrequently_Rename.Designer.cs +++ b/AsbCloudDb/Migrations/20230418103709_UpdateTable_t_faq_Field_IsFrequently_Rename.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2129,7 +2129,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230418103709_UpdateTable_t_faq_Field_IsFrequently_Rename.cs b/AsbCloudDb/Migrations/20230418103709_UpdateTable_t_faq_Field_IsFrequently_Rename.cs index 41e4f192..420b1548 100644 --- a/AsbCloudDb/Migrations/20230418103709_UpdateTable_t_faq_Field_IsFrequently_Rename.cs +++ b/AsbCloudDb/Migrations/20230418103709_UpdateTable_t_faq_Field_IsFrequently_Rename.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230421071633_UpdateTable_t_faq_Id_Well_Remove.Designer.cs b/AsbCloudDb/Migrations/20230421071633_UpdateTable_t_faq_Id_Well_Remove.Designer.cs index 36005375..daee06c1 100644 --- a/AsbCloudDb/Migrations/20230421071633_UpdateTable_t_faq_Id_Well_Remove.Designer.cs +++ b/AsbCloudDb/Migrations/20230421071633_UpdateTable_t_faq_Id_Well_Remove.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2210,7 +2210,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230421071633_UpdateTable_t_faq_Id_Well_Remove.cs b/AsbCloudDb/Migrations/20230421071633_UpdateTable_t_faq_Id_Well_Remove.cs index e2c9e48d..38388248 100644 --- a/AsbCloudDb/Migrations/20230421071633_UpdateTable_t_faq_Id_Well_Remove.cs +++ b/AsbCloudDb/Migrations/20230421071633_UpdateTable_t_faq_Id_Well_Remove.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230504111955_Add_Permission_For_FaqStatistics.Designer.cs b/AsbCloudDb/Migrations/20230504111955_Add_Permission_For_FaqStatistics.Designer.cs index e76e31e7..788b6aad 100644 --- a/AsbCloudDb/Migrations/20230504111955_Add_Permission_For_FaqStatistics.Designer.cs +++ b/AsbCloudDb/Migrations/20230504111955_Add_Permission_For_FaqStatistics.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2228,7 +2228,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230504111955_Add_Permission_For_FaqStatistics.cs b/AsbCloudDb/Migrations/20230504111955_Add_Permission_For_FaqStatistics.cs index e33f4948..c9447c1f 100644 --- a/AsbCloudDb/Migrations/20230504111955_Add_Permission_For_FaqStatistics.cs +++ b/AsbCloudDb/Migrations/20230504111955_Add_Permission_For_FaqStatistics.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230523065447_Add_RadiusTarget_To_PlannedTrajectory.Designer.cs b/AsbCloudDb/Migrations/20230523065447_Add_RadiusTarget_To_PlannedTrajectory.Designer.cs index 22b08db6..f7518d0c 100644 --- a/AsbCloudDb/Migrations/20230523065447_Add_RadiusTarget_To_PlannedTrajectory.Designer.cs +++ b/AsbCloudDb/Migrations/20230523065447_Add_RadiusTarget_To_PlannedTrajectory.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2233,7 +2233,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230523065447_Add_RadiusTarget_To_PlannedTrajectory.cs b/AsbCloudDb/Migrations/20230523065447_Add_RadiusTarget_To_PlannedTrajectory.cs index 1f054ace..f7ed8abf 100644 --- a/AsbCloudDb/Migrations/20230523065447_Add_RadiusTarget_To_PlannedTrajectory.cs +++ b/AsbCloudDb/Migrations/20230523065447_Add_RadiusTarget_To_PlannedTrajectory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230530070633_UpdateTable_t_planned_trajectory_Field_RadiusTarget_Rename.Designer.cs b/AsbCloudDb/Migrations/20230530070633_UpdateTable_t_planned_trajectory_Field_RadiusTarget_Rename.Designer.cs index 5b02aef3..eeb429ec 100644 --- a/AsbCloudDb/Migrations/20230530070633_UpdateTable_t_planned_trajectory_Field_RadiusTarget_Rename.Designer.cs +++ b/AsbCloudDb/Migrations/20230530070633_UpdateTable_t_planned_trajectory_Field_RadiusTarget_Rename.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2233,7 +2233,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230530070633_UpdateTable_t_planned_trajectory_Field_RadiusTarget_Rename.cs b/AsbCloudDb/Migrations/20230530070633_UpdateTable_t_planned_trajectory_Field_RadiusTarget_Rename.cs index ecab9ad1..bd1aad9b 100644 --- a/AsbCloudDb/Migrations/20230530070633_UpdateTable_t_planned_trajectory_Field_RadiusTarget_Rename.cs +++ b/AsbCloudDb/Migrations/20230530070633_UpdateTable_t_planned_trajectory_Field_RadiusTarget_Rename.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230621061704_Add_Table_Relation_Contact_Well_And_Field_IsContact_To_CompanyType.Designer.cs b/AsbCloudDb/Migrations/20230621061704_Add_Table_Relation_Contact_Well_And_Field_IsContact_To_CompanyType.Designer.cs index df16f385..62dedbc7 100644 --- a/AsbCloudDb/Migrations/20230621061704_Add_Table_Relation_Contact_Well_And_Field_IsContact_To_CompanyType.Designer.cs +++ b/AsbCloudDb/Migrations/20230621061704_Add_Table_Relation_Contact_Well_And_Field_IsContact_To_CompanyType.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2239,7 +2239,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230621061704_Add_Table_Relation_Contact_Well_And_Field_IsContact_To_CompanyType.cs b/AsbCloudDb/Migrations/20230621061704_Add_Table_Relation_Contact_Well_And_Field_IsContact_To_CompanyType.cs index 766cafa4..9f71027c 100644 --- a/AsbCloudDb/Migrations/20230621061704_Add_Table_Relation_Contact_Well_And_Field_IsContact_To_CompanyType.cs +++ b/AsbCloudDb/Migrations/20230621061704_Add_Table_Relation_Contact_Well_And_Field_IsContact_To_CompanyType.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230628043716_Add_Permissions_WellContact.Designer.cs b/AsbCloudDb/Migrations/20230628043716_Add_Permissions_WellContact.Designer.cs index fea9ad7b..a66fba62 100644 --- a/AsbCloudDb/Migrations/20230628043716_Add_Permissions_WellContact.Designer.cs +++ b/AsbCloudDb/Migrations/20230628043716_Add_Permissions_WellContact.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2251,7 +2251,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230628043716_Add_Permissions_WellContact.cs b/AsbCloudDb/Migrations/20230628043716_Add_Permissions_WellContact.cs index 8680084d..881de1f6 100644 --- a/AsbCloudDb/Migrations/20230628043716_Add_Permissions_WellContact.cs +++ b/AsbCloudDb/Migrations/20230628043716_Add_Permissions_WellContact.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230628095801_Add_HelpPage.Designer.cs b/AsbCloudDb/Migrations/20230628095801_Add_HelpPage.Designer.cs index fa1bde29..0098b81b 100644 --- a/AsbCloudDb/Migrations/20230628095801_Add_HelpPage.Designer.cs +++ b/AsbCloudDb/Migrations/20230628095801_Add_HelpPage.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2279,7 +2279,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230628095801_Add_HelpPage.cs b/AsbCloudDb/Migrations/20230628095801_Add_HelpPage.cs index 82746fb2..a86d6693 100644 --- a/AsbCloudDb/Migrations/20230628095801_Add_HelpPage.cs +++ b/AsbCloudDb/Migrations/20230628095801_Add_HelpPage.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/AsbCloudDb/Migrations/20230628100326_Add_New_Init_Value_For_FileCategory.Designer.cs b/AsbCloudDb/Migrations/20230628100326_Add_New_Init_Value_For_FileCategory.Designer.cs index ea6e04e3..1ce38f93 100644 --- a/AsbCloudDb/Migrations/20230628100326_Add_New_Init_Value_For_FileCategory.Designer.cs +++ b/AsbCloudDb/Migrations/20230628100326_Add_New_Init_Value_For_FileCategory.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2284,7 +2284,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230628100326_Add_New_Init_Value_For_FileCategory.cs b/AsbCloudDb/Migrations/20230628100326_Add_New_Init_Value_For_FileCategory.cs index 7cc53bba..8d7af9ef 100644 --- a/AsbCloudDb/Migrations/20230628100326_Add_New_Init_Value_For_FileCategory.cs +++ b/AsbCloudDb/Migrations/20230628100326_Add_New_Init_Value_For_FileCategory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230628103733_Add_New_Init_Value_For_Permission.Designer.cs b/AsbCloudDb/Migrations/20230628103733_Add_New_Init_Value_For_Permission.Designer.cs index 17653a21..710f5f11 100644 --- a/AsbCloudDb/Migrations/20230628103733_Add_New_Init_Value_For_Permission.Designer.cs +++ b/AsbCloudDb/Migrations/20230628103733_Add_New_Init_Value_For_Permission.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2290,7 +2290,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230628103733_Add_New_Init_Value_For_Permission.cs b/AsbCloudDb/Migrations/20230628103733_Add_New_Init_Value_For_Permission.cs index c34a3cc6..3085c98d 100644 --- a/AsbCloudDb/Migrations/20230628103733_Add_New_Init_Value_For_Permission.cs +++ b/AsbCloudDb/Migrations/20230628103733_Add_New_Init_Value_For_Permission.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230711130529_Update_IdState_For_User.Designer.cs b/AsbCloudDb/Migrations/20230711130529_Update_IdState_For_User.Designer.cs index 1bb79712..ece65eda 100644 --- a/AsbCloudDb/Migrations/20230711130529_Update_IdState_For_User.Designer.cs +++ b/AsbCloudDb/Migrations/20230711130529_Update_IdState_For_User.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2302,7 +2302,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230711130529_Update_IdState_For_User.cs b/AsbCloudDb/Migrations/20230711130529_Update_IdState_For_User.cs index 279d64da..fe5be085 100644 --- a/AsbCloudDb/Migrations/20230711130529_Update_IdState_For_User.cs +++ b/AsbCloudDb/Migrations/20230711130529_Update_IdState_For_User.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using System; #nullable disable diff --git a/AsbCloudDb/Migrations/20230711130624_Add_Notification.Designer.cs b/AsbCloudDb/Migrations/20230711130624_Add_Notification.Designer.cs index 15714251..cb66b6c4 100644 --- a/AsbCloudDb/Migrations/20230711130624_Add_Notification.Designer.cs +++ b/AsbCloudDb/Migrations/20230711130624_Add_Notification.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2394,7 +2394,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230711130624_Add_Notification.cs b/AsbCloudDb/Migrations/20230711130624_Add_Notification.cs index c4c447a8..49c02a87 100644 --- a/AsbCloudDb/Migrations/20230711130624_Add_Notification.cs +++ b/AsbCloudDb/Migrations/20230711130624_Add_Notification.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20230713050032_Add_Order_For_CompanyType.Designer.cs b/AsbCloudDb/Migrations/20230713050032_Add_Order_For_CompanyType.Designer.cs index d99dcdb1..06f84434 100644 --- a/AsbCloudDb/Migrations/20230713050032_Add_Order_For_CompanyType.Designer.cs +++ b/AsbCloudDb/Migrations/20230713050032_Add_Order_For_CompanyType.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2309,7 +2309,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230713050032_Add_Order_For_CompanyType.cs b/AsbCloudDb/Migrations/20230713050032_Add_Order_For_CompanyType.cs index 735bd45f..3c1c6c71 100644 --- a/AsbCloudDb/Migrations/20230713050032_Add_Order_For_CompanyType.cs +++ b/AsbCloudDb/Migrations/20230713050032_Add_Order_For_CompanyType.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230713085928_Update_Notification.Designer.cs b/AsbCloudDb/Migrations/20230713085928_Update_Notification.Designer.cs index 50703a27..42faf6c1 100644 --- a/AsbCloudDb/Migrations/20230713085928_Update_Notification.Designer.cs +++ b/AsbCloudDb/Migrations/20230713085928_Update_Notification.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2387,7 +2387,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230713085928_Update_Notification.cs b/AsbCloudDb/Migrations/20230713085928_Update_Notification.cs index c9571b1e..4fb754e7 100644 --- a/AsbCloudDb/Migrations/20230713085928_Update_Notification.cs +++ b/AsbCloudDb/Migrations/20230713085928_Update_Notification.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230719064843_Add_Order_For_SectionType.Designer.cs b/AsbCloudDb/Migrations/20230719064843_Add_Order_For_SectionType.Designer.cs index 42176285..871f6297 100644 --- a/AsbCloudDb/Migrations/20230719064843_Add_Order_For_SectionType.Designer.cs +++ b/AsbCloudDb/Migrations/20230719064843_Add_Order_For_SectionType.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2394,7 +2394,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230719064843_Add_Order_For_SectionType.cs b/AsbCloudDb/Migrations/20230719064843_Add_Order_For_SectionType.cs index 8b0a16d4..01147d4b 100644 --- a/AsbCloudDb/Migrations/20230719064843_Add_Order_For_SectionType.cs +++ b/AsbCloudDb/Migrations/20230719064843_Add_Order_For_SectionType.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230725082154_Add_Registration_Date_Notification.Designer.cs b/AsbCloudDb/Migrations/20230725082154_Add_Registration_Date_Notification.Designer.cs index 14b340c7..1445867d 100644 --- a/AsbCloudDb/Migrations/20230725082154_Add_Registration_Date_Notification.Designer.cs +++ b/AsbCloudDb/Migrations/20230725082154_Add_Registration_Date_Notification.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2399,7 +2399,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230725082154_Add_Registration_Date_Notification.cs b/AsbCloudDb/Migrations/20230725082154_Add_Registration_Date_Notification.cs index 11ce890c..2cecfa4c 100644 --- a/AsbCloudDb/Migrations/20230725082154_Add_Registration_Date_Notification.cs +++ b/AsbCloudDb/Migrations/20230725082154_Add_Registration_Date_Notification.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230728062743_Add_Permission_UserSettings_delete.Designer.cs b/AsbCloudDb/Migrations/20230728062743_Add_Permission_UserSettings_delete.Designer.cs index a0266f5b..fd59fdd1 100644 --- a/AsbCloudDb/Migrations/20230728062743_Add_Permission_UserSettings_delete.Designer.cs +++ b/AsbCloudDb/Migrations/20230728062743_Add_Permission_UserSettings_delete.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2400,7 +2400,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230728062743_Add_Permission_UserSettings_delete.cs b/AsbCloudDb/Migrations/20230728062743_Add_Permission_UserSettings_delete.cs index 1341afc1..e119c774 100644 --- a/AsbCloudDb/Migrations/20230728062743_Add_Permission_UserSettings_delete.cs +++ b/AsbCloudDb/Migrations/20230728062743_Add_Permission_UserSettings_delete.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.Designer.cs b/AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.Designer.cs index 64e38d02..ea1ed269 100644 --- a/AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.Designer.cs +++ b/AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2355,7 +2355,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.cs b/AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.cs index d8b973f5..cd5fdb6f 100644 --- a/AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.cs +++ b/AsbCloudDb/Migrations/20230821110455_Update_PlannedTrajectory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230906090612_Add_separated_subsystems.Designer.cs b/AsbCloudDb/Migrations/20230906090612_Add_separated_subsystems.Designer.cs index 88c5d55a..8bba7e30 100644 --- a/AsbCloudDb/Migrations/20230906090612_Add_separated_subsystems.Designer.cs +++ b/AsbCloudDb/Migrations/20230906090612_Add_separated_subsystems.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2400,7 +2400,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230906090612_Add_separated_subsystems.cs b/AsbCloudDb/Migrations/20230906090612_Add_separated_subsystems.cs index 89c4a400..035eb2f0 100644 --- a/AsbCloudDb/Migrations/20230906090612_Add_separated_subsystems.cs +++ b/AsbCloudDb/Migrations/20230906090612_Add_separated_subsystems.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230907070954_Add_Manuals.Designer.cs b/AsbCloudDb/Migrations/20230907070954_Add_Manuals.Designer.cs index 4aed03e1..7bd2bbe8 100644 --- a/AsbCloudDb/Migrations/20230907070954_Add_Manuals.Designer.cs +++ b/AsbCloudDb/Migrations/20230907070954_Add_Manuals.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2494,7 +2494,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230907070954_Add_Manuals.cs b/AsbCloudDb/Migrations/20230907070954_Add_Manuals.cs index 4ee906e3..3b4d9d77 100644 --- a/AsbCloudDb/Migrations/20230907070954_Add_Manuals.cs +++ b/AsbCloudDb/Migrations/20230907070954_Add_Manuals.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20230913063219_Add_New_Permissions.Designer.cs b/AsbCloudDb/Migrations/20230913063219_Add_New_Permissions.Designer.cs index c94465b6..5c57f7ce 100644 --- a/AsbCloudDb/Migrations/20230913063219_Add_New_Permissions.Designer.cs +++ b/AsbCloudDb/Migrations/20230913063219_Add_New_Permissions.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2412,7 +2412,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230913063219_Add_New_Permissions.cs b/AsbCloudDb/Migrations/20230913063219_Add_New_Permissions.cs index d6dc3d17..9cb5aec5 100644 --- a/AsbCloudDb/Migrations/20230913063219_Add_New_Permissions.cs +++ b/AsbCloudDb/Migrations/20230913063219_Add_New_Permissions.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230925052808_Add_ProcessMapWellboreDevelopment.Designer.cs b/AsbCloudDb/Migrations/20230925052808_Add_ProcessMapWellboreDevelopment.Designer.cs index cba1d13c..75876fd0 100644 --- a/AsbCloudDb/Migrations/20230925052808_Add_ProcessMapWellboreDevelopment.Designer.cs +++ b/AsbCloudDb/Migrations/20230925052808_Add_ProcessMapWellboreDevelopment.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2466,7 +2466,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.ProcessMapWellboreDevelopment", b => diff --git a/AsbCloudDb/Migrations/20230925052808_Add_ProcessMapWellboreDevelopment.cs b/AsbCloudDb/Migrations/20230925052808_Add_ProcessMapWellboreDevelopment.cs index 38d50904..54c82d98 100644 --- a/AsbCloudDb/Migrations/20230925052808_Add_ProcessMapWellboreDevelopment.cs +++ b/AsbCloudDb/Migrations/20230925052808_Add_ProcessMapWellboreDevelopment.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20230925081405_Add_New_Permission_For_Manuals.Designer.cs b/AsbCloudDb/Migrations/20230925081405_Add_New_Permission_For_Manuals.Designer.cs index 95c208da..f151f4b3 100644 --- a/AsbCloudDb/Migrations/20230925081405_Add_New_Permission_For_Manuals.Designer.cs +++ b/AsbCloudDb/Migrations/20230925081405_Add_New_Permission_For_Manuals.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2472,7 +2472,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.RelationCompanyWell", b => diff --git a/AsbCloudDb/Migrations/20230925081405_Add_New_Permission_For_Manuals.cs b/AsbCloudDb/Migrations/20230925081405_Add_New_Permission_For_Manuals.cs index 8217925d..8b040fde 100644 --- a/AsbCloudDb/Migrations/20230925081405_Add_New_Permission_For_Manuals.cs +++ b/AsbCloudDb/Migrations/20230925081405_Add_New_Permission_For_Manuals.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230925132919_Update_ProcessMapWellboreDevelopment.Designer.cs b/AsbCloudDb/Migrations/20230925132919_Update_ProcessMapWellboreDevelopment.Designer.cs index 26259bfc..778f7dc6 100644 --- a/AsbCloudDb/Migrations/20230925132919_Update_ProcessMapWellboreDevelopment.Designer.cs +++ b/AsbCloudDb/Migrations/20230925132919_Update_ProcessMapWellboreDevelopment.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2466,7 +2466,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.ProcessMapWellboreDevelopment", b => diff --git a/AsbCloudDb/Migrations/20230925132919_Update_ProcessMapWellboreDevelopment.cs b/AsbCloudDb/Migrations/20230925132919_Update_ProcessMapWellboreDevelopment.cs index f7458386..527e7e17 100644 --- a/AsbCloudDb/Migrations/20230925132919_Update_ProcessMapWellboreDevelopment.cs +++ b/AsbCloudDb/Migrations/20230925132919_Update_ProcessMapWellboreDevelopment.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20230928055323_WellOperations_Add_OnDelete_SetNull_Behavior.Designer.cs b/AsbCloudDb/Migrations/20230928055323_WellOperations_Add_OnDelete_SetNull_Behavior.Designer.cs index 52274aa0..28b04d38 100644 --- a/AsbCloudDb/Migrations/20230928055323_WellOperations_Add_OnDelete_SetNull_Behavior.Designer.cs +++ b/AsbCloudDb/Migrations/20230928055323_WellOperations_Add_OnDelete_SetNull_Behavior.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2472,7 +2472,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.ProcessMapWellboreDevelopment", b => diff --git a/AsbCloudDb/Migrations/20230928055323_WellOperations_Add_OnDelete_SetNull_Behavior.cs b/AsbCloudDb/Migrations/20230928055323_WellOperations_Add_OnDelete_SetNull_Behavior.cs index edf35493..5d3d51ed 100644 --- a/AsbCloudDb/Migrations/20230928055323_WellOperations_Add_OnDelete_SetNull_Behavior.cs +++ b/AsbCloudDb/Migrations/20230928055323_WellOperations_Add_OnDelete_SetNull_Behavior.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231012063505_Add_Contacts.Designer.cs b/AsbCloudDb/Migrations/20231012063505_Add_Contacts.Designer.cs index f615832f..9254ac91 100644 --- a/AsbCloudDb/Migrations/20231012063505_Add_Contacts.Designer.cs +++ b/AsbCloudDb/Migrations/20231012063505_Add_Contacts.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2531,7 +2531,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.ProcessMapWellboreDevelopment", b => diff --git a/AsbCloudDb/Migrations/20231012063505_Add_Contacts.cs b/AsbCloudDb/Migrations/20231012063505_Add_Contacts.cs index c809faed..2f85c98c 100644 --- a/AsbCloudDb/Migrations/20231012063505_Add_Contacts.cs +++ b/AsbCloudDb/Migrations/20231012063505_Add_Contacts.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable diff --git a/AsbCloudDb/Migrations/20231012063841_Add_Permission_Delete_To_Well_Contact.Designer.cs b/AsbCloudDb/Migrations/20231012063841_Add_Permission_Delete_To_Well_Contact.Designer.cs index e67f6bcf..5ff9c558 100644 --- a/AsbCloudDb/Migrations/20231012063841_Add_Permission_Delete_To_Well_Contact.Designer.cs +++ b/AsbCloudDb/Migrations/20231012063841_Add_Permission_Delete_To_Well_Contact.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2537,7 +2537,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.ProcessMapWellboreDevelopment", b => diff --git a/AsbCloudDb/Migrations/20231012063841_Add_Permission_Delete_To_Well_Contact.cs b/AsbCloudDb/Migrations/20231012063841_Add_Permission_Delete_To_Well_Contact.cs index d5567365..3ad0d7eb 100644 --- a/AsbCloudDb/Migrations/20231012063841_Add_Permission_Delete_To_Well_Contact.cs +++ b/AsbCloudDb/Migrations/20231012063841_Add_Permission_Delete_To_Well_Contact.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231012064318_Add_Well_To_Contacts.Designer.cs b/AsbCloudDb/Migrations/20231012064318_Add_Well_To_Contacts.Designer.cs index e056ec19..9941e33d 100644 --- a/AsbCloudDb/Migrations/20231012064318_Add_Well_To_Contacts.Designer.cs +++ b/AsbCloudDb/Migrations/20231012064318_Add_Well_To_Contacts.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2545,7 +2545,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.ProcessMapWellboreDevelopment", b => diff --git a/AsbCloudDb/Migrations/20231012064318_Add_Well_To_Contacts.cs b/AsbCloudDb/Migrations/20231012064318_Add_Well_To_Contacts.cs index e806529c..ccfc2aeb 100644 --- a/AsbCloudDb/Migrations/20231012064318_Add_Well_To_Contacts.cs +++ b/AsbCloudDb/Migrations/20231012064318_Add_Well_To_Contacts.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231012070239_Update_Process_Maps.Designer.cs b/AsbCloudDb/Migrations/20231012070239_Update_Process_Maps.Designer.cs index 0d5c7375..fdadc2a4 100644 --- a/AsbCloudDb/Migrations/20231012070239_Update_Process_Maps.Designer.cs +++ b/AsbCloudDb/Migrations/20231012070239_Update_Process_Maps.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231012070239_Update_Process_Maps.cs b/AsbCloudDb/Migrations/20231012070239_Update_Process_Maps.cs index 701b4862..559b9db7 100644 --- a/AsbCloudDb/Migrations/20231012070239_Update_Process_Maps.cs +++ b/AsbCloudDb/Migrations/20231012070239_Update_Process_Maps.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable @@ -103,7 +103,7 @@ namespace AsbCloudDb.Migrations migrationBuilder.AlterTable( name: "t_process_map_well_drilling", comment: "РТК бурение скважины", - oldComment: "Операции по скважине – РТК"); + oldComment: "Операции по скважине - РТК"); migrationBuilder.AlterColumn( name: "depth_start", @@ -319,7 +319,7 @@ namespace AsbCloudDb.Migrations migrationBuilder.AlterTable( name: "t_process_map", - comment: "Операции по скважине – РТК", + comment: "Операции по скважине - РТК", oldComment: "РТК бурение скважины"); migrationBuilder.AlterColumn( diff --git a/AsbCloudDb/Migrations/20231013103735_Update_WellContacts_Set_FullName.Designer.cs b/AsbCloudDb/Migrations/20231013103735_Update_WellContacts_Set_FullName.Designer.cs index ccf2be29..c68923fd 100644 --- a/AsbCloudDb/Migrations/20231013103735_Update_WellContacts_Set_FullName.Designer.cs +++ b/AsbCloudDb/Migrations/20231013103735_Update_WellContacts_Set_FullName.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -2545,7 +2545,7 @@ namespace AsbCloudDb.Migrations b.ToTable("t_process_map"); - b.HasComment("Операции по скважине – РТК"); + b.HasComment("Операции по скважине - РТК"); }); modelBuilder.Entity("AsbCloudDb.Model.ProcessMapWellboreDevelopment", b => diff --git a/AsbCloudDb/Migrations/20231013103735_Update_WellContacts_Set_FullName.cs b/AsbCloudDb/Migrations/20231013103735_Update_WellContacts_Set_FullName.cs index 02242570..7da780ca 100644 --- a/AsbCloudDb/Migrations/20231013103735_Update_WellContacts_Set_FullName.cs +++ b/AsbCloudDb/Migrations/20231013103735_Update_WellContacts_Set_FullName.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231017094813_Add_Drill_Test.Designer.cs b/AsbCloudDb/Migrations/20231017094813_Add_Drill_Test.Designer.cs index 1b2cf452..a1d104d6 100644 --- a/AsbCloudDb/Migrations/20231017094813_Add_Drill_Test.Designer.cs +++ b/AsbCloudDb/Migrations/20231017094813_Add_Drill_Test.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231017094813_Add_Drill_Test.cs b/AsbCloudDb/Migrations/20231017094813_Add_Drill_Test.cs index d5d47871..1e6fb2eb 100644 --- a/AsbCloudDb/Migrations/20231017094813_Add_Drill_Test.cs +++ b/AsbCloudDb/Migrations/20231017094813_Add_Drill_Test.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231101110412_Update_EntityFillerSubsystem.Designer.cs b/AsbCloudDb/Migrations/20231101110412_Update_EntityFillerSubsystem.Designer.cs index b461d11a..d2d4a248 100644 --- a/AsbCloudDb/Migrations/20231101110412_Update_EntityFillerSubsystem.Designer.cs +++ b/AsbCloudDb/Migrations/20231101110412_Update_EntityFillerSubsystem.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231101110412_Update_EntityFillerSubsystem.cs b/AsbCloudDb/Migrations/20231101110412_Update_EntityFillerSubsystem.cs index 97a9b327..3ac31a32 100644 --- a/AsbCloudDb/Migrations/20231101110412_Update_EntityFillerSubsystem.cs +++ b/AsbCloudDb/Migrations/20231101110412_Update_EntityFillerSubsystem.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231102045101_Rename_Field_IsContact_In_CompanyType.Designer.cs b/AsbCloudDb/Migrations/20231102045101_Rename_Field_IsContact_In_CompanyType.Designer.cs index 80bf45e0..30a01afc 100644 --- a/AsbCloudDb/Migrations/20231102045101_Rename_Field_IsContact_In_CompanyType.Designer.cs +++ b/AsbCloudDb/Migrations/20231102045101_Rename_Field_IsContact_In_CompanyType.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231102045101_Rename_Field_IsContact_In_CompanyType.cs b/AsbCloudDb/Migrations/20231102045101_Rename_Field_IsContact_In_CompanyType.cs index fb5c8934..7e2f5693 100644 --- a/AsbCloudDb/Migrations/20231102045101_Rename_Field_IsContact_In_CompanyType.cs +++ b/AsbCloudDb/Migrations/20231102045101_Rename_Field_IsContact_In_CompanyType.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231102045600_Add_Or_Update_Data_In_CompanyType.Designer.cs b/AsbCloudDb/Migrations/20231102045600_Add_Or_Update_Data_In_CompanyType.Designer.cs index 53ee86ab..e55085be 100644 --- a/AsbCloudDb/Migrations/20231102045600_Add_Or_Update_Data_In_CompanyType.Designer.cs +++ b/AsbCloudDb/Migrations/20231102045600_Add_Or_Update_Data_In_CompanyType.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231102045600_Add_Or_Update_Data_In_CompanyType.cs b/AsbCloudDb/Migrations/20231102045600_Add_Or_Update_Data_In_CompanyType.cs index 45cd4795..07a461f2 100644 --- a/AsbCloudDb/Migrations/20231102045600_Add_Or_Update_Data_In_CompanyType.cs +++ b/AsbCloudDb/Migrations/20231102045600_Add_Or_Update_Data_In_CompanyType.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231107091439_Add_Data_To_WellSectionType.Designer.cs b/AsbCloudDb/Migrations/20231107091439_Add_Data_To_WellSectionType.Designer.cs index 23c90735..6fa59af8 100644 --- a/AsbCloudDb/Migrations/20231107091439_Add_Data_To_WellSectionType.Designer.cs +++ b/AsbCloudDb/Migrations/20231107091439_Add_Data_To_WellSectionType.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231107091439_Add_Data_To_WellSectionType.cs b/AsbCloudDb/Migrations/20231107091439_Add_Data_To_WellSectionType.cs index c745692f..48649536 100644 --- a/AsbCloudDb/Migrations/20231107091439_Add_Data_To_WellSectionType.cs +++ b/AsbCloudDb/Migrations/20231107091439_Add_Data_To_WellSectionType.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231110080246_UpdateTable_t_telemetry_data_Set_ImportantColumns_NotNull.Designer.cs b/AsbCloudDb/Migrations/20231110080246_UpdateTable_t_telemetry_data_Set_ImportantColumns_NotNull.Designer.cs index 0b6a77d5..3ad8b8f3 100644 --- a/AsbCloudDb/Migrations/20231110080246_UpdateTable_t_telemetry_data_Set_ImportantColumns_NotNull.Designer.cs +++ b/AsbCloudDb/Migrations/20231110080246_UpdateTable_t_telemetry_data_Set_ImportantColumns_NotNull.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231110080246_UpdateTable_t_telemetry_data_Set_ImportantColumns_NotNull.cs b/AsbCloudDb/Migrations/20231110080246_UpdateTable_t_telemetry_data_Set_ImportantColumns_NotNull.cs index 0252def1..1aa7539b 100644 --- a/AsbCloudDb/Migrations/20231110080246_UpdateTable_t_telemetry_data_Set_ImportantColumns_NotNull.cs +++ b/AsbCloudDb/Migrations/20231110080246_UpdateTable_t_telemetry_data_Set_ImportantColumns_NotNull.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231110094226_UpdateTable_t_contact_Set_Email_and_Phone_Nullable.Designer.cs b/AsbCloudDb/Migrations/20231110094226_UpdateTable_t_contact_Set_Email_and_Phone_Nullable.Designer.cs index 11a21c37..59c14f94 100644 --- a/AsbCloudDb/Migrations/20231110094226_UpdateTable_t_contact_Set_Email_and_Phone_Nullable.Designer.cs +++ b/AsbCloudDb/Migrations/20231110094226_UpdateTable_t_contact_Set_Email_and_Phone_Nullable.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231110094226_UpdateTable_t_contact_Set_Email_and_Phone_Nullable.cs b/AsbCloudDb/Migrations/20231110094226_UpdateTable_t_contact_Set_Email_and_Phone_Nullable.cs index 46c2fef2..16a41147 100644 --- a/AsbCloudDb/Migrations/20231110094226_UpdateTable_t_contact_Set_Email_and_Phone_Nullable.cs +++ b/AsbCloudDb/Migrations/20231110094226_UpdateTable_t_contact_Set_Email_and_Phone_Nullable.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231114051111_Update_DailyReport.Designer.cs b/AsbCloudDb/Migrations/20231114051111_Update_DailyReport.Designer.cs index 23c75c4b..a29bcaad 100644 --- a/AsbCloudDb/Migrations/20231114051111_Update_DailyReport.Designer.cs +++ b/AsbCloudDb/Migrations/20231114051111_Update_DailyReport.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231114051111_Update_DailyReport.cs b/AsbCloudDb/Migrations/20231114051111_Update_DailyReport.cs index e4bac241..6a281f05 100644 --- a/AsbCloudDb/Migrations/20231114051111_Update_DailyReport.cs +++ b/AsbCloudDb/Migrations/20231114051111_Update_DailyReport.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20231115120948_Add_Fact_Trajectory_Table.Designer.cs b/AsbCloudDb/Migrations/20231115120948_Add_Fact_Trajectory_Table.Designer.cs index ed795ae6..f5c1a65b 100644 --- a/AsbCloudDb/Migrations/20231115120948_Add_Fact_Trajectory_Table.Designer.cs +++ b/AsbCloudDb/Migrations/20231115120948_Add_Fact_Trajectory_Table.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231115120948_Add_Fact_Trajectory_Table.cs b/AsbCloudDb/Migrations/20231115120948_Add_Fact_Trajectory_Table.cs index e61f52c8..d0a8d573 100644 --- a/AsbCloudDb/Migrations/20231115120948_Add_Fact_Trajectory_Table.cs +++ b/AsbCloudDb/Migrations/20231115120948_Add_Fact_Trajectory_Table.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20231123085551_Add_New_WellOperationCategories.Designer.cs b/AsbCloudDb/Migrations/20231123085551_Add_New_WellOperationCategories.Designer.cs index a74ef02e..33ba93a6 100644 --- a/AsbCloudDb/Migrations/20231123085551_Add_New_WellOperationCategories.Designer.cs +++ b/AsbCloudDb/Migrations/20231123085551_Add_New_WellOperationCategories.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231123085551_Add_New_WellOperationCategories.cs b/AsbCloudDb/Migrations/20231123085551_Add_New_WellOperationCategories.cs index 2d6bebc5..9e6d5092 100644 --- a/AsbCloudDb/Migrations/20231123085551_Add_New_WellOperationCategories.cs +++ b/AsbCloudDb/Migrations/20231123085551_Add_New_WellOperationCategories.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231127114017_Update_t_planned_trajectory.Designer.cs b/AsbCloudDb/Migrations/20231127114017_Update_t_planned_trajectory.Designer.cs index 52768caa..1b563e69 100644 --- a/AsbCloudDb/Migrations/20231127114017_Update_t_planned_trajectory.Designer.cs +++ b/AsbCloudDb/Migrations/20231127114017_Update_t_planned_trajectory.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231127114017_Update_t_planned_trajectory.cs b/AsbCloudDb/Migrations/20231127114017_Update_t_planned_trajectory.cs index 3175bb9e..8868a2f8 100644 --- a/AsbCloudDb/Migrations/20231127114017_Update_t_planned_trajectory.cs +++ b/AsbCloudDb/Migrations/20231127114017_Update_t_planned_trajectory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231129111522_Rename_t_trajectory_plan.Designer.cs b/AsbCloudDb/Migrations/20231129111522_Rename_t_trajectory_plan.Designer.cs index cb769398..52a23f95 100644 --- a/AsbCloudDb/Migrations/20231129111522_Rename_t_trajectory_plan.Designer.cs +++ b/AsbCloudDb/Migrations/20231129111522_Rename_t_trajectory_plan.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231129111522_Rename_t_trajectory_plan.cs b/AsbCloudDb/Migrations/20231129111522_Rename_t_trajectory_plan.cs index b6644976..bc7b4a40 100644 --- a/AsbCloudDb/Migrations/20231129111522_Rename_t_trajectory_plan.cs +++ b/AsbCloudDb/Migrations/20231129111522_Rename_t_trajectory_plan.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231204094830_Add_WellSectionPlan.Designer.cs b/AsbCloudDb/Migrations/20231204094830_Add_WellSectionPlan.Designer.cs index 5c8565a1..63040ba4 100644 --- a/AsbCloudDb/Migrations/20231204094830_Add_WellSectionPlan.Designer.cs +++ b/AsbCloudDb/Migrations/20231204094830_Add_WellSectionPlan.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231204094830_Add_WellSectionPlan.cs b/AsbCloudDb/Migrations/20231204094830_Add_WellSectionPlan.cs index 197f4a58..5f088451 100644 --- a/AsbCloudDb/Migrations/20231204094830_Add_WellSectionPlan.cs +++ b/AsbCloudDb/Migrations/20231204094830_Add_WellSectionPlan.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20231205062914_Daily_report_lost_migration.Designer.cs b/AsbCloudDb/Migrations/20231205062914_Daily_report_lost_migration.Designer.cs index fd4ff53b..0046410b 100644 --- a/AsbCloudDb/Migrations/20231205062914_Daily_report_lost_migration.Designer.cs +++ b/AsbCloudDb/Migrations/20231205062914_Daily_report_lost_migration.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231205062914_Daily_report_lost_migration.cs b/AsbCloudDb/Migrations/20231205062914_Daily_report_lost_migration.cs index ec314216..5309fb4d 100644 --- a/AsbCloudDb/Migrations/20231205062914_Daily_report_lost_migration.cs +++ b/AsbCloudDb/Migrations/20231205062914_Daily_report_lost_migration.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.Designer.cs b/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.Designer.cs index 188c3aaf..7847901e 100644 --- a/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.Designer.cs +++ b/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Collections.Generic; using System.Text.Json; diff --git a/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.cs b/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.cs index de054b29..ae36d1eb 100644 --- a/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.cs +++ b/AsbCloudDb/Migrations/20231205063450_DetectedOperation_add_subsystems_and_extraData.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231216060437_Update_Subsystems.Designer.cs b/AsbCloudDb/Migrations/20231216060437_Update_Subsystems.Designer.cs index a09d316b..26f082cc 100644 --- a/AsbCloudDb/Migrations/20231216060437_Update_Subsystems.Designer.cs +++ b/AsbCloudDb/Migrations/20231216060437_Update_Subsystems.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231216060437_Update_Subsystems.cs b/AsbCloudDb/Migrations/20231216060437_Update_Subsystems.cs index 40643d71..d3838c18 100644 --- a/AsbCloudDb/Migrations/20231216060437_Update_Subsystems.cs +++ b/AsbCloudDb/Migrations/20231216060437_Update_Subsystems.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20231218192700_Update_DetectedOperations_And_Subsystems.Designer.cs b/AsbCloudDb/Migrations/20231218192700_Update_DetectedOperations_And_Subsystems.Designer.cs index e72e09a5..a2e1edf0 100644 --- a/AsbCloudDb/Migrations/20231218192700_Update_DetectedOperations_And_Subsystems.Designer.cs +++ b/AsbCloudDb/Migrations/20231218192700_Update_DetectedOperations_And_Subsystems.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231218192700_Update_DetectedOperations_And_Subsystems.cs b/AsbCloudDb/Migrations/20231218192700_Update_DetectedOperations_And_Subsystems.cs index fbb49d7d..9f3ea841 100644 --- a/AsbCloudDb/Migrations/20231218192700_Update_DetectedOperations_And_Subsystems.cs +++ b/AsbCloudDb/Migrations/20231218192700_Update_DetectedOperations_And_Subsystems.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231220091403_UpdateDateFormat_DailyReport.Designer.cs b/AsbCloudDb/Migrations/20231220091403_UpdateDateFormat_DailyReport.Designer.cs index c5bba58a..7cc704dd 100644 --- a/AsbCloudDb/Migrations/20231220091403_UpdateDateFormat_DailyReport.Designer.cs +++ b/AsbCloudDb/Migrations/20231220091403_UpdateDateFormat_DailyReport.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231220091403_UpdateDateFormat_DailyReport.cs b/AsbCloudDb/Migrations/20231220091403_UpdateDateFormat_DailyReport.cs index c2771eeb..2b553026 100644 --- a/AsbCloudDb/Migrations/20231220091403_UpdateDateFormat_DailyReport.cs +++ b/AsbCloudDb/Migrations/20231220091403_UpdateDateFormat_DailyReport.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20231226070850_Update_Table_WellOperation_set_Categories.Designer.cs b/AsbCloudDb/Migrations/20231226070850_Update_Table_WellOperation_set_Categories.Designer.cs index c95d01b9..68b58cb1 100644 --- a/AsbCloudDb/Migrations/20231226070850_Update_Table_WellOperation_set_Categories.Designer.cs +++ b/AsbCloudDb/Migrations/20231226070850_Update_Table_WellOperation_set_Categories.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20231226070850_Update_Table_WellOperation_set_Categories.cs b/AsbCloudDb/Migrations/20231226070850_Update_Table_WellOperation_set_Categories.cs index be2a9a71..282965ff 100644 --- a/AsbCloudDb/Migrations/20231226070850_Update_Table_WellOperation_set_Categories.cs +++ b/AsbCloudDb/Migrations/20231226070850_Update_Table_WellOperation_set_Categories.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20240119062443_Add_processmap_plan_drilling_with_changeLog.Designer.cs b/AsbCloudDb/Migrations/20240119062443_Add_processmap_plan_drilling_with_changeLog.Designer.cs index b57a8b00..49d88632 100644 --- a/AsbCloudDb/Migrations/20240119062443_Add_processmap_plan_drilling_with_changeLog.Designer.cs +++ b/AsbCloudDb/Migrations/20240119062443_Add_processmap_plan_drilling_with_changeLog.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20240119062443_Add_processmap_plan_drilling_with_changeLog.cs b/AsbCloudDb/Migrations/20240119062443_Add_processmap_plan_drilling_with_changeLog.cs index 1f1b4fd7..a5a67384 100644 --- a/AsbCloudDb/Migrations/20240119062443_Add_processmap_plan_drilling_with_changeLog.cs +++ b/AsbCloudDb/Migrations/20240119062443_Add_processmap_plan_drilling_with_changeLog.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20240201060511_Add_Table_DataSaubStat.Designer.cs b/AsbCloudDb/Migrations/20240201060511_Add_Table_DataSaubStat.Designer.cs index 702cb1ea..ddb0d4da 100644 --- a/AsbCloudDb/Migrations/20240201060511_Add_Table_DataSaubStat.Designer.cs +++ b/AsbCloudDb/Migrations/20240201060511_Add_Table_DataSaubStat.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20240201060511_Add_Table_DataSaubStat.cs b/AsbCloudDb/Migrations/20240201060511_Add_Table_DataSaubStat.cs index fbe4048e..c8326b8b 100644 --- a/AsbCloudDb/Migrations/20240201060511_Add_Table_DataSaubStat.cs +++ b/AsbCloudDb/Migrations/20240201060511_Add_Table_DataSaubStat.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20240221064802_Migrate_ProcessMapPlanDrilling.Designer.cs b/AsbCloudDb/Migrations/20240221064802_Migrate_ProcessMapPlanDrilling.Designer.cs index 641669ec..cd42d36b 100644 --- a/AsbCloudDb/Migrations/20240221064802_Migrate_ProcessMapPlanDrilling.Designer.cs +++ b/AsbCloudDb/Migrations/20240221064802_Migrate_ProcessMapPlanDrilling.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20240221064802_Migrate_ProcessMapPlanDrilling.cs b/AsbCloudDb/Migrations/20240221064802_Migrate_ProcessMapPlanDrilling.cs index 8119881b..a2287e6c 100644 --- a/AsbCloudDb/Migrations/20240221064802_Migrate_ProcessMapPlanDrilling.cs +++ b/AsbCloudDb/Migrations/20240221064802_Migrate_ProcessMapPlanDrilling.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable @@ -10,11 +10,11 @@ namespace AsbCloudDb.Migrations { migrationBuilder.Sql (@"insert " + - @"into " + + @"into " + @"public.t_process_map_plan_drilling " + @"(id, " + @"id_mode, " + - @"axial_load_plan, " + + @"axial_load_plan, " + @"axial_load_limit_max, " + @"delta_pressure_plan, " + @"delta_pressure_limit_max, " + diff --git a/AsbCloudDb/Migrations/20240221075904_Add_ProcessMapPlanReams.Designer.cs b/AsbCloudDb/Migrations/20240221075904_Add_ProcessMapPlanReams.Designer.cs index 028b0bc2..b460b5ad 100644 --- a/AsbCloudDb/Migrations/20240221075904_Add_ProcessMapPlanReams.Designer.cs +++ b/AsbCloudDb/Migrations/20240221075904_Add_ProcessMapPlanReams.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20240221075904_Add_ProcessMapPlanReams.cs b/AsbCloudDb/Migrations/20240221075904_Add_ProcessMapPlanReams.cs index 63e070be..7b0389b4 100644 --- a/AsbCloudDb/Migrations/20240221075904_Add_ProcessMapPlanReams.cs +++ b/AsbCloudDb/Migrations/20240221075904_Add_ProcessMapPlanReams.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20240221091530_Remove_old_ProcessMapPlans.Designer.cs b/AsbCloudDb/Migrations/20240221091530_Remove_old_ProcessMapPlans.Designer.cs index 97407889..97908c6c 100644 --- a/AsbCloudDb/Migrations/20240221091530_Remove_old_ProcessMapPlans.Designer.cs +++ b/AsbCloudDb/Migrations/20240221091530_Remove_old_ProcessMapPlans.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20240221091530_Remove_old_ProcessMapPlans.cs b/AsbCloudDb/Migrations/20240221091530_Remove_old_ProcessMapPlans.cs index 652ff3f3..48c6768a 100644 --- a/AsbCloudDb/Migrations/20240221091530_Remove_old_ProcessMapPlans.cs +++ b/AsbCloudDb/Migrations/20240221091530_Remove_old_ProcessMapPlans.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20240329070104_Update_WellOperationCategory_IdConditioning.Designer.cs b/AsbCloudDb/Migrations/20240329070104_Update_WellOperationCategory_IdConditioning.Designer.cs index 9a85b491..9d023d73 100644 --- a/AsbCloudDb/Migrations/20240329070104_Update_WellOperationCategory_IdConditioning.Designer.cs +++ b/AsbCloudDb/Migrations/20240329070104_Update_WellOperationCategory_IdConditioning.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20240329070104_Update_WellOperationCategory_IdConditioning.cs b/AsbCloudDb/Migrations/20240329070104_Update_WellOperationCategory_IdConditioning.cs index e539a2be..72cbf4e6 100644 --- a/AsbCloudDb/Migrations/20240329070104_Update_WellOperationCategory_IdConditioning.cs +++ b/AsbCloudDb/Migrations/20240329070104_Update_WellOperationCategory_IdConditioning.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20240401094602_Update_DetectedOperation.Designer.cs b/AsbCloudDb/Migrations/20240401094602_Update_DetectedOperation.Designer.cs index 7b762673..06a65271 100644 --- a/AsbCloudDb/Migrations/20240401094602_Update_DetectedOperation.Designer.cs +++ b/AsbCloudDb/Migrations/20240401094602_Update_DetectedOperation.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20240401094602_Update_DetectedOperation.cs b/AsbCloudDb/Migrations/20240401094602_Update_DetectedOperation.cs index 570f957e..20892376 100644 --- a/AsbCloudDb/Migrations/20240401094602_Update_DetectedOperation.cs +++ b/AsbCloudDb/Migrations/20240401094602_Update_DetectedOperation.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20240408112202_Add_NewWellOperationCategories.Designer.cs b/AsbCloudDb/Migrations/20240408112202_Add_NewWellOperationCategories.Designer.cs index caa012fc..3c817bd7 100644 --- a/AsbCloudDb/Migrations/20240408112202_Add_NewWellOperationCategories.Designer.cs +++ b/AsbCloudDb/Migrations/20240408112202_Add_NewWellOperationCategories.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20240408112202_Add_NewWellOperationCategories.cs b/AsbCloudDb/Migrations/20240408112202_Add_NewWellOperationCategories.cs index dfa7431e..8deeee4c 100644 --- a/AsbCloudDb/Migrations/20240408112202_Add_NewWellOperationCategories.cs +++ b/AsbCloudDb/Migrations/20240408112202_Add_NewWellOperationCategories.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20240415043251_Update_WellOperationName.Designer.cs b/AsbCloudDb/Migrations/20240415043251_Update_WellOperationName.Designer.cs index 93fe961c..7e529f49 100644 --- a/AsbCloudDb/Migrations/20240415043251_Update_WellOperationName.Designer.cs +++ b/AsbCloudDb/Migrations/20240415043251_Update_WellOperationName.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20240415043251_Update_WellOperationName.cs b/AsbCloudDb/Migrations/20240415043251_Update_WellOperationName.cs index ddb3c3ea..96b91395 100644 --- a/AsbCloudDb/Migrations/20240415043251_Update_WellOperationName.cs +++ b/AsbCloudDb/Migrations/20240415043251_Update_WellOperationName.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20240613110103_Add_ProcessMapPlanRotor_And_Slide.Designer.cs b/AsbCloudDb/Migrations/20240613110103_Add_ProcessMapPlanRotor_And_Slide.Designer.cs index fbd287fc..8ee2c996 100644 --- a/AsbCloudDb/Migrations/20240613110103_Add_ProcessMapPlanRotor_And_Slide.Designer.cs +++ b/AsbCloudDb/Migrations/20240613110103_Add_ProcessMapPlanRotor_And_Slide.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; diff --git a/AsbCloudDb/Migrations/20240613110103_Add_ProcessMapPlanRotor_And_Slide.cs b/AsbCloudDb/Migrations/20240613110103_Add_ProcessMapPlanRotor_And_Slide.cs index 64282d27..e68f31b7 100644 --- a/AsbCloudDb/Migrations/20240613110103_Add_ProcessMapPlanRotor_And_Slide.cs +++ b/AsbCloudDb/Migrations/20240613110103_Add_ProcessMapPlanRotor_And_Slide.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/20240630162502_Add_Tables_ProcessMapOperationsAndFunctions.Designer.cs b/AsbCloudDb/Migrations/20240630162502_Add_Tables_ProcessMapOperationsAndFunctions.Designer.cs index 5c02c0f2..919f84a2 100644 --- a/AsbCloudDb/Migrations/20240630162502_Add_Tables_ProcessMapOperationsAndFunctions.Designer.cs +++ b/AsbCloudDb/Migrations/20240630162502_Add_Tables_ProcessMapOperationsAndFunctions.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -3099,7 +3099,7 @@ namespace AsbCloudDb.Migrations b.Property("RpmRight") .HasColumnType("double precision") - .HasColumnName("Rpm​_right") + .HasColumnName("Rpm_right") .HasComment("Скорость вправо, об/мин"); b.Property("TorqueMaxLeft") diff --git a/AsbCloudDb/Migrations/20240630162502_Add_Tables_ProcessMapOperationsAndFunctions.cs b/AsbCloudDb/Migrations/20240630162502_Add_Tables_ProcessMapOperationsAndFunctions.cs index 03db637a..6564d68c 100644 --- a/AsbCloudDb/Migrations/20240630162502_Add_Tables_ProcessMapOperationsAndFunctions.cs +++ b/AsbCloudDb/Migrations/20240630162502_Add_Tables_ProcessMapOperationsAndFunctions.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; @@ -634,7 +634,7 @@ namespace AsbCloudDb.Migrations id = table.Column(type: "integer", nullable: false, comment: "Идентификатор") .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), optimal_oscillation_angle = table.Column(type: "double precision", nullable: false, comment: "Оптимальный угол осцилляции, градусы"), - Rpm​_right = table.Column(type: "double precision", nullable: false, comment: "Скорость вправо, об/мин"), + Rpm_right = table.Column(type: "double precision", nullable: false, comment: "Скорость вправо, об/мин"), Rpm_left = table.Column(type: "double precision", nullable: false, comment: "Скорость влево, об/мин"), torque_max_right = table.Column(type: "double precision", nullable: false, comment: "Ограничение момента вправо, кН*м"), torque_max_left = table.Column(type: "double precision", nullable: false, comment: "Ограничение момента влево, кН*м"), diff --git a/AsbCloudDb/Migrations/20240701051003_Update_Tables_ProcessMapOperationsAndFunctions.Designer.cs b/AsbCloudDb/Migrations/20240701051003_Update_Tables_ProcessMapOperationsAndFunctions.Designer.cs index 60fdca14..76bd0b18 100644 --- a/AsbCloudDb/Migrations/20240701051003_Update_Tables_ProcessMapOperationsAndFunctions.Designer.cs +++ b/AsbCloudDb/Migrations/20240701051003_Update_Tables_ProcessMapOperationsAndFunctions.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -3106,7 +3106,7 @@ namespace AsbCloudDb.Migrations b.Property("RpmRight") .HasColumnType("double precision") - .HasColumnName("Rpm​_right") + .HasColumnName("Rpm_right") .HasComment("Скорость вправо, об/мин"); b.Property("TorqueMaxLeft") diff --git a/AsbCloudDb/Migrations/20240701051003_Update_Tables_ProcessMapOperationsAndFunctions.cs b/AsbCloudDb/Migrations/20240701051003_Update_Tables_ProcessMapOperationsAndFunctions.cs index 14848042..4333d519 100644 --- a/AsbCloudDb/Migrations/20240701051003_Update_Tables_ProcessMapOperationsAndFunctions.cs +++ b/AsbCloudDb/Migrations/20240701051003_Update_Tables_ProcessMapOperationsAndFunctions.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable diff --git a/AsbCloudDb/Migrations/20240701104026_Remove_some_processMapsPlan.Designer.cs b/AsbCloudDb/Migrations/20240701104026_Remove_some_processMapsPlan.Designer.cs index f8d84fcc..3b5098a2 100644 --- a/AsbCloudDb/Migrations/20240701104026_Remove_some_processMapsPlan.Designer.cs +++ b/AsbCloudDb/Migrations/20240701104026_Remove_some_processMapsPlan.Designer.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -3106,7 +3106,7 @@ namespace AsbCloudDb.Migrations b.Property("RpmRight") .HasColumnType("double precision") - .HasColumnName("Rpm​_right") + .HasColumnName("Rpm_right") .HasComment("Скорость вправо, об/мин"); b.Property("TorqueMaxLeft") diff --git a/AsbCloudDb/Migrations/20240701104026_Remove_some_processMapsPlan.cs b/AsbCloudDb/Migrations/20240701104026_Remove_some_processMapsPlan.cs index a80b396b..510d2703 100644 --- a/AsbCloudDb/Migrations/20240701104026_Remove_some_processMapsPlan.cs +++ b/AsbCloudDb/Migrations/20240701104026_Remove_some_processMapsPlan.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; diff --git a/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs b/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs index 44edc939..cf2b0e3e 100644 --- a/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs +++ b/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using System.Text.Json; using AsbCloudDb.Model; @@ -3103,7 +3103,7 @@ namespace AsbCloudDb.Migrations b.Property("RpmRight") .HasColumnType("double precision") - .HasColumnName("Rpm​_right") + .HasColumnName("Rpm_right") .HasComment("Скорость вправо, об/мин"); b.Property("TorqueMaxLeft") diff --git a/AsbCloudDb/Model/AsbCloudDbContext.cs b/AsbCloudDb/Model/AsbCloudDbContext.cs index 95b3a292..7908dbd6 100644 --- a/AsbCloudDb/Model/AsbCloudDbContext.cs +++ b/AsbCloudDb/Model/AsbCloudDbContext.cs @@ -1,4 +1,4 @@ -using AsbCloudDb.Model.GTR; +using AsbCloudDb.Model.GTR; using Microsoft.EntityFrameworkCore; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudDb/Model/ChangeLogAbstract.cs b/AsbCloudDb/Model/ChangeLogAbstract.cs index 6320c3dc..9ef57caf 100644 --- a/AsbCloudDb/Model/ChangeLogAbstract.cs +++ b/AsbCloudDb/Model/ChangeLogAbstract.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/Cluster.cs b/AsbCloudDb/Model/Cluster.cs index 846a141a..229ae6fa 100644 --- a/AsbCloudDb/Model/Cluster.cs +++ b/AsbCloudDb/Model/Cluster.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/Company.cs b/AsbCloudDb/Model/Company.cs index 4db9573b..c42ddbd2 100644 --- a/AsbCloudDb/Model/Company.cs +++ b/AsbCloudDb/Model/Company.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/CompanyType.cs b/AsbCloudDb/Model/CompanyType.cs index 55525e47..1bd67158 100644 --- a/AsbCloudDb/Model/CompanyType.cs +++ b/AsbCloudDb/Model/CompanyType.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/Contact.cs b/AsbCloudDb/Model/Contact.cs index a804999d..43398cf9 100644 --- a/AsbCloudDb/Model/Contact.cs +++ b/AsbCloudDb/Model/Contact.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/DailyReports/Blocks/Sign/SignBlock.cs b/AsbCloudDb/Model/DailyReports/Blocks/Sign/SignBlock.cs index 2e394f79..ec1cc570 100644 --- a/AsbCloudDb/Model/DailyReports/Blocks/Sign/SignBlock.cs +++ b/AsbCloudDb/Model/DailyReports/Blocks/Sign/SignBlock.cs @@ -2,7 +2,7 @@ namespace AsbCloudDb.Model.DailyReports.Blocks.Sign; public class SignBlock : ItemInfo { - public SignRecord? DrillingMaster { get; set; } - - public SignRecord? Supervisor { get; set; } + public SignRecord? DrillingMaster { get; set; } + + public SignRecord? Supervisor { get; set; } } \ No newline at end of file diff --git a/AsbCloudDb/Model/DailyReports/Blocks/Sign/SignRecord.cs b/AsbCloudDb/Model/DailyReports/Blocks/Sign/SignRecord.cs index 9ea1119e..c8495a38 100644 --- a/AsbCloudDb/Model/DailyReports/Blocks/Sign/SignRecord.cs +++ b/AsbCloudDb/Model/DailyReports/Blocks/Sign/SignRecord.cs @@ -2,9 +2,9 @@ namespace AsbCloudDb.Model.DailyReports.Blocks.Sign; public class SignRecord { - public string Name { get; set; } = null!; + public string Name { get; set; } = null!; - public string Surname { get; set; } = null!; - - public string? Patronymic { get; set; } + public string Surname { get; set; } = null!; + + public string? Patronymic { get; set; } } \ No newline at end of file diff --git a/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemBlock.cs b/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemBlock.cs index 67223138..9c22624e 100644 --- a/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemBlock.cs +++ b/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemBlock.cs @@ -4,15 +4,15 @@ namespace AsbCloudDb.Model.DailyReports.Blocks.Subsystem; public class SubsystemBlock : ItemInfo { - public double? Wellbore { get; set; } - - public double? MeasurementsPerDay { get; set; } - - public double? TvgLagDays { get; set; } + public double? Wellbore { get; set; } + + public double? MeasurementsPerDay { get; set; } + + public double? TvgLagDays { get; set; } - public double? TotalRopPlan { get; set; } + public double? TotalRopPlan { get; set; } - public string? Comment { get; set; } + public string? Comment { get; set; } - public IEnumerable? Subsystems { get; set; } + public IEnumerable? Subsystems { get; set; } } \ No newline at end of file diff --git a/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemParameters.cs b/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemParameters.cs index 839e181c..cb030e25 100644 --- a/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemParameters.cs +++ b/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemParameters.cs @@ -2,9 +2,9 @@ namespace AsbCloudDb.Model.DailyReports.Blocks.Subsystem; public class SubsystemParameters { - public double? SumDepthInterval { get; set; } - - public double? UsedTimeHours { get; set; } - - public double? KUsage { get; set; } + public double? SumDepthInterval { get; set; } + + public double? UsedTimeHours { get; set; } + + public double? KUsage { get; set; } } \ No newline at end of file diff --git a/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemRecord.cs b/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemRecord.cs index 86b376b6..371213d3 100644 --- a/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemRecord.cs +++ b/AsbCloudDb/Model/DailyReports/Blocks/Subsystem/SubsystemRecord.cs @@ -2,9 +2,9 @@ namespace AsbCloudDb.Model.DailyReports.Blocks.Subsystem; public class SubsystemRecord { - public string Name { get; set; } = null!; + public string Name { get; set; } = null!; - public SubsystemParameters? UsagePerDay { get; set; } - - public SubsystemParameters? UsagePerWell { get; set; } + public SubsystemParameters? UsagePerDay { get; set; } + + public SubsystemParameters? UsagePerWell { get; set; } } \ No newline at end of file diff --git a/AsbCloudDb/Model/DailyReports/Blocks/TimeBalance/TimeBalanceBlock.cs b/AsbCloudDb/Model/DailyReports/Blocks/TimeBalance/TimeBalanceBlock.cs index 6af3a946..1b16a34d 100644 --- a/AsbCloudDb/Model/DailyReports/Blocks/TimeBalance/TimeBalanceBlock.cs +++ b/AsbCloudDb/Model/DailyReports/Blocks/TimeBalance/TimeBalanceBlock.cs @@ -4,15 +4,15 @@ namespace AsbCloudDb.Model.DailyReports.Blocks.TimeBalance; public class TimeBalanceBlock : ItemInfo { - public int IdSection { get; set; } + public int IdSection { get; set; } - public string? SectionName { get; set; } + public string? SectionName { get; set; } - public double? WellDepthPlan { get; set; } + public double? WellDepthPlan { get; set; } - public double WellDepthFact { get; set; } + public double WellDepthFact { get; set; } - public double? WellOperationSlipsTimeCount { get; set; } + public double? WellOperationSlipsTimeCount { get; set; } - public IEnumerable? WellOperations { get; set; } + public IEnumerable? WellOperations { get; set; } } \ No newline at end of file diff --git a/AsbCloudDb/Model/DailyReports/Blocks/TimeBalance/TimeBalanceRecord.cs b/AsbCloudDb/Model/DailyReports/Blocks/TimeBalance/TimeBalanceRecord.cs index 5c08ab8c..68a07193 100644 --- a/AsbCloudDb/Model/DailyReports/Blocks/TimeBalance/TimeBalanceRecord.cs +++ b/AsbCloudDb/Model/DailyReports/Blocks/TimeBalance/TimeBalanceRecord.cs @@ -2,15 +2,15 @@ namespace AsbCloudDb.Model.DailyReports.Blocks.TimeBalance; public class TimeBalanceRecord { - public int IdWellOperation { get; set; } - - public double? DurationHoursPlan { get; set; } - - public double? DurationHoursFact { get; set; } - - public double? DrillingDeviationPerSection { get; set; } + public int IdWellOperation { get; set; } + + public double? DurationHoursPlan { get; set; } + + public double? DurationHoursFact { get; set; } + + public double? DrillingDeviationPerSection { get; set; } - public double? DrillingDeviationPerDay { get; set; } - - public string? ReasonDeviation { get; set; } + public double? DrillingDeviationPerDay { get; set; } + + public string? ReasonDeviation { get; set; } } \ No newline at end of file diff --git a/AsbCloudDb/Model/DailyReports/DailyReport.cs b/AsbCloudDb/Model/DailyReports/DailyReport.cs index 8bc99470..6cd7e622 100644 --- a/AsbCloudDb/Model/DailyReports/DailyReport.cs +++ b/AsbCloudDb/Model/DailyReports/DailyReport.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.DailyReports.Blocks.Sign; @@ -11,27 +11,27 @@ namespace AsbCloudDb.Model.DailyReports; [Table("t_daily_report"), Comment("Ежедневные отчёты")] public class DailyReport : IId { - [Key] - public int Id { get; set; } - - [Column("id_well"), Comment("ID скважины")] - public int IdWell { get; set; } + [Key] + public int Id { get; set; } + + [Column("id_well"), Comment("ID скважины")] + public int IdWell { get; set; } - [Column("date_last_update", TypeName = "timestamp with time zone"), Comment("Дата последнего обновления")] - public DateTimeOffset? DateLastUpdate { get; set; } + [Column("date_last_update", TypeName = "timestamp with time zone"), Comment("Дата последнего обновления")] + public DateTimeOffset? DateLastUpdate { get; set; } - [Column("date", TypeName = "date"), Comment("Дата формирования отчёта")] - public DateOnly Date { get; set; } - - [Column("sign_block", TypeName = "jsonb"), Comment("Подпись")] - public SignBlock? SignBlock { get; set; } - - [Column("time_balance_block", TypeName = "jsonb"), Comment("Баланс времени")] - public TimeBalanceBlock? TimeBalanceBlock { get; set; } - - [Column("subsystem_block", TypeName = "jsonb"), Comment("Наработкой подсистем")] - public SubsystemBlock? SubsystemBlock { get; set; } + [Column("date", TypeName = "date"), Comment("Дата формирования отчёта")] + public DateOnly Date { get; set; } + + [Column("sign_block", TypeName = "jsonb"), Comment("Подпись")] + public SignBlock? SignBlock { get; set; } + + [Column("time_balance_block", TypeName = "jsonb"), Comment("Баланс времени")] + public TimeBalanceBlock? TimeBalanceBlock { get; set; } + + [Column("subsystem_block", TypeName = "jsonb"), Comment("Наработкой подсистем")] + public SubsystemBlock? SubsystemBlock { get; set; } - [ForeignKey(nameof(IdWell))] - public virtual Well Well { get; set; } = null!; + [ForeignKey(nameof(IdWell))] + public virtual Well Well { get; set; } = null!; } \ No newline at end of file diff --git a/AsbCloudDb/Model/DataSaubStat.cs b/AsbCloudDb/Model/DataSaubStat.cs index 8871b598..b4017a8e 100644 --- a/AsbCloudDb/Model/DataSaubStat.cs +++ b/AsbCloudDb/Model/DataSaubStat.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/DefaultData/DefaultContextData.cs b/AsbCloudDb/Model/DefaultData/DefaultContextData.cs index 48d5a5cf..302c7f0a 100644 --- a/AsbCloudDb/Model/DefaultData/DefaultContextData.cs +++ b/AsbCloudDb/Model/DefaultData/DefaultContextData.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; diff --git a/AsbCloudDb/Model/DefaultData/EntityFiller.cs b/AsbCloudDb/Model/DefaultData/EntityFiller.cs index f6f5f016..6e63b515 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFiller.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFiller.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; namespace AsbCloudDb.Model.DefaultData diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerCompany.cs b/AsbCloudDb/Model/DefaultData/EntityFillerCompany.cs index d7416fd6..f4957b07 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerCompany.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerCompany.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerCompany : EntityFiller { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerCompanyType.cs b/AsbCloudDb/Model/DefaultData/EntityFillerCompanyType.cs index 68017b47..38b04ffd 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerCompanyType.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerCompanyType.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerCompanyType : EntityFiller { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerFileCategory.cs b/AsbCloudDb/Model/DefaultData/EntityFillerFileCategory.cs index 39ddc2eb..f5754bbd 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerFileCategory.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerFileCategory.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerFileCategory: EntityFiller { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerMeasureCategory.cs b/AsbCloudDb/Model/DefaultData/EntityFillerMeasureCategory.cs index 94713108..1e8855af 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerMeasureCategory.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerMeasureCategory.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerMeasureCategory : EntityFiller { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerPermission.cs b/AsbCloudDb/Model/DefaultData/EntityFillerPermission.cs index 64d3cebe..703331d9 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerPermission.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerPermission.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerPermission : EntityFiller { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserRolePermission.cs b/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserRolePermission.cs index 72a560d3..4d50910a 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserRolePermission.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserRolePermission.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace AsbCloudDb.Model.DefaultData { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserRoleUserRole.cs b/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserRoleUserRole.cs index 87a99eae..c848f559 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserRoleUserRole.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserRoleUserRole.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerRelationUserRoleUserRole: EntityFiller< RelationUserRoleUserRole> { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserUserRole.cs b/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserUserRole.cs index 9d2b3d70..dcb9d7a2 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserUserRole.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerRelationUserUserRole.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerRelationUserUserRole : EntityFiller { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerSubsystem.cs b/AsbCloudDb/Model/DefaultData/EntityFillerSubsystem.cs index 48de1bb4..8529692e 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerSubsystem.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerSubsystem.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerSubsystem : EntityFiller { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerUser.cs b/AsbCloudDb/Model/DefaultData/EntityFillerUser.cs index b67eb3d2..4bfa5542 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerUser.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerUser.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerUser : EntityFiller { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerUserRole.cs b/AsbCloudDb/Model/DefaultData/EntityFillerUserRole.cs index 07d7b9dc..977dfe7f 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerUserRole.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerUserRole.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerUserRole : EntityFiller { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerWellOperationCategory.cs b/AsbCloudDb/Model/DefaultData/EntityFillerWellOperationCategory.cs index 12fa61a7..38dded7d 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerWellOperationCategory.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerWellOperationCategory.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; namespace AsbCloudDb.Model.DefaultData diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerWellSectionType.cs b/AsbCloudDb/Model/DefaultData/EntityFillerWellSectionType.cs index 90d58479..b019b39b 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerWellSectionType.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerWellSectionType.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerWellSectionType : EntityFiller { diff --git a/AsbCloudDb/Model/DefaultData/EntityFillerWellType.cs b/AsbCloudDb/Model/DefaultData/EntityFillerWellType.cs index 895f8f1e..e433b19d 100644 --- a/AsbCloudDb/Model/DefaultData/EntityFillerWellType.cs +++ b/AsbCloudDb/Model/DefaultData/EntityFillerWellType.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model.DefaultData +namespace AsbCloudDb.Model.DefaultData { internal class EntityFillerWellType : EntityFiller { diff --git a/AsbCloudDb/Model/DefaultData/EntityNotificationCategory.cs b/AsbCloudDb/Model/DefaultData/EntityNotificationCategory.cs index 2a2e5eab..f37782d8 100644 --- a/AsbCloudDb/Model/DefaultData/EntityNotificationCategory.cs +++ b/AsbCloudDb/Model/DefaultData/EntityNotificationCategory.cs @@ -2,8 +2,8 @@ namespace AsbCloudDb.Model.DefaultData; public class EntityNotificationCategory : EntityFiller { - public override NotificationCategory[] GetData() => new NotificationCategory[] - { - new() { Id = NotificationCategory.IdSystemNotificationCategory, Name = "Системные уведомления" } - }; + public override NotificationCategory[] GetData() => new NotificationCategory[] + { + new() { Id = NotificationCategory.IdSystemNotificationCategory, Name = "Системные уведомления" } + }; } \ No newline at end of file diff --git a/AsbCloudDb/Model/DefaultData/IEntityFiller.cs b/AsbCloudDb/Model/DefaultData/IEntityFiller.cs index d505790f..28779d36 100644 --- a/AsbCloudDb/Model/DefaultData/IEntityFiller.cs +++ b/AsbCloudDb/Model/DefaultData/IEntityFiller.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; namespace AsbCloudDb.Model.DefaultData { diff --git a/AsbCloudDb/Model/Deposit.cs b/AsbCloudDb/Model/Deposit.cs index 44468bb6..ce19cc5f 100644 --- a/AsbCloudDb/Model/Deposit.cs +++ b/AsbCloudDb/Model/Deposit.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/DetectedOperation.cs b/AsbCloudDb/Model/DetectedOperation.cs index 611e933d..ff6e6350 100644 --- a/AsbCloudDb/Model/DetectedOperation.cs +++ b/AsbCloudDb/Model/DetectedOperation.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudDb/Model/DrillTest.cs b/AsbCloudDb/Model/DrillTest.cs index 52d29d1a..d64bcf01 100644 --- a/AsbCloudDb/Model/DrillTest.cs +++ b/AsbCloudDb/Model/DrillTest.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudDb/Model/DrillTestParameter.cs b/AsbCloudDb/Model/DrillTestParameter.cs index 457de46a..f8296156 100644 --- a/AsbCloudDb/Model/DrillTestParameter.cs +++ b/AsbCloudDb/Model/DrillTestParameter.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/Driller.cs b/AsbCloudDb/Model/Driller.cs index cb2a30d5..da310bd3 100644 --- a/AsbCloudDb/Model/Driller.cs +++ b/AsbCloudDb/Model/Driller.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/DrillingProgramPart.cs b/AsbCloudDb/Model/DrillingProgramPart.cs index 62da8567..35441961 100644 --- a/AsbCloudDb/Model/DrillingProgramPart.cs +++ b/AsbCloudDb/Model/DrillingProgramPart.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/Faq.cs b/AsbCloudDb/Model/Faq.cs index c02bd793..0ed74842 100644 --- a/AsbCloudDb/Model/Faq.cs +++ b/AsbCloudDb/Model/Faq.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/FileCategory.cs b/AsbCloudDb/Model/FileCategory.cs index ca47394c..2d29e8c6 100644 --- a/AsbCloudDb/Model/FileCategory.cs +++ b/AsbCloudDb/Model/FileCategory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/FileInfo.cs b/AsbCloudDb/Model/FileInfo.cs index 31ab234a..a683c4cf 100644 --- a/AsbCloudDb/Model/FileInfo.cs +++ b/AsbCloudDb/Model/FileInfo.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudDb/Model/GTR/WitsItemBase.cs b/AsbCloudDb/Model/GTR/WitsItemBase.cs index 7d01b106..9b1f48ef 100644 --- a/AsbCloudDb/Model/GTR/WitsItemBase.cs +++ b/AsbCloudDb/Model/GTR/WitsItemBase.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/HelpPage.cs b/AsbCloudDb/Model/HelpPage.cs index fe84254f..e37ca926 100644 --- a/AsbCloudDb/Model/HelpPage.cs +++ b/AsbCloudDb/Model/HelpPage.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization; diff --git a/AsbCloudDb/Model/IAsbCloudDbContext.cs b/AsbCloudDb/Model/IAsbCloudDbContext.cs index f7860f18..a0828c2a 100644 --- a/AsbCloudDb/Model/IAsbCloudDbContext.cs +++ b/AsbCloudDb/Model/IAsbCloudDbContext.cs @@ -1,4 +1,4 @@ -using AsbCloudDb.Model.GTR; +using AsbCloudDb.Model.GTR; using AsbCloudDb.Model.WITS; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; diff --git a/AsbCloudDb/Model/IId.cs b/AsbCloudDb/Model/IId.cs index 8225abc4..d30e2bae 100644 --- a/AsbCloudDb/Model/IId.cs +++ b/AsbCloudDb/Model/IId.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model +namespace AsbCloudDb.Model { public interface IId { diff --git a/AsbCloudDb/Model/IMapPoint.cs b/AsbCloudDb/Model/IMapPoint.cs index a4083a3a..e5d90fba 100644 --- a/AsbCloudDb/Model/IMapPoint.cs +++ b/AsbCloudDb/Model/IMapPoint.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model +namespace AsbCloudDb.Model { public interface IMapPoint { diff --git a/AsbCloudDb/Model/ITelemetryData.cs b/AsbCloudDb/Model/ITelemetryData.cs index 0d1517b1..2b3330ab 100644 --- a/AsbCloudDb/Model/ITelemetryData.cs +++ b/AsbCloudDb/Model/ITelemetryData.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudDb.Model { diff --git a/AsbCloudDb/Model/IWellRelated.cs b/AsbCloudDb/Model/IWellRelated.cs index f61aeae6..452fc900 100644 --- a/AsbCloudDb/Model/IWellRelated.cs +++ b/AsbCloudDb/Model/IWellRelated.cs @@ -1,4 +1,4 @@ -namespace AsbCloudDb.Model +namespace AsbCloudDb.Model { /// /// For well related entities diff --git a/AsbCloudDb/Model/ItemInfo.cs b/AsbCloudDb/Model/ItemInfo.cs index c93a74bf..1ab34658 100644 --- a/AsbCloudDb/Model/ItemInfo.cs +++ b/AsbCloudDb/Model/ItemInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudDb.Model { diff --git a/AsbCloudDb/Model/LimitingParameter.cs b/AsbCloudDb/Model/LimitingParameter.cs index 62cc7047..80fb9261 100644 --- a/AsbCloudDb/Model/LimitingParameter.cs +++ b/AsbCloudDb/Model/LimitingParameter.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/Manuals/Manual.cs b/AsbCloudDb/Model/Manuals/Manual.cs index 8ab64735..f5abdd9e 100644 --- a/AsbCloudDb/Model/Manuals/Manual.cs +++ b/AsbCloudDb/Model/Manuals/Manual.cs @@ -8,31 +8,31 @@ namespace AsbCloudDb.Model.Manuals; [Table("t_manual"), Comment("Инструкции")] public class Manual : IId { - [Key] - [Column("id")] - public int Id { get; set; } + [Key] + [Column("id")] + public int Id { get; set; } - [Column("name"), Comment("Название")] - public string Name { get; set; } = null!; - - [Column("date_download", TypeName = "timestamp with time zone"), Comment("Дата загрузки")] + [Column("name"), Comment("Название")] + public string Name { get; set; } = null!; + + [Column("date_download", TypeName = "timestamp with time zone"), Comment("Дата загрузки")] public DateTimeOffset DateDownload { get; set; } - [Column("id_directory"), Comment("Id директории")] - public int IdDirectory { get; set; } - - [Column("id_category"), Comment("Id категории файла")] - public int IdCategory { get; set; } - - [Column("id_author"), Comment("Id автора")] - public int IdAuthor { get; set; } + [Column("id_directory"), Comment("Id директории")] + public int IdDirectory { get; set; } + + [Column("id_category"), Comment("Id категории файла")] + public int IdCategory { get; set; } + + [Column("id_author"), Comment("Id автора")] + public int IdAuthor { get; set; } - [ForeignKey(nameof(IdDirectory))] - public virtual ManualDirectory Directory { get; set; } = null!; + [ForeignKey(nameof(IdDirectory))] + public virtual ManualDirectory Directory { get; set; } = null!; - [ForeignKey(nameof(IdCategory))] - public virtual FileCategory Category { get; set; } = null!; + [ForeignKey(nameof(IdCategory))] + public virtual FileCategory Category { get; set; } = null!; - [ForeignKey(nameof(IdAuthor))] - public virtual User Author { get; set; } = null!; + [ForeignKey(nameof(IdAuthor))] + public virtual User Author { get; set; } = null!; } \ No newline at end of file diff --git a/AsbCloudDb/Model/Manuals/ManualDirectory.cs b/AsbCloudDb/Model/Manuals/ManualDirectory.cs index b553eb67..e72ac647 100644 --- a/AsbCloudDb/Model/Manuals/ManualDirectory.cs +++ b/AsbCloudDb/Model/Manuals/ManualDirectory.cs @@ -8,20 +8,20 @@ namespace AsbCloudDb.Model.Manuals; [Table("t_manual_directory"), Comment("Директория для инструкций")] public class ManualDirectory : IId { - [Key] - [Column("id")] - public int Id { get; set; } + [Key] + [Column("id")] + public int Id { get; set; } - [Column("name"), Comment("Название")] - public string Name { get; set; } = null!; + [Column("name"), Comment("Название")] + public string Name { get; set; } = null!; - [Column("id_parent"), Comment("Id родительской директории")] - public int? IdParent { get; set; } - - [ForeignKey(nameof(IdParent))] - public virtual ManualDirectory? Parent { get; set; } - - public virtual ICollection? Children { get; set; } - - public virtual ICollection? Manuals { get; set; } + [Column("id_parent"), Comment("Id родительской директории")] + public int? IdParent { get; set; } + + [ForeignKey(nameof(IdParent))] + public virtual ManualDirectory? Parent { get; set; } + + public virtual ICollection? Children { get; set; } + + public virtual ICollection? Manuals { get; set; } } \ No newline at end of file diff --git a/AsbCloudDb/Model/Measure.cs b/AsbCloudDb/Model/Measure.cs index 4493e054..f2d8a13c 100644 --- a/AsbCloudDb/Model/Measure.cs +++ b/AsbCloudDb/Model/Measure.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/MeasureCategory.cs b/AsbCloudDb/Model/MeasureCategory.cs index cbd0f7d1..e219dde6 100644 --- a/AsbCloudDb/Model/MeasureCategory.cs +++ b/AsbCloudDb/Model/MeasureCategory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/Notification.cs b/AsbCloudDb/Model/Notification.cs index bed84a2b..fc9477d9 100644 --- a/AsbCloudDb/Model/Notification.cs +++ b/AsbCloudDb/Model/Notification.cs @@ -8,37 +8,37 @@ namespace AsbCloudDb.Model; [Table("t_notification"), Comment("Уведомления")] public class Notification : IId { - [Key] - [Column("id")] - public int Id { get; set; } - - [Column("id_user"), Comment("Id получателя")] - public int IdUser { get; set; } + [Key] + [Column("id")] + public int Id { get; set; } + + [Column("id_user"), Comment("Id получателя")] + public int IdUser { get; set; } - [Column("id_notification_category"), Comment("Id категории уведомления")] - public int IdNotificationCategory { get; set; } + [Column("id_notification_category"), Comment("Id категории уведомления")] + public int IdNotificationCategory { get; set; } - [Column("title"), Comment("Заголовок уведомления")] - public string Title { get; set; } = null!; + [Column("title"), Comment("Заголовок уведомления")] + public string Title { get; set; } = null!; - [Column("message"), Comment("Сообщение уведомления")] - public string Message { get; set; } = null!; + [Column("message"), Comment("Сообщение уведомления")] + public string Message { get; set; } = null!; - [Column("registration_date"), Comment("Дата регистрации уведомления")] - public DateTimeOffset RegistrationDate { get; set; } + [Column("registration_date"), Comment("Дата регистрации уведомления")] + public DateTimeOffset RegistrationDate { get; set; } - [Column("sent_date"), Comment("Дата отправки уведомления")] - public DateTimeOffset? SentDate { get; set; } - - [Column("read_date"), Comment("Дата прочтения уведомления")] - public DateTimeOffset? ReadDate { get; set; } - - [Column("id_transport_type"), Comment("Id типа доставки уведомления")] - public int IdTransportType { get; set; } + [Column("sent_date"), Comment("Дата отправки уведомления")] + public DateTimeOffset? SentDate { get; set; } + + [Column("read_date"), Comment("Дата прочтения уведомления")] + public DateTimeOffset? ReadDate { get; set; } + + [Column("id_transport_type"), Comment("Id типа доставки уведомления")] + public int IdTransportType { get; set; } - [ForeignKey(nameof(IdNotificationCategory))] - public virtual NotificationCategory NotificationCategory { get; set; } = null!; - - [ForeignKey(nameof(IdUser))] - public virtual User User { get; set; } = null!; + [ForeignKey(nameof(IdNotificationCategory))] + public virtual NotificationCategory NotificationCategory { get; set; } = null!; + + [ForeignKey(nameof(IdUser))] + public virtual User User { get; set; } = null!; } \ No newline at end of file diff --git a/AsbCloudDb/Model/NotificationCategory.cs b/AsbCloudDb/Model/NotificationCategory.cs index 3359ce29..f2fb2de5 100644 --- a/AsbCloudDb/Model/NotificationCategory.cs +++ b/AsbCloudDb/Model/NotificationCategory.cs @@ -16,12 +16,12 @@ public class NotificationCategory : IId #endregion [Key] - [Column("id")] - public int Id { get; set; } + [Column("id")] + public int Id { get; set; } - [Column("name")] - public string Name { get; set; } = null!; + [Column("name")] + public string Name { get; set; } = null!; - [InverseProperty(nameof(Notification.NotificationCategory))] - public virtual ICollection Notifications { get; set; } = null!; + [InverseProperty(nameof(Notification.NotificationCategory))] + public virtual ICollection Notifications { get; set; } = null!; } \ No newline at end of file diff --git a/AsbCloudDb/Model/OperationValue.cs b/AsbCloudDb/Model/OperationValue.cs index 227a4995..fd45a4bb 100644 --- a/AsbCloudDb/Model/OperationValue.cs +++ b/AsbCloudDb/Model/OperationValue.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanAntiCrashRotation.cs b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanAntiCrashRotation.cs index ab4897a2..eee068a1 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanAntiCrashRotation.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanAntiCrashRotation.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanAutoHoldTF.cs b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanAutoHoldTF.cs index 0f0c5f59..e1e3e57c 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanAutoHoldTF.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanAutoHoldTF.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanDamper.cs b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanDamper.cs index 3aac9f5b..55999597 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanDamper.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanDamper.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanDrillTest.cs b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanDrillTest.cs index 2cd80bb9..fba2643b 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanDrillTest.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanDrillTest.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanOscillation.cs b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanOscillation.cs index 81d583a6..d2395669 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanOscillation.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanOscillation.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; @@ -13,7 +13,7 @@ public class ProcessMapPlanOscillation : ProcessMapPlanBase [Required] public double OptimalOscillationAngle { get; set; } - [Column("Rpm​_right"), Comment("Скорость вправо, об/мин")] + [Column("Rpm_right"), Comment("Скорость вправо, об/мин")] [Range(0.0, 270.0)] [Required] public double RpmRight { get; set; } diff --git a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanShockTest.cs b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanShockTest.cs index 6c3e96bd..2ed66028 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanShockTest.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanShockTest.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanStaticMeasurementOutput.cs b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanStaticMeasurementOutput.cs index 5b83873f..372c0dce 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanStaticMeasurementOutput.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Functions/ProcessMapPlanStaticMeasurementOutput.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanLoadCapacity.cs b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanLoadCapacity.cs index b26ae7cb..6d6d2c00 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanLoadCapacity.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanLoadCapacity.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanOscillationAngles.cs b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanOscillationAngles.cs index fc919ff2..d8ebc10c 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanOscillationAngles.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanOscillationAngles.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanPositioningOffTheBottom.cs b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanPositioningOffTheBottom.cs index f7b98337..32e213fc 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanPositioningOffTheBottom.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanPositioningOffTheBottom.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanReamingRotor.cs b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanReamingRotor.cs index 0183a09c..6d529716 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanReamingRotor.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanReamingRotor.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanReamingSlide.cs b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanReamingSlide.cs index 32ddb3b3..d1845786 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanReamingSlide.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanReamingSlide.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanRecordingStaticMeasurement.cs b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanRecordingStaticMeasurement.cs index 5360457b..430e1042 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanRecordingStaticMeasurement.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanRecordingStaticMeasurement.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanSwitchingOffThePump.cs b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanSwitchingOffThePump.cs index 78a0a91d..04148bb1 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanSwitchingOffThePump.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanSwitchingOffThePump.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanSwitchingToTheMode.cs b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanSwitchingToTheMode.cs index 6ea265ea..ac21e961 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanSwitchingToTheMode.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanSwitchingToTheMode.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanTFOrientation.cs b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanTFOrientation.cs index 79247ad9..5f6a4fea 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanTFOrientation.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/Operations/ProcessMapPlanTFOrientation.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AsbCloudDb.Model.ProcessMapPlan; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanBase.cs b/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanBase.cs index 4abc0ad2..174b2106 100644 --- a/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanBase.cs +++ b/AsbCloudDb/Model/ProcessMapPlan/ProcessMapPlanBase.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/RawData.cs b/AsbCloudDb/Model/RawData.cs index a3c030aa..8163122f 100644 --- a/AsbCloudDb/Model/RawData.cs +++ b/AsbCloudDb/Model/RawData.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace AsbCloudDb.Model { diff --git a/AsbCloudDb/Model/RelationCompanyWell.cs b/AsbCloudDb/Model/RelationCompanyWell.cs index 2f7c1705..4aa5b58f 100644 --- a/AsbCloudDb/Model/RelationCompanyWell.cs +++ b/AsbCloudDb/Model/RelationCompanyWell.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudDb.Model diff --git a/AsbCloudDb/Model/RelationContactWell.cs b/AsbCloudDb/Model/RelationContactWell.cs index 3f49f768..99da13ef 100644 --- a/AsbCloudDb/Model/RelationContactWell.cs +++ b/AsbCloudDb/Model/RelationContactWell.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations.Schema; +using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudDb.Model { diff --git a/AsbCloudDb/Model/RelationUserDrillingProgramPart.cs b/AsbCloudDb/Model/RelationUserDrillingProgramPart.cs index b8985337..4be58be4 100644 --- a/AsbCloudDb/Model/RelationUserDrillingProgramPart.cs +++ b/AsbCloudDb/Model/RelationUserDrillingProgramPart.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudDb.Model diff --git a/AsbCloudDb/Model/RelationUserRoleUserRole.cs b/AsbCloudDb/Model/RelationUserRoleUserRole.cs index c8c46edb..20c3a8c2 100644 --- a/AsbCloudDb/Model/RelationUserRoleUserRole.cs +++ b/AsbCloudDb/Model/RelationUserRoleUserRole.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudDb.Model diff --git a/AsbCloudDb/Model/ReportProperty.cs b/AsbCloudDb/Model/ReportProperty.cs index e54837fb..12c0c6a8 100644 --- a/AsbCloudDb/Model/ReportProperty.cs +++ b/AsbCloudDb/Model/ReportProperty.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/Schedule.cs b/AsbCloudDb/Model/Schedule.cs index f8aece41..bc698de7 100644 --- a/AsbCloudDb/Model/Schedule.cs +++ b/AsbCloudDb/Model/Schedule.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/SetpointsRequest.cs b/AsbCloudDb/Model/SetpointsRequest.cs index 568cae28..35556256 100644 --- a/AsbCloudDb/Model/SetpointsRequest.cs +++ b/AsbCloudDb/Model/SetpointsRequest.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudDb/Model/Subsystem.cs b/AsbCloudDb/Model/Subsystem.cs index cbb0539c..72393430 100644 --- a/AsbCloudDb/Model/Subsystem.cs +++ b/AsbCloudDb/Model/Subsystem.cs @@ -1,4 +1,4 @@ -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudDb/Model/Telemetry.cs b/AsbCloudDb/Model/Telemetry.cs index fdc5d1c0..71d5eef4 100644 --- a/AsbCloudDb/Model/Telemetry.cs +++ b/AsbCloudDb/Model/Telemetry.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/TelemetryDataSaub.cs b/AsbCloudDb/Model/TelemetryDataSaub.cs index cfba5fb8..299917ad 100644 --- a/AsbCloudDb/Model/TelemetryDataSaub.cs +++ b/AsbCloudDb/Model/TelemetryDataSaub.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization; diff --git a/AsbCloudDb/Model/TelemetryDataSaubStat.cs b/AsbCloudDb/Model/TelemetryDataSaubStat.cs index 85c81b67..e7939203 100644 --- a/AsbCloudDb/Model/TelemetryDataSaubStat.cs +++ b/AsbCloudDb/Model/TelemetryDataSaubStat.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudDb.Model diff --git a/AsbCloudDb/Model/TelemetryDataSpin.cs b/AsbCloudDb/Model/TelemetryDataSpin.cs index 6499b81d..94031ed9 100644 --- a/AsbCloudDb/Model/TelemetryDataSpin.cs +++ b/AsbCloudDb/Model/TelemetryDataSpin.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization; diff --git a/AsbCloudDb/Model/TelemetryEvent.cs b/AsbCloudDb/Model/TelemetryEvent.cs index 13f6fcf3..153defe6 100644 --- a/AsbCloudDb/Model/TelemetryEvent.cs +++ b/AsbCloudDb/Model/TelemetryEvent.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization; diff --git a/AsbCloudDb/Model/TelemetryInfo.cs b/AsbCloudDb/Model/TelemetryInfo.cs index 1bfda6e2..6afeefc4 100644 --- a/AsbCloudDb/Model/TelemetryInfo.cs +++ b/AsbCloudDb/Model/TelemetryInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudDb.Model { diff --git a/AsbCloudDb/Model/TelemetryMessage.cs b/AsbCloudDb/Model/TelemetryMessage.cs index f4796d66..273d38f8 100644 --- a/AsbCloudDb/Model/TelemetryMessage.cs +++ b/AsbCloudDb/Model/TelemetryMessage.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/TelemetryUser.cs b/AsbCloudDb/Model/TelemetryUser.cs index c47b3eec..f7f0cd6a 100644 --- a/AsbCloudDb/Model/TelemetryUser.cs +++ b/AsbCloudDb/Model/TelemetryUser.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization; diff --git a/AsbCloudDb/Model/TelemetryWirelineRunOut.cs b/AsbCloudDb/Model/TelemetryWirelineRunOut.cs index 0d9ab12c..0ffeba5d 100644 --- a/AsbCloudDb/Model/TelemetryWirelineRunOut.cs +++ b/AsbCloudDb/Model/TelemetryWirelineRunOut.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/Trajectory/Trajectory.cs b/AsbCloudDb/Model/Trajectory/Trajectory.cs index 7d62ba41..a0a9c84d 100644 --- a/AsbCloudDb/Model/Trajectory/Trajectory.cs +++ b/AsbCloudDb/Model/Trajectory/Trajectory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/Trajectory/TrajectoryFact.cs b/AsbCloudDb/Model/Trajectory/TrajectoryFact.cs index 26165da9..4820cfbc 100644 --- a/AsbCloudDb/Model/Trajectory/TrajectoryFact.cs +++ b/AsbCloudDb/Model/Trajectory/TrajectoryFact.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudDb.Model.Trajectory diff --git a/AsbCloudDb/Model/Trajectory/TrajectoryPlan.cs b/AsbCloudDb/Model/Trajectory/TrajectoryPlan.cs index 3f88e0d4..cfe2ac4e 100644 --- a/AsbCloudDb/Model/Trajectory/TrajectoryPlan.cs +++ b/AsbCloudDb/Model/Trajectory/TrajectoryPlan.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudDb.Model.Trajectory diff --git a/AsbCloudDb/Model/User.cs b/AsbCloudDb/Model/User.cs index aa206660..a5136910 100644 --- a/AsbCloudDb/Model/User.cs +++ b/AsbCloudDb/Model/User.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/UserRole.cs b/AsbCloudDb/Model/UserRole.cs index abe9f6ad..90a38693 100644 --- a/AsbCloudDb/Model/UserRole.cs +++ b/AsbCloudDb/Model/UserRole.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/UserSetting.cs b/AsbCloudDb/Model/UserSetting.cs index 84a98d34..f4a93ca9 100644 --- a/AsbCloudDb/Model/UserSetting.cs +++ b/AsbCloudDb/Model/UserSetting.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/WITS/Record7.cs b/AsbCloudDb/Model/WITS/Record7.cs index 0b768243..8c432d20 100644 --- a/AsbCloudDb/Model/WITS/Record7.cs +++ b/AsbCloudDb/Model/WITS/Record7.cs @@ -12,7 +12,7 @@ namespace AsbCloudDb.Model.WITS { /// - /// + /// длина ствола /// RecordId = 7, /// ItemId = 8, /// LongMnemonic = "DEPTSVYM", @@ -88,7 +88,7 @@ namespace AsbCloudDb.Model.WITS public string? Svytype { get; set; } /// - /// + /// зенитный угол /// RecordId = 7, /// ItemId = 13, /// LongMnemonic = "SVYINC", @@ -119,7 +119,7 @@ namespace AsbCloudDb.Model.WITS public float? Svyazu { get; set; } /// - /// + /// азимут географический /// RecordId = 7, /// ItemId = 15, /// LongMnemonic = "SVYAZC", diff --git a/AsbCloudDb/Model/Well.cs b/AsbCloudDb/Model/Well.cs index 1d8ce486..c44d8e03 100644 --- a/AsbCloudDb/Model/Well.cs +++ b/AsbCloudDb/Model/Well.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/WellComposite.cs b/AsbCloudDb/Model/WellComposite.cs index acf6aaf4..7ae2a90f 100644 --- a/AsbCloudDb/Model/WellComposite.cs +++ b/AsbCloudDb/Model/WellComposite.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudDb.Model diff --git a/AsbCloudDb/Model/WellFinalDocument.cs b/AsbCloudDb/Model/WellFinalDocument.cs index f310c7fb..50cb4d9e 100644 --- a/AsbCloudDb/Model/WellFinalDocument.cs +++ b/AsbCloudDb/Model/WellFinalDocument.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations.Schema; namespace AsbCloudDb.Model diff --git a/AsbCloudDb/Model/WellOperation.cs b/AsbCloudDb/Model/WellOperation.cs index 06b330df..c4aa3573 100644 --- a/AsbCloudDb/Model/WellOperation.cs +++ b/AsbCloudDb/Model/WellOperation.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/WellOperationCategory.cs b/AsbCloudDb/Model/WellOperationCategory.cs index 26bee0f3..65cd8255 100644 --- a/AsbCloudDb/Model/WellOperationCategory.cs +++ b/AsbCloudDb/Model/WellOperationCategory.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization; diff --git a/AsbCloudDb/Model/WellSectionType.cs b/AsbCloudDb/Model/WellSectionType.cs index bf470de7..f6e930e8 100644 --- a/AsbCloudDb/Model/WellSectionType.cs +++ b/AsbCloudDb/Model/WellSectionType.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Model/WellSections/WellSectionPlan.cs b/AsbCloudDb/Model/WellSections/WellSectionPlan.cs index 44fec348..3fec54da 100644 --- a/AsbCloudDb/Model/WellSections/WellSectionPlan.cs +++ b/AsbCloudDb/Model/WellSections/WellSectionPlan.cs @@ -7,39 +7,39 @@ namespace AsbCloudDb.Model.WellSections; [Table("t_well_section_plan")] public class WellSectionPlan : IId, - IWellRelated + IWellRelated { - [Key] - [Column("id")] - public int Id { get; set; } + [Key] + [Column("id")] + public int Id { get; set; } - [Column("id_well"), Comment("Id скважины")] - public int IdWell { get; set; } + [Column("id_well"), Comment("Id скважины")] + public int IdWell { get; set; } - [Column("id_section_type"), Comment("Тип секции")] - public int IdSectionType { get; set; } + [Column("id_section_type"), Comment("Тип секции")] + public int IdSectionType { get; set; } - [Column("id_user"), Comment("Id пользователя")] - public int IdUser { get; set; } + [Column("id_user"), Comment("Id пользователя")] + public int IdUser { get; set; } - [Column("date_last_update", TypeName = "timestamp with time zone"), Comment("Дата последнего обновления")] - public DateTimeOffset? LastUpdateDate { get; set; } + [Column("date_last_update", TypeName = "timestamp with time zone"), Comment("Дата последнего обновления")] + public DateTimeOffset? LastUpdateDate { get; set; } - [Column("depth_start"), Comment("Начальная глубина бурения, м")] - public double DepthStart { get; set; } + [Column("depth_start"), Comment("Начальная глубина бурения, м")] + public double DepthStart { get; set; } - [Column("depth_end"), Comment("Конечная глубина бурения, м")] - public double DepthEnd { get; set; } + [Column("depth_end"), Comment("Конечная глубина бурения, м")] + public double DepthEnd { get; set; } - [Column("outer_diameter"), Comment("Внешний диаметр")] - public double? OuterDiameter { get; set; } + [Column("outer_diameter"), Comment("Внешний диаметр")] + public double? OuterDiameter { get; set; } - [Column("inner_diameter"), Comment("Внутренний диаметр")] - public double? InnerDiameter { get; set; } + [Column("inner_diameter"), Comment("Внутренний диаметр")] + public double? InnerDiameter { get; set; } - [ForeignKey(nameof(IdWell))] - public virtual Well Well { get; set; } = null!; + [ForeignKey(nameof(IdWell))] + public virtual Well Well { get; set; } = null!; - [ForeignKey(nameof(IdSectionType))] - public virtual WellSectionType SectionType { get; set; } = null!; + [ForeignKey(nameof(IdSectionType))] + public virtual WellSectionType SectionType { get; set; } = null!; } \ No newline at end of file diff --git a/AsbCloudDb/Model/WellType.cs b/AsbCloudDb/Model/WellType.cs index cfbe1f27..f59abba6 100644 --- a/AsbCloudDb/Model/WellType.cs +++ b/AsbCloudDb/Model/WellType.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; diff --git a/AsbCloudDb/Readme.md b/AsbCloudDb/Readme.md index f44a4167..0ad34426 100644 --- a/AsbCloudDb/Readme.md +++ b/AsbCloudDb/Readme.md @@ -1,4 +1,4 @@ -# Миграции +# Миграции ## EF tools https://docs.microsoft.com/ru-ru/ef/core/cli/dotnet diff --git a/AsbCloudDb/UsefulQueries/Add permission to company for cluster.sql b/AsbCloudDb/UsefulQueries/Add permission to company for cluster.sql index e777397a..da0e242e 100644 --- a/AsbCloudDb/UsefulQueries/Add permission to company for cluster.sql +++ b/AsbCloudDb/UsefulQueries/Add permission to company for cluster.sql @@ -1,4 +1,4 @@ -insert into t_relation_company_well (id_well, id_company ) +insert into t_relation_company_well (id_well, id_company ) Select t_well.id as id_well, 8 as id_company diff --git a/AsbCloudDb/UsefulQueries/Export_for_LMK.sql b/AsbCloudDb/UsefulQueries/Export_for_LMK.sql index 01aad56f..a91bb07e 100644 --- a/AsbCloudDb/UsefulQueries/Export_for_LMK.sql +++ b/AsbCloudDb/UsefulQueries/Export_for_LMK.sql @@ -1,9 +1,9 @@ select t_cluster.caption as cluster, - t_well.caption as well, - t_well.id_telemetry + t_well.caption as well, + t_well.id_telemetry from t_cluster join t_well on t_well.id_cluster = t_cluster.id -where t_cluster.caption in ('82', '50 ', '8', '6 A') and t_well.id_telemetry is not null +where t_cluster.caption in ('82', 'к50 Б', 'к8', '6 A') and t_well.id_telemetry is not null order by cluster , well \copy (select "date", "mode", well_depth, bit_depth, hook_weight, hook_weight_idle, axial_load, block_speed, block_position, rotor_speed, rotor_torque, flow, flow_idle, pressure, pressure_idle from t_telemetry_data_saub where id_telemetry = 137) to '/home/asb/export/dump_c_82_w_2533_t_137.csv' DELIMITER ';' CSV header; diff --git a/AsbCloudDb/UsefulQueries/TimescaleDB.sql b/AsbCloudDb/UsefulQueries/TimescaleDB.sql index 498e640c..f41acce3 100644 --- a/AsbCloudDb/UsefulQueries/TimescaleDB.sql +++ b/AsbCloudDb/UsefulQueries/TimescaleDB.sql @@ -1,4 +1,4 @@ -CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE; +CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE; SELECT create_hypertable( 'tsd.t_tele', diff --git a/AsbCloudDb/UsefulQueries/Update sequence.sql b/AsbCloudDb/UsefulQueries/Update sequence.sql index 61838e7a..0e05e8fd 100644 --- a/AsbCloudDb/UsefulQueries/Update sequence.sql +++ b/AsbCloudDb/UsefulQueries/Update sequence.sql @@ -1 +1 @@ -select setval('t_well_operation_id_seq', 175); \ No newline at end of file +select setval('t_well_operation_id_seq', 175); \ No newline at end of file diff --git a/AsbCloudDb/UsefulQueries/add_all_permissions_to_root.sql b/AsbCloudDb/UsefulQueries/add_all_permissions_to_root.sql index bd77fefe..0ece3b7b 100644 --- a/AsbCloudDb/UsefulQueries/add_all_permissions_to_root.sql +++ b/AsbCloudDb/UsefulQueries/add_all_permissions_to_root.sql @@ -1,12 +1,12 @@ -- Добавить все отсутствующие разрешения группе root. insert into t_relation_user_role_permission - (select - 1 as id_user_role, - id as id_permission - from t_permission - where id not in ( - select - t_relation_user_role_permission.id_permission - from t_relation_user_role_permission - where id_user_role = 1) - ); \ No newline at end of file + (select + 1 as id_user_role, + id as id_permission + from t_permission + where id not in ( + select + t_relation_user_role_permission.id_permission + from t_relation_user_role_permission + where id_user_role = 1) + ); \ No newline at end of file diff --git a/AsbCloudDb/UsefulQueries/lost_telemetries.sql b/AsbCloudDb/UsefulQueries/lost_telemetries.sql index 7b31e11b..a7e3e4ff 100644 --- a/AsbCloudDb/UsefulQueries/lost_telemetries.sql +++ b/AsbCloudDb/UsefulQueries/lost_telemetries.sql @@ -1,3 +1,3 @@ -SELECT * from t_telemetry +SELECT * from t_telemetry left outer join t_well on t_telemetry.id = t_well.id_telemetry where t_well.id is null \ No newline at end of file diff --git a/AsbCloudDb/UsefulQueries/telemetryOperations.sql b/AsbCloudDb/UsefulQueries/telemetryOperations.sql index 31430c48..fc72a1de 100644 --- a/AsbCloudDb/UsefulQueries/telemetryOperations.sql +++ b/AsbCloudDb/UsefulQueries/telemetryOperations.sql @@ -1,4 +1,4 @@ -SELECT +SELECT to_timestamp(unix_date), twoc.name, duration_sec, diff --git a/AsbCloudDb/UsefulQueries/timescale_restore_dump.sql b/AsbCloudDb/UsefulQueries/timescale_restore_dump.sql index f9d908bf..af603524 100644 --- a/AsbCloudDb/UsefulQueries/timescale_restore_dump.sql +++ b/AsbCloudDb/UsefulQueries/timescale_restore_dump.sql @@ -10,12 +10,12 @@ SELECT timescaledb_post_restore(); --https://www.postgresql.org/docs/current/rules-materializedviews.html CREATE MATERIALIZED VIEW mv_telemetry_statistic AS select - id_telemetry, - count(*) as count, - min(date) as date_start, - max(date) as date_end, - min(well_depth) as depth_start, - max(well_depth) as depth_end + id_telemetry, + count(*) as count, + min(date) as date_start, + max(date) as date_end, + min(well_depth) as depth_start, + max(well_depth) as depth_end from t_telemetry_data_saub group by id_telemetry; diff --git a/AsbCloudDb/install pg timescale.md b/AsbCloudDb/install pg timescale.md index 10bb8ab7..f3fe6155 100644 --- a/AsbCloudDb/install pg timescale.md +++ b/AsbCloudDb/install pg timescale.md @@ -41,7 +41,7 @@ change port - replace `port = '5433'` to `port = '5499'` **/etc/postgresql/14/main/pg_hba.conf** Add line to allow your IP: -`host all all /32 scram-sha-256` +`host all all /32 scram-sha-256` ### check connection: `psql -h -p 5499 -d postgres -U postgres -W` diff --git a/AsbCloudInfrastructure/AssemblyExtensions.cs b/AsbCloudInfrastructure/AssemblyExtensions.cs index 03cf7325..b77ed236 100644 --- a/AsbCloudInfrastructure/AssemblyExtensions.cs +++ b/AsbCloudInfrastructure/AssemblyExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using System.Reflection; @@ -7,44 +7,44 @@ using System.Threading.Tasks; namespace AsbCloudInfrastructure { - public static class AssemblyExtensions - { - public static Stream GetTemplateCopyStream(this Assembly assembly, string templateName) - { - var resourceName = assembly - .GetManifestResourceNames() - .FirstOrDefault(n => n.EndsWith(templateName)); + public static class AssemblyExtensions + { + public static Stream GetTemplateCopyStream(this Assembly assembly, string templateName) + { + var resourceName = assembly + .GetManifestResourceNames() + .FirstOrDefault(n => n.EndsWith(templateName)); - if (string.IsNullOrWhiteSpace(resourceName)) - throw new ArgumentNullException(nameof(resourceName)); + if (string.IsNullOrWhiteSpace(resourceName)) + throw new ArgumentNullException(nameof(resourceName)); - using var stream = Assembly.GetExecutingAssembly() - .GetManifestResourceStream(resourceName); + using var stream = Assembly.GetExecutingAssembly() + .GetManifestResourceStream(resourceName); - var memoryStream = new MemoryStream(); - stream?.CopyTo(memoryStream); - memoryStream.Position = 0; + var memoryStream = new MemoryStream(); + stream?.CopyTo(memoryStream); + memoryStream.Position = 0; - return memoryStream; - } + return memoryStream; + } - [Obsolete] - public static async Task GetTemplateCopyStreamAsync(this Assembly assembly, - string templateName, - CancellationToken cancellationToken) - { - var resourceName = assembly - .GetManifestResourceNames() - .FirstOrDefault(n => n.EndsWith(templateName))!; + [Obsolete] + public static async Task GetTemplateCopyStreamAsync(this Assembly assembly, + string templateName, + CancellationToken cancellationToken) + { + var resourceName = assembly + .GetManifestResourceNames() + .FirstOrDefault(n => n.EndsWith(templateName))!; - using var stream = Assembly.GetExecutingAssembly() - .GetManifestResourceStream(resourceName)!; + using var stream = Assembly.GetExecutingAssembly() + .GetManifestResourceStream(resourceName)!; - var memoryStream = new MemoryStream(); - await stream.CopyToAsync(memoryStream, cancellationToken); - memoryStream.Position = 0; + var memoryStream = new MemoryStream(); + await stream.CopyToAsync(memoryStream, cancellationToken); + memoryStream.Position = 0; - return memoryStream; - } - } + return memoryStream; + } + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Background/BackgroundWorker.cs b/AsbCloudInfrastructure/Background/BackgroundWorker.cs index 861c8a47..71426519 100644 --- a/AsbCloudInfrastructure/Background/BackgroundWorker.cs +++ b/AsbCloudInfrastructure/Background/BackgroundWorker.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using System; using System.Collections.Generic; diff --git a/AsbCloudInfrastructure/Background/NotificationBackgroundWorker.cs b/AsbCloudInfrastructure/Background/NotificationBackgroundWorker.cs index 4b68df31..42bceb1b 100644 --- a/AsbCloudInfrastructure/Background/NotificationBackgroundWorker.cs +++ b/AsbCloudInfrastructure/Background/NotificationBackgroundWorker.cs @@ -4,7 +4,7 @@ namespace AsbCloudInfrastructure.Background; public class NotificationBackgroundWorker : BackgroundWorker { - public NotificationBackgroundWorker(IServiceProvider serviceProvider) : base(serviceProvider) - { - } + public NotificationBackgroundWorker(IServiceProvider serviceProvider) : base(serviceProvider) + { + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Background/PeriodicBackgroundWorker.cs b/AsbCloudInfrastructure/Background/PeriodicBackgroundWorker.cs index fbbfd58e..1be737e9 100644 --- a/AsbCloudInfrastructure/Background/PeriodicBackgroundWorker.cs +++ b/AsbCloudInfrastructure/Background/PeriodicBackgroundWorker.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using System; using System.Collections.Generic; diff --git a/AsbCloudInfrastructure/Background/PeriodicWorks/WorkDataSaubStat.cs b/AsbCloudInfrastructure/Background/PeriodicWorks/WorkDataSaubStat.cs index 35979165..c7ea36ff 100644 --- a/AsbCloudInfrastructure/Background/PeriodicWorks/WorkDataSaubStat.cs +++ b/AsbCloudInfrastructure/Background/PeriodicWorks/WorkDataSaubStat.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.DetectedOperation; using AsbCloudApp.Data.SAUB; using AsbCloudApp.Repositories; diff --git a/AsbCloudInfrastructure/Background/PeriodicWorks/WorkLimitingParameterCalc.cs b/AsbCloudInfrastructure/Background/PeriodicWorks/WorkLimitingParameterCalc.cs index 9e6f3629..2b415d1a 100644 --- a/AsbCloudInfrastructure/Background/PeriodicWorks/WorkLimitingParameterCalc.cs +++ b/AsbCloudInfrastructure/Background/PeriodicWorks/WorkLimitingParameterCalc.cs @@ -1,4 +1,4 @@ -using AsbCloudDb.Model; +using AsbCloudDb.Model; using Microsoft.EntityFrameworkCore; using System; using System.Data.Common; diff --git a/AsbCloudInfrastructure/Background/PeriodicWorks/WorkToDeleteOldReports.cs b/AsbCloudInfrastructure/Background/PeriodicWorks/WorkToDeleteOldReports.cs index adb70d32..5a91dedd 100644 --- a/AsbCloudInfrastructure/Background/PeriodicWorks/WorkToDeleteOldReports.cs +++ b/AsbCloudInfrastructure/Background/PeriodicWorks/WorkToDeleteOldReports.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Services; +using AsbCloudApp.Services; using Microsoft.Extensions.DependencyInjection; using System; using System.Threading; diff --git a/AsbCloudInfrastructure/Background/Work.cs b/AsbCloudInfrastructure/Background/Work.cs index 1177892c..db3a888d 100644 --- a/AsbCloudInfrastructure/Background/Work.cs +++ b/AsbCloudInfrastructure/Background/Work.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using System; using System.Diagnostics; using System.Text; diff --git a/AsbCloudInfrastructure/Background/WorkPeriodic.cs b/AsbCloudInfrastructure/Background/WorkPeriodic.cs index 4cd22af6..290b4c8b 100644 --- a/AsbCloudInfrastructure/Background/WorkPeriodic.cs +++ b/AsbCloudInfrastructure/Background/WorkPeriodic.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudInfrastructure.Background; diff --git a/AsbCloudInfrastructure/Background/WorkToCreateReport.cs b/AsbCloudInfrastructure/Background/WorkToCreateReport.cs index f07e7f85..f9508b2a 100644 --- a/AsbCloudInfrastructure/Background/WorkToCreateReport.cs +++ b/AsbCloudInfrastructure/Background/WorkToCreateReport.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Progress; +using AsbCloudApp.Data.Progress; using AsbCloudApp.Requests; using AsbCloudApp.Services; using Microsoft.Extensions.DependencyInjection; diff --git a/AsbCloudInfrastructure/Background/WorkToSendEmail.cs b/AsbCloudInfrastructure/Background/WorkToSendEmail.cs index ef8048e9..d4b20ceb 100644 --- a/AsbCloudInfrastructure/Background/WorkToSendEmail.cs +++ b/AsbCloudInfrastructure/Background/WorkToSendEmail.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using AsbCloudApp.Services.Notifications; using Microsoft.Extensions.DependencyInjection; diff --git a/AsbCloudInfrastructure/Background/readme.md b/AsbCloudInfrastructure/Background/readme.md index 2026f2c4..b58d252d 100644 --- a/AsbCloudInfrastructure/Background/readme.md +++ b/AsbCloudInfrastructure/Background/readme.md @@ -1,11 +1,11 @@ # BackgroundWorker - . - scope. +Класс выполнения разовой фоновой работы. +Для каждой работы создается свой scope. # NotificationBackgroundWorker - . - BackgroundWorker, BackgroundWorker. - . +Предназначен для различных оповещений пользователей разными способами. +Фактически это дополнительный экземпляр BackgroundWorker, чтобы оповещения не ждали завершения долгих операций из стандартного BackgroundWorker. +Не должен давать большой нагрузки БД. # PeriodicBackgroundWorker - . +Класс выполнения периодической фоновой работы. diff --git a/AsbCloudInfrastructure/CommonLibs/Readme.md b/AsbCloudInfrastructure/CommonLibs/Readme.md index 64cb4b4c..f9ec0f79 100644 --- a/AsbCloudInfrastructure/CommonLibs/Readme.md +++ b/AsbCloudInfrastructure/CommonLibs/Readme.md @@ -1,2 +1,2 @@ -# Библиотека формирования рапортов в формате PDF. +# Библиотека формирования рапортов в формате PDF. Для брендирования положить рядом с библиотекой файл logo_720x404.png \ No newline at end of file diff --git a/AsbCloudInfrastructure/DateTimeExtensions.cs b/AsbCloudInfrastructure/DateTimeExtensions.cs index 2e355356..38c24f52 100644 --- a/AsbCloudInfrastructure/DateTimeExtensions.cs +++ b/AsbCloudInfrastructure/DateTimeExtensions.cs @@ -1,4 +1,4 @@ -// Ignore Spelling: Linq +// Ignore Spelling: Linq using System; diff --git a/AsbCloudInfrastructure/DependencyInjection.cs b/AsbCloudInfrastructure/DependencyInjection.cs index 3bd0bbc0..b539e561 100644 --- a/AsbCloudInfrastructure/DependencyInjection.cs +++ b/AsbCloudInfrastructure/DependencyInjection.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.DailyReport.Blocks.TimeBalance; using AsbCloudApp.Data.DetectedOperation; using AsbCloudApp.Data.DrillTestReport; diff --git a/AsbCloudInfrastructure/LinqExtensions.cs b/AsbCloudInfrastructure/LinqExtensions.cs index cf182051..061cc60a 100644 --- a/AsbCloudInfrastructure/LinqExtensions.cs +++ b/AsbCloudInfrastructure/LinqExtensions.cs @@ -1,4 +1,4 @@ -// Ignore Spelling: Linq +// Ignore Spelling: Linq using System; using System.Collections.Generic; diff --git a/AsbCloudInfrastructure/MemoryCacheExtentions.cs b/AsbCloudInfrastructure/MemoryCacheExtentions.cs index 85956230..a8d89010 100644 --- a/AsbCloudInfrastructure/MemoryCacheExtentions.cs +++ b/AsbCloudInfrastructure/MemoryCacheExtentions.cs @@ -1,4 +1,4 @@ -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Caching.Memory; using System; using System.Collections.Generic; diff --git a/AsbCloudInfrastructure/PredicateBuilder.cs b/AsbCloudInfrastructure/PredicateBuilder.cs index 05ca6779..423dec6f 100644 --- a/AsbCloudInfrastructure/PredicateBuilder.cs +++ b/AsbCloudInfrastructure/PredicateBuilder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; diff --git a/AsbCloudInfrastructure/ReportDataSourcePgCloud.cs b/AsbCloudInfrastructure/ReportDataSourcePgCloud.cs index d06a5f1a..8c4333a6 100644 --- a/AsbCloudInfrastructure/ReportDataSourcePgCloud.cs +++ b/AsbCloudInfrastructure/ReportDataSourcePgCloud.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Exceptions; +using AsbCloudApp.Exceptions; using AsbCloudDb.Model; using AsbSaubReport.Model; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudInfrastructure/Repository/CacheBase.cs b/AsbCloudInfrastructure/Repository/CacheBase.cs index 53ac0b93..8db709db 100644 --- a/AsbCloudInfrastructure/Repository/CacheBase.cs +++ b/AsbCloudInfrastructure/Repository/CacheBase.cs @@ -1,4 +1,4 @@ -using AsbCloudDb.Model; +using AsbCloudDb.Model; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Caching.Memory; using System; diff --git a/AsbCloudInfrastructure/Repository/ChangeLogRepositoryAbstract.cs b/AsbCloudInfrastructure/Repository/ChangeLogRepositoryAbstract.cs index 054453e6..157b204d 100644 --- a/AsbCloudInfrastructure/Repository/ChangeLogRepositoryAbstract.cs +++ b/AsbCloudInfrastructure/Repository/ChangeLogRepositoryAbstract.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; diff --git a/AsbCloudInfrastructure/Repository/CrudCacheRepositoryBase.cs b/AsbCloudInfrastructure/Repository/CrudCacheRepositoryBase.cs index 5b761e25..bfa1c410 100644 --- a/AsbCloudInfrastructure/Repository/CrudCacheRepositoryBase.cs +++ b/AsbCloudInfrastructure/Repository/CrudCacheRepositoryBase.cs @@ -13,7 +13,7 @@ namespace AsbCloudInfrastructure.Repository { /// - /// CRUD + /// CRUD сервис с кешем в оперативке /// /// /// @@ -72,7 +72,7 @@ namespace AsbCloudInfrastructure.Repository } /// - /// + /// Синхронно получить запись по ИД /// /// /// diff --git a/AsbCloudInfrastructure/Repository/CrudRepositoryBase.cs b/AsbCloudInfrastructure/Repository/CrudRepositoryBase.cs index 80bc3a99..48fe4c8b 100644 --- a/AsbCloudInfrastructure/Repository/CrudRepositoryBase.cs +++ b/AsbCloudInfrastructure/Repository/CrudRepositoryBase.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Services; +using AsbCloudApp.Services; using AsbCloudDb.Model; using Mapster; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudInfrastructure/Repository/CrudWellRelatedCacheRepositoryBase.cs b/AsbCloudInfrastructure/Repository/CrudWellRelatedCacheRepositoryBase.cs index c02702b5..601ab274 100644 --- a/AsbCloudInfrastructure/Repository/CrudWellRelatedCacheRepositoryBase.cs +++ b/AsbCloudInfrastructure/Repository/CrudWellRelatedCacheRepositoryBase.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Services; +using AsbCloudApp.Services; using AsbCloudDb.Model; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Caching.Memory; diff --git a/AsbCloudInfrastructure/Repository/CrudWellRelatedRepositoryBase.cs b/AsbCloudInfrastructure/Repository/CrudWellRelatedRepositoryBase.cs index d6b267a8..bafb2944 100644 --- a/AsbCloudInfrastructure/Repository/CrudWellRelatedRepositoryBase.cs +++ b/AsbCloudInfrastructure/Repository/CrudWellRelatedRepositoryBase.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Services; +using AsbCloudApp.Services; using AsbCloudDb.Model; using Microsoft.EntityFrameworkCore; using System; diff --git a/AsbCloudInfrastructure/Repository/DataSaubStatRepository.cs b/AsbCloudInfrastructure/Repository/DataSaubStatRepository.cs index 23eba5f9..9d252647 100644 --- a/AsbCloudInfrastructure/Repository/DataSaubStatRepository.cs +++ b/AsbCloudInfrastructure/Repository/DataSaubStatRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using AsbCloudDb.Model; diff --git a/AsbCloudInfrastructure/Repository/DepositRepository.cs b/AsbCloudInfrastructure/Repository/DepositRepository.cs index 344ad0f7..d30470a0 100644 --- a/AsbCloudInfrastructure/Repository/DepositRepository.cs +++ b/AsbCloudInfrastructure/Repository/DepositRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using AsbCloudDb.Model; diff --git a/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs b/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs index 3864b4e1..b788dbda 100644 --- a/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs +++ b/AsbCloudInfrastructure/Repository/DetectedOperationRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.DetectedOperation; +using AsbCloudApp.Data.DetectedOperation; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudInfrastructure/Repository/DrillTestRepository.cs b/AsbCloudInfrastructure/Repository/DrillTestRepository.cs index 96ba0ece..ce27ff0f 100644 --- a/AsbCloudInfrastructure/Repository/DrillTestRepository.cs +++ b/AsbCloudInfrastructure/Repository/DrillTestRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; diff --git a/AsbCloudInfrastructure/Repository/FaqRepository.cs b/AsbCloudInfrastructure/Repository/FaqRepository.cs index efe09074..378a540a 100644 --- a/AsbCloudInfrastructure/Repository/FaqRepository.cs +++ b/AsbCloudInfrastructure/Repository/FaqRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; diff --git a/AsbCloudInfrastructure/Repository/FileRepository.cs b/AsbCloudInfrastructure/Repository/FileRepository.cs index 3e97da03..a01f121b 100644 --- a/AsbCloudInfrastructure/Repository/FileRepository.cs +++ b/AsbCloudInfrastructure/Repository/FileRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudDb; diff --git a/AsbCloudInfrastructure/Repository/FileStorageRepository.cs b/AsbCloudInfrastructure/Repository/FileStorageRepository.cs index 50e9bff5..18afc95f 100644 --- a/AsbCloudInfrastructure/Repository/FileStorageRepository.cs +++ b/AsbCloudInfrastructure/Repository/FileStorageRepository.cs @@ -1,4 +1,4 @@ -using System; +using System; using AsbCloudApp.Data; using AsbCloudApp.Repositories; using System.Collections.Generic; diff --git a/AsbCloudInfrastructure/Repository/GtrWitsRepository.cs b/AsbCloudInfrastructure/Repository/GtrWitsRepository.cs index 3f8333c9..94c89cb1 100644 --- a/AsbCloudInfrastructure/Repository/GtrWitsRepository.cs +++ b/AsbCloudInfrastructure/Repository/GtrWitsRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.GTR; +using AsbCloudApp.Data.GTR; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using AsbCloudDb; diff --git a/AsbCloudInfrastructure/Repository/HelpPageRepository.cs b/AsbCloudInfrastructure/Repository/HelpPageRepository.cs index 562844bc..2b20f293 100644 --- a/AsbCloudInfrastructure/Repository/HelpPageRepository.cs +++ b/AsbCloudInfrastructure/Repository/HelpPageRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using AsbCloudDb.Model; using Mapster; diff --git a/AsbCloudInfrastructure/Repository/LimitingParameterRepository.cs b/AsbCloudInfrastructure/Repository/LimitingParameterRepository.cs index 67fc5960..0ee3e574 100644 --- a/AsbCloudInfrastructure/Repository/LimitingParameterRepository.cs +++ b/AsbCloudInfrastructure/Repository/LimitingParameterRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudDb.Model; diff --git a/AsbCloudInfrastructure/Repository/ManualDirectoryRepository.cs b/AsbCloudInfrastructure/Repository/ManualDirectoryRepository.cs index a5c94944..6627fc75 100644 --- a/AsbCloudInfrastructure/Repository/ManualDirectoryRepository.cs +++ b/AsbCloudInfrastructure/Repository/ManualDirectoryRepository.cs @@ -13,50 +13,50 @@ namespace AsbCloudInfrastructure.Repository; public class ManualDirectoryRepository : CrudRepositoryBase, IManualDirectoryRepository { - public ManualDirectoryRepository(IAsbCloudDbContext context) : base(context) - { - } + public ManualDirectoryRepository(IAsbCloudDbContext context) : base(context) + { + } - public async Task> GetTreeAsync(CancellationToken cancellationToken) - { - var directories = await dbContext.ManualDirectories - .Include(m => m.Manuals) - .Include(m => m.Parent) - .AsNoTracking() - .ToArrayAsync(cancellationToken); + public async Task> GetTreeAsync(CancellationToken cancellationToken) + { + var directories = await dbContext.ManualDirectories + .Include(m => m.Manuals) + .Include(m => m.Parent) + .AsNoTracking() + .ToArrayAsync(cancellationToken); - return BuildTree(directories).Select(x => x.Adapt()); - } + return BuildTree(directories).Select(x => x.Adapt()); + } - public async Task GetOrDefaultAsync(string name, int? idParent, CancellationToken cancellationToken) - { - var entity = await dbContext.ManualDirectories - .AsNoTracking() - .FirstOrDefaultAsync(m => m.Name == name && - m.IdParent == idParent, cancellationToken); + public async Task GetOrDefaultAsync(string name, int? idParent, CancellationToken cancellationToken) + { + var entity = await dbContext.ManualDirectories + .AsNoTracking() + .FirstOrDefaultAsync(m => m.Name == name && + m.IdParent == idParent, cancellationToken); - if (entity is null) - return null; + if (entity is null) + return null; - return Convert(entity); - } + return Convert(entity); + } - public Task IsExistsAsync(int id, CancellationToken cancellationToken) => - dbContext.ManualDirectories.AnyAsync(d => d.Id == id, cancellationToken); + public Task IsExistsAsync(int id, CancellationToken cancellationToken) => + dbContext.ManualDirectories.AnyAsync(d => d.Id == id, cancellationToken); - private static IEnumerable BuildTree(IEnumerable directories) - { - var directoryDict = directories.ToDictionary(f => f.Id); + private static IEnumerable BuildTree(IEnumerable directories) + { + var directoryDict = directories.ToDictionary(f => f.Id); - foreach (var directory in directories) - { - if (directory.IdParent.HasValue && directoryDict.TryGetValue(directory.IdParent.Value, out var parent)) - { - parent.Children ??= new List(); - parent.Children.Add(directory); - } - } + foreach (var directory in directories) + { + if (directory.IdParent.HasValue && directoryDict.TryGetValue(directory.IdParent.Value, out var parent)) + { + parent.Children ??= new List(); + parent.Children.Add(directory); + } + } - return directories.Where(f => f.IdParent == null); - } + return directories.Where(f => f.IdParent == null); + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Repository/NotificationRepository.cs b/AsbCloudInfrastructure/Repository/NotificationRepository.cs index ae2ec649..35e71395 100644 --- a/AsbCloudInfrastructure/Repository/NotificationRepository.cs +++ b/AsbCloudInfrastructure/Repository/NotificationRepository.cs @@ -16,137 +16,137 @@ namespace AsbCloudInfrastructure.Repository; public class NotificationRepository : CrudRepositoryBase, INotificationRepository { - private static IQueryable MakeQueryNotification(DbSet dbSet) - => dbSet.Include(n => n.NotificationCategory) - .Include(n => n.User) - .AsNoTracking(); + private static IQueryable MakeQueryNotification(DbSet dbSet) + => dbSet.Include(n => n.NotificationCategory) + .Include(n => n.User) + .AsNoTracking(); - public NotificationRepository(IAsbCloudDbContext context) - : base(context, MakeQueryNotification) - { - } - + public NotificationRepository(IAsbCloudDbContext context) + : base(context, MakeQueryNotification) + { + } + - public async Task> GetNotificationsAsync(int idUser, - NotificationRequest request, - CancellationToken cancellationToken) - { - var skip = request.Skip ?? 0; - var take = request.Take ?? 10; + public async Task> GetNotificationsAsync(int idUser, + NotificationRequest request, + CancellationToken cancellationToken) + { + var skip = request.Skip ?? 0; + var take = request.Take ?? 10; - var query = BuildQuery(idUser, request); + var query = BuildQuery(idUser, request); - var result = new PaginationContainer - { - Skip = skip, - Take = take, - Count = await query.CountAsync(cancellationToken), - }; + var result = new PaginationContainer + { + Skip = skip, + Take = take, + Count = await query.CountAsync(cancellationToken), + }; - if (result.Count < skip) - return result; + if (result.Count < skip) + return result; - result.Items = await query - .SortBy(request.SortFields) - .Skip(skip) - .Take(take) - .AsNoTracking() - .Select(x => x.Adapt()) - .ToArrayAsync(cancellationToken); + result.Items = await query + .SortBy(request.SortFields) + .Skip(skip) + .Take(take) + .AsNoTracking() + .Select(x => x.Adapt()) + .ToArrayAsync(cancellationToken); - return result; - } + return result; + } - public async Task> GetAllAsync(int? idUser, bool? isSent, int? idTransportType, - CancellationToken cancellationToken) - { - var query = dbContext.Notifications.AsQueryable(); + public async Task> GetAllAsync(int? idUser, bool? isSent, int? idTransportType, + CancellationToken cancellationToken) + { + var query = dbContext.Notifications.AsQueryable(); - if (idUser.HasValue) - query = query.Where(n => n.IdUser == idUser); - - if(isSent.HasValue) - query = isSent.Value ? - query.Where(n => n.SentDate != null) - : query.Where(n => n.SentDate == null); + if (idUser.HasValue) + query = query.Where(n => n.IdUser == idUser); + + if(isSent.HasValue) + query = isSent.Value ? + query.Where(n => n.SentDate != null) + : query.Where(n => n.SentDate == null); - if (idTransportType.HasValue) - query = query.Where(n => n.IdTransportType == idTransportType); - - return await query.AsNoTracking().Select(n => n.Adapt()) - .ToArrayAsync(cancellationToken); - } + if (idTransportType.HasValue) + query = query.Where(n => n.IdTransportType == idTransportType); + + return await query.AsNoTracking().Select(n => n.Adapt()) + .ToArrayAsync(cancellationToken); + } - public override async Task UpdateRangeAsync(IEnumerable notifications, CancellationToken cancellationToken) - { - if (!notifications.Any()) - return 0; - - var ids = notifications.Select(d => d.Id); - - var existingEntities = await dbSet - .Where(d => ids.Contains(d.Id)) - .AsNoTracking() - .Select(d => d.Id) - .ToArrayAsync(cancellationToken); + public override async Task UpdateRangeAsync(IEnumerable notifications, CancellationToken cancellationToken) + { + if (!notifications.Any()) + return 0; + + var ids = notifications.Select(d => d.Id); + + var existingEntities = await dbSet + .Where(d => ids.Contains(d.Id)) + .AsNoTracking() + .Select(d => d.Id) + .ToArrayAsync(cancellationToken); - if (ids.Count() > existingEntities.Length) - return ICrudRepository.ErrorIdNotFound; + if (ids.Count() > existingEntities.Length) + return ICrudRepository.ErrorIdNotFound; - var entities = notifications.Select(Convert); + var entities = notifications.Select(Convert); - dbContext.Notifications.UpdateRange(entities); + dbContext.Notifications.UpdateRange(entities); - return await dbContext.SaveChangesAsync(cancellationToken); - } + return await dbContext.SaveChangesAsync(cancellationToken); + } - public Task DeleteAsync(NotificationDeleteRequest request, CancellationToken cancellationToken) - { - var query = dbContext.Notifications - .Include(n => n.NotificationCategory) - .AsQueryable(); + public Task DeleteAsync(NotificationDeleteRequest request, CancellationToken cancellationToken) + { + var query = dbContext.Notifications + .Include(n => n.NotificationCategory) + .AsQueryable(); - if (request.IdCategory.HasValue) - query = query.Where(n => n.IdNotificationCategory == request.IdCategory.Value); + if (request.IdCategory.HasValue) + query = query.Where(n => n.IdNotificationCategory == request.IdCategory.Value); - if (request.LtSentDate.HasValue) - query = query.Where(n => n.SentDate <= request.LtSentDate.Value.ToUniversalTime()); - - if (request.LtReadDate.HasValue) - query = query.Where(n => n.ReadDate <= request.LtReadDate.Value.ToUniversalTime()); - - dbContext.Notifications.RemoveRange(query); + if (request.LtSentDate.HasValue) + query = query.Where(n => n.SentDate <= request.LtSentDate.Value.ToUniversalTime()); + + if (request.LtReadDate.HasValue) + query = query.Where(n => n.ReadDate <= request.LtReadDate.Value.ToUniversalTime()); + + dbContext.Notifications.RemoveRange(query); - return dbContext.SaveChangesAsync(cancellationToken); - } + return dbContext.SaveChangesAsync(cancellationToken); + } public Task GetUnreadCountAsync(int idUser, int idTransportType, CancellationToken cancellationToken) { return dbContext.Notifications - .Where(n => !n.ReadDate.HasValue && - n.SentDate.HasValue && - n.IdUser == idUser && - n.IdTransportType == idTransportType) - .CountAsync(cancellationToken); - } + .Where(n => !n.ReadDate.HasValue && + n.SentDate.HasValue && + n.IdUser == idUser && + n.IdTransportType == idTransportType) + .CountAsync(cancellationToken); + } private IQueryable BuildQuery(int idUser, - NotificationRequest request) - { - var query = dbContext.Notifications - .Include(x => x.NotificationCategory) - .Where(n => n.IdUser == idUser); + NotificationRequest request) + { + var query = dbContext.Notifications + .Include(x => x.NotificationCategory) + .Where(n => n.IdUser == idUser); - if (request.IsSent.HasValue) - { - query = request.IsSent.Value ? - query.Where(n => n.SentDate != null) - : query.Where(n => n.SentDate == null); - } + if (request.IsSent.HasValue) + { + query = request.IsSent.Value ? + query.Where(n => n.SentDate != null) + : query.Where(n => n.SentDate == null); + } - if (request.IdTransportType.HasValue) - query = query.Where(n => n.IdTransportType == request.IdTransportType); + if (request.IdTransportType.HasValue) + query = query.Where(n => n.IdTransportType == request.IdTransportType); - return query; - } + return query; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Repository/ProcessMapPlanBaseRepository.cs b/AsbCloudInfrastructure/Repository/ProcessMapPlanBaseRepository.cs index 26d58c40..922071e4 100644 --- a/AsbCloudInfrastructure/Repository/ProcessMapPlanBaseRepository.cs +++ b/AsbCloudInfrastructure/Repository/ProcessMapPlanBaseRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps; +using AsbCloudApp.Data.ProcessMaps; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudDb.Model; diff --git a/AsbCloudInfrastructure/Repository/QueryContainer.cs b/AsbCloudInfrastructure/Repository/QueryContainer.cs index 2cb27445..a2179e8b 100644 --- a/AsbCloudInfrastructure/Repository/QueryContainer.cs +++ b/AsbCloudInfrastructure/Repository/QueryContainer.cs @@ -1,4 +1,4 @@ -using AsbCloudDb.Model; +using AsbCloudDb.Model; using Microsoft.EntityFrameworkCore; using System; using System.Linq; diff --git a/AsbCloudInfrastructure/Repository/ScheduleRepository.cs b/AsbCloudInfrastructure/Repository/ScheduleRepository.cs index e1fa83b8..cbafa45a 100644 --- a/AsbCloudInfrastructure/Repository/ScheduleRepository.cs +++ b/AsbCloudInfrastructure/Repository/ScheduleRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using AsbCloudDb.Model; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudInfrastructure/Repository/SetpointsRequestRepository.cs b/AsbCloudInfrastructure/Repository/SetpointsRequestRepository.cs index 2a728bd5..027b2565 100644 --- a/AsbCloudInfrastructure/Repository/SetpointsRequestRepository.cs +++ b/AsbCloudInfrastructure/Repository/SetpointsRequestRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Services; using AsbCloudDb.Model; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudInfrastructure/Repository/TelemetryWirelineRunOutRepository.cs b/AsbCloudInfrastructure/Repository/TelemetryWirelineRunOutRepository.cs index af2b6438..c57fc57c 100644 --- a/AsbCloudInfrastructure/Repository/TelemetryWirelineRunOutRepository.cs +++ b/AsbCloudInfrastructure/Repository/TelemetryWirelineRunOutRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.SAUB; using AsbCloudApp.Repositories; using AsbCloudApp.Services; diff --git a/AsbCloudInfrastructure/Repository/TrajectoryEditableRepository.cs b/AsbCloudInfrastructure/Repository/TrajectoryEditableRepository.cs index 6aca2284..6233dfc3 100644 --- a/AsbCloudInfrastructure/Repository/TrajectoryEditableRepository.cs +++ b/AsbCloudInfrastructure/Repository/TrajectoryEditableRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Services; diff --git a/AsbCloudInfrastructure/Repository/TrajectoryNnbRepository.cs b/AsbCloudInfrastructure/Repository/TrajectoryNnbRepository.cs index 69c2cccc..1bd3ca2a 100644 --- a/AsbCloudInfrastructure/Repository/TrajectoryNnbRepository.cs +++ b/AsbCloudInfrastructure/Repository/TrajectoryNnbRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; diff --git a/AsbCloudInfrastructure/Repository/UserRepository.cs b/AsbCloudInfrastructure/Repository/UserRepository.cs index df58affe..0f40b933 100644 --- a/AsbCloudInfrastructure/Repository/UserRepository.cs +++ b/AsbCloudInfrastructure/Repository/UserRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudDb.Model; diff --git a/AsbCloudInfrastructure/Repository/UserRoleRepository.cs b/AsbCloudInfrastructure/Repository/UserRoleRepository.cs index 427870c0..799fe857 100644 --- a/AsbCloudInfrastructure/Repository/UserRoleRepository.cs +++ b/AsbCloudInfrastructure/Repository/UserRoleRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Comparators; +using AsbCloudApp.Comparators; using AsbCloudApp.Data; using AsbCloudApp.Data.User; using AsbCloudApp.Exceptions; diff --git a/AsbCloudInfrastructure/Repository/UserSettingsRepository.cs b/AsbCloudInfrastructure/Repository/UserSettingsRepository.cs index 7681961b..56b797ca 100644 --- a/AsbCloudInfrastructure/Repository/UserSettingsRepository.cs +++ b/AsbCloudInfrastructure/Repository/UserSettingsRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Services; +using AsbCloudApp.Services; using AsbCloudDb.Model; using Microsoft.EntityFrameworkCore; using System.Linq; diff --git a/AsbCloudInfrastructure/Repository/WellCompositeRepository.cs b/AsbCloudInfrastructure/Repository/WellCompositeRepository.cs index 8353f9f4..dcbfd0f8 100644 --- a/AsbCloudInfrastructure/Repository/WellCompositeRepository.cs +++ b/AsbCloudInfrastructure/Repository/WellCompositeRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.ProcessMaps; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; diff --git a/AsbCloudInfrastructure/Repository/WellFinalDocumentsRepository.cs b/AsbCloudInfrastructure/Repository/WellFinalDocumentsRepository.cs index 7160a85e..7729242a 100644 --- a/AsbCloudInfrastructure/Repository/WellFinalDocumentsRepository.cs +++ b/AsbCloudInfrastructure/Repository/WellFinalDocumentsRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.User; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; diff --git a/AsbCloudInfrastructure/Repository/WellOperationCategoryRepository.cs b/AsbCloudInfrastructure/Repository/WellOperationCategoryRepository.cs index d171dc46..1032fc70 100644 --- a/AsbCloudInfrastructure/Repository/WellOperationCategoryRepository.cs +++ b/AsbCloudInfrastructure/Repository/WellOperationCategoryRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudDb.Model; using Mapster; using Microsoft.Extensions.Caching.Memory; diff --git a/AsbCloudInfrastructure/Repository/WellOperationRepository.cs b/AsbCloudInfrastructure/Repository/WellOperationRepository.cs index 1ab3de01..8fa9433d 100644 --- a/AsbCloudInfrastructure/Repository/WellOperationRepository.cs +++ b/AsbCloudInfrastructure/Repository/WellOperationRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.WellOperation; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; diff --git a/AsbCloudInfrastructure/Repository/WellSectionPlanRepository.cs b/AsbCloudInfrastructure/Repository/WellSectionPlanRepository.cs index c9963838..0f1b7509 100644 --- a/AsbCloudInfrastructure/Repository/WellSectionPlanRepository.cs +++ b/AsbCloudInfrastructure/Repository/WellSectionPlanRepository.cs @@ -15,72 +15,72 @@ using Npgsql; namespace AsbCloudInfrastructure.Repository; public class WellSectionPlanRepository : CrudWellRelatedRepositoryBase, - IWellSectionPlanRepository + IWellSectionPlanRepository { - public WellSectionPlanRepository(IAsbCloudDbContext context) - : base(context, query => query.Include(w => w.SectionType)) - { - } + public WellSectionPlanRepository(IAsbCloudDbContext context) + : base(context, query => query.Include(w => w.SectionType)) + { + } - public override async Task InsertAsync(WellSectionPlanDto item, CancellationToken token) - { - var id = 0; + public override async Task InsertAsync(WellSectionPlanDto item, CancellationToken token) + { + var id = 0; - try - { - id = await base.InsertAsync(item, token); - } - catch (DbUpdateException ex) - { - if (ex.InnerException is PostgresException pgException) - HandlePostgresException(pgException, item); - else - throw; - } + try + { + id = await base.InsertAsync(item, token); + } + catch (DbUpdateException ex) + { + if (ex.InnerException is PostgresException pgException) + HandlePostgresException(pgException, item); + else + throw; + } - return id; - } + return id; + } - public override async Task UpdateAsync(WellSectionPlanDto item, CancellationToken token) - { - var id = 0; + public override async Task UpdateAsync(WellSectionPlanDto item, CancellationToken token) + { + var id = 0; - try - { - id = await base.UpdateAsync(item, token); - } - catch (DbUpdateException ex) - { - if (ex.InnerException is PostgresException pgException) - HandlePostgresException(pgException, item); - else - throw; - } + try + { + id = await base.UpdateAsync(item, token); + } + catch (DbUpdateException ex) + { + if (ex.InnerException is PostgresException pgException) + HandlePostgresException(pgException, item); + else + throw; + } - return id; - } + return id; + } - public async Task> GetWellSectionTypesAsync(int idWell, CancellationToken cancellationToken) - { - var query = from wellSectionType in dbContext.WellSectionTypes - join wellSectionPlan in dbContext.WellSectionsPlan on wellSectionType.Id equals wellSectionPlan.IdSectionType - where wellSectionPlan.IdWell == idWell - orderby wellSectionType.Order - select wellSectionType; + public async Task> GetWellSectionTypesAsync(int idWell, CancellationToken cancellationToken) + { + var query = from wellSectionType in dbContext.WellSectionTypes + join wellSectionPlan in dbContext.WellSectionsPlan on wellSectionType.Id equals wellSectionPlan.IdSectionType + where wellSectionPlan.IdWell == idWell + orderby wellSectionType.Order + select wellSectionType; - IEnumerable entities = await query.ToArrayAsync(cancellationToken); + IEnumerable entities = await query.ToArrayAsync(cancellationToken); - if (!entities.Any()) - entities = await dbContext.WellSectionTypes.OrderBy(w => w.Order).ToArrayAsync(cancellationToken); + if (!entities.Any()) + entities = await dbContext.WellSectionTypes.OrderBy(w => w.Order).ToArrayAsync(cancellationToken); - return entities.Select(w => w.Adapt()); - } - - private static void HandlePostgresException(PostgresException pgException, WellSectionPlanDto wellSectionPlan) - { - if (pgException.SqlState == PostgresErrorCodes.UniqueViolation) - throw new ArgumentInvalidException($"Секция уже добавлена в конструкцию скважины", - nameof(wellSectionPlan.IdSectionType)); + return entities.Select(w => w.Adapt()); + } + + private static void HandlePostgresException(PostgresException pgException, WellSectionPlanDto wellSectionPlan) + { + if (pgException.SqlState == PostgresErrorCodes.UniqueViolation) + throw new ArgumentInvalidException($"Секция уже добавлена в конструкцию скважины", + nameof(wellSectionPlan.IdSectionType)); - } + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Repository/WitsRecordRepository.cs b/AsbCloudInfrastructure/Repository/WitsRecordRepository.cs index 4b0906ec..9eca40bf 100644 --- a/AsbCloudInfrastructure/Repository/WitsRecordRepository.cs +++ b/AsbCloudInfrastructure/Repository/WitsRecordRepository.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Services; +using AsbCloudApp.Services; using AsbCloudDb.Model; using Mapster; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudInfrastructure/Services/AuthService.cs b/AsbCloudInfrastructure/Services/AuthService.cs index d469ab54..91b6f22b 100644 --- a/AsbCloudInfrastructure/Services/AuthService.cs +++ b/AsbCloudInfrastructure/Services/AuthService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.User; +using AsbCloudApp.Data.User; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Services; diff --git a/AsbCloudInfrastructure/Services/DailyReport/DailyReportExportService.cs b/AsbCloudInfrastructure/Services/DailyReport/DailyReportExportService.cs index 05831ab1..1669c5cc 100644 --- a/AsbCloudInfrastructure/Services/DailyReport/DailyReportExportService.cs +++ b/AsbCloudInfrastructure/Services/DailyReport/DailyReportExportService.cs @@ -18,238 +18,238 @@ namespace AsbCloudInfrastructure.Services.DailyReport; public class DailyReportExportService : IDailyReportExportService { - private const int rowStartScheduleBlock = 20; - private const int rowStartSubsystemBlock = 26; - private const int rowStartFactWellOperationBlock = 39; - private const int rowStartTimeBalanceBlock = 62; - private const int rowStartProcessMapWellDrillingBlock = 68; + private const int rowStartScheduleBlock = 20; + private const int rowStartSubsystemBlock = 26; + private const int rowStartFactWellOperationBlock = 39; + private const int rowStartTimeBalanceBlock = 62; + private const int rowStartProcessMapWellDrillingBlock = 68; - private const int columnTimeBalanceDurationPlan = 3; - private const int columnTimeBalanceDurationFact = 6; - private const int columnTimeBalanceReasonDeviation = 8; - private const int columnTimeBalanceDrillingDeviationPerSection = 10; - private const int columnTimeBalanceDrillingDeviationPerDay = 11; + private const int columnTimeBalanceDurationPlan = 3; + private const int columnTimeBalanceDurationFact = 6; + private const int columnTimeBalanceReasonDeviation = 8; + private const int columnTimeBalanceDrillingDeviationPerSection = 10; + private const int columnTimeBalanceDrillingDeviationPerDay = 11; - private const int columnSheduleDriller = 3; - private const int columnSheduleShiftStart = 7; - private const int columnSheduleShiftEnd = 8; + private const int columnSheduleDriller = 3; + private const int columnSheduleShiftStart = 7; + private const int columnSheduleShiftEnd = 8; - private const int columnSubsystemName = 2; - private const int columnUseSubsystemPerDayUsedTimeHours = 3; - private const int columnUseSubsystemPerDaySumDepthInterval = 4; - private const int columnUseSubsystemPerDayKUsage = 5; + private const int columnSubsystemName = 2; + private const int columnUseSubsystemPerDayUsedTimeHours = 3; + private const int columnUseSubsystemPerDaySumDepthInterval = 4; + private const int columnUseSubsystemPerDayKUsage = 5; - private const int columnUseSubsystemPerWellUsedTimeHours = 6; - private const int columnUseSubsystemPerWellSumDepthInterval = 7; - private const int columnUseSubsystemPerWellKUsage = 8; + private const int columnUseSubsystemPerWellUsedTimeHours = 6; + private const int columnUseSubsystemPerWellSumDepthInterval = 7; + private const int columnUseSubsystemPerWellKUsage = 8; - private const int columnProcessMapWellDrillingBlockDrillingMode = 2; - private const int columnProcessMapWellDrillingBlockWellBoreDepth = 3; - private const int columnProcessMapWellDrillingBlockMechDrillingHours = 4; - private const int columnProcessMapWellDrillingBlockRopPlan = 5; - private const int columnProcessMapWellDrillingBlockRopFact = 6; + private const int columnProcessMapWellDrillingBlockDrillingMode = 2; + private const int columnProcessMapWellDrillingBlockWellBoreDepth = 3; + private const int columnProcessMapWellDrillingBlockMechDrillingHours = 4; + private const int columnProcessMapWellDrillingBlockRopPlan = 5; + private const int columnProcessMapWellDrillingBlockRopFact = 6; - private const int columnWellOperationCategory = 2; - private const int columnWellOperationDurationHours = 4; + private const int columnWellOperationCategory = 2; + private const int columnWellOperationDurationHours = 4; - private const string cellCustomer = "C2"; - private const string cellContractor = "C3"; - private const string cellDeposit = "C5"; - private const string cellCluster = "C6"; - private const string cellWellCaption = "C7"; - private const string cellWellType = "C8"; - private const string cellDate = "C12"; - private const string cellDepthStart = "C13"; - private const string cellDepthEnd = "D13"; + private const string cellCustomer = "C2"; + private const string cellContractor = "C3"; + private const string cellDeposit = "C5"; + private const string cellCluster = "C6"; + private const string cellWellCaption = "C7"; + private const string cellWellType = "C8"; + private const string cellDate = "C12"; + private const string cellDepthStart = "C13"; + private const string cellDepthEnd = "D13"; - private const string cellTrajectoryBlockWellboreDepth = "B17"; - private const string cellTrajectoryBlockVerticalDepth = "C17"; - private const string cellTrajectoryBlockZenithAngle = "D17"; - private const string cellTrajectoryBlockAzimuthGeo = "E17"; + private const string cellTrajectoryBlockWellboreDepth = "B17"; + private const string cellTrajectoryBlockVerticalDepth = "C17"; + private const string cellTrajectoryBlockZenithAngle = "D17"; + private const string cellTrajectoryBlockAzimuthGeo = "E17"; - private const string cellTimeBalanceBlockSection = "C60"; - private const string cellTimeBalanceBlockWellDepthPlan = "C61"; - private const string cellSectionDrillingHours = "F77"; - private const string cellTimeBalanceBlockWellDepthFact = "F78"; - private const string cellTimeBalanceBlockWellOperationSlipsTimeCount = "F79"; + private const string cellTimeBalanceBlockSection = "C60"; + private const string cellTimeBalanceBlockWellDepthPlan = "C61"; + private const string cellSectionDrillingHours = "F77"; + private const string cellTimeBalanceBlockWellDepthFact = "F78"; + private const string cellTimeBalanceBlockWellOperationSlipsTimeCount = "F79"; - private const string cellSubsystemComment = "D35"; - private const string cellSubsystemTvgLagDays = "F80"; - private const string cellSubsystemMeasurementsPerDay = "F81"; - private const string cellSubsystemWellbore = "C9"; - private const string cellSubsystemTotalRopPlan = "E70"; + private const string cellSubsystemComment = "D35"; + private const string cellSubsystemTvgLagDays = "F80"; + private const string cellSubsystemMeasurementsPerDay = "F81"; + private const string cellSubsystemWellbore = "C9"; + private const string cellSubsystemTotalRopPlan = "E70"; - private const string cellSignDrillingMaster = "C85"; - private const string cellSignSupervisor = "C86"; + private const string cellSignDrillingMaster = "C85"; + private const string cellSignSupervisor = "C86"; - private readonly IDailyReportService dailyReportService; + private readonly IDailyReportService dailyReportService; - public DailyReportExportService(IDailyReportService dailyReportService) - { - this.dailyReportService = dailyReportService; - } + public DailyReportExportService(IDailyReportService dailyReportService) + { + this.dailyReportService = dailyReportService; + } - public async Task<(string FileName, Stream File)> ExportAsync(int idWell, DateOnly dailyReportDate, CancellationToken cancellationToken) - { - var dailyReport = await dailyReportService.GetAsync(idWell, dailyReportDate, cancellationToken); + public async Task<(string FileName, Stream File)> ExportAsync(int idWell, DateOnly dailyReportDate, CancellationToken cancellationToken) + { + var dailyReport = await dailyReportService.GetAsync(idWell, dailyReportDate, cancellationToken); - var stream = await GenerateFileAsync(dailyReport, cancellationToken); + var stream = await GenerateFileAsync(dailyReport, cancellationToken); - var fileName = $"Суточный_рапорт_по_скважине_{dailyReport.WellCaption}_куст_{dailyReport.Cluster}_от_{dailyReport.Date:yy-MM-dd}.xlsx"; + var fileName = $"Суточный_рапорт_по_скважине_{dailyReport.WellCaption}_куст_{dailyReport.Cluster}_от_{dailyReport.Date:yy-MM-dd}.xlsx"; - return (fileName, stream); - } + return (fileName, stream); + } - private static async Task GenerateFileAsync(DailyReportDto dailyReport, CancellationToken cancellationToken) - { - using var excelTemplateStream = await Assembly - .GetExecutingAssembly() - .GetTemplateCopyStreamAsync("DailyReportTemplate.xlsx", cancellationToken); + private static async Task GenerateFileAsync(DailyReportDto dailyReport, CancellationToken cancellationToken) + { + using var excelTemplateStream = await Assembly + .GetExecutingAssembly() + .GetTemplateCopyStreamAsync("DailyReportTemplate.xlsx", cancellationToken); - using var workbook = new XLWorkbook(excelTemplateStream); + using var workbook = new XLWorkbook(excelTemplateStream); - AddDailyReportToWorkBook(workbook, dailyReport); + AddDailyReportToWorkBook(workbook, dailyReport); - var memoryStream = new MemoryStream(); - workbook.SaveAs(memoryStream, new SaveOptions { }); - memoryStream.Seek(0, SeekOrigin.Begin); - return memoryStream; - } + var memoryStream = new MemoryStream(); + workbook.SaveAs(memoryStream, new SaveOptions { }); + memoryStream.Seek(0, SeekOrigin.Begin); + return memoryStream; + } - private static void AddDailyReportToWorkBook(IXLWorkbook workbook, DailyReportDto dailyReport) - { - const string sheetName = "Суточный отчёт"; + private static void AddDailyReportToWorkBook(IXLWorkbook workbook, DailyReportDto dailyReport) + { + const string sheetName = "Суточный отчёт"; - var sheet = workbook.GetWorksheet(sheetName);; + var sheet = workbook.GetWorksheet(sheetName);; - sheet.Cell(cellCustomer).SetCellValue(dailyReport.Customer); - sheet.Cell(cellContractor).SetCellValue(dailyReport.Contractor); - sheet.Cell(cellDeposit).SetCellValue(dailyReport.Deposit); - sheet.Cell(cellCluster).SetCellValue(dailyReport.Cluster); - sheet.Cell(cellWellCaption).SetCellValue(dailyReport.WellCaption); - sheet.Cell(cellWellType).SetCellValue(dailyReport.WellType); - sheet.Cell(cellDate).SetCellValue(dailyReport.Date); - sheet.Cell(cellDepthStart).SetCellValue(dailyReport.DepthStart); - sheet.Cell(cellDepthEnd).SetCellValue(dailyReport.DepthEnd); + sheet.Cell(cellCustomer).SetCellValue(dailyReport.Customer); + sheet.Cell(cellContractor).SetCellValue(dailyReport.Contractor); + sheet.Cell(cellDeposit).SetCellValue(dailyReport.Deposit); + sheet.Cell(cellCluster).SetCellValue(dailyReport.Cluster); + sheet.Cell(cellWellCaption).SetCellValue(dailyReport.WellCaption); + sheet.Cell(cellWellType).SetCellValue(dailyReport.WellType); + sheet.Cell(cellDate).SetCellValue(dailyReport.Date); + sheet.Cell(cellDepthStart).SetCellValue(dailyReport.DepthStart); + sheet.Cell(cellDepthEnd).SetCellValue(dailyReport.DepthEnd); - if (dailyReport.TimeBalanceBlock is not null) - AddTimeBalanceBlockToSheet(sheet, dailyReport.TimeBalanceBlock); + if (dailyReport.TimeBalanceBlock is not null) + AddTimeBalanceBlockToSheet(sheet, dailyReport.TimeBalanceBlock); - if (dailyReport.SubsystemBlock is not null) - AddSubsystemBlockToSheet(sheet, dailyReport.SubsystemBlock); + if (dailyReport.SubsystemBlock is not null) + AddSubsystemBlockToSheet(sheet, dailyReport.SubsystemBlock); - if (dailyReport.SignBlock is not null) - AddSignBlockToSheet(sheet, dailyReport.SignBlock); + if (dailyReport.SignBlock is not null) + AddSignBlockToSheet(sheet, dailyReport.SignBlock); - AddTrajectoryBlockToSheet(sheet, dailyReport.TrajectoryBlock); - AddScheduleBlockToSheet(sheet, dailyReport.ScheduleBlock); - AddProcessMapWellDrillingBlockToSheet(sheet, dailyReport.ProcessMapWellDrillingBlock); - AddFactWellOperationBlockToSheet(sheet, dailyReport.FactWellOperationBlock); - } + AddTrajectoryBlockToSheet(sheet, dailyReport.TrajectoryBlock); + AddScheduleBlockToSheet(sheet, dailyReport.ScheduleBlock); + AddProcessMapWellDrillingBlockToSheet(sheet, dailyReport.ProcessMapWellDrillingBlock); + AddFactWellOperationBlockToSheet(sheet, dailyReport.FactWellOperationBlock); + } - private static void AddTrajectoryBlockToSheet(IXLWorksheet sheet, TrajectoryBlockDto trajectoryBlock) - { - sheet.Cell(cellTrajectoryBlockWellboreDepth).SetCellValue(trajectoryBlock.WellboreDepth); - sheet.Cell(cellTrajectoryBlockVerticalDepth).SetCellValue(trajectoryBlock.VerticalDepth); - sheet.Cell(cellTrajectoryBlockZenithAngle).SetCellValue(trajectoryBlock.ZenithAngle); - sheet.Cell(cellTrajectoryBlockAzimuthGeo).SetCellValue(trajectoryBlock.AzimuthGeo); - } + private static void AddTrajectoryBlockToSheet(IXLWorksheet sheet, TrajectoryBlockDto trajectoryBlock) + { + sheet.Cell(cellTrajectoryBlockWellboreDepth).SetCellValue(trajectoryBlock.WellboreDepth); + sheet.Cell(cellTrajectoryBlockVerticalDepth).SetCellValue(trajectoryBlock.VerticalDepth); + sheet.Cell(cellTrajectoryBlockZenithAngle).SetCellValue(trajectoryBlock.ZenithAngle); + sheet.Cell(cellTrajectoryBlockAzimuthGeo).SetCellValue(trajectoryBlock.AzimuthGeo); + } - private static void AddTimeBalanceBlockToSheet(IXLWorksheet sheet, TimeBalanceBlockDto timeBalanceBlock) - { - var rowCurrent = rowStartTimeBalanceBlock; + private static void AddTimeBalanceBlockToSheet(IXLWorksheet sheet, TimeBalanceBlockDto timeBalanceBlock) + { + var rowCurrent = rowStartTimeBalanceBlock; - foreach (var wellOperation in timeBalanceBlock.WellOperations.OrderBy(w => w.IdWellOperation)) - { - sheet.Cell(rowCurrent, columnTimeBalanceDurationPlan).SetCellValue(wellOperation.DurationHours.Plan); - sheet.Cell(rowCurrent, columnTimeBalanceDurationFact).SetCellValue(wellOperation.DurationHours.Fact); - sheet.Cell(rowCurrent, columnTimeBalanceReasonDeviation).SetCellValue(wellOperation.ReasonDeviation); - sheet.Cell(rowCurrent, columnTimeBalanceDrillingDeviationPerSection).SetCellValue(wellOperation.DrillingDeviationPerSection); - sheet.Cell(rowCurrent, columnTimeBalanceDrillingDeviationPerDay).SetCellValue(wellOperation.DrillingDeviationPerDay); + foreach (var wellOperation in timeBalanceBlock.WellOperations.OrderBy(w => w.IdWellOperation)) + { + sheet.Cell(rowCurrent, columnTimeBalanceDurationPlan).SetCellValue(wellOperation.DurationHours.Plan); + sheet.Cell(rowCurrent, columnTimeBalanceDurationFact).SetCellValue(wellOperation.DurationHours.Fact); + sheet.Cell(rowCurrent, columnTimeBalanceReasonDeviation).SetCellValue(wellOperation.ReasonDeviation); + sheet.Cell(rowCurrent, columnTimeBalanceDrillingDeviationPerSection).SetCellValue(wellOperation.DrillingDeviationPerSection); + sheet.Cell(rowCurrent, columnTimeBalanceDrillingDeviationPerDay).SetCellValue(wellOperation.DrillingDeviationPerDay); - rowCurrent++; - } + rowCurrent++; + } - sheet.Cell(cellTimeBalanceBlockSection).SetCellValue(timeBalanceBlock.SectionName); - sheet.Cell(cellTimeBalanceBlockWellDepthPlan).SetCellValue(timeBalanceBlock.WellDepth.Plan); - sheet.Cell(cellTimeBalanceBlockWellDepthFact).SetCellValue(timeBalanceBlock.WellDepth.Fact); - sheet.Cell(cellTimeBalanceBlockWellOperationSlipsTimeCount).SetCellValue(timeBalanceBlock.WellOperationSlipsTimeCount); - } + sheet.Cell(cellTimeBalanceBlockSection).SetCellValue(timeBalanceBlock.SectionName); + sheet.Cell(cellTimeBalanceBlockWellDepthPlan).SetCellValue(timeBalanceBlock.WellDepth.Plan); + sheet.Cell(cellTimeBalanceBlockWellDepthFact).SetCellValue(timeBalanceBlock.WellDepth.Fact); + sheet.Cell(cellTimeBalanceBlockWellOperationSlipsTimeCount).SetCellValue(timeBalanceBlock.WellOperationSlipsTimeCount); + } - private static void AddSubsystemBlockToSheet(IXLWorksheet sheet, SubsystemBlockDto subsystemBlock) - { - var rowСurrent = rowStartSubsystemBlock; + private static void AddSubsystemBlockToSheet(IXLWorksheet sheet, SubsystemBlockDto subsystemBlock) + { + var rowСurrent = rowStartSubsystemBlock; - foreach (var subsystem in subsystemBlock.Subsystems) - { - sheet.Cell(rowСurrent, columnSubsystemName).SetCellValue(subsystem.Name); - sheet.Cell(rowСurrent, columnUseSubsystemPerDayUsedTimeHours).SetCellValue(subsystem.UsagePerDay?.UsedTimeHours); - sheet.Cell(rowСurrent, columnUseSubsystemPerDaySumDepthInterval).SetCellValue(subsystem.UsagePerDay?.SumDepthInterval); - sheet.Cell(rowСurrent, columnUseSubsystemPerDayKUsage).SetCellValue(subsystem.UsagePerDay?.KUsage * 100); + foreach (var subsystem in subsystemBlock.Subsystems) + { + sheet.Cell(rowСurrent, columnSubsystemName).SetCellValue(subsystem.Name); + sheet.Cell(rowСurrent, columnUseSubsystemPerDayUsedTimeHours).SetCellValue(subsystem.UsagePerDay?.UsedTimeHours); + sheet.Cell(rowСurrent, columnUseSubsystemPerDaySumDepthInterval).SetCellValue(subsystem.UsagePerDay?.SumDepthInterval); + sheet.Cell(rowСurrent, columnUseSubsystemPerDayKUsage).SetCellValue(subsystem.UsagePerDay?.KUsage * 100); - sheet.Cell(rowСurrent, columnUseSubsystemPerWellUsedTimeHours).SetCellValue(subsystem.UsagePerWell?.UsedTimeHours); - sheet.Cell(rowСurrent, columnUseSubsystemPerWellSumDepthInterval).SetCellValue(subsystem.UsagePerWell?.SumDepthInterval); - sheet.Cell(rowСurrent, columnUseSubsystemPerWellKUsage).SetCellValue(subsystem.UsagePerWell?.KUsage * 100); + sheet.Cell(rowСurrent, columnUseSubsystemPerWellUsedTimeHours).SetCellValue(subsystem.UsagePerWell?.UsedTimeHours); + sheet.Cell(rowСurrent, columnUseSubsystemPerWellSumDepthInterval).SetCellValue(subsystem.UsagePerWell?.SumDepthInterval); + sheet.Cell(rowСurrent, columnUseSubsystemPerWellKUsage).SetCellValue(subsystem.UsagePerWell?.KUsage * 100); - rowСurrent++; - } + rowСurrent++; + } - sheet.Cell(cellSubsystemComment).SetCellValue(subsystemBlock.Comment); - sheet.Cell(cellSubsystemTvgLagDays).SetCellValue(subsystemBlock.TvgLagDays); - sheet.Cell(cellSubsystemMeasurementsPerDay).SetCellValue(subsystemBlock.MeasurementsPerDay); - sheet.Cell(cellSubsystemWellbore).SetCellValue(subsystemBlock.Wellbore); - sheet.Cell(cellSubsystemTotalRopPlan).SetCellValue(subsystemBlock.TotalRopPlan); - } + sheet.Cell(cellSubsystemComment).SetCellValue(subsystemBlock.Comment); + sheet.Cell(cellSubsystemTvgLagDays).SetCellValue(subsystemBlock.TvgLagDays); + sheet.Cell(cellSubsystemMeasurementsPerDay).SetCellValue(subsystemBlock.MeasurementsPerDay); + sheet.Cell(cellSubsystemWellbore).SetCellValue(subsystemBlock.Wellbore); + sheet.Cell(cellSubsystemTotalRopPlan).SetCellValue(subsystemBlock.TotalRopPlan); + } - private static void AddScheduleBlockToSheet(IXLWorksheet sheet, IEnumerable scheduleBlock) - { - var rowCurrent = rowStartScheduleBlock; + private static void AddScheduleBlockToSheet(IXLWorksheet sheet, IEnumerable scheduleBlock) + { + var rowCurrent = rowStartScheduleBlock; - foreach (var schedule in scheduleBlock.OrderBy(s => s.ShiftStart)) - { - sheet.Cell(rowCurrent, columnSheduleDriller).SetCellValue($"{schedule.Surname} {schedule.Name} {schedule.Patronymic}"); - sheet.Cell(rowCurrent, columnSheduleShiftStart).SetCellValue(schedule.ShiftStart); - sheet.Cell(rowCurrent, columnSheduleShiftEnd).SetCellValue(schedule.ShiftEnd); + foreach (var schedule in scheduleBlock.OrderBy(s => s.ShiftStart)) + { + sheet.Cell(rowCurrent, columnSheduleDriller).SetCellValue($"{schedule.Surname} {schedule.Name} {schedule.Patronymic}"); + sheet.Cell(rowCurrent, columnSheduleShiftStart).SetCellValue(schedule.ShiftStart); + sheet.Cell(rowCurrent, columnSheduleShiftEnd).SetCellValue(schedule.ShiftEnd); - rowCurrent++; - } - } + rowCurrent++; + } + } - private static void AddProcessMapWellDrillingBlockToSheet(IXLWorksheet sheet, - IEnumerable processMapWellDrillingBlock) - { - var rowCurrent = rowStartProcessMapWellDrillingBlock; + private static void AddProcessMapWellDrillingBlockToSheet(IXLWorksheet sheet, + IEnumerable processMapWellDrillingBlock) + { + var rowCurrent = rowStartProcessMapWellDrillingBlock; - foreach (var processMapWellDrilling in processMapWellDrillingBlock.OrderBy(p => p.DrillingMode)) - { - sheet.Cell(rowCurrent, columnProcessMapWellDrillingBlockDrillingMode).SetCellValue(processMapWellDrilling.DrillingMode); - sheet.Cell(rowCurrent, columnProcessMapWellDrillingBlockWellBoreDepth).SetCellValue(processMapWellDrilling.WellBoreDepth); - sheet.Cell(rowCurrent, columnProcessMapWellDrillingBlockMechDrillingHours).SetCellValue(processMapWellDrilling.MechDrillingHours); - sheet.Cell(rowCurrent, columnProcessMapWellDrillingBlockRopPlan).SetCellValue(processMapWellDrilling.Rop.Plan); - sheet.Cell(rowCurrent, columnProcessMapWellDrillingBlockRopFact).SetCellValue(processMapWellDrilling.Rop.Fact); + foreach (var processMapWellDrilling in processMapWellDrillingBlock.OrderBy(p => p.DrillingMode)) + { + sheet.Cell(rowCurrent, columnProcessMapWellDrillingBlockDrillingMode).SetCellValue(processMapWellDrilling.DrillingMode); + sheet.Cell(rowCurrent, columnProcessMapWellDrillingBlockWellBoreDepth).SetCellValue(processMapWellDrilling.WellBoreDepth); + sheet.Cell(rowCurrent, columnProcessMapWellDrillingBlockMechDrillingHours).SetCellValue(processMapWellDrilling.MechDrillingHours); + sheet.Cell(rowCurrent, columnProcessMapWellDrillingBlockRopPlan).SetCellValue(processMapWellDrilling.Rop.Plan); + sheet.Cell(rowCurrent, columnProcessMapWellDrillingBlockRopFact).SetCellValue(processMapWellDrilling.Rop.Fact); - rowCurrent++; - } - } + rowCurrent++; + } + } - private static void AddFactWellOperationBlockToSheet(IXLWorksheet sheet, WellOperationBlockDto factWellOperationBlock) - { - var rowCurrent = rowStartFactWellOperationBlock; - - sheet.Cell(cellSectionDrillingHours).SetCellValue(factWellOperationBlock.SectionDrillingHours); - - foreach (var factOperation in factWellOperationBlock.WellOperations.OrderBy(w => w.CategoryName)) - { - sheet.Cell(rowCurrent, columnWellOperationCategory).SetCellValue(factOperation.CategoryName); - sheet.Cell(rowCurrent, columnWellOperationDurationHours).SetCellValue(factOperation.DurationHours); + private static void AddFactWellOperationBlockToSheet(IXLWorksheet sheet, WellOperationBlockDto factWellOperationBlock) + { + var rowCurrent = rowStartFactWellOperationBlock; + + sheet.Cell(cellSectionDrillingHours).SetCellValue(factWellOperationBlock.SectionDrillingHours); + + foreach (var factOperation in factWellOperationBlock.WellOperations.OrderBy(w => w.CategoryName)) + { + sheet.Cell(rowCurrent, columnWellOperationCategory).SetCellValue(factOperation.CategoryName); + sheet.Cell(rowCurrent, columnWellOperationDurationHours).SetCellValue(factOperation.DurationHours); - rowCurrent++; - } - } + rowCurrent++; + } + } - private static void AddSignBlockToSheet(IXLWorksheet sheet, SignBlockDto signBlock) - { - sheet.Cell(cellSignDrillingMaster).SetCellValue(signBlock.DrillingMaster?.ToString()); - sheet.Cell(cellSignSupervisor).SetCellValue(signBlock.Supervisor?.ToString()); - } + private static void AddSignBlockToSheet(IXLWorksheet sheet, SignBlockDto signBlock) + { + sheet.Cell(cellSignDrillingMaster).SetCellValue(signBlock.DrillingMaster?.ToString()); + sheet.Cell(cellSignSupervisor).SetCellValue(signBlock.Supervisor?.ToString()); + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs b/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs index 3f498ad9..08ac2420 100644 --- a/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs +++ b/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.DailyReport; +using AsbCloudApp.Data.DailyReport; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Services; @@ -24,360 +24,360 @@ namespace AsbCloudInfrastructure.Services.DailyReport; public class DailyReportService : IDailyReportService { - private readonly IWellService wellService; - private readonly ITrajectoryNnbRepository trajectoryFactNnbRepository; - private readonly IDailyReportRepository dailyReportRepository; - private readonly IScheduleRepository scheduleRepository; - private readonly IWellOperationRepository wellOperationRepository; - private readonly ISubsystemService subsystemService; - private readonly IProcessMapReportDrillingService processMapReportDrillingService; - private readonly IDetectedOperationService detectedOperationService; + private readonly IWellService wellService; + private readonly ITrajectoryNnbRepository trajectoryFactNnbRepository; + private readonly IDailyReportRepository dailyReportRepository; + private readonly IScheduleRepository scheduleRepository; + private readonly IWellOperationRepository wellOperationRepository; + private readonly ISubsystemService subsystemService; + private readonly IProcessMapReportDrillingService processMapReportDrillingService; + private readonly IDetectedOperationService detectedOperationService; - public DailyReportService(IWellService wellService, + public DailyReportService(IWellService wellService, ITrajectoryNnbRepository trajectoryFactNnbRepository, - IDailyReportRepository dailyReportRepository, - IScheduleRepository scheduleRepository, - IWellOperationRepository wellOperationRepository, - ISubsystemService subsystemService, + IDailyReportRepository dailyReportRepository, + IScheduleRepository scheduleRepository, + IWellOperationRepository wellOperationRepository, + ISubsystemService subsystemService, IProcessMapReportDrillingService processMapReportDrillingService, - IDetectedOperationService detectedOperationService) - { - this.wellService = wellService; - this.trajectoryFactNnbRepository = trajectoryFactNnbRepository; - this.dailyReportRepository = dailyReportRepository; - this.scheduleRepository = scheduleRepository; - this.wellOperationRepository = wellOperationRepository; - this.subsystemService = subsystemService; - this.processMapReportDrillingService = processMapReportDrillingService; - this.detectedOperationService = detectedOperationService; - } + IDetectedOperationService detectedOperationService) + { + this.wellService = wellService; + this.trajectoryFactNnbRepository = trajectoryFactNnbRepository; + this.dailyReportRepository = dailyReportRepository; + this.scheduleRepository = scheduleRepository; + this.wellOperationRepository = wellOperationRepository; + this.subsystemService = subsystemService; + this.processMapReportDrillingService = processMapReportDrillingService; + this.detectedOperationService = detectedOperationService; + } - public async Task UpdateOrInsertAsync(int idWell, DateOnly dateDailyReport, int idUser, TBlock editableBlock, - CancellationToken cancellationToken) - where TBlock : ItemInfoDto - { - if (!await IsDateDailyReportInRangeAsync(idWell, dateDailyReport, cancellationToken)) - throw new ArgumentInvalidException(nameof(dateDailyReport), "Невозможно обновить суточный отчёт"); - - var dailyReport = await dailyReportRepository.GetOrDefaultAsync(idWell, dateDailyReport, cancellationToken) ?? - new DailyReportDto - { - IdWell = idWell, - Date = dateDailyReport - }; + public async Task UpdateOrInsertAsync(int idWell, DateOnly dateDailyReport, int idUser, TBlock editableBlock, + CancellationToken cancellationToken) + where TBlock : ItemInfoDto + { + if (!await IsDateDailyReportInRangeAsync(idWell, dateDailyReport, cancellationToken)) + throw new ArgumentInvalidException(nameof(dateDailyReport), "Невозможно обновить суточный отчёт"); + + var dailyReport = await dailyReportRepository.GetOrDefaultAsync(idWell, dateDailyReport, cancellationToken) ?? + new DailyReportDto + { + IdWell = idWell, + Date = dateDailyReport + }; - switch (editableBlock) - { - case SubsystemBlockDto subsystemBlock: - dailyReport.SubsystemBlock = subsystemBlock; - break; - case TimeBalanceBlockDto timeBalanceBlock: - dailyReport.TimeBalanceBlock = timeBalanceBlock; - break; - case SignBlockDto signBlock: - dailyReport.SignBlock = signBlock; - break; - default: - throw new InvalidOperationException("Unexpected type of editableBlock"); - } + switch (editableBlock) + { + case SubsystemBlockDto subsystemBlock: + dailyReport.SubsystemBlock = subsystemBlock; + break; + case TimeBalanceBlockDto timeBalanceBlock: + dailyReport.TimeBalanceBlock = timeBalanceBlock; + break; + case SignBlockDto signBlock: + dailyReport.SignBlock = signBlock; + break; + default: + throw new InvalidOperationException("Unexpected type of editableBlock"); + } - editableBlock.IdUser = idUser; - editableBlock.LastUpdateDate = DateTime.UtcNow; + editableBlock.IdUser = idUser; + editableBlock.LastUpdateDate = DateTime.UtcNow; - dailyReport.DateLastUpdate = DateTimeOffset.UtcNow; + dailyReport.DateLastUpdate = DateTimeOffset.UtcNow; - if (dailyReport.Id == 0) - return await dailyReportRepository.InsertAsync(dailyReport, cancellationToken); - - return await dailyReportRepository.UpdateAsync(dailyReport, cancellationToken); - } + if (dailyReport.Id == 0) + return await dailyReportRepository.InsertAsync(dailyReport, cancellationToken); + + return await dailyReportRepository.UpdateAsync(dailyReport, cancellationToken); + } - public async Task GetAsync(int idWell, DateOnly dateDailyReport, CancellationToken cancellationToken) - { - var well = await wellService.GetOrDefaultAsync(idWell, cancellationToken) - ?? throw new ArgumentNullException(nameof(idWell), $"Скважина с Id: {idWell} не найдена"); + public async Task GetAsync(int idWell, DateOnly dateDailyReport, CancellationToken cancellationToken) + { + var well = await wellService.GetOrDefaultAsync(idWell, cancellationToken) + ?? throw new ArgumentNullException(nameof(idWell), $"Скважина с Id: {idWell} не найдена"); if (!await IsDateDailyReportInRangeAsync(idWell, dateDailyReport, cancellationToken)) - throw new ArgumentInvalidException(nameof(dateDailyReport), "Невозможно получить суточный отчёт"); - + throw new ArgumentInvalidException(nameof(dateDailyReport), "Невозможно получить суточный отчёт"); + - var dailyReport = await dailyReportRepository.GetOrDefaultAsync(idWell, dateDailyReport, cancellationToken) ?? new DailyReportDto - { - Date = dateDailyReport, - IdWell = well.Id - }; + var dailyReport = await dailyReportRepository.GetOrDefaultAsync(idWell, dateDailyReport, cancellationToken) ?? new DailyReportDto + { + Date = dateDailyReport, + IdWell = well.Id + }; var offsetHours = wellService.GetTimezone(dailyReport.IdWell).Hours; var geDate = new DateTimeOffset(dailyReport.Date, TimeOnly.MinValue, TimeSpan.FromHours(offsetHours)); - var leDate = new DateTimeOffset(dailyReport.Date.AddDays(1), TimeOnly.MinValue, TimeSpan.FromHours(offsetHours)); + var leDate = new DateTimeOffset(dailyReport.Date.AddDays(1), TimeOnly.MinValue, TimeSpan.FromHours(offsetHours)); - var factOperationRequest = new WellOperationRequest(new []{ idWell }) - { - OperationType = WellOperation.IdOperationTypeFact, - GeDate = geDate, - LeDate = leDate - }; + var factOperationRequest = new WellOperationRequest(new []{ idWell }) + { + OperationType = WellOperation.IdOperationTypeFact, + GeDate = geDate, + LeDate = leDate + }; - var factWellOperations = (await wellOperationRepository.GetAsync(factOperationRequest, cancellationToken)) - .OrderBy(o => o.DateStart) - .ThenBy(o => o.DepthStart); + var factWellOperations = (await wellOperationRepository.GetAsync(factOperationRequest, cancellationToken)) + .OrderBy(o => o.DateStart) + .ThenBy(o => o.DepthStart); - dailyReport.WellCaption = well.Caption; - dailyReport.WellType = well.WellType; - dailyReport.Cluster = well.Cluster; - dailyReport.Deposit = well.Deposit; - dailyReport.Customer = well.Companies.FirstOrDefault(c => c.IdCompanyType == 1)?.Caption; - dailyReport.Contractor = well.Companies.FirstOrDefault(c => c.IdCompanyType == 2)?.Caption; - dailyReport.DepthStart = factWellOperations.FirstOrDefault()?.DepthStart; - dailyReport.DepthEnd = factWellOperations.LastOrDefault()?.DepthEnd; + dailyReport.WellCaption = well.Caption; + dailyReport.WellType = well.WellType; + dailyReport.Cluster = well.Cluster; + dailyReport.Deposit = well.Deposit; + dailyReport.Customer = well.Companies.FirstOrDefault(c => c.IdCompanyType == 1)?.Caption; + dailyReport.Contractor = well.Companies.FirstOrDefault(c => c.IdCompanyType == 2)?.Caption; + dailyReport.DepthStart = factWellOperations.FirstOrDefault()?.DepthStart; + dailyReport.DepthEnd = factWellOperations.LastOrDefault()?.DepthEnd; - await UpdateTimeBalanceBlockAsync(dailyReport, factWellOperations, geDate, leDate, cancellationToken); - await UpdateSubsystemBlockAsync(dailyReport, geDate, leDate, cancellationToken); - - await AddTrajectoryBlockAsync(dailyReport, geDate, leDate, cancellationToken); - await AddScheduleBlockAsync(dailyReport, geDate, cancellationToken); - await AddProcessMapWellDrillingBlockAsync(dailyReport, geDate, leDate, cancellationToken); + await UpdateTimeBalanceBlockAsync(dailyReport, factWellOperations, geDate, leDate, cancellationToken); + await UpdateSubsystemBlockAsync(dailyReport, geDate, leDate, cancellationToken); + + await AddTrajectoryBlockAsync(dailyReport, geDate, leDate, cancellationToken); + await AddScheduleBlockAsync(dailyReport, geDate, cancellationToken); + await AddProcessMapWellDrillingBlockAsync(dailyReport, geDate, leDate, cancellationToken); - AddFactWellOperationBlock(dailyReport, factWellOperations); + AddFactWellOperationBlock(dailyReport, factWellOperations); - return dailyReport; - } + return dailyReport; + } - public async Task> GetAsync(int idWell, FileReportRequest request, - CancellationToken cancellationToken) - { - var result = new PaginationContainer - { - Skip = request.Skip ?? 0, - Take = request.Take ?? 10, - Items = Enumerable.Empty() - }; + public async Task> GetAsync(int idWell, FileReportRequest request, + CancellationToken cancellationToken) + { + var result = new PaginationContainer + { + Skip = request.Skip ?? 0, + Take = request.Take ?? 10, + Items = Enumerable.Empty() + }; - var datesRange = await wellOperationRepository.GetDatesRangeAsync(idWell, WellOperation.IdOperationTypeFact, cancellationToken); + var datesRange = await wellOperationRepository.GetDatesRangeAsync(idWell, WellOperation.IdOperationTypeFact, cancellationToken); - if (datesRange is null) - return result; + if (datesRange is null) + return result; - var dailyReports = new List(); - TimeSpan offset = wellService.GetTimezone(idWell).Offset; + var dailyReports = new List(); + TimeSpan offset = wellService.GetTimezone(idWell).Offset; if (request.GeDate.HasValue) - { - var startDate = new DateTimeOffset(request.GeDate.Value, TimeOnly.MinValue, offset); + { + var startDate = new DateTimeOffset(request.GeDate.Value, TimeOnly.MinValue, offset); - if (startDate >= datesRange.From) - datesRange.From = startDate; - } + if (startDate >= datesRange.From) + datesRange.From = startDate; + } - if (request.LeDate.HasValue) - { - var finishDate = new DateTimeOffset(request.LeDate.Value, TimeOnly.MinValue, offset); + if (request.LeDate.HasValue) + { + var finishDate = new DateTimeOffset(request.LeDate.Value, TimeOnly.MinValue, offset); - if (finishDate <= datesRange.To) - datesRange.To = finishDate; - } + if (finishDate <= datesRange.To) + datesRange.To = finishDate; + } - result.Count = (datesRange.To.Day - DateTimeOffset.UnixEpoch.Day) - (datesRange.From.Day - DateTimeOffset.UnixEpoch.Day); + result.Count = (datesRange.To.Day - DateTimeOffset.UnixEpoch.Day) - (datesRange.From.Day - DateTimeOffset.UnixEpoch.Day); - var existingDailyReports = await dailyReportRepository.GetAsync(idWell, request, cancellationToken); + var existingDailyReports = await dailyReportRepository.GetAsync(idWell, request, cancellationToken); - var geDateFactWellOperation = datesRange.From.AddDays(result.Skip); - var leDateFactWellOperation = geDateFactWellOperation.AddDays(result.Take); - - var factWellOperationRequest = new WellOperationRequest(new[] { idWell }) - { - OperationType = WellOperation.IdOperationTypeFact, - GeDate = geDateFactWellOperation, - LeDate = leDateFactWellOperation - }; + var geDateFactWellOperation = datesRange.From.AddDays(result.Skip); + var leDateFactWellOperation = geDateFactWellOperation.AddDays(result.Take); + + var factWellOperationRequest = new WellOperationRequest(new[] { idWell }) + { + OperationType = WellOperation.IdOperationTypeFact, + GeDate = geDateFactWellOperation, + LeDate = leDateFactWellOperation + }; - var factWellOperations = await wellOperationRepository.GetAsync(factWellOperationRequest, cancellationToken); + var factWellOperations = await wellOperationRepository.GetAsync(factWellOperationRequest, cancellationToken); - if (request.SortFields?.Contains("DateStart desc") == true) - { - for (var day = result.Skip; day - result.Skip < result.Take && datesRange.To.AddDays(-day) >= datesRange.From; day++) - { - var dateDailyReport = DateOnly.FromDateTime(datesRange.To.AddDays(-day).DateTime); + if (request.SortFields?.Contains("DateStart desc") == true) + { + for (var day = result.Skip; day - result.Skip < result.Take && datesRange.To.AddDays(-day) >= datesRange.From; day++) + { + var dateDailyReport = DateOnly.FromDateTime(datesRange.To.AddDays(-day).DateTime); - AddDailyReport(dateDailyReport); - } - } - else - { - for (var day = result.Skip; day - result.Skip < result.Take && datesRange.From.AddDays(day) <= datesRange.To; day++) - { - var dateDailyReport = DateOnly.FromDateTime(datesRange.From.AddDays(day).DateTime); + AddDailyReport(dateDailyReport); + } + } + else + { + for (var day = result.Skip; day - result.Skip < result.Take && datesRange.From.AddDays(day) <= datesRange.To; day++) + { + var dateDailyReport = DateOnly.FromDateTime(datesRange.From.AddDays(day).DateTime); - AddDailyReport(dateDailyReport); - } - } + AddDailyReport(dateDailyReport); + } + } - result.Items = dailyReports; + result.Items = dailyReports; - return result; + return result; - void AddDailyReport(DateOnly date) - { - var dailyReport = existingDailyReports.FirstOrDefault(d => d.IdWell == idWell && d.Date == date) - ?? new DailyReportDto - { - Date = date, - IdWell = idWell - }; + void AddDailyReport(DateOnly date) + { + var dailyReport = existingDailyReports.FirstOrDefault(d => d.IdWell == idWell && d.Date == date) + ?? new DailyReportDto + { + Date = date, + IdWell = idWell + }; var geDate = new DateTimeOffset(date, TimeOnly.MinValue, offset); var leDate = new DateTimeOffset(date.AddDays(1), TimeOnly.MinValue, offset); var factWellOperationPerDay = factWellOperations.Where(o => o.DateStart >= geDate && - o.DateStart <= leDate); - - AddFactWellOperationBlock(dailyReport, factWellOperationPerDay); - - dailyReports.Add(dailyReport); - } - } + o.DateStart <= leDate); + + AddFactWellOperationBlock(dailyReport, factWellOperationPerDay); + + dailyReports.Add(dailyReport); + } + } - private async Task UpdateTimeBalanceBlockAsync(DailyReportDto dailyReport, IEnumerable factWellOperations, - DateTimeOffset geDateStart, DateTimeOffset leDateEnd, CancellationToken cancellationToken) - { - const int idWellOperationSlipsTime = 5011; + private async Task UpdateTimeBalanceBlockAsync(DailyReportDto dailyReport, IEnumerable factWellOperations, + DateTimeOffset geDateStart, DateTimeOffset leDateEnd, CancellationToken cancellationToken) + { + const int idWellOperationSlipsTime = 5011; - if (dailyReport.TimeBalanceBlock is not null) - { - dailyReport.TimeBalanceBlock.SectionName = wellOperationRepository.GetSectionTypes() - .FirstOrDefault(s => s.Id == dailyReport.TimeBalanceBlock.IdSection)?.Caption; + if (dailyReport.TimeBalanceBlock is not null) + { + dailyReport.TimeBalanceBlock.SectionName = wellOperationRepository.GetSectionTypes() + .FirstOrDefault(s => s.Id == dailyReport.TimeBalanceBlock.IdSection)?.Caption; dailyReport.TimeBalanceBlock.WellOperationSlipsTimeCount = (await detectedOperationService.GetAsync( - new DetectedOperationByWellRequest - { - IdsCategories = new[] { idWellOperationSlipsTime }, - IdWell = dailyReport.IdWell, - GeDateStart = geDateStart, - LeDateEnd = leDateEnd - }, cancellationToken))?.Stats.Sum(s => s.Count); + new DetectedOperationByWellRequest + { + IdsCategories = new[] { idWellOperationSlipsTime }, + IdWell = dailyReport.IdWell, + GeDateStart = geDateStart, + LeDateEnd = leDateEnd + }, cancellationToken))?.Stats.Sum(s => s.Count); - dailyReport.TimeBalanceBlock.WellDepth.Fact = factWellOperations - .Where(o => o.IdWellSectionType == dailyReport.TimeBalanceBlock.IdSection) - .Sum(o => o.DepthEnd - o.DepthStart); - } - } + dailyReport.TimeBalanceBlock.WellDepth.Fact = factWellOperations + .Where(o => o.IdWellSectionType == dailyReport.TimeBalanceBlock.IdSection) + .Sum(o => o.DepthEnd - o.DepthStart); + } + } - private async Task AddTrajectoryBlockAsync(DailyReportDto dailyReport, - DateTimeOffset geDate, DateTimeOffset leDate, CancellationToken cancellationToken) - { - var trajectory = (await trajectoryFactNnbRepository.GetByRequestAsync(new TrajectoryRequest - { - IdWell = dailyReport.IdWell, - GeDate = geDate, - LeDate = leDate - }, cancellationToken)).MaxBy(t => t.WellboreDepth); + private async Task AddTrajectoryBlockAsync(DailyReportDto dailyReport, + DateTimeOffset geDate, DateTimeOffset leDate, CancellationToken cancellationToken) + { + var trajectory = (await trajectoryFactNnbRepository.GetByRequestAsync(new TrajectoryRequest + { + IdWell = dailyReport.IdWell, + GeDate = geDate, + LeDate = leDate + }, cancellationToken)).MaxBy(t => t.WellboreDepth); - dailyReport.TrajectoryBlock = new TrajectoryBlockDto - { - WellboreDepth = trajectory?.WellboreDepth, - VerticalDepth = trajectory?.VerticalDepth, - ZenithAngle = trajectory?.ZenithAngle, - AzimuthGeo = trajectory?.AzimuthGeo - }; - } + dailyReport.TrajectoryBlock = new TrajectoryBlockDto + { + WellboreDepth = trajectory?.WellboreDepth, + VerticalDepth = trajectory?.VerticalDepth, + ZenithAngle = trajectory?.ZenithAngle, + AzimuthGeo = trajectory?.AzimuthGeo + }; + } - private async Task AddScheduleBlockAsync(DailyReportDto dailyReport, DateTimeOffset workDate, CancellationToken cancellationToken) - { + private async Task AddScheduleBlockAsync(DailyReportDto dailyReport, DateTimeOffset workDate, CancellationToken cancellationToken) + { dailyReport.ScheduleBlock = (await scheduleRepository.GetAsync(dailyReport.IdWell, workDate, cancellationToken)) - .Select(s => new ScheduleRecordDto - { - ShiftStart = s.ShiftStart, - ShiftEnd = s.ShiftEnd, - Name = s.Driller?.Name, - Surname = s.Driller?.Surname, - Patronymic = s.Driller?.Patronymic - }); - } + .Select(s => new ScheduleRecordDto + { + ShiftStart = s.ShiftStart, + ShiftEnd = s.ShiftEnd, + Name = s.Driller?.Name, + Surname = s.Driller?.Surname, + Patronymic = s.Driller?.Patronymic + }); + } - private async Task UpdateSubsystemBlockAsync(DailyReportDto dailyReport, - DateTimeOffset geDate, DateTimeOffset leDate, CancellationToken cancellationToken) - { - dailyReport.SubsystemBlock ??= new SubsystemBlockDto(); + private async Task UpdateSubsystemBlockAsync(DailyReportDto dailyReport, + DateTimeOffset geDate, DateTimeOffset leDate, CancellationToken cancellationToken) + { + dailyReport.SubsystemBlock ??= new SubsystemBlockDto(); - dailyReport.SubsystemBlock.Subsystems = await GetSubsystemsAsync(); + dailyReport.SubsystemBlock.Subsystems = await GetSubsystemsAsync(); - async Task> GetSubsystemsAsync() - { - var subsystemsStatPerWell = await subsystemService.GetStatAsync(new SubsystemRequest - { - IdWell = dailyReport.IdWell - }, cancellationToken); - - var subsystemsStatPerDay = await subsystemService.GetStatAsync(new SubsystemRequest - { - IdWell = dailyReport.IdWell, - GeDate = geDate, - LeDate = leDate - }, cancellationToken); + async Task> GetSubsystemsAsync() + { + var subsystemsStatPerWell = await subsystemService.GetStatAsync(new SubsystemRequest + { + IdWell = dailyReport.IdWell + }, cancellationToken); + + var subsystemsStatPerDay = await subsystemService.GetStatAsync(new SubsystemRequest + { + IdWell = dailyReport.IdWell, + GeDate = geDate, + LeDate = leDate + }, cancellationToken); - var subsystems = subsystemsStatPerWell - .Select(subsystemStatPerWell => new SubsystemRecordDto - { - Name = subsystemStatPerWell.SubsystemName, - UsagePerDay = subsystemsStatPerDay.FirstOrDefault(s => s.IdSubsystem == subsystemStatPerWell.IdSubsystem)?.Adapt(), - UsagePerWell = subsystemStatPerWell.Adapt() - }).ToList(); + var subsystems = subsystemsStatPerWell + .Select(subsystemStatPerWell => new SubsystemRecordDto + { + Name = subsystemStatPerWell.SubsystemName, + UsagePerDay = subsystemsStatPerDay.FirstOrDefault(s => s.IdSubsystem == subsystemStatPerWell.IdSubsystem)?.Adapt(), + UsagePerWell = subsystemStatPerWell.Adapt() + }).ToList(); - if (dailyReport.SubsystemBlock?.Subsystems != null && dailyReport.SubsystemBlock.Subsystems.Any()) - subsystems.AddRange(dailyReport.SubsystemBlock.Subsystems); + if (dailyReport.SubsystemBlock?.Subsystems != null && dailyReport.SubsystemBlock.Subsystems.Any()) + subsystems.AddRange(dailyReport.SubsystemBlock.Subsystems); - return subsystems.OrderBy(s => s.Name); - } - } + return subsystems.OrderBy(s => s.Name); + } + } - private async Task AddProcessMapWellDrillingBlockAsync(DailyReportDto dailyReport, - DateTimeOffset geDate, DateTimeOffset leDate, CancellationToken cancellationToken) - { - var request = new DataSaubStatRequest(); + private async Task AddProcessMapWellDrillingBlockAsync(DailyReportDto dailyReport, + DateTimeOffset geDate, DateTimeOffset leDate, CancellationToken cancellationToken) + { + var request = new DataSaubStatRequest(); dailyReport.ProcessMapWellDrillingBlock = (await processMapReportDrillingService.GetAsync(dailyReport.IdWell, request, - cancellationToken)).Where(p => p.DateStart >= geDate && p.DateStart <= leDate) - .GroupBy(p => p.DrillingMode) - .Select(g => new ProcessMapWellDrillingRecordDto - { - DrillingMode = g.Key, - WellBoreDepth = g.Sum(p => p.DeltaDepth), - Rop = new PlanFactDto - { - Plan = g.Sum(p => p.Rop.Plan), - Fact = g.Sum(p => p.Rop.Fact) - }, - MechDrillingHours = g.Sum(p => p.DrilledTime) - }); - } + cancellationToken)).Where(p => p.DateStart >= geDate && p.DateStart <= leDate) + .GroupBy(p => p.DrillingMode) + .Select(g => new ProcessMapWellDrillingRecordDto + { + DrillingMode = g.Key, + WellBoreDepth = g.Sum(p => p.DeltaDepth), + Rop = new PlanFactDto + { + Plan = g.Sum(p => p.Rop.Plan), + Fact = g.Sum(p => p.Rop.Fact) + }, + MechDrillingHours = g.Sum(p => p.DrilledTime) + }); + } - private static void AddFactWellOperationBlock(DailyReportDto dailyReport, IEnumerable factWellOperations) - { - const int idWellOperationCategoryDrilling = 4001; + private static void AddFactWellOperationBlock(DailyReportDto dailyReport, IEnumerable factWellOperations) + { + const int idWellOperationCategoryDrilling = 4001; - dailyReport.FactWellOperationBlock = new WellOperationBlockDto - { - WellOperations = factWellOperations.GroupBy(o => o.IdCategory) - .Select(g => new WellOperationRecordDto - { - CategoryName = g.First().OperationCategoryName, - DurationHours = g.Sum(o => o.DurationHours) - }), + dailyReport.FactWellOperationBlock = new WellOperationBlockDto + { + WellOperations = factWellOperations.GroupBy(o => o.IdCategory) + .Select(g => new WellOperationRecordDto + { + CategoryName = g.First().OperationCategoryName, + DurationHours = g.Sum(o => o.DurationHours) + }), - SectionDrillingHours = factWellOperations - .Where(o => o.IdParentCategory is idWellOperationCategoryDrilling) - .Sum(o => o.DurationHours) - }; - } + SectionDrillingHours = factWellOperations + .Where(o => o.IdParentCategory is idWellOperationCategoryDrilling) + .Sum(o => o.DurationHours) + }; + } - private async Task IsDateDailyReportInRangeAsync(int idWell, DateOnly dateDailyReport, CancellationToken cancellationToken) - { - var datesRange = await wellOperationRepository.GetDatesRangeAsync(idWell, WellOperation.IdOperationTypeFact, cancellationToken); + private async Task IsDateDailyReportInRangeAsync(int idWell, DateOnly dateDailyReport, CancellationToken cancellationToken) + { + var datesRange = await wellOperationRepository.GetDatesRangeAsync(idWell, WellOperation.IdOperationTypeFact, cancellationToken); - if (datesRange is null) - return false; - var from = DateOnly.FromDateTime(datesRange.From.DateTime); - var to = DateOnly.FromDateTime(datesRange.To.DateTime); + if (datesRange is null) + return false; + var from = DateOnly.FromDateTime(datesRange.From.DateTime); + var to = DateOnly.FromDateTime(datesRange.To.DateTime); - return dateDailyReport >= from && dateDailyReport <= to; - } + return dateDailyReport >= from && dateDailyReport <= to; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs b/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs index 50d6dd14..d8339f93 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/DetectableTelemetry.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudInfrastructure.Services.DetectOperations; diff --git a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationExportService.cs b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationExportService.cs index 00baba7f..bc8869b4 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationExportService.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationExportService.cs @@ -1,4 +1,4 @@ -using AsbCloudDb.Model; +using AsbCloudDb.Model; using ClosedXML.Excel; using System; using System.Collections.Generic; @@ -20,35 +20,35 @@ namespace AsbCloudInfrastructure.Services.DetectOperations; public class DetectedOperationExportService { - private readonly IWellService wellService; + private readonly IWellService wellService; private readonly IWellOperationCategoryRepository wellOperationCategoryRepository; - private readonly IDetectedOperationService detectedOperationService; + private readonly IDetectedOperationService detectedOperationService; private const int headerRowsCount = 1; - private const string cellDepositName = "B1"; - private const string cellClusterName = "B2"; - private const string cellWellName = "B3"; - private const string cellDeltaDate = "H2"; + private const string cellDepositName = "B1"; + private const string cellClusterName = "B2"; + private const string cellWellName = "B3"; + private const string cellDeltaDate = "H2"; - private const int columnOperationName = 1; - private const int columnDateStart = 2; - private const int columnDateEnd = 3; - private const int columnDuration = 4; - private const int columnDepthStart = 5; - private const int columnDepthEnd = 6; - private const int columnDeltaDepth = 7; - private const int columnDepth = 8; - private const int columnIdReasonOfEnd = 9; - private const int columnComment = 10; + private const int columnOperationName = 1; + private const int columnDateStart = 2; + private const int columnDateEnd = 3; + private const int columnDuration = 4; + private const int columnDepthStart = 5; + private const int columnDepthEnd = 6; + private const int columnDeltaDepth = 7; + private const int columnDepth = 8; + private const int columnIdReasonOfEnd = 9; + private const int columnComment = 10; public DetectedOperationExportService(IWellService wellService, - IWellOperationCategoryRepository wellOperationCategoryRepository, - IDetectedOperationService detectedOperationService) - { - this.wellService = wellService; + IWellOperationCategoryRepository wellOperationCategoryRepository, + IDetectedOperationService detectedOperationService) + { + this.wellService = wellService; this.wellOperationCategoryRepository = wellOperationCategoryRepository; - this.detectedOperationService = detectedOperationService; - } + this.detectedOperationService = detectedOperationService; + } /// /// Экспорт excel файла с операциями по скважине @@ -59,165 +59,165 @@ public class DetectedOperationExportService /// /// public async Task ExportAsync(int idWell, string host, CancellationToken token) - { - var well = await wellService.GetOrDefaultAsync(idWell, token); + { + var well = await wellService.GetOrDefaultAsync(idWell, token); - if (well is null) - throw new ArgumentInvalidException(nameof(idWell), $"Well {idWell} does not exist"); + if (well is null) + throw new ArgumentInvalidException(nameof(idWell), $"Well {idWell} does not exist"); - if (!well.IdTelemetry.HasValue) + if (!well.IdTelemetry.HasValue) throw new ArgumentInvalidException(nameof(idWell), $"Well {idWell} has no telemetry"); var operations = await detectedOperationService.DetectOperationsAsync(well.IdTelemetry.Value, DateTime.UnixEpoch, token); - return await GenerateExcelFileStreamAsync(well, host, operations, token); - } + return await GenerateExcelFileStreamAsync(well, host, operations, token); + } - private async Task GenerateExcelFileStreamAsync(WellDto well, string host, IEnumerable operationDetectorResults, - CancellationToken cancellationToken) - { - using var excelTemplateStream = await GetExcelTemplateStreamAsync(cancellationToken); + private async Task GenerateExcelFileStreamAsync(WellDto well, string host, IEnumerable operationDetectorResults, + CancellationToken cancellationToken) + { + using var excelTemplateStream = await GetExcelTemplateStreamAsync(cancellationToken); - using var workbook = new XLWorkbook(excelTemplateStream); + using var workbook = new XLWorkbook(excelTemplateStream); - AddToWorkbook(workbook, well, host, operationDetectorResults); + AddToWorkbook(workbook, well, host, operationDetectorResults); - MemoryStream memoryStream = new MemoryStream(); - workbook.SaveAs(memoryStream, new SaveOptions { }); - memoryStream.Seek(0, SeekOrigin.Begin); - return memoryStream; - } + MemoryStream memoryStream = new MemoryStream(); + workbook.SaveAs(memoryStream, new SaveOptions { }); + memoryStream.Seek(0, SeekOrigin.Begin); + return memoryStream; + } - private void AddToWorkbook(XLWorkbook workbook, WellDto well, string host, IEnumerable operations) - { - const string sheetName = "Операции"; + private void AddToWorkbook(XLWorkbook workbook, WellDto well, string host, IEnumerable operations) + { + const string sheetName = "Операции"; - if (!operations.Any()) - return; + if (!operations.Any()) + return; - var sheet = workbook.GetWorksheet(sheetName); + var sheet = workbook.GetWorksheet(sheetName); - var orderedOperations = operations - .OrderBy(x => x.DateStart) - .ThenBy(x => x.DepthStart).ToArray(); + var orderedOperations = operations + .OrderBy(x => x.DateStart) + .ThenBy(x => x.DepthStart).ToArray(); AddToSheet(sheet, well, host, orderedOperations); - } + } - private void AddToSheet(IXLWorksheet sheet, WellDto well, string host, IList operations) - { - var wellOperationCategories = wellOperationCategoryRepository.Get(true); + private void AddToSheet(IXLWorksheet sheet, WellDto well, string host, IList operations) + { + var wellOperationCategories = wellOperationCategoryRepository.Get(true); - sheet.Cell(cellDepositName).SetCellValue(well.Deposit); - sheet.Cell(cellClusterName).SetCellValue(well.Cluster); - sheet.Cell(cellWellName).SetCellValue(well.Caption); + sheet.Cell(cellDepositName).SetCellValue(well.Deposit); + sheet.Cell(cellClusterName).SetCellValue(well.Cluster); + sheet.Cell(cellWellName).SetCellValue(well.Caption); - var deltaDate = operations.Max(o => o.DateEnd - o.DateStart); - - sheet.Cell(cellDeltaDate).SetCellValue(deltaDate); + var deltaDate = operations.Max(o => o.DateEnd - o.DateStart); + + sheet.Cell(cellDeltaDate).SetCellValue(deltaDate); - for (int i = 0; i < operations.Count; i++) - { - var current = operations[i]; - var dateStart = current.DateStart.DateTime; - var dateEnd = current.DateEnd.DateTime; + for (int i = 0; i < operations.Count; i++) + { + var current = operations[i]; + var dateStart = current.DateStart.DateTime; + var dateEnd = current.DateEnd.DateTime; - var row = sheet.Row(5 + i + headerRowsCount); + var row = sheet.Row(5 + i + headerRowsCount); - var categoryName = GetCategoryName(wellOperationCategories, current); - - row.Cell(columnDateStart).SetCellValue(dateStart); - row.Cell(columnOperationName).SetCellValue(categoryName); - row.Cell(columnDateEnd).SetCellValue(dateEnd); - row.Cell(columnDuration).SetCellValue((dateEnd - dateStart).TotalMinutes); - row.Cell(columnDepthStart).SetCellValue(current.DepthStart); - row.Cell(columnDepthEnd).SetCellValue(current.DepthEnd); - row.Cell(columnDepth).SetCellValue(current.DepthEnd - current.DepthStart); + var categoryName = GetCategoryName(wellOperationCategories, current); + + row.Cell(columnDateStart).SetCellValue(dateStart); + row.Cell(columnOperationName).SetCellValue(categoryName); + row.Cell(columnDateEnd).SetCellValue(dateEnd); + row.Cell(columnDuration).SetCellValue((dateEnd - dateStart).TotalMinutes); + row.Cell(columnDepthStart).SetCellValue(current.DepthStart); + row.Cell(columnDepthEnd).SetCellValue(current.DepthEnd); + row.Cell(columnDepth).SetCellValue(current.DepthEnd - current.DepthStart); - if (current.ExtraData.TryGetValue("IdReasonOfEnd", out object? idReasonOfEndObject) - && idReasonOfEndObject is int idReasonOfEnd) - { - var reasonOfEnd = GetIdReasonOfEnd(idReasonOfEnd); - row.Cell(columnIdReasonOfEnd).SetCellValue(reasonOfEnd); - } + if (current.ExtraData.TryGetValue("IdReasonOfEnd", out object? idReasonOfEndObject) + && idReasonOfEndObject is int idReasonOfEnd) + { + var reasonOfEnd = GetIdReasonOfEnd(idReasonOfEnd); + row.Cell(columnIdReasonOfEnd).SetCellValue(reasonOfEnd); + } - var query = new QueryBuilder(); - query.Add("end", dateStart.AddSeconds(1800 * 0.9).ToString("yyyy-MM-ddTHH:mm:ss.fff")); - query.Add("range", "1800"); + var query = new QueryBuilder(); + query.Add("end", dateStart.AddSeconds(1800 * 0.9).ToString("yyyy-MM-ddTHH:mm:ss.fff")); + query.Add("range", "1800"); - var link = $"{host}/well/{well.Id}/telemetry/monitoring{query}"; - row.Cell(columnDateStart).SetHyperlink(link); - - var deltaDepth = i > 0 && i + 1 < operations.Count + var link = $"{host}/well/{well.Id}/telemetry/monitoring{query}"; + row.Cell(columnDateStart).SetHyperlink(link); + + var deltaDepth = i > 0 && i + 1 < operations.Count ? current.DepthStart - operations[i - 1].DepthEnd - : 0; + : 0; - row.Cell(columnDeltaDepth).SetCellValue(deltaDepth); + row.Cell(columnDeltaDepth).SetCellValue(deltaDepth); - var comment = CreateComment(operations[i]); - row.Cell(columnComment).SetCellValue(comment); - } - } + var comment = CreateComment(operations[i]); + row.Cell(columnComment).SetCellValue(comment); + } + } private static string GetCategoryName(IEnumerable wellOperationCategories, DetectedOperationDto current) { - var idCategory = current.IdCategory; - if (idCategory == WellOperationCategory.IdSlide && current.EnabledSubsystems.IsAutoOscillation) - return "Бурение в слайде с осцилляцией"; + var idCategory = current.IdCategory; + if (idCategory == WellOperationCategory.IdSlide && current.EnabledSubsystems.IsAutoOscillation) + return "Бурение в слайде с осцилляцией"; var category = wellOperationCategories.FirstOrDefault(o => o.Id == current.IdCategory); - - if(category is not null) - return category.Name; + + if(category is not null) + return category.Name; - return $"Операция №{idCategory}"; + return $"Операция №{idCategory}"; } private static string GetIdReasonOfEnd(int idReasonOfEnd) => idReasonOfEnd switch { 0 => "Не определена", - 1 => "Не определено начало операции", - 101 => "Разница глубин забоя и положением долота", - 300 => "Низкое давление", - 301 => "Высокое давление", - 700 => "Изменение глубины долота и осевая нагрузка < веса на крюке", - _ => idReasonOfEnd.ToString($"Причина № {idReasonOfEnd}"), + 1 => "Не определено начало операции", + 101 => "Разница глубин забоя и положением долота", + 300 => "Низкое давление", + 301 => "Высокое давление", + 700 => "Изменение глубины долота и осевая нагрузка < веса на крюке", + _ => idReasonOfEnd.ToString($"Причина № {idReasonOfEnd}"), }; private async Task GetExcelTemplateStreamAsync(CancellationToken cancellationToken) - { - string resourceName = Assembly.GetExecutingAssembly() - .GetManifestResourceNames() - .FirstOrDefault(n => n.EndsWith("DetectOperations.xlsx"))!; + { + string resourceName = Assembly.GetExecutingAssembly() + .GetManifestResourceNames() + .FirstOrDefault(n => n.EndsWith("DetectOperations.xlsx"))!; - using var stream = Assembly.GetExecutingAssembly() - .GetManifestResourceStream(resourceName)!; + using var stream = Assembly.GetExecutingAssembly() + .GetManifestResourceStream(resourceName)!; - var memoryStream = new MemoryStream(); - await stream.CopyToAsync(memoryStream, cancellationToken); - memoryStream.Position = 0; + var memoryStream = new MemoryStream(); + await stream.CopyToAsync(memoryStream, cancellationToken); + memoryStream.Position = 0; - return memoryStream; - } - - private static string CreateComment(DetectedOperationDto operation) - { - switch (operation.IdCategory) - { - case WellOperationCategory.IdRotor: - case WellOperationCategory.IdSlide: - var comment = ""; - if (operation.ExtraData.TryGetValue(DetectorDrilling.ExtraDataKeyAvgRotorSpeed, out object? oAvgRotorSpeed)) - comment += $"Средняя скорость оборотов ротора: {oAvgRotorSpeed}\r\n"; + return memoryStream; + } + + private static string CreateComment(DetectedOperationDto operation) + { + switch (operation.IdCategory) + { + case WellOperationCategory.IdRotor: + case WellOperationCategory.IdSlide: + var comment = ""; + if (operation.ExtraData.TryGetValue(DetectorDrilling.ExtraDataKeyAvgRotorSpeed, out object? oAvgRotorSpeed)) + comment += $"Средняя скорость оборотов ротора: {oAvgRotorSpeed}\r\n"; if (operation.ExtraData.TryGetValue(DetectorDrilling.ExtraDataKeyDispersionOfNormalizedRotorSpeed, out object? oDispersionOfNormalizedRotorSpeed)) - comment += $"Дисперсия нормированных оборотов ротора: {oDispersionOfNormalizedRotorSpeed}"; - - return comment; - - default: - return string.Empty; - } - } + comment += $"Дисперсия нормированных оборотов ротора: {oDispersionOfNormalizedRotorSpeed}"; + + return comment; + + default: + return string.Empty; + } + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs index 0cac62b2..299db028 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/DetectedOperationService.cs @@ -1,4 +1,4 @@ -using System; +using System; using AsbCloudApp.Data; using AsbCloudApp.Data.DetectedOperation; using AsbCloudApp.Repositories; diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs index 44b47554..c751dfd5 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorAbstract.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using AsbCloudApp.Data.DetectedOperation; diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorConditioning.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorConditioning.cs index 9336fb27..1a5142e3 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorConditioning.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorConditioning.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.DetectedOperation; +using AsbCloudApp.Data.DetectedOperation; using AsbCloudDb.Model; using System; using System.Collections.Generic; diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDevelopment.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDevelopment.cs index 13f665e4..c99dcadd 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDevelopment.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDevelopment.cs @@ -1,4 +1,4 @@ -// using System; +// using System; // using AsbCloudDb.Model; // // namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDrilling.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDrilling.cs index 88084bfe..f2ef3dcb 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDrilling.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorDrilling.cs @@ -14,45 +14,45 @@ public class DetectorDrilling : DetectorAbstract public const string ExtraDataKeyAvgRotorSpeed = "avgRotorSpeed"; protected override bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) - { - var point0 = telemetry[position]; - var delta = point0.WellDepth - point0.BitDepth; - if (delta > 0.03d) - return false; + { + var point0 = telemetry[position]; + var delta = point0.WellDepth - point0.BitDepth; + if (delta > 0.03d) + return false; - if (point0.Pressure < 18) - return false; + if (point0.Pressure < 18) + return false; - return true; - } + return true; + } - protected override int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) - { - var point0 = telemetry[position]; - var delta = point0.WellDepth - point0.BitDepth; - - if (delta > 0.03d) - return IdReasonOfEnd_DeltaDepthIsHi; + protected override int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) + { + var point0 = telemetry[position]; + var delta = point0.WellDepth - point0.BitDepth; + + if (delta > 0.03d) + return IdReasonOfEnd_DeltaDepthIsHi; - if (point0.Pressure < 18) - return IdReasonOfEnd_PressureIsLo; + if (point0.Pressure < 18) + return IdReasonOfEnd_PressureIsLo; - return IdReasonOfEnd_NotDetected; - } - - protected override double CalcValue(DetectableTelemetry[] telemetry, int begin, int end) - => CalcRop(telemetry, begin, end); + return IdReasonOfEnd_NotDetected; + } + + protected override double CalcValue(DetectableTelemetry[] telemetry, int begin, int end) + => CalcRop(telemetry, begin, end); - protected override bool IsValidOperationDetectorResult(OperationDetectorResult operationDetectorResult) => + protected override bool IsValidOperationDetectorResult(OperationDetectorResult operationDetectorResult) => base.IsValidOperationDetectorResult(operationDetectorResult) && (operationDetectorResult.Operation.DepthEnd - operationDetectorResult.Operation.DepthStart) > 0.01; protected override (int Begin, int End) RefineEdges(DetectableTelemetry[] telemetry, int begin, int end) { var i = end; - for (; i > begin + 1; i--) + for (; i > begin + 1; i--) if (telemetry[i].WellDepth - telemetry[i - 1].WellDepth > 0.001d) - break; + break; return (begin, i); } @@ -61,34 +61,34 @@ public class DetectorDrilling : DetectorAbstract { var (avgRotorSpeed, dispersionOfNormalizedRotorSpeed) = CalcCriteries(telemetry, begin, end); var idCategory = GetIdOperation(avgRotorSpeed, dispersionOfNormalizedRotorSpeed); - var extraData = new Dictionary + var extraData = new Dictionary { [ExtraDataKeyAvgRotorSpeed] = avgRotorSpeed, [ExtraDataKeyDispersionOfNormalizedRotorSpeed] = dispersionOfNormalizedRotorSpeed, [ExtraDataKeyHasOscillation] = avgRotorSpeed > 1 && dispersionOfNormalizedRotorSpeed > dispersionOfNormalizedRotorSpeedThreshold }; - return (idCategory, extraData); + return (idCategory, extraData); } - private static (double avgRotorSpeed, double dispersionOfNormalizedRotorSpeed) CalcCriteries(DetectableTelemetry[] telemetry, int begin, int end) + private static (double avgRotorSpeed, double dispersionOfNormalizedRotorSpeed) CalcCriteries(DetectableTelemetry[] telemetry, int begin, int end) { - var telemetryRange = telemetry[begin..end]; - var avgRotorSpeed = telemetryRange.Average(t => t.RotorSpeed); + var telemetryRange = telemetry[begin..end]; + var avgRotorSpeed = telemetryRange.Average(t => t.RotorSpeed); var dispersion = telemetryRange.Average(t => Math.Pow(t.RotorSpeed / avgRotorSpeed - 1, 2)); return (avgRotorSpeed, dispersion); } private static int GetIdOperation(double avgRotorSpeed, double dispersionOfNormalizedRotorSpeed) - { + { const int idSlideWithOscillation = WellOperationCategory.IdSlide; if (avgRotorSpeed < 5) return WellOperationCategory.IdSlide; - if(dispersionOfNormalizedRotorSpeed < dispersionOfNormalizedRotorSpeedThreshold) - return WellOperationCategory.IdRotor; + if(dispersionOfNormalizedRotorSpeed < dispersionOfNormalizedRotorSpeedThreshold) + return WellOperationCategory.IdRotor; - return idSlideWithOscillation; - } + return idSlideWithOscillation; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashing.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashing.cs index f5d0add5..24b69219 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashing.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashing.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.DetectedOperation; +using AsbCloudApp.Data.DetectedOperation; using AsbCloudDb.Model; using System; using System.Collections.Generic; diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashingBeforeConnection.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashingBeforeConnection.cs index ffc74129..3b61181f 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashingBeforeConnection.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorFlashingBeforeConnection.cs @@ -1,4 +1,4 @@ -// using AsbCloudDb.Model; +// using AsbCloudDb.Model; // // namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors // { diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorRotor.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorRotor.cs index 9562645d..7237c34c 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorRotor.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorRotor.cs @@ -1,4 +1,4 @@ -// using AsbCloudDb.Model; +// using AsbCloudDb.Model; // using System.Linq; // // namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlide.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlide.cs index 6244b4d6..edf0a9be 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlide.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlide.cs @@ -1,4 +1,4 @@ -// using AsbCloudDb.Model; +// using AsbCloudDb.Model; // // namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors // { diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlipsTime.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlipsTime.cs index a9996a1b..47208183 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlipsTime.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorSlipsTime.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using AsbCloudApp.Data.DetectedOperation; using AsbCloudDb.Model; @@ -7,61 +7,61 @@ namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors; public class DetectorSlipsTime : DetectorAbstract { - protected override double CalcValue(DetectableTelemetry[] telemetry, int begin, int end) - => CalcDeltaMinutes(telemetry, begin, end); + protected override double CalcValue(DetectableTelemetry[] telemetry, int begin, int end) + => CalcDeltaMinutes(telemetry, begin, end); - protected override bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) - { - var currentPoint = telemetry[position]; - if (currentPoint.BitDepth < 150) - return false; - - if (currentPoint.Pressure > 20) - return false; + protected override bool DetectBegin(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) + { + var currentPoint = telemetry[position]; + if (currentPoint.BitDepth < 150) + return false; + + if (currentPoint.Pressure > 20) + return false; - var delta = currentPoint.WellDepth - currentPoint.BitDepth; - if (delta < 0.1d) - return false; + var delta = currentPoint.WellDepth - currentPoint.BitDepth; + if (delta < 0.1d) + return false; - var nextIndexPoint = telemetry.Length <= position ? position : position + 1; - var nextPoint = telemetry[nextIndexPoint]; - var deltaBitDepth = Math.Abs(currentPoint.BitDepth - nextPoint.BitDepth); - if (deltaBitDepth > 0.001d) - return false; + var nextIndexPoint = telemetry.Length <= position ? position : position + 1; + var nextPoint = telemetry[nextIndexPoint]; + var deltaBitDepth = Math.Abs(currentPoint.BitDepth - nextPoint.BitDepth); + if (deltaBitDepth > 0.001d) + return false; - var deltaBlockPosition = Math.Abs(currentPoint.BlockPosition - nextPoint.BlockPosition); - if (deltaBlockPosition < 0.001d) - return false; + var deltaBlockPosition = Math.Abs(currentPoint.BlockPosition - nextPoint.BlockPosition); + if (deltaBlockPosition < 0.001d) + return false; - return true; - } + return true; + } - protected override int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) - { - var currentPoint = telemetry[position]; + protected override int DetectEnd(DetectableTelemetry[] telemetry, int position, DetectedOperationDto? previousOperation) + { + var currentPoint = telemetry[position]; - if (currentPoint.Pressure > 20) - return IdReasonOfEnd_PressureIsHi; + if (currentPoint.Pressure > 20) + return IdReasonOfEnd_PressureIsHi; - var prevPointIndex = position <= 0 ? 0 : position - 1; + var prevPointIndex = position <= 0 ? 0 : position - 1; - var prevPoint = telemetry[prevPointIndex]; + var prevPoint = telemetry[prevPointIndex]; - var deltaBitDepth = Math.Abs(currentPoint.BitDepth - prevPoint.BitDepth); + var deltaBitDepth = Math.Abs(currentPoint.BitDepth - prevPoint.BitDepth); - if (deltaBitDepth > 0.001d && currentPoint.AxialLoad < currentPoint.HookWeight) - return IdReasonOfEnd_ChangeBithDepthAndAxiloadLessHookWeight; + if (deltaBitDepth > 0.001d && currentPoint.AxialLoad < currentPoint.HookWeight) + return IdReasonOfEnd_ChangeBithDepthAndAxiloadLessHookWeight; - return IdReasonOfEnd_NotDetected; - } + return IdReasonOfEnd_NotDetected; + } - protected override (int IdCategory, IDictionary ExtraData) GetSpecificInformation(DetectableTelemetry[] telemetry, - int begin, - int end) - { - return (WellOperationCategory.IdSlipsTime, new Dictionary()); - } + protected override (int IdCategory, IDictionary ExtraData) GetSpecificInformation(DetectableTelemetry[] telemetry, + int begin, + int end) + { + return (WellOperationCategory.IdSlipsTime, new Dictionary()); + } - protected override bool IsValidOperationDetectorResult(OperationDetectorResult operationDetectorResult) => - Math.Abs((operationDetectorResult.Operation.DateStart - operationDetectorResult.Operation.DateEnd).TotalMinutes) < 30; + protected override bool IsValidOperationDetectorResult(OperationDetectorResult operationDetectorResult) => + Math.Abs((operationDetectorResult.Operation.DateStart - operationDetectorResult.Operation.DateEnd).TotalMinutes) < 30; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorStaticSurveying.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorStaticSurveying.cs index 20d411dc..bcd3ab5c 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorStaticSurveying.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorStaticSurveying.cs @@ -1,4 +1,4 @@ -// using AsbCloudDb.Model; +// using AsbCloudDb.Model; // using System.Linq; // using System; // diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorTemplating.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorTemplating.cs index 96e11346..66b4f38f 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorTemplating.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorTemplating.cs @@ -1,4 +1,4 @@ -// using AsbCloudDb.Model; +// using AsbCloudDb.Model; // using System.Collections.Generic; // // namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorTemplatingWhileDrilling.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorTemplatingWhileDrilling.cs index 656ad29e..dcef9e8a 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorTemplatingWhileDrilling.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/DetectorTemplatingWhileDrilling.cs @@ -1,4 +1,4 @@ -// using AsbCloudDb.Model; +// using AsbCloudDb.Model; // // namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors // { diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/OperationDetectorResult.cs b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/OperationDetectorResult.cs index 8325d86c..453a7fab 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Detectors/OperationDetectorResult.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/Detectors/OperationDetectorResult.cs @@ -1,12 +1,12 @@ -using AsbCloudApp.Data.DetectedOperation; +using AsbCloudApp.Data.DetectedOperation; namespace AsbCloudInfrastructure.Services.DetectOperations.Detectors { - public class OperationDetectorResult - { - public int TelemetryBegin { get; set; } - public int TelemetryEnd { get; set; } - public DetectedOperationDto Operation { get; set; } = null!; - } + public class OperationDetectorResult + { + public int TelemetryBegin { get; set; } + public int TelemetryEnd { get; set; } + public DetectedOperationDto Operation { get; set; } = null!; + } } diff --git a/AsbCloudInfrastructure/Services/DetectOperations/EnabledSubsystemsFlagsExtensions.cs b/AsbCloudInfrastructure/Services/DetectOperations/EnabledSubsystemsFlagsExtensions.cs index 09e0e387..f2626158 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/EnabledSubsystemsFlagsExtensions.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/EnabledSubsystemsFlagsExtensions.cs @@ -4,12 +4,12 @@ namespace AsbCloudInfrastructure.Services.DetectOperations; public static class EnabledSubsystemsFlagsExtensions { - /// - /// Есть ли флаг подсистемы у операции - /// - /// - /// - /// - public static bool HasEnabledSubsystems(this EnabledSubsystemsFlags flags, int enabledSubsystems) - => (enabledSubsystems & (int)flags) > 0; + /// + /// Есть ли флаг подсистемы у операции + /// + /// + /// + /// + public static bool HasEnabledSubsystems(this EnabledSubsystemsFlags flags, int enabledSubsystems) + => (enabledSubsystems & (int)flags) > 0; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/DetectOperations/InterpolationLine.cs b/AsbCloudInfrastructure/Services/DetectOperations/InterpolationLine.cs index 253fadb9..a6880881 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/InterpolationLine.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/InterpolationLine.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace AsbCloudInfrastructure.Services.DetectOperations { diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Readme.md b/AsbCloudInfrastructure/Services/DetectOperations/Readme.md index 5a7c6528..284f681c 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Readme.md +++ b/AsbCloudInfrastructure/Services/DetectOperations/Readme.md @@ -1,4 +1,4 @@ -# Сервис определения операций по данным телеметрии +# Сервис определения операций по данным телеметрии Классы: diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка перед наращиванием.md b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка перед наращиванием.md index 093d61fb..75e675c1 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка перед наращиванием.md +++ b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка перед наращиванием.md @@ -1,8 +1,8 @@ -# Алгоритм определения промывки перед проработкой/ шаблонировкой перед наращиванием +# Алгоритм определения промывки перед проработкой/ шаблонировкой перед наращиванием ## Описание -Промывка перед проработкой/ шаблонировкой перед наращиванием – операция, во время которой после добуривания очередной трубы происходит снижение осевой нагрузки и дифференциального давления, талевый блок остается условно неподвижным. +Промывка перед проработкой/ шаблонировкой перед наращиванием - операция, во время которой после добуривания очередной трубы происходит снижение осевой нагрузки и дифференциального давления, талевый блок остается условно неподвижным. Проработка перед наращиванием определяется как время между: - окончанием операции бурения (ротор/ слайд/ ручное бурение) @@ -10,17 +10,17 @@ ## Метод определения - Признак начала операции = - ( предыдущая операция == бурение в роторе или слайде) - ( расстояние от долота до забоя < 0,05м ) И - ( давление > 15 атм ) И - ( положение блока < 3м ) - - Признак окончания операции = - ( расстояние от долота до забоя > 0.03м ) И - ( давление > 15 атм ) И - ( высота блока изменяется больше чем на 0.03м в течении 60 сек с начала операции); - + Признак начала операции = + ( предыдущая операция == бурение в роторе или слайде) + ( расстояние от долота до забоя < 0,05м ) И + ( давление > 15 атм ) И + ( положение блока < 3м ) + + Признак окончания операции = + ( расстояние от долота до забоя > 0.03м ) И + ( давление > 15 атм ) И + ( высота блока изменяется больше чем на 0.03м в течении 60 сек с начала операции); + ## Ключевой параметр Продолжительность операции. diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка.md b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка.md index 15e56d47..063dda58 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка.md +++ b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Промывка.md @@ -1,8 +1,8 @@ -# Алгоритм определения промывки +# Алгоритм определения промывки ## Описание -Промывка – операция, во время которой давление условно постоянное, а вращение колонны отсутствует, талевый блок при этом может быть как в движении, так и статичным. +Промывка - операция, во время которой давление условно постоянное, а вращение колонны отсутствует, талевый блок при этом может быть как в движении, так и статичным. Промывка определяется как время между: - окончанием операции бурения или выходом на режим буровых насосов (рост давления) @@ -10,19 +10,19 @@ ## Метод определения - Признак начала операции = - ( давление >= 10 атм ) И - ( обороты ротора <= 8 об/мин) И - ( расстояние от долота до забоя >= 0.01 м) И - ( глубина забоя не изменяется) И - ( глубина долота >= 150 м); + Признак начала операции = + ( давление >= 10 атм ) И + ( обороты ротора <= 8 об/мин) И + ( расстояние от долота до забоя >= 0.01 м) И + ( глубина забоя не изменяется) И + ( глубина долота >= 150 м); - Признак окончания операции = - ( давление < 10 атм ) ИЛИ - ( расстояние от долота до забоя < 0.01 м ) ИЛИ - ( обороты ротора > 8 об/мин) ИЛИ - ( глубина долота < 150 м); - + Признак окончания операции = + ( давление < 10 атм ) ИЛИ + ( расстояние от долота до забоя < 0.01 м ) ИЛИ + ( обороты ротора > 8 об/мин) ИЛИ + ( глубина долота < 150 м); + ## Ключевой параметр Продолжительность операции. diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Проработка перед наращиванием.md b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Проработка перед наращиванием.md index ee2f8154..f0354487 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Проработка перед наращиванием.md +++ b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Проработка перед наращиванием.md @@ -1,7 +1,7 @@ # Алгоритм определения проработки перед наращиванием ## Описание -Проработка перед наращиванием бурильного инструмента – операция, во время которой после добуривания очередной трубы/ свечи начинается подъем и спуск бурильного инструмента с вращением. Следующей операцией после проработки будет либо шаблонировка (аналогично проработке, но без вращения), либо разгрузка инструмента в клинья (снижение веса на крюке) - наращивание +Проработка перед наращиванием бурильного инструмента - операция, во время которой после добуривания очередной трубы/ свечи начинается подъем и спуск бурильного инструмента с вращением. Следующей операцией после проработки будет либо шаблонировка (аналогично проработке, но без вращения), либо разгрузка инструмента в клинья (снижение веса на крюке) - наращивание Проработка перед наращиванием определяется как время между: - начало подъема/ спуска бурильного инструмента с вращением @@ -11,21 +11,21 @@ ## Метод определения - Признак начала операции = - ( предыдущая операция НЕ удержание в клиньях) И - ( расстояние от долота до забоя > 0.03м ) И - ( расстояние от долота до забоя < 30м ) И - ( давление > 15 атм ) И - ( положение блока < 2.5м ) И - ( обороты ротора > 10 об/м ) И - ( высота блока изменяется больше чем на 0.03м в течении 60 сек с начала операции); - - Признак окончания операции = - ( расстояние от долота до забоя < 0.03м ) ИЛИ - ( расстояние от долота до забоя < 30м ) ИЛИ - ( давление < 15 атм ) ИЛИ - ( положение блока > 31м ) ИЛИ - ( обороты ротора < 10 об/м ); + Признак начала операции = + ( предыдущая операция НЕ удержание в клиньях) И + ( расстояние от долота до забоя > 0.03м ) И + ( расстояние от долота до забоя < 30м ) И + ( давление > 15 атм ) И + ( положение блока < 2.5м ) И + ( обороты ротора > 10 об/м ) И + ( высота блока изменяется больше чем на 0.03м в течении 60 сек с начала операции); + + Признак окончания операции = + ( расстояние от долота до забоя < 0.03м ) ИЛИ + ( расстояние от долота до забоя < 30м ) ИЛИ + ( давление < 15 атм ) ИЛИ + ( положение блока > 31м ) ИЛИ + ( обороты ротора < 10 об/м ); ## Ключевой параметр Продолжительность операции. diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Проработка.md b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Проработка.md index 91ddd293..43858d72 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Проработка.md +++ b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Проработка.md @@ -1,7 +1,7 @@ # Алгоритм определения проработки ## Описание -Проработка – операция, во время которой производится подъем или спуск бурильного инструмента с вращением и циркуляцией. Следующей операцией после проработки будет либо шаблонировка (аналогично проработке, но БЕЗ вращением и циркуляции), либо разгрузка инструмента в клинья (снижение веса на крюке) – наращивание или отворот бурильного инструмента. +Проработка - операция, во время которой производится подъем или спуск бурильного инструмента с вращением и циркуляцией. Следующей операцией после проработки будет либо шаблонировка (аналогично проработке, но БЕЗ вращением и циркуляции), либо разгрузка инструмента в клинья (снижение веса на крюке) - наращивание или отворот бурильного инструмента. Проработка определяется как время между: - начало подъема/спуска бурильного инструмента с циркуляцией и вращением; @@ -13,17 +13,17 @@ ## Метод определения - Признак начала операции = - ( давление >= 10 атм ) И - ( обороты ротора > 8 об/мин ) И - ( расстояние от долота до забоя >= 0.03м ) И - ( глубина долота >= 150м); - - Признак окончания операции = - ( обороты ротора <= 8 об/мин ) ИЛИ - ( давление < 10 атм ) ИЛИ - ( расстояние от долота до забоя < 0.03м ) ИЛИ - ( глубина долота < 150м); + Признак начала операции = + ( давление >= 10 атм ) И + ( обороты ротора > 8 об/мин ) И + ( расстояние от долота до забоя >= 0.03м ) И + ( глубина долота >= 150м); + + Признак окончания операции = + ( обороты ротора <= 8 об/мин ) ИЛИ + ( давление < 10 атм ) ИЛИ + ( расстояние от долота до забоя < 0.03м ) ИЛИ + ( глубина долота < 150м); ## Ключевой параметр Продолжительность операции. diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Удержание в клиньях.md b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Удержание в клиньях.md index c3bcab51..729b3580 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Удержание в клиньях.md +++ b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Удержание в клиньях.md @@ -1,22 +1,22 @@ # Алгоритм определения времени в клиньях ## Описание -Наращивание бурильного инструмента – операция, во время которой после добуривания очередной трубы/ свечи циркуляция выключается, инструмент разгружается в клиньях (остается только вес крюкоблока и ВСП), происходит развинчивание трубы от верхнего силового привода, берется очередная труба/ свеча, свинчивается с инструментом в клиньях, свинчивается с верхним силовым приводом, происходит подъем инструмента, вес на крюке увеличивается. Далее включается циркуляция и происходит механическое бурение. +Наращивание бурильного инструмента - операция, во время которой после добуривания очередной трубы/ свечи циркуляция выключается, инструмент разгружается в клиньях (остается только вес крюкоблока и ВСП), происходит развинчивание трубы от верхнего силового привода, берется очередная труба/ свеча, свинчивается с инструментом в клиньях, свинчивается с верхним силовым приводом, происходит подъем инструмента, вес на крюке увеличивается. Далее включается циркуляция и происходит механическое бурение. Наращивание определяется как время между: -- началом разгрузки инструмента на клинья (остается только вес крюкоблока и ВСП). При этом расстояние от долота до забоя в диапазоне от 0.1 до 3м., давление менее 20 атм. В случае Если происходит движение блока без изменения глубины долота—-> идем назад и ищем падение давления ниже 20атм. +- началом разгрузки инструмента на клинья (остается только вес крюкоблока и ВСП). При этом расстояние от долота до забоя в диапазоне от 0.1 до 3м., давление менее 20 атм. В случае Если происходит движение блока без изменения глубины долота--> идем назад и ищем падение давления ниже 20атм. - снятие инструмента с клиньев (вес увеличивается более, чем на 1т). При этом движение талевого блока происходит вверх ИЛИ увеличение давления больше 20 атм. ## Метод определения - Признак начала операции = + Признак начала операции = ( Расстояние от долота до забоя > 0.1 м) И ( давление < 20атм) И ( движение блока без изменения глубины долота) И ( глубина долота > 150 м); - Признак окончания операции = + Признак окончания операции = ( давление > 20атм) ИЛИ ( время продолжительности > 30 мин) ИЛИ ( изменение глубины долота) И diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Шаблонировка при бурении.md b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Шаблонировка при бурении.md index 0463730c..f3ca0960 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Шаблонировка при бурении.md +++ b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Шаблонировка при бурении.md @@ -1,21 +1,21 @@ -# Алгоритм определения Шаблонировки при бурении +# Алгоритм определения Шаблонировки при бурении ## Описание Шаблонировка при бурении - ## Метод определения - Признак начала операции = - ( предыдущая операция == промывка ) - ( давление > 15 атм ) И - ( положение блока увеличится на 0,5м за следующие 30сек ) И - ( Обороты ротора меньше 1 ) - - Признак окончания операции = + Признак начала операции = + ( предыдущая операция == промывка ) + ( давление > 15 атм ) И + ( положение блока увеличится на 0,5м за следующие 30сек ) И + ( Обороты ротора меньше 1 ) + + Признак окончания операции = ( - ( высота блока не изменяется больше чем на 0.03м в течении 60 сек после окончания операции ) И - ( расстояние от долота до забоя > 0.03м ) И - ( давление > 15 атм ) + ( высота блока не изменяется больше чем на 0.03м в течении 60 сек после окончания операции ) И + ( расстояние от долота до забоя > 0.03м ) И + ( давление > 15 атм ) ) ИЛИ ( давление < 15 атм ) ИЛИ ( Увеличение глубины забоя > 0,01м за 10 секунд) diff --git a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Шаблонировки перед наращиванием.md b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Шаблонировки перед наращиванием.md index 60aadb0f..76251652 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Шаблонировки перед наращиванием.md +++ b/AsbCloudInfrastructure/Services/DetectOperations/Specifications/Шаблонировки перед наращиванием.md @@ -1,7 +1,7 @@ # Алгоритм определения шаблонировки перед наращиванием ## Описание -Шаблонировкаперед наращиванием бурильного инструмента – операция, во время которой после добуривания очередной трубы/ свечи начинается подъем и спуск бурильного инструмента БЕЗ вращения. Следующей операцией после шаблонировки будет либо проработка (аналогично шаблонировке, но С вращением), либо разгрузка инструмента в клинья (снижение веса на крюке) - наращивание +Шаблонировкаперед наращиванием бурильного инструмента - операция, во время которой после добуривания очередной трубы/ свечи начинается подъем и спуск бурильного инструмента БЕЗ вращения. Следующей операцией после шаблонировки будет либо проработка (аналогично шаблонировке, но С вращением), либо разгрузка инструмента в клинья (снижение веса на крюке) - наращивание Шаблонировка перед наращиванием определяется как время между: - начало подъема/ спуска бурильного инструмента БЕЗ вращения @@ -11,21 +11,21 @@ ## Метод определения - Признак начала операции = - ( предыдущая операция НЕ удержание в клиньях) И - ( расстояние от долота до забоя > 0.03м ) И - ( расстояние от долота до забоя < 30м ) И - ( давление > 15 атм ) И - ( положение блока < 2.5м ) И - ( обороты ротора < 10 об/м ) И - ( высота блока изменяется больше чем на 0.03м в течении 60 сек с начала операции); - - Признак окончания операции = - ( расстояние от долота до забоя < 0.03м ) ИЛИ - ( расстояние от долота до забоя < 30м ) ИЛИ - ( давление < 15 атм ) ИЛИ - ( положение блока > 31м ) ИЛИ - ( обороты ротора > 10 об/м ); + Признак начала операции = + ( предыдущая операция НЕ удержание в клиньях) И + ( расстояние от долота до забоя > 0.03м ) И + ( расстояние от долота до забоя < 30м ) И + ( давление > 15 атм ) И + ( положение блока < 2.5м ) И + ( обороты ротора < 10 об/м ) И + ( высота блока изменяется больше чем на 0.03м в течении 60 сек с начала операции); + + Признак окончания операции = + ( расстояние от долота до забоя < 0.03м ) ИЛИ + ( расстояние от долота до забоя < 30м ) ИЛИ + ( давление < 15 атм ) ИЛИ + ( положение блока > 31м ) ИЛИ + ( обороты ротора > 10 об/м ); ## Ключевой параметр Продолжительность операции. \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs b/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs index 8a96f26c..9b50f67d 100644 --- a/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs +++ b/AsbCloudInfrastructure/Services/DetectOperations/WorkOperationDetection.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; using System.Linq; using System.Threading; diff --git a/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportMakerService.cs b/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportMakerService.cs index d40ab302..1519d5bd 100644 --- a/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportMakerService.cs +++ b/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportMakerService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.DrillTestReport; +using AsbCloudApp.Data.DrillTestReport; using ClosedXML.Excel; using System; using System.IO; diff --git a/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportService.cs b/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportService.cs index ff29ed0f..970d9b73 100644 --- a/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportService.cs +++ b/AsbCloudInfrastructure/Services/DrillTestReport/DrillTestReportService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.DrillTestReport; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; diff --git a/AsbCloudInfrastructure/Services/DrillingProgram/ContentListSheet.cs b/AsbCloudInfrastructure/Services/DrillingProgram/ContentListSheet.cs index 06da4d48..627cec0c 100644 --- a/AsbCloudInfrastructure/Services/DrillingProgram/ContentListSheet.cs +++ b/AsbCloudInfrastructure/Services/DrillingProgram/ContentListSheet.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using ClosedXML.Excel; using System; using System.Collections.Generic; diff --git a/AsbCloudInfrastructure/Services/DrillingProgram/Convert/ConvertToPdf.cs b/AsbCloudInfrastructure/Services/DrillingProgram/Convert/ConvertToPdf.cs index 07526f5d..4c789698 100644 --- a/AsbCloudInfrastructure/Services/DrillingProgram/Convert/ConvertToPdf.cs +++ b/AsbCloudInfrastructure/Services/DrillingProgram/Convert/ConvertToPdf.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; using CliWrap; diff --git a/AsbCloudInfrastructure/Services/DrillingProgram/DrillingProgramService.cs b/AsbCloudInfrastructure/Services/DrillingProgram/DrillingProgramService.cs index 18e6acf2..06058d4d 100644 --- a/AsbCloudInfrastructure/Services/DrillingProgram/DrillingProgramService.cs +++ b/AsbCloudInfrastructure/Services/DrillingProgram/DrillingProgramService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.User; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; diff --git a/AsbCloudInfrastructure/Services/DrillingProgram/ImageInfo.cs b/AsbCloudInfrastructure/Services/DrillingProgram/ImageInfo.cs index d6306919..bbeaa71b 100644 --- a/AsbCloudInfrastructure/Services/DrillingProgram/ImageInfo.cs +++ b/AsbCloudInfrastructure/Services/DrillingProgram/ImageInfo.cs @@ -1,4 +1,4 @@ -using ClosedXML.Excel; +using ClosedXML.Excel; namespace AsbCloudInfrastructure.Services.DrillingProgram { diff --git a/AsbCloudInfrastructure/Services/DrillingProgram/TitleListSheet.cs b/AsbCloudInfrastructure/Services/DrillingProgram/TitleListSheet.cs index 7c9355d8..57e37111 100644 --- a/AsbCloudInfrastructure/Services/DrillingProgram/TitleListSheet.cs +++ b/AsbCloudInfrastructure/Services/DrillingProgram/TitleListSheet.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using ClosedXML.Excel; using System; using System.Collections.Generic; diff --git a/AsbCloudInfrastructure/Services/Email/BaseFactory.cs b/AsbCloudInfrastructure/Services/Email/BaseFactory.cs index b48d77ed..50570467 100644 --- a/AsbCloudInfrastructure/Services/Email/BaseFactory.cs +++ b/AsbCloudInfrastructure/Services/Email/BaseFactory.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using Microsoft.Extensions.Configuration; using System; diff --git a/AsbCloudInfrastructure/Services/Email/DrillingMailBodyFactory.cs b/AsbCloudInfrastructure/Services/Email/DrillingMailBodyFactory.cs index ac1d4771..1501811a 100644 --- a/AsbCloudInfrastructure/Services/Email/DrillingMailBodyFactory.cs +++ b/AsbCloudInfrastructure/Services/Email/DrillingMailBodyFactory.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using Microsoft.Extensions.Configuration; namespace AsbCloudInfrastructure.Services.Email diff --git a/AsbCloudInfrastructure/Services/Email/EmailNotificationTransportService.cs b/AsbCloudInfrastructure/Services/Email/EmailNotificationTransportService.cs index 6812e068..a52cd0b1 100644 --- a/AsbCloudInfrastructure/Services/Email/EmailNotificationTransportService.cs +++ b/AsbCloudInfrastructure/Services/Email/EmailNotificationTransportService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Services.Notifications; diff --git a/AsbCloudInfrastructure/Services/Email/WellFinalDocumentMailBodyFactory .cs b/AsbCloudInfrastructure/Services/Email/WellFinalDocumentMailBodyFactory .cs index da2876fa..f9a49329 100644 --- a/AsbCloudInfrastructure/Services/Email/WellFinalDocumentMailBodyFactory .cs +++ b/AsbCloudInfrastructure/Services/Email/WellFinalDocumentMailBodyFactory .cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudInfrastructure.Services.Email; using Microsoft.Extensions.Configuration; using System; @@ -7,27 +7,27 @@ using System.IO; namespace AsbCloudInfrastructure { - class WellFinalDocumentMailBodyFactory : BaseFactory + class WellFinalDocumentMailBodyFactory : BaseFactory { public WellFinalDocumentMailBodyFactory(IConfiguration configuration) - : base(configuration) + : base(configuration) { - - } + + } - public override string MakeSubject(WellDto well, string action) - => $"{well.Deposit}, {well.Cluster}, {well.Caption}. Дело скважины. {action}"; + public override string MakeSubject(WellDto well, string action) + => $"{well.Deposit}, {well.Cluster}, {well.Caption}. Дело скважины. {action}"; - public string MakeMailBodyForWellFinalDocument(WellDto well, string publisherName, string message) - { - var body = $"

Здравствуйте, {publisherName}.

" + - $"На портале {platformName} {message}," + - $" куст {well.Cluster}, месторождение {well.Deposit}." + - MakeSignatue() + - $""; - return body; - } - } + public string MakeMailBodyForWellFinalDocument(WellDto well, string publisherName, string message) + { + var body = $"

Здравствуйте, {publisherName}.

" + + $"На портале {platformName} {message}," + + $" куст {well.Cluster}, месторождение {well.Deposit}." + + MakeSignatue() + + $""; + return body; + } + } } diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Cell.cs b/AsbCloudInfrastructure/Services/ExcelServices/Cell.cs index a18fb167..1baa3ae7 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Cell.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Cell.cs @@ -7,88 +7,88 @@ namespace AsbCloudInfrastructure.Services.ExcelServices; public class Cell { - private static IDictionary> converters = new Dictionary>() - { - { typeof(bool), cell => cell.GetBoolean() }, - { typeof(double), cell => cell.GetValue() }, - { typeof(float), cell => cell.GetValue() }, - { typeof(long), cell => cell.GetValue() }, - { typeof(ulong), cell => cell.GetValue() }, - { typeof(int), cell => cell.GetValue() }, - { typeof(uint), cell => cell.GetValue() }, - { typeof(short), cell => cell.GetValue() }, - { typeof(ushort), cell => cell.GetValue() }, - { typeof(string), cell => cell.GetString() }, + private static IDictionary> converters = new Dictionary>() + { + { typeof(bool), cell => cell.GetBoolean() }, + { typeof(double), cell => cell.GetValue() }, + { typeof(float), cell => cell.GetValue() }, + { typeof(long), cell => cell.GetValue() }, + { typeof(ulong), cell => cell.GetValue() }, + { typeof(int), cell => cell.GetValue() }, + { typeof(uint), cell => cell.GetValue() }, + { typeof(short), cell => cell.GetValue() }, + { typeof(ushort), cell => cell.GetValue() }, + { typeof(string), cell => cell.GetString() }, - { - typeof(DateTime), cell => - { - if (cell.DataType == XLDataType.DateTime) - return cell.GetDateTime(); + { + typeof(DateTime), cell => + { + if (cell.DataType == XLDataType.DateTime) + return cell.GetDateTime(); - var stringValue = cell.GetString(); - return DateTime.Parse(stringValue); - } - }, + var stringValue = cell.GetString(); + return DateTime.Parse(stringValue); + } + }, - { - typeof(DateTimeOffset), cell => - { - var stringValue = cell.GetString(); - return DateTimeOffset.Parse(stringValue); - } - }, + { + typeof(DateTimeOffset), cell => + { + var stringValue = cell.GetString(); + return DateTimeOffset.Parse(stringValue); + } + }, - { - typeof(DateOnly), cell => - { - var stringValue = cell.GetString(); - return DateOnly.Parse(stringValue); - } - }, + { + typeof(DateOnly), cell => + { + var stringValue = cell.GetString(); + return DateOnly.Parse(stringValue); + } + }, - { - typeof(TimeOnly), cell => - { - var stringValue = cell.GetString(); - return TimeOnly.Parse(stringValue); - } - }, + { + typeof(TimeOnly), cell => + { + var stringValue = cell.GetString(); + return TimeOnly.Parse(stringValue); + } + }, - { - typeof(TimeSpan), cell => - { - if (cell.DataType == XLDataType.TimeSpan) - return cell.GetTimeSpan(); + { + typeof(TimeSpan), cell => + { + if (cell.DataType == XLDataType.TimeSpan) + return cell.GetTimeSpan(); - var stringValue = cell.GetString(); - return TimeSpan.Parse(stringValue); - } - }, - }; + var stringValue = cell.GetString(); + return TimeSpan.Parse(stringValue); + } + }, + }; - private readonly Type type; + private readonly Type type; - public Cell(int columnNumber, - Type type) - { - ColumnNumber = columnNumber; - this.type = type; - } + public Cell(int columnNumber, + Type type) + { + ColumnNumber = columnNumber; + this.type = type; + } - public int ColumnNumber { get; } + public int ColumnNumber { get; } - public object? GetValueFromCell(IXLCell cell) - { - try - { - return converters[type].Invoke(cell); - } - catch - { - var message = string.Format(XLExtentions.InvalidValueTemplate, cell.Worksheet.Name, cell.Address.RowNumber, - cell.Address.ColumnNumber); - throw new FileFormatException(message); - } - } + public object? GetValueFromCell(IXLCell cell) + { + try + { + return converters[type].Invoke(cell); + } + catch + { + var message = string.Format(XLExtentions.InvalidValueTemplate, cell.Worksheet.Name, cell.Address.RowNumber, + cell.Address.ColumnNumber); + throw new FileFormatException(message); + } + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/ExcelExportService.cs b/AsbCloudInfrastructure/Services/ExcelServices/ExcelExportService.cs index 74e2d5fb..48febc07 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/ExcelExportService.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/ExcelExportService.cs @@ -14,63 +14,63 @@ using Mapster; namespace AsbCloudInfrastructure.Services.ExcelServices; public abstract class ExcelExportService : IExportService - where TOptions : IExportOptionsRequest - where TTemplate : class, ITemplateParameters, new() + where TOptions : IExportOptionsRequest + where TTemplate : class, ITemplateParameters, new() { - protected TTemplate TemplateParameters => new(); + protected TTemplate TemplateParameters => new(); - protected abstract Task BuildFileNameAsync(TOptions options, CancellationToken token); + protected abstract Task BuildFileNameAsync(TOptions options, CancellationToken token); - protected abstract Task> GetDtosAsync(TOptions options, CancellationToken token); + protected abstract Task> GetDtosAsync(TOptions options, CancellationToken token); - public async Task<(string FileName, Stream File)> ExportAsync(TOptions options, CancellationToken token) - { - var dtos = await GetDtosAsync(options, token); + public async Task<(string FileName, Stream File)> ExportAsync(TOptions options, CancellationToken token) + { + var dtos = await GetDtosAsync(options, token); - var fileName = await BuildFileNameAsync(options, token); - var file = BuildFile(dtos); - return (fileName, file); - } + var fileName = await BuildFileNameAsync(options, token); + var file = BuildFile(dtos); + return (fileName, file); + } - private Stream BuildFile(IEnumerable dtos) - { - using var template = GetTemplateFile(); - using var workbook = new XLWorkbook(template); - AddDtosToWorkbook(workbook, dtos); + private Stream BuildFile(IEnumerable dtos) + { + using var template = GetTemplateFile(); + using var workbook = new XLWorkbook(template); + AddDtosToWorkbook(workbook, dtos); - var memoryStream = new MemoryStream(); - workbook.SaveAs(memoryStream, new SaveOptions { }); - memoryStream.Seek(0, SeekOrigin.Begin); - return memoryStream; - } + var memoryStream = new MemoryStream(); + workbook.SaveAs(memoryStream, new SaveOptions { }); + memoryStream.Seek(0, SeekOrigin.Begin); + return memoryStream; + } - private void AddDtosToWorkbook(XLWorkbook workbook, IEnumerable dtos) - { - var dtosToArray = dtos.ToArray(); + private void AddDtosToWorkbook(XLWorkbook workbook, IEnumerable dtos) + { + var dtosToArray = dtos.ToArray(); - if (!dtosToArray.Any()) - return; + if (!dtosToArray.Any()) + return; - var sheet = workbook.GetWorksheet(TemplateParameters.SheetName); - for (var i = 0; i < dtosToArray.Length; i++) - { - var row = sheet.Row(1 + i + TemplateParameters.HeaderRowsCount); - AddRow(row, dtosToArray[i]); - } - } + var sheet = workbook.GetWorksheet(TemplateParameters.SheetName); + for (var i = 0; i < dtosToArray.Length; i++) + { + var row = sheet.Row(1 + i + TemplateParameters.HeaderRowsCount); + AddRow(row, dtosToArray[i]); + } + } - private void AddRow(IXLRow xlRow, TDto dto) - { - var properties = dto.Adapt>(); + private void AddRow(IXLRow xlRow, TDto dto) + { + var properties = dto.Adapt>(); - foreach (var (name, cellValue) in properties) - { - if (TemplateParameters.Cells.TryGetValue(name, out var cell)) - xlRow.Cell(cell.ColumnNumber).SetCellValue(cellValue); - } - } + foreach (var (name, cellValue) in properties) + { + if (TemplateParameters.Cells.TryGetValue(name, out var cell)) + xlRow.Cell(cell.ColumnNumber).SetCellValue(cellValue); + } + } - private Stream GetTemplateFile() => - Assembly.GetExecutingAssembly().GetTemplateCopyStream(TemplateParameters.FileName) - ?? throw new ArgumentNullException($"Файл '{TemplateParameters.FileName}' не найден"); + private Stream GetTemplateFile() => + Assembly.GetExecutingAssembly().GetTemplateCopyStream(TemplateParameters.FileName) + ?? throw new ArgumentNullException($"Файл '{TemplateParameters.FileName}' не найден"); } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/ExcelParser.cs b/AsbCloudInfrastructure/Services/ExcelServices/ExcelParser.cs index 924e7477..0d995be6 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/ExcelParser.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/ExcelParser.cs @@ -14,121 +14,121 @@ using Mapster; namespace AsbCloudInfrastructure.Services.ExcelServices; public abstract class ExcelParser : IParserService - where TDto : class, IValidatableObject, IId - where TOptions : IParserOptionsRequest - where TTemplate : class, ITemplateParameters, new() + where TDto : class, IValidatableObject, IId + where TOptions : IParserOptionsRequest + where TTemplate : class, ITemplateParameters, new() { - protected TTemplate TemplateParameters => new(); + protected TTemplate TemplateParameters => new(); - public virtual ParserResultDto Parse(Stream file, TOptions options) - { - using var workbook = new XLWorkbook(file); - var sheet = workbook.GetWorksheet(TemplateParameters.SheetName); - var dtos = ParseExcelSheet(sheet); - return dtos; - } + public virtual ParserResultDto Parse(Stream file, TOptions options) + { + using var workbook = new XLWorkbook(file); + var sheet = workbook.GetWorksheet(TemplateParameters.SheetName); + var dtos = ParseExcelSheet(sheet); + return dtos; + } - public virtual Stream GetTemplateFile() => - Assembly.GetExecutingAssembly().GetTemplateCopyStream(TemplateParameters.FileName) - ?? throw new ArgumentNullException($"Файл '{TemplateParameters.FileName}' не найден"); + public virtual Stream GetTemplateFile() => + Assembly.GetExecutingAssembly().GetTemplateCopyStream(TemplateParameters.FileName) + ?? throw new ArgumentNullException($"Файл '{TemplateParameters.FileName}' не найден"); - protected virtual IDictionary ParseRow(IXLRow xlRow) - { - var cells = TemplateParameters.Cells.ToDictionary(x => x.Key, x => - { - var columnNumber = x.Value.ColumnNumber; - var xlCell = xlRow.Cell(columnNumber); - var cellValue = x.Value.GetValueFromCell(xlCell); - return cellValue; - }); + protected virtual IDictionary ParseRow(IXLRow xlRow) + { + var cells = TemplateParameters.Cells.ToDictionary(x => x.Key, x => + { + var columnNumber = x.Value.ColumnNumber; + var xlCell = xlRow.Cell(columnNumber); + var cellValue = x.Value.GetValueFromCell(xlCell); + return cellValue; + }); - return cells; - } + return cells; + } - protected virtual TDto BuildDto(IDictionary row, int rowNumber) - { - var dto = row.Adapt(); - return dto; - } + protected virtual TDto BuildDto(IDictionary row, int rowNumber) + { + var dto = row.Adapt(); + return dto; + } - private ValidationResultDto Validate(TDto dto, int rowNumber) - { - var validationResults = new List(); + private ValidationResultDto Validate(TDto dto, int rowNumber) + { + var validationResults = new List(); - var isValid = dto.Validate(validationResults); + var isValid = dto.Validate(validationResults); - if (isValid) - { - var validDto = new ValidationResultDto - { - Item = dto - }; + if (isValid) + { + var validDto = new ValidationResultDto + { + Item = dto + }; - return validDto; - } + return validDto; + } - var columnsDict = TemplateParameters.Cells.ToDictionary(x => x.Key, x => x.Value.ColumnNumber); + var columnsDict = TemplateParameters.Cells.ToDictionary(x => x.Key, x => x.Value.ColumnNumber); - var invalidDto = new ValidationResultDto - { - Item = dto, - Warnings = validationResults - .SelectMany(v => v.MemberNames - .Where(columnsDict.ContainsKey) - .Select(m => - { - var columnNumber = columnsDict[m]; - var errorMessage = v.ErrorMessage; - var warningMessage = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - columnNumber, - errorMessage); - var warning = new ValidationResult(warningMessage, new[] { m }); - return warning; - })) - }; + var invalidDto = new ValidationResultDto + { + Item = dto, + Warnings = validationResults + .SelectMany(v => v.MemberNames + .Where(columnsDict.ContainsKey) + .Select(m => + { + var columnNumber = columnsDict[m]; + var errorMessage = v.ErrorMessage; + var warningMessage = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + columnNumber, + errorMessage); + var warning = new ValidationResult(warningMessage, new[] { m }); + return warning; + })) + }; - return invalidDto; - } + return invalidDto; + } - protected virtual ParserResultDto ParseExcelSheet(IXLWorksheet sheet) - { - var count = sheet.RowsUsed().Count() - TemplateParameters.HeaderRowsCount; - if (count <= 0) - return new ParserResultDto(); + protected virtual ParserResultDto ParseExcelSheet(IXLWorksheet sheet) + { + var count = sheet.RowsUsed().Count() - TemplateParameters.HeaderRowsCount; + if (count <= 0) + return new ParserResultDto(); - var valiationResults = new List>(count); - var warnings = new List(); + var valiationResults = new List>(count); + var warnings = new List(); - for (var i = 0; i < count; i++) - { - var xlRow = sheet.Row(1 + i + TemplateParameters.HeaderRowsCount); - var rowNumber = xlRow.RowNumber(); + for (var i = 0; i < count; i++) + { + var xlRow = sheet.Row(1 + i + TemplateParameters.HeaderRowsCount); + var rowNumber = xlRow.RowNumber(); - try - { - var row = ParseRow(xlRow); - var dto = BuildDto(row, rowNumber); - var validationResult = Validate(dto, rowNumber); - valiationResults.Add(validationResult); - } - catch (FileFormatException ex) - { - var warning = new ValidationResult(ex.Message); - warnings.Add(warning); - } - } + try + { + var row = ParseRow(xlRow); + var dto = BuildDto(row, rowNumber); + var validationResult = Validate(dto, rowNumber); + valiationResults.Add(validationResult); + } + catch (FileFormatException ex) + { + var warning = new ValidationResult(ex.Message); + warnings.Add(warning); + } + } - var parserResult = new ParserResultDto - { - Item = valiationResults - }; + var parserResult = new ParserResultDto + { + Item = valiationResults + }; - if (warnings.Any()) - parserResult.Warnings = warnings; + if (warnings.Any()) + parserResult.Warnings = warnings; - return parserResult; - } + return parserResult; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/ExcelWellRelatedParser.cs b/AsbCloudInfrastructure/Services/ExcelServices/ExcelWellRelatedParser.cs index 55485f77..0bc18e32 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/ExcelWellRelatedParser.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/ExcelWellRelatedParser.cs @@ -7,17 +7,17 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates; namespace AsbCloudInfrastructure.Services.ExcelServices; public abstract class ExcelWellRelatedParser : ExcelParser - where TDto : class, IValidatableObject, IId, IWellRelated - where TOptions : WellRelatedParserRequest - where TTemplate : class, ITemplateParameters, new() + where TDto : class, IValidatableObject, IId, IWellRelated + where TOptions : WellRelatedParserRequest + where TTemplate : class, ITemplateParameters, new() { - public override ParserResultDto Parse(Stream file, TOptions options) - { - var result = base.Parse(file, options); + public override ParserResultDto Parse(Stream file, TOptions options) + { + var result = base.Parse(file, options); - foreach (var dto in result.Item) - dto.Item.IdWell = options.IdWell; + foreach (var dto in result.Item) + dto.Item.IdWell = options.IdWell; - return result; - } + return result; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/ExportExcelService.cs b/AsbCloudInfrastructure/Services/ExcelServices/ExportExcelService.cs index cc068ba0..d74b151e 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/ExportExcelService.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/ExportExcelService.cs @@ -15,62 +15,62 @@ namespace AsbCloudInfrastructure.Services.ExcelServices; [Obsolete] public abstract class ExportExcelService : IExportService - where TOptions : IExportOptionsRequest + where TOptions : IExportOptionsRequest { - protected abstract ITemplateParameters TemplateParameters { get; } + protected abstract ITemplateParameters TemplateParameters { get; } - protected abstract Task BuildFileNameAsync(TOptions options, CancellationToken token); + protected abstract Task BuildFileNameAsync(TOptions options, CancellationToken token); - protected abstract Task> GetDtosAsync(TOptions options, CancellationToken token); + protected abstract Task> GetDtosAsync(TOptions options, CancellationToken token); - public async Task<(string FileName, Stream File)> ExportAsync(TOptions options, CancellationToken token) - { - var dtos = await GetDtosAsync(options, token); + public async Task<(string FileName, Stream File)> ExportAsync(TOptions options, CancellationToken token) + { + var dtos = await GetDtosAsync(options, token); - var fileName = await BuildFileNameAsync(options, token); - var file = BuildFile(dtos); - return (fileName, file); - } + var fileName = await BuildFileNameAsync(options, token); + var file = BuildFile(dtos); + return (fileName, file); + } - private Stream BuildFile(IEnumerable dtos) - { - using var template = GetTemplateFile(); - using var workbook = new XLWorkbook(template); - AddDtosToWorkbook(workbook, dtos); + private Stream BuildFile(IEnumerable dtos) + { + using var template = GetTemplateFile(); + using var workbook = new XLWorkbook(template); + AddDtosToWorkbook(workbook, dtos); - var memoryStream = new MemoryStream(); - workbook.SaveAs(memoryStream, new SaveOptions { }); - memoryStream.Seek(0, SeekOrigin.Begin); - return memoryStream; - } + var memoryStream = new MemoryStream(); + workbook.SaveAs(memoryStream, new SaveOptions { }); + memoryStream.Seek(0, SeekOrigin.Begin); + return memoryStream; + } - private void AddDtosToWorkbook(XLWorkbook workbook, IEnumerable dtos) - { - var dtosToArray = dtos.ToArray(); + private void AddDtosToWorkbook(XLWorkbook workbook, IEnumerable dtos) + { + var dtosToArray = dtos.ToArray(); - if (!dtosToArray.Any()) - return; + if (!dtosToArray.Any()) + return; - var sheet = workbook.GetWorksheet(TemplateParameters.SheetName); - for (var i = 0; i < dtosToArray.Length; i++) - { - var row = sheet.Row(1 + i + TemplateParameters.HeaderRowsCount); - AddRow(row, dtosToArray[i]); - } - } + var sheet = workbook.GetWorksheet(TemplateParameters.SheetName); + for (var i = 0; i < dtosToArray.Length; i++) + { + var row = sheet.Row(1 + i + TemplateParameters.HeaderRowsCount); + AddRow(row, dtosToArray[i]); + } + } - private void AddRow(IXLRow xlRow, TDto dto) - { - var properties = dto.Adapt>(); + private void AddRow(IXLRow xlRow, TDto dto) + { + var properties = dto.Adapt>(); - foreach (var (name, cellValue) in properties) - { - if (TemplateParameters.Cells.TryGetValue(name, out var cell)) - xlRow.Cell(cell.ColumnNumber).SetCellValue(cellValue); - } - } + foreach (var (name, cellValue) in properties) + { + if (TemplateParameters.Cells.TryGetValue(name, out var cell)) + xlRow.Cell(cell.ColumnNumber).SetCellValue(cellValue); + } + } - private Stream GetTemplateFile() => - Assembly.GetExecutingAssembly().GetTemplateCopyStream(TemplateParameters.FileName) - ?? throw new ArgumentNullException($"Файл '{TemplateParameters.FileName}' не найден"); + private Stream GetTemplateFile() => + Assembly.GetExecutingAssembly().GetTemplateCopyStream(TemplateParameters.FileName) + ?? throw new ArgumentNullException($"Файл '{TemplateParameters.FileName}' не найден"); } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/ParserExcelService.cs b/AsbCloudInfrastructure/Services/ExcelServices/ParserExcelService.cs index a74cab70..7063689e 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/ParserExcelService.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/ParserExcelService.cs @@ -15,120 +15,120 @@ namespace AsbCloudInfrastructure.Services.ExcelServices; [Obsolete] public abstract class ParserExcelService : IParserService - where TDto : class, IValidatableObject, IId - where TOptions : IParserOptionsRequest + where TDto : class, IValidatableObject, IId + where TOptions : IParserOptionsRequest { - protected abstract ITemplateParameters TemplateParameters { get; } + protected abstract ITemplateParameters TemplateParameters { get; } - public virtual ParserResultDto Parse(Stream file, TOptions options) - { - using var workbook = new XLWorkbook(file); - var sheet = workbook.GetWorksheet(TemplateParameters.SheetName); - var dtos = ParseExcelSheet(sheet); - return dtos; - } + public virtual ParserResultDto Parse(Stream file, TOptions options) + { + using var workbook = new XLWorkbook(file); + var sheet = workbook.GetWorksheet(TemplateParameters.SheetName); + var dtos = ParseExcelSheet(sheet); + return dtos; + } - public virtual Stream GetTemplateFile() => - Assembly.GetExecutingAssembly().GetTemplateCopyStream(TemplateParameters.FileName) - ?? throw new ArgumentNullException($"Файл '{TemplateParameters.FileName}' не найден"); + public virtual Stream GetTemplateFile() => + Assembly.GetExecutingAssembly().GetTemplateCopyStream(TemplateParameters.FileName) + ?? throw new ArgumentNullException($"Файл '{TemplateParameters.FileName}' не найден"); - protected virtual IDictionary ParseRow(IXLRow xlRow) - { - var cells = TemplateParameters.Cells.ToDictionary(x => x.Key, x => - { - var columnNumber = x.Value.ColumnNumber; - var xlCell = xlRow.Cell(columnNumber); - var cellValue = x.Value.GetValueFromCell(xlCell); - return cellValue; - }); + protected virtual IDictionary ParseRow(IXLRow xlRow) + { + var cells = TemplateParameters.Cells.ToDictionary(x => x.Key, x => + { + var columnNumber = x.Value.ColumnNumber; + var xlCell = xlRow.Cell(columnNumber); + var cellValue = x.Value.GetValueFromCell(xlCell); + return cellValue; + }); - return cells; - } + return cells; + } - protected virtual TDto BuildDto(IDictionary row, int rowNumber) - { - var dto = row.Adapt(); - return dto; - } + protected virtual TDto BuildDto(IDictionary row, int rowNumber) + { + var dto = row.Adapt(); + return dto; + } - private ValidationResultDto Validate(TDto dto, int rowNumber) - { - var validationResults = new List(); + private ValidationResultDto Validate(TDto dto, int rowNumber) + { + var validationResults = new List(); - var isValid = dto.Validate(validationResults); + var isValid = dto.Validate(validationResults); - if (isValid) - { - var validDto = new ValidationResultDto - { - Item = dto - }; + if (isValid) + { + var validDto = new ValidationResultDto + { + Item = dto + }; - return validDto; - } + return validDto; + } - var columnsDict = TemplateParameters.Cells.ToDictionary(x => x.Key, x => x.Value.ColumnNumber); + var columnsDict = TemplateParameters.Cells.ToDictionary(x => x.Key, x => x.Value.ColumnNumber); - var invalidDto = new ValidationResultDto - { - Item = dto, - Warnings = validationResults - .SelectMany(v => v.MemberNames - .Where(columnsDict.ContainsKey) - .Select(m => - { - var columnNumber = columnsDict[m]; - var errorMessage = v.ErrorMessage; - var warningMessage = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - columnNumber, - errorMessage); - var warning = new ValidationResult(warningMessage, new[] { m }); - return warning; - })) - }; + var invalidDto = new ValidationResultDto + { + Item = dto, + Warnings = validationResults + .SelectMany(v => v.MemberNames + .Where(columnsDict.ContainsKey) + .Select(m => + { + var columnNumber = columnsDict[m]; + var errorMessage = v.ErrorMessage; + var warningMessage = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + columnNumber, + errorMessage); + var warning = new ValidationResult(warningMessage, new[] { m }); + return warning; + })) + }; - return invalidDto; - } + return invalidDto; + } - protected virtual ParserResultDto ParseExcelSheet(IXLWorksheet sheet) - { - var count = sheet.RowsUsed().Count() - TemplateParameters.HeaderRowsCount; - if (count <= 0) - return new ParserResultDto(); + protected virtual ParserResultDto ParseExcelSheet(IXLWorksheet sheet) + { + var count = sheet.RowsUsed().Count() - TemplateParameters.HeaderRowsCount; + if (count <= 0) + return new ParserResultDto(); - var valiationResults = new List>(count); - var warnings = new List(); + var valiationResults = new List>(count); + var warnings = new List(); - for (var i = 0; i < count; i++) - { - var xlRow = sheet.Row(1 + i + TemplateParameters.HeaderRowsCount); - var rowNumber = xlRow.RowNumber(); + for (var i = 0; i < count; i++) + { + var xlRow = sheet.Row(1 + i + TemplateParameters.HeaderRowsCount); + var rowNumber = xlRow.RowNumber(); - try - { - var row = ParseRow(xlRow); - var dto = BuildDto(row, rowNumber); - var validationResult = Validate(dto, rowNumber); - valiationResults.Add(validationResult); - } - catch (FileFormatException ex) - { - var warning = new ValidationResult(ex.Message); - warnings.Add(warning); - } - } + try + { + var row = ParseRow(xlRow); + var dto = BuildDto(row, rowNumber); + var validationResult = Validate(dto, rowNumber); + valiationResults.Add(validationResult); + } + catch (FileFormatException ex) + { + var warning = new ValidationResult(ex.Message); + warnings.Add(warning); + } + } - var parserResult = new ParserResultDto - { - Item = valiationResults - }; + var parserResult = new ParserResultDto + { + Item = valiationResults + }; - if (warnings.Any()) - parserResult.Warnings = warnings; + if (warnings.Any()) + parserResult.Warnings = warnings; - return parserResult; - } + return parserResult; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ITemplateParameters.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ITemplateParameters.cs index eeb1076c..a203968e 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ITemplateParameters.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ITemplateParameters.cs @@ -4,11 +4,11 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates; public interface ITemplateParameters { - string SheetName { get; } + string SheetName { get; } - int HeaderRowsCount { get; } + int HeaderRowsCount { get; } - string FileName { get; } + string FileName { get; } - IDictionary Cells { get; } + IDictionary Cells { get; } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanReamingRotorTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanReamingRotorTemplate.cs index fe763beb..3c3f9403 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanReamingRotorTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanReamingRotorTemplate.cs @@ -6,14 +6,14 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlan public class ProcessMapPlanReamingRotorTemplate : ITemplateParameters { - public string SheetName => "Проработка ротор"; + public string SheetName => "Проработка ротор"; - public int HeaderRowsCount => 2; + public int HeaderRowsCount => 2; - public string FileName => "ProcessMapPlanReamingRotorTemplate.xlsx"; + public string FileName => "ProcessMapPlanReamingRotorTemplate.xlsx"; - public IDictionary Cells => new Dictionary - { + public IDictionary Cells => new Dictionary + { { nameof(ProcessMapPlanReamingRotorDto.Section), new Cell(1, typeof(string)) }, { nameof(ProcessMapPlanReamingRotorDto.DepthStart), new Cell(2, typeof(double)) }, { nameof(ProcessMapPlanReamingRotorDto.DepthEnd), new Cell(3, typeof(double)) }, diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorTemplate.cs index 85b3cba7..86dd9734 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanRotorTemplate.cs @@ -5,29 +5,29 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlan public class ProcessMapPlanRotorTemplate : ITemplateParameters { - public string SheetName => "Бурение ротор"; + public string SheetName => "Бурение ротор"; - public int HeaderRowsCount => 2; + public int HeaderRowsCount => 2; - public string FileName => "ProcessMapPlanRotorTemplate.xlsx"; + public string FileName => "ProcessMapPlanRotorTemplate.xlsx"; - public IDictionary Cells => new Dictionary - { - { nameof(ProcessMapPlanRotorDto.Section), new Cell(1, typeof(string)) }, - { nameof(ProcessMapPlanRotorDto.DepthStart), new Cell(2, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.DepthEnd), new Cell(3, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.RopMax), new Cell(4, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.PressureMax), new Cell(5, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.DifferentialPressure), new Cell(6, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.DifferentialPressureMax), new Cell(7, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.WeightOnBit), new Cell(8, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.WeightOnBitMax), new Cell(9, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.TopDriveTorque), new Cell(10, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.TopDriveTorqueMax), new Cell(11, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.Rpm), new Cell(12, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.RpmMax), new Cell(13, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.FlowRate), new Cell(14, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.FlowRateMax), new Cell(15, typeof(double)) }, - { nameof(ProcessMapPlanRotorDto.Note), new Cell(16, typeof(double)) }, - }; + public IDictionary Cells => new Dictionary + { + { nameof(ProcessMapPlanRotorDto.Section), new Cell(1, typeof(string)) }, + { nameof(ProcessMapPlanRotorDto.DepthStart), new Cell(2, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.DepthEnd), new Cell(3, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.RopMax), new Cell(4, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.PressureMax), new Cell(5, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.DifferentialPressure), new Cell(6, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.DifferentialPressureMax), new Cell(7, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.WeightOnBit), new Cell(8, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.WeightOnBitMax), new Cell(9, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.TopDriveTorque), new Cell(10, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.TopDriveTorqueMax), new Cell(11, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.Rpm), new Cell(12, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.RpmMax), new Cell(13, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.FlowRate), new Cell(14, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.FlowRateMax), new Cell(15, typeof(double)) }, + { nameof(ProcessMapPlanRotorDto.Note), new Cell(16, typeof(double)) }, + }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanSlideTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanSlideTemplate.cs index 9a6a8107..1635d6f7 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanSlideTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/ProcessMapPlanTemplates/ProcessMapPlanSlideTemplate.cs @@ -5,17 +5,17 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.ProcessMapPlan public class ProcessMapPlanSlideTemplate : ITemplateParameters { - public string SheetName => "Бурение слайд"; + public string SheetName => "Бурение слайд"; - public int HeaderRowsCount => 2; + public int HeaderRowsCount => 2; - public string FileName => "ProcessMapPlanSlideTemplate.xlsx"; + public string FileName => "ProcessMapPlanSlideTemplate.xlsx"; - public IDictionary Cells => new Dictionary - { - { nameof(ProcessMapPlanSlideDto.Section), new Cell(1, typeof(string)) }, - { nameof(ProcessMapPlanSlideDto.DepthStart), new Cell(2, typeof(double)) }, - { nameof(ProcessMapPlanSlideDto.DepthEnd), new Cell(3, typeof(double)) }, + public IDictionary Cells => new Dictionary + { + { nameof(ProcessMapPlanSlideDto.Section), new Cell(1, typeof(string)) }, + { nameof(ProcessMapPlanSlideDto.DepthStart), new Cell(2, typeof(double)) }, + { nameof(ProcessMapPlanSlideDto.DepthEnd), new Cell(3, typeof(double)) }, { nameof(ProcessMapPlanSlideDto.RopMax), new Cell(4, typeof(double)) }, { nameof(ProcessMapPlanSlideDto.PressureMax), new Cell(5, typeof(double)) }, { nameof(ProcessMapPlanSlideDto.DifferentialPressure), new Cell(6, typeof(double)) }, diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactManualTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactManualTemplate.cs index 8e604e1e..920307b9 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactManualTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactManualTemplate.cs @@ -5,19 +5,19 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.TrajectoryTemp public class TrajectoryFactManualTemplate : ITemplateParameters { - public string SheetName => "Фактическая траектория"; + public string SheetName => "Фактическая траектория"; - public int HeaderRowsCount => 2; + public int HeaderRowsCount => 2; - public string FileName => "TrajectoryFactManualTemplate.xlsx"; + public string FileName => "TrajectoryFactManualTemplate.xlsx"; - public IDictionary Cells => new Dictionary - { - { nameof(TrajectoryGeoFactDto.WellboreDepth), new Cell(1, typeof(double)) }, - { nameof(TrajectoryGeoFactDto.ZenithAngle), new Cell(2, typeof(double)) }, - { nameof(TrajectoryGeoFactDto.AzimuthGeo), new Cell(3, typeof(double)) }, - { nameof(TrajectoryGeoFactDto.AzimuthMagnetic), new Cell(4, typeof(double)) }, - { nameof(TrajectoryGeoFactDto.VerticalDepth), new Cell(5, typeof(double)) }, - { nameof(TrajectoryGeoFactDto.Comment), new Cell(6, typeof(string)) } - }; + public IDictionary Cells => new Dictionary + { + { nameof(TrajectoryGeoFactDto.WellboreDepth), new Cell(1, typeof(double)) }, + { nameof(TrajectoryGeoFactDto.ZenithAngle), new Cell(2, typeof(double)) }, + { nameof(TrajectoryGeoFactDto.AzimuthGeo), new Cell(3, typeof(double)) }, + { nameof(TrajectoryGeoFactDto.AzimuthMagnetic), new Cell(4, typeof(double)) }, + { nameof(TrajectoryGeoFactDto.VerticalDepth), new Cell(5, typeof(double)) }, + { nameof(TrajectoryGeoFactDto.Comment), new Cell(6, typeof(string)) } + }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactNnbTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactNnbTemplate.cs index 87489d7c..c7aa8819 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactNnbTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryFactNnbTemplate.cs @@ -5,19 +5,19 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.TrajectoryTemp public class TrajectoryFactNnbTemplate : ITemplateParameters { - public string SheetName => "Фактическая ннб-траектория"; + public string SheetName => "Фактическая ннб-траектория"; - public int HeaderRowsCount => 2; + public int HeaderRowsCount => 2; - public string FileName => "TrajectoryFactNnbTemplate.xlsx"; + public string FileName => "TrajectoryFactNnbTemplate.xlsx"; - public IDictionary Cells => new Dictionary - { - { nameof(TrajectoryGeoFactDto.WellboreDepth), new Cell(1, typeof(double)) }, - { nameof(TrajectoryGeoFactDto.ZenithAngle), new Cell(2, typeof(double)) }, - { nameof(TrajectoryGeoFactDto.AzimuthGeo), new Cell(3, typeof(double)) }, - { nameof(TrajectoryGeoFactDto.AzimuthMagnetic), new Cell(4, typeof(double)) }, - { nameof(TrajectoryGeoFactDto.VerticalDepth), new Cell(5, typeof(double)) }, - { nameof(TrajectoryGeoFactDto.Comment), new Cell(6, typeof(string)) } - }; + public IDictionary Cells => new Dictionary + { + { nameof(TrajectoryGeoFactDto.WellboreDepth), new Cell(1, typeof(double)) }, + { nameof(TrajectoryGeoFactDto.ZenithAngle), new Cell(2, typeof(double)) }, + { nameof(TrajectoryGeoFactDto.AzimuthGeo), new Cell(3, typeof(double)) }, + { nameof(TrajectoryGeoFactDto.AzimuthMagnetic), new Cell(4, typeof(double)) }, + { nameof(TrajectoryGeoFactDto.VerticalDepth), new Cell(5, typeof(double)) }, + { nameof(TrajectoryGeoFactDto.Comment), new Cell(6, typeof(string)) } + }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryPlanTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryPlanTemplate.cs index d98c1d89..ef5c0497 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryPlanTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/TrajectoryTemplates/TrajectoryPlanTemplate.cs @@ -5,17 +5,17 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.TrajectoryTemp public class TrajectoryPlanTemplate : ITemplateParameters { - public string SheetName => "Плановая траектория"; - public int HeaderRowsCount => 2; - public string FileName => "TrajectoryPlanTemplate.xlsx"; - public IDictionary Cells => new Dictionary - { - { nameof(TrajectoryGeoPlanDto.WellboreDepth), new Cell(1, typeof(double)) }, - { nameof(TrajectoryGeoPlanDto.ZenithAngle), new Cell(2, typeof(double)) }, - { nameof(TrajectoryGeoPlanDto.AzimuthGeo), new Cell(3, typeof(double)) }, - { nameof(TrajectoryGeoPlanDto.AzimuthMagnetic), new Cell(4, typeof(double)) }, - { nameof(TrajectoryGeoPlanDto.VerticalDepth), new Cell(5, typeof(double)) }, - { nameof(TrajectoryGeoPlanDto.Radius), new Cell(6, typeof(double)) }, - { nameof(TrajectoryGeoPlanDto.Comment), new Cell(7, typeof(string)) } - }; + public string SheetName => "Плановая траектория"; + public int HeaderRowsCount => 2; + public string FileName => "TrajectoryPlanTemplate.xlsx"; + public IDictionary Cells => new Dictionary + { + { nameof(TrajectoryGeoPlanDto.WellboreDepth), new Cell(1, typeof(double)) }, + { nameof(TrajectoryGeoPlanDto.ZenithAngle), new Cell(2, typeof(double)) }, + { nameof(TrajectoryGeoPlanDto.AzimuthGeo), new Cell(3, typeof(double)) }, + { nameof(TrajectoryGeoPlanDto.AzimuthMagnetic), new Cell(4, typeof(double)) }, + { nameof(TrajectoryGeoPlanDto.VerticalDepth), new Cell(5, typeof(double)) }, + { nameof(TrajectoryGeoPlanDto.Radius), new Cell(6, typeof(double)) }, + { nameof(TrajectoryGeoPlanDto.Comment), new Cell(7, typeof(string)) } + }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/WellOperations/WellOperationFactTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/WellOperations/WellOperationFactTemplate.cs index afb5fe19..a28a2c7a 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/WellOperations/WellOperationFactTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/WellOperations/WellOperationFactTemplate.cs @@ -6,21 +6,21 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.WellOperations public class WellOperationFactTemplate : ITemplateParameters { - public string SheetName => "Факт"; + public string SheetName => "Факт"; - public int HeaderRowsCount => 1; + public int HeaderRowsCount => 1; - public string FileName => "WellOperationFactTemplate.xlsx"; + public string FileName => "WellOperationFactTemplate.xlsx"; - public IDictionary Cells => new Dictionary - { - { nameof(WellOperationDto.WellSectionTypeCaption), new Cell(1, typeof(string)) }, - { nameof(WellOperationDto.OperationCategoryName), new Cell(2, typeof(string)) }, - { nameof(WellOperationDto.CategoryInfo), new Cell(3, typeof(string)) }, - { nameof(WellOperationDto.DepthStart), new Cell(4, typeof(double)) }, - { nameof(WellOperationDto.DepthEnd), new Cell(5, typeof(double)) }, - { nameof(WellOperationDto.DateStart), new Cell(6, typeof(DateTime)) }, - { nameof(WellOperationDto.DurationHours), new Cell(7, typeof(double)) }, - { nameof(WellOperationDto.Comment), new Cell(8, typeof(string)) } - }; + public IDictionary Cells => new Dictionary + { + { nameof(WellOperationDto.WellSectionTypeCaption), new Cell(1, typeof(string)) }, + { nameof(WellOperationDto.OperationCategoryName), new Cell(2, typeof(string)) }, + { nameof(WellOperationDto.CategoryInfo), new Cell(3, typeof(string)) }, + { nameof(WellOperationDto.DepthStart), new Cell(4, typeof(double)) }, + { nameof(WellOperationDto.DepthEnd), new Cell(5, typeof(double)) }, + { nameof(WellOperationDto.DateStart), new Cell(6, typeof(DateTime)) }, + { nameof(WellOperationDto.DurationHours), new Cell(7, typeof(double)) }, + { nameof(WellOperationDto.Comment), new Cell(8, typeof(string)) } + }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ExcelServices/Templates/WellOperations/WellOperationPlanTemplate.cs b/AsbCloudInfrastructure/Services/ExcelServices/Templates/WellOperations/WellOperationPlanTemplate.cs index 85e88db7..a5f2150a 100644 --- a/AsbCloudInfrastructure/Services/ExcelServices/Templates/WellOperations/WellOperationPlanTemplate.cs +++ b/AsbCloudInfrastructure/Services/ExcelServices/Templates/WellOperations/WellOperationPlanTemplate.cs @@ -6,21 +6,21 @@ namespace AsbCloudInfrastructure.Services.ExcelServices.Templates.WellOperations public class WellOperationPlanTemplate : ITemplateParameters { - public string SheetName => "План"; + public string SheetName => "План"; - public int HeaderRowsCount => 1; + public int HeaderRowsCount => 1; - public string FileName => "WellOperationPlanTemplate.xlsx"; + public string FileName => "WellOperationPlanTemplate.xlsx"; - public IDictionary Cells => new Dictionary() - { - { nameof(WellOperationDto.WellSectionTypeCaption), new Cell(1, typeof(string)) }, - { nameof(WellOperationDto.OperationCategoryName), new Cell(2, typeof(string)) }, - { nameof(WellOperationDto.CategoryInfo), new Cell(3, typeof(string)) }, - { nameof(WellOperationDto.DepthStart), new Cell(4, typeof(double)) }, - { nameof(WellOperationDto.DepthEnd), new Cell(5, typeof(double)) }, - { nameof(WellOperationDto.DateStart), new Cell(6, typeof(DateTime)) }, - { nameof(WellOperationDto.DurationHours), new Cell(7, typeof(double)) }, - { nameof(WellOperationDto.Comment), new Cell(8, typeof(string)) } - }; + public IDictionary Cells => new Dictionary() + { + { nameof(WellOperationDto.WellSectionTypeCaption), new Cell(1, typeof(string)) }, + { nameof(WellOperationDto.OperationCategoryName), new Cell(2, typeof(string)) }, + { nameof(WellOperationDto.CategoryInfo), new Cell(3, typeof(string)) }, + { nameof(WellOperationDto.DepthStart), new Cell(4, typeof(double)) }, + { nameof(WellOperationDto.DepthEnd), new Cell(5, typeof(double)) }, + { nameof(WellOperationDto.DateStart), new Cell(6, typeof(DateTime)) }, + { nameof(WellOperationDto.DurationHours), new Cell(7, typeof(double)) }, + { nameof(WellOperationDto.Comment), new Cell(8, typeof(string)) } + }; } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/FileCategoryService.cs b/AsbCloudInfrastructure/Services/FileCategoryService.cs index b4fbaf3d..02d8be83 100644 --- a/AsbCloudInfrastructure/Services/FileCategoryService.cs +++ b/AsbCloudInfrastructure/Services/FileCategoryService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using AsbCloudDb.Model; using AsbCloudInfrastructure.Repository; diff --git a/AsbCloudInfrastructure/Services/HelpPageService.cs b/AsbCloudInfrastructure/Services/HelpPageService.cs index 012ce5bc..4acff8bd 100644 --- a/AsbCloudInfrastructure/Services/HelpPageService.cs +++ b/AsbCloudInfrastructure/Services/HelpPageService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using Microsoft.Extensions.Configuration; diff --git a/AsbCloudInfrastructure/Services/LimitingParameterService.cs b/AsbCloudInfrastructure/Services/LimitingParameterService.cs index 808df22f..da86efd9 100644 --- a/AsbCloudInfrastructure/Services/LimitingParameterService.cs +++ b/AsbCloudInfrastructure/Services/LimitingParameterService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudInfrastructure/Services/ManualCatalogService.cs b/AsbCloudInfrastructure/Services/ManualCatalogService.cs index 83d24f4b..b95e4ec6 100644 --- a/AsbCloudInfrastructure/Services/ManualCatalogService.cs +++ b/AsbCloudInfrastructure/Services/ManualCatalogService.cs @@ -14,163 +14,163 @@ namespace AsbCloudInfrastructure.Services; public class ManualCatalogService : IManualCatalogService { - private const int IdFileCategory = 30000; + private const int IdFileCategory = 30000; - private readonly IEnumerable validExtensions = new[] - { - ".pdf", - ".mp4" - }; + private readonly IEnumerable validExtensions = new[] + { + ".pdf", + ".mp4" + }; - private readonly string directoryFiles; - private readonly IFileStorageRepository fileStorageRepository; - private readonly IManualDirectoryRepository manualDirectoryRepository; - private readonly ICrudRepository manualRepository; + private readonly string directoryFiles; + private readonly IFileStorageRepository fileStorageRepository; + private readonly IManualDirectoryRepository manualDirectoryRepository; + private readonly ICrudRepository manualRepository; - public ManualCatalogService(IFileStorageRepository fileStorageRepository, - IManualDirectoryRepository manualDirectoryRepository, - ICrudRepository manualRepository, - IConfiguration configuration) - { - this.fileStorageRepository = fileStorageRepository; - this.manualDirectoryRepository = manualDirectoryRepository; - this.manualRepository = manualRepository; - directoryFiles = configuration.GetValue("DirectoryManualFiles", "manuals")!; - } + public ManualCatalogService(IFileStorageRepository fileStorageRepository, + IManualDirectoryRepository manualDirectoryRepository, + ICrudRepository manualRepository, + IConfiguration configuration) + { + this.fileStorageRepository = fileStorageRepository; + this.manualDirectoryRepository = manualDirectoryRepository; + this.manualRepository = manualRepository; + directoryFiles = configuration.GetValue("DirectoryManualFiles", "manuals")!; + } - public async Task SaveFileAsync(int idDirectory, int idAuthor, string name, Stream stream, CancellationToken cancellationToken) - { - var extension = Path.GetExtension(name); + public async Task SaveFileAsync(int idDirectory, int idAuthor, string name, Stream stream, CancellationToken cancellationToken) + { + var extension = Path.GetExtension(name); - if (!validExtensions.Contains(extension)) - throw new ArgumentInvalidException( + if (!validExtensions.Contains(extension)) + throw new ArgumentInvalidException( nameof(name), $"Невозможно загрузить файл с расширением '{extension}'. Допустимые форматы файлов: {string.Join(", ", validExtensions)}"); - var path = await BuildFilePathAsync(idDirectory, name, cancellationToken); + var path = await BuildFilePathAsync(idDirectory, name, cancellationToken); - await fileStorageRepository.SaveFileAsync(path, stream, cancellationToken); + await fileStorageRepository.SaveFileAsync(path, stream, cancellationToken); - var manual = new ManualDto - { - Name = name, - DateDownload = DateTimeOffset.UtcNow, - IdDirectory = idDirectory, - IdCategory = IdFileCategory, - IdAuthor = idAuthor - }; + var manual = new ManualDto + { + Name = name, + DateDownload = DateTimeOffset.UtcNow, + IdDirectory = idDirectory, + IdCategory = IdFileCategory, + IdAuthor = idAuthor + }; - return await manualRepository.InsertAsync(manual, cancellationToken); - } + return await manualRepository.InsertAsync(manual, cancellationToken); + } - public async Task AddDirectoryAsync(string name, int? idParent, CancellationToken cancellationToken) - { - if (idParent.HasValue && !await manualDirectoryRepository.IsExistsAsync(idParent.Value, cancellationToken)) - throw new ArgumentInvalidException(nameof(idParent), "Родительской директории не существует"); + public async Task AddDirectoryAsync(string name, int? idParent, CancellationToken cancellationToken) + { + if (idParent.HasValue && !await manualDirectoryRepository.IsExistsAsync(idParent.Value, cancellationToken)) + throw new ArgumentInvalidException(nameof(idParent), "Родительской директории не существует"); - var directory = new ManualDirectoryDto - { - Name = name, - IdParent = idParent, - }; + var directory = new ManualDirectoryDto + { + Name = name, + IdParent = idParent, + }; - if (await IsExistDirectoryAsync(directory, cancellationToken)) - throw new ArgumentInvalidException(name, "Директория с таким названием уже существует"); - - return await manualDirectoryRepository.InsertAsync(directory, cancellationToken); - } + if (await IsExistDirectoryAsync(directory, cancellationToken)) + throw new ArgumentInvalidException(name, "Директория с таким названием уже существует"); + + return await manualDirectoryRepository.InsertAsync(directory, cancellationToken); + } - public async Task UpdateDirectoryAsync(int id, string name, CancellationToken cancellationToken) - { - var directory = await manualDirectoryRepository.GetOrDefaultAsync(id, cancellationToken) - ?? throw new ArgumentInvalidException(nameof(id), $"Директории с Id: {id} не существует"); + public async Task UpdateDirectoryAsync(int id, string name, CancellationToken cancellationToken) + { + var directory = await manualDirectoryRepository.GetOrDefaultAsync(id, cancellationToken) + ?? throw new ArgumentInvalidException(nameof(id), $"Директории с Id: {id} не существует"); - directory.Name = name; + directory.Name = name; - if (await IsExistDirectoryAsync(directory, cancellationToken)) - throw new ArgumentInvalidException(name, "Директория с таким названием уже существует"); + if (await IsExistDirectoryAsync(directory, cancellationToken)) + throw new ArgumentInvalidException(name, "Директория с таким названием уже существует"); - await manualDirectoryRepository.UpdateAsync(directory, cancellationToken); - } + await manualDirectoryRepository.UpdateAsync(directory, cancellationToken); + } - public async Task DeleteDirectoryAsync(int id, CancellationToken cancellationToken) - { - var directory = await manualDirectoryRepository.GetOrDefaultAsync(id, cancellationToken); + public async Task DeleteDirectoryAsync(int id, CancellationToken cancellationToken) + { + var directory = await manualDirectoryRepository.GetOrDefaultAsync(id, cancellationToken); - if (directory is null) - return 0; + if (directory is null) + return 0; - var path = fileStorageRepository.MakeFilePath(directoryFiles, IdFileCategory.ToString(), - await BuildDirectoryPathAsync(id, cancellationToken)); + var path = fileStorageRepository.MakeFilePath(directoryFiles, IdFileCategory.ToString(), + await BuildDirectoryPathAsync(id, cancellationToken)); - try - { - fileStorageRepository.DeleteDirectory(path, true); - } - catch (InvalidOperationException ex) - { - throw new ArgumentInvalidException(nameof(id), ex.Message); - } - - return await manualDirectoryRepository.DeleteAsync(directory.Id, cancellationToken); - } + try + { + fileStorageRepository.DeleteDirectory(path, true); + } + catch (InvalidOperationException ex) + { + throw new ArgumentInvalidException(nameof(id), ex.Message); + } + + return await manualDirectoryRepository.DeleteAsync(directory.Id, cancellationToken); + } - public async Task DeleteFileAsync(int id, CancellationToken cancellationToken) - { - var manual = await manualRepository.GetOrDefaultAsync(id, cancellationToken); + public async Task DeleteFileAsync(int id, CancellationToken cancellationToken) + { + var manual = await manualRepository.GetOrDefaultAsync(id, cancellationToken); - if (manual is null) - return 0; + if (manual is null) + return 0; - var filePath = await BuildFilePathAsync(manual.IdDirectory, manual.Name, cancellationToken); - - fileStorageRepository.DeleteFile(filePath); + var filePath = await BuildFilePathAsync(manual.IdDirectory, manual.Name, cancellationToken); + + fileStorageRepository.DeleteFile(filePath); - return await manualRepository.DeleteAsync(manual.Id, cancellationToken); - } + return await manualRepository.DeleteAsync(manual.Id, cancellationToken); + } - public async Task<(Stream stream, string fileName)?> GetFileAsync(int id, CancellationToken cancellationToken) - { - var manual = await manualRepository.GetOrDefaultAsync(id, cancellationToken); + public async Task<(Stream stream, string fileName)?> GetFileAsync(int id, CancellationToken cancellationToken) + { + var manual = await manualRepository.GetOrDefaultAsync(id, cancellationToken); - if (manual is null) - return null; + if (manual is null) + return null; - var path = await BuildFilePathAsync(manual.IdDirectory, manual.Name, cancellationToken); - var fileStream = new FileStream(path, FileMode.Open); - return (fileStream, manual.Name); - } + var path = await BuildFilePathAsync(manual.IdDirectory, manual.Name, cancellationToken); + var fileStream = new FileStream(path, FileMode.Open); + return (fileStream, manual.Name); + } - private async Task IsExistDirectoryAsync(ManualDirectoryDto directory, CancellationToken cancellationToken) - { - var existingDirectory = await manualDirectoryRepository.GetOrDefaultAsync(directory.Name, directory.IdParent, - cancellationToken); + private async Task IsExistDirectoryAsync(ManualDirectoryDto directory, CancellationToken cancellationToken) + { + var existingDirectory = await manualDirectoryRepository.GetOrDefaultAsync(directory.Name, directory.IdParent, + cancellationToken); - return existingDirectory is not null && directory.Id != existingDirectory.Id; - } + return existingDirectory is not null && directory.Id != existingDirectory.Id; + } - private async Task BuildDirectoryPathAsync(int idDirectory, CancellationToken cancellationToken) - { - var directiories = await manualDirectoryRepository.GetAllAsync(cancellationToken); + private async Task BuildDirectoryPathAsync(int idDirectory, CancellationToken cancellationToken) + { + var directiories = await manualDirectoryRepository.GetAllAsync(cancellationToken); - var directory = directiories.FirstOrDefault(d => d.Id == idDirectory) - ?? throw new ArgumentInvalidException(nameof(idDirectory), $"Директории с Id: {idDirectory} не существует"); + var directory = directiories.FirstOrDefault(d => d.Id == idDirectory) + ?? throw new ArgumentInvalidException(nameof(idDirectory), $"Директории с Id: {idDirectory} не существует"); - var pathSegments = new List { directory.Id }; + var pathSegments = new List { directory.Id }; - while (directory.IdParent.HasValue) - { - directory = directiories.FirstOrDefault(d => d.Id == directory.IdParent.Value); - pathSegments.Insert(0, directory!.Id); - } + while (directory.IdParent.HasValue) + { + directory = directiories.FirstOrDefault(d => d.Id == directory.IdParent.Value); + pathSegments.Insert(0, directory!.Id); + } - return string.Join("/", pathSegments); - } + return string.Join("/", pathSegments); + } - private async Task BuildFilePathAsync(int idDirectory, string name, CancellationToken cancellationToken) - { - var directoryPath = await BuildDirectoryPathAsync(idDirectory, cancellationToken); + private async Task BuildFilePathAsync(int idDirectory, string name, CancellationToken cancellationToken) + { + var directoryPath = await BuildDirectoryPathAsync(idDirectory, cancellationToken); - return fileStorageRepository.MakeFilePath(directoryFiles, IdFileCategory.ToString(), Path.Combine(directoryPath, name)); - } + return fileStorageRepository.MakeFilePath(directoryFiles, IdFileCategory.ToString(), Path.Combine(directoryPath, name)); + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/MeasureService.cs b/AsbCloudInfrastructure/Services/MeasureService.cs index a291a8c1..5413390d 100644 --- a/AsbCloudInfrastructure/Services/MeasureService.cs +++ b/AsbCloudInfrastructure/Services/MeasureService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Services; using AsbCloudDb.Model; diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanAntiCrashRotationParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanAntiCrashRotationParser.cs index 007ae2c5..99fdc752 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanAntiCrashRotationParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanAntiCrashRotationParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanAntiCrashRotationParser : ProcessMapPlanParser { - public ProcessMapPlanAntiCrashRotationParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanAntiCrashRotationParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanAntiCrashRotationTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanAntiCrashRotationTemplate(); - protected override ProcessMapPlanAntiCrashRotationDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanAntiCrashRotationDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanAutoHoldTFParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanAutoHoldTFParser.cs index 2c502f33..93eb321f 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanAutoHoldTFParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanAutoHoldTFParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanAutoHoldTFParser : ProcessMapPlanParser { - public ProcessMapPlanAutoHoldTFParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanAutoHoldTFParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanAutoHoldTFTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanAutoHoldTFTemplate(); - protected override ProcessMapPlanAutoHoldTFDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanAutoHoldTFDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanDamperParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanDamperParser.cs index 38ac7bad..a889ef29 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanDamperParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanDamperParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanDamperParser : ProcessMapPlanParser { - public ProcessMapPlanDamperParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanDamperParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanDamperTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanDamperTemplate(); - protected override ProcessMapPlanDamperDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanDamperDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanDrillTestParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanDrillTestParser.cs index cf42b3ac..d9acc4ed 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanDrillTestParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanDrillTestParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanDrillTestParser : ProcessMapPlanParser { - public ProcessMapPlanDrillTestParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanDrillTestParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanDrillTestTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanDrillTestTemplate(); - protected override ProcessMapPlanDrillTestDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanDrillTestDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanLoadCapacityParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanLoadCapacityParser.cs index ccd2e8f1..16d0091d 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanLoadCapacityParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanLoadCapacityParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanLoadCapacityParser : ProcessMapPlanParser { - public ProcessMapPlanLoadCapacityParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanLoadCapacityParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanLoadCapacityTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanLoadCapacityTemplate(); - protected override ProcessMapPlanLoadCapacityDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanLoadCapacityDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOscillationAnglesParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOscillationAnglesParser.cs index 213f4105..8aeee5d9 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOscillationAnglesParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOscillationAnglesParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanOscillationAnglesParser : ProcessMapPlanParser { - public ProcessMapPlanOscillationAnglesParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanOscillationAnglesParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanOscillationAnglesTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanOscillationAnglesTemplate(); - protected override ProcessMapPlanOscillationAnglesDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanOscillationAnglesDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOscillationParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOscillationParser.cs index 3233c825..36564c78 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOscillationParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanOscillationParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanOscillationParser : ProcessMapPlanParser { - public ProcessMapPlanOscillationParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanOscillationParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanOscillationTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanOscillationTemplate(); - protected override ProcessMapPlanOscillationDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanOscillationDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanParser.cs index 89fbd5b7..a01f9c53 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanParser.cs @@ -9,22 +9,22 @@ using AsbCloudInfrastructure.Services.ExcelServices; namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public abstract class ProcessMapPlanParser : ParserExcelService - where TDto : ProcessMapPlanBaseDto + where TDto : ProcessMapPlanBaseDto { - protected readonly IEnumerable sections; - - protected ProcessMapPlanParser(IWellOperationRepository wellOperationRepository) - { - sections = wellOperationRepository.GetSectionTypes(); - } - - public override ParserResultDto Parse(Stream file, WellRelatedParserRequest options) - { - var result = base.Parse(file, options); + protected readonly IEnumerable sections; + + protected ProcessMapPlanParser(IWellOperationRepository wellOperationRepository) + { + sections = wellOperationRepository.GetSectionTypes(); + } + + public override ParserResultDto Parse(Stream file, WellRelatedParserRequest options) + { + var result = base.Parse(file, options); - foreach (var item in result.Item) - item.Item.IdWell = options.IdWell; + foreach (var item in result.Item) + item.Item.IdWell = options.IdWell; - return result; - } + return result; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanPositioningOffTheBottomParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanPositioningOffTheBottomParser.cs index 1d006985..6e369d18 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanPositioningOffTheBottomParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanPositioningOffTheBottomParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanPositioningOffTheBottomParser : ProcessMapPlanParser { - public ProcessMapPlanPositioningOffTheBottomParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanPositioningOffTheBottomParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanPositioningOffTheBottomTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanPositioningOffTheBottomTemplate(); - protected override ProcessMapPlanPositioningOffTheBottomDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanPositioningOffTheBottomDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanReamingRotorParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanReamingRotorParser.cs index 452daf3a..85d1711f 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanReamingRotorParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanReamingRotorParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanReamingRotorParser : ProcessMapPlanParser { - public ProcessMapPlanReamingRotorParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanReamingRotorParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanReamingRotorTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanReamingRotorTemplate(); - protected override ProcessMapPlanReamingRotorDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanReamingRotorDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanReamingSlideParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanReamingSlideParser.cs index c3c61415..a65bfaf0 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanReamingSlideParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanReamingSlideParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanReamingSlideParser : ProcessMapPlanParser { - public ProcessMapPlanReamingSlideParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanReamingSlideParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanReamingSlideTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanReamingSlideTemplate(); - protected override ProcessMapPlanReamingSlideDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanReamingSlideDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRecordingStaticMeasurementParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRecordingStaticMeasurementParser.cs index a1a0f027..dba0e90f 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRecordingStaticMeasurementParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRecordingStaticMeasurementParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanRecordingStaticMeasurementParser : ProcessMapPlanParser { - public ProcessMapPlanRecordingStaticMeasurementParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanRecordingStaticMeasurementParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanRecordingStaticMeasurementTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanRecordingStaticMeasurementTemplate(); - protected override ProcessMapPlanRecordingStaticMeasurementDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanRecordingStaticMeasurementDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRotorParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRotorParser.cs index cca67fc9..df5c8d1c 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRotorParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanRotorParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanRotorParser : ProcessMapPlanParser { - public ProcessMapPlanRotorParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanRotorParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanRotorTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanRotorTemplate(); - protected override ProcessMapPlanRotorDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanRotorDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanShockTestParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanShockTestParser.cs index b1494be4..e8352d06 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanShockTestParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanShockTestParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanShockTestParser : ProcessMapPlanParser { - public ProcessMapPlanShockTestParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanShockTestParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanShockTestTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanShockTestTemplate(); - protected override ProcessMapPlanShockTestDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanShockTestDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSlideParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSlideParser.cs index a10c1652..5bef6848 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSlideParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSlideParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanSlideParser : ProcessMapPlanParser { - public ProcessMapPlanSlideParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanSlideParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanSlideTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanSlideTemplate(); - protected override ProcessMapPlanSlideDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanSlideDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanStaticMeasurementOutputParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanStaticMeasurementOutputParser.cs index 61de9970..bb289c4c 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanStaticMeasurementOutputParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanStaticMeasurementOutputParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanStaticMeasurementOutputParser : ProcessMapPlanParser { - public ProcessMapPlanStaticMeasurementOutputParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanStaticMeasurementOutputParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanStaticMeasurementOutputTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanStaticMeasurementOutputTemplate(); - protected override ProcessMapPlanStaticMeasurementOutputDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanStaticMeasurementOutputDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSwitchingOffThePumpParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSwitchingOffThePumpParser.cs index 1ae5abf0..0524480a 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSwitchingOffThePumpParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSwitchingOffThePumpParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanSwitchingOffThePumpParser : ProcessMapPlanParser { - public ProcessMapPlanSwitchingOffThePumpParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanSwitchingOffThePumpParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanSwitchingOffThePumpTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanSwitchingOffThePumpTemplate(); - protected override ProcessMapPlanSwitchingOffThePumpDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanSwitchingOffThePumpDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSwitchingToTheModeParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSwitchingToTheModeParser.cs index 76990a07..46d563c3 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSwitchingToTheModeParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanSwitchingToTheModeParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanSwitchingToTheModeParser : ProcessMapPlanParser { - public ProcessMapPlanSwitchingToTheModeParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanSwitchingToTheModeParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanSwitchingToTheModeTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanSwitchingToTheModeTemplate(); - protected override ProcessMapPlanSwitchingToTheModeDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanSwitchingToTheModeDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanTFOrientationParser.cs b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanTFOrientationParser.cs index 8358ce19..fda4a4a1 100644 --- a/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanTFOrientationParser.cs +++ b/AsbCloudInfrastructure/Services/ProcessMapPlan/Parser/ProcessMapPlanTFOrientationParser.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.ProcessMapPlan.Parser; public class ProcessMapPlanTFOrientationParser : ProcessMapPlanParser { - public ProcessMapPlanTFOrientationParser(IWellOperationRepository wellOperationRepository) - : base(wellOperationRepository) - { - } + public ProcessMapPlanTFOrientationParser(IWellOperationRepository wellOperationRepository) + : base(wellOperationRepository) + { + } - protected override ITemplateParameters TemplateParameters => new ProcessMapPlanTFOrientationTemplate(); + protected override ITemplateParameters TemplateParameters => new ProcessMapPlanTFOrientationTemplate(); - protected override ProcessMapPlanTFOrientationDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override ProcessMapPlanTFOrientationDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var section = sections.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var section = sections.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.Section?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (section is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (section is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(ProcessMapPlanBaseDto.Section)], + "Указана некорректная секция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = section.Id; + dto.IdWellSectionType = section.Id; - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/ProcessMaps/Report/Data/ParamStat.cs b/AsbCloudInfrastructure/Services/ProcessMaps/Report/Data/ParamStat.cs index 90559ca1..837dea4a 100644 --- a/AsbCloudInfrastructure/Services/ProcessMaps/Report/Data/ParamStat.cs +++ b/AsbCloudInfrastructure/Services/ProcessMaps/Report/Data/ParamStat.cs @@ -1,4 +1,4 @@ -using System; +using System; using AsbCloudApp.Data.ProcessMaps.Report; using AsbCloudApp.Data.SAUB; diff --git a/AsbCloudInfrastructure/Services/ProcessMaps/Report/Data/TelemetryStat.cs b/AsbCloudInfrastructure/Services/ProcessMaps/Report/Data/TelemetryStat.cs index 89fe6291..7d252cbe 100644 --- a/AsbCloudInfrastructure/Services/ProcessMaps/Report/Data/TelemetryStat.cs +++ b/AsbCloudInfrastructure/Services/ProcessMaps/Report/Data/TelemetryStat.cs @@ -1,4 +1,4 @@ -using System; +using System; using AsbCloudApp.Data.SAUB; namespace AsbCloudInfrastructure.Services.ProcessMaps.Report.Data; diff --git a/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDataSaubStatExportService.cs b/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDataSaubStatExportService.cs index ef6748e6..d20619dc 100644 --- a/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDataSaubStatExportService.cs +++ b/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDataSaubStatExportService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Report; +using AsbCloudApp.Data.ProcessMaps.Report; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudApp.Services.ProcessMaps.WellDrilling; diff --git a/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDrillingService.cs b/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDrillingService.cs index f6e2e8ab..ce87e457 100644 --- a/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDrillingService.cs +++ b/AsbCloudInfrastructure/Services/ProcessMaps/Report/ProcessMapReportDrillingService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.ProcessMaps; using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Data.ProcessMaps.Report; diff --git a/AsbCloudInfrastructure/Services/ReduceSamplingService.cs b/AsbCloudInfrastructure/Services/ReduceSamplingService.cs index 38d6a03e..6db845a5 100644 --- a/AsbCloudInfrastructure/Services/ReduceSamplingService.cs +++ b/AsbCloudInfrastructure/Services/ReduceSamplingService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using AsbCloudDb; using AsbCloudDb.Model; diff --git a/AsbCloudInfrastructure/Services/ReportService.cs b/AsbCloudInfrastructure/Services/ReportService.cs index cf533310..f98ea5be 100644 --- a/AsbCloudInfrastructure/Services/ReportService.cs +++ b/AsbCloudInfrastructure/Services/ReportService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.Progress; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudInfrastructure/Services/RequestTrackerService.cs b/AsbCloudInfrastructure/Services/RequestTrackerService.cs index 72606103..2a9ad660 100644 --- a/AsbCloudInfrastructure/Services/RequestTrackerService.cs +++ b/AsbCloudInfrastructure/Services/RequestTrackerService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using System; using System.Collections.Concurrent; diff --git a/AsbCloudInfrastructure/Services/SAUB/CsvSerializer.cs b/AsbCloudInfrastructure/Services/SAUB/CsvSerializer.cs index a73a1edf..71091099 100644 --- a/AsbCloudInfrastructure/Services/SAUB/CsvSerializer.cs +++ b/AsbCloudInfrastructure/Services/SAUB/CsvSerializer.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; diff --git a/AsbCloudInfrastructure/Services/SAUB/EventService.cs b/AsbCloudInfrastructure/Services/SAUB/EventService.cs index 2d861562..c01b92c9 100644 --- a/AsbCloudInfrastructure/Services/SAUB/EventService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/EventService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Services; using AsbCloudDb; using AsbCloudDb.Model; diff --git a/AsbCloudInfrastructure/Services/SAUB/MessageService.cs b/AsbCloudInfrastructure/Services/SAUB/MessageService.cs index ea6cc79e..f4edfc66 100644 --- a/AsbCloudInfrastructure/Services/SAUB/MessageService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/MessageService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.SAUB; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudInfrastructure/Services/SAUB/Readme.md b/AsbCloudInfrastructure/Services/SAUB/Readme.md index af2e3df0..4ee08dac 100644 --- a/AsbCloudInfrastructure/Services/SAUB/Readme.md +++ b/AsbCloudInfrastructure/Services/SAUB/Readme.md @@ -1 +1 @@ -Папка содержит services для получаемых от панели оператора САУБ запросов. \ No newline at end of file +Папка содержит services для получаемых от панели оператора САУБ запросов. \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/SAUB/SetpointsService.cs b/AsbCloudInfrastructure/Services/SAUB/SetpointsService.cs index d91c893d..2584554c 100644 --- a/AsbCloudInfrastructure/Services/SAUB/SetpointsService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/SetpointsService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Services; using AsbCloudDb.Model; using AsbCloudInfrastructure.Repository; diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataBaseService.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataBaseService.cs index f5fd2d8b..88b11941 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataBaseService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataBaseService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Services; diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataCache.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataCache.cs index 3b9f7166..fc0c9354 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataCache.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataCache.cs @@ -1,4 +1,4 @@ -using AsbCloudDb.Model; +using AsbCloudDb.Model; using System.Collections.Concurrent; using System.Collections.Generic; using System; diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSaubService.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSaubService.cs index 9bca69bd..78a63b2c 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSaubService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSaubService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Services; diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSpinService.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSpinService.cs index 3a6f60d4..f629c69c 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSpinService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryDataSpinService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using AsbCloudDb.Model; diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs index 7977b1ab..4200595e 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.SAUB; using AsbCloudApp.Repositories; using AsbCloudApp.Services; diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryUserService.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryUserService.cs index b9efeb11..d3975602 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryUserService.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryUserService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Comparators; +using AsbCloudApp.Comparators; using AsbCloudApp.Data.SAUB; using AsbCloudApp.Services; using AsbCloudDb; diff --git a/AsbCloudInfrastructure/Services/SAUB/TelemetryWithSoftwareVersionsDto.cs b/AsbCloudInfrastructure/Services/SAUB/TelemetryWithSoftwareVersionsDto.cs index 024e534b..75d3c95e 100644 --- a/AsbCloudInfrastructure/Services/SAUB/TelemetryWithSoftwareVersionsDto.cs +++ b/AsbCloudInfrastructure/Services/SAUB/TelemetryWithSoftwareVersionsDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace AsbCloudInfrastructure.Services.SAUB; diff --git a/AsbCloudInfrastructure/Services/SlipsStatService.cs b/AsbCloudInfrastructure/Services/SlipsStatService.cs index 2bc87c68..954b2c75 100644 --- a/AsbCloudInfrastructure/Services/SlipsStatService.cs +++ b/AsbCloudInfrastructure/Services/SlipsStatService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudDb.Model; diff --git a/AsbCloudInfrastructure/Services/Subsystems/DepthInterpolation.cs b/AsbCloudInfrastructure/Services/Subsystems/DepthInterpolation.cs index 71718cce..532377ef 100644 --- a/AsbCloudInfrastructure/Services/Subsystems/DepthInterpolation.cs +++ b/AsbCloudInfrastructure/Services/Subsystems/DepthInterpolation.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; namespace AsbCloudInfrastructure.Services.Subsystems.Utils diff --git a/AsbCloudInfrastructure/Services/Subsystems/SubsystemService.cs b/AsbCloudInfrastructure/Services/Subsystems/SubsystemService.cs index d2400ba3..e2ab1e13 100644 --- a/AsbCloudInfrastructure/Services/Subsystems/SubsystemService.cs +++ b/AsbCloudInfrastructure/Services/Subsystems/SubsystemService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -42,14 +42,14 @@ internal class SubsystemService : ISubsystemService // получить расписания бурильщиков по скважинам // ScheduleRepository добавить новый метод // [ - // get telemetryId by idWell // IWellService.GetOrDefaultStatAsync - // получить detectedOperation by telemetry //detectedOperationService.GetOperationsAsync - // сгруппировать по бурильщикам - // [ - // рассчитать статистику // CalcStatAsync - // join driller from group - // ] - // join well (cluster, deposit) + // get telemetryId by idWell // IWellService.GetOrDefaultStatAsync + // получить detectedOperation by telemetry //detectedOperationService.GetOperationsAsync + // сгруппировать по бурильщикам + // [ + // рассчитать статистику // CalcStatAsync + // join driller from group + // ] + // join well (cluster, deposit) // ] public async Task> GetByWellsAsync(GetStatRequest request, CancellationToken token) diff --git a/AsbCloudInfrastructure/Services/TimeZoneService.cs b/AsbCloudInfrastructure/Services/TimeZoneService.cs index 083e8d52..b22edfc0 100644 --- a/AsbCloudInfrastructure/Services/TimeZoneService.cs +++ b/AsbCloudInfrastructure/Services/TimeZoneService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using System.Net.Http; using System.Text.Json; diff --git a/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryExportService.cs b/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryExportService.cs index fe78b6b5..2a08556a 100644 --- a/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryExportService.cs +++ b/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryExportService.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Repositories; using AsbCloudApp.Services; @@ -10,18 +10,18 @@ using AsbCloudInfrastructure.Services.ExcelServices; namespace AsbCloudInfrastructure.Services.Trajectory.Export; public abstract class TrajectoryExportService : ExportExcelService - where TDto : TrajectoryGeoDto + where TDto : TrajectoryGeoDto { - protected readonly IWellService wellService; + protected readonly IWellService wellService; - private readonly ITrajectoryRepository trajectoryRepository; + private readonly ITrajectoryRepository trajectoryRepository; - protected TrajectoryExportService(IWellService wellService, ITrajectoryRepository trajectoryRepository) - { - this.wellService = wellService; - this.trajectoryRepository = trajectoryRepository; - } + protected TrajectoryExportService(IWellService wellService, ITrajectoryRepository trajectoryRepository) + { + this.wellService = wellService; + this.trajectoryRepository = trajectoryRepository; + } - protected override Task> GetDtosAsync(WellRelatedExportRequest options, CancellationToken token) => - trajectoryRepository.GetAsync(options.IdWell, token); + protected override Task> GetDtosAsync(WellRelatedExportRequest options, CancellationToken token) => + trajectoryRepository.GetAsync(options.IdWell, token); } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryFactManualExportService.cs b/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryFactManualExportService.cs index 40b7d1c8..58acc8ff 100644 --- a/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryFactManualExportService.cs +++ b/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryFactManualExportService.cs @@ -1,4 +1,4 @@ -using System.Threading; +using System.Threading; using System.Threading.Tasks; using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Repositories; @@ -11,18 +11,18 @@ namespace AsbCloudInfrastructure.Services.Trajectory.Export; public class TrajectoryFactManualExportService : TrajectoryExportService { - public TrajectoryFactManualExportService(IWellService wellService, - ITrajectoryEditableRepository trajectoryRepository) - : base(wellService, trajectoryRepository) - { - } + public TrajectoryFactManualExportService(IWellService wellService, + ITrajectoryEditableRepository trajectoryRepository) + : base(wellService, trajectoryRepository) + { + } - protected override ITemplateParameters TemplateParameters => new TrajectoryFactManualTemplate(); - - protected override async Task BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token) - { - var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token); + protected override ITemplateParameters TemplateParameters => new TrajectoryFactManualTemplate(); + + protected override async Task BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token) + { + var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token); - return $"{caption}_Фактическая_траектория.xlsx"; - } + return $"{caption}_Фактическая_траектория.xlsx"; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryFactNnbExportService.cs b/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryFactNnbExportService.cs index 3b3206f5..7567f445 100644 --- a/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryFactNnbExportService.cs +++ b/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryFactNnbExportService.cs @@ -1,4 +1,4 @@ -using System.Threading; +using System.Threading; using System.Threading.Tasks; using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Repositories; @@ -11,18 +11,18 @@ namespace AsbCloudInfrastructure.Services.Trajectory.Export; public class TrajectoryFactNnbExportService : TrajectoryExportService { - public TrajectoryFactNnbExportService(IWellService wellService, - ITrajectoryNnbRepository trajectoryRepository) - : base(wellService, trajectoryRepository) - { - } + public TrajectoryFactNnbExportService(IWellService wellService, + ITrajectoryNnbRepository trajectoryRepository) + : base(wellService, trajectoryRepository) + { + } - protected override ITemplateParameters TemplateParameters => new TrajectoryFactNnbTemplate(); + protected override ITemplateParameters TemplateParameters => new TrajectoryFactNnbTemplate(); - protected override async Task BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token) - { - var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token); + protected override async Task BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token) + { + var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token); - return $"{caption}_Траектория_ННБ.xlsx"; - } + return $"{caption}_Траектория_ННБ.xlsx"; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryPlanExportService.cs b/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryPlanExportService.cs index 37bce068..311dc95c 100644 --- a/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryPlanExportService.cs +++ b/AsbCloudInfrastructure/Services/Trajectory/Export/TrajectoryPlanExportService.cs @@ -1,4 +1,4 @@ -using System.Threading; +using System.Threading; using System.Threading.Tasks; using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Repositories; @@ -11,18 +11,18 @@ namespace AsbCloudInfrastructure.Services.Trajectory.Export; public class TrajectoryPlanExportService : TrajectoryExportService { - public TrajectoryPlanExportService(IWellService wellService, - ITrajectoryEditableRepository trajectoryRepository) - : base(wellService, trajectoryRepository) - { - } + public TrajectoryPlanExportService(IWellService wellService, + ITrajectoryEditableRepository trajectoryRepository) + : base(wellService, trajectoryRepository) + { + } - protected override ITemplateParameters TemplateParameters => new TrajectoryPlanTemplate(); + protected override ITemplateParameters TemplateParameters => new TrajectoryPlanTemplate(); - protected override async Task BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token) - { - var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token); + protected override async Task BuildFileNameAsync(WellRelatedExportRequest options, CancellationToken token) + { + var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token); - return $"{caption}_Плановая_Траектория.xlsx"; - } + return $"{caption}_Плановая_Траектория.xlsx"; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryFactManualParser.cs b/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryFactManualParser.cs index 19b2ebed..edfff48b 100644 --- a/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryFactManualParser.cs +++ b/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryFactManualParser.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using AsbCloudInfrastructure.Services.ExcelServices.Templates; using AsbCloudInfrastructure.Services.ExcelServices.Templates.TrajectoryTemplates; @@ -6,5 +6,5 @@ namespace AsbCloudInfrastructure.Services.Trajectory.Parser; public class TrajectoryFactManualParser : TrajectoryParser { - protected override ITemplateParameters TemplateParameters => new TrajectoryFactManualTemplate(); + protected override ITemplateParameters TemplateParameters => new TrajectoryFactManualTemplate(); } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryParser.cs b/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryParser.cs index f2aca93d..fa792a36 100644 --- a/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryParser.cs +++ b/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryParser.cs @@ -7,15 +7,15 @@ using AsbCloudInfrastructure.Services.ExcelServices; namespace AsbCloudInfrastructure.Services.Trajectory.Parser; public abstract class TrajectoryParser : ParserExcelService - where TDto : TrajectoryGeoDto + where TDto : TrajectoryGeoDto { - public override ParserResultDto Parse(Stream file, WellRelatedParserRequest options) - { - var result = base.Parse(file, options); + public override ParserResultDto Parse(Stream file, WellRelatedParserRequest options) + { + var result = base.Parse(file, options); - foreach (var item in result.Item) - item.Item.IdWell = options.IdWell; + foreach (var item in result.Item) + item.Item.IdWell = options.IdWell; - return result; - } + return result; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryPlanParser.cs b/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryPlanParser.cs index d99f0b9f..79548af8 100644 --- a/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryPlanParser.cs +++ b/AsbCloudInfrastructure/Services/Trajectory/Parser/TrajectoryPlanParser.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using AsbCloudInfrastructure.Services.ExcelServices.Templates; using AsbCloudInfrastructure.Services.ExcelServices.Templates.TrajectoryTemplates; @@ -6,5 +6,5 @@ namespace AsbCloudInfrastructure.Services.Trajectory.Parser; public class TrajectoryPlanParser : TrajectoryParser { - protected override ITemplateParameters TemplateParameters => new TrajectoryPlanTemplate(); + protected override ITemplateParameters TemplateParameters => new TrajectoryPlanTemplate(); } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/Trajectory/Templates/password.md b/AsbCloudInfrastructure/Services/Trajectory/Templates/password.md index 74caf50b..08c37605 100644 --- a/AsbCloudInfrastructure/Services/Trajectory/Templates/password.md +++ b/AsbCloudInfrastructure/Services/Trajectory/Templates/password.md @@ -1 +1 @@ -password for PlannedTrajectoryTemplate.xlsx is Drill2022 \ No newline at end of file +password for PlannedTrajectoryTemplate.xlsx is Drill2022 \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/Trajectory/TrajectoryService.cs b/AsbCloudInfrastructure/Services/Trajectory/TrajectoryService.cs index 6f16b193..9161efd1 100644 --- a/AsbCloudInfrastructure/Services/Trajectory/TrajectoryService.cs +++ b/AsbCloudInfrastructure/Services/Trajectory/TrajectoryService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using System; diff --git a/AsbCloudInfrastructure/Services/WellCompositeOperationService.cs b/AsbCloudInfrastructure/Services/WellCompositeOperationService.cs index 735a80a0..34665720 100644 --- a/AsbCloudInfrastructure/Services/WellCompositeOperationService.cs +++ b/AsbCloudInfrastructure/Services/WellCompositeOperationService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.WellOperation; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; diff --git a/AsbCloudInfrastructure/Services/WellContactService.cs b/AsbCloudInfrastructure/Services/WellContactService.cs index baf96ad9..d4f81568 100644 --- a/AsbCloudInfrastructure/Services/WellContactService.cs +++ b/AsbCloudInfrastructure/Services/WellContactService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.User; using AsbCloudApp.Exceptions; using AsbCloudApp.Services; diff --git a/AsbCloudInfrastructure/Services/WellFinalDocumentsService.cs b/AsbCloudInfrastructure/Services/WellFinalDocumentsService.cs index 7a736ba9..6e9a9e41 100644 --- a/AsbCloudInfrastructure/Services/WellFinalDocumentsService.cs +++ b/AsbCloudInfrastructure/Services/WellFinalDocumentsService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.User; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; diff --git a/AsbCloudInfrastructure/Services/WellInfoService.cs b/AsbCloudInfrastructure/Services/WellInfoService.cs index 1db7a2a1..735d3f1d 100644 --- a/AsbCloudInfrastructure/Services/WellInfoService.cs +++ b/AsbCloudInfrastructure/Services/WellInfoService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.ProcessMaps; using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Data.SAUB; diff --git a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs index 87fdc3a2..07146882 100644 --- a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs +++ b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using AsbCloudDb.Model; using Mapster; @@ -20,16 +20,16 @@ public class OperationsStatService : IOperationsStatService private readonly IAsbCloudDbContext db; private readonly IMemoryCache memoryCache; private readonly IWellService wellService; - private readonly ITelemetryDataCache telemetryDataCache; + private readonly ITelemetryDataCache telemetryDataCache; - public OperationsStatService(IAsbCloudDbContext db, IMemoryCache memoryCache, IWellService wellService, - ITelemetryDataCache telemetryDataCache) + public OperationsStatService(IAsbCloudDbContext db, IMemoryCache memoryCache, IWellService wellService, + ITelemetryDataCache telemetryDataCache) { this.db = db; this.memoryCache = memoryCache; this.wellService = wellService; - this.telemetryDataCache = telemetryDataCache; - } + this.telemetryDataCache = telemetryDataCache; + } public async Task GetOrDefaultStatClusterAsync(int idCluster, int idCompany, CancellationToken token) { diff --git a/AsbCloudInfrastructure/Services/WellOperationService/Race.cs b/AsbCloudInfrastructure/Services/WellOperationService/Race.cs index f868db6f..e50ef9a9 100644 --- a/AsbCloudInfrastructure/Services/WellOperationService/Race.cs +++ b/AsbCloudInfrastructure/Services/WellOperationService/Race.cs @@ -1,4 +1,4 @@ -using AsbCloudDb.Model; +using AsbCloudDb.Model; using System; using System.Collections.Generic; using System.Linq; diff --git a/AsbCloudInfrastructure/Services/WellOperationService/ScheduleReportService.cs b/AsbCloudInfrastructure/Services/WellOperationService/ScheduleReportService.cs index 96ef7b85..dc6495e0 100644 --- a/AsbCloudInfrastructure/Services/WellOperationService/ScheduleReportService.cs +++ b/AsbCloudInfrastructure/Services/WellOperationService/ScheduleReportService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Services; using AsbCloudDb.Model; @@ -308,7 +308,7 @@ namespace AsbCloudInfrastructure.Services.WellOperationService SetCell(sheet.Row(rowTopStatTitle + 1), colTopStatvalue - 1, "+") .Style.Font.SetFontColor(XLColor.Green); else - SetCell(sheet.Row(rowTopStatTitle + 1), colTopStatvalue - 1, "—") + SetCell(sheet.Row(rowTopStatTitle + 1), colTopStatvalue - 1, "-") .Style.Font.SetFontColor(XLColor.Red); } } diff --git a/AsbCloudInfrastructure/Services/WellOperations/Factories/WellOperationExportServiceFactory.cs b/AsbCloudInfrastructure/Services/WellOperations/Factories/WellOperationExportServiceFactory.cs index 1dc1d2a7..40768e86 100644 --- a/AsbCloudInfrastructure/Services/WellOperations/Factories/WellOperationExportServiceFactory.cs +++ b/AsbCloudInfrastructure/Services/WellOperations/Factories/WellOperationExportServiceFactory.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.WellOperations.Factories; public class WellOperationExportServiceFactory : IExportServiceFactory { - private readonly IDictionary> exportServices; + private readonly IDictionary> exportServices; - public WellOperationExportServiceFactory(IServiceProvider serviceProvider) - { - var wellOperationRepository = serviceProvider.GetRequiredService(); - var wellService = serviceProvider.GetRequiredService(); + public WellOperationExportServiceFactory(IServiceProvider serviceProvider) + { + var wellOperationRepository = serviceProvider.GetRequiredService(); + var wellService = serviceProvider.GetRequiredService(); - exportServices = new Dictionary> - { - { - WellOperation.IdOperationTypeFact, - () => new WellOperationExport(wellOperationRepository, wellService) - }, - { - WellOperation.IdOperationTypePlan, - () => new WellOperationExport(wellOperationRepository, wellService) - } - }; - } + exportServices = new Dictionary> + { + { + WellOperation.IdOperationTypeFact, + () => new WellOperationExport(wellOperationRepository, wellService) + }, + { + WellOperation.IdOperationTypePlan, + () => new WellOperationExport(wellOperationRepository, wellService) + } + }; + } - public IExportService CreateExportService(int id) - where TOptions : IExportOptionsRequest - { - var parser = exportServices[id].Invoke(); + public IExportService CreateExportService(int id) + where TOptions : IExportOptionsRequest + { + var parser = exportServices[id].Invoke(); - return parser as IExportService - ?? throw new ArgumentNullException(nameof(id), "Не удалось экспортировать файл"); - } + return parser as IExportService + ?? throw new ArgumentNullException(nameof(id), "Не удалось экспортировать файл"); + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/WellOperations/Factories/WellOperationParserFactory.cs b/AsbCloudInfrastructure/Services/WellOperations/Factories/WellOperationParserFactory.cs index 4107a7dd..32930755 100644 --- a/AsbCloudInfrastructure/Services/WellOperations/Factories/WellOperationParserFactory.cs +++ b/AsbCloudInfrastructure/Services/WellOperations/Factories/WellOperationParserFactory.cs @@ -12,32 +12,32 @@ namespace AsbCloudInfrastructure.Services.WellOperations.Factories; public class WellOperationParserFactory : IParserFactory { - private readonly IDictionary> parsers; + private readonly IDictionary> parsers; - public WellOperationParserFactory(IServiceProvider serviceProvider) - { - var wellOperationRepository = serviceProvider.GetRequiredService(); - var categoryRepository = serviceProvider.GetRequiredService(); + public WellOperationParserFactory(IServiceProvider serviceProvider) + { + var wellOperationRepository = serviceProvider.GetRequiredService(); + var categoryRepository = serviceProvider.GetRequiredService(); - parsers = new Dictionary> - { - { - WellOperation.IdOperationTypeFact, - () => new WellOperationParser(wellOperationRepository, categoryRepository) - }, - { - WellOperation.IdOperationTypePlan, - () => new WellOperationParser(wellOperationRepository, categoryRepository) - } - }; - } + parsers = new Dictionary> + { + { + WellOperation.IdOperationTypeFact, + () => new WellOperationParser(wellOperationRepository, categoryRepository) + }, + { + WellOperation.IdOperationTypePlan, + () => new WellOperationParser(wellOperationRepository, categoryRepository) + } + }; + } - public IParserService CreateParser(int id) - where TOptions : IParserOptionsRequest - { - var parser = parsers[id].Invoke(); + public IParserService CreateParser(int id) + where TOptions : IParserOptionsRequest + { + var parser = parsers[id].Invoke(); - return parser as IParserService - ?? throw new ArgumentNullException(nameof(id), "Не удалось распознать файл"); - } + return parser as IParserService + ?? throw new ArgumentNullException(nameof(id), "Не удалось распознать файл"); + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/WellOperations/WellOperationExport.cs b/AsbCloudInfrastructure/Services/WellOperations/WellOperationExport.cs index 66e52fd8..cdb58cc6 100644 --- a/AsbCloudInfrastructure/Services/WellOperations/WellOperationExport.cs +++ b/AsbCloudInfrastructure/Services/WellOperations/WellOperationExport.cs @@ -14,37 +14,37 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates; namespace AsbCloudInfrastructure.Services.WellOperations; public class WellOperationExport : ExcelExportService - where TTemplate : class, ITemplateParameters, new() + where TTemplate : class, ITemplateParameters, new() { - private readonly IWellService wellService; - private readonly IWellOperationRepository wellOperationRepository; + private readonly IWellService wellService; + private readonly IWellOperationRepository wellOperationRepository; - public WellOperationExport(IWellOperationRepository wellOperationRepository, - IWellService wellService) - { - this.wellOperationRepository = wellOperationRepository; - this.wellService = wellService; - } + public WellOperationExport(IWellOperationRepository wellOperationRepository, + IWellService wellService) + { + this.wellOperationRepository = wellOperationRepository; + this.wellService = wellService; + } - protected override async Task BuildFileNameAsync(WellOperationExportRequest options, CancellationToken token) - { - var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token); + protected override async Task BuildFileNameAsync(WellOperationExportRequest options, CancellationToken token) + { + var caption = await wellService.GetWellCaptionByIdAsync(options.IdWell, token); - return options.IdType switch - { - WellOperation.IdOperationTypeFact => $"{caption}_Фактические_операции.xlsx", - WellOperation.IdOperationTypePlan => $"{caption}_Плановые_операции.xlsx", - _ => throw new ArgumentOutOfRangeException(nameof(options.IdType)) - }; - } + return options.IdType switch + { + WellOperation.IdOperationTypeFact => $"{caption}_Фактические_операции.xlsx", + WellOperation.IdOperationTypePlan => $"{caption}_Плановые_операции.xlsx", + _ => throw new ArgumentOutOfRangeException(nameof(options.IdType)) + }; + } - protected override Task> GetDtosAsync(WellOperationExportRequest options, CancellationToken token) - { - var request = new WellOperationRequest(new[] { options.IdWell }) - { - OperationType = options.IdType, - }; - - return wellOperationRepository.GetAsync(request, token); - } + protected override Task> GetDtosAsync(WellOperationExportRequest options, CancellationToken token) + { + var request = new WellOperationRequest(new[] { options.IdWell }) + { + OperationType = options.IdType, + }; + + return wellOperationRepository.GetAsync(request, token); + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/WellOperations/WellOperationParser.cs b/AsbCloudInfrastructure/Services/WellOperations/WellOperationParser.cs index 519b252a..a66f19ad 100644 --- a/AsbCloudInfrastructure/Services/WellOperations/WellOperationParser.cs +++ b/AsbCloudInfrastructure/Services/WellOperations/WellOperationParser.cs @@ -12,66 +12,66 @@ using AsbCloudInfrastructure.Services.ExcelServices.Templates; namespace AsbCloudInfrastructure.Services.WellOperations; public class WellOperationParser : ExcelWellRelatedParser - where TTemplateParameters : class, ITemplateParameters, new() + where TTemplateParameters : class, ITemplateParameters, new() { - private readonly IEnumerable sectionTypes; - private readonly IEnumerable categories; + private readonly IEnumerable sectionTypes; + private readonly IEnumerable categories; - public WellOperationParser(IWellOperationRepository wellOperationRepository, - IWellOperationCategoryRepository categoryRepository) - { - categories = categoryRepository.Get(false); - sectionTypes = wellOperationRepository.GetSectionTypes(); - } + public WellOperationParser(IWellOperationRepository wellOperationRepository, + IWellOperationCategoryRepository categoryRepository) + { + categories = categoryRepository.Get(false); + sectionTypes = wellOperationRepository.GetSectionTypes(); + } - public override ParserResultDto Parse(Stream file, WellOperationParserRequest options) - { - var result = base.Parse(file, options); + public override ParserResultDto Parse(Stream file, WellOperationParserRequest options) + { + var result = base.Parse(file, options); - foreach (var dto in result.Item) - { - dto.Item.IdWell = options.IdWell; - dto.Item.IdType = options.IdType; - dto.Item.DateStart = new DateTimeOffset(dto.Item.DateStart.DateTime, options.WellTimezone.Offset); - } + foreach (var dto in result.Item) + { + dto.Item.IdWell = options.IdWell; + dto.Item.IdType = options.IdType; + dto.Item.DateStart = new DateTimeOffset(dto.Item.DateStart.DateTime, options.WellTimezone.Offset); + } - return result; - } + return result; + } - protected override WellOperationDto BuildDto(IDictionary row, int rowNumber) - { - var dto = base.BuildDto(row, rowNumber); + protected override WellOperationDto BuildDto(IDictionary row, int rowNumber) + { + var dto = base.BuildDto(row, rowNumber); - var sectionType = sectionTypes.FirstOrDefault(s => - string.Equals(s.Caption.Trim(), dto.WellSectionTypeCaption?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var sectionType = sectionTypes.FirstOrDefault(s => + string.Equals(s.Caption.Trim(), dto.WellSectionTypeCaption?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (sectionType is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(WellOperationDto.WellSectionTypeCaption)].ColumnNumber, - "Указана некорректная секция"); - throw new FileFormatException(message); - } + if (sectionType is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(WellOperationDto.WellSectionTypeCaption)].ColumnNumber, + "Указана некорректная секция"); + throw new FileFormatException(message); + } - var category = categories.FirstOrDefault(c => - string.Equals(c.Name.Trim(), dto.OperationCategoryName?.Trim(), StringComparison.CurrentCultureIgnoreCase)); + var category = categories.FirstOrDefault(c => + string.Equals(c.Name.Trim(), dto.OperationCategoryName?.Trim(), StringComparison.CurrentCultureIgnoreCase)); - if (category is null) - { - var message = string.Format(XLExtentions.ProblemDetailsTemplate, - TemplateParameters.SheetName, - rowNumber, - TemplateParameters.Cells[nameof(WellOperationDto.OperationCategoryName)].ColumnNumber, - "Указана некорректная операция"); - throw new FileFormatException(message); - } + if (category is null) + { + var message = string.Format(XLExtentions.ProblemDetailsTemplate, + TemplateParameters.SheetName, + rowNumber, + TemplateParameters.Cells[nameof(WellOperationDto.OperationCategoryName)].ColumnNumber, + "Указана некорректная операция"); + throw new FileFormatException(message); + } - dto.IdWellSectionType = sectionType.Id; - dto.IdCategory = category.Id; - dto.IdParentCategory = category.IdParent; - - return dto; - } + dto.IdWellSectionType = sectionType.Id; + dto.IdCategory = category.Id; + dto.IdParentCategory = category.IdParent; + + return dto; + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/Services/WellService.cs b/AsbCloudInfrastructure/Services/WellService.cs index 2c361e38..baa51b14 100644 --- a/AsbCloudInfrastructure/Services/WellService.cs +++ b/AsbCloudInfrastructure/Services/WellService.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; diff --git a/AsbCloudInfrastructure/Services/WellboreService.cs b/AsbCloudInfrastructure/Services/WellboreService.cs index 92a94b5d..ffb9cb75 100644 --- a/AsbCloudInfrastructure/Services/WellboreService.cs +++ b/AsbCloudInfrastructure/Services/WellboreService.cs @@ -12,84 +12,84 @@ namespace AsbCloudInfrastructure.Services; public class WellboreService : IWellboreService { - const string WellboreNameFormat = "Ствол {0}"; - private readonly IWellService wellService; - private readonly IWellOperationRepository wellOperationRepository; + const string WellboreNameFormat = "Ствол {0}"; + private readonly IWellService wellService; + private readonly IWellOperationRepository wellOperationRepository; private readonly ITelemetryDataCache telemetryDataCache; public WellboreService( - IWellService wellService, - IWellOperationRepository wellOperationRepository, - ITelemetryDataCache telemetryDataCache) - { - this.wellService = wellService; - this.wellOperationRepository = wellOperationRepository; + IWellService wellService, + IWellOperationRepository wellOperationRepository, + ITelemetryDataCache telemetryDataCache) + { + this.wellService = wellService; + this.wellOperationRepository = wellOperationRepository; this.telemetryDataCache = telemetryDataCache; } - public async Task> GetWellboresAsync(IEnumerable idsWells, - CancellationToken token) - { - var wellRequest = new WellRequest { Ids = idsWells }; - var wells = await wellService.GetAsync(wellRequest, token); + public async Task> GetWellboresAsync(IEnumerable idsWells, + CancellationToken token) + { + var wellRequest = new WellRequest { Ids = idsWells }; + var wells = await wellService.GetAsync(wellRequest, token); var rowSections = await wellOperationRepository.GetSectionsAsync(idsWells, token); - var groupedSections = rowSections - .Where(section => section.IdType == 1) - .GroupBy(s => s.IdWell); + var groupedSections = rowSections + .Where(section => section.IdType == 1) + .GroupBy(s => s.IdWell); - var wellbores = wells + var wellbores = wells .SelectMany(well => { - var wellSections = groupedSections.FirstOrDefault(group => group.Key == well.Id); - if (wellSections is not null) - return MakeWellboreBySections(wellSections, well); - else - return MakeWellboreDefault(well); + var wellSections = groupedSections.FirstOrDefault(group => group.Key == well.Id); + if (wellSections is not null) + return MakeWellboreBySections(wellSections, well); + else + return MakeWellboreDefault(well); }) - .OrderBy(w => w.Well.Id) - .ThenBy(w => w.Id); + .OrderBy(w => w.Well.Id) + .ThenBy(w => w.Id); - return wellbores; + return wellbores; } private IEnumerable MakeWellboreDefault(WellDto well) { - var wellbore = new WellboreDto { - Id = 1, - Name = string.Format(WellboreNameFormat, 1), - Well = well, + var wellbore = new WellboreDto { + Id = 1, + Name = string.Format(WellboreNameFormat, 1), + Well = well, }; - //if(well.) + //if(well.) - if(well.IdTelemetry is not null) - { - var dataCache = telemetryDataCache.GetOrDefaultFirstLast(well.IdTelemetry.Value); - if (dataCache is not null) - { - wellbore.DateStart = dataCache.Value.First.DateTime; - wellbore.DepthStart = dataCache.Value.First.WellDepth; + if(well.IdTelemetry is not null) + { + var dataCache = telemetryDataCache.GetOrDefaultFirstLast(well.IdTelemetry.Value); + if (dataCache is not null) + { + wellbore.DateStart = dataCache.Value.First.DateTime; + wellbore.DepthStart = dataCache.Value.First.WellDepth; wellbore.DateEnd = dataCache.Value.Last.DateTime; wellbore.DepthEnd = dataCache.Value.Last.WellDepth; } - } + } return new[] { wellbore }; } private IEnumerable MakeWellboreBySections(IEnumerable sections, WellDto well) { - var orderedSections = sections.OrderBy(s => s.DateStart); - var wellbores = new List(); - int wellboreId = 1; + var orderedSections = sections.OrderBy(s => s.DateStart); + var wellbores = new List(); + int wellboreId = 1; - SectionByOperationsDto? preSection = null; - WellboreDto? wellbore = null; + SectionByOperationsDto? preSection = null; + WellboreDto? wellbore = null; foreach (var section in orderedSections) - { - if (wellbore is null || wellbore.DepthEnd > section.DepthStart) - { + { + if (wellbore is null || wellbore.DepthEnd > section.DepthStart) + { wellbore = new WellboreDto { Name = string.Format(WellboreNameFormat, wellboreId), @@ -106,17 +106,17 @@ public class WellboreService : IWellboreService wellboreId++; } - else - { - wellbore.DepthEnd = section.DepthEnd; - wellbore.DateEnd = section.DateEnd; - } + else + { + wellbore.DepthEnd = section.DepthEnd; + wellbore.DateEnd = section.DateEnd; + } preSection = section; } if (wellbore is not null) - { + { if (well.IdTelemetry is not null) { var dataCache = telemetryDataCache.GetOrDefaultFirstLast(well.IdTelemetry.Value); diff --git a/AsbCloudInfrastructure/Services/WitsInfoService.cs b/AsbCloudInfrastructure/Services/WitsInfoService.cs index 12ce6c9c..7e8ac40a 100644 --- a/AsbCloudInfrastructure/Services/WitsInfoService.cs +++ b/AsbCloudInfrastructure/Services/WitsInfoService.cs @@ -1,4 +1,4 @@ -using AsbWitsInfo; +using AsbWitsInfo; using System.Collections.Generic; namespace AsbCloudInfrastructure.Services diff --git a/AsbCloudInfrastructure/Services/_Readme.md b/AsbCloudInfrastructure/Services/_Readme.md index d05ae29e..3e5f15ab 100644 --- a/AsbCloudInfrastructure/Services/_Readme.md +++ b/AsbCloudInfrastructure/Services/_Readme.md @@ -1,4 +1,4 @@ -# Создание репозитория для сервися +# Создание репозитория для сервися 1. Создать интерфейс репозитория в AsbCloudApp.Services 2. Создать репозиторий в AsbCloudInfrastructure.Repository, наследоваться от созданного интерфейса, в нем добавить работу с БД diff --git a/AsbCloudInfrastructure/Startup.cs b/AsbCloudInfrastructure/Startup.cs index ab555c1c..c6a83d17 100644 --- a/AsbCloudInfrastructure/Startup.cs +++ b/AsbCloudInfrastructure/Startup.cs @@ -1,4 +1,4 @@ -using AsbCloudDb.Model; +using AsbCloudDb.Model; using AsbCloudInfrastructure.Services.DetectOperations; using AsbCloudInfrastructure.Services; using Microsoft.Extensions.DependencyInjection; diff --git a/AsbCloudInfrastructure/ValidationExtensions.cs b/AsbCloudInfrastructure/ValidationExtensions.cs index feb9c06b..be78a4fa 100644 --- a/AsbCloudInfrastructure/ValidationExtensions.cs +++ b/AsbCloudInfrastructure/ValidationExtensions.cs @@ -5,13 +5,13 @@ namespace AsbCloudInfrastructure; public static class ValidationExtensions { - public static bool Validate(this IValidatableObject validatableObject, ICollection validationResults) - { - var validationContext = new ValidationContext(validatableObject, serviceProvider: null, items: null); - - foreach (var validationResult in validatableObject.Validate(validationContext)) - validationResults.Add(validationResult); + public static bool Validate(this IValidatableObject validatableObject, ICollection validationResults) + { + var validationContext = new ValidationContext(validatableObject, serviceProvider: null, items: null); + + foreach (var validationResult in validatableObject.Validate(validationContext)) + validationResults.Add(validationResult); - return Validator.TryValidateObject(validatableObject, validationContext, validationResults, true); - } + return Validator.TryValidateObject(validatableObject, validationContext, validationResults, true); + } } \ No newline at end of file diff --git a/AsbCloudInfrastructure/XLExtentions.cs b/AsbCloudInfrastructure/XLExtentions.cs index b542c1d1..7c85c0a6 100644 --- a/AsbCloudInfrastructure/XLExtentions.cs +++ b/AsbCloudInfrastructure/XLExtentions.cs @@ -1,4 +1,4 @@ -using ClosedXML.Excel; +using ClosedXML.Excel; using System; using System.IO; using System.Linq; @@ -7,13 +7,13 @@ namespace AsbCloudInfrastructure; public static class XLExtentions { - public const string ProblemDetailsTemplate = "Лист: {0}, Строка: {1}, Столбец: {2}. {3}"; - public const string NotFoundSheetTemplate = "Книга excel не содержит листа {0}"; - public const string InvalidValueTemplate = "Лист: {0}, Строка: {1}, Столбец: {2}. Содержит некорректное значение"; - - public static IXLWorksheet GetWorksheet(this IXLWorkbook workbook, string sheetName) => - workbook.Worksheets.FirstOrDefault(ws => string.Equals(ws.Name.Trim(), sheetName.Trim(), StringComparison.CurrentCultureIgnoreCase)) - ?? throw new FileFormatException(string.Format(NotFoundSheetTemplate, sheetName)); + public const string ProblemDetailsTemplate = "Лист: {0}, Строка: {1}, Столбец: {2}. {3}"; + public const string NotFoundSheetTemplate = "Книга excel не содержит листа {0}"; + public const string InvalidValueTemplate = "Лист: {0}, Строка: {1}, Столбец: {2}. Содержит некорректное значение"; + + public static IXLWorksheet GetWorksheet(this IXLWorkbook workbook, string sheetName) => + workbook.Worksheets.FirstOrDefault(ws => string.Equals(ws.Name.Trim(), sheetName.Trim(), StringComparison.CurrentCultureIgnoreCase)) + ?? throw new FileFormatException(string.Format(NotFoundSheetTemplate, sheetName)); public static IXLCell SetCellValue(this IXLCell cell, T value, string? format = null) { @@ -21,12 +21,12 @@ public static class XLExtentions { cell.Style.DateFormat.Format = format ?? "DD.MM.YYYY HH:MM:SS"; - if (value is DateTimeOffset dateTimeOffset) - { - cell.Value = XLCellValue.FromObject(dateTimeOffset.DateTime); - return cell; - } - } + if (value is DateTimeOffset dateTimeOffset) + { + cell.Value = XLCellValue.FromObject(dateTimeOffset.DateTime); + return cell; + } + } cell.Value = XLCellValue.FromObject(value); @@ -47,12 +47,12 @@ public static class XLExtentions if (cell.IsEmpty() && default(T) == null) return default; - return cell.GetValue(); - } - catch - { - var message = string.Format(InvalidValueTemplate, cell.Worksheet.Name, cell.Address.RowNumber, cell.Address.ColumnNumber); - throw new FileFormatException(message); - } - } + return cell.GetValue(); + } + catch + { + var message = string.Format(InvalidValueTemplate, cell.Worksheet.Name, cell.Address.RowNumber, cell.Address.ColumnNumber); + throw new FileFormatException(message); + } + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/ApiTokenHelper.cs b/AsbCloudWebApi.IntegrationTests/ApiTokenHelper.cs index 2e4e5dc0..ad66a5ee 100644 --- a/AsbCloudWebApi.IntegrationTests/ApiTokenHelper.cs +++ b/AsbCloudWebApi.IntegrationTests/ApiTokenHelper.cs @@ -8,43 +8,43 @@ namespace AsbCloudWebApi.IntegrationTests; public static class ApiTokenHelper { - public static string GetAdminUserToken() - { - var user = new User() - { - Id = 1, - IdCompany = 1, - Login = "test_user" - }; - var roles = new[] { "root" }; + public static string GetAdminUserToken() + { + var user = new User() + { + Id = 1, + IdCompany = 1, + Login = "test_user" + }; + var roles = new[] { "root" }; - return CreateToken(user, roles); - } + return CreateToken(user, roles); + } - private static string CreateToken(User user, IEnumerable roles) - { - var claims = new List - { - new("id", user.Id.ToString()), - new(ClaimsIdentity.DefaultNameClaimType, user.Login), - new("idCompany", user.IdCompany.ToString()), - }; + private static string CreateToken(User user, IEnumerable roles) + { + var claims = new List + { + new("id", user.Id.ToString()), + new(ClaimsIdentity.DefaultNameClaimType, user.Login), + new("idCompany", user.IdCompany.ToString()), + }; - claims.AddRange(roles.Select(role => new Claim(ClaimTypes.Role, role))); + claims.AddRange(roles.Select(role => new Claim(ClaimTypes.Role, role))); - const string secret = "супер секретный ключ для шифрования"; + const string secret = "супер секретный ключ для шифрования"; - var key = Encoding.ASCII.GetBytes(secret); - var tokenDescriptor = new SecurityTokenDescriptor - { - Issuer = "a", - Audience = "a", - Subject = new ClaimsIdentity(claims), - Expires = DateTime.UtcNow.AddHours(1), - SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature) - }; - var tokenHandler = new JwtSecurityTokenHandler(); - var token = tokenHandler.CreateToken(tokenDescriptor); - return tokenHandler.WriteToken(token); - } + var key = Encoding.ASCII.GetBytes(secret); + var tokenDescriptor = new SecurityTokenDescriptor + { + Issuer = "a", + Audience = "a", + Subject = new ClaimsIdentity(claims), + Expires = DateTime.UtcNow.AddHours(1), + SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature) + }; + var tokenHandler = new JwtSecurityTokenHandler(); + var token = tokenHandler.CreateToken(tokenDescriptor); + return tokenHandler.WriteToken(token); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/AssemblyExtensions.cs b/AsbCloudWebApi.IntegrationTests/AssemblyExtensions.cs index d4013aa1..cf2b7803 100644 --- a/AsbCloudWebApi.IntegrationTests/AssemblyExtensions.cs +++ b/AsbCloudWebApi.IntegrationTests/AssemblyExtensions.cs @@ -4,22 +4,22 @@ namespace AsbCloudWebApi.IntegrationTests; internal static class AssemblyExtensions { - internal static Stream GetFileCopyStream(this Assembly assembly, string templateName) - { - var resourceName = assembly - .GetManifestResourceNames() - .FirstOrDefault(n => n.EndsWith(templateName)); + internal static Stream GetFileCopyStream(this Assembly assembly, string templateName) + { + var resourceName = assembly + .GetManifestResourceNames() + .FirstOrDefault(n => n.EndsWith(templateName)); - if (string.IsNullOrWhiteSpace(resourceName)) - throw new ArgumentNullException(nameof(resourceName)); + if (string.IsNullOrWhiteSpace(resourceName)) + throw new ArgumentNullException(nameof(resourceName)); - using var stream = Assembly.GetExecutingAssembly() - .GetManifestResourceStream(resourceName); + using var stream = Assembly.GetExecutingAssembly() + .GetManifestResourceStream(resourceName); - var memoryStream = new MemoryStream(); - stream?.CopyTo(memoryStream); - memoryStream.Position = 0; + var memoryStream = new MemoryStream(); + stream?.CopyTo(memoryStream); + memoryStream.Position = 0; - return memoryStream; - } + return memoryStream; + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/BaseIntegrationTest.cs b/AsbCloudWebApi.IntegrationTests/BaseIntegrationTest.cs index aeaab07f..43166ea7 100644 --- a/AsbCloudWebApi.IntegrationTests/BaseIntegrationTest.cs +++ b/AsbCloudWebApi.IntegrationTests/BaseIntegrationTest.cs @@ -5,22 +5,22 @@ using Xunit; namespace AsbCloudWebApi.IntegrationTests; public abstract class BaseIntegrationTest : IClassFixture, - IDisposable + IDisposable { - protected readonly IServiceScope scope; + protected readonly IServiceScope scope; - protected readonly AsbCloudDbContext dbContext; + protected readonly AsbCloudDbContext dbContext; - protected BaseIntegrationTest(WebAppFactoryFixture factory) - { - scope = factory.Services.CreateScope(); - - dbContext = scope.ServiceProvider.GetRequiredService(); - } + protected BaseIntegrationTest(WebAppFactoryFixture factory) + { + scope = factory.Services.CreateScope(); + + dbContext = scope.ServiceProvider.GetRequiredService(); + } - public void Dispose() - { - scope.Dispose(); - dbContext.Dispose(); - } + public void Dispose() + { + scope.Dispose(); + dbContext.Dispose(); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Clients/IAdminDepositClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/IAdminDepositClient.cs index bd47235b..7cb21cc6 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/IAdminDepositClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/IAdminDepositClient.cs @@ -5,23 +5,23 @@ namespace AsbCloudWebApi.IntegrationTests.Clients; public interface IAdminDepositClient { - private const string BaseRoute = "/api/admin/deposit"; + private const string BaseRoute = "/api/admin/deposit"; - [Post(BaseRoute)] - Task> InsertAsync([Body] DepositBaseDto deposit); + [Post(BaseRoute)] + Task> InsertAsync([Body] DepositBaseDto deposit); - [Post($"{BaseRoute}/range")] - Task> InsertRangeAsync([Body] IEnumerable deposits); + [Post($"{BaseRoute}/range")] + Task> InsertRangeAsync([Body] IEnumerable deposits); - [Put($"{BaseRoute}")] - Task> UpdateAsync([Body] DepositBaseDto deposit); + [Put($"{BaseRoute}")] + Task> UpdateAsync([Body] DepositBaseDto deposit); - [Get(BaseRoute + "/{id}")] - Task> GetOrDefaultAsync(int id); + [Get(BaseRoute + "/{id}")] + Task> GetOrDefaultAsync(int id); - [Get(BaseRoute)] - Task>> GetAllAsync(); - - [Delete(BaseRoute + "/{id}")] - Task> DeleteAsync(int id); + [Get(BaseRoute)] + Task>> GetAllAsync(); + + [Delete(BaseRoute + "/{id}")] + Task> DeleteAsync(int id); } diff --git a/AsbCloudWebApi.IntegrationTests/Clients/ICrudWellRelatedClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/ICrudWellRelatedClient.cs index 7f99ba5f..079af1a5 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/ICrudWellRelatedClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/ICrudWellRelatedClient.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using Refit; namespace AsbCloudWebApi.IntegrationTests.Clients; diff --git a/AsbCloudWebApi.IntegrationTests/Clients/IDetectedOperationClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/IDetectedOperationClient.cs index ecf37d37..304a96d1 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/IDetectedOperationClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/IDetectedOperationClient.cs @@ -7,17 +7,17 @@ namespace AsbCloudWebApi.IntegrationTests.Clients; public interface IDetectedOperationClient { - private const string BaseRoute = "/api/well/{idWell}/DetectedOperation"; + private const string BaseRoute = "/api/well/{idWell}/DetectedOperation"; - [Post(BaseRoute)] - Task> InsertRangeAsync(int idWell, IEnumerable dtos); + [Post(BaseRoute)] + Task> InsertRangeAsync(int idWell, IEnumerable dtos); - [Put(BaseRoute)] - Task> UpdateRangeAsync(int idWell, IEnumerable dtos); + [Put(BaseRoute)] + Task> UpdateRangeAsync(int idWell, IEnumerable dtos); - [Delete(BaseRoute)] - Task> DeleteRangeAsync(int idWell, [Body] IEnumerable ids); + [Delete(BaseRoute)] + Task> DeleteRangeAsync(int idWell, [Body] IEnumerable ids); - [Get(BaseRoute)] - Task>> GetAsync(int idWell, [Query] DetectedOperationRequest request); + [Get(BaseRoute)] + Task>> GetAsync(int idWell, [Query] DetectedOperationRequest request); } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Clients/IGtrWitsClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/IGtrWitsClient.cs index 517b98ef..fd8c957e 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/IGtrWitsClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/IGtrWitsClient.cs @@ -6,8 +6,8 @@ namespace AsbCloudWebApi.IntegrationTests.Clients; public interface IGtrWitsClient { - private const string BaseRoute = "/api/gtrWits"; + private const string BaseRoute = "/api/gtrWits"; - [Get(BaseRoute)] - Task>> GetAllAsync(int idWell, [Query] GtrRequest request); + [Get(BaseRoute)] + Task>> GetAllAsync(int idWell, [Query] GtrRequest request); } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapPlanClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapPlanClient.cs index afb8c1b1..999362c5 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapPlanClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapPlanClient.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.ProcessMaps; using Refit; diff --git a/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapPlanDrillingClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapPlanDrillingClient.cs index 59e32900..5d867a97 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapPlanDrillingClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapPlanDrillingClient.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.ProcessMaps; using AsbCloudApp.Requests; using Refit; diff --git a/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapReportDrilling.cs b/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapReportDrilling.cs index 92a4353b..428ce5f3 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapReportDrilling.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/IProcessMapReportDrilling.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.ProcessMaps; using AsbCloudApp.Data.ProcessMaps.Report; using AsbCloudApp.Requests; diff --git a/AsbCloudWebApi.IntegrationTests/Clients/ISetpointsClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/ISetpointsClient.cs index c8e6e523..23a00376 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/ISetpointsClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/ISetpointsClient.cs @@ -5,8 +5,8 @@ namespace AsbCloudWebApi.IntegrationTests.Clients; public interface ISetpointsClient { - private const string BaseRoute = "/api/telemetry/{uid}/Setpoints"; + private const string BaseRoute = "/api/telemetry/{uid}/Setpoints"; - [Get(BaseRoute)] - Task>> GetByTelemetryUidAsync(string uid); + [Get(BaseRoute)] + Task>> GetByTelemetryUidAsync(string uid); } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Clients/ISlipsTimeClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/ISlipsTimeClient.cs index a4cfd0ac..62f30ac7 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/ISlipsTimeClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/ISlipsTimeClient.cs @@ -6,8 +6,8 @@ namespace AsbCloudWebApi.IntegrationTests.Clients; public interface ISlipsTimeClient { - private const string BaseRoute = "/api/slipsStat"; + private const string BaseRoute = "/api/slipsStat"; - [Get(BaseRoute)] - Task>> GetAll([Query] OperationStatRequest request); + [Get(BaseRoute)] + Task>> GetAll([Query] OperationStatRequest request); } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Clients/ITelemetryControllerClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/ITelemetryControllerClient.cs index 94f4293e..b34d597a 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/ITelemetryControllerClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/ITelemetryControllerClient.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using Refit; namespace AsbCloudWebApi.IntegrationTests.Clients; diff --git a/AsbCloudWebApi.IntegrationTests/Clients/IWellClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/IWellClient.cs index 1e6961a5..8d19c262 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/IWellClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/IWellClient.cs @@ -5,8 +5,8 @@ namespace AsbCloudWebApi.IntegrationTests.Clients; public interface IWellClient { - private const string BaseRoute = "/api/well"; + private const string BaseRoute = "/api/well"; - [Get(BaseRoute)] - Task>> GetWellsAsync(); + [Get(BaseRoute)] + Task>> GetWellsAsync(); } diff --git a/AsbCloudWebApi.IntegrationTests/Clients/IWellOperationClient.cs b/AsbCloudWebApi.IntegrationTests/Clients/IWellOperationClient.cs index 9a9a5b7e..11f6dcd5 100644 --- a/AsbCloudWebApi.IntegrationTests/Clients/IWellOperationClient.cs +++ b/AsbCloudWebApi.IntegrationTests/Clients/IWellOperationClient.cs @@ -8,27 +8,27 @@ namespace AsbCloudWebApi.IntegrationTests.Clients; public interface IWellOperationClient { - private const string BaseRoute = "/api/well/{idWell}/wellOperations"; + private const string BaseRoute = "/api/well/{idWell}/wellOperations"; - [Post(BaseRoute + "/{deleteBeforeInsert}")] - Task> InsertRangeAsync(int idWell, - bool deleteBeforeInsert, - [Body] IEnumerable dtos); + [Post(BaseRoute + "/{deleteBeforeInsert}")] + Task> InsertRangeAsync(int idWell, + bool deleteBeforeInsert, + [Body] IEnumerable dtos); - [Put(BaseRoute)] - Task> UpdateRangeAsync(int idWell, [Body] IEnumerable dtos); + [Put(BaseRoute)] + Task> UpdateRangeAsync(int idWell, [Body] IEnumerable dtos); - [Get(BaseRoute)] - Task>> GetPageOperationsAsync(int idWell, [Query] WellOperationRequestBase request); + [Get(BaseRoute)] + Task>> GetPageOperationsAsync(int idWell, [Query] WellOperationRequestBase request); - [Multipart] - [Post(BaseRoute + "/parse/{idType}")] - Task>> ParseAsync(int idWell, - int idType, - [AliasAs("file")] StreamPart file); + [Multipart] + [Post(BaseRoute + "/parse/{idType}")] + Task>> ParseAsync(int idWell, + int idType, + [AliasAs("file")] StreamPart file); - [Get(BaseRoute + "/export")] - Task> ExportAsync(int idWell, int idType); + [Get(BaseRoute + "/export")] + Task> ExportAsync(int idWell, int idType); [Get(BaseRoute + "/template")] Task> GetTemplate(int idWell, int idType); diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/AdminDepositControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/AdminDepositControllerTest.cs index 06ce5f69..95455ff8 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/AdminDepositControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/AdminDepositControllerTest.cs @@ -9,170 +9,170 @@ namespace AsbCloudWebApi.IntegrationTests.Controllers; public class AdminDepositControllerTest : BaseIntegrationTest { - private static readonly DepositBaseDto dto = new() - { - Caption = "test", - Latitude = 90, - Longitude = 100, - Timezone = new SimpleTimezoneDto - { - Hours = 1 - } - }; + private static readonly DepositBaseDto dto = new() + { + Caption = "test", + Latitude = 90, + Longitude = 100, + Timezone = new SimpleTimezoneDto + { + Hours = 1 + } + }; - private readonly IAdminDepositClient client; + private readonly IAdminDepositClient client; - public AdminDepositControllerTest(WebAppFactoryFixture factory) - : base(factory) - { - client = factory.GetAuthorizedHttpClient(string.Empty); - } + public AdminDepositControllerTest(WebAppFactoryFixture factory) + : base(factory) + { + client = factory.GetAuthorizedHttpClient(string.Empty); + } - [Fact] - public async Task Insert_returns_success() - { - //act - var response = await client.InsertAsync(dto); + [Fact] + public async Task Insert_returns_success() + { + //act + var response = await client.InsertAsync(dto); - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.True(response.Content > 0); + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.True(response.Content > 0); - var entity = await dbContext.Deposits.FirstOrDefaultAsync(d => d.Id == response.Content); - var deposit = entity?.Adapt(); + var entity = await dbContext.Deposits.FirstOrDefaultAsync(d => d.Id == response.Content); + var deposit = entity?.Adapt(); - var excludeProps = new[] { nameof(DepositBaseDto.Id) }; - MatchHelper.Match(dto, deposit, excludeProps); - } + var excludeProps = new[] { nameof(DepositBaseDto.Id) }; + MatchHelper.Match(dto, deposit, excludeProps); + } - [Fact] - public async Task InsertRange_returns_success() - { - //act - var responce = await client.InsertRangeAsync(new[] { dto }); + [Fact] + public async Task InsertRange_returns_success() + { + //act + var responce = await client.InsertRangeAsync(new[] { dto }); - //assert - Assert.Equal(HttpStatusCode.OK, responce.StatusCode); - Assert.Equal(1, responce.Content); + //assert + Assert.Equal(HttpStatusCode.OK, responce.StatusCode); + Assert.Equal(1, responce.Content); - var entity = await dbContext.Deposits.OrderBy(d => d.Id).LastOrDefaultAsync(); - var deposit = entity?.Adapt(); + var entity = await dbContext.Deposits.OrderBy(d => d.Id).LastOrDefaultAsync(); + var deposit = entity?.Adapt(); - var excludeProps = new[] { nameof(DepositBaseDto.Id) }; - MatchHelper.Match(dto, deposit, excludeProps); - } + var excludeProps = new[] { nameof(DepositBaseDto.Id) }; + MatchHelper.Match(dto, deposit, excludeProps); + } - [Fact] - public async Task Update_returns_BadRequest_for_IdDeposit() - { - //arrange - var dtoBad = dto.Adapt(); + [Fact] + public async Task Update_returns_BadRequest_for_IdDeposit() + { + //arrange + var dtoBad = dto.Adapt(); - //act - var response = await client.UpdateAsync(dtoBad); + //act + var response = await client.UpdateAsync(dtoBad); - //assert - Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode); - } + //assert + Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode); + } - [Fact] - public async Task Update_returns_success() - { - //arrange - var insertResponse = await client.InsertAsync(dto); + [Fact] + public async Task Update_returns_success() + { + //arrange + var insertResponse = await client.InsertAsync(dto); - dto.Id = insertResponse.Content; - dto.Caption = "Test"; - dto.Latitude = 50; - dto.Longitude = 50; - dto.Timezone = new SimpleTimezoneDto - { - IsOverride = true, - Hours = 12 - }; + dto.Id = insertResponse.Content; + dto.Caption = "Test"; + dto.Latitude = 50; + dto.Longitude = 50; + dto.Timezone = new SimpleTimezoneDto + { + IsOverride = true, + Hours = 12 + }; - //act - var response = await client.UpdateAsync(dto); + //act + var response = await client.UpdateAsync(dto); - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.True(response.Content > 0); + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.True(response.Content > 0); - var entity = await dbContext.Deposits.FirstOrDefaultAsync(d => d.Id == response.Content); - var deposit = entity?.Adapt(); + var entity = await dbContext.Deposits.FirstOrDefaultAsync(d => d.Id == response.Content); + var deposit = entity?.Adapt(); - MatchHelper.Match(dto, deposit); - } + MatchHelper.Match(dto, deposit); + } - [Fact] - public async Task GetOrDefault_returns_success() - { - //arrange - var insertResponse = await client.InsertAsync(dto); - var id = insertResponse.Content; + [Fact] + public async Task GetOrDefault_returns_success() + { + //arrange + var insertResponse = await client.InsertAsync(dto); + var id = insertResponse.Content; - //act - var response = await client.GetOrDefaultAsync(id); + //act + var response = await client.GetOrDefaultAsync(id); - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.NotNull(response.Content); + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.NotNull(response.Content); - var deposit = response.Content; + var deposit = response.Content; - var excludeProps = new[] { nameof(DepositBaseDto.Id) }; - MatchHelper.Match(dto, deposit, excludeProps); - } + var excludeProps = new[] { nameof(DepositBaseDto.Id) }; + MatchHelper.Match(dto, deposit, excludeProps); + } - [Fact] - public async Task GetOrDefault_returns_NoContent_for_IdDeposit() - { - //act - var responce = await client.GetOrDefaultAsync(0); + [Fact] + public async Task GetOrDefault_returns_NoContent_for_IdDeposit() + { + //act + var responce = await client.GetOrDefaultAsync(0); - //assert - Assert.Equal(HttpStatusCode.NoContent, responce.StatusCode); - } + //assert + Assert.Equal(HttpStatusCode.NoContent, responce.StatusCode); + } - [Fact] - public async Task GetAll_returns_success() - { - //act - var response = await client.GetAllAsync(); + [Fact] + public async Task GetAll_returns_success() + { + //act + var response = await client.GetAllAsync(); - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.NotNull(response.Content); + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.NotNull(response.Content); - var expectedCount = await dbContext.Deposits.CountAsync(); - Assert.Equal(expectedCount, response.Content.Count()); - } + var expectedCount = await dbContext.Deposits.CountAsync(); + Assert.Equal(expectedCount, response.Content.Count()); + } - [Fact] - public async Task Delete_returns_success() - { - //arrange - var insertResponse = await client.InsertAsync(dto); - var id = insertResponse.Content; + [Fact] + public async Task Delete_returns_success() + { + //arrange + var insertResponse = await client.InsertAsync(dto); + var id = insertResponse.Content; - //act - var response = await client.DeleteAsync(id); + //act + var response = await client.DeleteAsync(id); - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.True(response.Content > 0); + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.True(response.Content > 0); - var entity = await dbContext.Deposits.FirstOrDefaultAsync(d => d.Id == dto.Id); - Assert.Null(entity); - } + var entity = await dbContext.Deposits.FirstOrDefaultAsync(d => d.Id == dto.Id); + Assert.Null(entity); + } - [Fact] - public async Task Delete_returns_NoContent_IdDeposit() - { - //act - var response = await client.DeleteAsync(0); + [Fact] + public async Task Delete_returns_NoContent_IdDeposit() + { + //act + var response = await client.DeleteAsync(0); - //assert - Assert.Equal(HttpStatusCode.NoContent, response.StatusCode); - } + //assert + Assert.Equal(HttpStatusCode.NoContent, response.StatusCode); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/DetectedOperationControllerTests.cs b/AsbCloudWebApi.IntegrationTests/Controllers/DetectedOperationControllerTests.cs index 7b8a08a9..01a350b9 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/DetectedOperationControllerTests.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/DetectedOperationControllerTests.cs @@ -13,167 +13,167 @@ namespace AsbCloudWebApi.IntegrationTests.Controllers; public class DetectedOperationControllerTests : BaseIntegrationTest { - private readonly IDetectedOperationClient client; + private readonly IDetectedOperationClient client; - private readonly DetectedOperationDto dto = new() - { - IdCategory = WellOperationCategory.IdRotor, - DateStart = new DateTimeOffset(new DateTime(2023, 5, 12, 1,0,0, DateTimeKind.Utc)), - DateEnd = new DateTimeOffset(new DateTime(2023, 5, 12, 1,0,0, DateTimeKind.Utc)), - DepthStart = 0, - DepthEnd = 80, - OperationCategory = new WellOperationCategoryDto - { - Id = WellOperationCategory.IdRotor, - IdParent = WellOperationCategory.IdDrilling, - Name = "Бурение ротором" - }, - EnabledSubsystems = new EnabledSubsystems - { - IsAutoRotor = true - }, - Value = 400, - }; + private readonly DetectedOperationDto dto = new() + { + IdCategory = WellOperationCategory.IdRotor, + DateStart = new DateTimeOffset(new DateTime(2023, 5, 12, 1,0,0, DateTimeKind.Utc)), + DateEnd = new DateTimeOffset(new DateTime(2023, 5, 12, 1,0,0, DateTimeKind.Utc)), + DepthStart = 0, + DepthEnd = 80, + OperationCategory = new WellOperationCategoryDto + { + Id = WellOperationCategory.IdRotor, + IdParent = WellOperationCategory.IdDrilling, + Name = "Бурение ротором" + }, + EnabledSubsystems = new EnabledSubsystems + { + IsAutoRotor = true + }, + Value = 400, + }; - public DetectedOperationControllerTests(WebAppFactoryFixture factory) - : base(factory) - { - client = factory.GetAuthorizedHttpClient(string.Empty); + public DetectedOperationControllerTests(WebAppFactoryFixture factory) + : base(factory) + { + client = factory.GetAuthorizedHttpClient(string.Empty); - dbContext.CleanupDbSet(); - } + dbContext.CleanupDbSet(); + } - [Fact] - public async Task InsertRangeAsync_returns_success() - { - //arrange - var well = dbContext.Wells.First(); - dto.IdTelemetry = well.IdTelemetry!.Value; + [Fact] + public async Task InsertRangeAsync_returns_success() + { + //arrange + var well = dbContext.Wells.First(); + dto.IdTelemetry = well.IdTelemetry!.Value; - //act - var response = await client.InsertRangeAsync(well.Id, new[] { dto }); + //act + var response = await client.InsertRangeAsync(well.Id, new[] { dto }); - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(1, response.Content); - } + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(1, response.Content); + } - [Fact] - public async Task UpdateRangeAsync_returns_success() - { - //arrange - var well = dbContext.Wells.First(); - dto.IdTelemetry = well.IdTelemetry!.Value; + [Fact] + public async Task UpdateRangeAsync_returns_success() + { + //arrange + var well = dbContext.Wells.First(); + dto.IdTelemetry = well.IdTelemetry!.Value; - var entity = dto.Adapt(); - dbContext.DetectedOperations.Add(entity); - await dbContext.SaveChangesAsync(); - dto.Id = entity.Id; + var entity = dto.Adapt(); + dbContext.DetectedOperations.Add(entity); + await dbContext.SaveChangesAsync(); + dto.Id = entity.Id; - //act - var response = await client.UpdateRangeAsync(well.Id, new[] { dto }); + //act + var response = await client.UpdateRangeAsync(well.Id, new[] { dto }); - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(1, response.Content); - } + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(1, response.Content); + } - [Fact] - public async Task UpdateRangeAsync_returns_bad_request_when_id_is_invalid() - { - //arrange - var well = dbContext.Wells.First(); + [Fact] + public async Task UpdateRangeAsync_returns_bad_request_when_id_is_invalid() + { + //arrange + var well = dbContext.Wells.First(); - //act - var response = await client.UpdateRangeAsync(well.Id, new[] { dto }); + //act + var response = await client.UpdateRangeAsync(well.Id, new[] { dto }); - //assert - Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode); - } + //assert + Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode); + } - [Fact] - public async Task DeleteRangeAsync_returns_success() - { - //arrange - var well = dbContext.Wells.First(); - dto.IdTelemetry = well.IdTelemetry!.Value; + [Fact] + public async Task DeleteRangeAsync_returns_success() + { + //arrange + var well = dbContext.Wells.First(); + dto.IdTelemetry = well.IdTelemetry!.Value; - var entity = dto.Adapt(); - dbContext.DetectedOperations.Add(entity); - await dbContext.SaveChangesAsync(); + var entity = dto.Adapt(); + dbContext.DetectedOperations.Add(entity); + await dbContext.SaveChangesAsync(); - var ids = await dbContext.DetectedOperations.Select(d => d.Id).ToArrayAsync(); + var ids = await dbContext.DetectedOperations.Select(d => d.Id).ToArrayAsync(); - //act - var response = await client.DeleteRangeAsync(well.Id, ids); + //act + var response = await client.DeleteRangeAsync(well.Id, ids); - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Equal(1, response.Content); - } + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.Equal(1, response.Content); + } - [Fact] - public async Task GetAsync_returns_first_page() - { - //arrange - const int pageSize = 10; - const int pageIndex = 0; + [Fact] + public async Task GetAsync_returns_first_page() + { + //arrange + const int pageSize = 10; + const int pageIndex = 0; - var request = new DetectedOperationRequest - { - Skip = pageIndex, - Take = pageSize, - IdsCategories = new[] { dto.IdCategory } - }; + var request = new DetectedOperationRequest + { + Skip = pageIndex, + Take = pageSize, + IdsCategories = new[] { dto.IdCategory } + }; - var well = dbContext.Wells.First(); - dto.IdTelemetry = well.IdTelemetry!.Value; - - var entity = dto.Adapt(); - dbContext.DetectedOperations.Add(entity); - await dbContext.SaveChangesAsync(); + var well = dbContext.Wells.First(); + dto.IdTelemetry = well.IdTelemetry!.Value; + + var entity = dto.Adapt(); + dbContext.DetectedOperations.Add(entity); + await dbContext.SaveChangesAsync(); - //act - var response = await client.GetAsync(well.Id, request); + //act + var response = await client.GetAsync(well.Id, request); - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.NotNull(response.Content); + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.NotNull(response.Content); - var totalExpected = response.Content.Count - pageSize * pageIndex; + var totalExpected = response.Content.Count - pageSize * pageIndex; - Assert.Equal(totalExpected, response.Content.Items.Count()); - } - - [Fact] - public async Task GetAsync_returns_first_operation() - { - //arrange - var well = dbContext.Wells.First(); - dto.IdTelemetry = well.IdTelemetry!.Value; - - var entity = dto.Adapt(); - dbContext.DetectedOperations.Add(entity); - await dbContext.SaveChangesAsync(); + Assert.Equal(totalExpected, response.Content.Items.Count()); + } + + [Fact] + public async Task GetAsync_returns_first_operation() + { + //arrange + var well = dbContext.Wells.First(); + dto.IdTelemetry = well.IdTelemetry!.Value; + + var entity = dto.Adapt(); + dbContext.DetectedOperations.Add(entity); + await dbContext.SaveChangesAsync(); - var request = new DetectedOperationRequest - { - IdsCategories = new[] { dto.IdCategory } - }; - - //act - var response = await client.GetAsync(well.Id, request); - - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.NotNull(response.Content); + var request = new DetectedOperationRequest + { + IdsCategories = new[] { dto.IdCategory } + }; + + //act + var response = await client.GetAsync(well.Id, request); + + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.NotNull(response.Content); - var firstOperation = response.Content.Items.ElementAt(0); - - Assert.Equal(well.IdTelemetry, firstOperation.IdTelemetry); - Assert.Equal(dto.EnabledSubsystems, firstOperation.EnabledSubsystems); - Assert.Equal(dto.DateStart.ToOffset(TimeSpan.FromHours(Defaults.Timezone.Hours)), firstOperation.DateStart); - Assert.Equal(dto.DateEnd.ToOffset(TimeSpan.FromHours(Defaults.Timezone.Hours)), firstOperation.DateEnd); - } + var firstOperation = response.Content.Items.ElementAt(0); + + Assert.Equal(well.IdTelemetry, firstOperation.IdTelemetry); + Assert.Equal(dto.EnabledSubsystems, firstOperation.EnabledSubsystems); + Assert.Equal(dto.DateStart.ToOffset(TimeSpan.FromHours(Defaults.Timezone.Hours)), firstOperation.DateStart); + Assert.Equal(dto.DateEnd.ToOffset(TimeSpan.FromHours(Defaults.Timezone.Hours)), firstOperation.DateEnd); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/DrillControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/DrillControllerTest.cs index ed15f095..17ac9ab7 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/DrillControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/DrillControllerTest.cs @@ -7,22 +7,22 @@ namespace AsbCloudWebApi.IntegrationTests.Controllers; public class DrillerControllerTest : BaseIntegrationTest { - private readonly IDrillerClient client; + private readonly IDrillerClient client; - public DrillerControllerTest(WebAppFactoryFixture factory) - : base(factory) - { - client = factory.GetAuthorizedHttpClient(string.Empty); + public DrillerControllerTest(WebAppFactoryFixture factory) + : base(factory) + { + client = factory.GetAuthorizedHttpClient(string.Empty); dbContext.CleanupDbSet(); dbContext.CleanupDbSet(); - } + } - [Fact] - public async Task GetByWellIds_returns_success() - { + [Fact] + public async Task GetByWellIds_returns_success() + { //arrange - var well1 = CreateWellAsync(2); + var well1 = CreateWellAsync(2); var well2 = CreateWellAsync(3); var well3 = CreateWellAsync(4); dbContext.Wells.Add(well1); @@ -52,14 +52,14 @@ public class DrillerControllerTest : BaseIntegrationTest Assert.Equal(3, response.Content.Count()); } - private static Schedule CreateScheduleAsync(int idWell, Driller driller) => new() - { - IdWell = idWell, - ShiftStart = new TimeOnly(8, 0, 0), - ShiftEnd = new TimeOnly(20, 0, 0), - DrillStart = new DateTimeOffset(new DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc)), - DrillEnd = new DateTimeOffset(new DateTime(2024, 2, 1, 0, 0, 0, DateTimeKind.Utc)), - Driller = driller + private static Schedule CreateScheduleAsync(int idWell, Driller driller) => new() + { + IdWell = idWell, + ShiftStart = new TimeOnly(8, 0, 0), + ShiftEnd = new TimeOnly(20, 0, 0), + DrillStart = new DateTimeOffset(new DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc)), + DrillEnd = new DateTimeOffset(new DateTime(2024, 2, 1, 0, 0, 0, DateTimeKind.Utc)), + Driller = driller }; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/GtrControllerTests.cs b/AsbCloudWebApi.IntegrationTests/Controllers/GtrControllerTests.cs index e951c13e..e8f7b548 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/GtrControllerTests.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/GtrControllerTests.cs @@ -8,61 +8,61 @@ namespace AsbCloudWebApi.IntegrationTests.Controllers; public class GtrControllerTests : BaseIntegrationTest { - private readonly IGtrWitsClient client; + private readonly IGtrWitsClient client; - public GtrControllerTests(WebAppFactoryFixture factory) - : base(factory) - { - client = factory.GetAuthorizedHttpClient(string.Empty); - } + public GtrControllerTests(WebAppFactoryFixture factory) + : base(factory) + { + client = factory.GetAuthorizedHttpClient(string.Empty); + } - [Fact] - public async Task GetAll_returns_success() - { - //arrange - var well = dbContext.Wells.First(); - - var witsItems = CreateWitsItems(well.IdTelemetry!.Value); - dbContext.WitsItemFloat.AddRange(witsItems); - await dbContext.SaveChangesAsync(); - - var request = new GtrRequest(); - - //act - var response = await client.GetAllAsync(well.Id, request); + [Fact] + public async Task GetAll_returns_success() + { + //arrange + var well = dbContext.Wells.First(); + + var witsItems = CreateWitsItems(well.IdTelemetry!.Value); + dbContext.WitsItemFloat.AddRange(witsItems); + await dbContext.SaveChangesAsync(); + + var request = new GtrRequest(); + + //act + var response = await client.GetAllAsync(well.Id, request); - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.NotNull(response.Content); - Assert.True(response.Content.Any()); - } + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.NotNull(response.Content); + Assert.True(response.Content.Any()); + } - private static IEnumerable CreateWitsItems(int idTelemetry) => - new[] - { - new WitsItemFloat - { - IdRecord = 1, - IdItem = 14, - Value = 4, - IdTelemetry = idTelemetry, - DateTime = DateTimeOffset.UtcNow - }, - new WitsItemFloat - { - IdRecord = 1, - IdItem = 14, - Value = 5, - IdTelemetry = idTelemetry, - DateTime = DateTimeOffset.UtcNow - }, - new WitsItemFloat - { - IdRecord = 1, - IdItem = 12, - Value = 5, - IdTelemetry = idTelemetry, - DateTime = DateTimeOffset.UtcNow.AddSeconds(10) - } - }; + private static IEnumerable CreateWitsItems(int idTelemetry) => + new[] + { + new WitsItemFloat + { + IdRecord = 1, + IdItem = 14, + Value = 4, + IdTelemetry = idTelemetry, + DateTime = DateTimeOffset.UtcNow + }, + new WitsItemFloat + { + IdRecord = 1, + IdItem = 14, + Value = 5, + IdTelemetry = idTelemetry, + DateTime = DateTimeOffset.UtcNow + }, + new WitsItemFloat + { + IdRecord = 1, + IdItem = 12, + Value = 5, + IdTelemetry = idTelemetry, + DateTime = DateTimeOffset.UtcNow.AddSeconds(10) + } + }; } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanAntiCrashRotationControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanAntiCrashRotationControllerTest.cs index b2b72f9a..1a9237e8 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanAntiCrashRotationControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanAntiCrashRotationControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Functions; using AsbCloudDb.Model.ProcessMapPlan.Functions; using AsbCloudWebApi.IntegrationTests; using AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanAutoHoldTFControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanAutoHoldTFControllerTest.cs index 5ed9a6a9..48bcee90 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanAutoHoldTFControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanAutoHoldTFControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Functions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanDamperControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanDamperControllerTest.cs index fb174196..343f12f3 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanDamperControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanDamperControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanDrillTestControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanDrillTestControllerTest.cs index 3d6eb0ff..6aaf4445 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanDrillTestControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanDrillTestControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanOscillationControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanOscillationControllerTest.cs index 860904e1..4efd40e1 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanOscillationControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanOscillationControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanShockTestControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanShockTestControllerTest.cs index 3a0f8994..401efdfb 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanShockTestControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanShockTestControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanStaticMeasurementOutputControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanStaticMeasurementOutputControllerTest.cs index 589ab64a..99bd0aa3 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanStaticMeasurementOutputControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanStaticMeasurementOutputControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanUpdatingNoloadParametersControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanUpdatingNoloadParametersControllerTest.cs index 5e995aef..9234c4f0 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanUpdatingNoloadParametersControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Functions/ProcessMapPlanUpdatingNoloadParametersControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanLoadCapacityControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanLoadCapacityControllerTest.cs index fede306e..8bae7ed4 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanLoadCapacityControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanLoadCapacityControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanOscillationAnglesControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanOscillationAnglesControllerTest.cs index 3cbb7cb7..2fd82df0 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanOscillationAnglesControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanOscillationAnglesControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanPositioningOffTheBottomControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanPositioningOffTheBottomControllerTest.cs index c2df1072..dcd46abd 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanPositioningOffTheBottomControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanPositioningOffTheBottomControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanReamingRotorControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanReamingRotorControllerTest.cs index c2f884ca..3a97aa70 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanReamingRotorControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanReamingRotorControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanReamingSlideControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanReamingSlideControllerTest.cs index d9ab7862..c97a436c 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanReamingSlideControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanReamingSlideControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRecordingStaticMeasurementControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRecordingStaticMeasurementControllerTest.cs index b8f59b6f..d42a8b78 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRecordingStaticMeasurementControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRecordingStaticMeasurementControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorControllerTest.cs index 57e80efc..ff117690 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudDb.Model.ProcessMapPlan.Operations; using DocumentFormat.OpenXml.Drawing.Charts; using Mapster; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorRpmAccelerationControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorRpmAccelerationControllerTest.cs index 35fc0cf5..23bb7722 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorRpmAccelerationControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanRotorRpmAccelerationControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudDb.Model.ProcessMapPlan.Operations; using Microsoft.EntityFrameworkCore; using Xunit; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSlideControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSlideControllerTest.cs index 5aa98c9c..389cc8a3 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSlideControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSlideControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudDb.Model.ProcessMapPlan.Operations; using Mapster; using Microsoft.EntityFrameworkCore; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSwitchingOffThePumpControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSwitchingOffThePumpControllerTest.cs index 11768e47..ecd63831 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSwitchingOffThePumpControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSwitchingOffThePumpControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSwitchingToTheModeControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSwitchingToTheModeControllerTest.cs index 73dcd1c1..b1b61629 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSwitchingToTheModeControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanSwitchingToTheModeControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudDb.Model.ProcessMapPlan.Operations; using AsbCloudWebApi.IntegrationTests; using AsbCloudWebApi.IntegrationTests.Controllers.ProcessMapPlan; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanTFOrientationControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanTFOrientationControllerTest.cs index 7bccad24..1f3d34e1 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanTFOrientationControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/Operations/ProcessMapPlanTFOrientationControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.ProcessMapPlan.Export; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanBaseControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanBaseControllerTest.cs index 5bc647c5..ef386a27 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanBaseControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapPlanBaseControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.ProcessMaps; using AsbCloudApp.Data.User; using AsbCloudApp.Requests; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapReportDrillingControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapReportDrillingControllerTest.cs index faa6a4b5..125852f6 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapReportDrillingControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ProcessMapPlan/ProcessMapReportDrillingControllerTest.cs @@ -1,4 +1,4 @@ -//using AsbCloudApp.Requests; +//using AsbCloudApp.Requests; //using AsbCloudDb.Model; //using AsbCloudDb.Model.ProcessMaps; //using AsbCloudWebApi.IntegrationTests.Clients; @@ -10,247 +10,247 @@ //public class ProcessMapReportDrillingControllerTest : BaseIntegrationTest //{ -// private IProcessMapReportDrilling client; +// private IProcessMapReportDrilling client; -// public ProcessMapReportDrillingControllerTest(WebAppFactoryFixture factory) -// : base(factory) -// { -// dbContext.CleanupDbSet(); -// dbContext.CleanupDbSet(); -// client = factory.GetAuthorizedHttpClient(string.Empty); -// } +// public ProcessMapReportDrillingControllerTest(WebAppFactoryFixture factory) +// : base(factory) +// { +// dbContext.CleanupDbSet(); +// dbContext.CleanupDbSet(); +// client = factory.GetAuthorizedHttpClient(string.Empty); +// } -// [Fact] -// public async Task Get_rtk_report_by_default_request_returns_success() -// { -// //arrange -// var well = dbContext.Wells.First(); +// [Fact] +// public async Task Get_rtk_report_by_default_request_returns_success() +// { +// //arrange +// var well = dbContext.Wells.First(); -// var processMapPlanDrilling = CreateProcessMapPlanDrilling(well.Id); -// dbContext.ProcessMapPlanDrilling.Add(processMapPlanDrilling); +// var processMapPlanDrilling = CreateProcessMapPlanDrilling(well.Id); +// dbContext.ProcessMapPlanDrilling.Add(processMapPlanDrilling); -// var wellOperation = CreateWellOperation(well.Id); -// dbContext.WellOperations.Add(wellOperation); +// var wellOperation = CreateWellOperation(well.Id); +// dbContext.WellOperations.Add(wellOperation); -// var dataSaubStats = CreateDataSaubStats(well.IdTelemetry!.Value, wellOperation.IdCategory); -// dbContext.DataSaubStat.AddRange(dataSaubStats); +// var dataSaubStats = CreateDataSaubStats(well.IdTelemetry!.Value, wellOperation.IdCategory); +// dbContext.DataSaubStat.AddRange(dataSaubStats); -// await dbContext.SaveChangesAsync(); +// await dbContext.SaveChangesAsync(); -// //act -// var request = new DataSaubStatRequest(); -// var response = await client.GetReportAsync(well.Id, request, CancellationToken.None); +// //act +// var request = new DataSaubStatRequest(); +// var response = await client.GetReportAsync(well.Id, request, CancellationToken.None); -// //assert -// Assert.Equal(HttpStatusCode.OK, response.StatusCode); -// Assert.NotNull(response.Content); -// Assert.Equal(dataSaubStats.Count() - 1, response.Content.Count()); -// } +// //assert +// Assert.Equal(HttpStatusCode.OK, response.StatusCode); +// Assert.NotNull(response.Content); +// Assert.Equal(dataSaubStats.Count() - 1, response.Content.Count()); +// } -// [Fact] -// public async Task Get_rtk_report_by_parametrize_request_returns_success() -// { -// //arrange -// var well = dbContext.Wells.First(); +// [Fact] +// public async Task Get_rtk_report_by_parametrize_request_returns_success() +// { +// //arrange +// var well = dbContext.Wells.First(); -// var processMapPlanDrilling = CreateProcessMapPlanDrilling(well.Id); -// dbContext.ProcessMapPlanDrilling.Add(processMapPlanDrilling); +// var processMapPlanDrilling = CreateProcessMapPlanDrilling(well.Id); +// dbContext.ProcessMapPlanDrilling.Add(processMapPlanDrilling); -// var wellOperation = CreateWellOperation(well.Id); -// dbContext.WellOperations.Add(wellOperation); +// var wellOperation = CreateWellOperation(well.Id); +// dbContext.WellOperations.Add(wellOperation); -// var dataSaubStats = CreateDataSaubStats(well.IdTelemetry!.Value, wellOperation.IdCategory); -// dbContext.DataSaubStat.AddRange(dataSaubStats); +// var dataSaubStats = CreateDataSaubStats(well.IdTelemetry!.Value, wellOperation.IdCategory); +// dbContext.DataSaubStat.AddRange(dataSaubStats); -// await dbContext.SaveChangesAsync(); - -// var request = new DataSaubStatRequest -// { -// DeltaAxialLoad = 5, -// DeltaPressure = 15, -// DeltaRotorTorque = 10 -// }; - -// //act -// var response = await client.GetReportAsync(well.Id, request, CancellationToken.None); - -// //assert -// Assert.Equal(HttpStatusCode.OK, response.StatusCode); -// Assert.NotNull(response.Content); -// Assert.Single(response.Content); -// } - -// [Fact] -// public async Task Get_rtk_report_returns_BadRequest() -// { -// //act -// var request = new DataSaubStatRequest() -// { -// DeltaAxialLoad = 15, -// DeltaPressure = 25, -// DeltaRotorTorque = 20 -// }; -// var response = await client.GetReportAsync(0, request, CancellationToken.None); - -// //assert -// Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode); -// } - -// [Fact] -// public async Task Export_rtk_report_returns_success() -// { -// //arrange -// var well = dbContext.Wells.First(); +// await dbContext.SaveChangesAsync(); + +// var request = new DataSaubStatRequest +// { +// DeltaAxialLoad = 5, +// DeltaPressure = 15, +// DeltaRotorTorque = 10 +// }; + +// //act +// var response = await client.GetReportAsync(well.Id, request, CancellationToken.None); + +// //assert +// Assert.Equal(HttpStatusCode.OK, response.StatusCode); +// Assert.NotNull(response.Content); +// Assert.Single(response.Content); +// } + +// [Fact] +// public async Task Get_rtk_report_returns_BadRequest() +// { +// //act +// var request = new DataSaubStatRequest() +// { +// DeltaAxialLoad = 15, +// DeltaPressure = 25, +// DeltaRotorTorque = 20 +// }; +// var response = await client.GetReportAsync(0, request, CancellationToken.None); + +// //assert +// Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode); +// } + +// [Fact] +// public async Task Export_rtk_report_returns_success() +// { +// //arrange +// var well = dbContext.Wells.First(); -// var processMapPlanDrilling = CreateProcessMapPlanDrilling(well.Id); -// dbContext.ProcessMapPlanDrilling.Add(processMapPlanDrilling); +// var processMapPlanDrilling = CreateProcessMapPlanDrilling(well.Id); +// dbContext.ProcessMapPlanDrilling.Add(processMapPlanDrilling); -// var wellOperation = CreateWellOperation(well.Id); -// dbContext.WellOperations.Add(wellOperation); +// var wellOperation = CreateWellOperation(well.Id); +// dbContext.WellOperations.Add(wellOperation); -// var dataSaubStats = CreateDataSaubStats(well.IdTelemetry!.Value, wellOperation.IdCategory); -// dbContext.DataSaubStat.AddRange(dataSaubStats); +// var dataSaubStats = CreateDataSaubStats(well.IdTelemetry!.Value, wellOperation.IdCategory); +// dbContext.DataSaubStat.AddRange(dataSaubStats); -// await dbContext.SaveChangesAsync(); - -// //act -// var request = new DataSaubStatRequest(); -// var response = await client.ExportReportAsync(1, request, CancellationToken.None); - -// //assert -// Assert.Equal(HttpStatusCode.OK, response.StatusCode); -// Assert.Equal("application/octet-stream", response.ContentHeaders?.ContentType?.MediaType); -// Assert.True(response.ContentHeaders?.ContentLength > 0); -// } +// await dbContext.SaveChangesAsync(); + +// //act +// var request = new DataSaubStatRequest(); +// var response = await client.ExportReportAsync(1, request, CancellationToken.None); + +// //assert +// Assert.Equal(HttpStatusCode.OK, response.StatusCode); +// Assert.Equal("application/octet-stream", response.ContentHeaders?.ContentType?.MediaType); +// Assert.True(response.ContentHeaders?.ContentLength > 0); +// } -// private static WellOperation CreateWellOperation(int idWell) => -// new() -// { -// CategoryInfo = "CategoryInfo", -// Comment = "Comment", -// DateStart = DateTimeOffset.UtcNow, -// DepthEnd = 1, -// DepthStart = 0.6, -// DurationHours = 10, -// IdCategory = WellOperationCategory.IdSlide, -// IdPlan = null, -// IdType = WellOperation.IdOperationTypeFact, -// IdUser = 1, -// IdWell = idWell, -// IdWellSectionType = 1, -// LastUpdateDate = DateTimeOffset.UtcNow -// }; +// private static WellOperation CreateWellOperation(int idWell) => +// new() +// { +// CategoryInfo = "CategoryInfo", +// Comment = "Comment", +// DateStart = DateTimeOffset.UtcNow, +// DepthEnd = 1, +// DepthStart = 0.6, +// DurationHours = 10, +// IdCategory = WellOperationCategory.IdSlide, +// IdPlan = null, +// IdType = WellOperation.IdOperationTypeFact, +// IdUser = 1, +// IdWell = idWell, +// IdWellSectionType = 1, +// LastUpdateDate = DateTimeOffset.UtcNow +// }; -// private static ProcessMapPlanDrilling CreateProcessMapPlanDrilling(int idWell) => -// new() -// { -// IdAuthor = 1, -// IdEditor = null, -// Creation = DateTimeOffset.UtcNow, -// Obsolete = null, -// IdState = ChangeLogAbstract.IdStateActual, -// IdPrevious = null, +// private static ProcessMapPlanDrilling CreateProcessMapPlanDrilling(int idWell) => +// new() +// { +// IdAuthor = 1, +// IdEditor = null, +// Creation = DateTimeOffset.UtcNow, +// Obsolete = null, +// IdState = ChangeLogAbstract.IdStateActual, +// IdPrevious = null, -// IdWell = idWell, -// IdWellSectionType = 1, -// DepthStart = 0.5, -// DepthEnd = 1.5, +// IdWell = idWell, +// IdWellSectionType = 1, +// DepthStart = 0.5, +// DepthEnd = 1.5, -// IdMode = 1, -// AxialLoadPlan = 2.718281, -// AxialLoadLimitMax = 3.1415926, -// DeltaPressurePlan = 4, -// DeltaPressureLimitMax = 5, -// TopDriveTorquePlan = 6, -// TopDriveTorqueLimitMax = 7, -// TopDriveSpeedPlan = 8, -// TopDriveSpeedLimitMax = 9, -// FlowPlan = 10, -// FlowLimitMax = 11, -// RopPlan = 12, -// UsageSaub = 13, -// UsageSpin = 14, -// Comment = "это тестовая запись", -// }; +// IdMode = 1, +// AxialLoadPlan = 2.718281, +// AxialLoadLimitMax = 3.1415926, +// DeltaPressurePlan = 4, +// DeltaPressureLimitMax = 5, +// TopDriveTorquePlan = 6, +// TopDriveTorqueLimitMax = 7, +// TopDriveSpeedPlan = 8, +// TopDriveSpeedLimitMax = 9, +// FlowPlan = 10, +// FlowLimitMax = 11, +// RopPlan = 12, +// UsageSaub = 13, +// UsageSpin = 14, +// Comment = "это тестовая запись", +// }; -// private static IEnumerable CreateDataSaubStats(int idTelemetry, -// int idCategory) => -// new[] -// { -// new DataSaubStat -// { -// AxialLoad = 0, -// AxialLoadLimitMax = 10, -// AxialLoadSp = 8, -// BlockSpeedSp = 50.0, -// DateEnd = DateTimeOffset.UtcNow.AddMinutes(40), -// DateStart = DateTimeOffset.UtcNow.AddMinutes(30), -// DepthEnd = 85.99299621582031, -// DepthStart = 85.9260025024414, -// EnabledSubsystems = 0, -// Flow = 10, -// IdCategory = idCategory, -// HasOscillation = true, -// IdFeedRegulator = 0, -// IdTelemetry = idTelemetry, -// Pressure = 24, -// PressureIdle = 0, -// PressureSp = 40, -// RotorSpeed = 11.3, -// RotorTorque = 1, -// RotorTorqueLimitMax = 26.5, -// RotorTorqueSp = 5, -// Speed = 80.3924560546875 -// }, -// new DataSaubStat -// { -// AxialLoad = 2, -// AxialLoadLimitMax = 10.0, -// AxialLoadSp = 8, -// BlockSpeedSp = 20, -// DateEnd = DateTimeOffset.UtcNow.AddMinutes(30), -// DateStart = DateTimeOffset.UtcNow.AddMinutes(20), -// DepthEnd = 86.28099822998047, -// DepthStart = 86.21900177001953, -// EnabledSubsystems = 1, -// Flow = 20, -// HasOscillation = true, -// IdCategory = idCategory, -// IdFeedRegulator = 1, -// IdTelemetry = idTelemetry, -// Pressure = 30, -// PressureIdle = 20, -// PressureSp = 40, -// RotorSpeed = 11.251153300212916, -// RotorTorque = 7, -// RotorTorqueLimitMax = 26.5, -// RotorTorqueSp = 9, -// Speed = 74.395751953125 -// }, -// new DataSaubStat -// { -// AxialLoad = 4, -// AxialLoadLimitMax = 15.0, -// AxialLoadSp = 8, -// BlockSpeedSp = 110.0, -// DateEnd = DateTimeOffset.UtcNow.AddMinutes(20), -// DateStart = DateTimeOffset.UtcNow.AddMinutes(10), -// DepthEnd = 106.7490005493164, -// DepthStart = 106.47899627685547, -// EnabledSubsystems = 1, -// Flow = 30, -// HasOscillation = true, -// IdFeedRegulator = 1, -// IdTelemetry = idTelemetry, -// IdCategory = idCategory, -// Pressure = 36, -// PressureIdle = 23.0, -// PressureSp = 63.0, -// RotorSpeed = 11.334207942999628, -// RotorTorque = 14, -// RotorTorqueLimitMax = 15.0, -// RotorTorqueSp = 13, -// Speed = 108.001708984375 -// } -// }; +// private static IEnumerable CreateDataSaubStats(int idTelemetry, +// int idCategory) => +// new[] +// { +// new DataSaubStat +// { +// AxialLoad = 0, +// AxialLoadLimitMax = 10, +// AxialLoadSp = 8, +// BlockSpeedSp = 50.0, +// DateEnd = DateTimeOffset.UtcNow.AddMinutes(40), +// DateStart = DateTimeOffset.UtcNow.AddMinutes(30), +// DepthEnd = 85.99299621582031, +// DepthStart = 85.9260025024414, +// EnabledSubsystems = 0, +// Flow = 10, +// IdCategory = idCategory, +// HasOscillation = true, +// IdFeedRegulator = 0, +// IdTelemetry = idTelemetry, +// Pressure = 24, +// PressureIdle = 0, +// PressureSp = 40, +// RotorSpeed = 11.3, +// RotorTorque = 1, +// RotorTorqueLimitMax = 26.5, +// RotorTorqueSp = 5, +// Speed = 80.3924560546875 +// }, +// new DataSaubStat +// { +// AxialLoad = 2, +// AxialLoadLimitMax = 10.0, +// AxialLoadSp = 8, +// BlockSpeedSp = 20, +// DateEnd = DateTimeOffset.UtcNow.AddMinutes(30), +// DateStart = DateTimeOffset.UtcNow.AddMinutes(20), +// DepthEnd = 86.28099822998047, +// DepthStart = 86.21900177001953, +// EnabledSubsystems = 1, +// Flow = 20, +// HasOscillation = true, +// IdCategory = idCategory, +// IdFeedRegulator = 1, +// IdTelemetry = idTelemetry, +// Pressure = 30, +// PressureIdle = 20, +// PressureSp = 40, +// RotorSpeed = 11.251153300212916, +// RotorTorque = 7, +// RotorTorqueLimitMax = 26.5, +// RotorTorqueSp = 9, +// Speed = 74.395751953125 +// }, +// new DataSaubStat +// { +// AxialLoad = 4, +// AxialLoadLimitMax = 15.0, +// AxialLoadSp = 8, +// BlockSpeedSp = 110.0, +// DateEnd = DateTimeOffset.UtcNow.AddMinutes(20), +// DateStart = DateTimeOffset.UtcNow.AddMinutes(10), +// DepthEnd = 106.7490005493164, +// DepthStart = 106.47899627685547, +// EnabledSubsystems = 1, +// Flow = 30, +// HasOscillation = true, +// IdFeedRegulator = 1, +// IdTelemetry = idTelemetry, +// IdCategory = idCategory, +// Pressure = 36, +// PressureIdle = 23.0, +// PressureSp = 63.0, +// RotorSpeed = 11.334207942999628, +// RotorTorque = 14, +// RotorTorqueLimitMax = 15.0, +// RotorTorqueSp = 13, +// Speed = 108.001708984375 +// } +// }; //} \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/ScheduleControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/ScheduleControllerTest.cs index ad7571a2..4c7e06f0 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/ScheduleControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/ScheduleControllerTest.cs @@ -1,4 +1,4 @@ -// using AsbCloudApp.Data; +// using AsbCloudApp.Data; // using AsbCloudDb.Model; // using AsbCloudInfrastructure; // using AsbCloudWebApi.IntegrationTests.Clients; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/SetpointsControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/SetpointsControllerTest.cs index d73148de..eb9c5e8d 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/SetpointsControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/SetpointsControllerTest.cs @@ -8,46 +8,46 @@ namespace AsbCloudWebApi.IntegrationTests.Controllers; public class SetpointsControllerTest : BaseIntegrationTest { - private readonly ISetpointsClient client; + private readonly ISetpointsClient client; - public SetpointsControllerTest(WebAppFactoryFixture factory) - : base(factory) - { - client = factory.GetAuthorizedHttpClient(string.Empty); - } + public SetpointsControllerTest(WebAppFactoryFixture factory) + : base(factory) + { + client = factory.GetAuthorizedHttpClient(string.Empty); + } - [Fact] - public async Task GetByTelemetryUidAsync_returns_success() - { - //arrange - var well = await dbContext.Wells - .Include(w => w.Telemetry) - .FirstAsync(); - - var entity = new SetpointsRequest - { - IdWell = well.Id, - UploadDate = DateTimeOffset.UtcNow, - ObsolescenceSec = 15, - IdState = 1, - IdAuthor = 1 - }; - - var entry = dbContext.SetpointsRequests.Add(entity); - await dbContext.SaveChangesAsync(); - entry.State = EntityState.Detached; + [Fact] + public async Task GetByTelemetryUidAsync_returns_success() + { + //arrange + var well = await dbContext.Wells + .Include(w => w.Telemetry) + .FirstAsync(); + + var entity = new SetpointsRequest + { + IdWell = well.Id, + UploadDate = DateTimeOffset.UtcNow, + ObsolescenceSec = 15, + IdState = 1, + IdAuthor = 1 + }; + + var entry = dbContext.SetpointsRequests.Add(entity); + await dbContext.SaveChangesAsync(); + entry.State = EntityState.Detached; - //act - var response = await client.GetByTelemetryUidAsync(well.Telemetry!.RemoteUid); - - //assert - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.NotNull(response.Content); - Assert.Single(response.Content); + //act + var response = await client.GetByTelemetryUidAsync(well.Telemetry!.RemoteUid); + + //assert + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + Assert.NotNull(response.Content); + Assert.Single(response.Content); - var setpoints = await dbContext.SetpointsRequests.ToArrayAsync(); + var setpoints = await dbContext.SetpointsRequests.ToArrayAsync(); - foreach (var setpoint in setpoints) - Assert.Equal(2, setpoint.IdState); - } + foreach (var setpoint in setpoints) + Assert.Equal(2, setpoint.IdState); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/SlipsStatControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/SlipsStatControllerTest.cs index 70f72369..77fe4c88 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/SlipsStatControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/SlipsStatControllerTest.cs @@ -8,100 +8,100 @@ namespace AsbCloudWebApi.IntegrationTests.Controllers; public class SlipsStatControllerTest : BaseIntegrationTest { - private readonly ISlipsTimeClient client; + private readonly ISlipsTimeClient client; - public SlipsStatControllerTest(WebAppFactoryFixture factory) - : base(factory) - { - client = factory.GetAuthorizedHttpClient(string.Empty); + public SlipsStatControllerTest(WebAppFactoryFixture factory) + : base(factory) + { + client = factory.GetAuthorizedHttpClient(string.Empty); - dbContext.CleanupDbSet(); - dbContext.CleanupDbSet(); - dbContext.CleanupDbSet(); - } + dbContext.CleanupDbSet(); + dbContext.CleanupDbSet(); + dbContext.CleanupDbSet(); + } - [Fact] - public async Task GetAll_returns_success() - { - //arrange - var well = dbContext.Wells.First(); - var schedule = CreateScheduleAsync(well.Id); - var factWellOperation = CreateFactWellOperation(well.Id); - var detectedOperation = CreateDetectedOperation(well.IdTelemetry!.Value); + [Fact] + public async Task GetAll_returns_success() + { + //arrange + var well = dbContext.Wells.First(); + var schedule = CreateScheduleAsync(well.Id); + var factWellOperation = CreateFactWellOperation(well.Id); + var detectedOperation = CreateDetectedOperation(well.IdTelemetry!.Value); - dbContext.Schedule.Add(schedule); - dbContext.WellOperations.Add(factWellOperation); - dbContext.DetectedOperations.Add(detectedOperation); - await dbContext.SaveChangesAsync(); + dbContext.Schedule.Add(schedule); + dbContext.WellOperations.Add(factWellOperation); + dbContext.DetectedOperations.Add(detectedOperation); + await dbContext.SaveChangesAsync(); - var request = new OperationStatRequest - { - DateStartUTC = schedule.DrillStart.DateTime, - DateEndUTC = schedule.DrillEnd.DateTime, - DurationMinutesMin = 0, - DurationMinutesMax = 5 - }; + var request = new OperationStatRequest + { + DateStartUTC = schedule.DrillStart.DateTime, + DateEndUTC = schedule.DrillEnd.DateTime, + DurationMinutesMin = 0, + DurationMinutesMax = 5 + }; - var dtoExpected = new SlipsStatDto - { - DrillerName = $"{schedule.Driller.Surname} {schedule.Driller.Name} {schedule.Driller.Patronymic}", - WellCount = 1, - SectionCaption = "Пилотный ствол", - SlipsCount = 1, - SlipsTimeInMinutes = (detectedOperation.DateEnd - detectedOperation.DateStart).TotalMinutes, - SectionDepth = factWellOperation.DepthEnd - factWellOperation.DepthStart, - }; + var dtoExpected = new SlipsStatDto + { + DrillerName = $"{schedule.Driller.Surname} {schedule.Driller.Name} {schedule.Driller.Patronymic}", + WellCount = 1, + SectionCaption = "Пилотный ствол", + SlipsCount = 1, + SlipsTimeInMinutes = (detectedOperation.DateEnd - detectedOperation.DateStart).TotalMinutes, + SectionDepth = factWellOperation.DepthEnd - factWellOperation.DepthStart, + }; - //act - var response = await client.GetAll(request); + //act + var response = await client.GetAll(request); - //assert - Assert.NotNull(response.Content); - Assert.Single(response.Content); + //assert + Assert.NotNull(response.Content); + Assert.Single(response.Content); - var slipsStat = response.Content.First(); - MatchHelper.Match(dtoExpected, slipsStat); - } + var slipsStat = response.Content.First(); + MatchHelper.Match(dtoExpected, slipsStat); + } - private static Schedule CreateScheduleAsync(int idWell) => new() - { - IdWell = idWell, - ShiftStart = new TimeOnly(8, 0, 0), - ShiftEnd = new TimeOnly(20, 0, 0), - DrillStart = new DateTimeOffset(new DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc)), - DrillEnd = new DateTimeOffset(new DateTime(2024, 2, 1, 0, 0, 0, DateTimeKind.Utc)), - Driller = new Driller - { - Name = "TestName", - Surname = "TestSurname", - Patronymic = "TestPatronymic" - } - }; + private static Schedule CreateScheduleAsync(int idWell) => new() + { + IdWell = idWell, + ShiftStart = new TimeOnly(8, 0, 0), + ShiftEnd = new TimeOnly(20, 0, 0), + DrillStart = new DateTimeOffset(new DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc)), + DrillEnd = new DateTimeOffset(new DateTime(2024, 2, 1, 0, 0, 0, DateTimeKind.Utc)), + Driller = new Driller + { + Name = "TestName", + Surname = "TestSurname", + Patronymic = "TestPatronymic" + } + }; - private static WellOperation CreateFactWellOperation(int idWell) => - new() - { - IdWell = idWell, - IdWellSectionType = 1, - IdCategory = WellOperationCategory.IdRotor, - IdType = WellOperation.IdOperationTypeFact, - DepthStart = 0, - DepthEnd = 100, - LastUpdateDate = DateTimeOffset.UtcNow, - DateStart = new DateTimeOffset(new DateTime(2024, 1, 15, 15, 0, 0, DateTimeKind.Utc)), - DurationHours = 1 - }; + private static WellOperation CreateFactWellOperation(int idWell) => + new() + { + IdWell = idWell, + IdWellSectionType = 1, + IdCategory = WellOperationCategory.IdRotor, + IdType = WellOperation.IdOperationTypeFact, + DepthStart = 0, + DepthEnd = 100, + LastUpdateDate = DateTimeOffset.UtcNow, + DateStart = new DateTimeOffset(new DateTime(2024, 1, 15, 15, 0, 0, DateTimeKind.Utc)), + DurationHours = 1 + }; - private static DetectedOperation CreateDetectedOperation(int idTelemetry) => - new() - { - IdTelemetry = idTelemetry, - IdCategory = WellOperationCategory.IdSlipsTime, - DateStart = new DateTimeOffset(new DateTime(2024, 1, 23, 15, 0, 0, 0, DateTimeKind.Utc)), - DateEnd = new DateTimeOffset(new DateTime(2024, 1, 23, 15, 2, 0, 0, DateTimeKind.Utc)), - ExtraData = new Dictionary - { - { "test", 5 } - } - }; + private static DetectedOperation CreateDetectedOperation(int idTelemetry) => + new() + { + IdTelemetry = idTelemetry, + IdCategory = WellOperationCategory.IdSlipsTime, + DateStart = new DateTimeOffset(new DateTime(2024, 1, 23, 15, 0, 0, 0, DateTimeKind.Utc)), + DateEnd = new DateTimeOffset(new DateTime(2024, 1, 23, 15, 2, 0, 0, DateTimeKind.Utc)), + ExtraData = new Dictionary + { + { "test", 5 } + } + }; } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/TelemetryControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/TelemetryControllerTest.cs index 8622f11b..12fd5e83 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/TelemetryControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/TelemetryControllerTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudDb.Model; using AsbCloudWebApi.IntegrationTests.Clients; using Xunit; diff --git a/AsbCloudWebApi.IntegrationTests/Controllers/WellOperations/WellOperationControllerTest.cs b/AsbCloudWebApi.IntegrationTests/Controllers/WellOperations/WellOperationControllerTest.cs index bb4c54df..2b820872 100644 --- a/AsbCloudWebApi.IntegrationTests/Controllers/WellOperations/WellOperationControllerTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Controllers/WellOperations/WellOperationControllerTest.cs @@ -27,7 +27,7 @@ public class WellOperationControllerTest : BaseIntegrationTest } /// - /// ( ) + /// Успешное добавление операций (без предварительной очистки данных) /// /// [Fact] @@ -46,7 +46,7 @@ public class WellOperationControllerTest : BaseIntegrationTest } /// - /// ( ) + /// Успешное добавление операций (с предварительной очисткой данных) /// /// [Fact] @@ -65,7 +65,7 @@ public class WellOperationControllerTest : BaseIntegrationTest } /// - /// + /// Успешное обновление операций /// /// [Fact] @@ -87,7 +87,7 @@ public class WellOperationControllerTest : BaseIntegrationTest } /// - /// + /// Получение плановых операций /// /// [Fact] @@ -144,7 +144,7 @@ public class WellOperationControllerTest : BaseIntegrationTest IdWellSectionType = 2, IdCategory = WellOperationCategory.IdSlide, IdPlan = null, - CategoryInfo = ".", + CategoryInfo = "Доп.инфо", IdType = idType, DepthStart = 10.0, DepthEnd = 20.0, @@ -201,7 +201,7 @@ public class WellOperationControllerTest : BaseIntegrationTest var stream = responseTemplate.Content; using var workbook = new XLWorkbook(stream); - var sheet = workbook.GetWorksheet(""); + var sheet = workbook.GetWorksheet("Справочники"); var count = sheet.RowsUsed().Count() - 1; @@ -241,9 +241,9 @@ public class WellOperationControllerTest : BaseIntegrationTest var entity1 = CreateWellOperation(well.Id); var entity2 = entity1.Adapt(); - entity2.DateStart = entity2.DateStart.AddDays(1); - entity2.IdCategory = WellOperationCategory.IdEquipmentDrillingRepair; - entity2.DurationHours = 2; + entity2.DateStart = entity2.DateStart.AddDays(1); + entity2.IdCategory = WellOperationCategory.IdEquipmentDrillingRepair; + entity2.DurationHours = 2; var entity3 = entity2.Adapt(); entity3.DateStart = entity3.DateStart.AddDays(1); @@ -256,22 +256,22 @@ public class WellOperationControllerTest : BaseIntegrationTest await dbContext.SaveChangesAsync(); - var request = new WellOperationRequestBase - { - OperationType = WellOperation.IdOperationTypePlan, - Skip = pageIndex, - Take = pageSize, + var request = new WellOperationRequestBase + { + OperationType = WellOperation.IdOperationTypePlan, + Skip = pageIndex, + Take = pageSize, SortFields = [nameof(WellOperation.DateStart)] }; - //act - var response = await client.GetPageOperationsAsync(well.Id, request); + //act + var response = await client.GetPageOperationsAsync(well.Id, request); //assert Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.NotNull(response.Content); - var items = response.Content.Items.ToArray(); + var items = response.Content.Items.ToArray(); Assert.Equal(0, items[0].Day); Assert.Equal(1, items[1].Day); @@ -283,20 +283,20 @@ public class WellOperationControllerTest : BaseIntegrationTest } private static WellOperation CreateWellOperation(int idWell, int idType = WellOperation.IdOperationTypePlan) => - new() - { - IdWell = idWell, - IdWellSectionType = 2, - IdCategory = WellOperationCategory.IdSlide, - IdPlan = null, - CategoryInfo = ".", - LastUpdateDate = new DateTimeOffset(new DateTime(2023, 1, 10)).ToUniversalTime(), - IdType = idType, - DepthStart = 10.0, - DepthEnd = 20.0, - DateStart = new DateTimeOffset(new DateTime(2023, 1, 10), TimeSpan.FromHours(Defaults.Timezone.Hours)).ToUniversalTime(), - DurationHours = 1.0, - Comment = "1", - IdUser = 1, - }; + new() + { + IdWell = idWell, + IdWellSectionType = 2, + IdCategory = WellOperationCategory.IdSlide, + IdPlan = null, + CategoryInfo = "Доп.инфо", + LastUpdateDate = new DateTimeOffset(new DateTime(2023, 1, 10)).ToUniversalTime(), + IdType = idType, + DepthStart = 10.0, + DepthEnd = 20.0, + DateStart = new DateTimeOffset(new DateTime(2023, 1, 10), TimeSpan.FromHours(Defaults.Timezone.Hours)).ToUniversalTime(), + DurationHours = 1.0, + Comment = "1", + IdUser = 1, + }; } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Converters/ValidationResultConverter.cs b/AsbCloudWebApi.IntegrationTests/Converters/ValidationResultConverter.cs index 15423bc0..11252b1b 100644 --- a/AsbCloudWebApi.IntegrationTests/Converters/ValidationResultConverter.cs +++ b/AsbCloudWebApi.IntegrationTests/Converters/ValidationResultConverter.cs @@ -6,63 +6,63 @@ namespace AsbCloudWebApi.IntegrationTests.Converters; public class ValidationResultConverter : JsonConverter { - public override ValidationResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType != JsonTokenType.StartObject) - { - throw new JsonException("Expected the start of an object."); - } + public override ValidationResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartObject) + { + throw new JsonException("Expected the start of an object."); + } - string? errorMessage = null; - List? memberNames = null; + string? errorMessage = null; + List? memberNames = null; - while (reader.Read()) - { - if (reader.TokenType == JsonTokenType.EndObject) - { - break; - } + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject) + { + break; + } - if (reader.TokenType != JsonTokenType.PropertyName) - { - throw new JsonException($"Unexpected token type: {reader.TokenType}"); - } + if (reader.TokenType != JsonTokenType.PropertyName) + { + throw new JsonException($"Unexpected token type: {reader.TokenType}"); + } - var propertyName = reader.GetString(); - reader.Read(); + var propertyName = reader.GetString(); + reader.Read(); - switch (propertyName) - { - case "errorMessage": - errorMessage = reader.GetString(); - break; - case "memberNames": - if (reader.TokenType != JsonTokenType.StartArray) - { - throw new JsonException("Expected the start of an array for 'memberNames'."); - } - memberNames = new List(); - while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) - { - memberNames.Add(reader.GetString() ?? string.Empty); - } - break; - default: - reader.Skip(); - break; - } - } + switch (propertyName) + { + case "errorMessage": + errorMessage = reader.GetString(); + break; + case "memberNames": + if (reader.TokenType != JsonTokenType.StartArray) + { + throw new JsonException("Expected the start of an array for 'memberNames'."); + } + memberNames = new List(); + while (reader.Read() && reader.TokenType != JsonTokenType.EndArray) + { + memberNames.Add(reader.GetString() ?? string.Empty); + } + break; + default: + reader.Skip(); + break; + } + } - if (errorMessage == null) - { - throw new JsonException("Missing 'errorMessage' property."); - } + if (errorMessage == null) + { + throw new JsonException("Missing 'errorMessage' property."); + } - return new ValidationResult(errorMessage, memberNames ?? Enumerable.Empty()); - } + return new ValidationResult(errorMessage, memberNames ?? Enumerable.Empty()); + } - public override void Write(Utf8JsonWriter writer, ValidationResult value, JsonSerializerOptions options) - { - throw new NotImplementedException(); - } + public override void Write(Utf8JsonWriter writer, ValidationResult value, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Data/Defaults.cs b/AsbCloudWebApi.IntegrationTests/Data/Defaults.cs index c7d75880..1d97e6ec 100644 --- a/AsbCloudWebApi.IntegrationTests/Data/Defaults.cs +++ b/AsbCloudWebApi.IntegrationTests/Data/Defaults.cs @@ -1,58 +1,58 @@ -using AsbCloudDb.Model; +using AsbCloudDb.Model; namespace AsbCloudWebApi.IntegrationTests.Data { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2211:Поля, не являющиеся константами, не должны быть видимыми", - Justification = "<Ожидание>")] - public static class Defaults - { - public static SimpleTimezone Timezone => new() - { - Hours = 1 - }; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2211:Поля, не являющиеся константами, не должны быть видимыми", + Justification = "<Ожидание>")] + public static class Defaults + { + public static SimpleTimezone Timezone => new() + { + Hours = 1 + }; - public const string RemoteUid = "555-555-555"; + public const string RemoteUid = "555-555-555"; - public static Deposit[] Deposits => new Deposit[] - { - new() - { - Caption = "Deposit1", - Latitude = 10, - Longitude = 20, - Timezone = Timezone, - Clusters = new[] - { - new Cluster - { - Caption = "Cluster1", - Latitude = 10, - Longitude = 20, - Timezone = Timezone, - Wells = new[] - { - new Well - { - IdWellType = 1, - IdState = 1, - Caption = "Well1", - Latitude = 10, - Longitude = 20, - Timezone = Timezone, - Telemetry = new Telemetry - { - RemoteUid = RemoteUid, - TimeZone = Timezone - }, - RelationCompaniesWells = new RelationCompanyWell[] - { - new() { IdCompany = 1 }, - }, - } - } - } - } - } - }; - } + public static Deposit[] Deposits => new Deposit[] + { + new() + { + Caption = "Deposit1", + Latitude = 10, + Longitude = 20, + Timezone = Timezone, + Clusters = new[] + { + new Cluster + { + Caption = "Cluster1", + Latitude = 10, + Longitude = 20, + Timezone = Timezone, + Wells = new[] + { + new Well + { + IdWellType = 1, + IdState = 1, + Caption = "Well1", + Latitude = 10, + Longitude = 20, + Timezone = Timezone, + Telemetry = new Telemetry + { + RemoteUid = RemoteUid, + TimeZone = Timezone + }, + RelationCompaniesWells = new RelationCompanyWell[] + { + new() { IdCompany = 1 }, + }, + } + } + } + } + } + }; + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/DbConnection.cs b/AsbCloudWebApi.IntegrationTests/DbConnection.cs index fad06ed8..4db32635 100644 --- a/AsbCloudWebApi.IntegrationTests/DbConnection.cs +++ b/AsbCloudWebApi.IntegrationTests/DbConnection.cs @@ -2,14 +2,14 @@ namespace AsbCloudWebApi.IntegrationTests; public class DbConnection { - public string Host { get; set; } = null!; + public string Host { get; set; } = null!; - public int Port { get; set; } + public int Port { get; set; } - public string Username { get; set; } = null!; + public string Username { get; set; } = null!; - public string Password { get; set; } = null!; + public string Password { get; set; } = null!; - public string GetConnectionString() => - $"Host={Host};Database={Guid.NewGuid()};Port={Port};Username={Username};Password={Password};Persist Security Info=True;Include Error Detail=True"; + public string GetConnectionString() => + $"Host={Host};Database={Guid.NewGuid()};Port={Port};Username={Username};Password={Password};Persist Security Info=True;Include Error Detail=True"; } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/EFCoreExtensions.cs b/AsbCloudWebApi.IntegrationTests/EFCoreExtensions.cs index 422c9362..3a0f1b0f 100644 --- a/AsbCloudWebApi.IntegrationTests/EFCoreExtensions.cs +++ b/AsbCloudWebApi.IntegrationTests/EFCoreExtensions.cs @@ -4,11 +4,11 @@ namespace AsbCloudWebApi.IntegrationTests; public static class EFCoreExtensions { - public static void CleanupDbSet(this IAsbCloudDbContext dbContext) - where T : class - { - var dbset = dbContext.Set(); - dbset.RemoveRange(dbset); - dbContext.SaveChanges(); - } + public static void CleanupDbSet(this IAsbCloudDbContext dbContext) + where T : class + { + var dbset = dbContext.Set(); + dbset.RemoveRange(dbset); + dbContext.SaveChanges(); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/MatchHelper.cs b/AsbCloudWebApi.IntegrationTests/MatchHelper.cs index 32a51b61..15a5f9d6 100644 --- a/AsbCloudWebApi.IntegrationTests/MatchHelper.cs +++ b/AsbCloudWebApi.IntegrationTests/MatchHelper.cs @@ -5,31 +5,31 @@ namespace AsbCloudWebApi.IntegrationTests; public static class MatchHelper { - public static void Match(T expected, T actual, IEnumerable? excludeProps = null) - { - if (ReferenceEquals(expected, actual)) - throw EqualException.ForMismatchedValues(expected, actual, "Reference are equals"); + public static void Match(T expected, T actual, IEnumerable? excludeProps = null) + { + if (ReferenceEquals(expected, actual)) + throw EqualException.ForMismatchedValues(expected, actual, "Reference are equals"); - if (expected is null || actual is null) - throw EqualException.ForMismatchedValues(expected, actual); + if (expected is null || actual is null) + throw EqualException.ForMismatchedValues(expected, actual); - var type = typeof(T); - var props = type.GetProperties( - BindingFlags.Public - | BindingFlags.Instance).Where(prop => prop.CanWrite); + var type = typeof(T); + var props = type.GetProperties( + BindingFlags.Public + | BindingFlags.Instance).Where(prop => prop.CanWrite); - if (excludeProps is not null && excludeProps.Any()) - props = props.Where(prop => !excludeProps.Contains(prop.Name)); + if (excludeProps is not null && excludeProps.Any()) + props = props.Where(prop => !excludeProps.Contains(prop.Name)); - foreach (var prop in props) - { - var objValue = prop.GetValue(expected); - var anotherValue = prop.GetValue(actual); - if (objValue != null && !objValue.Equals(anotherValue)) - { - var banner = $" of {type.Name} props {prop.Name} "; + foreach (var prop in props) + { + var objValue = prop.GetValue(expected); + var anotherValue = prop.GetValue(actual); + if (objValue != null && !objValue.Equals(anotherValue)) + { + var banner = $" of {type.Name} props {prop.Name} "; throw EqualException.ForMismatchedValues(expected, actual, banner); - } - } - } + } + } + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/Repository/DataSaubStatRepositoryTest.cs b/AsbCloudWebApi.IntegrationTests/Repository/DataSaubStatRepositoryTest.cs index 9641dc3c..e69cc692 100644 --- a/AsbCloudWebApi.IntegrationTests/Repository/DataSaubStatRepositoryTest.cs +++ b/AsbCloudWebApi.IntegrationTests/Repository/DataSaubStatRepositoryTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using AsbCloudDb.Model; using Mapster; @@ -10,128 +10,128 @@ namespace AsbCloudWebApi.IntegrationTests.Repository; public class DataSaubStatRepositoryTest : BaseIntegrationTest { - private readonly IDataSaubStatRepository dataSaubStatRepository; - - public DataSaubStatRepositoryTest(WebAppFactoryFixture factory) - : base(factory) - { - dataSaubStatRepository = scope.ServiceProvider.GetRequiredService(); - dbContext.CleanupDbSet(); - } + private readonly IDataSaubStatRepository dataSaubStatRepository; + + public DataSaubStatRepositoryTest(WebAppFactoryFixture factory) + : base(factory) + { + dataSaubStatRepository = scope.ServiceProvider.GetRequiredService(); + dbContext.CleanupDbSet(); + } - [Fact] - public async Task GetLastDatesAsync_returns_success() - { - //arrange - var telemetry = await dbContext.Telemetries.FirstAsync(); - var timeZoneOffset = TimeSpan.FromHours(telemetry.TimeZone.Hours); - var dataSaubStat = CreateDataSaubStat(telemetry.Id, timeZoneOffset); - dbContext.AddRange(dataSaubStat); - await dbContext.SaveChangesAsync(); + [Fact] + public async Task GetLastDatesAsync_returns_success() + { + //arrange + var telemetry = await dbContext.Telemetries.FirstAsync(); + var timeZoneOffset = TimeSpan.FromHours(telemetry.TimeZone.Hours); + var dataSaubStat = CreateDataSaubStat(telemetry.Id, timeZoneOffset); + dbContext.AddRange(dataSaubStat); + await dbContext.SaveChangesAsync(); - var telemetryIds = dataSaubStat.Select(stat => stat.IdTelemetry).ToArray(); + var telemetryIds = dataSaubStat.Select(stat => stat.IdTelemetry).ToArray(); - //act - var result = await dataSaubStatRepository.GetLastsAsync(telemetryIds, CancellationToken.None); + //act + var result = await dataSaubStatRepository.GetLastsAsync(telemetryIds, CancellationToken.None); - //assert - var expected = dataSaubStat.Max(stat => stat.DateEnd).ToOffset(timeZoneOffset); - var actual = result.First().DateEnd; - Assert.True((expected - actual).Ticks == 0.0); - } + //assert + var expected = dataSaubStat.Max(stat => stat.DateEnd).ToOffset(timeZoneOffset); + var actual = result.First().DateEnd; + Assert.True((expected - actual).Ticks == 0.0); + } - [Fact] - public async Task InsertRangeAsync_returns_success() - { - //arrange - var telemetry = await dbContext.Telemetries.FirstAsync(); - var timeZoneOffset = TimeSpan.FromHours(telemetry.TimeZone.Hours); - var dataSaubStat = CreateDataSaubStat(telemetry.Id, timeZoneOffset); - var expectedDtos = dataSaubStat.Select(entity => ConvertToDto(entity, timeZoneOffset)); + [Fact] + public async Task InsertRangeAsync_returns_success() + { + //arrange + var telemetry = await dbContext.Telemetries.FirstAsync(); + var timeZoneOffset = TimeSpan.FromHours(telemetry.TimeZone.Hours); + var dataSaubStat = CreateDataSaubStat(telemetry.Id, timeZoneOffset); + var expectedDtos = dataSaubStat.Select(entity => ConvertToDto(entity, timeZoneOffset)); - //act - await dataSaubStatRepository.InsertRangeAsync(expectedDtos, CancellationToken.None); + //act + await dataSaubStatRepository.InsertRangeAsync(expectedDtos, CancellationToken.None); - //assert - var entities = await dbContext.DataSaubStat.ToArrayAsync(); - var actualDtos = entities.Select(entity => ConvertToDto(entity, timeZoneOffset)); + //assert + var entities = await dbContext.DataSaubStat.ToArrayAsync(); + var actualDtos = entities.Select(entity => ConvertToDto(entity, timeZoneOffset)); - var excludedProps = new[] - { - nameof(DataSaubStat.Telemetry), - nameof(DataSaubStat.Id), - nameof(DataSaubStat.OperationCategory) - }; + var excludedProps = new[] + { + nameof(DataSaubStat.Telemetry), + nameof(DataSaubStat.Id), + nameof(DataSaubStat.OperationCategory) + }; - foreach (var actualDto in actualDtos) - { - var statDto = expectedDtos.FirstOrDefault(stat => stat.DateEnd == actualDto.DateEnd && - stat.DateStart == actualDto.DateStart); + foreach (var actualDto in actualDtos) + { + var statDto = expectedDtos.FirstOrDefault(stat => stat.DateEnd == actualDto.DateEnd && + stat.DateStart == actualDto.DateStart); - MatchHelper.Match(actualDto, statDto, excludedProps); - } - } + MatchHelper.Match(actualDto, statDto, excludedProps); + } + } - private static IEnumerable CreateDataSaubStat(int idTelemetry, TimeSpan timeZoneOffset) => new DataSaubStat[] - { - new() - { - IdTelemetry = idTelemetry, - DateEnd = new DateTimeOffset(2024, 1, 1, 20, 25, 0, timeZoneOffset).ToUniversalTime(), - DateStart = new DateTimeOffset(2024, 1, 1, 20, 15, 0, timeZoneOffset).ToUniversalTime(), - AxialLoad = 10.0, - AxialLoadLimitMax = 10.0, - AxialLoadSp = 10.0, - BlockSpeedSp = 1000, - DepthEnd = 10.0, - DepthStart = 5.0, - EnabledSubsystems = 1, - Flow = 10.0, - HasOscillation = true, - IdCategory = WellOperationCategory.IdSlide, - IdFeedRegulator = 1, - Pressure = 10.0, - PressureIdle = 10.0, - PressureSp = 10.0, - RotorSpeed = 9.0, - RotorTorque = 9.0, - RotorTorqueSp = 9.0, - RotorTorqueLimitMax = 9.0, - Speed = 10.0 - }, - new() - { - IdTelemetry = idTelemetry, - DateEnd = new DateTimeOffset(2024, 2, 2, 20, 25, 0, timeZoneOffset).ToUniversalTime(), - DateStart = new DateTimeOffset(2024, 2, 2, 20, 15, 0, timeZoneOffset).ToUniversalTime(), - AxialLoad = 10.0, - AxialLoadLimitMax = 10.0, - AxialLoadSp = 10.0, - BlockSpeedSp = 1000, - DepthEnd = 10.0, - DepthStart = 5.0, - EnabledSubsystems = 1, - Flow = 10.0, - HasOscillation = true, - IdCategory = WellOperationCategory.IdSlide, - IdFeedRegulator = 1, - Pressure = 10.0, - PressureIdle = 10.0, - PressureSp = 10.0, - RotorSpeed = 10.0, - RotorTorque = 10.0, - RotorTorqueSp = 10.0, - RotorTorqueLimitMax = 10.0, - Speed = 10.0 - } - }; + private static IEnumerable CreateDataSaubStat(int idTelemetry, TimeSpan timeZoneOffset) => new DataSaubStat[] + { + new() + { + IdTelemetry = idTelemetry, + DateEnd = new DateTimeOffset(2024, 1, 1, 20, 25, 0, timeZoneOffset).ToUniversalTime(), + DateStart = new DateTimeOffset(2024, 1, 1, 20, 15, 0, timeZoneOffset).ToUniversalTime(), + AxialLoad = 10.0, + AxialLoadLimitMax = 10.0, + AxialLoadSp = 10.0, + BlockSpeedSp = 1000, + DepthEnd = 10.0, + DepthStart = 5.0, + EnabledSubsystems = 1, + Flow = 10.0, + HasOscillation = true, + IdCategory = WellOperationCategory.IdSlide, + IdFeedRegulator = 1, + Pressure = 10.0, + PressureIdle = 10.0, + PressureSp = 10.0, + RotorSpeed = 9.0, + RotorTorque = 9.0, + RotorTorqueSp = 9.0, + RotorTorqueLimitMax = 9.0, + Speed = 10.0 + }, + new() + { + IdTelemetry = idTelemetry, + DateEnd = new DateTimeOffset(2024, 2, 2, 20, 25, 0, timeZoneOffset).ToUniversalTime(), + DateStart = new DateTimeOffset(2024, 2, 2, 20, 15, 0, timeZoneOffset).ToUniversalTime(), + AxialLoad = 10.0, + AxialLoadLimitMax = 10.0, + AxialLoadSp = 10.0, + BlockSpeedSp = 1000, + DepthEnd = 10.0, + DepthStart = 5.0, + EnabledSubsystems = 1, + Flow = 10.0, + HasOscillation = true, + IdCategory = WellOperationCategory.IdSlide, + IdFeedRegulator = 1, + Pressure = 10.0, + PressureIdle = 10.0, + PressureSp = 10.0, + RotorSpeed = 10.0, + RotorTorque = 10.0, + RotorTorqueSp = 10.0, + RotorTorqueLimitMax = 10.0, + Speed = 10.0 + } + }; - private static DataSaubStatDto ConvertToDto(DataSaubStat entity, TimeSpan timeZoneOffset) - { - var dto = entity.Adapt(); - dto.DateStart = dto.DateStart.ToOffset(timeZoneOffset); - dto.DateEnd = dto.DateEnd.ToOffset(timeZoneOffset); + private static DataSaubStatDto ConvertToDto(DataSaubStat entity, TimeSpan timeZoneOffset) + { + var dto = entity.Adapt(); + dto.DateStart = dto.DateStart.ToOffset(timeZoneOffset); + dto.DateEnd = dto.DateEnd.ToOffset(timeZoneOffset); - return dto; - } + return dto; + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/WebAppFactoryFixture.cs b/AsbCloudWebApi.IntegrationTests/WebAppFactoryFixture.cs index b3edf988..11e9aa78 100644 --- a/AsbCloudWebApi.IntegrationTests/WebAppFactoryFixture.cs +++ b/AsbCloudWebApi.IntegrationTests/WebAppFactoryFixture.cs @@ -14,78 +14,78 @@ namespace AsbCloudWebApi.IntegrationTests; public class WebAppFactoryFixture : WebApplicationFactory { - private static readonly JsonSerializerOptions JsonSerializerOptions = new() - { - PropertyNamingPolicy = JsonNamingPolicy.CamelCase, - PropertyNameCaseInsensitive = true, - Converters = { new ValidationResultConverter() } - }; + private static readonly JsonSerializerOptions JsonSerializerOptions = new() + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + PropertyNameCaseInsensitive = true, + Converters = { new ValidationResultConverter() } + }; - private static readonly RefitSettings RefitSettings = new(new SystemTextJsonContentSerializer(JsonSerializerOptions)); + private static readonly RefitSettings RefitSettings = new(new SystemTextJsonContentSerializer(JsonSerializerOptions)); - private readonly string connectionString; + private readonly string connectionString; - public WebAppFactoryFixture() - { - var configuration = new ConfigurationBuilder() - .AddJsonFile("appsettings.Tests.json") - .Build(); - - var dbConnection = configuration.GetSection("DbConnection").Get()!; - connectionString = dbConnection.GetConnectionString(); - } - - protected override void ConfigureWebHost(IWebHostBuilder builder) - { - builder.ConfigureServices(services => - { - var descriptor = services.SingleOrDefault(d => d.ServiceType == typeof(DbContextOptions)); + public WebAppFactoryFixture() + { + var configuration = new ConfigurationBuilder() + .AddJsonFile("appsettings.Tests.json") + .Build(); + + var dbConnection = configuration.GetSection("DbConnection").Get()!; + connectionString = dbConnection.GetConnectionString(); + } + + protected override void ConfigureWebHost(IWebHostBuilder builder) + { + builder.ConfigureServices(services => + { + var descriptor = services.SingleOrDefault(d => d.ServiceType == typeof(DbContextOptions)); - if (descriptor != null) - services.Remove(descriptor); + if (descriptor != null) + services.Remove(descriptor); - services.AddDbContext(options => - options.UseNpgsql(connectionString)); + services.AddDbContext(options => + options.UseNpgsql(connectionString)); - var serviceProvider = services.BuildServiceProvider(); + var serviceProvider = services.BuildServiceProvider(); - using var scope = serviceProvider.CreateScope(); - var scopedServices = scope.ServiceProvider; - var dbContext = scopedServices.GetRequiredService(); + using var scope = serviceProvider.CreateScope(); + var scopedServices = scope.ServiceProvider; + var dbContext = scopedServices.GetRequiredService(); - dbContext.Database.EnsureCreatedAndMigrated(); - dbContext.Deposits.AddRange(Data.Defaults.Deposits); - dbContext.SaveChanges(); - }); - } + dbContext.Database.EnsureCreatedAndMigrated(); + dbContext.Deposits.AddRange(Data.Defaults.Deposits); + dbContext.SaveChanges(); + }); + } - public override async ValueTask DisposeAsync() - { - var dbContext = new AsbCloudDbContext( - new DbContextOptionsBuilder() - .UseNpgsql(connectionString) - .Options); + public override async ValueTask DisposeAsync() + { + var dbContext = new AsbCloudDbContext( + new DbContextOptionsBuilder() + .UseNpgsql(connectionString) + .Options); - await dbContext.Database.EnsureDeletedAsync(); - } + await dbContext.Database.EnsureDeletedAsync(); + } - public T GetAuthorizedHttpClient(string uriSuffix) - { - var httpClient = GetAuthorizedHttpClient(); - if (string.IsNullOrEmpty(uriSuffix)) - return RestService.For(httpClient, RefitSettings); + public T GetAuthorizedHttpClient(string uriSuffix) + { + var httpClient = GetAuthorizedHttpClient(); + if (string.IsNullOrEmpty(uriSuffix)) + return RestService.For(httpClient, RefitSettings); - if (httpClient.BaseAddress is not null) - httpClient.BaseAddress = new Uri(httpClient.BaseAddress, uriSuffix); + if (httpClient.BaseAddress is not null) + httpClient.BaseAddress = new Uri(httpClient.BaseAddress, uriSuffix); - return RestService.For(httpClient, RefitSettings); - } + return RestService.For(httpClient, RefitSettings); + } - private HttpClient GetAuthorizedHttpClient() - { - var httpClient = CreateClient(); - var jwtToken = ApiTokenHelper.GetAdminUserToken(); - httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", jwtToken); - return httpClient; - } + private HttpClient GetAuthorizedHttpClient() + { + var httpClient = CreateClient(); + var jwtToken = ApiTokenHelper.GetAdminUserToken(); + httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", jwtToken); + return httpClient; + } } \ No newline at end of file diff --git a/AsbCloudWebApi.IntegrationTests/readme.md b/AsbCloudWebApi.IntegrationTests/readme.md index 6449d67a..132d8d46 100644 --- a/AsbCloudWebApi.IntegrationTests/readme.md +++ b/AsbCloudWebApi.IntegrationTests/readme.md @@ -1,2 +1,2 @@ -Статья от ms https://learn.microsoft.com/ru-ru/aspnet/core/test/integration-tests?view=aspnetcore-6.0 +Статья от ms https://learn.microsoft.com/ru-ru/aspnet/core/test/integration-tests?view=aspnetcore-6.0 refit https://github.com/reactiveui/refit \ No newline at end of file diff --git a/AsbCloudWebApi.Tests/AspExtensions.cs b/AsbCloudWebApi.Tests/AspExtensions.cs index 59a5811d..a7c1aedd 100644 --- a/AsbCloudWebApi.Tests/AspExtensions.cs +++ b/AsbCloudWebApi.Tests/AspExtensions.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; using System.Linq; namespace AsbCloudWebApi.Tests diff --git a/AsbCloudWebApi.Tests/Background/BackgroundWorkerTest.cs b/AsbCloudWebApi.Tests/Background/BackgroundWorkerTest.cs index 962ac43a..3f8dc020 100644 --- a/AsbCloudWebApi.Tests/Background/BackgroundWorkerTest.cs +++ b/AsbCloudWebApi.Tests/Background/BackgroundWorkerTest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Reflection; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudWebApi.Tests/Background/PeriodicBackgroundWorkerTest.cs b/AsbCloudWebApi.Tests/Background/PeriodicBackgroundWorkerTest.cs index 9fc0f6d9..acdfad32 100644 --- a/AsbCloudWebApi.Tests/Background/PeriodicBackgroundWorkerTest.cs +++ b/AsbCloudWebApi.Tests/Background/PeriodicBackgroundWorkerTest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; using System.Reflection; using System.Threading; diff --git a/AsbCloudWebApi.Tests/Background/WorkTest.cs b/AsbCloudWebApi.Tests/Background/WorkTest.cs index 75628370..da1e417c 100644 --- a/AsbCloudWebApi.Tests/Background/WorkTest.cs +++ b/AsbCloudWebApi.Tests/Background/WorkTest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudWebApi.Tests/CommonExtensions.cs b/AsbCloudWebApi.Tests/CommonExtensions.cs index ac32b59f..501fe0e9 100644 --- a/AsbCloudWebApi.Tests/CommonExtensions.cs +++ b/AsbCloudWebApi.Tests/CommonExtensions.cs @@ -1,4 +1,4 @@ -using Mapster; +using Mapster; using System; namespace AsbCloudWebApi.Tests; diff --git a/AsbCloudWebApi.Tests/ReflectionExtensions.cs b/AsbCloudWebApi.Tests/ReflectionExtensions.cs index e08a8e38..23019890 100644 --- a/AsbCloudWebApi.Tests/ReflectionExtensions.cs +++ b/AsbCloudWebApi.Tests/ReflectionExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorDrillingTests.cs b/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorDrillingTests.cs index bd8c5690..13ac5d48 100644 --- a/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorDrillingTests.cs +++ b/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorDrillingTests.cs @@ -8,278 +8,278 @@ namespace AsbCloudWebApi.Tests.Services.DetectedOperations.Detectors; public class DetectorDrillingTests : DetectorDrilling { - private const int idSlide = 5002; - private const int idRotor = 5003; + private const int idSlide = 5002; + private const int idRotor = 5003; - [Theory] - [MemberData(nameof(TelemetryRangeDrillingRotor))] - public void DefineDrillingOperation_ShouldReturn_DrillingRotor(DetectableTelemetry[] telemetryRange) - { - //act - var result = GetSpecificInformation(telemetryRange, 0, telemetryRange.Length); + [Theory] + [MemberData(nameof(TelemetryRangeDrillingRotor))] + public void DefineDrillingOperation_ShouldReturn_DrillingRotor(DetectableTelemetry[] telemetryRange) + { + //act + var result = GetSpecificInformation(telemetryRange, 0, telemetryRange.Length); - //assert - Assert.Equal(idRotor, result.IdCategory); - } + //assert + Assert.Equal(idRotor, result.IdCategory); + } - [Theory] - [MemberData(nameof(TelemetryRangeDrillingSlide))] - public void DefineDrillingOperation_ShouldReturn_DrillingSlide(DetectableTelemetry[] telemetryRange) - { - //act - var result = GetSpecificInformation(telemetryRange, 0, telemetryRange.Length); + [Theory] + [MemberData(nameof(TelemetryRangeDrillingSlide))] + public void DefineDrillingOperation_ShouldReturn_DrillingSlide(DetectableTelemetry[] telemetryRange) + { + //act + var result = GetSpecificInformation(telemetryRange, 0, telemetryRange.Length); - //assert - Assert.Equal(idSlide, result.IdCategory); - } + //assert + Assert.Equal(idSlide, result.IdCategory); + } - [Theory] - [MemberData(nameof(TelemetryRangeDrillingSlideWithOscillation))] - public void DefineDrillingOperation_ShouldReturn_DrillingSlideWithOscillation(DetectableTelemetry[] telemetryRange) - { - //act - var result = GetSpecificInformation(telemetryRange, 0, telemetryRange.Length); + [Theory] + [MemberData(nameof(TelemetryRangeDrillingSlideWithOscillation))] + public void DefineDrillingOperation_ShouldReturn_DrillingSlideWithOscillation(DetectableTelemetry[] telemetryRange) + { + //act + var result = GetSpecificInformation(telemetryRange, 0, telemetryRange.Length); - //assert - var oHasOscillation = result.ExtraData[ExtraDataKeyHasOscillation]; + //assert + var oHasOscillation = result.ExtraData[ExtraDataKeyHasOscillation]; - Assert.Equal(idSlide, result.IdCategory); - Assert.True(oHasOscillation is bool hasOscillation && hasOscillation); - } + Assert.Equal(idSlide, result.IdCategory); + Assert.True(oHasOscillation is bool hasOscillation && hasOscillation); + } - [Fact] - public void IsValidOperationDetectorResult_ShouldReturn_True() - { - //arrange - var operationDetectorResult = new OperationDetectorResult - { - Operation = new DetectedOperationDto - { - DepthStart = 5000, - DepthEnd = 6000, - DateStart = System.DateTimeOffset.Now.AddMinutes(-1), - DateEnd = System.DateTimeOffset.Now, + [Fact] + public void IsValidOperationDetectorResult_ShouldReturn_True() + { + //arrange + var operationDetectorResult = new OperationDetectorResult + { + Operation = new DetectedOperationDto + { + DepthStart = 5000, + DepthEnd = 6000, + DateStart = System.DateTimeOffset.Now.AddMinutes(-1), + DateEnd = System.DateTimeOffset.Now, } - }; + }; - //act - var result = IsValidOperationDetectorResult(operationDetectorResult); - - //assert - Assert.True(result); - } + //act + var result = IsValidOperationDetectorResult(operationDetectorResult); + + //assert + Assert.True(result); + } - [Fact] - public void IsValidOperationDetectorResult_ShouldReturn_False() - { - //arrange - var operationDetectorResult = new OperationDetectorResult - { - Operation = new DetectedOperationDto - { - DepthStart = 5000, - DepthEnd = 5000, + [Fact] + public void IsValidOperationDetectorResult_ShouldReturn_False() + { + //arrange + var operationDetectorResult = new OperationDetectorResult + { + Operation = new DetectedOperationDto + { + DepthStart = 5000, + DepthEnd = 5000, DateStart = System.DateTimeOffset.Now.AddMinutes(-1), DateEnd = System.DateTimeOffset.Now, } - }; + }; - //act - var result = IsValidOperationDetectorResult(operationDetectorResult); - - //assert - Assert.False(result); - } + //act + var result = IsValidOperationDetectorResult(operationDetectorResult); + + //assert + Assert.False(result); + } - public static IEnumerable TelemetryRangeDrillingRotor() - { - yield return new object[] - { - new[] - { - new DetectableTelemetry - { - WellDepth = 4.187f, - Pressure = 27.815952f, - HookWeight = 34.221367f, - BlockPosition = 24.388f, - BitDepth = 4.187f, - RotorSpeed = 40.3f - }, - new DetectableTelemetry - { - WellDepth = 4.232f, - Pressure = 28.080372f, - HookWeight = 34.162174f, - BlockPosition = 24.343f, - BitDepth = 4.232f, - RotorSpeed = 40.3f - }, - new DetectableTelemetry - { - WellDepth = 4.277f, - Pressure = 29.047901f, - HookWeight = 33.688717f, - BlockPosition = 24.298f, - BitDepth = 24.298f, - RotorSpeed = 40.3f - }, - new DetectableTelemetry - { - WellDepth = 4.309f, - Pressure = 29.574032f, - HookWeight = 33.692104f, - BlockPosition = 24.266f, - BitDepth = 4.309f, - RotorSpeed = 40.4f - }, - new DetectableTelemetry - { - WellDepth = 4.324f, - Pressure = 24.007977f, - HookWeight = 34.838448f, - BlockPosition = 24.251f, - BitDepth = 4.324f, - RotorSpeed = 40.5f - }, - new DetectableTelemetry - { - WellDepth = 4.324f, - Pressure = 24.04114f, - HookWeight = 34.423424f, - BlockPosition = 24.252f, - BitDepth = 4.323f, - RotorSpeed = 40.3f - } - } - }; - } + public static IEnumerable TelemetryRangeDrillingRotor() + { + yield return new object[] + { + new[] + { + new DetectableTelemetry + { + WellDepth = 4.187f, + Pressure = 27.815952f, + HookWeight = 34.221367f, + BlockPosition = 24.388f, + BitDepth = 4.187f, + RotorSpeed = 40.3f + }, + new DetectableTelemetry + { + WellDepth = 4.232f, + Pressure = 28.080372f, + HookWeight = 34.162174f, + BlockPosition = 24.343f, + BitDepth = 4.232f, + RotorSpeed = 40.3f + }, + new DetectableTelemetry + { + WellDepth = 4.277f, + Pressure = 29.047901f, + HookWeight = 33.688717f, + BlockPosition = 24.298f, + BitDepth = 24.298f, + RotorSpeed = 40.3f + }, + new DetectableTelemetry + { + WellDepth = 4.309f, + Pressure = 29.574032f, + HookWeight = 33.692104f, + BlockPosition = 24.266f, + BitDepth = 4.309f, + RotorSpeed = 40.4f + }, + new DetectableTelemetry + { + WellDepth = 4.324f, + Pressure = 24.007977f, + HookWeight = 34.838448f, + BlockPosition = 24.251f, + BitDepth = 4.324f, + RotorSpeed = 40.5f + }, + new DetectableTelemetry + { + WellDepth = 4.324f, + Pressure = 24.04114f, + HookWeight = 34.423424f, + BlockPosition = 24.252f, + BitDepth = 4.323f, + RotorSpeed = 40.3f + } + } + }; + } - public static IEnumerable TelemetryRangeDrillingSlide() - { - yield return new object[] - { - new[] - { - new DetectableTelemetry - { - WellDepth = 447.276001f, - Pressure = 26.619421f, - HookWeight = 40.9143829f, - BlockPosition = 4.559f, - BitDepth = 477.265991f, - RotorSpeed = 0 - }, - new DetectableTelemetry - { - WellDepth = 477.289f, - Pressure = 28.716f, - HookWeight = 38.27f, - BlockPosition = 4.5f, - BitDepth = 477.289f, - RotorSpeed = 0.1f - }, - new DetectableTelemetry - { - WellDepth = 477.30899f, - Pressure = 33.953495f, - HookWeight = 38.27f, - BlockPosition = 4.5359997f, - BitDepth = 477.289001f, - RotorSpeed = 0.1f - }, - } - }; - } + public static IEnumerable TelemetryRangeDrillingSlide() + { + yield return new object[] + { + new[] + { + new DetectableTelemetry + { + WellDepth = 447.276001f, + Pressure = 26.619421f, + HookWeight = 40.9143829f, + BlockPosition = 4.559f, + BitDepth = 477.265991f, + RotorSpeed = 0 + }, + new DetectableTelemetry + { + WellDepth = 477.289f, + Pressure = 28.716f, + HookWeight = 38.27f, + BlockPosition = 4.5f, + BitDepth = 477.289f, + RotorSpeed = 0.1f + }, + new DetectableTelemetry + { + WellDepth = 477.30899f, + Pressure = 33.953495f, + HookWeight = 38.27f, + BlockPosition = 4.5359997f, + BitDepth = 477.289001f, + RotorSpeed = 0.1f + }, + } + }; + } - public static IEnumerable TelemetryRangeDrillingSlideWithOscillation() - { - yield return new object[] - { - new[] - { - new DetectableTelemetry - { - WellDepth = 415.306f, - Pressure = 53.731934f, - HookWeight = 41.049942f, - BlockPosition = 28.666f, - BitDepth = 415.293f, - RotorSpeed = 0.3f - }, - new DetectableTelemetry - { - WellDepth = 415.311f, - Pressure = 57.660595f, - HookWeight = 40.898712f, - BlockPosition = 28.648f, - BitDepth = 415.311f, - RotorSpeed = 0.2f - }, - new DetectableTelemetry - { - WellDepth = 415.326f, - Pressure = 59.211086f, - HookWeight = 40.882797f, - BlockPosition = 28.633f, - BitDepth = 415.326f, - RotorSpeed = 0.1f - }, - new DetectableTelemetry - { - WellDepth = 415.344f, - Pressure = 59.484406f, - HookWeight = 40.91972f, - BlockPosition = 28.615f, - BitDepth = 415.344f, - RotorSpeed = 0.2f - }, - new DetectableTelemetry - { - WellDepth = 415.364f, - Pressure = 60.739918f, - HookWeight = 40.795666f, - BlockPosition = 28.595f, - BitDepth = 415.364f, - RotorSpeed = 4.5f - }, - new DetectableTelemetry - { - WellDepth = 415.378f, - Pressure = 62.528984f, - HookWeight = 40.52114f, - BlockPosition = 28.581f, - BitDepth = 415.378f, - RotorSpeed = 22.6f - }, - new DetectableTelemetry - { - WellDepth = 415.392f, - Pressure = 67.0039f, - HookWeight = 38.878895f, - BlockPosition = 28.569f, - BitDepth = 415.39f, - RotorSpeed = 50f - }, - new DetectableTelemetry - { - WellDepth = 415.392f, - Pressure = 65.72418f, - HookWeight = 42.53173f, - BlockPosition = 28.622f, - BitDepth = 415.337f, - RotorSpeed = 93f - }, - new DetectableTelemetry - { - WellDepth = 415.392f, - Pressure = 56.82195f, - HookWeight = 43.15844f, - BlockPosition = 28.704f, - BitDepth = 415.255f, - RotorSpeed = 71.5f - } - } - }; - } + public static IEnumerable TelemetryRangeDrillingSlideWithOscillation() + { + yield return new object[] + { + new[] + { + new DetectableTelemetry + { + WellDepth = 415.306f, + Pressure = 53.731934f, + HookWeight = 41.049942f, + BlockPosition = 28.666f, + BitDepth = 415.293f, + RotorSpeed = 0.3f + }, + new DetectableTelemetry + { + WellDepth = 415.311f, + Pressure = 57.660595f, + HookWeight = 40.898712f, + BlockPosition = 28.648f, + BitDepth = 415.311f, + RotorSpeed = 0.2f + }, + new DetectableTelemetry + { + WellDepth = 415.326f, + Pressure = 59.211086f, + HookWeight = 40.882797f, + BlockPosition = 28.633f, + BitDepth = 415.326f, + RotorSpeed = 0.1f + }, + new DetectableTelemetry + { + WellDepth = 415.344f, + Pressure = 59.484406f, + HookWeight = 40.91972f, + BlockPosition = 28.615f, + BitDepth = 415.344f, + RotorSpeed = 0.2f + }, + new DetectableTelemetry + { + WellDepth = 415.364f, + Pressure = 60.739918f, + HookWeight = 40.795666f, + BlockPosition = 28.595f, + BitDepth = 415.364f, + RotorSpeed = 4.5f + }, + new DetectableTelemetry + { + WellDepth = 415.378f, + Pressure = 62.528984f, + HookWeight = 40.52114f, + BlockPosition = 28.581f, + BitDepth = 415.378f, + RotorSpeed = 22.6f + }, + new DetectableTelemetry + { + WellDepth = 415.392f, + Pressure = 67.0039f, + HookWeight = 38.878895f, + BlockPosition = 28.569f, + BitDepth = 415.39f, + RotorSpeed = 50f + }, + new DetectableTelemetry + { + WellDepth = 415.392f, + Pressure = 65.72418f, + HookWeight = 42.53173f, + BlockPosition = 28.622f, + BitDepth = 415.337f, + RotorSpeed = 93f + }, + new DetectableTelemetry + { + WellDepth = 415.392f, + Pressure = 56.82195f, + HookWeight = 43.15844f, + BlockPosition = 28.704f, + BitDepth = 415.255f, + RotorSpeed = 71.5f + } + } + }; + } } \ No newline at end of file diff --git a/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorSlipsTimeTests.cs b/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorSlipsTimeTests.cs index 30d8da83..17029194 100644 --- a/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorSlipsTimeTests.cs +++ b/AsbCloudWebApi.Tests/Services/DetectedOperations/Detectors/DetectorSlipsTimeTests.cs @@ -7,80 +7,80 @@ namespace AsbCloudWebApi.Tests.Services.DetectedOperations.Detectors; public class DetectorSlipsTimeTests { - private const int IdSlipsTime = 5011; + private const int IdSlipsTime = 5011; - private readonly DetectableTelemetry telemetry = new() { + private readonly DetectableTelemetry telemetry = new() { WellDepth = 300, - Pressure = 15, - HookWeight = 20, - BlockPosition = 20, - BitDepth = 151, - AxialLoad = 19, - }; + Pressure = 15, + HookWeight = 20, + BlockPosition = 20, + BitDepth = 151, + AxialLoad = 19, + }; - private readonly DetectorSlipsTime sut = new(); + private readonly DetectorSlipsTime sut = new(); - [Fact] - public void DetectOperation_by_change_block_position_and_axial_load_less_hook_weight_is_success() - { - //arrange - var point0 = telemetry.Copy(); + [Fact] + public void DetectOperation_by_change_block_position_and_axial_load_less_hook_weight_is_success() + { + //arrange + var point0 = telemetry.Copy(); - var point1 = telemetry.Copy(); + var point1 = telemetry.Copy(); point1.BlockPosition = 21; - var telemetries = new[] { point0, point1 }; + var telemetries = new[] { point0, point1 }; - //act - var isDetectOperation = sut.TryDetect(0, telemetries, 0, telemetries.Length - 1, null, out var result); + //act + var isDetectOperation = sut.TryDetect(0, telemetries, 0, telemetries.Length - 1, null, out var result); - //assert - Assert.True(isDetectOperation); - Assert.NotNull(result); - Assert.Equal(IdSlipsTime, result.Operation.IdCategory); - } + //assert + Assert.True(isDetectOperation); + Assert.NotNull(result); + Assert.Equal(IdSlipsTime, result.Operation.IdCategory); + } - [Fact] - public void DetectOperation_by_high_pressure_is_success() - { + [Fact] + public void DetectOperation_by_high_pressure_is_success() + { //arrange var point0 = telemetry.Copy(); - var point1 = telemetry.Copy(); - point1.BlockPosition = 21; - point1.AxialLoad = 30; - point1.HookWeight = 20; - point1.Pressure = 23; + var point1 = telemetry.Copy(); + point1.BlockPosition = 21; + point1.AxialLoad = 30; + point1.HookWeight = 20; + point1.Pressure = 23; - var telemetries = new[] { point0, point1 }; + var telemetries = new[] { point0, point1 }; - //act - var isDetectOperation = sut.TryDetect(0, telemetries, 0, telemetries.Length - 1, null, out var result); + //act + var isDetectOperation = sut.TryDetect(0, telemetries, 0, telemetries.Length - 1, null, out var result); - //assert - Assert.True(isDetectOperation); - Assert.NotNull(result); - Assert.Equal(IdSlipsTime, result.Operation.IdCategory); - } + //assert + Assert.True(isDetectOperation); + Assert.NotNull(result); + Assert.Equal(IdSlipsTime, result.Operation.IdCategory); + } - [Fact] - public void ValidateOperation_with_duration_more_30_minutes_is_invalid() - { + [Fact] + public void ValidateOperation_with_duration_more_30_minutes_is_invalid() + { //arrange var point0 = telemetry.Copy(); var point1 = telemetry.Copy(); point1.BlockPosition = 21; - point1.DateTime = DateTimeOffset.UtcNow.AddMinutes(30); + point1.DateTime = DateTimeOffset.UtcNow.AddMinutes(30); - var telemetries = new[] { point0, point1 }; + var telemetries = new[] { point0, point1 }; - //act - var isDetectOperation = sut.TryDetect(0, telemetries, 0, telemetries.Length - 1, null, out var result); + //act + var isDetectOperation = sut.TryDetect(0, telemetries, 0, telemetries.Length - 1, null, out var result); - //assert - Assert.False(isDetectOperation); - Assert.NotNull(result); - Assert.Equal(IdSlipsTime, result.Operation.IdCategory); - } + //assert + Assert.False(isDetectOperation); + Assert.NotNull(result); + Assert.Equal(IdSlipsTime, result.Operation.IdCategory); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.Tests/Services/DetectedOperations/EnabledSubsystemsTests.cs b/AsbCloudWebApi.Tests/Services/DetectedOperations/EnabledSubsystemsTests.cs index 97f459aa..791a86d8 100644 --- a/AsbCloudWebApi.Tests/Services/DetectedOperations/EnabledSubsystemsTests.cs +++ b/AsbCloudWebApi.Tests/Services/DetectedOperations/EnabledSubsystemsTests.cs @@ -5,38 +5,38 @@ namespace AsbCloudWebApi.Tests.Services.DetectedOperations; public class EnabledSubsystemsTests { - [Fact] - public void Create_enable_subsystem_with_the_systems_turned_off() - { - //act - EnabledSubsystems enableSubsystem = 0; - - //arrange - Assert.False(enableSubsystem.IsAutoRotor); - Assert.False(enableSubsystem.IsAutoSlide); - Assert.False(enableSubsystem.IsAutoConditionig); - Assert.False(enableSubsystem.IsAutoSinking); - Assert.False(enableSubsystem.IsAutoLifting); - Assert.False(enableSubsystem.IsAutoLiftingWithConditionig); - Assert.False(enableSubsystem.IsAutoBlocknig); - Assert.False(enableSubsystem.IsAutoOscillation); - } - - [Fact] - public void Create_enable_subsystem_with_the_auto_slide_subsystem() - { - //act - EnabledSubsystems enableSubsystem = 2; - - //arrange - Assert.True(enableSubsystem.IsAutoSlide); - - Assert.False(enableSubsystem.IsAutoRotor); - Assert.False(enableSubsystem.IsAutoConditionig); - Assert.False(enableSubsystem.IsAutoSinking); - Assert.False(enableSubsystem.IsAutoLifting); - Assert.False(enableSubsystem.IsAutoLiftingWithConditionig); - Assert.False(enableSubsystem.IsAutoBlocknig); - Assert.False(enableSubsystem.IsAutoOscillation); - } + [Fact] + public void Create_enable_subsystem_with_the_systems_turned_off() + { + //act + EnabledSubsystems enableSubsystem = 0; + + //arrange + Assert.False(enableSubsystem.IsAutoRotor); + Assert.False(enableSubsystem.IsAutoSlide); + Assert.False(enableSubsystem.IsAutoConditionig); + Assert.False(enableSubsystem.IsAutoSinking); + Assert.False(enableSubsystem.IsAutoLifting); + Assert.False(enableSubsystem.IsAutoLiftingWithConditionig); + Assert.False(enableSubsystem.IsAutoBlocknig); + Assert.False(enableSubsystem.IsAutoOscillation); + } + + [Fact] + public void Create_enable_subsystem_with_the_auto_slide_subsystem() + { + //act + EnabledSubsystems enableSubsystem = 2; + + //arrange + Assert.True(enableSubsystem.IsAutoSlide); + + Assert.False(enableSubsystem.IsAutoRotor); + Assert.False(enableSubsystem.IsAutoConditionig); + Assert.False(enableSubsystem.IsAutoSinking); + Assert.False(enableSubsystem.IsAutoLifting); + Assert.False(enableSubsystem.IsAutoLiftingWithConditionig); + Assert.False(enableSubsystem.IsAutoBlocknig); + Assert.False(enableSubsystem.IsAutoOscillation); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.Tests/Services/FileServiceTest.cs b/AsbCloudWebApi.Tests/Services/FileServiceTest.cs index b1200160..61dad20e 100644 --- a/AsbCloudWebApi.Tests/Services/FileServiceTest.cs +++ b/AsbCloudWebApi.Tests/Services/FileServiceTest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Threading; diff --git a/AsbCloudWebApi.Tests/Services/Notification/EmailNotificationTransportServiceTests.cs b/AsbCloudWebApi.Tests/Services/Notification/EmailNotificationTransportServiceTests.cs index 386de44d..0d2974b9 100644 --- a/AsbCloudWebApi.Tests/Services/Notification/EmailNotificationTransportServiceTests.cs +++ b/AsbCloudWebApi.Tests/Services/Notification/EmailNotificationTransportServiceTests.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.User; using AsbCloudApp.Repositories; using AsbCloudApp.Services.Notifications; diff --git a/AsbCloudWebApi.Tests/Services/ProcessMaps/ProcessMapReportDataSaubStatServiceTest.cs b/AsbCloudWebApi.Tests/Services/ProcessMaps/ProcessMapReportDataSaubStatServiceTest.cs index b672a763..4aad0d9c 100644 --- a/AsbCloudWebApi.Tests/Services/ProcessMaps/ProcessMapReportDataSaubStatServiceTest.cs +++ b/AsbCloudWebApi.Tests/Services/ProcessMaps/ProcessMapReportDataSaubStatServiceTest.cs @@ -1,4 +1,4 @@ -//using AsbCloudApp.Data; +//using AsbCloudApp.Data; //using AsbCloudApp.Data.ProcessMaps; //using AsbCloudApp.Data.WellOperation; //using AsbCloudApp.Repositories; diff --git a/AsbCloudWebApi.Tests/Services/Trajectory/TrajectoryExportTest.cs b/AsbCloudWebApi.Tests/Services/Trajectory/TrajectoryExportTest.cs index bffab69f..856d09ae 100644 --- a/AsbCloudWebApi.Tests/Services/Trajectory/TrajectoryExportTest.cs +++ b/AsbCloudWebApi.Tests/Services/Trajectory/TrajectoryExportTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.Trajectory.Export; diff --git a/AsbCloudWebApi.Tests/Services/Trajectory/TrajectoryParserTest.cs b/AsbCloudWebApi.Tests/Services/Trajectory/TrajectoryParserTest.cs index 1acd0ad7..64a3caca 100644 --- a/AsbCloudWebApi.Tests/Services/Trajectory/TrajectoryParserTest.cs +++ b/AsbCloudWebApi.Tests/Services/Trajectory/TrajectoryParserTest.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Requests.ParserOptions; using AsbCloudInfrastructure.Services.Trajectory.Parser; @@ -8,38 +8,38 @@ namespace AsbCloudWebApi.Tests.Services.Trajectory; public class TrajectoryParserTest { - private const string UsingTemplateFile = "AsbCloudWebApi.Tests.Services.Trajectory.Templates"; + private const string UsingTemplateFile = "AsbCloudWebApi.Tests.Services.Trajectory.Templates"; - private readonly WellRelatedParserRequest options = new(1); + private readonly WellRelatedParserRequest options = new(1); - private readonly TrajectoryPlanParser trajectoryPlanParser = new(); - private readonly TrajectoryFactManualParser trajectoryFactManualParser = new(); + private readonly TrajectoryPlanParser trajectoryPlanParser = new(); + private readonly TrajectoryFactManualParser trajectoryFactManualParser = new(); - [Fact] - public void Parse_trajectory_plan() - { - var stream = System.Reflection.Assembly.GetExecutingAssembly() - .GetManifestResourceStream($"{UsingTemplateFile}.TrajectoryPlanTemplate.xlsx"); + [Fact] + public void Parse_trajectory_plan() + { + var stream = System.Reflection.Assembly.GetExecutingAssembly() + .GetManifestResourceStream($"{UsingTemplateFile}.TrajectoryPlanTemplate.xlsx"); - if (stream is null) - Assert.Fail("Файла для импорта не существует"); + if (stream is null) + Assert.Fail("Файла для импорта не существует"); - var trajectoryRows = trajectoryPlanParser.Parse(stream, options); + var trajectoryRows = trajectoryPlanParser.Parse(stream, options); - Assert.Equal(3, trajectoryRows.Item.Count()); - } + Assert.Equal(3, trajectoryRows.Item.Count()); + } - [Fact] - public void Parse_trajectory_fact_manual() - { - var stream = System.Reflection.Assembly.GetExecutingAssembly() - .GetManifestResourceStream($"{UsingTemplateFile}.TrajectoryFactManualTemplate.xlsx"); + [Fact] + public void Parse_trajectory_fact_manual() + { + var stream = System.Reflection.Assembly.GetExecutingAssembly() + .GetManifestResourceStream($"{UsingTemplateFile}.TrajectoryFactManualTemplate.xlsx"); - if (stream is null) - Assert.Fail("Файла для импорта не существует"); + if (stream is null) + Assert.Fail("Файла для импорта не существует"); - var trajectoryRows = trajectoryFactManualParser.Parse(stream, options); + var trajectoryRows = trajectoryFactManualParser.Parse(stream, options); - Assert.Equal(4, trajectoryRows.Item.Count()); - } + Assert.Equal(4, trajectoryRows.Item.Count()); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.Tests/Services/TrajectoryVisualizationServiceTest.cs b/AsbCloudWebApi.Tests/Services/TrajectoryVisualizationServiceTest.cs index d6776eb9..a2d31b40 100644 --- a/AsbCloudWebApi.Tests/Services/TrajectoryVisualizationServiceTest.cs +++ b/AsbCloudWebApi.Tests/Services/TrajectoryVisualizationServiceTest.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using System.Threading; using System.Threading.Tasks; using AsbCloudApp.Data; diff --git a/AsbCloudWebApi.Tests/Services/WellCompositeOperation/WellCompositeOperationServiceTest.cs b/AsbCloudWebApi.Tests/Services/WellCompositeOperation/WellCompositeOperationServiceTest.cs index c6f5f5cf..b5ac6d1f 100644 --- a/AsbCloudWebApi.Tests/Services/WellCompositeOperation/WellCompositeOperationServiceTest.cs +++ b/AsbCloudWebApi.Tests/Services/WellCompositeOperation/WellCompositeOperationServiceTest.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.WellOperation; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; diff --git a/AsbCloudWebApi.Tests/Services/WellFinalDocumentsServiceTest.cs b/AsbCloudWebApi.Tests/Services/WellFinalDocumentsServiceTest.cs index a85ca068..18cca46b 100644 --- a/AsbCloudWebApi.Tests/Services/WellFinalDocumentsServiceTest.cs +++ b/AsbCloudWebApi.Tests/Services/WellFinalDocumentsServiceTest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Threading; diff --git a/AsbCloudWebApi.Tests/Services/WellboreServiceTest.cs b/AsbCloudWebApi.Tests/Services/WellboreServiceTest.cs index f256c384..32a1e2a5 100644 --- a/AsbCloudWebApi.Tests/Services/WellboreServiceTest.cs +++ b/AsbCloudWebApi.Tests/Services/WellboreServiceTest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; diff --git a/AsbCloudWebApi.Tests/XLExtensionsTests.cs b/AsbCloudWebApi.Tests/XLExtensionsTests.cs index 601e71e0..87a13dad 100644 --- a/AsbCloudWebApi.Tests/XLExtensionsTests.cs +++ b/AsbCloudWebApi.Tests/XLExtensionsTests.cs @@ -8,163 +8,163 @@ namespace AsbCloudWebApi.Tests; public class XLExtensionsTests { - private const string cellUsed = "A1"; - private const string sheetName = "test"; + private const string cellUsed = "A1"; + private const string sheetName = "test"; - private readonly IXLWorkbook workbook; + private readonly IXLWorkbook workbook; - public XLExtensionsTests() - { - workbook = new XLWorkbook(); - workbook.Worksheets.Add(sheetName); - } + public XLExtensionsTests() + { + workbook = new XLWorkbook(); + workbook.Worksheets.Add(sheetName); + } - [Fact] - public void GetWorksheet_returns_sheet() - { - //act - var sheet = workbook.GetWorksheet(sheetName); + [Fact] + public void GetWorksheet_returns_sheet() + { + //act + var sheet = workbook.GetWorksheet(sheetName); - //assert - Assert.NotNull(sheet); - } + //assert + Assert.NotNull(sheet); + } - [Theory] - [MemberData(nameof(valueTypesToSet))] - public void SetCellValue_returns_success(object value, XLDataType expectedDataType) - { - //act - var cell = GetCell(cellUsed); - cell.SetCellValue(value); + [Theory] + [MemberData(nameof(valueTypesToSet))] + public void SetCellValue_returns_success(object value, XLDataType expectedDataType) + { + //act + var cell = GetCell(cellUsed); + cell.SetCellValue(value); - //assert - Assert.Equal(expectedDataType, cell.DataType); - } - - [Fact] - public void GetCellValue_returns_double() - { - //arrange - const double expectedValue = 2.0d; - SetCellValue(expectedValue); + //assert + Assert.Equal(expectedDataType, cell.DataType); + } + + [Fact] + public void GetCellValue_returns_double() + { + //arrange + const double expectedValue = 2.0d; + SetCellValue(expectedValue); - //act - var actualValue = GetCell(cellUsed).GetCellValue(); - - //assert - Assert.Equal(expectedValue, actualValue); - } + //act + var actualValue = GetCell(cellUsed).GetCellValue(); + + //assert + Assert.Equal(expectedValue, actualValue); + } - [Fact] - public void GetCellValue_returns_float() - { - //arrange - const float expectedValue = 2.0f; - SetCellValue(expectedValue); - - //act - var actualValue = GetCell(cellUsed).GetCellValue(); - - //assert - Assert.Equal(expectedValue, actualValue); - } + [Fact] + public void GetCellValue_returns_float() + { + //arrange + const float expectedValue = 2.0f; + SetCellValue(expectedValue); + + //act + var actualValue = GetCell(cellUsed).GetCellValue(); + + //assert + Assert.Equal(expectedValue, actualValue); + } - [Theory] - [InlineData("test")] - [InlineData(null)] - public void GetCellValue_returns_string(string? expectedValue) - { - //arrange - SetCellValue(expectedValue); - - //act - var actualValue = GetCell(cellUsed).GetCellValue(); - - //assert - Assert.Equal(expectedValue, actualValue); - } + [Theory] + [InlineData("test")] + [InlineData(null)] + public void GetCellValue_returns_string(string? expectedValue) + { + //arrange + SetCellValue(expectedValue); + + //act + var actualValue = GetCell(cellUsed).GetCellValue(); + + //assert + Assert.Equal(expectedValue, actualValue); + } - [Fact] - public void GetCellValue_returns_bool() - { - //arrange - const bool expectedValue = true; - SetCellValue(expectedValue); - - //act - var actualValue = GetCell(cellUsed).GetCellValue(); - - //assert - Assert.Equal(expectedValue, actualValue); - } + [Fact] + public void GetCellValue_returns_bool() + { + //arrange + const bool expectedValue = true; + SetCellValue(expectedValue); + + //act + var actualValue = GetCell(cellUsed).GetCellValue(); + + //assert + Assert.Equal(expectedValue, actualValue); + } - [Fact] - public void GetCellValue_returns_dateTime() - { - //arrange - var expectedValue = DateTime.Parse("2023-01-01"); - SetCellValue(expectedValue); - - //act - var actualValue = GetCell(cellUsed).GetCellValue(); - - //assert - Assert.Equal(expectedValue, actualValue); - Assert.Equal(DateTimeKind.Unspecified, actualValue.Kind); - } + [Fact] + public void GetCellValue_returns_dateTime() + { + //arrange + var expectedValue = DateTime.Parse("2023-01-01"); + SetCellValue(expectedValue); + + //act + var actualValue = GetCell(cellUsed).GetCellValue(); + + //assert + Assert.Equal(expectedValue, actualValue); + Assert.Equal(DateTimeKind.Unspecified, actualValue.Kind); + } - [Fact] - public void GetCellValue_returns_exception() - { - //arrange - SetCellValue("test"); + [Fact] + public void GetCellValue_returns_exception() + { + //arrange + SetCellValue("test"); - //assert - Assert.Throws(() => GetCell(cellUsed).GetCellValue()); - } + //assert + Assert.Throws(() => GetCell(cellUsed).GetCellValue()); + } - [Fact] - public void GetCellValue_returns_nullable() - { - //act - var actualValue = GetCell(cellUsed).GetCellValue(); - - //assert - Assert.Null(actualValue); - } + [Fact] + public void GetCellValue_returns_nullable() + { + //act + var actualValue = GetCell(cellUsed).GetCellValue(); + + //assert + Assert.Null(actualValue); + } - [Fact] - public void SetHyperlink_returns_success() - { - //arrange - const string link = "http://test.ru"; - - //act - GetCell(cellUsed).SetHyperlink(link); - - //assert - var hyperLink = GetCell(cellUsed).GetHyperlink(); - Assert.NotNull(hyperLink); - } + [Fact] + public void SetHyperlink_returns_success() + { + //arrange + const string link = "http://test.ru"; + + //act + GetCell(cellUsed).SetHyperlink(link); + + //assert + var hyperLink = GetCell(cellUsed).GetHyperlink(); + Assert.NotNull(hyperLink); + } - private void SetCellValue(T value) - { - var cell = GetCell(cellUsed); - cell.SetCellValue(value); - } + private void SetCellValue(T value) + { + var cell = GetCell(cellUsed); + cell.SetCellValue(value); + } - public static readonly object[][] valueTypesToSet = - { - new object[] { 2.0d, XLDataType.Number }, - new object[] { 2.0f, XLDataType.Number }, - new object[] { "test", XLDataType.Text }, - new object[] { true, XLDataType.Boolean }, - new object[] { DateTime.UtcNow, XLDataType.DateTime } - }; + public static readonly object[][] valueTypesToSet = + { + new object[] { 2.0d, XLDataType.Number }, + new object[] { 2.0f, XLDataType.Number }, + new object[] { "test", XLDataType.Text }, + new object[] { true, XLDataType.Boolean }, + new object[] { DateTime.UtcNow, XLDataType.DateTime } + }; - private IXLCell GetCell(string cellAddressInRange) - { - var sheet = workbook.GetWorksheet(sheetName); - return sheet.Cell(cellAddressInRange); - } + private IXLCell GetCell(string cellAddressInRange) + { + var sheet = workbook.GetWorksheet(sheetName); + return sheet.Cell(cellAddressInRange); + } } \ No newline at end of file diff --git a/AsbCloudWebApi.Tests/readme.md b/AsbCloudWebApi.Tests/readme.md index 05db6480..f1160266 100644 --- a/AsbCloudWebApi.Tests/readme.md +++ b/AsbCloudWebApi.Tests/readme.md @@ -1 +1 @@ -Доп инфо по тестированию: https://learn.microsoft.com/ru-ru/dotnet/architecture/modern-web-apps-azure/test-asp-net-core-mvc-apps +Доп инфо по тестированию: https://learn.microsoft.com/ru-ru/dotnet/architecture/modern-web-apps-azure/test-asp-net-core-mvc-apps diff --git a/AsbCloudWebApi/Controllers/AdminClusterController.cs b/AsbCloudWebApi/Controllers/AdminClusterController.cs index 511b786b..e99c7d70 100644 --- a/AsbCloudWebApi/Controllers/AdminClusterController.cs +++ b/AsbCloudWebApi/Controllers/AdminClusterController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/AdminCompanyController.cs b/AsbCloudWebApi/Controllers/AdminCompanyController.cs index f6ebb3d2..819c79e0 100644 --- a/AsbCloudWebApi/Controllers/AdminCompanyController.cs +++ b/AsbCloudWebApi/Controllers/AdminCompanyController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/AdminCompanyTypeController.cs b/AsbCloudWebApi/Controllers/AdminCompanyTypeController.cs index eb05c245..71cf7b61 100644 --- a/AsbCloudWebApi/Controllers/AdminCompanyTypeController.cs +++ b/AsbCloudWebApi/Controllers/AdminCompanyTypeController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/AdminDepositController.cs b/AsbCloudWebApi/Controllers/AdminDepositController.cs index b39e4f01..c558d1d6 100644 --- a/AsbCloudWebApi/Controllers/AdminDepositController.cs +++ b/AsbCloudWebApi/Controllers/AdminDepositController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/AdminPermissionController.cs b/AsbCloudWebApi/Controllers/AdminPermissionController.cs index 31d7bec6..4444f335 100644 --- a/AsbCloudWebApi/Controllers/AdminPermissionController.cs +++ b/AsbCloudWebApi/Controllers/AdminPermissionController.cs @@ -10,7 +10,7 @@ using System.Reflection; namespace AsbCloudWebApi.Controllers { /// - /// + /// Редактор разрешений пользователей для админки /// [Route("api/admin/permission")] [ApiController] diff --git a/AsbCloudWebApi/Controllers/AdminTelemetryController.cs b/AsbCloudWebApi/Controllers/AdminTelemetryController.cs index 4fb1f9fb..1275e2cd 100644 --- a/AsbCloudWebApi/Controllers/AdminTelemetryController.cs +++ b/AsbCloudWebApi/Controllers/AdminTelemetryController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/AdminUserController.cs b/AsbCloudWebApi/Controllers/AdminUserController.cs index 1f662ed7..f0784c35 100644 --- a/AsbCloudWebApi/Controllers/AdminUserController.cs +++ b/AsbCloudWebApi/Controllers/AdminUserController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.User; +using AsbCloudApp.Data.User; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using AsbCloudInfrastructure.Repository; diff --git a/AsbCloudWebApi/Controllers/AdminUserRoleController.cs b/AsbCloudWebApi/Controllers/AdminUserRoleController.cs index 38575530..5c19378c 100644 --- a/AsbCloudWebApi/Controllers/AdminUserRoleController.cs +++ b/AsbCloudWebApi/Controllers/AdminUserRoleController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.User; +using AsbCloudApp.Data.User; using AsbCloudApp.Repositories; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/AdminWellController.cs b/AsbCloudWebApi/Controllers/AdminWellController.cs index ac08b383..fa4c6e60 100644 --- a/AsbCloudWebApi/Controllers/AdminWellController.cs +++ b/AsbCloudWebApi/Controllers/AdminWellController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/AuthController.cs b/AsbCloudWebApi/Controllers/AuthController.cs index 6239edc7..3497dcab 100644 --- a/AsbCloudWebApi/Controllers/AuthController.cs +++ b/AsbCloudWebApi/Controllers/AuthController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.User; using AsbCloudApp.Repositories; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/BackgroundWorkController.cs b/AsbCloudWebApi/Controllers/BackgroundWorkController.cs index bb0cdc43..58be1362 100644 --- a/AsbCloudWebApi/Controllers/BackgroundWorkController.cs +++ b/AsbCloudWebApi/Controllers/BackgroundWorkController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudInfrastructure.Background; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/CrudController.cs b/AsbCloudWebApi/Controllers/CrudController.cs index 69ecdb5c..08b422c0 100644 --- a/AsbCloudWebApi/Controllers/CrudController.cs +++ b/AsbCloudWebApi/Controllers/CrudController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/CrudWellRelatedController.cs b/AsbCloudWebApi/Controllers/CrudWellRelatedController.cs index 4bf0a800..245e0db8 100644 --- a/AsbCloudWebApi/Controllers/CrudWellRelatedController.cs +++ b/AsbCloudWebApi/Controllers/CrudWellRelatedController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/DailyReportController.cs b/AsbCloudWebApi/Controllers/DailyReportController.cs index 682dc74d..8ef3d660 100644 --- a/AsbCloudWebApi/Controllers/DailyReportController.cs +++ b/AsbCloudWebApi/Controllers/DailyReportController.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Net; using System.Threading; @@ -28,175 +28,175 @@ namespace AsbCloudWebApi.Controllers; [Authorize] public class DailyReportController : ControllerBase { - private readonly IWellOperationRepository wellOperationRepository; - private readonly IDailyReportService dailyReportService; - private readonly IDailyReportExportService dailyReportExportService; - private readonly IWellService wellService; + private readonly IWellOperationRepository wellOperationRepository; + private readonly IDailyReportService dailyReportService; + private readonly IDailyReportExportService dailyReportExportService; + private readonly IWellService wellService; - public DailyReportController(IWellOperationRepository wellOperationRepository, - IDailyReportService dailyReportService, - IDailyReportExportService dailyReportExportService, - IWellService wellService) - { - this.wellOperationRepository = wellOperationRepository; - this.dailyReportService = dailyReportService; - this.dailyReportExportService = dailyReportExportService; - this.wellService = wellService; - } + public DailyReportController(IWellOperationRepository wellOperationRepository, + IDailyReportService dailyReportService, + IDailyReportExportService dailyReportExportService, + IWellService wellService) + { + this.wellOperationRepository = wellOperationRepository; + this.dailyReportService = dailyReportService; + this.dailyReportExportService = dailyReportExportService; + this.wellService = wellService; + } - private int IdUser - { - get - { - var idUser = User.GetUserId(); + private int IdUser + { + get + { + var idUser = User.GetUserId(); - if (!idUser.HasValue) - throw new ForbidException("Неизвестный пользователь"); + if (!idUser.HasValue) + throw new ForbidException("Неизвестный пользователь"); - return idUser.Value; - } - } + return idUser.Value; + } + } - /// - /// Обновить подпись - /// - /// Id скважины - /// Дата суточного отчёта - /// Обновляемый блок - /// - /// - [HttpPut("sign")] - [Permission] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - public Task UpdateSignBlockAsync(int idWell, DateOnly dateDailyReport, SignBlockDto signBlock, - CancellationToken cancellationToken) => - UpdateOrInsertAsync(idWell, dateDailyReport, signBlock, cancellationToken); + /// + /// Обновить подпись + /// + /// Id скважины + /// Дата суточного отчёта + /// Обновляемый блок + /// + /// + [HttpPut("sign")] + [Permission] + [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] + public Task UpdateSignBlockAsync(int idWell, DateOnly dateDailyReport, SignBlockDto signBlock, + CancellationToken cancellationToken) => + UpdateOrInsertAsync(idWell, dateDailyReport, signBlock, cancellationToken); - /// - /// Обновить наработку подсистем - /// - /// Id скважины - /// Дата суточного отчёта - /// Обновляемый блок - /// - /// - [HttpPut("subsystem")] - [Permission] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - public Task UpdateSubsystemBlockAsync(int idWell, DateOnly dateDailyReport, SubsystemBlockDto subsystemBlock, - CancellationToken cancellationToken) - { - var validSubsystemNames = new[] { "АвтоСПО", "Автопроработка" }; + /// + /// Обновить наработку подсистем + /// + /// Id скважины + /// Дата суточного отчёта + /// Обновляемый блок + /// + /// + [HttpPut("subsystem")] + [Permission] + [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] + public Task UpdateSubsystemBlockAsync(int idWell, DateOnly dateDailyReport, SubsystemBlockDto subsystemBlock, + CancellationToken cancellationToken) + { + var validSubsystemNames = new[] { "АвтоСПО", "Автопроработка" }; - if (subsystemBlock.Subsystems.Any(m => !validSubsystemNames.Contains(m.Name))) - throw new ArgumentInvalidException($"Возможно добавить подсистемы с именами {string.Join(", ", validSubsystemNames)}", - nameof(subsystemBlock.Subsystems)); + if (subsystemBlock.Subsystems.Any(m => !validSubsystemNames.Contains(m.Name))) + throw new ArgumentInvalidException($"Возможно добавить подсистемы с именами {string.Join(", ", validSubsystemNames)}", + nameof(subsystemBlock.Subsystems)); - return UpdateOrInsertAsync(idWell, dateDailyReport, subsystemBlock, cancellationToken); - } + return UpdateOrInsertAsync(idWell, dateDailyReport, subsystemBlock, cancellationToken); + } - /// - /// Обновить баланс времени - /// - /// Id скважины - /// Дата суточного отчёта - /// Обновляемый блок - /// - /// - [HttpPut("timeBalance")] - [Permission] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - public Task UpdateTimeBalanceBlockAsync(int idWell, DateOnly dateDailyReport, TimeBalanceBlockDto timeBalanceBlock, - CancellationToken cancellationToken) - { - var validWellOperationsIds = new[] { 1, 2, 3, 4 }; + /// + /// Обновить баланс времени + /// + /// Id скважины + /// Дата суточного отчёта + /// Обновляемый блок + /// + /// + [HttpPut("timeBalance")] + [Permission] + [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] + public Task UpdateTimeBalanceBlockAsync(int idWell, DateOnly dateDailyReport, TimeBalanceBlockDto timeBalanceBlock, + CancellationToken cancellationToken) + { + var validWellOperationsIds = new[] { 1, 2, 3, 4 }; - if (timeBalanceBlock.WellOperations.Any(o => !validWellOperationsIds.Contains(o.IdWellOperation))) - throw new ArgumentInvalidException($"Возможно добавить операции только с Id: {string.Join(", ", validWellOperationsIds)}", - nameof(timeBalanceBlock.WellOperations)); + if (timeBalanceBlock.WellOperations.Any(o => !validWellOperationsIds.Contains(o.IdWellOperation))) + throw new ArgumentInvalidException($"Возможно добавить операции только с Id: {string.Join(", ", validWellOperationsIds)}", + nameof(timeBalanceBlock.WellOperations)); - var wellSections = wellOperationRepository.GetSectionTypes(); + var wellSections = wellOperationRepository.GetSectionTypes(); - if (wellSections.All(s => s.Id != timeBalanceBlock.IdSection)) - throw new ArgumentInvalidException($"Секция с Id: {timeBalanceBlock.IdSection} не найдена", nameof(timeBalanceBlock.IdSection)); + if (wellSections.All(s => s.Id != timeBalanceBlock.IdSection)) + throw new ArgumentInvalidException($"Секция с Id: {timeBalanceBlock.IdSection} не найдена", nameof(timeBalanceBlock.IdSection)); - return UpdateOrInsertAsync(idWell, dateDailyReport, timeBalanceBlock, cancellationToken); - } + return UpdateOrInsertAsync(idWell, dateDailyReport, timeBalanceBlock, cancellationToken); + } - /// - /// Получить список суточных отчётов по скважине - /// - /// Идентификатор скважины - /// Параметры запроса - /// - /// - [HttpGet] - [ProducesResponseType(typeof(PaginationContainer), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - public async Task GetAsync(int idWell, [FromQuery] FileReportRequest request, CancellationToken cancellationToken) - { - await AssertUserAccessToWell(idWell, cancellationToken); + /// + /// Получить список суточных отчётов по скважине + /// + /// Идентификатор скважины + /// Параметры запроса + /// + /// + [HttpGet] + [ProducesResponseType(typeof(PaginationContainer), StatusCodes.Status200OK)] + [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] + public async Task GetAsync(int idWell, [FromQuery] FileReportRequest request, CancellationToken cancellationToken) + { + await AssertUserAccessToWell(idWell, cancellationToken); - var dailyReports = await dailyReportService.GetAsync(idWell, request, cancellationToken); + var dailyReports = await dailyReportService.GetAsync(idWell, request, cancellationToken); - return Ok(dailyReports); - } - - /// - /// Получить диапазон дат по которым возможно сформировать суточный отчёты - /// - /// Id скважины - /// - /// - [HttpGet("datesRange")] - [ProducesResponseType(typeof(DatesRangeDto), (int)HttpStatusCode.OK)] - public async Task GetDatesRangeAsync(int idWell, CancellationToken cancellationToken) - { - await AssertUserAccessToWell(idWell, cancellationToken); + return Ok(dailyReports); + } + + /// + /// Получить диапазон дат по которым возможно сформировать суточный отчёты + /// + /// Id скважины + /// + /// + [HttpGet("datesRange")] + [ProducesResponseType(typeof(DatesRangeDto), (int)HttpStatusCode.OK)] + public async Task GetDatesRangeAsync(int idWell, CancellationToken cancellationToken) + { + await AssertUserAccessToWell(idWell, cancellationToken); - var datesRanges = await wellOperationRepository.GetDatesRangeAsync(idWell, WellOperation.IdOperationTypeFact, cancellationToken); + var datesRanges = await wellOperationRepository.GetDatesRangeAsync(idWell, WellOperation.IdOperationTypeFact, cancellationToken); - return Ok(datesRanges); - } - - /// - /// Экспорт суточного рапорта - /// - /// Id скважины - /// Дата формирования суточного отчёта - /// - /// - [HttpGet("{dateDailyReport}")] - [ProducesResponseType(typeof(PhysicalFileResult), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - public async Task ExportAsync(int idWell, DateOnly dateDailyReport, CancellationToken cancellationToken) - { - await AssertUserAccessToWell(idWell, cancellationToken); + return Ok(datesRanges); + } + + /// + /// Экспорт суточного рапорта + /// + /// Id скважины + /// Дата формирования суточного отчёта + /// + /// + [HttpGet("{dateDailyReport}")] + [ProducesResponseType(typeof(PhysicalFileResult), StatusCodes.Status200OK)] + [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] + public async Task ExportAsync(int idWell, DateOnly dateDailyReport, CancellationToken cancellationToken) + { + await AssertUserAccessToWell(idWell, cancellationToken); - var dailyReport = await dailyReportExportService.ExportAsync(idWell, dateDailyReport, cancellationToken); + var dailyReport = await dailyReportExportService.ExportAsync(idWell, dateDailyReport, cancellationToken); - return File(dailyReport.File, "application/octet-stream", dailyReport.FileName); - } + return File(dailyReport.File, "application/octet-stream", dailyReport.FileName); + } - private async Task UpdateOrInsertAsync(int idWell, DateOnly dateDailyReport, TBlock block, - CancellationToken cancellationToken) - where TBlock : ItemInfoDto - { - await AssertUserAccessToWell(idWell, cancellationToken); - - var id = await dailyReportService.UpdateOrInsertAsync(idWell, dateDailyReport, IdUser, block, cancellationToken); + private async Task UpdateOrInsertAsync(int idWell, DateOnly dateDailyReport, TBlock block, + CancellationToken cancellationToken) + where TBlock : ItemInfoDto + { + await AssertUserAccessToWell(idWell, cancellationToken); + + var id = await dailyReportService.UpdateOrInsertAsync(idWell, dateDailyReport, IdUser, block, cancellationToken); - return Ok(id); - } + return Ok(id); + } - private async Task AssertUserAccessToWell(int idWell, CancellationToken cancellationToken) - { - var idCompany = User.GetCompanyId(); + private async Task AssertUserAccessToWell(int idWell, CancellationToken cancellationToken) + { + var idCompany = User.GetCompanyId(); - if (!idCompany.HasValue || !await wellService.IsCompanyInvolvedInWellAsync(idCompany.Value, idWell, cancellationToken)) - throw new ForbidException("Нет доступа к скважине"); - } + if (!idCompany.HasValue || !await wellService.IsCompanyInvolvedInWellAsync(idCompany.Value, idWell, cancellationToken)) + throw new ForbidException("Нет доступа к скважине"); + } } \ No newline at end of file diff --git a/AsbCloudWebApi/Controllers/DepositController.cs b/AsbCloudWebApi/Controllers/DepositController.cs index 4e9a287f..b18464b1 100644 --- a/AsbCloudWebApi/Controllers/DepositController.cs +++ b/AsbCloudWebApi/Controllers/DepositController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/DrillerController.cs b/AsbCloudWebApi/Controllers/DrillerController.cs index 5e3ff126..347abe6e 100644 --- a/AsbCloudWebApi/Controllers/DrillerController.cs +++ b/AsbCloudWebApi/Controllers/DrillerController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; diff --git a/AsbCloudWebApi/Controllers/DrillingProgramController.cs b/AsbCloudWebApi/Controllers/DrillingProgramController.cs index 0d22fa34..94e987df 100644 --- a/AsbCloudWebApi/Controllers/DrillingProgramController.cs +++ b/AsbCloudWebApi/Controllers/DrillingProgramController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; diff --git a/AsbCloudWebApi/Controllers/FaqController.cs b/AsbCloudWebApi/Controllers/FaqController.cs index 763d0f6d..6af362b0 100644 --- a/AsbCloudWebApi/Controllers/FaqController.cs +++ b/AsbCloudWebApi/Controllers/FaqController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; diff --git a/AsbCloudWebApi/Controllers/FileController.cs b/AsbCloudWebApi/Controllers/FileController.cs index e9a7990b..0c11e9a0 100644 --- a/AsbCloudWebApi/Controllers/FileController.cs +++ b/AsbCloudWebApi/Controllers/FileController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; diff --git a/AsbCloudWebApi/Controllers/HelpPageController.cs b/AsbCloudWebApi/Controllers/HelpPageController.cs index aadd3fcc..b7d6ccfa 100644 --- a/AsbCloudWebApi/Controllers/HelpPageController.cs +++ b/AsbCloudWebApi/Controllers/HelpPageController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Services; +using AsbCloudApp.Services; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using System.ComponentModel.DataAnnotations; diff --git a/AsbCloudWebApi/Controllers/LimitingParameterController.cs b/AsbCloudWebApi/Controllers/LimitingParameterController.cs index 7157dd03..527e1646 100644 --- a/AsbCloudWebApi/Controllers/LimitingParameterController.cs +++ b/AsbCloudWebApi/Controllers/LimitingParameterController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; diff --git a/AsbCloudWebApi/Controllers/ManualController.cs b/AsbCloudWebApi/Controllers/ManualController.cs index 8c01b873..3ff31d1c 100644 --- a/AsbCloudWebApi/Controllers/ManualController.cs +++ b/AsbCloudWebApi/Controllers/ManualController.cs @@ -14,74 +14,74 @@ namespace AsbCloudWebApi.Controllers; [Authorize] public class ManualController : ControllerBase { - private readonly IManualCatalogService manualCatalogService; + private readonly IManualCatalogService manualCatalogService; - public ManualController(IManualCatalogService manualCatalogService) - { - this.manualCatalogService = manualCatalogService; - } + public ManualController(IManualCatalogService manualCatalogService) + { + this.manualCatalogService = manualCatalogService; + } - /// - /// Сохранение файла - /// - /// Id директории - /// Загружаемый файл - /// - /// - [HttpPost] - [Permission] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status403Forbidden)] - public async Task SaveFileAsync(int idDirectory, - [Required] IFormFile file, - CancellationToken cancellationToken) - { - var idUser = User.GetUserId(); - - if(!idUser.HasValue) - throw new ForbidException("Не удается вас опознать"); - - using var fileStream = file.OpenReadStream(); + /// + /// Сохранение файла + /// + /// Id директории + /// Загружаемый файл + /// + /// + [HttpPost] + [Permission] + [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status403Forbidden)] + public async Task SaveFileAsync(int idDirectory, + [Required] IFormFile file, + CancellationToken cancellationToken) + { + var idUser = User.GetUserId(); + + if(!idUser.HasValue) + throw new ForbidException("Не удается вас опознать"); + + using var fileStream = file.OpenReadStream(); - var id = await manualCatalogService.SaveFileAsync(idDirectory, idUser.Value, file.FileName, fileStream, cancellationToken); + var id = await manualCatalogService.SaveFileAsync(idDirectory, idUser.Value, file.FileName, fileStream, cancellationToken); - return Ok(id); - } + return Ok(id); + } - /// - /// Получение файла - /// - /// Id инструкции - /// - /// - [HttpGet("{id:int}")] - [Permission] - [ProducesResponseType(typeof(PhysicalFileResult), StatusCodes.Status200OK, "application/octet-stream")] - [ProducesResponseType(StatusCodes.Status204NoContent)] - [ProducesResponseType(StatusCodes.Status403Forbidden)] - public async Task GetFileAsync(int id, CancellationToken cancellationToken) - { - var file = await manualCatalogService.GetFileAsync(id, cancellationToken); + /// + /// Получение файла + /// + /// Id инструкции + /// + /// + [HttpGet("{id:int}")] + [Permission] + [ProducesResponseType(typeof(PhysicalFileResult), StatusCodes.Status200OK, "application/octet-stream")] + [ProducesResponseType(StatusCodes.Status204NoContent)] + [ProducesResponseType(StatusCodes.Status403Forbidden)] + public async Task GetFileAsync(int id, CancellationToken cancellationToken) + { + var file = await manualCatalogService.GetFileAsync(id, cancellationToken); - if (!file.HasValue) - return NoContent(); + if (!file.HasValue) + return NoContent(); - return File(file.Value.stream, "application/octet-stream", file.Value.fileName); - } + return File(file.Value.stream, "application/octet-stream", file.Value.fileName); + } - /// - /// Удаление файла - /// - /// Id инструкции - /// - /// - [HttpDelete] - [Permission] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status403Forbidden)] - public async Task DeleteFileAsync(int id, CancellationToken cancellationToken) - { - return Ok(await manualCatalogService.DeleteFileAsync(id, cancellationToken)); - } + /// + /// Удаление файла + /// + /// Id инструкции + /// + /// + [HttpDelete] + [Permission] + [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status403Forbidden)] + public async Task DeleteFileAsync(int id, CancellationToken cancellationToken) + { + return Ok(await manualCatalogService.DeleteFileAsync(id, cancellationToken)); + } } \ No newline at end of file diff --git a/AsbCloudWebApi/Controllers/ManualDirectoryController.cs b/AsbCloudWebApi/Controllers/ManualDirectoryController.cs index f53da16a..97edaa35 100644 --- a/AsbCloudWebApi/Controllers/ManualDirectoryController.cs +++ b/AsbCloudWebApi/Controllers/ManualDirectoryController.cs @@ -14,77 +14,77 @@ namespace AsbCloudWebApi.Controllers; [Authorize] public class ManualDirectoryController : ControllerBase { - private readonly IManualDirectoryRepository manualDirectoryRepository; - private readonly IManualCatalogService manualCatalogService; + private readonly IManualDirectoryRepository manualDirectoryRepository; + private readonly IManualCatalogService manualCatalogService; - public ManualDirectoryController(IManualDirectoryRepository manualDirectoryRepository, - IManualCatalogService manualCatalogService) - { - this.manualDirectoryRepository = manualDirectoryRepository; - this.manualCatalogService = manualCatalogService; - } - - /// - /// Создание директории - /// - /// Название - /// Необязательный параметр. Id родительской директории - /// - /// - [HttpPost] - [Permission("Manual.edit")] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status403Forbidden)] - public async Task AddDirectoryAsync(string name, int? idParent, CancellationToken cancellationToken) - { - return Ok(await manualCatalogService.AddDirectoryAsync(name, idParent, cancellationToken)); - } - - /// - /// Обновление директории - /// - /// - /// Новое название директории - /// - /// - [HttpPut] - [Permission("Manual.edit")] - [ProducesResponseType(StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status403Forbidden)] - public async Task UpdateDirectoryAsync(int id, string name, CancellationToken cancellationToken) - { - await manualCatalogService.UpdateDirectoryAsync(id, name, cancellationToken); - - return Ok(); - } + public ManualDirectoryController(IManualDirectoryRepository manualDirectoryRepository, + IManualCatalogService manualCatalogService) + { + this.manualDirectoryRepository = manualDirectoryRepository; + this.manualCatalogService = manualCatalogService; + } + + /// + /// Создание директории + /// + /// Название + /// Необязательный параметр. Id родительской директории + /// + /// + [HttpPost] + [Permission("Manual.edit")] + [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status403Forbidden)] + public async Task AddDirectoryAsync(string name, int? idParent, CancellationToken cancellationToken) + { + return Ok(await manualCatalogService.AddDirectoryAsync(name, idParent, cancellationToken)); + } + + /// + /// Обновление директории + /// + /// + /// Новое название директории + /// + /// + [HttpPut] + [Permission("Manual.edit")] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status403Forbidden)] + public async Task UpdateDirectoryAsync(int id, string name, CancellationToken cancellationToken) + { + await manualCatalogService.UpdateDirectoryAsync(id, name, cancellationToken); + + return Ok(); + } - /// - /// Удаление директории - /// - /// Идентификатор директории - /// - /// - [HttpDelete] - [Permission("Manual.delete")] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status403Forbidden)] - public async Task DeleteDirectoryAsync(int id, CancellationToken cancellationToken) - { - return Ok(await manualCatalogService.DeleteDirectoryAsync(id, cancellationToken)); - } - - /// - /// Получение дерева категорий - /// - /// - /// - [HttpGet] - [Permission("Manual.get")] - [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status403Forbidden)] - public async Task GetAsync(CancellationToken cancellationToken) - { - return Ok(await manualDirectoryRepository.GetTreeAsync(cancellationToken)); - } + /// + /// Удаление директории + /// + /// Идентификатор директории + /// + /// + [HttpDelete] + [Permission("Manual.delete")] + [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status403Forbidden)] + public async Task DeleteDirectoryAsync(int id, CancellationToken cancellationToken) + { + return Ok(await manualCatalogService.DeleteDirectoryAsync(id, cancellationToken)); + } + + /// + /// Получение дерева категорий + /// + /// + /// + [HttpGet] + [Permission("Manual.get")] + [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status403Forbidden)] + public async Task GetAsync(CancellationToken cancellationToken) + { + return Ok(await manualDirectoryRepository.GetTreeAsync(cancellationToken)); + } } \ No newline at end of file diff --git a/AsbCloudWebApi/Controllers/MeasureController.cs b/AsbCloudWebApi/Controllers/MeasureController.cs index 7dc1afde..f92ef71f 100644 --- a/AsbCloudWebApi/Controllers/MeasureController.cs +++ b/AsbCloudWebApi/Controllers/MeasureController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/MockController.cs b/AsbCloudWebApi/Controllers/MockController.cs index 4cec7ce2..61694445 100644 --- a/AsbCloudWebApi/Controllers/MockController.cs +++ b/AsbCloudWebApi/Controllers/MockController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Exceptions; +using AsbCloudApp.Exceptions; using AsbCloudWebApi.SignalR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/NotificationController.cs b/AsbCloudWebApi/Controllers/NotificationController.cs index b8a8aaea..2ec9840c 100644 --- a/AsbCloudWebApi/Controllers/NotificationController.cs +++ b/AsbCloudWebApi/Controllers/NotificationController.cs @@ -22,129 +22,129 @@ namespace AsbCloudWebApi.Controllers; [Obsolete("Это тестовый контроллер, его нельзя использовать на фронте.")] public class NotificationController : ControllerBase { - private readonly NotificationService notificationService; - private readonly INotificationRepository notificationRepository; - private readonly NotificationPublisher notificationPublisher; + private readonly NotificationService notificationService; + private readonly INotificationRepository notificationRepository; + private readonly NotificationPublisher notificationPublisher; - public NotificationController(NotificationService notificationService, - INotificationRepository notificationRepository, - NotificationPublisher notificationPublisher) - { - this.notificationService = notificationService; - this.notificationRepository = notificationRepository; - this.notificationPublisher = notificationPublisher; - } + public NotificationController(NotificationService notificationService, + INotificationRepository notificationRepository, + NotificationPublisher notificationPublisher) + { + this.notificationService = notificationService; + this.notificationRepository = notificationRepository; + this.notificationPublisher = notificationPublisher; + } - /// - /// Отправка уведомления - /// - /// Параметры запроса - /// - /// - [HttpPost] - public async Task SendAsync(NotifyRequest request, CancellationToken cancellationToken) - { - await notificationService.NotifyAsync(request, cancellationToken); + /// + /// Отправка уведомления + /// + /// Параметры запроса + /// + /// + [HttpPost] + public async Task SendAsync(NotifyRequest request, CancellationToken cancellationToken) + { + await notificationService.NotifyAsync(request, cancellationToken); - return Ok(); - } + return Ok(); + } - /// - /// Обновление уведомления - /// - /// Id уведомления - /// Прочитано ли уведомление - /// - /// - [HttpPut] - public async Task UpdateAsync([Required] int idNotification, - [Required] bool isRead, - CancellationToken cancellationToken) - { - var idUser = User.GetUserId(); + /// + /// Обновление уведомления + /// + /// Id уведомления + /// Прочитано ли уведомление + /// + /// + [HttpPut] + public async Task UpdateAsync([Required] int idNotification, + [Required] bool isRead, + CancellationToken cancellationToken) + { + var idUser = User.GetUserId(); - if (!idUser.HasValue) - return Forbid(); - - await notificationService.UpdateAsync(idNotification, - isRead, - cancellationToken); + if (!idUser.HasValue) + return Forbid(); + + await notificationService.UpdateAsync(idNotification, + isRead, + cancellationToken); - await notificationPublisher.PublishCountUnreadAsync(idUser.Value, cancellationToken); - - return Ok(); - } + await notificationPublisher.PublishCountUnreadAsync(idUser.Value, cancellationToken); + + return Ok(); + } - /// - /// Получение уведомления по Id - /// - /// Id уведомления - /// - /// - [HttpGet("{idNotification}")] - [ProducesResponseType(typeof(NotificationDto), (int)System.Net.HttpStatusCode.OK)] + /// + /// Получение уведомления по Id + /// + /// Id уведомления + /// + /// + [HttpGet("{idNotification}")] + [ProducesResponseType(typeof(NotificationDto), (int)System.Net.HttpStatusCode.OK)] [ProducesResponseType(typeof(ValidationProblemDetails), (int)System.Net.HttpStatusCode.BadRequest)] public async Task GetAsync([Required] int idNotification, - CancellationToken cancellationToken) - { - var notification = await notificationRepository.GetOrDefaultAsync(idNotification, cancellationToken); - if (notification is null) + CancellationToken cancellationToken) + { + var notification = await notificationRepository.GetOrDefaultAsync(idNotification, cancellationToken); + if (notification is null) return this.ValidationBadRequest(nameof(idNotification), "Уведомление не найдено"); return Ok(notification); - } + } - /// - /// Получение списка уведомлений - /// - /// Параметры запроса - /// - /// - [HttpGet] - [ProducesResponseType(typeof(PaginationContainer), (int)System.Net.HttpStatusCode.OK)] - public async Task GetListAsync([FromQuery] NotificationRequest request, - CancellationToken cancellationToken) - { - int? idUser = User.GetUserId(); + /// + /// Получение списка уведомлений + /// + /// Параметры запроса + /// + /// + [HttpGet] + [ProducesResponseType(typeof(PaginationContainer), (int)System.Net.HttpStatusCode.OK)] + public async Task GetListAsync([FromQuery] NotificationRequest request, + CancellationToken cancellationToken) + { + int? idUser = User.GetUserId(); - if (!idUser.HasValue) - return Forbid(); + if (!idUser.HasValue) + return Forbid(); - var result = await notificationRepository.GetNotificationsAsync(idUser.Value, - request, - cancellationToken); + var result = await notificationRepository.GetNotificationsAsync(idUser.Value, + request, + cancellationToken); - return Ok(result); - } + return Ok(result); + } - /// - /// Удаление уведомления - /// - /// Id уведомления - /// - /// - [HttpDelete("{idNotification}")] - public async Task DeleteAsync([Required] int idNotification, - CancellationToken cancellationToken) - { - await notificationRepository.DeleteAsync(idNotification, - cancellationToken); + /// + /// Удаление уведомления + /// + /// Id уведомления + /// + /// + [HttpDelete("{idNotification}")] + public async Task DeleteAsync([Required] int idNotification, + CancellationToken cancellationToken) + { + await notificationRepository.DeleteAsync(idNotification, + cancellationToken); - return Ok(); - } + return Ok(); + } - /// + /// /// Удаление уведомлений /// /// Параметры запроса /// /// [HttpDelete] - public async Task DeleteAsync(NotificationDeleteRequest request, - CancellationToken cancellationToken) - { - await notificationRepository.DeleteAsync(request, cancellationToken); + public async Task DeleteAsync(NotificationDeleteRequest request, + CancellationToken cancellationToken) + { + await notificationRepository.DeleteAsync(request, cancellationToken); - return Ok(); - } + return Ok(); + } } \ No newline at end of file diff --git a/AsbCloudWebApi/Controllers/OperationStatController.cs b/AsbCloudWebApi/Controllers/OperationStatController.cs index 81a9431f..a60cc14f 100644 --- a/AsbCloudWebApi/Controllers/OperationStatController.cs +++ b/AsbCloudWebApi/Controllers/OperationStatController.cs @@ -1,4 +1,4 @@ -using System; +using System; using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; diff --git a/AsbCloudWebApi/Controllers/OperationValueController.cs b/AsbCloudWebApi/Controllers/OperationValueController.cs index 5a58953b..cc0ce11f 100644 --- a/AsbCloudWebApi/Controllers/OperationValueController.cs +++ b/AsbCloudWebApi/Controllers/OperationValueController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/PeriodicBackgroundWorkerController.cs b/AsbCloudWebApi/Controllers/PeriodicBackgroundWorkerController.cs index 0a493456..836f57be 100644 --- a/AsbCloudWebApi/Controllers/PeriodicBackgroundWorkerController.cs +++ b/AsbCloudWebApi/Controllers/PeriodicBackgroundWorkerController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudInfrastructure.Background; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanAntiCrashRotationController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanAntiCrashRotationController.cs index 5278589b..73504353 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanAntiCrashRotationController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanAntiCrashRotationController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Functions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanAutoHoldTFController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanAutoHoldTFController.cs index 645d016b..10a50003 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanAutoHoldTFController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanAutoHoldTFController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Functions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanDamperController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanDamperController.cs index 0ae7430a..92d31dac 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanDamperController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanDamperController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Functions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanDrillTestController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanDrillTestController.cs index 70ecaa23..8335388a 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanDrillTestController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanDrillTestController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Functions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanOscillationController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanOscillationController.cs index c16f5d16..71eec984 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanOscillationController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanOscillationController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Functions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanShockTestController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanShockTestController.cs index 748f5ad6..fd4d40eb 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanShockTestController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanShockTestController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Functions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanStaticMeasurementOutputController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanStaticMeasurementOutputController.cs index 95984016..3aa1ea35 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanStaticMeasurementOutputController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Functions/ProcessMapPlanStaticMeasurementOutputController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Functions; +using AsbCloudApp.Data.ProcessMaps.Functions; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanLoadCapacityController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanLoadCapacityController.cs index 58b2bc3c..ac12c786 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanLoadCapacityController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanLoadCapacityController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanOscillationAnglesController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanOscillationAnglesController.cs index 7b74ad70..3762f57a 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanOscillationAnglesController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanOscillationAnglesController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanPositioningOffTheBottomController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanPositioningOffTheBottomController.cs index df24f26b..73a40e0b 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanPositioningOffTheBottomController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanPositioningOffTheBottomController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanReamingRotorController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanReamingRotorController.cs index 610a815d..a4961fcd 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanReamingRotorController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanReamingRotorController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanReamingSlideController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanReamingSlideController.cs index 049c4dbe..aaf9eb30 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanReamingSlideController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanReamingSlideController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRecordingStaticMeasurementController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRecordingStaticMeasurementController.cs index ba857d80..d3f41b09 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRecordingStaticMeasurementController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRecordingStaticMeasurementController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRotorController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRotorController.cs index e661009c..bba30be5 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRotorController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanRotorController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSlideController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSlideController.cs index 7511277f..633d1399 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSlideController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSlideController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSwitchingOffThePumpController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSwitchingOffThePumpController.cs index 8350cb89..1d65cafa 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSwitchingOffThePumpController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSwitchingOffThePumpController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSwitchingToTheModeController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSwitchingToTheModeController.cs index d749513d..e4256e40 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSwitchingToTheModeController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanSwitchingToTheModeController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanTFOrientationController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanTFOrientationController.cs index 45605c8c..f9ed8fb9 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanTFOrientationController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/Operations/ProcessMapPlanTFOrientationController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Operations; +using AsbCloudApp.Data.ProcessMaps.Operations; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanBaseController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanBaseController.cs index 66b75bc0..a0fdeaf0 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanBaseController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapPlanBaseController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.ProcessMaps; using AsbCloudApp.Exceptions; using AsbCloudApp.Repositories; diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapReportDrillingController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapReportDrillingController.cs index 323c4934..82d9b284 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapReportDrillingController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapReportDrillingController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.ProcessMaps.Report; +using AsbCloudApp.Data.ProcessMaps.Report; using AsbCloudApp.Requests; using AsbCloudApp.Services.ProcessMaps.WellDrilling; using Microsoft.AspNetCore.Authorization; diff --git a/AsbCloudWebApi/Controllers/ProtobufController.cs b/AsbCloudWebApi/Controllers/ProtobufController.cs index 1476db25..298f38bb 100644 --- a/AsbCloudWebApi/Controllers/ProtobufController.cs +++ b/AsbCloudWebApi/Controllers/ProtobufController.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using ProtoBuf.Meta; using System.Collections.Generic; using System.Linq; diff --git a/AsbCloudWebApi/Controllers/ReduceSamplingController.cs b/AsbCloudWebApi/Controllers/ReduceSamplingController.cs index ddb99b2d..4edc1db2 100644 --- a/AsbCloudWebApi/Controllers/ReduceSamplingController.cs +++ b/AsbCloudWebApi/Controllers/ReduceSamplingController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Services; +using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; diff --git a/AsbCloudWebApi/Controllers/ReportController.cs b/AsbCloudWebApi/Controllers/ReportController.cs index ec1b7228..423f36c4 100644 --- a/AsbCloudWebApi/Controllers/ReportController.cs +++ b/AsbCloudWebApi/Controllers/ReportController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/RequestTrackerController.cs b/AsbCloudWebApi/Controllers/RequestTrackerController.cs index 11facc97..82e3a433 100644 --- a/AsbCloudWebApi/Controllers/RequestTrackerController.cs +++ b/AsbCloudWebApi/Controllers/RequestTrackerController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs b/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs index fe5f289e..c593c4d6 100644 --- a/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs @@ -1,4 +1,4 @@ -using System; +using System; using AsbCloudApp.Data.DetectedOperation; using AsbCloudApp.Requests; using AsbCloudApp.Services; @@ -16,182 +16,182 @@ using Microsoft.AspNetCore.Http; namespace AsbCloudWebApi.Controllers.SAUB { - /// - /// Операции определенные по телеметрии САУБ - /// - [Route("api/well/{idWell}/[controller]")] - [ApiController] - [Authorize] - public class DetectedOperationController : ControllerBase - { - private readonly IDetectedOperationRepository detectedOperationRepository; - private readonly IDetectedOperationService detectedOperationService; - private readonly IWellService wellService; - private readonly DetectedOperationExportService detectedOperationExportService; + /// + /// Операции определенные по телеметрии САУБ + /// + [Route("api/well/{idWell}/[controller]")] + [ApiController] + [Authorize] + public class DetectedOperationController : ControllerBase + { + private readonly IDetectedOperationRepository detectedOperationRepository; + private readonly IDetectedOperationService detectedOperationService; + private readonly IWellService wellService; + private readonly DetectedOperationExportService detectedOperationExportService; - public DetectedOperationController(IDetectedOperationService detectedOperationService, - IWellService wellService, - DetectedOperationExportService detectedOperationExportService, - IDetectedOperationRepository detectedOperationRepository) - { - this.detectedOperationService = detectedOperationService; - this.wellService = wellService; - this.detectedOperationExportService = detectedOperationExportService; - this.detectedOperationRepository = detectedOperationRepository; - } + public DetectedOperationController(IDetectedOperationService detectedOperationService, + IWellService wellService, + DetectedOperationExportService detectedOperationExportService, + IDetectedOperationRepository detectedOperationRepository) + { + this.detectedOperationService = detectedOperationService; + this.wellService = wellService; + this.detectedOperationExportService = detectedOperationExportService; + this.detectedOperationRepository = detectedOperationRepository; + } - /// - /// Добавить операции - /// - /// - /// - /// - /// - [HttpPost] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - public async Task InsertRangeAsync(int idWell, IEnumerable dtos, CancellationToken token) - { - var idUser = await AssertUserHasAccessToWellAsync(idWell, token); + /// + /// Добавить операции + /// + /// + /// + /// + /// + [HttpPost] + [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + public async Task InsertRangeAsync(int idWell, IEnumerable dtos, CancellationToken token) + { + var idUser = await AssertUserHasAccessToWellAsync(idWell, token); - var result = await detectedOperationService.InsertRangeManualAsync(idUser, idWell, dtos, token); + var result = await detectedOperationService.InsertRangeManualAsync(idUser, idWell, dtos, token); - return Ok(result); - } + return Ok(result); + } - /// - /// Обновить операции - /// - /// - /// - /// - /// - [HttpPut] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - public async Task UpdateRangeAsync(int idWell, IEnumerable dtos, CancellationToken token) - { - var idUser = await AssertUserHasAccessToWellAsync(idWell, token); + /// + /// Обновить операции + /// + /// + /// + /// + /// + [HttpPut] + [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + public async Task UpdateRangeAsync(int idWell, IEnumerable dtos, CancellationToken token) + { + var idUser = await AssertUserHasAccessToWellAsync(idWell, token); - var result = await detectedOperationService.UpdateRangeManualAsync(idUser, idWell, dtos, token); + var result = await detectedOperationService.UpdateRangeManualAsync(idUser, idWell, dtos, token); - return Ok(result); - } + return Ok(result); + } - /// - /// Удалить операции - /// - /// - /// - /// - /// - [HttpDelete] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - public async Task DeleteRangeAsync(int idWell, IEnumerable ids, CancellationToken token) - { - await AssertUserHasAccessToWellAsync(idWell, token); + /// + /// Удалить операции + /// + /// + /// + /// + /// + [HttpDelete] + [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + public async Task DeleteRangeAsync(int idWell, IEnumerable ids, CancellationToken token) + { + await AssertUserHasAccessToWellAsync(idWell, token); - var result = await detectedOperationRepository.DeleteRangeAsync(ids, token); + var result = await detectedOperationRepository.DeleteRangeAsync(ids, token); - return Ok(result); - } + return Ok(result); + } - /// - /// получить справочник операций. Отличается от операций заводимых вручную. - /// При задании id скважины вернет только те операции, которые определились в телеметрии этой скважины. - /// - /// [опционально] id скважины - /// - /// - [HttpGet] - [Route("/api/well/[controller]/categories")] - [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - public async Task GetCategoriesAsync([FromQuery] int? idWell, CancellationToken token) - { - var result = await detectedOperationService.GetCategoriesAsync(idWell, token); - return Ok(result); - } + /// + /// получить справочник операций. Отличается от операций заводимых вручную. + /// При задании id скважины вернет только те операции, которые определились в телеметрии этой скважины. + /// + /// [опционально] id скважины + /// + /// + [HttpGet] + [Route("/api/well/[controller]/categories")] + [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] + public async Task GetCategoriesAsync([FromQuery] int? idWell, CancellationToken token) + { + var result = await detectedOperationService.GetCategoriesAsync(idWell, token); + return Ok(result); + } - /// - /// Получить список автоопределенных операций для редактирования - /// - /// - /// - /// - /// - [HttpGet] - [ProducesResponseType(typeof(PaginationContainer), StatusCodes.Status200OK)] - public async Task GetPageAsync(int idWell, [FromQuery] DetectedOperationRequest request, - CancellationToken token) - { - await AssertUserHasAccessToWellAsync(idWell, token); + /// + /// Получить список автоопределенных операций для редактирования + /// + /// + /// + /// + /// + [HttpGet] + [ProducesResponseType(typeof(PaginationContainer), StatusCodes.Status200OK)] + public async Task GetPageAsync(int idWell, [FromQuery] DetectedOperationRequest request, + CancellationToken token) + { + await AssertUserHasAccessToWellAsync(idWell, token); - var well = await wellService.GetOrDefaultAsync(idWell, token); + var well = await wellService.GetOrDefaultAsync(idWell, token); - if (well?.IdTelemetry is null) - return NoContent(); + if (well?.IdTelemetry is null) + return NoContent(); - var requestToService = new DetectedOperationByTelemetryRequest(well.IdTelemetry.Value, request); + var requestToService = new DetectedOperationByTelemetryRequest(well.IdTelemetry.Value, request); - var result = await detectedOperationRepository.GetPageAsync(requestToService, token); - return Ok(result); - } - - /// - /// Получить статистику по автоопределенным операциям - /// - /// - /// - /// - /// - [HttpGet("stat")] - [ProducesResponseType(typeof(DetectedOperationListDto), StatusCodes.Status200OK)] - public async Task GetAsync(int idWell, [FromQuery] DetectedOperationRequest request, CancellationToken token) - { - await AssertUserHasAccessToWellAsync(idWell, token); - - var requestToService = new DetectedOperationByWellRequest(idWell, request); + var result = await detectedOperationRepository.GetPageAsync(requestToService, token); + return Ok(result); + } + + /// + /// Получить статистику по автоопределенным операциям + /// + /// + /// + /// + /// + [HttpGet("stat")] + [ProducesResponseType(typeof(DetectedOperationListDto), StatusCodes.Status200OK)] + public async Task GetAsync(int idWell, [FromQuery] DetectedOperationRequest request, CancellationToken token) + { + await AssertUserHasAccessToWellAsync(idWell, token); + + var requestToService = new DetectedOperationByWellRequest(idWell, request); - var result = await detectedOperationService.GetAsync(requestToService, token); - return Ok(result); - } + var result = await detectedOperationService.GetAsync(requestToService, token); + return Ok(result); + } - /// - /// Создает excel файл с операциями по скважине - /// - /// id скважины - /// - [HttpGet("export")] - [Permission] - [ProducesResponseType(typeof(PhysicalFileResult), StatusCodes.Status200OK, "application/octet-stream")] - [ProducesResponseType(StatusCodes.Status204NoContent)] - [ProducesResponseType(typeof(ValidationProblemDetails), (int)System.Net.HttpStatusCode.BadRequest)] - public async Task ExportAsync(int idWell, CancellationToken token) - { - var idCompany = User.GetCompanyId(); + /// + /// Создает excel файл с операциями по скважине + /// + /// id скважины + /// + [HttpGet("export")] + [Permission] + [ProducesResponseType(typeof(PhysicalFileResult), StatusCodes.Status200OK, "application/octet-stream")] + [ProducesResponseType(StatusCodes.Status204NoContent)] + [ProducesResponseType(typeof(ValidationProblemDetails), (int)System.Net.HttpStatusCode.BadRequest)] + public async Task ExportAsync(int idWell, CancellationToken token) + { + var idCompany = User.GetCompanyId(); - if (idCompany is null) - return Forbid(); + if (idCompany is null) + return Forbid(); - var host = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}"; - var stream = await detectedOperationExportService.ExportAsync(idWell, host, token); + var host = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}"; + var stream = await detectedOperationExportService.ExportAsync(idWell, host, token); - return File(stream, "application/octet-stream", "operations.xlsx"); - } + return File(stream, "application/octet-stream", "operations.xlsx"); + } - private async Task AssertUserHasAccessToWellAsync(int idWell, CancellationToken token) - { - var idUser = User.GetUserId(); - var idCompany = User.GetCompanyId(); + private async Task AssertUserHasAccessToWellAsync(int idWell, CancellationToken token) + { + var idUser = User.GetUserId(); + var idCompany = User.GetCompanyId(); - if (!idUser.HasValue) - throw new ForbidException("Неизвестный пользователь"); + if (!idUser.HasValue) + throw new ForbidException("Неизвестный пользователь"); - if (!idCompany.HasValue) - throw new ForbidException("Нет доступа к скважине"); + if (!idCompany.HasValue) + throw new ForbidException("Нет доступа к скважине"); - if (!await wellService.IsCompanyInvolvedInWellAsync(idCompany.Value, idWell, token)) - throw new ForbidException("Нет доступа к скважине"); + if (!await wellService.IsCompanyInvolvedInWellAsync(idCompany.Value, idWell, token)) + throw new ForbidException("Нет доступа к скважине"); - return idUser.Value; - } - } + return idUser.Value; + } + } } \ No newline at end of file diff --git a/AsbCloudWebApi/Controllers/SAUB/GtrWitsController.cs b/AsbCloudWebApi/Controllers/SAUB/GtrWitsController.cs index f234d33c..460eb773 100644 --- a/AsbCloudWebApi/Controllers/SAUB/GtrWitsController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/GtrWitsController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.GTR; +using AsbCloudApp.Data.GTR; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; diff --git a/AsbCloudWebApi/Controllers/SAUB/MessageController.cs b/AsbCloudWebApi/Controllers/SAUB/MessageController.cs index 81e710b3..086ddd69 100644 --- a/AsbCloudWebApi/Controllers/SAUB/MessageController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/MessageController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using AsbCloudApp.Services; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/SAUB/Readme.md b/AsbCloudWebApi/Controllers/SAUB/Readme.md index 8b9fb760..337eebe1 100644 --- a/AsbCloudWebApi/Controllers/SAUB/Readme.md +++ b/AsbCloudWebApi/Controllers/SAUB/Readme.md @@ -1 +1 @@ -Папка содержит controllers для получаемых от панели оператора САУБ запросов. \ No newline at end of file +Папка содержит controllers для получаемых от панели оператора САУБ запросов. \ No newline at end of file diff --git a/AsbCloudWebApi/Controllers/SAUB/SetpointsController.cs b/AsbCloudWebApi/Controllers/SAUB/SetpointsController.cs index 59711fa3..e6d82c21 100644 --- a/AsbCloudWebApi/Controllers/SAUB/SetpointsController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/SetpointsController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/SAUB/TelemetryController.cs b/AsbCloudWebApi/Controllers/SAUB/TelemetryController.cs index 815f2acc..d5f1a71a 100644 --- a/AsbCloudWebApi/Controllers/SAUB/TelemetryController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/TelemetryController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs b/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs index 5ff378de..0b271f0b 100644 --- a/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/TelemetryDataBaseController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; diff --git a/AsbCloudWebApi/Controllers/SAUB/TelemetryDataSaubController.cs b/AsbCloudWebApi/Controllers/SAUB/TelemetryDataSaubController.cs index e3791655..d760efab 100644 --- a/AsbCloudWebApi/Controllers/SAUB/TelemetryDataSaubController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/TelemetryDataSaubController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using AsbCloudWebApi.SignalR.Clients; diff --git a/AsbCloudWebApi/Controllers/SAUB/TelemetryDataSpinController.cs b/AsbCloudWebApi/Controllers/SAUB/TelemetryDataSpinController.cs index 9c81af02..0ff369da 100644 --- a/AsbCloudWebApi/Controllers/SAUB/TelemetryDataSpinController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/TelemetryDataSpinController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using AsbCloudWebApi.SignalR.Clients; diff --git a/AsbCloudWebApi/Controllers/SAUB/TelemetryWirelineRunOutController.cs b/AsbCloudWebApi/Controllers/SAUB/TelemetryWirelineRunOutController.cs index ba11dd9d..719190a7 100644 --- a/AsbCloudWebApi/Controllers/SAUB/TelemetryWirelineRunOutController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/TelemetryWirelineRunOutController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using Microsoft.AspNetCore.Authorization; diff --git a/AsbCloudWebApi/Controllers/ScheduleController.cs b/AsbCloudWebApi/Controllers/ScheduleController.cs index cc56a296..6effe4e6 100644 --- a/AsbCloudWebApi/Controllers/ScheduleController.cs +++ b/AsbCloudWebApi/Controllers/ScheduleController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/SlipsStatController.cs b/AsbCloudWebApi/Controllers/SlipsStatController.cs index 1049749d..6c61c0e3 100644 --- a/AsbCloudWebApi/Controllers/SlipsStatController.cs +++ b/AsbCloudWebApi/Controllers/SlipsStatController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/Subsystems/AdminSubsystemController.cs b/AsbCloudWebApi/Controllers/Subsystems/AdminSubsystemController.cs index 454062e1..8872df9f 100644 --- a/AsbCloudWebApi/Controllers/Subsystems/AdminSubsystemController.cs +++ b/AsbCloudWebApi/Controllers/Subsystems/AdminSubsystemController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Subsystems; +using AsbCloudApp.Data.Subsystems; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; diff --git a/AsbCloudWebApi/Controllers/Subsystems/SubsystemController.cs b/AsbCloudWebApi/Controllers/Subsystems/SubsystemController.cs index f8124d8d..8a5b2801 100644 --- a/AsbCloudWebApi/Controllers/Subsystems/SubsystemController.cs +++ b/AsbCloudWebApi/Controllers/Subsystems/SubsystemController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.Subsystems; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/Trajectory/TrajectoryController.cs b/AsbCloudWebApi/Controllers/Trajectory/TrajectoryController.cs index a4521ef8..643aed2c 100644 --- a/AsbCloudWebApi/Controllers/Trajectory/TrajectoryController.cs +++ b/AsbCloudWebApi/Controllers/Trajectory/TrajectoryController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; diff --git a/AsbCloudWebApi/Controllers/Trajectory/TrajectoryEditableController.cs b/AsbCloudWebApi/Controllers/Trajectory/TrajectoryEditableController.cs index 2a734d21..c83eafc8 100644 --- a/AsbCloudWebApi/Controllers/Trajectory/TrajectoryEditableController.cs +++ b/AsbCloudWebApi/Controllers/Trajectory/TrajectoryEditableController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; @@ -22,22 +22,22 @@ namespace AsbCloudWebApi.Controllers.Trajectory [ApiController] [Authorize] public abstract class TrajectoryEditableController : TrajectoryController - where TDto : TrajectoryGeoDto - { - private readonly IParserService parserService; - private readonly ITrajectoryEditableRepository trajectoryRepository; + where TDto : TrajectoryGeoDto + { + private readonly IParserService parserService; + private readonly ITrajectoryEditableRepository trajectoryRepository; - protected TrajectoryEditableController(IWellService wellService, - IParserService parserService, - TrajectoryExportService trajectoryExportService, + protected TrajectoryEditableController(IWellService wellService, + IParserService parserService, + TrajectoryExportService trajectoryExportService, ITrajectoryEditableRepository trajectoryRepository) : base(wellService, trajectoryExportService, trajectoryRepository) - { - this.parserService = parserService; - this.trajectoryRepository = trajectoryRepository; - } - - /// + { + this.parserService = parserService; + this.trajectoryRepository = trajectoryRepository; + } + + /// /// Возвращает excel шаблон для заполнения строк траектории /// /// Запрашиваемый файл @@ -51,104 +51,104 @@ namespace AsbCloudWebApi.Controllers.Trajectory return File(stream, "application/octet-stream", TemplateFileName); } - /// - /// Импортирует координаты из excel (xlsx) файла - /// - /// id скважины - /// Коллекция из одного файла xlsx - /// Токен отмены задачи - /// количество успешно записанных строк в БД - [HttpPost("parse")] - [ProducesResponseType((int)System.Net.HttpStatusCode.OK)] - [ProducesResponseType(typeof(ValidationProblemDetails), (int)System.Net.HttpStatusCode.BadRequest)] - public async Task>> Parse(int idWell, - [FromForm] IFormFileCollection files, - CancellationToken token) - { - var idUser = User.GetUserId(); + /// + /// Импортирует координаты из excel (xlsx) файла + /// + /// id скважины + /// Коллекция из одного файла xlsx + /// Токен отмены задачи + /// количество успешно записанных строк в БД + [HttpPost("parse")] + [ProducesResponseType((int)System.Net.HttpStatusCode.OK)] + [ProducesResponseType(typeof(ValidationProblemDetails), (int)System.Net.HttpStatusCode.BadRequest)] + public async Task>> Parse(int idWell, + [FromForm] IFormFileCollection files, + CancellationToken token) + { + var idUser = User.GetUserId(); - if (!idUser.HasValue) - return Forbid(); + if (!idUser.HasValue) + return Forbid(); - if (!await CanUserAccessToWellAsync(idWell, token)) - return Forbid(); + if (!await CanUserAccessToWellAsync(idWell, token)) + return Forbid(); - var stream = files.GetExcelFile(); + var stream = files.GetExcelFile(); - try - { - var options = new WellRelatedParserRequest(idWell); - var dto = parserService.Parse(stream, options); - - return Ok(dto); - } - catch (FileFormatException ex) - { - return this.ValidationBadRequest(nameof(files), ex.Message); - } - } - - /// - /// Добавление - /// - /// - /// - /// - /// - [HttpPost] - [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] - public async Task InsertRangeAsync(int idWell, [FromBody] IEnumerable dtos, CancellationToken token) - { - if (!await CanUserAccessToWellAsync(idWell, token)) - return Forbid(); - - var idUser = User.GetUserId(); - - if (!idUser.HasValue) - return Forbid(); - - foreach (var dto in dtos) - { - dto.IdUser = idUser.Value; - dto.IdWell = idWell; - } + try + { + var options = new WellRelatedParserRequest(idWell); + var dto = parserService.Parse(stream, options); + + return Ok(dto); + } + catch (FileFormatException ex) + { + return this.ValidationBadRequest(nameof(files), ex.Message); + } + } + + /// + /// Добавление + /// + /// + /// + /// + /// + [HttpPost] + [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] + public async Task InsertRangeAsync(int idWell, [FromBody] IEnumerable dtos, CancellationToken token) + { + if (!await CanUserAccessToWellAsync(idWell, token)) + return Forbid(); + + var idUser = User.GetUserId(); + + if (!idUser.HasValue) + return Forbid(); + + foreach (var dto in dtos) + { + dto.IdUser = idUser.Value; + dto.IdWell = idWell; + } - var result = await trajectoryRepository.AddRangeAsync(dtos, token); - return Ok(result); - } + var result = await trajectoryRepository.AddRangeAsync(dtos, token); + return Ok(result); + } - /// - /// Удалить все по скважине и добавить новые - /// - /// - /// - /// - /// - [HttpPost("replace")] - [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] - public async Task ClearAndInsertRangeAsync(int idWell, [FromBody] IEnumerable dtos, CancellationToken token) - { - //TODO: это вся радость требует рефакторинга. - //Удаление с добавлением новых записей должно происходить в рамках одной транзакции, да и вообще должно быть реализовано на уровне репозиторий. - //Рефакторинг будет когда доберёмся до журнала изменений для траекторий. - if (!await CanUserAccessToWellAsync(idWell, token)) - return Forbid(); - - var idUser = User.GetUserId(); - - if (!idUser.HasValue) - return Forbid(); - - foreach (var dto in dtos) - { - dto.IdUser = idUser.Value; - dto.IdWell = idWell; - } + /// + /// Удалить все по скважине и добавить новые + /// + /// + /// + /// + /// + [HttpPost("replace")] + [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] + public async Task ClearAndInsertRangeAsync(int idWell, [FromBody] IEnumerable dtos, CancellationToken token) + { + //TODO: это вся радость требует рефакторинга. + //Удаление с добавлением новых записей должно происходить в рамках одной транзакции, да и вообще должно быть реализовано на уровне репозиторий. + //Рефакторинг будет когда доберёмся до журнала изменений для траекторий. + if (!await CanUserAccessToWellAsync(idWell, token)) + return Forbid(); + + var idUser = User.GetUserId(); + + if (!idUser.HasValue) + return Forbid(); + + foreach (var dto in dtos) + { + dto.IdUser = idUser.Value; + dto.IdWell = idWell; + } - await trajectoryRepository.DeleteByIdWellAsync(idWell, token); - var result = await trajectoryRepository.AddRangeAsync(dtos, token); - return Ok(result); - } + await trajectoryRepository.DeleteByIdWellAsync(idWell, token); + var result = await trajectoryRepository.AddRangeAsync(dtos, token); + return Ok(result); + } /// /// Изменить выбранную строку с координатами diff --git a/AsbCloudWebApi/Controllers/Trajectory/TrajectoryFactManualController.cs b/AsbCloudWebApi/Controllers/Trajectory/TrajectoryFactManualController.cs index d0bd33b5..3f096fb1 100644 --- a/AsbCloudWebApi/Controllers/Trajectory/TrajectoryFactManualController.cs +++ b/AsbCloudWebApi/Controllers/Trajectory/TrajectoryFactManualController.cs @@ -14,13 +14,13 @@ namespace AsbCloudWebApi.Controllers.Trajectory; [Route("api/well/{idWell}/[controller]")] public class TrajectoryFactManualController : TrajectoryEditableController { - protected override string TemplateFileName => "ЕЦП_шаблон_файла_фактическая_траектория.xlsx"; + protected override string TemplateFileName => "ЕЦП_шаблон_файла_фактическая_траектория.xlsx"; - public TrajectoryFactManualController(IWellService wellService, - TrajectoryFactManualExportService trajectoryExportService, - TrajectoryFactManualParser parserService, - ITrajectoryEditableRepository trajectoryRepository) - : base(wellService, parserService, trajectoryExportService, trajectoryRepository) - { - } + public TrajectoryFactManualController(IWellService wellService, + TrajectoryFactManualExportService trajectoryExportService, + TrajectoryFactManualParser parserService, + ITrajectoryEditableRepository trajectoryRepository) + : base(wellService, parserService, trajectoryExportService, trajectoryRepository) + { + } } \ No newline at end of file diff --git a/AsbCloudWebApi/Controllers/Trajectory/TrajectoryPlanController.cs b/AsbCloudWebApi/Controllers/Trajectory/TrajectoryPlanController.cs index 67a54007..10d34ed8 100644 --- a/AsbCloudWebApi/Controllers/Trajectory/TrajectoryPlanController.cs +++ b/AsbCloudWebApi/Controllers/Trajectory/TrajectoryPlanController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.Trajectory; +using AsbCloudApp.Data.Trajectory; using AsbCloudApp.Repositories; using AsbCloudApp.Services; using AsbCloudInfrastructure.Services.Trajectory; @@ -11,45 +11,45 @@ using AsbCloudInfrastructure.Services.Trajectory.Parser; namespace AsbCloudWebApi.Controllers.Trajectory { - /// - /// Плановая траектория (загрузка и хранение) - /// - [Route("api/well/{idWell}/[controller]")] - [ApiController] - public class TrajectoryPlanController : TrajectoryEditableController - { - private readonly TrajectoryService trajectoryVisualizationService; + /// + /// Плановая траектория (загрузка и хранение) + /// + [Route("api/well/{idWell}/[controller]")] + [ApiController] + public class TrajectoryPlanController : TrajectoryEditableController + { + private readonly TrajectoryService trajectoryVisualizationService; - protected override string TemplateFileName => "ЕЦП_шаблон_файла_плановая_траектория.xlsx"; + protected override string TemplateFileName => "ЕЦП_шаблон_файла_плановая_траектория.xlsx"; - public TrajectoryPlanController(IWellService wellService, - TrajectoryPlanParser parserService, - TrajectoryPlanExportService trajectoryExportService, - ITrajectoryEditableRepository trajectoryRepository, - TrajectoryService trajectoryVisualizationService) - : base(wellService, parserService, trajectoryExportService, trajectoryRepository) - { - this.trajectoryVisualizationService = trajectoryVisualizationService; - } + public TrajectoryPlanController(IWellService wellService, + TrajectoryPlanParser parserService, + TrajectoryPlanExportService trajectoryExportService, + ITrajectoryEditableRepository trajectoryRepository, + TrajectoryService trajectoryVisualizationService) + : base(wellService, parserService, trajectoryExportService, trajectoryRepository) + { + this.trajectoryVisualizationService = trajectoryVisualizationService; + } - /// - /// Получение координат для визуализации траектории (плановой и фактической) - /// - /// - /// - /// - [HttpGet("trajectoryCartesianPlanFact")] - [ProducesResponseType( - typeof(TrajectoryPlanFactDto, IEnumerable>), - (int)System.Net.HttpStatusCode.OK)] - public async Task GetTrajectoryCartesianPlanFactAsync(int idWell, CancellationToken token) - { - if (!await CanUserAccessToWellAsync(idWell, - token).ConfigureAwait(false)) - return Forbid(); + /// + /// Получение координат для визуализации траектории (плановой и фактической) + /// + /// + /// + /// + [HttpGet("trajectoryCartesianPlanFact")] + [ProducesResponseType( + typeof(TrajectoryPlanFactDto, IEnumerable>), + (int)System.Net.HttpStatusCode.OK)] + public async Task GetTrajectoryCartesianPlanFactAsync(int idWell, CancellationToken token) + { + if (!await CanUserAccessToWellAsync(idWell, + token).ConfigureAwait(false)) + return Forbid(); - var result = await trajectoryVisualizationService.GetTrajectoryCartesianAsync(idWell, token); - return Ok(result); - } - } + var result = await trajectoryVisualizationService.GetTrajectoryCartesianAsync(idWell, token); + return Ok(result); + } + } } \ No newline at end of file diff --git a/AsbCloudWebApi/Controllers/UserSettingsController.cs b/AsbCloudWebApi/Controllers/UserSettingsController.cs index f0325b44..04a4d5cb 100644 --- a/AsbCloudWebApi/Controllers/UserSettingsController.cs +++ b/AsbCloudWebApi/Controllers/UserSettingsController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Exceptions; +using AsbCloudApp.Exceptions; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/WITS/WitsControllerAbstract.cs b/AsbCloudWebApi/Controllers/WITS/WitsControllerAbstract.cs index 0e29ddd9..1c050b66 100644 --- a/AsbCloudWebApi/Controllers/WITS/WitsControllerAbstract.cs +++ b/AsbCloudWebApi/Controllers/WITS/WitsControllerAbstract.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using Microsoft.AspNetCore.Authorization; diff --git a/AsbCloudWebApi/Controllers/WITS/WitsInfoController.cs b/AsbCloudWebApi/Controllers/WITS/WitsInfoController.cs index c1298cfb..023a4314 100644 --- a/AsbCloudWebApi/Controllers/WITS/WitsInfoController.cs +++ b/AsbCloudWebApi/Controllers/WITS/WitsInfoController.cs @@ -1,4 +1,4 @@ -using AsbCloudInfrastructure.Services; +using AsbCloudInfrastructure.Services; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; diff --git a/AsbCloudWebApi/Controllers/WITS/WitsRecord1Controller.cs b/AsbCloudWebApi/Controllers/WITS/WitsRecord1Controller.cs index 59191dfb..f1c0043b 100644 --- a/AsbCloudWebApi/Controllers/WITS/WitsRecord1Controller.cs +++ b/AsbCloudWebApi/Controllers/WITS/WitsRecord1Controller.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.WITS; +using AsbCloudApp.Data.WITS; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/WITS/WitsRecord50Controller.cs b/AsbCloudWebApi/Controllers/WITS/WitsRecord50Controller.cs index 0cef1bcc..3a2a04fb 100644 --- a/AsbCloudWebApi/Controllers/WITS/WitsRecord50Controller.cs +++ b/AsbCloudWebApi/Controllers/WITS/WitsRecord50Controller.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.WITS; +using AsbCloudApp.Data.WITS; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/WITS/WitsRecord60Controller.cs b/AsbCloudWebApi/Controllers/WITS/WitsRecord60Controller.cs index 08c796d6..ddbdcaad 100644 --- a/AsbCloudWebApi/Controllers/WITS/WitsRecord60Controller.cs +++ b/AsbCloudWebApi/Controllers/WITS/WitsRecord60Controller.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.WITS; +using AsbCloudApp.Data.WITS; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/WITS/WitsRecord61Controller.cs b/AsbCloudWebApi/Controllers/WITS/WitsRecord61Controller.cs index dc4715c5..51a5e280 100644 --- a/AsbCloudWebApi/Controllers/WITS/WitsRecord61Controller.cs +++ b/AsbCloudWebApi/Controllers/WITS/WitsRecord61Controller.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.WITS; +using AsbCloudApp.Data.WITS; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/WITS/WitsRecord7Controller.cs b/AsbCloudWebApi/Controllers/WITS/WitsRecord7Controller.cs index 05784984..c68ca6ab 100644 --- a/AsbCloudWebApi/Controllers/WITS/WitsRecord7Controller.cs +++ b/AsbCloudWebApi/Controllers/WITS/WitsRecord7Controller.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.WITS; +using AsbCloudApp.Data.WITS; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/WITS/WitsRecord8Controller.cs b/AsbCloudWebApi/Controllers/WITS/WitsRecord8Controller.cs index 67d59ec8..499573ba 100644 --- a/AsbCloudWebApi/Controllers/WITS/WitsRecord8Controller.cs +++ b/AsbCloudWebApi/Controllers/WITS/WitsRecord8Controller.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.WITS; +using AsbCloudApp.Data.WITS; using AsbCloudApp.Services; using AsbCloudWebApi.SignalR; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/WellCompositeController.cs b/AsbCloudWebApi/Controllers/WellCompositeController.cs index 2aebba9f..59a4b867 100644 --- a/AsbCloudWebApi/Controllers/WellCompositeController.cs +++ b/AsbCloudWebApi/Controllers/WellCompositeController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.ProcessMaps; using AsbCloudApp.Repositories; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/WellCompositeOperationController.cs b/AsbCloudWebApi/Controllers/WellCompositeOperationController.cs index 964addae..07272e5d 100644 --- a/AsbCloudWebApi/Controllers/WellCompositeOperationController.cs +++ b/AsbCloudWebApi/Controllers/WellCompositeOperationController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/WellContactController.cs b/AsbCloudWebApi/Controllers/WellContactController.cs index 7fef14f2..a63ec0d9 100644 --- a/AsbCloudWebApi/Controllers/WellContactController.cs +++ b/AsbCloudWebApi/Controllers/WellContactController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Data.User; using AsbCloudApp.Services; using AsbCloudDb.Model; diff --git a/AsbCloudWebApi/Controllers/WellController.cs b/AsbCloudWebApi/Controllers/WellController.cs index 2a0ad437..4f00eb98 100644 --- a/AsbCloudWebApi/Controllers/WellController.cs +++ b/AsbCloudWebApi/Controllers/WellController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Exceptions; using AsbCloudApp.Services; using AsbCloudDb.Model; diff --git a/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs b/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs index 3cd7156b..1d16f564 100644 --- a/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs +++ b/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Controllers/WellOperationController.cs b/AsbCloudWebApi/Controllers/WellOperationController.cs index 5c6383a2..eda82a08 100644 --- a/AsbCloudWebApi/Controllers/WellOperationController.cs +++ b/AsbCloudWebApi/Controllers/WellOperationController.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using AsbCloudApp.Repositories; using AsbCloudApp.Requests; using AsbCloudApp.Services; diff --git a/AsbCloudWebApi/Controllers/WellSectionsController.cs b/AsbCloudWebApi/Controllers/WellSectionsController.cs index aa364439..8f86421d 100644 --- a/AsbCloudWebApi/Controllers/WellSectionsController.cs +++ b/AsbCloudWebApi/Controllers/WellSectionsController.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudWebApi/Controllers/WellboreController.cs b/AsbCloudWebApi/Controllers/WellboreController.cs index b3f77810..947c7e2b 100644 --- a/AsbCloudWebApi/Controllers/WellboreController.cs +++ b/AsbCloudWebApi/Controllers/WellboreController.cs @@ -17,12 +17,12 @@ namespace AsbCloudWebApi.Controllers; [Route("api/[controller]")] public class WellboreController : ControllerBase { - private readonly IWellboreService wellboreService; + private readonly IWellboreService wellboreService; - public WellboreController(IWellboreService wellboreService) - { - this.wellboreService = wellboreService; - } + public WellboreController(IWellboreService wellboreService) + { + this.wellboreService = wellboreService; + } /// /// Получение списка стволов скважин @@ -31,12 +31,12 @@ public class WellboreController : ControllerBase /// /// [HttpGet] - [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - public async Task GetAllAsync([FromQuery] IEnumerable idsWells, - CancellationToken cancellationToken) + [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] + public async Task GetAllAsync([FromQuery] IEnumerable idsWells, + CancellationToken cancellationToken) { - var result = await wellboreService.GetWellboresAsync(idsWells, cancellationToken); + var result = await wellboreService.GetWellboresAsync(idsWells, cancellationToken); return Ok(result); - } + } } \ No newline at end of file diff --git a/AsbCloudWebApi/Conventions/ApiExplorerGroupPerVersionConvention.cs b/AsbCloudWebApi/Conventions/ApiExplorerGroupPerVersionConvention.cs index 69a912cf..db3de7d8 100644 --- a/AsbCloudWebApi/Conventions/ApiExplorerGroupPerVersionConvention.cs +++ b/AsbCloudWebApi/Conventions/ApiExplorerGroupPerVersionConvention.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.Mvc.ApplicationModels; +using Microsoft.AspNetCore.Mvc.ApplicationModels; using System.Linq; namespace AsbCloudWebApi.Conventions diff --git a/AsbCloudWebApi/Converters/DateOnlyJsonConverter.cs b/AsbCloudWebApi/Converters/DateOnlyJsonConverter.cs index 81d0d0ff..c2b0282b 100644 --- a/AsbCloudWebApi/Converters/DateOnlyJsonConverter.cs +++ b/AsbCloudWebApi/Converters/DateOnlyJsonConverter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Text.Json; using System.Text.Json.Serialization; diff --git a/AsbCloudWebApi/Converters/DateOnlyTypeConverter.cs b/AsbCloudWebApi/Converters/DateOnlyTypeConverter.cs index 71d8730d..03f4b552 100644 --- a/AsbCloudWebApi/Converters/DateOnlyTypeConverter.cs +++ b/AsbCloudWebApi/Converters/DateOnlyTypeConverter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel; using System.Globalization; using System.Text.Json; diff --git a/AsbCloudWebApi/Converters/JsonValueJsonConverter.cs b/AsbCloudWebApi/Converters/JsonValueJsonConverter.cs index 386f1234..6ff6c52b 100644 --- a/AsbCloudWebApi/Converters/JsonValueJsonConverter.cs +++ b/AsbCloudWebApi/Converters/JsonValueJsonConverter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.Text.Json.Serialization; using System.Text.Json; diff --git a/AsbCloudWebApi/Converters/TimeOnlyTypeConverter.cs b/AsbCloudWebApi/Converters/TimeOnlyTypeConverter.cs index 02a81ae0..e59b4e2c 100644 --- a/AsbCloudWebApi/Converters/TimeOnlyTypeConverter.cs +++ b/AsbCloudWebApi/Converters/TimeOnlyTypeConverter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel; using System.Globalization; diff --git a/AsbCloudWebApi/DependencyInjection.cs b/AsbCloudWebApi/DependencyInjection.cs index 3551c3c5..8266ad6e 100644 --- a/AsbCloudWebApi/DependencyInjection.cs +++ b/AsbCloudWebApi/DependencyInjection.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.GTR; +using AsbCloudApp.Data.GTR; using AsbCloudApp.IntegrationEvents; using AsbCloudApp.IntegrationEvents.Interfaces; using AsbCloudApp.Repositories; diff --git a/AsbCloudWebApi/Docs/about using DateTime[Offset].md b/AsbCloudWebApi/Docs/about using DateTime[Offset].md index 954748b5..e1483fb0 100644 --- a/AsbCloudWebApi/Docs/about using DateTime[Offset].md +++ b/AsbCloudWebApi/Docs/about using DateTime[Offset].md @@ -1,4 +1,4 @@ -## Проблема +## Проблема Скважины и пользователи ЕЦП расположены на различных часовых поясах. В БД время хранится только в UTC. На страницах ЕЦП время везде должно отображаться в часовом поясе скважины. diff --git a/AsbCloudWebApi/Docs/googleDrive publish manual.md b/AsbCloudWebApi/Docs/googleDrive publish manual.md index 8d5b681e..59f8163e 100644 --- a/AsbCloudWebApi/Docs/googleDrive publish manual.md +++ b/AsbCloudWebApi/Docs/googleDrive publish manual.md @@ -1,4 +1,4 @@ -# учетная запись +# учетная запись asbautodrilling@gmail.com asbautodrilling1! diff --git a/AsbCloudWebApi/Extensions.cs b/AsbCloudWebApi/Extensions.cs index d805eac7..9446e5d7 100644 --- a/AsbCloudWebApi/Extensions.cs +++ b/AsbCloudWebApi/Extensions.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.User; +using AsbCloudApp.Data.User; using AsbCloudWebApi.Converters; using System; using System.Collections.Generic; diff --git a/AsbCloudWebApi/Middlewares/PermissionsMiddlware.cs b/AsbCloudWebApi/Middlewares/PermissionsMiddlware.cs index 1c352b90..3c4eb9d7 100644 --- a/AsbCloudWebApi/Middlewares/PermissionsMiddlware.cs +++ b/AsbCloudWebApi/Middlewares/PermissionsMiddlware.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Repositories; +using AsbCloudApp.Repositories; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Http; diff --git a/AsbCloudWebApi/Middlewares/RequerstTrackerMiddleware.cs b/AsbCloudWebApi/Middlewares/RequerstTrackerMiddleware.cs index 392b3bca..62c3ff56 100644 --- a/AsbCloudWebApi/Middlewares/RequerstTrackerMiddleware.cs +++ b/AsbCloudWebApi/Middlewares/RequerstTrackerMiddleware.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using System.Linq; using System.Threading.Tasks; diff --git a/AsbCloudWebApi/Middlewares/SimplifyExceptionsMiddleware.cs b/AsbCloudWebApi/Middlewares/SimplifyExceptionsMiddleware.cs index 53191eaf..20c995b3 100644 --- a/AsbCloudWebApi/Middlewares/SimplifyExceptionsMiddleware.cs +++ b/AsbCloudWebApi/Middlewares/SimplifyExceptionsMiddleware.cs @@ -1,4 +1,4 @@ -// Ignore Spelling: Middlewares +// Ignore Spelling: Middlewares using AsbCloudApp.Exceptions; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; diff --git a/AsbCloudWebApi/Middlewares/UserConnectionsLimitMiddlware.cs b/AsbCloudWebApi/Middlewares/UserConnectionsLimitMiddlware.cs index ba24a0c9..f905d4f2 100644 --- a/AsbCloudWebApi/Middlewares/UserConnectionsLimitMiddlware.cs +++ b/AsbCloudWebApi/Middlewares/UserConnectionsLimitMiddlware.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/AsbCloudWebApi/PermissionAttribute.cs b/AsbCloudWebApi/PermissionAttribute.cs index 775617a1..4d192eac 100644 --- a/AsbCloudWebApi/PermissionAttribute.cs +++ b/AsbCloudWebApi/PermissionAttribute.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; namespace AsbCloudWebApi diff --git a/AsbCloudWebApi/ProtobufModel.cs b/AsbCloudWebApi/ProtobufModel.cs index fc8b9995..5a248551 100644 --- a/AsbCloudWebApi/ProtobufModel.cs +++ b/AsbCloudWebApi/ProtobufModel.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using ProtoBuf.Meta; namespace AsbCloudWebApi diff --git a/AsbCloudWebApi/Rest/DrillTest.http b/AsbCloudWebApi/Rest/DrillTest.http index a5348ead..73fb6c7b 100644 --- a/AsbCloudWebApi/Rest/DrillTest.http +++ b/AsbCloudWebApi/Rest/DrillTest.http @@ -7,7 +7,7 @@ @id = 1 @idWell = 55 -### drill test +### получение данных drill test с панели и сохранение их в ЕЦП POST {{baseUrl}}/api/telemetry/{{uid}}/DrillTest Content-Type: {{contentType}} accept: */* @@ -29,13 +29,13 @@ accept: */* } -### drill test +### Получение списка файлов drill test отчётов GET {{baseUrl}}/api/well/{{idWell}}/DrillTest/all Content-Type: {{contentType}} accept: */* Authorization: {{auth}} -### drill test +### Генерация файла с drill test отчётом GET {{baseUrl}}/api/well/{{idWell}}/DrillTest?id={{id}} Content-Type: {{contentTypeForFiles}} accept: */* diff --git a/AsbCloudWebApi/Rest/Readme.md b/AsbCloudWebApi/Rest/Readme.md index 92f52c05..c7a5e45b 100644 --- a/AsbCloudWebApi/Rest/Readme.md +++ b/AsbCloudWebApi/Rest/Readme.md @@ -1,7 +1,7 @@ -# / web-api. +# Эта папка предназначена для хранения файлов для отладки/проверки web-api. - *.http ( *.rest) endpoint api swagger ( postman). +Файлы *.http (или *.rest) позволяют вызывать endpoint api без swagger (или postman). -[ ](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) +[Документация по созданию файлов](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) - 1 1 . +Желательно создавать 1 файл на 1 контроллер. diff --git a/AsbCloudWebApi/Rest/WellContact.http b/AsbCloudWebApi/Rest/WellContact.http index fb45cf3f..f439dadf 100644 --- a/AsbCloudWebApi/Rest/WellContact.http +++ b/AsbCloudWebApi/Rest/WellContact.http @@ -7,25 +7,25 @@ @idWell = 1 @contactTypeId = 1 -### +### получение списка типов контактов GET {{baseUrl}}/api/well/{{idWell}}/WellContact/type Content-Type: {{contentType}} accept: */* Authorization: {{auth}} -### +### Получение контактов по типу контакта и ключу скважины GET {{baseUrl}}/api/well/{{idWell}}/WellContact/type/{{contactTypeId}} Content-Type: {{contentType}} accept: */* Authorization: {{auth}} -### +### Получение контакта по ключу GET {{baseUrl}}/api/well/{{idWell}}/WellContact/{{id}} Content-Type: {{contentType}} accept: */* Authorization: {{auth}} -### +### добавление нового контакта POST {{baseUrl}}/api/well/{{idWell}}/WellContact Content-Type: {{contentType}} accept: */* @@ -38,11 +38,11 @@ Authorization: {{auth}} "FullName": "batman", "Email": "aa@aa.aa", "Phone": "80000000000", - "Position": "", - "Company": " " + "Position": "Повар", + "Company": "Мишлен лтд" } -### +### изменение контакта PUT {{baseUrl}}/api/well/{{idWell}}/WellContact Content-Type: {{contentType}} accept: */* @@ -52,14 +52,14 @@ Authorization: {{auth}} "id" : 2, "IdCompanyType" : 1, "IdWell": 1, - "FullName": " ", + "FullName": "Бэтман Суперменович", "Email": "bb@bb.bb", "Phone": "80000000001", - "Position": "", - "Company": " " + "Position": "Повар", + "Company": "Мишлен лтд" } -### +### Удаление контакта DELETE {{baseUrl}}/api/well/{{idWell}}/WellContact/{{id}} Content-Type: {{contentType}} accept: */* diff --git a/AsbCloudWebApi/SignalR/BaseHub.cs b/AsbCloudWebApi/SignalR/BaseHub.cs index 28de8ab5..9134ce64 100644 --- a/AsbCloudWebApi/SignalR/BaseHub.cs +++ b/AsbCloudWebApi/SignalR/BaseHub.cs @@ -6,9 +6,9 @@ namespace AsbCloudWebApi.SignalR; public abstract class BaseHub : Hub where T : class { - public virtual Task AddToGroup(string groupName) => - Groups.AddToGroupAsync(Context.ConnectionId, groupName); + public virtual Task AddToGroup(string groupName) => + Groups.AddToGroupAsync(Context.ConnectionId, groupName); - public virtual Task RemoveFromGroup(string groupName) => - Groups.RemoveFromGroupAsync(Context.ConnectionId, groupName); + public virtual Task RemoveFromGroup(string groupName) => + Groups.RemoveFromGroupAsync(Context.ConnectionId, groupName); } diff --git a/AsbCloudWebApi/SignalR/Clients/INotificationHubClient.cs b/AsbCloudWebApi/SignalR/Clients/INotificationHubClient.cs index 09c36851..c4cf6500 100644 --- a/AsbCloudWebApi/SignalR/Clients/INotificationHubClient.cs +++ b/AsbCloudWebApi/SignalR/Clients/INotificationHubClient.cs @@ -1,4 +1,4 @@ -using AsbCloudWebApi.SignalR.Messages; +using AsbCloudWebApi.SignalR.Messages; using SignalRSwaggerGen.Attributes; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudWebApi/SignalR/Clients/IReportHubClient.cs b/AsbCloudWebApi/SignalR/Clients/IReportHubClient.cs index dde7da3f..d5b5b58b 100644 --- a/AsbCloudWebApi/SignalR/Clients/IReportHubClient.cs +++ b/AsbCloudWebApi/SignalR/Clients/IReportHubClient.cs @@ -1,4 +1,4 @@ -using SignalRSwaggerGen.Attributes; +using SignalRSwaggerGen.Attributes; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudWebApi/SignalR/Clients/ITelemetryHubClient.cs b/AsbCloudWebApi/SignalR/Clients/ITelemetryHubClient.cs index 5e8869cf..0c2e7642 100644 --- a/AsbCloudWebApi/SignalR/Clients/ITelemetryHubClient.cs +++ b/AsbCloudWebApi/SignalR/Clients/ITelemetryHubClient.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data.SAUB; +using AsbCloudApp.Data.SAUB; using SignalRSwaggerGen.Attributes; using System.Collections; using System.Collections.Generic; diff --git a/AsbCloudWebApi/SignalR/Clients/IWellInfoHubClient.cs b/AsbCloudWebApi/SignalR/Clients/IWellInfoHubClient.cs index 110143ed..5f5b42e9 100644 --- a/AsbCloudWebApi/SignalR/Clients/IWellInfoHubClient.cs +++ b/AsbCloudWebApi/SignalR/Clients/IWellInfoHubClient.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Data; +using AsbCloudApp.Data; using SignalRSwaggerGen.Attributes; using System.Threading; using System.Threading.Tasks; diff --git a/AsbCloudWebApi/SignalR/Messages/NotificationMessage.cs b/AsbCloudWebApi/SignalR/Messages/NotificationMessage.cs index 66efaee0..973ad436 100644 --- a/AsbCloudWebApi/SignalR/Messages/NotificationMessage.cs +++ b/AsbCloudWebApi/SignalR/Messages/NotificationMessage.cs @@ -5,7 +5,7 @@ namespace AsbCloudWebApi.SignalR.Messages; public class NotificationMessage { - public IEnumerable? Notifications { get; set; } - - public int CountUnread { get; set; } + public IEnumerable? Notifications { get; set; } + + public int CountUnread { get; set; } } \ No newline at end of file diff --git a/AsbCloudWebApi/SignalR/NotificationHub.cs b/AsbCloudWebApi/SignalR/NotificationHub.cs index 4deea974..7b6aef9d 100644 --- a/AsbCloudWebApi/SignalR/NotificationHub.cs +++ b/AsbCloudWebApi/SignalR/NotificationHub.cs @@ -12,46 +12,46 @@ namespace AsbCloudWebApi.SignalR; [Authorize] public class NotificationHub : BaseHub { - private readonly ConnectionManagerService connectionManagerService; - private readonly NotificationService notificationService; - private readonly NotificationPublisher notificationPublisher; + private readonly ConnectionManagerService connectionManagerService; + private readonly NotificationService notificationService; + private readonly NotificationPublisher notificationPublisher; - public NotificationHub(ConnectionManagerService connectionManagerService, - NotificationService notificationService, - NotificationPublisher notificationPublisher) - { - this.connectionManagerService = connectionManagerService; - this.notificationService = notificationService; - this.notificationPublisher = notificationPublisher; - } + public NotificationHub(ConnectionManagerService connectionManagerService, + NotificationService notificationService, + NotificationPublisher notificationPublisher) + { + this.connectionManagerService = connectionManagerService; + this.notificationService = notificationService; + this.notificationPublisher = notificationPublisher; + } - public override async Task OnConnectedAsync() - { - var idUser = Context.User?.GetUserId(); + public override async Task OnConnectedAsync() + { + var idUser = Context.User?.GetUserId(); - if (!idUser.HasValue) - return; + if (!idUser.HasValue) + return; - string connectionId = Context.ConnectionId; + string connectionId = Context.ConnectionId; - connectionManagerService.AddOrUpdateConnection(idUser.Value, connectionId); + connectionManagerService.AddOrUpdateConnection(idUser.Value, connectionId); - await base.OnConnectedAsync(); + await base.OnConnectedAsync(); - await notificationPublisher.PublishCountUnreadAsync(idUser.Value, CancellationToken.None); + await notificationPublisher.PublishCountUnreadAsync(idUser.Value, CancellationToken.None); - await notificationService.RenotifyAsync(idUser.Value, - CancellationToken.None); - } + await notificationService.RenotifyAsync(idUser.Value, + CancellationToken.None); + } - public override async Task OnDisconnectedAsync(Exception? exception) - { - var idUser = Context.User?.GetUserId(); + public override async Task OnDisconnectedAsync(Exception? exception) + { + var idUser = Context.User?.GetUserId(); - if (!idUser.HasValue) - return; - - connectionManagerService.RemoveConnection(idUser.Value); - await base.OnDisconnectedAsync(exception); - } + if (!idUser.HasValue) + return; + + connectionManagerService.RemoveConnection(idUser.Value); + await base.OnDisconnectedAsync(exception); + } } \ No newline at end of file diff --git a/AsbCloudWebApi/SignalR/ReportsHub.cs b/AsbCloudWebApi/SignalR/ReportsHub.cs index 2bf098f8..f9972f36 100644 --- a/AsbCloudWebApi/SignalR/ReportsHub.cs +++ b/AsbCloudWebApi/SignalR/ReportsHub.cs @@ -1,4 +1,4 @@ -using AsbCloudApp.Requests; +using AsbCloudApp.Requests; using AsbCloudApp.Services; using AsbCloudInfrastructure.Background; using AsbCloudWebApi.SignalR.Clients; diff --git a/AsbCloudWebApi/SignalR/Services/ConnectionManagerService.cs b/AsbCloudWebApi/SignalR/Services/ConnectionManagerService.cs index b85700c3..f451e2d7 100644 --- a/AsbCloudWebApi/SignalR/Services/ConnectionManagerService.cs +++ b/AsbCloudWebApi/SignalR/Services/ConnectionManagerService.cs @@ -4,22 +4,22 @@ namespace AsbCloudWebApi.SignalR.Services; public class ConnectionManagerService { - private readonly ConcurrentDictionary connections = new(); + private readonly ConcurrentDictionary connections = new(); - public void AddOrUpdateConnection(int userId, string connectionId) - { - connections.AddOrUpdate(userId, connectionId, - (key, existingConnectionId) => connectionId); - } + public void AddOrUpdateConnection(int userId, string connectionId) + { + connections.AddOrUpdate(userId, connectionId, + (key, existingConnectionId) => connectionId); + } - public void RemoveConnection(int userId) - { - connections.TryRemove(userId, out _); - } + public void RemoveConnection(int userId) + { + connections.TryRemove(userId, out _); + } - public string? GetConnectionIdByUserId(int userId) - { - connections.TryGetValue(userId, out var connectionId); - return connectionId; - } + public string? GetConnectionIdByUserId(int userId) + { + connections.TryGetValue(userId, out var connectionId); + return connectionId; + } } \ No newline at end of file diff --git a/AsbCloudWebApi/SignalR/Services/NotificationPublisher.cs b/AsbCloudWebApi/SignalR/Services/NotificationPublisher.cs index 05c93a29..6316dff9 100644 --- a/AsbCloudWebApi/SignalR/Services/NotificationPublisher.cs +++ b/AsbCloudWebApi/SignalR/Services/NotificationPublisher.cs @@ -12,65 +12,65 @@ namespace AsbCloudWebApi.SignalR.Services; public class NotificationPublisher { - private readonly ConnectionManagerService connectionManagerService; - private readonly IHubContext notificationHubContext; - private readonly INotificationRepository notificationRepository; + private readonly ConnectionManagerService connectionManagerService; + private readonly IHubContext notificationHubContext; + private readonly INotificationRepository notificationRepository; - public NotificationPublisher(ConnectionManagerService connectionManagerService, - IHubContext notificationHubContext, - INotificationRepository notificationRepository) - { - this.connectionManagerService = connectionManagerService; - this.notificationHubContext = notificationHubContext; - this.notificationRepository = notificationRepository; - } + public NotificationPublisher(ConnectionManagerService connectionManagerService, + IHubContext notificationHubContext, + INotificationRepository notificationRepository) + { + this.connectionManagerService = connectionManagerService; + this.notificationHubContext = notificationHubContext; + this.notificationRepository = notificationRepository; + } - public async Task PublishAsync(IGrouping groupedNotifications, CancellationToken cancellationToken) - { - const int idTransportType = 0; - - var connectionId = connectionManagerService.GetConnectionIdByUserId(groupedNotifications.Key); + public async Task PublishAsync(IGrouping groupedNotifications, CancellationToken cancellationToken) + { + const int idTransportType = 0; + + var connectionId = connectionManagerService.GetConnectionIdByUserId(groupedNotifications.Key); - if (!string.IsNullOrWhiteSpace(connectionId)) - { - foreach (var notification in groupedNotifications) - { - notification.SentDate = DateTimeOffset.UtcNow; - } + if (!string.IsNullOrWhiteSpace(connectionId)) + { + foreach (var notification in groupedNotifications) + { + notification.SentDate = DateTimeOffset.UtcNow; + } - var notifications = groupedNotifications.Select(n => n); - - await notificationRepository.UpdateRangeAsync(notifications, - cancellationToken); - - await PublishMessageAsync(connectionId, new NotificationMessage - { - Notifications = notifications, - CountUnread = await notificationRepository.GetUnreadCountAsync(groupedNotifications.Key, - idTransportType, - cancellationToken) - }, cancellationToken); - } - } + var notifications = groupedNotifications.Select(n => n); + + await notificationRepository.UpdateRangeAsync(notifications, + cancellationToken); + + await PublishMessageAsync(connectionId, new NotificationMessage + { + Notifications = notifications, + CountUnread = await notificationRepository.GetUnreadCountAsync(groupedNotifications.Key, + idTransportType, + cancellationToken) + }, cancellationToken); + } + } - public async Task PublishCountUnreadAsync(int idUser, CancellationToken cancellationToken) - { - var connectionId = connectionManagerService.GetConnectionIdByUserId(idUser); + public async Task PublishCountUnreadAsync(int idUser, CancellationToken cancellationToken) + { + var connectionId = connectionManagerService.GetConnectionIdByUserId(idUser); - if (!string.IsNullOrWhiteSpace(connectionId)) - { - await PublishMessageAsync(connectionId, new NotificationMessage - { - CountUnread = await notificationRepository.GetUnreadCountAsync(idUser, 0, - cancellationToken) - }, cancellationToken); - } - } + if (!string.IsNullOrWhiteSpace(connectionId)) + { + await PublishMessageAsync(connectionId, new NotificationMessage + { + CountUnread = await notificationRepository.GetUnreadCountAsync(idUser, 0, + cancellationToken) + }, cancellationToken); + } + } - private async Task PublishMessageAsync(string connectionId, NotificationMessage message, - CancellationToken cancellationToken) - { - await notificationHubContext.Clients.Client(connectionId) - .ReceiveNotifications(message, cancellationToken); - } + private async Task PublishMessageAsync(string connectionId, NotificationMessage message, + CancellationToken cancellationToken) + { + await notificationHubContext.Clients.Client(connectionId) + .ReceiveNotifications(message, cancellationToken); + } } \ No newline at end of file diff --git a/AsbCloudWebApi/SignalR/Services/SignalRNotificationTransportService.cs b/AsbCloudWebApi/SignalR/Services/SignalRNotificationTransportService.cs index 899d4ad7..98128cfd 100644 --- a/AsbCloudWebApi/SignalR/Services/SignalRNotificationTransportService.cs +++ b/AsbCloudWebApi/SignalR/Services/SignalRNotificationTransportService.cs @@ -12,45 +12,45 @@ namespace AsbCloudWebApi.SignalR.Services; public class SignalRNotificationTransportService : INotificationTransportService { - private readonly NotificationBackgroundWorker backgroundWorker; + private readonly NotificationBackgroundWorker backgroundWorker; - public SignalRNotificationTransportService(NotificationBackgroundWorker backgroundWorker) - { - this.backgroundWorker = backgroundWorker; - } + public SignalRNotificationTransportService(NotificationBackgroundWorker backgroundWorker) + { + this.backgroundWorker = backgroundWorker; + } - public int IdTransportType => 0; + public int IdTransportType => 0; - public Task SendAsync(NotificationDto notification, - CancellationToken cancellationToken) => SendRangeAsync(new[] { notification }, cancellationToken); + public Task SendAsync(NotificationDto notification, + CancellationToken cancellationToken) => SendRangeAsync(new[] { notification }, cancellationToken); - public Task SendRangeAsync(IEnumerable notifications, - CancellationToken cancellationToken) - { - var workId = HashCode.Combine(notifications.Select(n => n.Id)).ToString("x"); + public Task SendRangeAsync(IEnumerable notifications, + CancellationToken cancellationToken) + { + var workId = HashCode.Combine(notifications.Select(n => n.Id)).ToString("x"); - if (backgroundWorker.Works.Any(w => w.Id == workId)) - return Task.CompletedTask; + if (backgroundWorker.Works.Any(w => w.Id == workId)) + return Task.CompletedTask; - var workAction = MakeSignalRSendWorkAction(notifications); - var work = Work.CreateByDelegate(workId, workAction); - backgroundWorker.Enqueue(work); + var workAction = MakeSignalRSendWorkAction(notifications); + var work = Work.CreateByDelegate(workId, workAction); + backgroundWorker.Enqueue(work); - return Task.CompletedTask; - } + return Task.CompletedTask; + } - private Func, CancellationToken, Task> MakeSignalRSendWorkAction(IEnumerable notifications) - { - return async (_, serviceProvider, onProgress, cancellationToken) => - { - var notificationPublisher = serviceProvider.GetRequiredService(); + private Func, CancellationToken, Task> MakeSignalRSendWorkAction(IEnumerable notifications) + { + return async (_, serviceProvider, onProgress, cancellationToken) => + { + var notificationPublisher = serviceProvider.GetRequiredService(); - var groupedNotificationsByUsers = notifications.GroupBy(n => n.IdUser); - - foreach (var groupedNotificationByUser in groupedNotificationsByUsers) - { - await notificationPublisher.PublishAsync(groupedNotificationByUser, cancellationToken); - } - }; - } + var groupedNotificationsByUsers = notifications.GroupBy(n => n.IdUser); + + foreach (var groupedNotificationByUser in groupedNotificationsByUsers) + { + await notificationPublisher.PublishAsync(groupedNotificationByUser, cancellationToken); + } + }; + } } \ No newline at end of file diff --git a/AsbCloudWebApi/SignalR/TelemetryHub.cs b/AsbCloudWebApi/SignalR/TelemetryHub.cs index 69b6c628..df4cab22 100644 --- a/AsbCloudWebApi/SignalR/TelemetryHub.cs +++ b/AsbCloudWebApi/SignalR/TelemetryHub.cs @@ -1,4 +1,4 @@ -using AsbCloudWebApi.SignalR.Clients; +using AsbCloudWebApi.SignalR.Clients; using Microsoft.AspNetCore.Authorization; namespace AsbCloudWebApi.SignalR diff --git a/AsbCloudWebApi/SignalR/WellInfoHub.cs b/AsbCloudWebApi/SignalR/WellInfoHub.cs index 553923fd..b3dc3b2c 100644 --- a/AsbCloudWebApi/SignalR/WellInfoHub.cs +++ b/AsbCloudWebApi/SignalR/WellInfoHub.cs @@ -11,42 +11,42 @@ namespace AsbCloudWebApi.SignalR; public class WellInfoHub : BaseHub, IIntegrationEventHandler { - private readonly IHubContext hubContext; - private readonly IWellService wellService; - private readonly WellInfoService wellInfoService; + private readonly IHubContext hubContext; + private readonly IWellService wellService; + private readonly WellInfoService wellInfoService; - public WellInfoHub(IHubContext hubContext, - IWellService wellService, - WellInfoService wellInfoService) - { - this.hubContext = hubContext; - this.wellService = wellService; - this.wellInfoService = wellInfoService; - } + public WellInfoHub(IHubContext hubContext, + IWellService wellService, + WellInfoService wellInfoService) + { + this.hubContext = hubContext; + this.wellService = wellService; + this.wellInfoService = wellInfoService; + } - public override async Task AddToGroup(string groupName) - { - var idWell = int.Parse(groupName.Split('_')[2]); - - await Groups.AddToGroupAsync(Context.ConnectionId, groupName); + public override async Task AddToGroup(string groupName) + { + var idWell = int.Parse(groupName.Split('_')[2]); + + await Groups.AddToGroupAsync(Context.ConnectionId, groupName); - await HandleAsync(new UpdateWellInfoEvent(idWell), CancellationToken.None); - } + await HandleAsync(new UpdateWellInfoEvent(idWell), CancellationToken.None); + } - public async Task HandleAsync(UpdateWellInfoEvent integrationEvent, CancellationToken cancellationToken) - { - var well = await wellService.GetOrDefaultAsync(integrationEvent.IdWell, cancellationToken); + public async Task HandleAsync(UpdateWellInfoEvent integrationEvent, CancellationToken cancellationToken) + { + var well = await wellService.GetOrDefaultAsync(integrationEvent.IdWell, cancellationToken); - if(well is null) - return; - - var wellInfo = wellInfoService.FirstOrDefault(w => w.Id == well.Id); + if(well is null) + return; + + var wellInfo = wellInfoService.FirstOrDefault(w => w.Id == well.Id); - await hubContext.Clients.Group($"well_info_{integrationEvent.IdWell}") - .UpdateWellInfo(new - { - Well = well, - WellInfo = wellInfo - }, cancellationToken); - } + await hubContext.Clients.Group($"well_info_{integrationEvent.IdWell}") + .UpdateWellInfo(new + { + Well = well, + WellInfo = wellInfo + }, cancellationToken); + } } \ No newline at end of file diff --git a/SignalRTestClient/Program.cs b/SignalRTestClient/Program.cs index aa61b859..2e68f6a3 100644 --- a/SignalRTestClient/Program.cs +++ b/SignalRTestClient/Program.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.SignalR.Client; +using Microsoft.AspNetCore.SignalR.Client; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging;