Merge branch 'schedule-sync' into dev
This commit is contained in:
@@ -3,6 +3,7 @@ variables:
|
||||
PROD_NAME_API: "parr/parr-api"
|
||||
PROD_NAME_AIHIT: "parr/parr-aihit-syncher"
|
||||
PROD_NAME_ESPP_TEMPLATE: "parr/parr-espp-template-sync"
|
||||
PROD_NAME_ESPP_SCHEDULE: "parr/parr-espp-schedule-sync"
|
||||
PROD_NAME_GENERATOR_TEMPLATES: "parr/parr-generator-templates"
|
||||
PROD_NAME_ESPP_ORDER_LOADER: "parr/parr-espp-order-loader"
|
||||
PROD_NAME_ESPP_ORDER_MANAGER: "parr/parr-espp-order-manager"
|
||||
@@ -358,3 +359,51 @@ prod_master_deploy:
|
||||
- RUNNER: shell-api-swarm-01
|
||||
tags:
|
||||
- ${RUNNER}
|
||||
|
||||
|
||||
### ESPP SCHEDULE SYNC PROD ###
|
||||
prod_espp_schedule_build:
|
||||
stage: build
|
||||
only:
|
||||
- /^es[0-9]+\.[0-9]+\.[0-9]+$/
|
||||
except:
|
||||
- branches
|
||||
services:
|
||||
- name: docker:20.10.21-dind
|
||||
command: [
|
||||
"--insecure-registry=10.99.253.167:8090",
|
||||
"--registry-mirror=http://10.99.253.167:8090",
|
||||
"--insecure-registry=harbor.dvgd.rzd",
|
||||
"--tls=false"
|
||||
]
|
||||
variables:
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
script:
|
||||
- APP_VERSION=$(echo $CI_COMMIT_TAG | tr -d es)
|
||||
- IMAGE_VERSION=$(echo $CI_COMMIT_TAG | sed 's/es/v/g')
|
||||
- docker build -t $REPO/$PROD_NAME_ESPP_SCHEDULE:$IMAGE_VERSION -t $REPO/$PROD_NAME_ESPP_SCHEDULE:latest -t $PROD_NAME_ESPP_SCHEDULE:$IMAGE_VERSION -t $PROD_NAME_ESPP_SCHEDULE:latest --build-arg app_version=$APP_VERSION -f PARR.EsppScheduleSyncWorker/Dockerfile .
|
||||
- docker login -u $HARBOR_PUSH_USER -p $HARBOR_PUSH_PASS $REPO
|
||||
- docker push --all-tags $REPO/$PROD_NAME_ESPP_SCHEDULE
|
||||
tags:
|
||||
- docker
|
||||
|
||||
|
||||
prod_espp_schedule_deploy:
|
||||
stage: deploy
|
||||
environment:
|
||||
name: parr-espp-schedule-sync
|
||||
only:
|
||||
- /^es[0-9]+\.[0-9]+\.[0-9]+$/
|
||||
except:
|
||||
- branches
|
||||
script:
|
||||
- IMAGE_VERSION=$(echo $CI_COMMIT_TAG | sed 's/es/v/g')
|
||||
- docker login -u $HARBOR_PULL_USER -p $HARBOR_PULL_PASS $REPO
|
||||
- tag=$IMAGE_VERSION docker stack deploy -c docker-compose.espp-schedule-sync.yml parr-espp-schedule-sync --with-registry-auth
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: shell-api-swarm-01
|
||||
tags:
|
||||
- ${RUNNER}
|
||||
20
PARR.API.sln
20
PARR.API.sln
@@ -51,7 +51,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PARR.EsppApi", "PARR.EsppAp
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PARR.Test", "PARR.Test\PARR.Test.csproj", "{CFE2A198-67BF-4828-8E8D-31A01858FDA7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.Constants", "PARR.Constants\PARR.Constants.csproj", "{46B09885-C9FB-449C-ACAA-24C671194C4D}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PARR.Constants", "PARR.Constants\PARR.Constants.csproj", "{46B09885-C9FB-449C-ACAA-24C671194C4D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.EsppSync", "PARR.EsppSync\PARR.EsppSync.csproj", "{71121EF7-D4C1-43A4-9243-EF5C4C82030F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.EsppScheduleSync", "PARR.EsppScheduleSync\PARR.EsppScheduleSync.csproj", "{1E7F0EFE-784E-42E1-96BA-1FF743998619}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PARR.EsppScheduleSyncWorker", "PARR.EsppScheduleSyncWorker\PARR.EsppScheduleSyncWorker.csproj", "{C597A1D7-1BC5-493B-BC29-03EC830FB090}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -141,6 +147,18 @@ Global
|
||||
{46B09885-C9FB-449C-ACAA-24C671194C4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{46B09885-C9FB-449C-ACAA-24C671194C4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{46B09885-C9FB-449C-ACAA-24C671194C4D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{71121EF7-D4C1-43A4-9243-EF5C4C82030F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{71121EF7-D4C1-43A4-9243-EF5C4C82030F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{71121EF7-D4C1-43A4-9243-EF5C4C82030F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{71121EF7-D4C1-43A4-9243-EF5C4C82030F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1E7F0EFE-784E-42E1-96BA-1FF743998619}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1E7F0EFE-784E-42E1-96BA-1FF743998619}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1E7F0EFE-784E-42E1-96BA-1FF743998619}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1E7F0EFE-784E-42E1-96BA-1FF743998619}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C597A1D7-1BC5-493B-BC29-03EC830FB090}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C597A1D7-1BC5-493B-BC29-03EC830FB090}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C597A1D7-1BC5-493B-BC29-03EC830FB090}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C597A1D7-1BC5-493B-BC29-03EC830FB090}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ using PARR.API.Contracts.V1;
|
||||
using PARR.API.Contracts.V1.Responses;
|
||||
using PARR.API.Contracts.V1.Responses.Base;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
@@ -9,6 +9,7 @@ using PARR.API.Contracts.V1.Responses.Base;
|
||||
using PARR.API.Controllers.V1.Base;
|
||||
using PARR.API.Extensions;
|
||||
using PARR.BLL.Helpers;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.DomainModels;
|
||||
using PARR.DAL.Models;
|
||||
|
||||
@@ -10,6 +10,7 @@ COPY ["NuGet.config", "."]
|
||||
COPY ["PARR.API/PARR.API.csproj", "PARR.API/"]
|
||||
COPY ["PARR.BLL/PARR.BLL.csproj", "PARR.BLL/"]
|
||||
COPY ["PARR.DAL/PARR.DAL.csproj", "PARR.DAL/"]
|
||||
COPY ["PARR.Constants/PARR.Constants.csproj", "PARR.Constants/"]
|
||||
RUN dotnet restore "PARR.API/PARR.API.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/PARR.API"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PARR.DAL.Contracts
|
||||
namespace PARR.Constants
|
||||
{
|
||||
/// <summary>
|
||||
/// Список роботов
|
||||
@@ -204,89 +204,89 @@ namespace PARR.DAL.Context
|
||||
modelBuilder.Entity<EsppSchTypeValue>(f =>
|
||||
{
|
||||
f.HasData(
|
||||
new { Id = new Guid("6E3B5DD2-B2F7-40BC-BACE-15BFA6BBD4FF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждый час" },
|
||||
new { Id = new Guid("4DF04834-F14F-43D9-8984-334F080F4107"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 2 часа" },
|
||||
new { Id = new Guid("DAB6E3F9-2385-4966-B77C-133AD233C592"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 3 часа" },
|
||||
new { Id = new Guid("035F485D-8451-47DF-BFAA-BA4DD36CF146"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 4 часа" },
|
||||
new { Id = new Guid("D627DAA7-3EED-4571-ACAE-FFBB3C5BEDB9"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 6 часов" },
|
||||
new { Id = new Guid("AE0A0015-0F1E-4496-B71E-6244F7E321E7"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 12 часов" },
|
||||
new { Id = new Guid("8DF097AA-9860-4A62-9675-A8EECD3F2CE7"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Ежедневно" },
|
||||
new { Id = new Guid("DEE32E60-C1A1-4206-98BC-AA03DEABFDF6"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 72 часа" },
|
||||
new { Id = new Guid("E0465FBF-E3A5-4486-9F53-5BB85C6FEECA"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 98 часов" },
|
||||
new { Id = new Guid("4E3F73D1-A0F3-4DD1-BCA9-68ADA0DD5CE2"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 2 недели" },
|
||||
new { Id = new Guid("55833417-6A24-42F6-BCC2-5D032F883202"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 60 дней" },
|
||||
new { Id = new Guid("7FEFA052-29DB-4CE5-9C57-2FD9FF855F21"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 80 дней" },
|
||||
new { Id = new Guid("B0CA99F9-5EE0-45B3-BB80-948F82B1FCB1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 90 дней" },
|
||||
new { Id = new Guid("086F7A37-9848-423A-A3CC-36DBB5AD43E3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые полгода" },
|
||||
new { Id = new Guid("F2DA9E02-D619-4517-A598-374880A8C8E8"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 1,5 года" },
|
||||
new { Id = new Guid("F38D7D30-8923-4EA0-AA7C-5B251E19AB61"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 3 года" },
|
||||
new { Id = new Guid("B7303461-9A30-43FA-8E55-305AA13F186F"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Понедельник" },
|
||||
new { Id = new Guid("E951135E-71F2-4262-9342-DF4D5315AB6C"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Вторник" },
|
||||
new { Id = new Guid("C34D5375-70E7-4632-B3AF-30E279A0621A"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Среда" },
|
||||
new { Id = new Guid("EC9540DF-C2DE-4BDA-A063-34D02D4B6E03"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Четверг" },
|
||||
new { Id = new Guid("2ED85534-4684-4EB2-9CCB-E264D212C945"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Пятница" },
|
||||
new { Id = new Guid("A6804315-96EF-484E-82EE-C5795694468B"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Суббота" },
|
||||
new { Id = new Guid("EB71E699-937F-4894-9688-F7A7F95E5E58"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Воскресенье" },
|
||||
new { Id = new Guid("E86ADBFB-3345-4E0C-AA3B-B4418F9CFE88"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "1" },
|
||||
new { Id = new Guid("5B4D7CA6-31E7-475B-B7C8-13C6680C3DC3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "2" },
|
||||
new { Id = new Guid("0DA03DB0-9404-425D-BEA1-5DA0C9B60B59"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "3" },
|
||||
new { Id = new Guid("199474C8-0A77-47E5-AAB8-BA33C216CC9E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "4" },
|
||||
new { Id = new Guid("E6619DA1-F7E8-45B9-BBD3-9C17BEC2CCD3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "5" },
|
||||
new { Id = new Guid("A8708763-C838-49A5-95FE-BF4F73518D71"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "6" },
|
||||
new { Id = new Guid("7EC056AA-820C-4900-96CB-4564D2EA6398"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "7" },
|
||||
new { Id = new Guid("554D7D0C-91B1-4B81-B94D-1EE864192962"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "8" },
|
||||
new { Id = new Guid("8B7847A4-23DE-4199-8AAD-3B5C0323B5A2"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "9" },
|
||||
new { Id = new Guid("FB7F41CA-950B-4DC1-A0A6-BD9A221AB2AD"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "10" },
|
||||
new { Id = new Guid("A28B530F-EA38-4A2C-A16B-0B7FA3770D3C"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "11" },
|
||||
new { Id = new Guid("7A004A11-32E1-40AE-AB35-0D3DC3A69785"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "12" },
|
||||
new { Id = new Guid("E0F2F4D1-4A5E-4997-8336-83C3C35F38DF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "13" },
|
||||
new { Id = new Guid("9C5AAF48-88EC-4C67-B936-2BE45550F8BF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "14" },
|
||||
new { Id = new Guid("8DBD680C-CE49-4D2E-8A1A-05619685E240"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "15" },
|
||||
new { Id = new Guid("2F476F70-B1EF-419D-AAD5-3911F1E3231F"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "16" },
|
||||
new { Id = new Guid("2C635CE2-FC18-47BE-B3E9-98C211ABF312"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "17" },
|
||||
new { Id = new Guid("F9D5B03B-624A-4F9F-8DA3-1490EA5D2914"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "18" },
|
||||
new { Id = new Guid("4F4B249C-DB60-4582-86ED-75CFEE4EDD0C"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "19" },
|
||||
new { Id = new Guid("220A1464-4D39-416C-B4B2-3093EB007298"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "20" },
|
||||
new { Id = new Guid("C887CA60-B05D-4D3C-AD1F-223C879B1A6D"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "21" },
|
||||
new { Id = new Guid("2905765D-63FB-41FE-A111-EE2F1D03D62E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "22" },
|
||||
new { Id = new Guid("DBBE704A-8D6D-40E7-BD30-6974035B1FAB"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "23" },
|
||||
new { Id = new Guid("CF7B9645-52ED-43A2-8267-267E0AED19B1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "24" },
|
||||
new { Id = new Guid("454788D6-D0AD-4C07-878C-DA3FD3CD05E1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "25" },
|
||||
new { Id = new Guid("40D70D73-8582-4BE6-A9E6-503B96AE3D49"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "26" },
|
||||
new { Id = new Guid("8F6610DC-EF46-4842-A57E-18D7AAA75931"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "27" },
|
||||
new { Id = new Guid("03858472-D4CE-47FD-9497-8051728766E4"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "28" },
|
||||
new { Id = new Guid("B1018E07-E90E-42EE-B399-19F3D0C14DD6"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "29" },
|
||||
new { Id = new Guid("A1669207-AA31-40FE-98D0-D941008D1655"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "30" },
|
||||
new { Id = new Guid("0936AA99-73E0-43DE-B6DF-334C1228A226"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "31" },
|
||||
new { Id = new Guid("626CA076-F09E-4A7A-8610-B7DE6337B24A"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Первый" },
|
||||
new { Id = new Guid("032FBD02-67D0-4B8C-BED0-42629AB7113B"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Второй" },
|
||||
new { Id = new Guid("FA8A8F60-E41E-495E-AC86-35174D9976BF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Третий" },
|
||||
new { Id = new Guid("D2F90168-2B49-42F2-820B-79DB2C522ADF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Четвертый" },
|
||||
new { Id = new Guid("12BB8DB2-CF7F-4113-BAFF-6883770F1BA5"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Последний" },
|
||||
new { Id = new Guid("18260E91-3FBE-4401-9EDC-78DBC419370E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Январь" },
|
||||
new { Id = new Guid("361526AA-3E1C-452E-BB44-0ADE8521830D"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Февраль" },
|
||||
new { Id = new Guid("FAD4BDB0-6C51-4810-A30B-6D031A0D4C46"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Март" },
|
||||
new { Id = new Guid("06AB835D-3D3E-4057-8422-A553B6B40995"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Апрель" },
|
||||
new { Id = new Guid("83F56B5D-B16B-4AA5-89D7-A253FEE4E4AD"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Май" },
|
||||
new { Id = new Guid("E679EC84-A9EE-4BED-A051-2B14EDDDCB18"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Июнь" },
|
||||
new { Id = new Guid("D439808A-6A10-409B-8809-A755B7CCA60B"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Июль" },
|
||||
new { Id = new Guid("6E9972C4-6BF7-4FE4-B4EA-BBB333FB69C8"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Август" },
|
||||
new { Id = new Guid("0883AAC2-9D5B-4098-B672-C684D2A3A0C9"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Сентябрь" },
|
||||
new { Id = new Guid("5E6592BC-ACB2-45A4-979B-FDECF8457453"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Октябрь" },
|
||||
new { Id = new Guid("EDD7CB49-D6A0-4969-B2D6-1967DA69B336"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Ноябрь" },
|
||||
new { Id = new Guid("DD695FB2-4AD0-4CDA-A4DF-E15059C56B24"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Декабрь" },
|
||||
new { Id = new Guid("2F473624-4EB3-49B4-A4B9-CC7FC08A50F5"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Января" },
|
||||
new { Id = new Guid("F0003490-A249-44BD-814F-4566999915D8"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Февраля" },
|
||||
new { Id = new Guid("F4C3FE38-AEAA-42F7-A9BA-190EA2DFE339"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Марта" },
|
||||
new { Id = new Guid("06A8BD2F-68E1-42F5-961C-AC3B98A2181E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Апреля" },
|
||||
new { Id = new Guid("963B9C41-D607-444A-9FE0-FE429590E326"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Мая" },
|
||||
new { Id = new Guid("EC8554C8-DEE4-49A1-B1B7-474AD8EC1473"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Июня" },
|
||||
new { Id = new Guid("E15C7C63-E29F-41A3-9C82-F70EB6C24FDE"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Июля" },
|
||||
new { Id = new Guid("0B1F3CEA-301A-4D74-9CE1-2CD93B41897D"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Августа" },
|
||||
new { Id = new Guid("E2FA3769-F66F-4753-A161-35ADAD7717A5"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Сентября" },
|
||||
new { Id = new Guid("C1DE4ACA-9F49-48AE-9279-CF9EC4092112"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Октября" },
|
||||
new { Id = new Guid("A74B9EBD-BCD8-4537-B371-194DE2FE0A4D"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Ноября" },
|
||||
new { Id = new Guid("852A5EBD-4545-494B-BC69-C27409A41ADC"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Декабря" }
|
||||
new { Id = new Guid("6E3B5DD2-B2F7-40BC-BACE-15BFA6BBD4FF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждый час", EsppExportValue = "01:00:00" },
|
||||
new { Id = new Guid("4DF04834-F14F-43D9-8984-334F080F4107"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 2 часа", EsppExportValue = "02:00:00" },
|
||||
new { Id = new Guid("DAB6E3F9-2385-4966-B77C-133AD233C592"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 3 часа", EsppExportValue = "03:00:00" },
|
||||
new { Id = new Guid("035F485D-8451-47DF-BFAA-BA4DD36CF146"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 4 часа", EsppExportValue = "04:00:00" },
|
||||
new { Id = new Guid("D627DAA7-3EED-4571-ACAE-FFBB3C5BEDB9"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 6 часов", EsppExportValue = "06:00:00" },
|
||||
new { Id = new Guid("AE0A0015-0F1E-4496-B71E-6244F7E321E7"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 12 часов", EsppExportValue = "12:00:00" },
|
||||
new { Id = new Guid("8DF097AA-9860-4A62-9675-A8EECD3F2CE7"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Ежедневно", EsppExportValue = "1 00:00:00" },
|
||||
new { Id = new Guid("DEE32E60-C1A1-4206-98BC-AA03DEABFDF6"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 72 часа", EsppExportValue = "3 00:00:00" },
|
||||
new { Id = new Guid("E0465FBF-E3A5-4486-9F53-5BB85C6FEECA"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 96 часов", EsppExportValue = "4 00:00:00" },
|
||||
new { Id = new Guid("4E3F73D1-A0F3-4DD1-BCA9-68ADA0DD5CE2"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 2 недели", EsppExportValue = "14 00:00:00" },
|
||||
new { Id = new Guid("55833417-6A24-42F6-BCC2-5D032F883202"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 60 дней", EsppExportValue = "60 00:00:00" },
|
||||
new { Id = new Guid("7FEFA052-29DB-4CE5-9C57-2FD9FF855F21"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 80 дней", EsppExportValue = "80 00:00:00" },
|
||||
new { Id = new Guid("B0CA99F9-5EE0-45B3-BB80-948F82B1FCB1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 90 дней", EsppExportValue = "90 00:00:00" },
|
||||
new { Id = new Guid("086F7A37-9848-423A-A3CC-36DBB5AD43E3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые полгода", EsppExportValue = "182 00:00:00" },
|
||||
new { Id = new Guid("F2DA9E02-D619-4517-A598-374880A8C8E8"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 1,5 года", EsppExportValue = "540 00:00:00" },
|
||||
new { Id = new Guid("F38D7D30-8923-4EA0-AA7C-5B251E19AB61"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Interval, Value = "Каждые 3 года", EsppExportValue = "1095 00:00:00" },
|
||||
new { Id = new Guid("B7303461-9A30-43FA-8E55-305AA13F186F"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Понедельник", EsppExportValue = "1" },
|
||||
new { Id = new Guid("E951135E-71F2-4262-9342-DF4D5315AB6C"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Вторник", EsppExportValue = "2" },
|
||||
new { Id = new Guid("C34D5375-70E7-4632-B3AF-30E279A0621A"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Среда", EsppExportValue = "3" },
|
||||
new { Id = new Guid("EC9540DF-C2DE-4BDA-A063-34D02D4B6E03"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Четверг", EsppExportValue = "4" },
|
||||
new { Id = new Guid("2ED85534-4684-4EB2-9CCB-E264D212C945"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Пятница", EsppExportValue = "5" },
|
||||
new { Id = new Guid("A6804315-96EF-484E-82EE-C5795694468B"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Суббота", EsppExportValue = "6" },
|
||||
new { Id = new Guid("EB71E699-937F-4894-9688-F7A7F95E5E58"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfWeek, Value = "Воскресенье", EsppExportValue = "7" },
|
||||
new { Id = new Guid("E86ADBFB-3345-4E0C-AA3B-B4418F9CFE88"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "1", EsppExportValue = "1" },
|
||||
new { Id = new Guid("5B4D7CA6-31E7-475B-B7C8-13C6680C3DC3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "2", EsppExportValue = "2" },
|
||||
new { Id = new Guid("0DA03DB0-9404-425D-BEA1-5DA0C9B60B59"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "3", EsppExportValue = "3" },
|
||||
new { Id = new Guid("199474C8-0A77-47E5-AAB8-BA33C216CC9E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "4", EsppExportValue = "4" },
|
||||
new { Id = new Guid("E6619DA1-F7E8-45B9-BBD3-9C17BEC2CCD3"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "5", EsppExportValue = "5" },
|
||||
new { Id = new Guid("A8708763-C838-49A5-95FE-BF4F73518D71"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "6", EsppExportValue = "6" },
|
||||
new { Id = new Guid("7EC056AA-820C-4900-96CB-4564D2EA6398"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "7", EsppExportValue = "7" },
|
||||
new { Id = new Guid("554D7D0C-91B1-4B81-B94D-1EE864192962"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "8", EsppExportValue = "8" },
|
||||
new { Id = new Guid("8B7847A4-23DE-4199-8AAD-3B5C0323B5A2"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "9", EsppExportValue = "9" },
|
||||
new { Id = new Guid("FB7F41CA-950B-4DC1-A0A6-BD9A221AB2AD"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "10", EsppExportValue = "10" },
|
||||
new { Id = new Guid("A28B530F-EA38-4A2C-A16B-0B7FA3770D3C"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "11", EsppExportValue = "11" },
|
||||
new { Id = new Guid("7A004A11-32E1-40AE-AB35-0D3DC3A69785"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "12", EsppExportValue = "12" },
|
||||
new { Id = new Guid("E0F2F4D1-4A5E-4997-8336-83C3C35F38DF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "13", EsppExportValue = "13" },
|
||||
new { Id = new Guid("9C5AAF48-88EC-4C67-B936-2BE45550F8BF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "14", EsppExportValue = "14" },
|
||||
new { Id = new Guid("8DBD680C-CE49-4D2E-8A1A-05619685E240"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "15", EsppExportValue = "15" },
|
||||
new { Id = new Guid("2F476F70-B1EF-419D-AAD5-3911F1E3231F"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "16", EsppExportValue = "16" },
|
||||
new { Id = new Guid("2C635CE2-FC18-47BE-B3E9-98C211ABF312"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "17", EsppExportValue = "17" },
|
||||
new { Id = new Guid("F9D5B03B-624A-4F9F-8DA3-1490EA5D2914"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "18", EsppExportValue = "18" },
|
||||
new { Id = new Guid("4F4B249C-DB60-4582-86ED-75CFEE4EDD0C"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "19", EsppExportValue = "19" },
|
||||
new { Id = new Guid("220A1464-4D39-416C-B4B2-3093EB007298"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "20", EsppExportValue = "20" },
|
||||
new { Id = new Guid("C887CA60-B05D-4D3C-AD1F-223C879B1A6D"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "21", EsppExportValue = "21" },
|
||||
new { Id = new Guid("2905765D-63FB-41FE-A111-EE2F1D03D62E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "22", EsppExportValue = "22" },
|
||||
new { Id = new Guid("DBBE704A-8D6D-40E7-BD30-6974035B1FAB"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "23", EsppExportValue = "23" },
|
||||
new { Id = new Guid("CF7B9645-52ED-43A2-8267-267E0AED19B1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "24", EsppExportValue = "24" },
|
||||
new { Id = new Guid("454788D6-D0AD-4C07-878C-DA3FD3CD05E1"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "25", EsppExportValue = "25" },
|
||||
new { Id = new Guid("40D70D73-8582-4BE6-A9E6-503B96AE3D49"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "26", EsppExportValue = "26" },
|
||||
new { Id = new Guid("8F6610DC-EF46-4842-A57E-18D7AAA75931"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "27", EsppExportValue = "27" },
|
||||
new { Id = new Guid("03858472-D4CE-47FD-9497-8051728766E4"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "28", EsppExportValue = "28" },
|
||||
new { Id = new Guid("B1018E07-E90E-42EE-B399-19F3D0C14DD6"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "29", EsppExportValue = "29" },
|
||||
new { Id = new Guid("A1669207-AA31-40FE-98D0-D941008D1655"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "30", EsppExportValue = "30" },
|
||||
new { Id = new Guid("0936AA99-73E0-43DE-B6DF-334C1228A226"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.DayOfMonth, Value = "31", EsppExportValue = "31" },
|
||||
new { Id = new Guid("626CA076-F09E-4A7A-8610-B7DE6337B24A"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Первый", EsppExportValue = "1" },
|
||||
new { Id = new Guid("032FBD02-67D0-4B8C-BED0-42629AB7113B"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Второй", EsppExportValue = "2" },
|
||||
new { Id = new Guid("FA8A8F60-E41E-495E-AC86-35174D9976BF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Третий", EsppExportValue = "3" },
|
||||
new { Id = new Guid("D2F90168-2B49-42F2-820B-79DB2C522ADF"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Четвертый", EsppExportValue = "4" },
|
||||
new { Id = new Guid("12BB8DB2-CF7F-4113-BAFF-6883770F1BA5"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Order, Value = "Последний", EsppExportValue = "5" },
|
||||
new { Id = new Guid("18260E91-3FBE-4401-9EDC-78DBC419370E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Январь", EsppExportValue = "1" },
|
||||
new { Id = new Guid("361526AA-3E1C-452E-BB44-0ADE8521830D"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Февраль", EsppExportValue = "2" },
|
||||
new { Id = new Guid("FAD4BDB0-6C51-4810-A30B-6D031A0D4C46"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Март", EsppExportValue = "3" },
|
||||
new { Id = new Guid("06AB835D-3D3E-4057-8422-A553B6B40995"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Апрель", EsppExportValue = "4" },
|
||||
new { Id = new Guid("83F56B5D-B16B-4AA5-89D7-A253FEE4E4AD"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Май", EsppExportValue = "5" },
|
||||
new { Id = new Guid("E679EC84-A9EE-4BED-A051-2B14EDDDCB18"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Июнь", EsppExportValue = "6" },
|
||||
new { Id = new Guid("D439808A-6A10-409B-8809-A755B7CCA60B"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Июль", EsppExportValue = "7" },
|
||||
new { Id = new Guid("6E9972C4-6BF7-4FE4-B4EA-BBB333FB69C8"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Август", EsppExportValue = "8" },
|
||||
new { Id = new Guid("0883AAC2-9D5B-4098-B672-C684D2A3A0C9"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Сентябрь", EsppExportValue = "9" },
|
||||
new { Id = new Guid("5E6592BC-ACB2-45A4-979B-FDECF8457453"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Октябрь", EsppExportValue = "10" },
|
||||
new { Id = new Guid("EDD7CB49-D6A0-4969-B2D6-1967DA69B336"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Ноябрь", EsppExportValue = "11" },
|
||||
new { Id = new Guid("DD695FB2-4AD0-4CDA-A4DF-E15059C56B24"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.Month, Value = "Декабрь", EsppExportValue = "12" },
|
||||
new { Id = new Guid("2F473624-4EB3-49B4-A4B9-CC7FC08A50F5"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Января", EsppExportValue = "1" },
|
||||
new { Id = new Guid("F0003490-A249-44BD-814F-4566999915D8"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Февраля", EsppExportValue = "2" },
|
||||
new { Id = new Guid("F4C3FE38-AEAA-42F7-A9BA-190EA2DFE339"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Марта", EsppExportValue = "3" },
|
||||
new { Id = new Guid("06A8BD2F-68E1-42F5-961C-AC3B98A2181E"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Апреля", EsppExportValue = "4" },
|
||||
new { Id = new Guid("963B9C41-D607-444A-9FE0-FE429590E326"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Мая", EsppExportValue = "5" },
|
||||
new { Id = new Guid("EC8554C8-DEE4-49A1-B1B7-474AD8EC1473"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Июня", EsppExportValue = "6" },
|
||||
new { Id = new Guid("E15C7C63-E29F-41A3-9C82-F70EB6C24FDE"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Июля", EsppExportValue = "7" },
|
||||
new { Id = new Guid("0B1F3CEA-301A-4D74-9CE1-2CD93B41897D"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Августа", EsppExportValue = "8" },
|
||||
new { Id = new Guid("E2FA3769-F66F-4753-A161-35ADAD7717A5"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Сентября", EsppExportValue = "9" },
|
||||
new { Id = new Guid("C1DE4ACA-9F49-48AE-9279-CF9EC4092112"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Октября", EsppExportValue = "10" },
|
||||
new { Id = new Guid("A74B9EBD-BCD8-4537-B371-194DE2FE0A4D"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Ноября", EsppExportValue = "11" },
|
||||
new { Id = new Guid("852A5EBD-4545-494B-BC69-C27409A41ADC"), DateCreated = dateCreated, TypeId = (int)EsppSchTypeEnum.MonthGenitive, Value = "Декабря", EsppExportValue = "12" }
|
||||
);
|
||||
});
|
||||
|
||||
@@ -294,7 +294,7 @@ namespace PARR.DAL.Context
|
||||
{
|
||||
f.HasData(
|
||||
new { Id = (int)EsppSchTypeScheduleEnum.Regularly, Name = EsppSchTypeScheduleEnum.Regularly.ToString(), Description = "Регулярно" },
|
||||
new { Id = (int)EsppSchTypeScheduleEnum.Weekly, Name = EsppSchTypeScheduleEnum.Weekly.ToString(), Description = "Еженежельно" },
|
||||
new { Id = (int)EsppSchTypeScheduleEnum.Weekly, Name = EsppSchTypeScheduleEnum.Weekly.ToString(), Description = "Еженедельно" },
|
||||
new { Id = (int)EsppSchTypeScheduleEnum.Monthly, Name = EsppSchTypeScheduleEnum.Monthly.ToString(), Description = "Ежемесячно" },
|
||||
new { Id = (int)EsppSchTypeScheduleEnum.Monthly2, Name = EsppSchTypeScheduleEnum.Monthly2.ToString(), Description = "Ежемесячно-2" },
|
||||
new { Id = (int)EsppSchTypeScheduleEnum.Annually, Name = EsppSchTypeScheduleEnum.Annually.ToString(), Description = "Ежегодно" },
|
||||
|
||||
2667
PARR.DAL/Migrations/20231126232527_TblEsppSchTypeScheduleFixDescription.Designer.cs
generated
Normal file
2667
PARR.DAL/Migrations/20231126232527_TblEsppSchTypeScheduleFixDescription.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,32 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class TblEsppSchTypeScheduleFixDescription : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeSchedules",
|
||||
keyColumn: "Id",
|
||||
keyValue: 2,
|
||||
column: "Description",
|
||||
value: "Еженедельно");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeSchedules",
|
||||
keyColumn: "Id",
|
||||
keyValue: 2,
|
||||
column: "Description",
|
||||
value: "Еженежельно");
|
||||
}
|
||||
}
|
||||
}
|
||||
2754
PARR.DAL/Migrations/20231127003844_TblEsppSchTypeValueAddEsppExportValue.Designer.cs
generated
Normal file
2754
PARR.DAL/Migrations/20231127003844_TblEsppSchTypeValueAddEsppExportValue.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,618 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PARR.DAL.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class TblEsppSchTypeValueAddEsppExportValue : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "EsppExportValue",
|
||||
table: "EsppSchTypeValues",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("032fbd02-67d0-4b8c-bed0-42629ab7113b"),
|
||||
column: "EsppExportValue",
|
||||
value: "2");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("035f485d-8451-47df-bfaa-ba4dd36cf146"),
|
||||
column: "EsppExportValue",
|
||||
value: "04:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("03858472-d4ce-47fd-9497-8051728766e4"),
|
||||
column: "EsppExportValue",
|
||||
value: "28");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("06a8bd2f-68e1-42f5-961c-ac3b98a2181e"),
|
||||
column: "EsppExportValue",
|
||||
value: "4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("06ab835d-3d3e-4057-8422-a553b6b40995"),
|
||||
column: "EsppExportValue",
|
||||
value: "4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("086f7a37-9848-423a-a3cc-36dbb5ad43e3"),
|
||||
column: "EsppExportValue",
|
||||
value: "182 00:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("0883aac2-9d5b-4098-b672-c684d2a3a0c9"),
|
||||
column: "EsppExportValue",
|
||||
value: "9");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("0936aa99-73e0-43de-b6df-334c1228a226"),
|
||||
column: "EsppExportValue",
|
||||
value: "31");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("0b1f3cea-301a-4d74-9ce1-2cd93b41897d"),
|
||||
column: "EsppExportValue",
|
||||
value: "8");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("0da03db0-9404-425d-bea1-5da0c9b60b59"),
|
||||
column: "EsppExportValue",
|
||||
value: "3");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("12bb8db2-cf7f-4113-baff-6883770f1ba5"),
|
||||
column: "EsppExportValue",
|
||||
value: "5");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("18260e91-3fbe-4401-9edc-78dbc419370e"),
|
||||
column: "EsppExportValue",
|
||||
value: "1");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("199474c8-0a77-47e5-aab8-ba33c216cc9e"),
|
||||
column: "EsppExportValue",
|
||||
value: "4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("220a1464-4d39-416c-b4b2-3093eb007298"),
|
||||
column: "EsppExportValue",
|
||||
value: "20");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("2905765d-63fb-41fe-a111-ee2f1d03d62e"),
|
||||
column: "EsppExportValue",
|
||||
value: "22");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("2c635ce2-fc18-47be-b3e9-98c211abf312"),
|
||||
column: "EsppExportValue",
|
||||
value: "17");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("2ed85534-4684-4eb2-9ccb-e264d212c945"),
|
||||
column: "EsppExportValue",
|
||||
value: "5");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("2f473624-4eb3-49b4-a4b9-cc7fc08a50f5"),
|
||||
column: "EsppExportValue",
|
||||
value: "1");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("2f476f70-b1ef-419d-aad5-3911f1e3231f"),
|
||||
column: "EsppExportValue",
|
||||
value: "16");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("361526aa-3e1c-452e-bb44-0ade8521830d"),
|
||||
column: "EsppExportValue",
|
||||
value: "2");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("40d70d73-8582-4be6-a9e6-503b96ae3d49"),
|
||||
column: "EsppExportValue",
|
||||
value: "26");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("454788d6-d0ad-4c07-878c-da3fd3cd05e1"),
|
||||
column: "EsppExportValue",
|
||||
value: "25");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("4df04834-f14f-43d9-8984-334f080f4107"),
|
||||
column: "EsppExportValue",
|
||||
value: "02:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("4e3f73d1-a0f3-4dd1-bca9-68ada0dd5ce2"),
|
||||
column: "EsppExportValue",
|
||||
value: "14 00:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("4f4b249c-db60-4582-86ed-75cfee4edd0c"),
|
||||
column: "EsppExportValue",
|
||||
value: "19");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("554d7d0c-91b1-4b81-b94d-1ee864192962"),
|
||||
column: "EsppExportValue",
|
||||
value: "8");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("55833417-6a24-42f6-bcc2-5d032f883202"),
|
||||
column: "EsppExportValue",
|
||||
value: "60 00:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("5b4d7ca6-31e7-475b-b7c8-13c6680c3dc3"),
|
||||
column: "EsppExportValue",
|
||||
value: "2");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("5e6592bc-acb2-45a4-979b-fdecf8457453"),
|
||||
column: "EsppExportValue",
|
||||
value: "10");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("626ca076-f09e-4a7a-8610-b7de6337b24a"),
|
||||
column: "EsppExportValue",
|
||||
value: "1");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("6e3b5dd2-b2f7-40bc-bace-15bfa6bbd4ff"),
|
||||
column: "EsppExportValue",
|
||||
value: "01:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("6e9972c4-6bf7-4fe4-b4ea-bbb333fb69c8"),
|
||||
column: "EsppExportValue",
|
||||
value: "8");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("7a004a11-32e1-40ae-ab35-0d3dc3a69785"),
|
||||
column: "EsppExportValue",
|
||||
value: "12");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("7ec056aa-820c-4900-96cb-4564d2ea6398"),
|
||||
column: "EsppExportValue",
|
||||
value: "7");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("7fefa052-29db-4ce5-9c57-2fd9ff855f21"),
|
||||
column: "EsppExportValue",
|
||||
value: "80 00:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("83f56b5d-b16b-4aa5-89d7-a253fee4e4ad"),
|
||||
column: "EsppExportValue",
|
||||
value: "5");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("852a5ebd-4545-494b-bc69-c27409a41adc"),
|
||||
column: "EsppExportValue",
|
||||
value: "12");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("8b7847a4-23de-4199-8aad-3b5c0323b5a2"),
|
||||
column: "EsppExportValue",
|
||||
value: "9");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("8dbd680c-ce49-4d2e-8a1a-05619685e240"),
|
||||
column: "EsppExportValue",
|
||||
value: "15");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("8df097aa-9860-4a62-9675-a8eecd3f2ce7"),
|
||||
column: "EsppExportValue",
|
||||
value: "1 00:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("8f6610dc-ef46-4842-a57e-18d7aaa75931"),
|
||||
column: "EsppExportValue",
|
||||
value: "27");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("963b9c41-d607-444a-9fe0-fe429590e326"),
|
||||
column: "EsppExportValue",
|
||||
value: "5");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("9c5aaf48-88ec-4c67-b936-2be45550f8bf"),
|
||||
column: "EsppExportValue",
|
||||
value: "14");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("a1669207-aa31-40fe-98d0-d941008d1655"),
|
||||
column: "EsppExportValue",
|
||||
value: "30");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("a28b530f-ea38-4a2c-a16b-0b7fa3770d3c"),
|
||||
column: "EsppExportValue",
|
||||
value: "11");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("a6804315-96ef-484e-82ee-c5795694468b"),
|
||||
column: "EsppExportValue",
|
||||
value: "6");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("a74b9ebd-bcd8-4537-b371-194de2fe0a4d"),
|
||||
column: "EsppExportValue",
|
||||
value: "11");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("a8708763-c838-49a5-95fe-bf4f73518d71"),
|
||||
column: "EsppExportValue",
|
||||
value: "6");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("ae0a0015-0f1e-4496-b71e-6244f7e321e7"),
|
||||
column: "EsppExportValue",
|
||||
value: "12:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("b0ca99f9-5ee0-45b3-bb80-948f82b1fcb1"),
|
||||
column: "EsppExportValue",
|
||||
value: "90 00:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("b1018e07-e90e-42ee-b399-19f3d0c14dd6"),
|
||||
column: "EsppExportValue",
|
||||
value: "29");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("b7303461-9a30-43fa-8e55-305aa13f186f"),
|
||||
column: "EsppExportValue",
|
||||
value: "1");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("c1de4aca-9f49-48ae-9279-cf9ec4092112"),
|
||||
column: "EsppExportValue",
|
||||
value: "10");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("c34d5375-70e7-4632-b3af-30e279a0621a"),
|
||||
column: "EsppExportValue",
|
||||
value: "3");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("c887ca60-b05d-4d3c-ad1f-223c879b1a6d"),
|
||||
column: "EsppExportValue",
|
||||
value: "21");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("cf7b9645-52ed-43a2-8267-267e0aed19b1"),
|
||||
column: "EsppExportValue",
|
||||
value: "24");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("d2f90168-2b49-42f2-820b-79db2c522adf"),
|
||||
column: "EsppExportValue",
|
||||
value: "4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("d439808a-6a10-409b-8809-a755b7cca60b"),
|
||||
column: "EsppExportValue",
|
||||
value: "7");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("d627daa7-3eed-4571-acae-ffbb3c5bedb9"),
|
||||
column: "EsppExportValue",
|
||||
value: "06:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("dab6e3f9-2385-4966-b77c-133ad233c592"),
|
||||
column: "EsppExportValue",
|
||||
value: "03:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("dbbe704a-8d6d-40e7-bd30-6974035b1fab"),
|
||||
column: "EsppExportValue",
|
||||
value: "23");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("dd695fb2-4ad0-4cda-a4df-e15059c56b24"),
|
||||
column: "EsppExportValue",
|
||||
value: "12");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("dee32e60-c1a1-4206-98bc-aa03deabfdf6"),
|
||||
column: "EsppExportValue",
|
||||
value: "3 00:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("e0465fbf-e3a5-4486-9f53-5bb85c6feeca"),
|
||||
columns: new[] { "EsppExportValue", "Value" },
|
||||
values: new object[] { "4 00:00:00", "Каждые 96 часов" });
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("e0f2f4d1-4a5e-4997-8336-83c3c35f38df"),
|
||||
column: "EsppExportValue",
|
||||
value: "13");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("e15c7c63-e29f-41a3-9c82-f70eb6c24fde"),
|
||||
column: "EsppExportValue",
|
||||
value: "7");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("e2fa3769-f66f-4753-a161-35adad7717a5"),
|
||||
column: "EsppExportValue",
|
||||
value: "9");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("e6619da1-f7e8-45b9-bbd3-9c17bec2ccd3"),
|
||||
column: "EsppExportValue",
|
||||
value: "5");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("e679ec84-a9ee-4bed-a051-2b14edddcb18"),
|
||||
column: "EsppExportValue",
|
||||
value: "6");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("e86adbfb-3345-4e0c-aa3b-b4418f9cfe88"),
|
||||
column: "EsppExportValue",
|
||||
value: "1");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("e951135e-71f2-4262-9342-df4d5315ab6c"),
|
||||
column: "EsppExportValue",
|
||||
value: "2");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("eb71e699-937f-4894-9688-f7a7f95e5e58"),
|
||||
column: "EsppExportValue",
|
||||
value: "7");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("ec8554c8-dee4-49a1-b1b7-474ad8ec1473"),
|
||||
column: "EsppExportValue",
|
||||
value: "6");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("ec9540df-c2de-4bda-a063-34d02d4b6e03"),
|
||||
column: "EsppExportValue",
|
||||
value: "4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("edd7cb49-d6a0-4969-b2d6-1967da69b336"),
|
||||
column: "EsppExportValue",
|
||||
value: "11");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("f0003490-a249-44bd-814f-4566999915d8"),
|
||||
column: "EsppExportValue",
|
||||
value: "2");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("f2da9e02-d619-4517-a598-374880a8c8e8"),
|
||||
column: "EsppExportValue",
|
||||
value: "540 00:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("f38d7d30-8923-4ea0-aa7c-5b251e19ab61"),
|
||||
column: "EsppExportValue",
|
||||
value: "1095 00:00:00");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("f4c3fe38-aeaa-42f7-a9ba-190ea2dfe339"),
|
||||
column: "EsppExportValue",
|
||||
value: "3");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("f9d5b03b-624a-4f9f-8da3-1490ea5d2914"),
|
||||
column: "EsppExportValue",
|
||||
value: "18");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("fa8a8f60-e41e-495e-ac86-35174d9976bf"),
|
||||
column: "EsppExportValue",
|
||||
value: "3");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("fad4bdb0-6c51-4810-a30b-6d031a0d4c46"),
|
||||
column: "EsppExportValue",
|
||||
value: "3");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("fb7f41ca-950b-4dc1-a0a6-bd9a221ab2ad"),
|
||||
column: "EsppExportValue",
|
||||
value: "10");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EsppExportValue",
|
||||
table: "EsppSchTypeValues");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "EsppSchTypeValues",
|
||||
keyColumn: "Id",
|
||||
keyValue: new Guid("e0465fbf-e3a5-4486-9f53-5bb85c6feeca"),
|
||||
column: "Value",
|
||||
value: "Каждые 98 часов");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -859,7 +859,7 @@ namespace PARR.DAL.Migrations
|
||||
new
|
||||
{
|
||||
Id = 2,
|
||||
Description = "Еженежельно",
|
||||
Description = "Еженедельно",
|
||||
Name = "Weekly"
|
||||
},
|
||||
new
|
||||
@@ -897,6 +897,10 @@ namespace PARR.DAL.Migrations
|
||||
b.Property<DateTimeOffset>("DateCreated")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("EsppExportValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("integer");
|
||||
|
||||
@@ -915,6 +919,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("6e3b5dd2-b2f7-40bc-bace-15bfa6bbd4ff"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "01:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждый час"
|
||||
},
|
||||
@@ -922,6 +927,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("4df04834-f14f-43d9-8984-334f080f4107"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "02:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 2 часа"
|
||||
},
|
||||
@@ -929,6 +935,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("dab6e3f9-2385-4966-b77c-133ad233c592"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "03:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 3 часа"
|
||||
},
|
||||
@@ -936,6 +943,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("035f485d-8451-47df-bfaa-ba4dd36cf146"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "04:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 4 часа"
|
||||
},
|
||||
@@ -943,6 +951,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("d627daa7-3eed-4571-acae-ffbb3c5bedb9"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "06:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 6 часов"
|
||||
},
|
||||
@@ -950,6 +959,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("ae0a0015-0f1e-4496-b71e-6244f7e321e7"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "12:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 12 часов"
|
||||
},
|
||||
@@ -957,6 +967,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("8df097aa-9860-4a62-9675-a8eecd3f2ce7"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "1 00:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Ежедневно"
|
||||
},
|
||||
@@ -964,6 +975,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("dee32e60-c1a1-4206-98bc-aa03deabfdf6"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "3 00:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 72 часа"
|
||||
},
|
||||
@@ -971,13 +983,15 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("e0465fbf-e3a5-4486-9f53-5bb85c6feeca"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "4 00:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 98 часов"
|
||||
Value = "Каждые 96 часов"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = new Guid("4e3f73d1-a0f3-4dd1-bca9-68ada0dd5ce2"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "14 00:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 2 недели"
|
||||
},
|
||||
@@ -985,6 +999,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("55833417-6a24-42f6-bcc2-5d032f883202"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "60 00:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 60 дней"
|
||||
},
|
||||
@@ -992,6 +1007,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("7fefa052-29db-4ce5-9c57-2fd9ff855f21"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "80 00:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 80 дней"
|
||||
},
|
||||
@@ -999,6 +1015,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("b0ca99f9-5ee0-45b3-bb80-948f82b1fcb1"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "90 00:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 90 дней"
|
||||
},
|
||||
@@ -1006,6 +1023,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("086f7a37-9848-423a-a3cc-36dbb5ad43e3"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "182 00:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые полгода"
|
||||
},
|
||||
@@ -1013,6 +1031,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("f2da9e02-d619-4517-a598-374880a8c8e8"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "540 00:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 1,5 года"
|
||||
},
|
||||
@@ -1020,6 +1039,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("f38d7d30-8923-4ea0-aa7c-5b251e19ab61"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "1095 00:00:00",
|
||||
TypeId = 1,
|
||||
Value = "Каждые 3 года"
|
||||
},
|
||||
@@ -1027,6 +1047,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("b7303461-9a30-43fa-8e55-305aa13f186f"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "1",
|
||||
TypeId = 2,
|
||||
Value = "Понедельник"
|
||||
},
|
||||
@@ -1034,6 +1055,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("e951135e-71f2-4262-9342-df4d5315ab6c"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "2",
|
||||
TypeId = 2,
|
||||
Value = "Вторник"
|
||||
},
|
||||
@@ -1041,6 +1063,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("c34d5375-70e7-4632-b3af-30e279a0621a"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "3",
|
||||
TypeId = 2,
|
||||
Value = "Среда"
|
||||
},
|
||||
@@ -1048,6 +1071,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("ec9540df-c2de-4bda-a063-34d02d4b6e03"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "4",
|
||||
TypeId = 2,
|
||||
Value = "Четверг"
|
||||
},
|
||||
@@ -1055,6 +1079,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("2ed85534-4684-4eb2-9ccb-e264d212c945"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "5",
|
||||
TypeId = 2,
|
||||
Value = "Пятница"
|
||||
},
|
||||
@@ -1062,6 +1087,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("a6804315-96ef-484e-82ee-c5795694468b"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "6",
|
||||
TypeId = 2,
|
||||
Value = "Суббота"
|
||||
},
|
||||
@@ -1069,6 +1095,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("eb71e699-937f-4894-9688-f7a7f95e5e58"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "7",
|
||||
TypeId = 2,
|
||||
Value = "Воскресенье"
|
||||
},
|
||||
@@ -1076,6 +1103,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("e86adbfb-3345-4e0c-aa3b-b4418f9cfe88"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "1",
|
||||
TypeId = 3,
|
||||
Value = "1"
|
||||
},
|
||||
@@ -1083,6 +1111,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("5b4d7ca6-31e7-475b-b7c8-13c6680c3dc3"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "2",
|
||||
TypeId = 3,
|
||||
Value = "2"
|
||||
},
|
||||
@@ -1090,6 +1119,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("0da03db0-9404-425d-bea1-5da0c9b60b59"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "3",
|
||||
TypeId = 3,
|
||||
Value = "3"
|
||||
},
|
||||
@@ -1097,6 +1127,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("199474c8-0a77-47e5-aab8-ba33c216cc9e"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "4",
|
||||
TypeId = 3,
|
||||
Value = "4"
|
||||
},
|
||||
@@ -1104,6 +1135,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("e6619da1-f7e8-45b9-bbd3-9c17bec2ccd3"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "5",
|
||||
TypeId = 3,
|
||||
Value = "5"
|
||||
},
|
||||
@@ -1111,6 +1143,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("a8708763-c838-49a5-95fe-bf4f73518d71"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "6",
|
||||
TypeId = 3,
|
||||
Value = "6"
|
||||
},
|
||||
@@ -1118,6 +1151,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("7ec056aa-820c-4900-96cb-4564d2ea6398"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "7",
|
||||
TypeId = 3,
|
||||
Value = "7"
|
||||
},
|
||||
@@ -1125,6 +1159,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("554d7d0c-91b1-4b81-b94d-1ee864192962"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "8",
|
||||
TypeId = 3,
|
||||
Value = "8"
|
||||
},
|
||||
@@ -1132,6 +1167,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("8b7847a4-23de-4199-8aad-3b5c0323b5a2"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "9",
|
||||
TypeId = 3,
|
||||
Value = "9"
|
||||
},
|
||||
@@ -1139,6 +1175,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("fb7f41ca-950b-4dc1-a0a6-bd9a221ab2ad"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "10",
|
||||
TypeId = 3,
|
||||
Value = "10"
|
||||
},
|
||||
@@ -1146,6 +1183,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("a28b530f-ea38-4a2c-a16b-0b7fa3770d3c"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "11",
|
||||
TypeId = 3,
|
||||
Value = "11"
|
||||
},
|
||||
@@ -1153,6 +1191,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("7a004a11-32e1-40ae-ab35-0d3dc3a69785"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "12",
|
||||
TypeId = 3,
|
||||
Value = "12"
|
||||
},
|
||||
@@ -1160,6 +1199,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("e0f2f4d1-4a5e-4997-8336-83c3c35f38df"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "13",
|
||||
TypeId = 3,
|
||||
Value = "13"
|
||||
},
|
||||
@@ -1167,6 +1207,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("9c5aaf48-88ec-4c67-b936-2be45550f8bf"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "14",
|
||||
TypeId = 3,
|
||||
Value = "14"
|
||||
},
|
||||
@@ -1174,6 +1215,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("8dbd680c-ce49-4d2e-8a1a-05619685e240"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "15",
|
||||
TypeId = 3,
|
||||
Value = "15"
|
||||
},
|
||||
@@ -1181,6 +1223,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("2f476f70-b1ef-419d-aad5-3911f1e3231f"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "16",
|
||||
TypeId = 3,
|
||||
Value = "16"
|
||||
},
|
||||
@@ -1188,6 +1231,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("2c635ce2-fc18-47be-b3e9-98c211abf312"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "17",
|
||||
TypeId = 3,
|
||||
Value = "17"
|
||||
},
|
||||
@@ -1195,6 +1239,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("f9d5b03b-624a-4f9f-8da3-1490ea5d2914"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "18",
|
||||
TypeId = 3,
|
||||
Value = "18"
|
||||
},
|
||||
@@ -1202,6 +1247,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("4f4b249c-db60-4582-86ed-75cfee4edd0c"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "19",
|
||||
TypeId = 3,
|
||||
Value = "19"
|
||||
},
|
||||
@@ -1209,6 +1255,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("220a1464-4d39-416c-b4b2-3093eb007298"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "20",
|
||||
TypeId = 3,
|
||||
Value = "20"
|
||||
},
|
||||
@@ -1216,6 +1263,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("c887ca60-b05d-4d3c-ad1f-223c879b1a6d"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "21",
|
||||
TypeId = 3,
|
||||
Value = "21"
|
||||
},
|
||||
@@ -1223,6 +1271,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("2905765d-63fb-41fe-a111-ee2f1d03d62e"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "22",
|
||||
TypeId = 3,
|
||||
Value = "22"
|
||||
},
|
||||
@@ -1230,6 +1279,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("dbbe704a-8d6d-40e7-bd30-6974035b1fab"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "23",
|
||||
TypeId = 3,
|
||||
Value = "23"
|
||||
},
|
||||
@@ -1237,6 +1287,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("cf7b9645-52ed-43a2-8267-267e0aed19b1"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "24",
|
||||
TypeId = 3,
|
||||
Value = "24"
|
||||
},
|
||||
@@ -1244,6 +1295,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("454788d6-d0ad-4c07-878c-da3fd3cd05e1"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "25",
|
||||
TypeId = 3,
|
||||
Value = "25"
|
||||
},
|
||||
@@ -1251,6 +1303,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("40d70d73-8582-4be6-a9e6-503b96ae3d49"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "26",
|
||||
TypeId = 3,
|
||||
Value = "26"
|
||||
},
|
||||
@@ -1258,6 +1311,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("8f6610dc-ef46-4842-a57e-18d7aaa75931"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "27",
|
||||
TypeId = 3,
|
||||
Value = "27"
|
||||
},
|
||||
@@ -1265,6 +1319,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("03858472-d4ce-47fd-9497-8051728766e4"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "28",
|
||||
TypeId = 3,
|
||||
Value = "28"
|
||||
},
|
||||
@@ -1272,6 +1327,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("b1018e07-e90e-42ee-b399-19f3d0c14dd6"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "29",
|
||||
TypeId = 3,
|
||||
Value = "29"
|
||||
},
|
||||
@@ -1279,6 +1335,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("a1669207-aa31-40fe-98d0-d941008d1655"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "30",
|
||||
TypeId = 3,
|
||||
Value = "30"
|
||||
},
|
||||
@@ -1286,6 +1343,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("0936aa99-73e0-43de-b6df-334c1228a226"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "31",
|
||||
TypeId = 3,
|
||||
Value = "31"
|
||||
},
|
||||
@@ -1293,6 +1351,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("626ca076-f09e-4a7a-8610-b7de6337b24a"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "1",
|
||||
TypeId = 4,
|
||||
Value = "Первый"
|
||||
},
|
||||
@@ -1300,6 +1359,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("032fbd02-67d0-4b8c-bed0-42629ab7113b"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "2",
|
||||
TypeId = 4,
|
||||
Value = "Второй"
|
||||
},
|
||||
@@ -1307,6 +1367,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("fa8a8f60-e41e-495e-ac86-35174d9976bf"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "3",
|
||||
TypeId = 4,
|
||||
Value = "Третий"
|
||||
},
|
||||
@@ -1314,6 +1375,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("d2f90168-2b49-42f2-820b-79db2c522adf"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "4",
|
||||
TypeId = 4,
|
||||
Value = "Четвертый"
|
||||
},
|
||||
@@ -1321,6 +1383,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("12bb8db2-cf7f-4113-baff-6883770f1ba5"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "5",
|
||||
TypeId = 4,
|
||||
Value = "Последний"
|
||||
},
|
||||
@@ -1328,6 +1391,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("18260e91-3fbe-4401-9edc-78dbc419370e"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "1",
|
||||
TypeId = 5,
|
||||
Value = "Январь"
|
||||
},
|
||||
@@ -1335,6 +1399,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("361526aa-3e1c-452e-bb44-0ade8521830d"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "2",
|
||||
TypeId = 5,
|
||||
Value = "Февраль"
|
||||
},
|
||||
@@ -1342,6 +1407,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("fad4bdb0-6c51-4810-a30b-6d031a0d4c46"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "3",
|
||||
TypeId = 5,
|
||||
Value = "Март"
|
||||
},
|
||||
@@ -1349,6 +1415,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("06ab835d-3d3e-4057-8422-a553b6b40995"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "4",
|
||||
TypeId = 5,
|
||||
Value = "Апрель"
|
||||
},
|
||||
@@ -1356,6 +1423,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("83f56b5d-b16b-4aa5-89d7-a253fee4e4ad"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "5",
|
||||
TypeId = 5,
|
||||
Value = "Май"
|
||||
},
|
||||
@@ -1363,6 +1431,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("e679ec84-a9ee-4bed-a051-2b14edddcb18"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "6",
|
||||
TypeId = 5,
|
||||
Value = "Июнь"
|
||||
},
|
||||
@@ -1370,6 +1439,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("d439808a-6a10-409b-8809-a755b7cca60b"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "7",
|
||||
TypeId = 5,
|
||||
Value = "Июль"
|
||||
},
|
||||
@@ -1377,6 +1447,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("6e9972c4-6bf7-4fe4-b4ea-bbb333fb69c8"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "8",
|
||||
TypeId = 5,
|
||||
Value = "Август"
|
||||
},
|
||||
@@ -1384,6 +1455,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("0883aac2-9d5b-4098-b672-c684d2a3a0c9"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "9",
|
||||
TypeId = 5,
|
||||
Value = "Сентябрь"
|
||||
},
|
||||
@@ -1391,6 +1463,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("5e6592bc-acb2-45a4-979b-fdecf8457453"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "10",
|
||||
TypeId = 5,
|
||||
Value = "Октябрь"
|
||||
},
|
||||
@@ -1398,6 +1471,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("edd7cb49-d6a0-4969-b2d6-1967da69b336"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "11",
|
||||
TypeId = 5,
|
||||
Value = "Ноябрь"
|
||||
},
|
||||
@@ -1405,6 +1479,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("dd695fb2-4ad0-4cda-a4df-e15059c56b24"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "12",
|
||||
TypeId = 5,
|
||||
Value = "Декабрь"
|
||||
},
|
||||
@@ -1412,6 +1487,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("2f473624-4eb3-49b4-a4b9-cc7fc08a50f5"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "1",
|
||||
TypeId = 6,
|
||||
Value = "Января"
|
||||
},
|
||||
@@ -1419,6 +1495,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("f0003490-a249-44bd-814f-4566999915d8"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "2",
|
||||
TypeId = 6,
|
||||
Value = "Февраля"
|
||||
},
|
||||
@@ -1426,6 +1503,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("f4c3fe38-aeaa-42f7-a9ba-190ea2dfe339"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "3",
|
||||
TypeId = 6,
|
||||
Value = "Марта"
|
||||
},
|
||||
@@ -1433,6 +1511,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("06a8bd2f-68e1-42f5-961c-ac3b98a2181e"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "4",
|
||||
TypeId = 6,
|
||||
Value = "Апреля"
|
||||
},
|
||||
@@ -1440,6 +1519,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("963b9c41-d607-444a-9fe0-fe429590e326"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "5",
|
||||
TypeId = 6,
|
||||
Value = "Мая"
|
||||
},
|
||||
@@ -1447,6 +1527,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("ec8554c8-dee4-49a1-b1b7-474ad8ec1473"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "6",
|
||||
TypeId = 6,
|
||||
Value = "Июня"
|
||||
},
|
||||
@@ -1454,6 +1535,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("e15c7c63-e29f-41a3-9c82-f70eb6c24fde"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "7",
|
||||
TypeId = 6,
|
||||
Value = "Июля"
|
||||
},
|
||||
@@ -1461,6 +1543,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("0b1f3cea-301a-4d74-9ce1-2cd93b41897d"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "8",
|
||||
TypeId = 6,
|
||||
Value = "Августа"
|
||||
},
|
||||
@@ -1468,6 +1551,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("e2fa3769-f66f-4753-a161-35adad7717a5"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "9",
|
||||
TypeId = 6,
|
||||
Value = "Сентября"
|
||||
},
|
||||
@@ -1475,6 +1559,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("c1de4aca-9f49-48ae-9279-cf9ec4092112"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "10",
|
||||
TypeId = 6,
|
||||
Value = "Октября"
|
||||
},
|
||||
@@ -1482,6 +1567,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("a74b9ebd-bcd8-4537-b371-194de2fe0a4d"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "11",
|
||||
TypeId = 6,
|
||||
Value = "Ноября"
|
||||
},
|
||||
@@ -1489,6 +1575,7 @@ namespace PARR.DAL.Migrations
|
||||
{
|
||||
Id = new Guid("852a5ebd-4545-494b-bc69-c27409a41adc"),
|
||||
DateCreated = new DateTimeOffset(new DateTime(2023, 5, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)),
|
||||
EsppExportValue = "12",
|
||||
TypeId = 6,
|
||||
Value = "Декабря"
|
||||
});
|
||||
|
||||
@@ -18,10 +18,19 @@ namespace PARR.DAL.Models
|
||||
[NotMapped]
|
||||
public DateTimeOffset? DateModified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Значение в ЕСПП, при создании/изменении расписания
|
||||
/// </summary>
|
||||
public required string Value { get; set; }
|
||||
|
||||
public int TypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Значение ЕСПП при отображении представления, используется при экспорте
|
||||
/// </summary>
|
||||
public required string EsppExportValue { get; set; }
|
||||
|
||||
|
||||
[ForeignKey(nameof(TypeId))]
|
||||
public EsppSchType? EsppSchType { get; set; }
|
||||
|
||||
|
||||
@@ -35,12 +35,6 @@ namespace PARR.DAL.Services.Implementations
|
||||
{
|
||||
//Формирует расписание в нормальном понятном виде из БД
|
||||
|
||||
if (applicationInWorksId == new Guid("4c65475c-e11d-4147-b219-50d632fa321b"))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
var schValues = await dataContext.EsppSchValues
|
||||
.Include(t => t.EsppSchTypeConfig)
|
||||
.ThenInclude(t => t!.EsppSchTypeSchedule)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Models;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Context;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Models;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces.Base;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ COPY ["PARR.EsppOrderLoader/PARR.EsppOrderLoader.csproj", "PARR.EsppOrderLoader/
|
||||
COPY ["PARR.BLL/PARR.BLL.csproj", "PARR.BLL/"]
|
||||
COPY ["PARR.DAL/PARR.DAL.csproj", "PARR.DAL/"]
|
||||
COPY ["PARR.EsppApi/PARR.EsppApi.csproj", "PARR.EsppApi/"]
|
||||
COPY ["PARR.Constants/PARR.Constants.csproj", "PARR.Constants/"]
|
||||
RUN dotnet restore "PARR.EsppOrderLoaderWorker/PARR.EsppOrderLoaderWorker.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/PARR.EsppOrderLoaderWorker"
|
||||
|
||||
@@ -11,6 +11,7 @@ COPY ["PARR.EsppOrderManager/PARR.EsppOrderManager.csproj", "PARR.EsppOrderManag
|
||||
COPY ["PARR.BLL/PARR.BLL.csproj", "PARR.BLL/"]
|
||||
COPY ["PARR.DAL/PARR.DAL.csproj", "PARR.DAL/"]
|
||||
COPY ["PARR.EsppApi/PARR.EsppApi.csproj", "PARR.EsppApi/"]
|
||||
COPY ["PARR.Constants/PARR.Constants.csproj", "PARR.Constants/"]
|
||||
RUN dotnet restore "PARR.EsppOrderManagerWorker/PARR.EsppOrderManagerWorker.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/PARR.EsppOrderManagerWorker"
|
||||
|
||||
111
PARR.EsppScheduleSync/Domain/EsppObjectSchedule.cs
Normal file
111
PARR.EsppScheduleSync/Domain/EsppObjectSchedule.cs
Normal file
@@ -0,0 +1,111 @@
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.EsppSync;
|
||||
|
||||
namespace PARR.EsppScheduleSync.Domain
|
||||
{
|
||||
internal class EsppObjectSchedule : IEsppObject
|
||||
{
|
||||
//Все поля описаны в документации по роботам: http://gitlab.dvgd.oao.rzd/devptk/parr/parr_api/-/wikis/EsppRobots
|
||||
|
||||
public RobotsEnum Robot => RobotsEnum.ScheduleOrder;
|
||||
|
||||
public required string TemplateName { get; set; }
|
||||
|
||||
public string Code { get; set; } = string.Empty;
|
||||
|
||||
public string ScheduleName { get; set; } = string.Empty;
|
||||
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
public string ResponseArea { get; set; } = string.Empty;
|
||||
|
||||
public string WorkGroup { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Тип повторения: Регулярно, Ежегодно...
|
||||
/// </summary>
|
||||
public EsppSchTypeScheduleEnum TypeSchedule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Интервал времени: Ежедневно, 1 00:00:00
|
||||
/// </summary>
|
||||
public string Interval { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Еженедельно: Каждый понедельник
|
||||
/// </summary>
|
||||
public string Dayofweek { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Ежемесячно: Каждое 23
|
||||
/// </summary>
|
||||
public string Dayofmonth { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Ежемесячно-2: Каждый Первый
|
||||
/// </summary>
|
||||
public string Md1 { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Ежемесячно-2: Каждый Понедельник
|
||||
/// </summary>
|
||||
public string Md2 { get; set; } = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Ежегодно: Каждый Январь
|
||||
/// </summary>
|
||||
public string Annualm { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Ежегодно: Каждый 12
|
||||
/// </summary>
|
||||
public string Annualday { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Ежегодно-2: Каждый Первый
|
||||
/// </summary>
|
||||
public string An1 { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Ежегодно-2: Каждый Понедельник
|
||||
/// </summary>
|
||||
public string An2 { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Ежегодно-2: Каждый Января
|
||||
/// </summary>
|
||||
public string An3 { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Тип исключения: Нет исключений
|
||||
/// </summary>
|
||||
public string TypeV60calendar { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Следующее срабатывание: 16/10/23 17:00:00
|
||||
/// </summary>
|
||||
public required string Scheduled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// В каком часовом поясе: MSK
|
||||
/// </summary>
|
||||
public required string Timezone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Тип прекращения, Отсутствует дата завершения: Выбран radio button forever
|
||||
/// </summary>
|
||||
public required string TerminationType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Завершение после: 0
|
||||
/// </summary>
|
||||
public string CompleteAfter { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Рабочий график
|
||||
/// </summary>
|
||||
public string V60calendar { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
37
PARR.EsppScheduleSync/EsppScheduleSyncInstaller.cs
Normal file
37
PARR.EsppScheduleSync/EsppScheduleSyncInstaller.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using PARR.BLL;
|
||||
using PARR.DAL;
|
||||
using PARR.EsppSync;
|
||||
using PARR.EsppScheduleSync.Domain;
|
||||
using PARR.EsppScheduleSync.Settings;
|
||||
|
||||
namespace PARR.EsppScheduleSync
|
||||
{
|
||||
public static class EsppScheduleSyncInstaller
|
||||
{
|
||||
public static void InstallEsppScheduleSyncServices(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.InstallBllServices(configuration);
|
||||
services.InstallEsppSyncServices<EsppObjectSchedule>(configuration);
|
||||
|
||||
var globalSettings = new GlobalSettings();
|
||||
configuration.GetSection(nameof(GlobalSettings)).Bind(globalSettings);
|
||||
services.AddSingleton(globalSettings);
|
||||
|
||||
services.AddTransient<IScheduleSyncher, ScheduleSyncher>();
|
||||
}
|
||||
|
||||
public static IConfigurationBuilder AddEsppScheduleConfigurations(this IConfigurationBuilder builder, IServiceCollection services)
|
||||
{
|
||||
builder.AddDalConfigurations(services);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static void AddEsppScheduleSettings(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.AddDallSettings(configuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
8
PARR.EsppScheduleSync/IScheduleSyncher.cs
Normal file
8
PARR.EsppScheduleSync/IScheduleSyncher.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace PARR.EsppScheduleSync
|
||||
{
|
||||
public interface IScheduleSyncher
|
||||
{
|
||||
void Start();
|
||||
void Stop();
|
||||
}
|
||||
}
|
||||
15
PARR.EsppScheduleSync/PARR.EsppScheduleSync.csproj
Normal file
15
PARR.EsppScheduleSync/PARR.EsppScheduleSync.csproj
Normal file
@@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PARR.BLL\PARR.BLL.csproj" />
|
||||
<ProjectReference Include="..\PARR.DAL\PARR.DAL.csproj" />
|
||||
<ProjectReference Include="..\PARR.EsppSync\PARR.EsppSync.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
367
PARR.EsppScheduleSync/ScheduleSyncher.cs
Normal file
367
PARR.EsppScheduleSync/ScheduleSyncher.cs
Normal file
@@ -0,0 +1,367 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.BLL.Helpers;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.EsppScheduleSync.Domain;
|
||||
using PARR.EsppScheduleSync.Settings;
|
||||
using PARR.EsppSync;
|
||||
|
||||
namespace PARR.EsppScheduleSync
|
||||
{
|
||||
internal class ScheduleSyncher : IScheduleSyncher
|
||||
{
|
||||
private readonly ILogger<ScheduleSyncher> logger;
|
||||
private readonly GlobalSettings globalSettings;
|
||||
private readonly IMqService mqService;
|
||||
private readonly ISyncService<EsppObjectSchedule> syncService;
|
||||
private readonly SettingsFromDb settingsFromDb;
|
||||
private readonly IServiceProvider serviceProvider;
|
||||
|
||||
public ScheduleSyncher(
|
||||
ILogger<ScheduleSyncher> logger,
|
||||
GlobalSettings globalSettings,
|
||||
IMqService mqService,
|
||||
ISyncService<EsppObjectSchedule> syncService,
|
||||
SettingsFromDb settingsFromDb,
|
||||
IServiceProvider serviceProvider
|
||||
)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.globalSettings = globalSettings;
|
||||
this.mqService = mqService;
|
||||
this.syncService = syncService;
|
||||
this.settingsFromDb = settingsFromDb;
|
||||
this.serviceProvider = serviceProvider;
|
||||
if (globalSettings.MqSettings == null)
|
||||
{
|
||||
logger.LogError("Нет секции настроек хранилища. MqSettings, EsppTemplates");
|
||||
throw new Exception("Нет секции настроек хранилища. MqSettings, EsppTemplates");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Start()
|
||||
{
|
||||
var isConnected = mqService.InitConsumer(globalSettings!.MqSettings!, SyncScheduleAsync);
|
||||
|
||||
if (!isConnected)
|
||||
throw new Exception("Ошибка при подключении к RabbitMq");
|
||||
|
||||
logger.LogInformation($"Запущена проверка очереди {globalSettings.MqSettings!.QueueName}.");
|
||||
}
|
||||
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
mqService.Dispose();
|
||||
|
||||
logger.LogInformation($"=== === === Соединение с очередью {globalSettings.MqSettings!.QueueName} закрыто === === ===");
|
||||
}
|
||||
|
||||
|
||||
private async Task SyncScheduleAsync(string str)
|
||||
{
|
||||
await syncService.SyncEsppObjectAsync(str, ParseStrToEsppObject, ConvertDbObjToEsppObj);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Преобразование модели БД в модель для сравнения
|
||||
/// </summary>
|
||||
/// <param name="template"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private EsppObjectSchedule ConvertDbObjToEsppObj(Template template)
|
||||
{
|
||||
var esppObjectFromDb = new EsppObjectSchedule
|
||||
{
|
||||
TemplateName = template.Name,
|
||||
Code = template.ScheduleEsppId ?? "",
|
||||
ScheduleName = template.Name,
|
||||
IsActive = template.IsActiveSchedule,
|
||||
ResponseArea = template.Host!.ResponseArea!.Name,
|
||||
WorkGroup = template.Host!.WorkGroup!,
|
||||
//Мы решили, что для всех расписаний "Нет исключений", если что-то поменяется, тут нужно переделать
|
||||
TypeV60calendar = settingsFromDb.ScheduleExclude == "Нет исключений" ? "NONE" : "",
|
||||
Scheduled = EsppScheduleHelpers.GetNextRun(template.ApplicationsInWork!.NextRun),
|
||||
Timezone = settingsFromDb.ScheduleTimezone,
|
||||
//Мы решили, что для всех расписаний "Отсутствует дата завершения", если что-то поменяется, тут нужно переделать
|
||||
TerminationType = settingsFromDb.ScheduleRepeatRange == "Отсутствует дата завершения" ? "forever" : "",
|
||||
CompleteAfter = "",
|
||||
V60calendar = ""
|
||||
};
|
||||
|
||||
FillScheduleFromDb(template, ref esppObjectFromDb);
|
||||
|
||||
return ClearOptionalFields(esppObjectFromDb);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Заполнить расписание из БД
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private void FillScheduleFromDb(Template template, ref EsppObjectSchedule esppObject)
|
||||
{
|
||||
using (var scope = serviceProvider.CreateScope())
|
||||
{
|
||||
var esppSchTypeConfigService = scope.ServiceProvider.GetService<IEsppSchTypeConfigService>();
|
||||
if (esppSchTypeConfigService == null)
|
||||
throw new Exception($"Не найден сервис: {nameof(IEsppSchTypeConfigService)}");
|
||||
|
||||
var esppSchedule = esppSchTypeConfigService.GetEsppScheduleDto(template.ApplicationInWorkId);
|
||||
if (esppSchedule == null)
|
||||
{
|
||||
logger.LogError($"Не смог получить расписание из БД для шаблона templateId: {template.Id}, {template.Name}");
|
||||
return;
|
||||
}
|
||||
|
||||
var typeSchedule = GetTypeScheduleByString(esppSchedule.TypeSchedule.Name);
|
||||
if (!typeSchedule.HasValue)
|
||||
return;
|
||||
|
||||
//тип повторения
|
||||
esppObject.TypeSchedule = typeSchedule.Value;
|
||||
|
||||
//в зависимости от типа, присваиваем значения
|
||||
switch (esppObject.TypeSchedule)
|
||||
{
|
||||
case EsppSchTypeScheduleEnum.Regularly:
|
||||
esppObject.Interval = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue;
|
||||
break;
|
||||
case EsppSchTypeScheduleEnum.Weekly:
|
||||
esppObject.Dayofweek = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue;
|
||||
break;
|
||||
case EsppSchTypeScheduleEnum.Monthly:
|
||||
esppObject.Dayofmonth = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue;
|
||||
break;
|
||||
case EsppSchTypeScheduleEnum.Monthly2:
|
||||
esppObject.Md1 = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue;
|
||||
esppObject.Md2 = esppSchedule.Values.First(t => t.Order == 1).Value.EsppExportValue;
|
||||
break;
|
||||
case EsppSchTypeScheduleEnum.Annually:
|
||||
esppObject.Annualm = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue;
|
||||
esppObject.Annualday = esppSchedule.Values.First(t => t.Order == 1).Value.EsppExportValue;
|
||||
break;
|
||||
case EsppSchTypeScheduleEnum.Annually2:
|
||||
esppObject.An1 = esppSchedule.Values.First(t => t.Order == 0).Value.EsppExportValue;
|
||||
esppObject.An2 = esppSchedule.Values.First(t => t.Order == 1).Value.EsppExportValue;
|
||||
esppObject.An3 = esppSchedule.Values.First(t => t.Order == 2).Value.EsppExportValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Парсинг из строки в модель для сравнения
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private EsppObjectSchedule? ParseStrToEsppObject(string str)
|
||||
{
|
||||
var splittedContent = str.Split(globalSettings.ParsingSeparator);
|
||||
if (splittedContent.Length != 23)
|
||||
{
|
||||
logger.LogError($"Входная строка после сплита не содержит 23 объекта (факт: {splittedContent.Length}).");
|
||||
return null;
|
||||
}
|
||||
|
||||
var templateName = splittedContent[6];
|
||||
var scheduleName = splittedContent[2];
|
||||
|
||||
if (!IsValidName(templateName) || !IsValidName(scheduleName))
|
||||
return null;
|
||||
|
||||
bool.TryParse(splittedContent[1].Trim(), out var isActive);
|
||||
|
||||
var typeSchedule = GetTypeScheduleByString(splittedContent[7]);
|
||||
if (!typeSchedule.HasValue)
|
||||
return null;
|
||||
|
||||
var esppObject = new EsppObjectSchedule
|
||||
{
|
||||
TemplateName = templateName,
|
||||
Code = splittedContent[0],
|
||||
ScheduleName = scheduleName,
|
||||
IsActive = isActive,
|
||||
ResponseArea = splittedContent[5],
|
||||
WorkGroup = splittedContent[3],
|
||||
TypeSchedule = typeSchedule.Value,
|
||||
Interval = splittedContent[8],
|
||||
Dayofweek = splittedContent[15],
|
||||
Dayofmonth = splittedContent[14],
|
||||
Md1 = splittedContent[16],
|
||||
Md2 = splittedContent[17],
|
||||
Annualm = splittedContent[13],
|
||||
Annualday = splittedContent[12],
|
||||
An1 = splittedContent[9],
|
||||
An2 = splittedContent[10],
|
||||
An3 = splittedContent[11],
|
||||
TypeV60calendar = splittedContent[21],
|
||||
Scheduled = splittedContent[4],
|
||||
Timezone = splittedContent[18],
|
||||
TerminationType = splittedContent[19],
|
||||
CompleteAfter = splittedContent[20],
|
||||
V60calendar = splittedContent[22]
|
||||
};
|
||||
|
||||
return ClearOptionalFields(esppObject);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Преобразовать из строки в Тип Повторения
|
||||
/// </summary>
|
||||
/// <param name="typeSchedule"></param>
|
||||
/// <returns></returns>
|
||||
private EsppSchTypeScheduleEnum? GetTypeScheduleByString(string typeSchedule)
|
||||
{
|
||||
typeSchedule = typeSchedule.ToLower();
|
||||
|
||||
//Regularly, Регулярно (значение в ЕСПП и в БД не совпадают, в бд Regularly, в ЕСПП simple)
|
||||
if (typeSchedule == "simple" || typeSchedule == EsppSchTypeScheduleEnum.Regularly.ToString().ToLower())
|
||||
return EsppSchTypeScheduleEnum.Regularly;
|
||||
|
||||
if (typeSchedule == EsppSchTypeScheduleEnum.Weekly.ToString().ToLower())
|
||||
return EsppSchTypeScheduleEnum.Weekly;
|
||||
|
||||
if (typeSchedule == EsppSchTypeScheduleEnum.Monthly.ToString().ToLower())
|
||||
return EsppSchTypeScheduleEnum.Monthly;
|
||||
|
||||
if (typeSchedule == EsppSchTypeScheduleEnum.Monthly2.ToString().ToLower())
|
||||
return EsppSchTypeScheduleEnum.Monthly2;
|
||||
|
||||
if (typeSchedule == EsppSchTypeScheduleEnum.Annually.ToString().ToLower())
|
||||
return EsppSchTypeScheduleEnum.Annually;
|
||||
|
||||
if (typeSchedule == EsppSchTypeScheduleEnum.Annually2.ToString().ToLower())
|
||||
return EsppSchTypeScheduleEnum.Annually2;
|
||||
|
||||
logger.LogError($"Не смог преобразовать Тип повторения из ЕСПП в EsppSchTypeScheduleEnum. Получено значение {typeSchedule}");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Проверка имени шаблона и расписание на соответствие префиксу из настроек
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
private bool IsValidName(string name)
|
||||
{
|
||||
var currentCulture = Thread.CurrentThread.CurrentCulture;
|
||||
|
||||
if (!string.IsNullOrEmpty(settingsFromDb.TemplatePrefixName) && name.StartsWith(settingsFromDb.TemplatePrefixName, true, currentCulture))
|
||||
return true;
|
||||
|
||||
logger.LogWarning($"Имя шаблона или расписания не соответствует обязательному префиксу({settingsFromDb.TemplatePrefixName}). {name} игнорирован");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Очистка полей которые не нуждаются в синхронизации
|
||||
/// </summary>
|
||||
/// <param name="esppObject"></param>
|
||||
/// <returns></returns>
|
||||
private EsppObjectSchedule ClearOptionalFields(EsppObjectSchedule esppObject)
|
||||
{
|
||||
esppObject.Code = string.Empty;
|
||||
esppObject.ScheduleName = string.Empty;
|
||||
esppObject.ResponseArea = string.Empty;
|
||||
esppObject.WorkGroup = string.Empty;
|
||||
esppObject.CompleteAfter = string.Empty;
|
||||
esppObject.V60calendar = string.Empty;
|
||||
|
||||
// В ЕСПП, при изменении "Повторять задачу", остаются предыдущие значения, их не нужно синхронизировать (касается только данных полученных из ЕСПП, в БД все ок)
|
||||
// т.е. если стояло Ежедненвно:понедельник, а изменили например на Еженедельно..., то в ежедневно значения останутся, но будут отрабатывать значения из Еженедельно.
|
||||
// Т е значения из Ежедненвно проверять не нужно, вот их и будем очищать
|
||||
|
||||
switch (esppObject.TypeSchedule)
|
||||
{
|
||||
case EsppSchTypeScheduleEnum.Regularly:
|
||||
//esppObject.Interval = string.Empty;
|
||||
esppObject.Dayofweek = string.Empty;
|
||||
esppObject.Dayofmonth = string.Empty;
|
||||
esppObject.Md1 = string.Empty;
|
||||
esppObject.Md2 = string.Empty;
|
||||
esppObject.Annualm = string.Empty;
|
||||
esppObject.Annualday = string.Empty;
|
||||
esppObject.An1 = string.Empty;
|
||||
esppObject.An2 = string.Empty;
|
||||
esppObject.An3 = string.Empty;
|
||||
break;
|
||||
case EsppSchTypeScheduleEnum.Weekly:
|
||||
esppObject.Interval = string.Empty;
|
||||
//esppObject.Dayofweek = string.Empty;
|
||||
esppObject.Dayofmonth = string.Empty;
|
||||
esppObject.Md1 = string.Empty;
|
||||
esppObject.Md2 = string.Empty;
|
||||
esppObject.Annualm = string.Empty;
|
||||
esppObject.Annualday = string.Empty;
|
||||
esppObject.An1 = string.Empty;
|
||||
esppObject.An2 = string.Empty;
|
||||
esppObject.An3 = string.Empty;
|
||||
break;
|
||||
case EsppSchTypeScheduleEnum.Monthly:
|
||||
esppObject.Interval = string.Empty;
|
||||
esppObject.Dayofweek = string.Empty;
|
||||
//esppObject.Dayofmonth = string.Empty;
|
||||
esppObject.Md1 = string.Empty;
|
||||
esppObject.Md2 = string.Empty;
|
||||
esppObject.Annualm = string.Empty;
|
||||
esppObject.Annualday = string.Empty;
|
||||
esppObject.An1 = string.Empty;
|
||||
esppObject.An2 = string.Empty;
|
||||
esppObject.An3 = string.Empty;
|
||||
break;
|
||||
case EsppSchTypeScheduleEnum.Monthly2:
|
||||
esppObject.Interval = string.Empty;
|
||||
esppObject.Dayofweek = string.Empty;
|
||||
esppObject.Dayofmonth = string.Empty;
|
||||
//esppObject.Md1 = string.Empty;
|
||||
//esppObject.Md2 = string.Empty;
|
||||
esppObject.Annualm = string.Empty;
|
||||
esppObject.Annualday = string.Empty;
|
||||
esppObject.An1 = string.Empty;
|
||||
esppObject.An2 = string.Empty;
|
||||
esppObject.An3 = string.Empty;
|
||||
break;
|
||||
case EsppSchTypeScheduleEnum.Annually:
|
||||
esppObject.Interval = string.Empty;
|
||||
esppObject.Dayofweek = string.Empty;
|
||||
esppObject.Dayofmonth = string.Empty;
|
||||
esppObject.Md1 = string.Empty;
|
||||
esppObject.Md2 = string.Empty;
|
||||
//esppObject.Annualm = string.Empty;
|
||||
//esppObject.Annualday = string.Empty;
|
||||
esppObject.An1 = string.Empty;
|
||||
esppObject.An2 = string.Empty;
|
||||
esppObject.An3 = string.Empty;
|
||||
break;
|
||||
case EsppSchTypeScheduleEnum.Annually2:
|
||||
esppObject.Interval = string.Empty;
|
||||
esppObject.Dayofweek = string.Empty;
|
||||
esppObject.Dayofmonth = string.Empty;
|
||||
esppObject.Md1 = string.Empty;
|
||||
esppObject.Md2 = string.Empty;
|
||||
esppObject.Annualm = string.Empty;
|
||||
esppObject.Annualday = string.Empty;
|
||||
//esppObject.An1 = string.Empty;
|
||||
//esppObject.An2 = string.Empty;
|
||||
//esppObject.An3 = string.Empty;
|
||||
break;
|
||||
}
|
||||
|
||||
return esppObject;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
18
PARR.EsppScheduleSync/Settings/GlobalSettings.cs
Normal file
18
PARR.EsppScheduleSync/Settings/GlobalSettings.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using PARR.BLL.Contracts.Interfaces;
|
||||
|
||||
namespace PARR.EsppScheduleSync.Settings
|
||||
{
|
||||
internal class GlobalSettings
|
||||
{
|
||||
public MqSettings? MqSettings { get; set; }
|
||||
public string ParsingSeparator { get; set; } = "<|>";
|
||||
}
|
||||
|
||||
internal class MqSettings : IMqSettings
|
||||
{
|
||||
public string HostName { get; set; } = string.Empty;
|
||||
public string QueueName { get; set; } = string.Empty;
|
||||
public string User { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
28
PARR.EsppScheduleSyncWorker/Dockerfile
Normal file
28
PARR.EsppScheduleSyncWorker/Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM 10.99.253.167:8090/dotnet/runtime:7.0 AS base
|
||||
WORKDIR /app
|
||||
|
||||
FROM 10.99.253.167:8090/dotnet/sdk:7.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["NuGet.config", "."]
|
||||
COPY ["PARR.EsppScheduleSyncWorker/PARR.EsppScheduleSyncWorker.csproj", "PARR.EsppScheduleSyncWorker/"]
|
||||
COPY ["PARR.EsppScheduleSync/PARR.EsppScheduleSync.csproj", "PARR.EsppScheduleSync/"]
|
||||
COPY ["PARR.BLL/PARR.BLL.csproj", "PARR.BLL/"]
|
||||
COPY ["PARR.DAL/PARR.DAL.csproj", "PARR.DAL/"]
|
||||
COPY ["PARR.Constants/PARR.Constants.csproj", "PARR.Constants/"]
|
||||
COPY ["PARR.EsppSync/PARR.EsppSync.csproj", "PARR.EsppSync/"]
|
||||
RUN dotnet restore "PARR.EsppScheduleSyncWorker/PARR.EsppScheduleSyncWorker.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/PARR.EsppScheduleSyncWorker"
|
||||
RUN dotnet build "PARR.EsppScheduleSyncWorker.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
ARG app_version=0.0.0-default
|
||||
RUN dotnet publish "PARR.EsppScheduleSyncWorker.csproj" -c Release -o /app/publish /p:UseAppHost=false /p:Version=$app_version
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
|
||||
ENTRYPOINT ["dotnet", "PARR.EsppScheduleSyncWorker.dll"]
|
||||
@@ -0,0 +1,24 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Worker">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>dotnet-PARR.EsppScheduleSyncWorker-30fab400-2a4f-412e-ad4d-ec19f45d7c50</UserSecretsId>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Elastic.CommonSchema.Serilog" Version="8.6.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
|
||||
<PackageReference Include="Serilog.Extensions.Hosting" Version="7.0.0" />
|
||||
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PARR.EsppScheduleSync\PARR.EsppScheduleSync.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
32
PARR.EsppScheduleSyncWorker/Program.cs
Normal file
32
PARR.EsppScheduleSyncWorker/Program.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Elastic.CommonSchema.Serilog;
|
||||
using PARR.EsppScheduleSync;
|
||||
using PARR.EsppScheduleSyncWorker;
|
||||
using Serilog;
|
||||
|
||||
var builder = Host.CreateApplicationBuilder();
|
||||
|
||||
builder.Services.AddLogging(config =>
|
||||
{
|
||||
config.ClearProviders();
|
||||
|
||||
var logger = new LoggerConfiguration();
|
||||
|
||||
if (builder.Environment.IsProduction())
|
||||
logger.WriteTo.Console(new EcsTextFormatter());
|
||||
else
|
||||
logger.WriteTo.Console();
|
||||
|
||||
logger.ReadFrom.Configuration(builder.Configuration);
|
||||
|
||||
config.AddSerilog(logger.CreateLogger());
|
||||
});
|
||||
|
||||
builder.Services.InstallEsppScheduleSyncServices(builder.Configuration);
|
||||
builder.Configuration.AddEsppScheduleConfigurations(builder.Services);
|
||||
builder.Services.AddEsppScheduleSettings(builder.Configuration);
|
||||
|
||||
builder.Services.AddHostedService<Worker>();
|
||||
|
||||
var host = builder.Build();
|
||||
host.Run();
|
||||
|
||||
14
PARR.EsppScheduleSyncWorker/Properties/launchSettings.json
Normal file
14
PARR.EsppScheduleSyncWorker/Properties/launchSettings.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"profiles": {
|
||||
"PARR.EsppScheduleSyncWorker": {
|
||||
"commandName": "Project",
|
||||
"environmentVariables": {
|
||||
"DOTNET_ENVIRONMENT": "Development"
|
||||
},
|
||||
"dotnetRunMessages": true
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker"
|
||||
}
|
||||
}
|
||||
}
|
||||
29
PARR.EsppScheduleSyncWorker/Worker.cs
Normal file
29
PARR.EsppScheduleSyncWorker/Worker.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using PARR.DAL.TransformServices;
|
||||
using PARR.EsppScheduleSync;
|
||||
|
||||
namespace PARR.EsppScheduleSyncWorker
|
||||
{
|
||||
public class Worker : BackgroundService
|
||||
{
|
||||
private readonly ILogger<Worker> _logger;
|
||||
private readonly IScheduleSyncher scheduleSyncher;
|
||||
|
||||
public Worker(ILogger<Worker> logger, IScheduleSyncher scheduleSyncher)
|
||||
{
|
||||
_logger = logger;
|
||||
this.scheduleSyncher = scheduleSyncher;
|
||||
}
|
||||
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
scheduleSyncher.Start();
|
||||
}
|
||||
|
||||
public override Task StopAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
scheduleSyncher.Stop();
|
||||
|
||||
return base.StopAsync(cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
13
PARR.EsppScheduleSyncWorker/appsettings.Development.json
Normal file
13
PARR.EsppScheduleSyncWorker/appsettings.Development.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"GlobalSettings": {
|
||||
"MqSettings": {
|
||||
"HostName": "10.99.253.216"
|
||||
}
|
||||
}
|
||||
}
|
||||
38
PARR.EsppScheduleSyncWorker/appsettings.json
Normal file
38
PARR.EsppScheduleSyncWorker/appsettings.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Server=10.99.253.184;Database=parr;User Id=app_parr; Password=PosdfkhT&)%sdfligL&%5546;"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"Serilog": {
|
||||
"MinimumLevel": {
|
||||
"Default": "Debug",
|
||||
"Override": {
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Debug"
|
||||
}
|
||||
},
|
||||
"WriteTo": [
|
||||
{
|
||||
"Name": "File",
|
||||
"Args": {
|
||||
"path": "log/log-.txt",
|
||||
"rollingInterval": "Day"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"GlobalSettings": {
|
||||
"MqSettings": {
|
||||
"HostName": "parr-rabbitmq",
|
||||
"QueueName": "parr-espp-schedulers",
|
||||
"User": "espp_schedulers_reader",
|
||||
"Password": "KjdhGLJDshgd&^%84S2"
|
||||
},
|
||||
"ParsingSeparator": "<|>"
|
||||
}
|
||||
}
|
||||
16
PARR.EsppSync/EsppSyncInstaller.cs
Normal file
16
PARR.EsppSync/EsppSyncInstaller.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using PARR.DAL;
|
||||
|
||||
namespace PARR.EsppSync
|
||||
{
|
||||
public static class EsppSyncInstaller
|
||||
{
|
||||
public static void InstallEsppSyncServices<EsppObject>(this IServiceCollection services, IConfiguration configuration) where EsppObject : class, IEsppObject
|
||||
{
|
||||
services.InstallDalServices(configuration);
|
||||
|
||||
services.AddTransient<ISyncService<EsppObject>, SyncService<EsppObject>>();
|
||||
}
|
||||
}
|
||||
}
|
||||
11
PARR.EsppSync/IEsppObject.cs
Normal file
11
PARR.EsppSync/IEsppObject.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using PARR.Constants;
|
||||
|
||||
namespace PARR.EsppSync
|
||||
{
|
||||
public interface IEsppObject
|
||||
{
|
||||
public string TemplateName { get; set; }
|
||||
|
||||
public RobotsEnum Robot { get; }
|
||||
}
|
||||
}
|
||||
25
PARR.EsppSync/ISyncService.cs
Normal file
25
PARR.EsppSync/ISyncService.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using PARR.DAL.Models;
|
||||
|
||||
namespace PARR.EsppSync
|
||||
{
|
||||
/// <summary>
|
||||
/// Делегат парсинга из строки в модель EsppObject
|
||||
/// </summary>
|
||||
/// <typeparam name="EsppObject"></typeparam>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
public delegate EsppObject? ParserHandlerDelegate<EsppObject>(string str) where EsppObject : class, IEsppObject;
|
||||
|
||||
/// <summary>
|
||||
/// Конвертирует Template в модель для сравнения
|
||||
/// </summary>
|
||||
/// <typeparam name="EsppObject"></typeparam>
|
||||
/// <param name="templateName"></param>
|
||||
/// <returns></returns>
|
||||
public delegate EsppObject ConvertDbObjToComparisonObjHandlerDelegate<EsppObject>(Template template) where EsppObject : class, IEsppObject;
|
||||
|
||||
public interface ISyncService<EsppObject> where EsppObject : class, IEsppObject
|
||||
{
|
||||
Task SyncEsppObjectAsync(string str, ParserHandlerDelegate<EsppObject> parser, ConvertDbObjToComparisonObjHandlerDelegate<EsppObject> converterToEsppObject);
|
||||
}
|
||||
}
|
||||
17
PARR.EsppSync/PARR.EsppSync.csproj
Normal file
17
PARR.EsppSync/PARR.EsppSync.csproj
Normal file
@@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PARR.DAL\PARR.DAL.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
144
PARR.EsppSync/SyncService.cs
Normal file
144
PARR.EsppSync/SyncService.cs
Normal file
@@ -0,0 +1,144 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
namespace PARR.EsppSync
|
||||
{
|
||||
internal class SyncService<EsppObject> : ISyncService<EsppObject> where EsppObject : class, IEsppObject
|
||||
{
|
||||
private readonly ILogger<SyncService<EsppObject>> logger;
|
||||
private readonly IServiceProvider serviceProvider;
|
||||
|
||||
public SyncService(
|
||||
ILogger<SyncService<EsppObject>> logger,
|
||||
IServiceProvider serviceProvider
|
||||
)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.serviceProvider = serviceProvider;
|
||||
}
|
||||
|
||||
|
||||
public async Task SyncEsppObjectAsync(
|
||||
string str,
|
||||
ParserHandlerDelegate<EsppObject> parser,
|
||||
ConvertDbObjToComparisonObjHandlerDelegate<EsppObject> converterToEsppObject
|
||||
)
|
||||
{
|
||||
logger.LogDebug($"Получил строку. Начинаю работать. Строка: {str}");
|
||||
|
||||
if (string.IsNullOrEmpty(str))
|
||||
{
|
||||
logger.LogWarning("Получил пустую строку, ничего не делаю.");
|
||||
return;
|
||||
}
|
||||
|
||||
var esppObject = parser.Invoke(str);
|
||||
|
||||
if (esppObject == null)
|
||||
{
|
||||
logger.LogWarning("После парсинга строки, esppObject = null. Дальше ничего не буду делать.");
|
||||
return;
|
||||
}
|
||||
|
||||
using (var scope = serviceProvider.CreateScope())
|
||||
{
|
||||
var templateService = GetServiceInScope<ITemplateService>(scope);
|
||||
var robotConfigurationService = GetServiceInScope<IRobotConfigurationService>(scope);
|
||||
|
||||
var template = await templateService.GetTemplateByNameAsync(esppObject.TemplateName);
|
||||
|
||||
//todo: существует в ЕСПП но отсутствует в ПАРР. Может его деактивировать или еще что-то сделать. Пока просто пропустим
|
||||
if (template == null)
|
||||
{
|
||||
logger.LogWarning($"Найден объект в ЕСПП с именем шаблона {esppObject.TemplateName} незарегистрированный в ПАРР.");
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
var dbObjectInEsppObject = converterToEsppObject.Invoke(template);
|
||||
var isChanged = IsChanged(esppObject, dbObjectInEsppObject);
|
||||
|
||||
if (isChanged)
|
||||
{
|
||||
logger.LogInformation($"Есть изменения, требуется обновление. {esppObject.TemplateName}");
|
||||
|
||||
SetUpdateStatus(ref template, robotConfigurationService, esppObject.Robot);
|
||||
|
||||
if (!await templateService.CommitAsync())
|
||||
logger.LogError($"Не удалось изменить запись Template {template.Name}, Robot: {esppObject.Robot}");
|
||||
else
|
||||
logger.LogInformation($"Установлен принудительный статус {TaskStatusEnum.Updating}, Template {template.Name}, Robot: {esppObject.Robot}");
|
||||
}//надо ли проверять если не изменился, но был статус Updating не понятно. Доверяем роботу пока, что после окончания работ он точно сообщит
|
||||
else
|
||||
{
|
||||
logger.LogInformation($"Нет изменений, обновление не требуется. {esppObject.TemplateName}");
|
||||
|
||||
//если все поля совпали
|
||||
//проверяем, какой был статус предыдущий статус в БД, если он был не Ок, то ставим ему ОК
|
||||
var robotConfig = robotConfigurationService.GetFromTemplateByRobotCode(esppObject.Robot, ref template);
|
||||
if (robotConfig.TaskStatusCode != (int)TaskStatusEnum.Ok)
|
||||
{
|
||||
robotConfigurationService.ChangeTaskStatus(TaskStatusEnum.Ok, ref robotConfig);
|
||||
if (!await templateService.CommitAsync())
|
||||
logger.LogError($"Не удалось изменить запись Template {template.Name}, Robot: {esppObject.Robot}");
|
||||
else
|
||||
logger.LogInformation($"Установлен принудительный статус {TaskStatusEnum.Ok}, Template {template.Name}, Robot: {esppObject.Robot}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void SetUpdateStatus(ref Template template, IRobotConfigurationService robotConfigurationService, RobotsEnum robot)
|
||||
{
|
||||
var robotConfig = robotConfigurationService.GetFromTemplateByRobotCode(robot, ref template);
|
||||
robotConfigurationService.ChangeTaskStatus(TaskStatusEnum.Updating, ref robotConfig);
|
||||
}
|
||||
|
||||
|
||||
private Service GetServiceInScope<Service>(IServiceScope scope)
|
||||
{
|
||||
var service = scope.ServiceProvider.GetService<Service>();
|
||||
if (service == null)
|
||||
throw new Exception($"Не найден сервис: {nameof(Service)}");
|
||||
|
||||
return service;
|
||||
}
|
||||
|
||||
|
||||
private bool IsChanged(EsppObject esppObj, EsppObject dbObj)
|
||||
{
|
||||
foreach (var prop in dbObj.GetType().GetProperties())
|
||||
{
|
||||
if (prop == null)
|
||||
continue;
|
||||
|
||||
var dbValue = dbObj.GetType().GetProperty(prop.Name)?.GetValue(dbObj, null);
|
||||
var esppValue = esppObj.GetType().GetProperty(prop.Name)?.GetValue(esppObj, null);
|
||||
|
||||
if (dbValue == null || esppValue == null)
|
||||
continue;
|
||||
|
||||
//Replace("\r","").Replace("\n","") - в подробном описании могут быть переносы строк, в Rabbit прилетает без переносов. Убираем переносы для стравнения
|
||||
var dbValueStr = dbValue!.ToString()!.ToLower().Replace("\r", "").Replace("\n", "");
|
||||
var esppValueStr = esppValue!.ToString()!.ToLower();
|
||||
|
||||
if (dbValueStr != esppValueStr)
|
||||
{
|
||||
logger.LogDebug($"Не совпадают поля. dbValueStr: {dbValueStr}, esppValueStr: {esppValueStr}");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,14 @@
|
||||
namespace PARR.EsppTemplateSync.Domain
|
||||
using PARR.Constants;
|
||||
using PARR.EsppSync;
|
||||
|
||||
namespace PARR.EsppTemplateSync.Domain
|
||||
{
|
||||
internal class EsppTemplate
|
||||
internal class EsppObjectTemplate : IEsppObject
|
||||
{
|
||||
public required string Name { get; set; }
|
||||
public required string TemplateName { get; set; }
|
||||
|
||||
public RobotsEnum Robot => RobotsEnum.TemplateOrder;
|
||||
|
||||
public bool IsActive { get; set; }
|
||||
public required string WorkGroup { get; set; }
|
||||
public required string ShortDescription { get; set; }
|
||||
@@ -2,7 +2,8 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using PARR.BLL;
|
||||
using PARR.DAL;
|
||||
using PARR.EsppTemplateSync.Services;
|
||||
using PARR.EsppSync;
|
||||
using PARR.EsppTemplateSync.Domain;
|
||||
using PARR.EsppTemplateSync.Settings;
|
||||
|
||||
namespace PARR.EsppTemplateSync
|
||||
@@ -12,16 +13,14 @@ namespace PARR.EsppTemplateSync
|
||||
public static void InstallEsppTemplateSyncServices(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
services.InstallBllServices(configuration);
|
||||
services.InstallDalServices(configuration);
|
||||
//services.InstallDalServices(configuration);
|
||||
services.InstallEsppSyncServices<EsppObjectTemplate>(configuration);
|
||||
|
||||
var globalSettings = new GlobalSettings();
|
||||
configuration.GetSection(nameof(GlobalSettings)).Bind(globalSettings);
|
||||
services.AddSingleton(globalSettings);
|
||||
|
||||
services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
|
||||
services.AddTransient<ITemplateSyncer, TemplateMQSyncer>();
|
||||
services.AddTransient<IParserService, ParserService>();
|
||||
services.AddTransient<IManager, Manager>();
|
||||
}
|
||||
|
||||
public static IConfigurationBuilder AddEsppTemplateConfigurations(this IConfigurationBuilder builder, IServiceCollection services)
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
using AutoMapper;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.EsppTemplateSync.Domain;
|
||||
|
||||
namespace PARR.EsppTemplateSync.MappingProfiles
|
||||
{
|
||||
public class DomainToDomainProfile : Profile
|
||||
{
|
||||
public DomainToDomainProfile()
|
||||
{
|
||||
|
||||
CreateMap<Template, EsppTemplate>()
|
||||
.ForMember(d => d.Name, o => o.MapFrom(s => s.Name))
|
||||
.ForMember(d => d.IsActive, o => o.MapFrom(s => s.IsActiveTemplate))
|
||||
.ForMember(d => d.WorkGroup, o => o.MapFrom(s => s.Host!.WorkGroup))
|
||||
.ForMember(d => d.ShortDescription, o => o.MapFrom(s => s.ApplicationsInWork!.ShortDescription))
|
||||
.ForMember(d => d.ResponseArea, o => o.MapFrom(s => s.Host!.ResponseArea!.Name))
|
||||
.ForMember(d => d.Duration, o => o.MapFrom(s => s.ApplicationsInWork!.TemplateDuration))
|
||||
.ForMember(d => d.EK, o => o.MapFrom(s => s.Host!.Ek))
|
||||
//.ForMember(d => d.Initiator, o => o.MapFrom(s => )) TODO откуда то нужно брать инициатора
|
||||
.ForMember(d => d.FullDescription, o => o.MapFrom(s => s.ApplicationsInWork!.FullDescription))
|
||||
//.ForMember(d => d.ClosingCode, o => o.MapFrom(s => s.)) TODO toоda же к инициатору
|
||||
.ForMember(d => d.Solution, o => o.MapFrom(s => s.ApplicationsInWork!.Solution))
|
||||
.ForMember(d => d.Process, o => o.MapFrom(s => s.ApplicationsInWork!.Work!.Tnk!.Subprocess!.Process!.Name))
|
||||
.ForMember(d => d.SubProcess, o => o.MapFrom(s => s.ApplicationsInWork!.Work!.Tnk!.Subprocess!.Name))
|
||||
.ForMember(d => d.TNK, o => o.MapFrom(s => s.ApplicationsInWork!.Work!.Tnk!.Name))
|
||||
.ForMember(d => d.Work, o => o.MapFrom(s => s.ApplicationsInWork!.Work!.Name));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,13 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PARR.BLL\PARR.BLL.csproj" />
|
||||
<ProjectReference Include="..\PARR.DAL\PARR.DAL.csproj" />
|
||||
<ProjectReference Include="..\PARR.EsppSync\PARR.EsppSync.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace PARR.EsppTemplateSync.Services
|
||||
{
|
||||
internal interface IManager
|
||||
{
|
||||
Task<bool> ManageFileAsync(string path);
|
||||
Task ManageStringAsync(string str);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using PARR.EsppTemplateSync.Domain;
|
||||
|
||||
namespace PARR.EsppTemplateSync.Services
|
||||
{
|
||||
internal interface IParserService
|
||||
{
|
||||
EsppTemplate? ParseString(string str);
|
||||
}
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
using AutoMapper;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
using PARR.EsppTemplateSync.Domain;
|
||||
using PARR.EsppTemplateSync.Settings;
|
||||
|
||||
namespace PARR.EsppTemplateSync.Services
|
||||
{
|
||||
internal class Manager : IManager
|
||||
{
|
||||
private readonly ILogger<Manager> logger;
|
||||
private readonly IServiceProvider serviceProvider;
|
||||
private readonly IParserService parserService;
|
||||
private readonly GlobalSettings globalSettings;
|
||||
private readonly IMapper mapper;
|
||||
|
||||
public Manager(
|
||||
ILogger<Manager> logger,
|
||||
IServiceProvider serviceProvider,
|
||||
IParserService parserService,
|
||||
GlobalSettings globalSettings,
|
||||
IMapper mapper
|
||||
)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.serviceProvider = serviceProvider;
|
||||
this.parserService = parserService;
|
||||
this.globalSettings = globalSettings;
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
public Task<bool> ManageFileAsync(string path)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task ManageStringAsync(string str)
|
||||
{
|
||||
|
||||
// тут обязательно нужна проверка, если str не того формата, возникает exception в ParseStringAsync
|
||||
if (string.IsNullOrEmpty(str))
|
||||
return;
|
||||
|
||||
var esppTemplate = parserService.ParseString(str);
|
||||
|
||||
if (esppTemplate == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//если шаблон не аквтивен, пропускаем
|
||||
//if (!esppTemplate.IsActive)
|
||||
//{
|
||||
// return isSuccess;
|
||||
//}
|
||||
|
||||
await SyncTemplateAsync(esppTemplate);
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
private async Task SyncTemplateAsync(EsppTemplate esppTemplate)
|
||||
{
|
||||
using (var scope = serviceProvider.CreateScope())
|
||||
{
|
||||
var services = scope.ServiceProvider;
|
||||
|
||||
var templateService = services.GetService<ITemplateService>();
|
||||
if (templateService == null)
|
||||
throw new Exception($"Не найден сервис: {nameof(ITemplateService)}");
|
||||
|
||||
var robotConfigurationService = services.GetService<IRobotConfigurationService>();
|
||||
if (robotConfigurationService == null)
|
||||
throw new Exception($"Не найден сервис: {nameof(IRobotConfigurationService)}");
|
||||
|
||||
Template? template = await templateService.GetTemplateByNameAsync(esppTemplate.Name);
|
||||
|
||||
//существует в ЕСПП но отсутствует в ПАРР.
|
||||
//TODO деактивируем и видимо ещё что-то нужно
|
||||
if (template == null)
|
||||
{
|
||||
// создает запись-шаблон из ЕСПП в ПАРР. Возможно избыточно так как эталон в ПАРР
|
||||
////esppTemplate.StatusCode = "Deactivating";
|
||||
////---
|
||||
//esppTemplate.StatusCode = (int)StatusTemplateEnum.Ok;
|
||||
//esppTemplate.IsActive = false;
|
||||
//if (!await templateService.CreateAsync(esppTemplate) || !await templateService.CommitAsync())
|
||||
//{
|
||||
// logger.LogError($"Не удалось создать запись Template {esppTemplate.Name}({esppTemplate.ShortDescription})");
|
||||
//}
|
||||
//else
|
||||
// logger.LogInformation($"----- Создана запись Template {esppTemplate.Name}({esppTemplate.ShortDescription}) -----");
|
||||
//---
|
||||
logger.LogWarning($"----- Найден шаблон ЕСПП незарегистрированный в ПАРР {esppTemplate.Name}({esppTemplate.ShortDescription}) -----");
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
var mappedTemplate = mapper.Map<EsppTemplate>(template);
|
||||
if (mappedTemplate == null)
|
||||
return;
|
||||
|
||||
var isChanged = IsChanged(mappedTemplate, esppTemplate);
|
||||
if (isChanged)
|
||||
{
|
||||
SetUpdateStatus(template, robotConfigurationService);
|
||||
|
||||
if (!await templateService.CommitAsync())
|
||||
logger.LogError($"Не удалось изменить запись Template {template.Name}");
|
||||
else
|
||||
logger.LogInformation($"----- Установлен принудительный статус {TaskStatusEnum.Updating.ToString()} Template {template.Name} -----");
|
||||
|
||||
} //надо ли проверять если не изменился, но был статус Updating не понятно. Доверяем роботу пока, что после окончания работ от точно сообщит
|
||||
else
|
||||
{
|
||||
//если все поля совпали
|
||||
//проверяем, какой был статус у шаблона, если он был не Ок, то ставим ему ОК
|
||||
var robotConfig = robotConfigurationService.GetFromTemplateByRobotCode(RobotsEnum.TemplateOrder, ref template);
|
||||
if (robotConfig.TaskStatusCode != (int)TaskStatusEnum.Ok)
|
||||
{
|
||||
robotConfigurationService.ChangeTaskStatus(TaskStatusEnum.Ok, ref robotConfig);
|
||||
if (!await templateService.CommitAsync())
|
||||
logger.LogError($"Не удалось изменить запись Template {template.Name}");
|
||||
else
|
||||
logger.LogInformation($"----- Установлен принудительный статус {TaskStatusEnum.Ok.ToString()} Template {template.Name} -----");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
private void SetUpdateStatus(Template template, IRobotConfigurationService robotConfigurationService)
|
||||
{
|
||||
var robotConfig = robotConfigurationService.GetFromTemplateByRobotCode(RobotsEnum.TemplateOrder, ref template);
|
||||
robotConfigurationService.ChangeTaskStatus(TaskStatusEnum.Updating, ref robotConfig);
|
||||
}
|
||||
|
||||
|
||||
private bool IsChanged(EsppTemplate template, EsppTemplate esppTemplate)
|
||||
{
|
||||
foreach (var prop in template.GetType().GetProperties())
|
||||
{
|
||||
if (prop == null) continue;
|
||||
|
||||
if (globalSettings.IgnoreTemplateFields != null && globalSettings.IgnoreTemplateFields.Contains(prop.Name)) continue;
|
||||
|
||||
var parrValue = template.GetType().GetProperty(prop.Name)?.GetValue(template, null);
|
||||
var esppValue = esppTemplate.GetType().GetProperty(prop.Name)?.GetValue(esppTemplate, null);
|
||||
|
||||
if (parrValue == null || esppValue == null)
|
||||
continue;
|
||||
|
||||
//Replace("\r","").Replace("\n","") - в подробном описании могут быть переносы строк, в Rabbit прилетает без переносов. Убираем переносы для стравнения
|
||||
var parrValueStr = parrValue!.ToString()!.ToLower().Replace("\r", "").Replace("\n", "");
|
||||
var esppValueStr = esppValue!.ToString()!.ToLower();
|
||||
|
||||
if (parrValueStr != esppValueStr)
|
||||
{
|
||||
logger.LogDebug($"Не совпадают поля. parrValueStr: {parrValueStr}, esppValueStr: {esppValueStr}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.EsppTemplateSync.Domain;
|
||||
using PARR.EsppTemplateSync.Settings;
|
||||
using System.Globalization;
|
||||
|
||||
namespace PARR.EsppTemplateSync.Services
|
||||
{
|
||||
internal class ParserService : IParserService
|
||||
{
|
||||
private readonly ILogger<ParserService> logger;
|
||||
private readonly GlobalSettings globalSettings;
|
||||
private readonly SettingsFromDb settingsFromDb;
|
||||
|
||||
public ParserService(
|
||||
ILogger<ParserService> logger,
|
||||
GlobalSettings globalSettings,
|
||||
SettingsFromDb settingsFromDb
|
||||
)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.globalSettings = globalSettings;
|
||||
this.settingsFromDb = settingsFromDb;
|
||||
}
|
||||
public async Task<bool> ParseFileAsync(string path)
|
||||
{
|
||||
//TODO:
|
||||
|
||||
bool isSuccess = true;
|
||||
|
||||
|
||||
return isSuccess;
|
||||
}
|
||||
|
||||
public EsppTemplate? ParseString(string str)
|
||||
{
|
||||
// TODO: а если формат нет тот? Все будет ок?
|
||||
var splittedContent = str.Split(globalSettings.ParsingSeparator);
|
||||
if (splittedContent.Length != 17)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
//var name = splittedContent[0].Trim().Substring(1, splittedContent[0].Length - 2);
|
||||
var name = splittedContent[0].Trim();
|
||||
|
||||
CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;
|
||||
if (!string.IsNullOrEmpty(settingsFromDb.TemplatePrefixName)
|
||||
&& !name.StartsWith(settingsFromDb.TemplatePrefixName, true, currentCulture)
|
||||
)
|
||||
{
|
||||
logger.LogWarning($"Имя шаблона не соответствует обязательному префиксу({settingsFromDb.TemplatePrefixName}). Шаблон {name} игнорирован");
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
if (!bool.TryParse(splittedContent[1].Trim(), out var isActive))
|
||||
isActive = false;
|
||||
var workGroup = splittedContent[2].Trim();
|
||||
var shortDescription = splittedContent[3].Trim();
|
||||
var category = splittedContent[4].Trim();
|
||||
var responseArea = splittedContent[5].Trim();
|
||||
var duration = splittedContent[6].Trim();
|
||||
var ek = splittedContent[7].Trim();
|
||||
var initiator = splittedContent[8].Trim();
|
||||
|
||||
var fullDescription = splittedContent[9].Trim();
|
||||
var closingCode = splittedContent[10].Trim();
|
||||
var solution = splittedContent[11].Trim();
|
||||
var process = splittedContent[12].Trim();
|
||||
var subProcess = splittedContent[13].Trim();
|
||||
var tnk = splittedContent[14].Trim();
|
||||
var work = splittedContent[15].Trim();
|
||||
var worker = splittedContent[16].Trim();
|
||||
|
||||
var template = new EsppTemplate
|
||||
{
|
||||
Name = name,
|
||||
IsActive = isActive,
|
||||
WorkGroup = workGroup,
|
||||
ShortDescription = shortDescription,
|
||||
//Category = category,
|
||||
ResponseArea = responseArea,
|
||||
Duration = duration,
|
||||
EK = ek,
|
||||
//Initiator = initiator,
|
||||
FullDescription = fullDescription,
|
||||
//ClosingCode = closingCode,
|
||||
Solution = solution,
|
||||
Process = process,
|
||||
SubProcess = subProcess,
|
||||
TNK = tnk,
|
||||
Work = work,
|
||||
//Worker = worker
|
||||
|
||||
};
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private DateTimeOffset? ConvertDateFromStr(string dateString)
|
||||
{
|
||||
var format = "dd/MM/yy HH:mm:ss";
|
||||
var provider = CultureInfo.CurrentCulture;
|
||||
try
|
||||
{
|
||||
var result = DateTimeOffset.ParseExact(dateString, format, provider).ToOffset(new TimeSpan(0));
|
||||
logger.LogInformation($"{dateString} было преобразовано в {result.ToString()}.");
|
||||
return result;
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
logger.LogWarning($"{dateString} имеет некоррктный формат для преобразование в DateTimeOffset");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// dll
|
||||
|
||||
//public delegate Dt CustomParserHandlerDelegate<Dt>(string str);
|
||||
|
||||
//public class Converter
|
||||
//{
|
||||
// public T ParseString<T>(string str, CustomParserHandlerDelegate<T> customParser)
|
||||
// {
|
||||
// var obj = customParser(str);
|
||||
|
||||
// return obj;
|
||||
// }
|
||||
//}
|
||||
|
||||
//public class RunConverter
|
||||
//{
|
||||
// public void Run<T>(CustomParserHandlerDelegate<T> customParser)
|
||||
// {
|
||||
// var conv = new Converter();
|
||||
// //var obj = conv.ParseString("sdfsdfsdf", SuperParser);
|
||||
// var obj = conv.ParseString("sdfsdfsdf", customParser);
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
////---
|
||||
//public class Xxx
|
||||
//{
|
||||
// void Test()
|
||||
// {
|
||||
// var rc = new RunConverter();
|
||||
// rc.Run(SuperParser);
|
||||
// }
|
||||
|
||||
|
||||
// Model1 SuperParser(string str)
|
||||
// {
|
||||
// // custom logic
|
||||
|
||||
// return new Model1 { Field = str };
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//public class Model1
|
||||
//{
|
||||
// public string Field { get; set; } = "111";
|
||||
//}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace PARR.EsppTemplateSync.Settings
|
||||
public MqSettings? MqSettings { get; set; }
|
||||
|
||||
public StorageSettings? StorageSettings { get; set; }
|
||||
public List<string>? IgnoreTemplateFields { get; set; }
|
||||
//public List<string>? IgnoreTemplateFields { get; set; }
|
||||
public string ParsingSeparator { get; set; } = "<|>";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.EsppTemplateSync.Services;
|
||||
using PARR.EsppTemplateSync.Settings;
|
||||
|
||||
namespace PARR.EsppTemplateSync
|
||||
@@ -10,7 +9,7 @@ namespace PARR.EsppTemplateSync
|
||||
private readonly ILogger<TemplateFileSyncer> logger;
|
||||
private readonly IFileService fileService;
|
||||
private readonly GlobalSettings globalSettings;
|
||||
private readonly IManager manager;
|
||||
//private readonly IManager manager;
|
||||
private readonly string dirPath;
|
||||
private readonly string filterExtensions;
|
||||
|
||||
@@ -20,14 +19,14 @@ namespace PARR.EsppTemplateSync
|
||||
BLL.Settings.StorageSettings storageSettings,
|
||||
ILogger<TemplateFileSyncer> logger,
|
||||
IFileService fileService,
|
||||
GlobalSettings globalSettings,
|
||||
IManager manager
|
||||
GlobalSettings globalSettings//,
|
||||
// IManager manager
|
||||
)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.fileService = fileService;
|
||||
this.globalSettings = globalSettings;
|
||||
this.manager = manager;
|
||||
//this.manager = manager;
|
||||
if (storageSettings.EsppTemplates == null)
|
||||
{
|
||||
logger.LogError("Нет секции настроек хранилища. StorageSettings, EsppTemplates");
|
||||
@@ -120,17 +119,17 @@ namespace PARR.EsppTemplateSync
|
||||
private async Task ParseFileAsync(string path)
|
||||
{
|
||||
logger.LogInformation($"--- --- Найден файл. Готов для парсинга {path} --- ---");
|
||||
var parseResult = await manager.ManageFileAsync(path);//parserService.ParseFileAsync(path);
|
||||
//var parseResult = await manager.ManageFileAsync(path);//parserService.ParseFileAsync(path);
|
||||
|
||||
if (parseResult)
|
||||
{
|
||||
logger.LogInformation($"Парсинг успешно завершен. Удаляю файл {path}");
|
||||
var removeResult = fileService.DeleteFile(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.LogError($"Парсинг завершен c ошибкой. Файл не удален {path}");
|
||||
}
|
||||
//if (parseResult)
|
||||
//{
|
||||
// logger.LogInformation($"Парсинг успешно завершен. Удаляю файл {path}");
|
||||
// var removeResult = fileService.DeleteFile(path);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// logger.LogError($"Парсинг завершен c ошибкой. Файл не удален {path}");
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.EsppTemplateSync.Services;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.EsppSync;
|
||||
using PARR.EsppTemplateSync.Domain;
|
||||
using PARR.EsppTemplateSync.Settings;
|
||||
|
||||
namespace PARR.EsppTemplateSync
|
||||
@@ -8,21 +11,24 @@ namespace PARR.EsppTemplateSync
|
||||
internal class TemplateMQSyncer : ITemplateSyncer
|
||||
{
|
||||
private readonly ILogger<TemplateMQSyncer> logger;
|
||||
private readonly IManager manager;
|
||||
private readonly GlobalSettings globalSettings;
|
||||
private readonly IMqService mqService;
|
||||
private readonly ISyncService<EsppObjectTemplate> syncService;
|
||||
private readonly SettingsFromDb settingsFromDb;
|
||||
|
||||
public TemplateMQSyncer(
|
||||
ILogger<TemplateMQSyncer> logger,
|
||||
IManager manager,
|
||||
GlobalSettings globalSettings,
|
||||
IMqService mqService
|
||||
IMqService mqService,
|
||||
ISyncService<EsppObjectTemplate> syncService,
|
||||
SettingsFromDb settingsFromDb
|
||||
)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.manager = manager;
|
||||
this.globalSettings = globalSettings;
|
||||
this.mqService = mqService;
|
||||
this.syncService = syncService;
|
||||
this.settingsFromDb = settingsFromDb;
|
||||
|
||||
if (globalSettings.MqSettings == null)
|
||||
{
|
||||
@@ -33,7 +39,7 @@ namespace PARR.EsppTemplateSync
|
||||
|
||||
public void Start()
|
||||
{
|
||||
var isConnected = mqService.InitConsumer(globalSettings!.MqSettings!, manager.ManageStringAsync);
|
||||
var isConnected = mqService.InitConsumer(globalSettings!.MqSettings!, SyncTemplateAsync);
|
||||
|
||||
if (!isConnected)
|
||||
throw new Exception("Ошибка при подключении к RabbitMq");
|
||||
@@ -48,6 +54,108 @@ namespace PARR.EsppTemplateSync
|
||||
logger.LogInformation($"=== === === Соединение с очередью {globalSettings.MqSettings!.QueueName} закрыто === === ===");
|
||||
}
|
||||
|
||||
|
||||
private async Task SyncTemplateAsync(string str)
|
||||
{
|
||||
await syncService.SyncEsppObjectAsync(str, ParseStrToEsppObject, ConvertDbObjToEsppObj);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Преобразование модели БД в модель для сравнения
|
||||
/// </summary>
|
||||
/// <param name="template"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private EsppObjectTemplate ConvertDbObjToEsppObj(Template template)
|
||||
{
|
||||
var templateFromDb = new EsppObjectTemplate
|
||||
{
|
||||
TemplateName = template.Name,
|
||||
IsActive = template.IsActiveTemplate,
|
||||
WorkGroup = template.Host!.WorkGroup!,
|
||||
ShortDescription = template.ApplicationsInWork!.ShortDescription,
|
||||
ResponseArea = template.Host!.ResponseArea!.Name,
|
||||
Duration = template.ApplicationsInWork.TemplateDuration,
|
||||
EK = template.Host.Ek,
|
||||
FullDescription = template.ApplicationsInWork.FullDescription,
|
||||
Solution = template.ApplicationsInWork.Solution,
|
||||
Process = template.ApplicationsInWork.Work!.Tnk!.Subprocess!.Process!.Name,
|
||||
SubProcess = template.ApplicationsInWork.Work.Tnk.Subprocess.Name,
|
||||
TNK = template.ApplicationsInWork.Work.Tnk.Name,
|
||||
Work = template.ApplicationsInWork.Work.Name
|
||||
};
|
||||
|
||||
return templateFromDb;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Парсинг из строки в модель для сравнения
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private EsppObjectTemplate? ParseStrToEsppObject(string str)
|
||||
{
|
||||
var splittedContent = str.Split(globalSettings.ParsingSeparator);
|
||||
if (splittedContent.Length != 17)
|
||||
{
|
||||
logger.LogError($"Входная строка после сплита не содержит 17 объектов (факт: {splittedContent.Length}).");
|
||||
return null;
|
||||
}
|
||||
|
||||
var templateName = splittedContent[0].Trim();
|
||||
|
||||
var currentCulture = Thread.CurrentThread.CurrentCulture;
|
||||
if (!string.IsNullOrEmpty(settingsFromDb.TemplatePrefixName) || !templateName.StartsWith(settingsFromDb.TemplatePrefixName, true, currentCulture))
|
||||
{
|
||||
logger.LogWarning($"Имя шаблона не соответствует обязательному префиксу({settingsFromDb.TemplatePrefixName}). Шаблон {templateName} игнорирован");
|
||||
return null;
|
||||
}
|
||||
|
||||
bool.TryParse(splittedContent[1].Trim(), out var isActive);
|
||||
|
||||
var workGroup = splittedContent[2].Trim();
|
||||
var shortDescription = splittedContent[3].Trim();
|
||||
var category = splittedContent[4].Trim();
|
||||
var responseArea = splittedContent[5].Trim();
|
||||
var duration = splittedContent[6].Trim();
|
||||
var ek = splittedContent[7].Trim();
|
||||
var initiator = splittedContent[8].Trim();
|
||||
|
||||
var fullDescription = splittedContent[9].Trim();
|
||||
var closingCode = splittedContent[10].Trim();
|
||||
var solution = splittedContent[11].Trim();
|
||||
var process = splittedContent[12].Trim();
|
||||
var subProcess = splittedContent[13].Trim();
|
||||
var tnk = splittedContent[14].Trim();
|
||||
var work = splittedContent[15].Trim();
|
||||
var worker = splittedContent[16].Trim();
|
||||
|
||||
var templateFromEspp = new EsppObjectTemplate
|
||||
{
|
||||
TemplateName = templateName,
|
||||
IsActive = isActive,
|
||||
WorkGroup = workGroup,
|
||||
ShortDescription = shortDescription,
|
||||
//Category = category,
|
||||
ResponseArea = responseArea,
|
||||
Duration = duration,
|
||||
EK = ek,
|
||||
//Initiator = initiator,
|
||||
FullDescription = fullDescription,
|
||||
//ClosingCode = closingCode,
|
||||
Solution = solution,
|
||||
Process = process,
|
||||
SubProcess = subProcess,
|
||||
TNK = tnk,
|
||||
Work = work
|
||||
//Worker = worker
|
||||
};
|
||||
|
||||
return templateFromEspp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ COPY ["PARR.EsppTemplateSyncWorker/PARR.EsppTemplateSyncWorker.csproj", "PARR.Es
|
||||
COPY ["PARR.EsppTemplateSync/PARR.EsppTemplateSync.csproj", "PARR.EsppTemplateSync/"]
|
||||
COPY ["PARR.BLL/PARR.BLL.csproj", "PARR.BLL/"]
|
||||
COPY ["PARR.DAL/PARR.DAL.csproj", "PARR.DAL/"]
|
||||
COPY ["PARR.Constants/PARR.Constants.csproj", "PARR.Constants/"]
|
||||
RUN dotnet restore "PARR.EsppTemplateSyncWorker/PARR.EsppTemplateSyncWorker.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/PARR.EsppTemplateSyncWorker"
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
"StorageSettings": {
|
||||
"CheckIntervalSeconds": 30
|
||||
},
|
||||
"IgnoreTemplateFields": [ "Id", "Status", "Name", "DateCreated", "DateModified", "StatusCode" ],
|
||||
"ParsingSeparator": "<|>"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PARR.BLL.Domain.Mq;
|
||||
using PARR.BLL.Helpers;
|
||||
using PARR.Constants;
|
||||
using PARR.DAL.Contracts;
|
||||
using PARR.DAL.Models;
|
||||
using PARR.DAL.Services.Interfaces;
|
||||
|
||||
@@ -10,6 +10,7 @@ COPY ["PARR.GeneratorTemplatesWorker/PARR.GeneratorTemplatesWorker.csproj", "PAR
|
||||
COPY ["PARR.GeneratorTemplates/PARR.GeneratorTemplates.csproj", "PARR.GeneratorTemplates/"]
|
||||
COPY ["PARR.BLL/PARR.BLL.csproj", "PARR.BLL/"]
|
||||
COPY ["PARR.DAL/PARR.DAL.csproj", "PARR.DAL/"]
|
||||
COPY ["PARR.Constants/PARR.Constants.csproj", "PARR.Constants/"]
|
||||
RUN dotnet restore "PARR.GeneratorTemplatesWorker/PARR.GeneratorTemplatesWorker.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/PARR.GeneratorTemplatesWorker"
|
||||
|
||||
@@ -10,6 +10,7 @@ COPY ["PARR.MasterWorker/PARR.MasterWorker.csproj", "PARR.MasterWorker/"]
|
||||
COPY ["PARR.Master/PARR.Master.csproj", "PARR.Master/"]
|
||||
COPY ["PARR.BLL/PARR.BLL.csproj", "PARR.BLL/"]
|
||||
COPY ["PARR.DAL/PARR.DAL.csproj", "PARR.DAL/"]
|
||||
COPY ["PARR.Constants/PARR.Constants.csproj", "PARR.Constants/"]
|
||||
RUN dotnet restore "PARR.MasterWorker/PARR.MasterWorker.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/PARR.MasterWorker"
|
||||
|
||||
@@ -16,7 +16,10 @@
|
||||
- PARR.EsppOrderLoaderWorker
|
||||
- PARR.EsppOrderManager - управление нарядами в ЕСПП (в работу, выполнить, и т.п.)
|
||||
- PARR.EsppOrderManagerWorker
|
||||
- PARR.EsppTemplateSync - логика синхронизации шаблонов ESPP с БД PARR
|
||||
- PARR.EsppScheduleSync - логика синхронизации расписаний ЕСПП с БД PARR
|
||||
- PARR.EsppScheduleSyncWorker - worker для PARR.EsppScheduleSync
|
||||
- PARR.EsppSync - общая логика синхронизации шаблонов и расписаний ЕСПП с БД PARR
|
||||
- PARR.EsppTemplateSync - логика синхронизации шаблонов ЕСПП с БД PARR
|
||||
- PARR.EsppTemplateSyncWorker - worker для PARR.EsppTemplateSync
|
||||
- PARR.GeneratorTemplates - логика генерации шаблонов в ПАРР
|
||||
- PARR.GeneratorTemplatesWorker - Worker для PARR.GeneratorTemplates
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<None Include="docker-compose.aihit-syncher.yml" />
|
||||
<None Include="docker-compose.espp-order-loader.yml" />
|
||||
<None Include="docker-compose.espp-order-manager.yml" />
|
||||
<None Include="docker-compose.espp-schedule-sync.yml" />
|
||||
<None Include="docker-compose.espp-template-sync.yml" />
|
||||
<None Include="docker-compose.generator-templates.yml" />
|
||||
<None Include="docker-compose.master.yml" />
|
||||
|
||||
23
docker-compose.espp-schedule-sync.yml
Normal file
23
docker-compose.espp-schedule-sync.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: '3.4'
|
||||
|
||||
#ESPP SCHEDULE SYNC
|
||||
services:
|
||||
parr-espp-schedule-sync:
|
||||
image: harbor.dvgd.rzd/parr/parr-espp-schedule-sync:${tag:-latest}
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Production
|
||||
- TZ=Europe/Moscow
|
||||
logging:
|
||||
driver: fluentd
|
||||
options:
|
||||
fluentd-address: dvgd-mng-02.dvgd.oao.rzd:24224
|
||||
tag: parr.espp-schedule-sync.serilog
|
||||
deploy:
|
||||
replicas: 4
|
||||
networks:
|
||||
- parr-network
|
||||
|
||||
networks:
|
||||
parr-network:
|
||||
driver: overlay
|
||||
external: true
|
||||
Reference in New Issue
Block a user