diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c941e52 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +**/wwwroot/libs/** linguist-vendored diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f685a4e --- /dev/null +++ b/.gitignore @@ -0,0 +1,262 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# TaskScheduling +host/Himp.TaskScheduling.AuthServer/Logs/logs.txt +host/Himp.TaskScheduling.HttpApi.Host/Logs/logs.txt +host/Himp.TaskScheduling.Web.Host/Logs/logs.txt +host/Himp.TaskScheduling.Web.Unified/Logs/logs.txt +host/Himp.TaskScheduling.Blazor.Server.Host/Logs/logs.txt + +# Use abp install-libs to restore. +**/wwwroot/libs/* diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..56af76b --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "singleQuote": true, + "useTabs": false, + "tabWidth": 4 +} diff --git a/Himp.TaskScheduling.abpmdl b/Himp.TaskScheduling.abpmdl new file mode 100644 index 0000000..4461c22 --- /dev/null +++ b/Himp.TaskScheduling.abpmdl @@ -0,0 +1,111 @@ +{ + "folders": { + "items": { + "src": {}, + "test": {}, + "host": {} + } + }, + "packages": { + "Himp.TaskScheduling.Domain.Shared": { + "path": "src/Himp.TaskScheduling.Domain.Shared/Himp.TaskScheduling.Domain.Shared.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.Domain": { + "path": "src/Himp.TaskScheduling.Domain/Himp.TaskScheduling.Domain.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.Application.Contracts": { + "path": "src/Himp.TaskScheduling.Application.Contracts/Himp.TaskScheduling.Application.Contracts.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.Application": { + "path": "src/Himp.TaskScheduling.Application/Himp.TaskScheduling.Application.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.EntityFrameworkCore": { + "path": "src/Himp.TaskScheduling.EntityFrameworkCore/Himp.TaskScheduling.EntityFrameworkCore.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.MongoDB": { + "path": "src/Himp.TaskScheduling.MongoDB/Himp.TaskScheduling.MongoDB.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.HttpApi": { + "path": "src/Himp.TaskScheduling.HttpApi/Himp.TaskScheduling.HttpApi.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.HttpApi.Client": { + "path": "src/Himp.TaskScheduling.HttpApi.Client/Himp.TaskScheduling.HttpApi.Client.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.TestBase": { + "path": "test/Himp.TaskScheduling.TestBase/Himp.TaskScheduling.TestBase.abppkg", + "folder": "test" + }, + "Himp.TaskScheduling.EntityFrameworkCore.Tests": { + "path": "test/Himp.TaskScheduling.EntityFrameworkCore.Tests/Himp.TaskScheduling.EntityFrameworkCore.Tests.abppkg", + "folder": "test" + }, + "Himp.TaskScheduling.MongoDB.Tests": { + "path": "test/Himp.TaskScheduling.MongoDB.Tests/Himp.TaskScheduling.MongoDB.Tests.abppkg", + "folder": "test" + }, + "Himp.TaskScheduling.Domain.Tests": { + "path": "test/Himp.TaskScheduling.Domain.Tests/Himp.TaskScheduling.Domain.Tests.abppkg", + "folder": "test" + }, + "Himp.TaskScheduling.Application.Tests": { + "path": "test/Himp.TaskScheduling.Application.Tests/Himp.TaskScheduling.Application.Tests.abppkg", + "folder": "test" + }, + "Himp.TaskScheduling.HttpApi.Host": { + "path": "host/Himp.TaskScheduling.HttpApi.Host/Himp.TaskScheduling.HttpApi.Host.abppkg", + "folder": "host" + }, + "Himp.TaskScheduling.Web": { + "path": "src/Himp.TaskScheduling.Web/Himp.TaskScheduling.Web.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp": { + "path": "test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp.abppkg", + "folder": "test" + }, + "Himp.TaskScheduling.Web.Host": { + "path": "host/Himp.TaskScheduling.Web.Host/Himp.TaskScheduling.Web.Host.abppkg", + "folder": "host" + }, + "Himp.TaskScheduling.AuthServer": { + "path": "host/Himp.TaskScheduling.AuthServer/Himp.TaskScheduling.AuthServer.abppkg", + "folder": "host" + }, + "Himp.TaskScheduling.Host.Shared": { + "path": "host/Himp.TaskScheduling.Host.Shared/Himp.TaskScheduling.Host.Shared.abppkg", + "folder": "host" + }, + "Himp.TaskScheduling.Web.Unified": { + "path": "host/Himp.TaskScheduling.Web.Unified/Himp.TaskScheduling.Web.Unified.abppkg", + "folder": "host" + }, + "Himp.TaskScheduling.Blazor": { + "path": "src/Himp.TaskScheduling.Blazor/Himp.TaskScheduling.Blazor.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.Blazor.Host": { + "path": "host/Himp.TaskScheduling.Blazor.Host/Himp.TaskScheduling.Blazor.Host.abppkg", + "folder": "host" + }, + "Himp.TaskScheduling.Blazor.Server": { + "path": "src/Himp.TaskScheduling.Blazor.Server/Himp.TaskScheduling.Blazor.Server.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.Blazor.WebAssembly": { + "path": "src/Himp.TaskScheduling.Blazor.WebAssembly/Himp.TaskScheduling.Blazor.WebAssembly.abppkg", + "folder": "src" + }, + "Himp.TaskScheduling.Blazor.Server.Host": { + "path": "host/Himp.TaskScheduling.Blazor.Server.Host/Himp.TaskScheduling.Blazor.Server.Host.abppkg", + "folder": "host" + } + } +} diff --git a/Himp.TaskScheduling.abpsln b/Himp.TaskScheduling.abpsln new file mode 100644 index 0000000..2ca2ad7 --- /dev/null +++ b/Himp.TaskScheduling.abpsln @@ -0,0 +1,7 @@ +{ + "modules": { + "Himp.TaskScheduling": { + "path": "Himp.TaskScheduling.abpmdl" + } + } +} \ No newline at end of file diff --git a/Himp.TaskScheduling.sln b/Himp.TaskScheduling.sln new file mode 100644 index 0000000..c702789 --- /dev/null +++ b/Himp.TaskScheduling.sln @@ -0,0 +1,146 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34330.188 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.Domain.Shared", "src\Himp.TaskScheduling.Domain.Shared\Himp.TaskScheduling.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.Domain", "src\Himp.TaskScheduling.Domain\Himp.TaskScheduling.Domain.csproj", "{F2840BC7-0188-4606-9126-DADD0F5ABF7A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.Application.Contracts", "src\Himp.TaskScheduling.Application.Contracts\Himp.TaskScheduling.Application.Contracts.csproj", "{BD65D04F-08D5-40C1-8C24-77CA0BACB877}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.Application", "src\Himp.TaskScheduling.Application\Himp.TaskScheduling.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{649A3FFA-182F-4E56-9717-E6A9A2BEC545}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{E400416D-2895-4512-9D17-90681EEC7E0A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.EntityFrameworkCore", "src\Himp.TaskScheduling.EntityFrameworkCore\Himp.TaskScheduling.EntityFrameworkCore.csproj", "{0CE86223-D31D-4315-A1F5-87BA3EE1B844}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.MongoDB", "src\Himp.TaskScheduling.MongoDB\Himp.TaskScheduling.MongoDB.csproj", "{F1C58097-4C08-4D88-8976-6B3389391481}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.HttpApi", "src\Himp.TaskScheduling.HttpApi\Himp.TaskScheduling.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.HttpApi.Client", "src\Himp.TaskScheduling.HttpApi.Client\Himp.TaskScheduling.HttpApi.Client.csproj", "{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.TestBase", "test\Himp.TaskScheduling.TestBase\Himp.TaskScheduling.TestBase.csproj", "{C5BB573D-3030-4BCB-88B7-F6A85C32766C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.EntityFrameworkCore.Tests", "test\Himp.TaskScheduling.EntityFrameworkCore.Tests\Himp.TaskScheduling.EntityFrameworkCore.Tests.csproj", "{527F645C-C1FC-406E-8479-81386C8ECF13}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.MongoDB.Tests", "test\Himp.TaskScheduling.MongoDB.Tests\Himp.TaskScheduling.MongoDB.Tests.csproj", "{D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.Domain.Tests", "test\Himp.TaskScheduling.Domain.Tests\Himp.TaskScheduling.Domain.Tests.csproj", "{E60895E5-79C4-447D-88B7-85CB5BA336A4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.Application.Tests", "test\Himp.TaskScheduling.Application.Tests\Himp.TaskScheduling.Application.Tests.csproj", "{90CB5DC4-C040-45C7-8900-9688B26405BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.HttpApi.Host", "host\Himp.TaskScheduling.HttpApi.Host\Himp.TaskScheduling.HttpApi.Host.csproj", "{37B135B0-DAFE-4616-B25C-1BDF32FC44A2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp", "test\Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp\Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp.csproj", "{1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.Host.Shared", "host\Himp.TaskScheduling.Host.Shared\Himp.TaskScheduling.Host.Shared.csproj", "{F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Himp.TaskScheduling.Installer", "src\Himp.TaskScheduling.Installer\Himp.TaskScheduling.Installer.csproj", "{BE39FD00-745B-4049-8161-FC129817CBE4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.Build.0 = Release|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.Build.0 = Release|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.Build.0 = Release|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.Build.0 = Release|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.Build.0 = Release|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.Build.0 = Release|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.Build.0 = Debug|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.ActiveCfg = Release|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.Build.0 = Release|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.Build.0 = Release|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.Build.0 = Release|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.Build.0 = Release|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6}.Release|Any CPU.Build.0 = Release|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.Build.0 = Release|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.Build.0 = Release|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2}.Release|Any CPU.Build.0 = Release|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8}.Release|Any CPU.Build.0 = Release|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB}.Release|Any CPU.Build.0 = Release|Any CPU + {BE39FD00-745B-4049-8161-FC129817CBE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE39FD00-745B-4049-8161-FC129817CBE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE39FD00-745B-4049-8161-FC129817CBE4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE39FD00-745B-4049-8161-FC129817CBE4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {D64C1577-4929-4B60-939E-96DE1534891A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {78040F9E-3501-4A40-82DF-00A597710F35} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {0CE86223-D31D-4315-A1F5-87BA3EE1B844} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {F1C58097-4C08-4D88-8976-6B3389391481} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {C5BB573D-3030-4BCB-88B7-F6A85C32766C} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {527F645C-C1FC-406E-8479-81386C8ECF13} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {D0AD9179-125C-40B2-A8EE-CD4C1EE24BB6} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {E60895E5-79C4-447D-88B7-85CB5BA336A4} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {90CB5DC4-C040-45C7-8900-9688B26405BC} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {37B135B0-DAFE-4616-B25C-1BDF32FC44A2} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {1EDCD6D4-DF3A-4E3B-ABB6-C0D0B373EAB8} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {F6AC8D4A-EDD7-4514-8E8A-5BCB019864DB} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {BE39FD00-745B-4049-8161-FC129817CBE4} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD} + EndGlobalSection +EndGlobal diff --git a/Himp.TaskScheduling.sln.DotSettings b/Himp.TaskScheduling.sln.DotSettings new file mode 100644 index 0000000..cb0b2c9 --- /dev/null +++ b/Himp.TaskScheduling.sln.DotSettings @@ -0,0 +1,23 @@ + + True + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + WARNING + Required + Required + Required + Required + False + True + False + False + True + False + False + SQL + \ No newline at end of file diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 0000000..bdc4519 --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/common.props b/common.props new file mode 100644 index 0000000..87cf88d --- /dev/null +++ b/common.props @@ -0,0 +1,24 @@ + + + latest + 0.1.0 + $(NoWarn);CS1591 + module + + + + + + All + runtime; build; native; contentfiles; analyzers + + + + + + + $(NoWarn);0436 + + + + \ No newline at end of file diff --git a/database/Dockerfile b/database/Dockerfile new file mode 100644 index 0000000..8a4dea6 --- /dev/null +++ b/database/Dockerfile @@ -0,0 +1,20 @@ +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +COPY . . + +WORKDIR /templates/service/host/IdentityServerHost +RUN dotnet restore +RUN dotnet ef migrations script -i -o migrations-IdentityServerHost.sql + +WORKDIR /templates/service/host/Himp.TaskScheduling.Host +RUN dotnet restore +RUN dotnet ef migrations script -i -o migrations-TaskScheduling.sql + +FROM mcr.microsoft.com/mssql-tools AS final +WORKDIR /src +COPY --from=build /templates/service/host/IdentityServerHost/migrations-IdentityServerHost.sql migrations-IdentityServerHost.sql +COPY --from=build /templates/service/host/Himp.TaskScheduling.Host/migrations-TaskScheduling.sql migrations-TaskScheduling.sql +COPY --from=build /templates/service/database/entrypoint.sh . +RUN /bin/bash -c "sed -i $'s/\r$//' entrypoint.sh" +RUN chmod +x ./entrypoint.sh + +ENTRYPOINT ["./entrypoint.sh"] \ No newline at end of file diff --git a/database/entrypoint.sh b/database/entrypoint.sh new file mode 100644 index 0000000..1fcaac5 --- /dev/null +++ b/database/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +until /opt/mssql-tools/bin/sqlcmd -S sqlserver -U SA -P $SA_PASSWORD -Q 'SELECT name FROM master.sys.databases'; do +>&2 echo "SQL Server is starting up" +sleep 1 +done + +/opt/mssql-tools/bin/sqlcmd -S sqlserver -U SA -P $SA_PASSWORD -Q "CREATE DATABASE [$IdentityServer_DB]" +/opt/mssql-tools/bin/sqlcmd -S sqlserver -U SA -P $SA_PASSWORD -Q "CREATE DATABASE [$TaskScheduling_DB]" + +/opt/mssql-tools/bin/sqlcmd -d $IdentityServer_DB -S sqlserver -U sa -P $SA_PASSWORD -i migrations-IdentityServerHost.sql +/opt/mssql-tools/bin/sqlcmd -d $TaskScheduling_DB -S sqlserver -U sa -P $SA_PASSWORD -i migrations-TaskScheduling.sql \ No newline at end of file diff --git a/docker-compose.migrations.yml b/docker-compose.migrations.yml new file mode 100644 index 0000000..05026a3 --- /dev/null +++ b/docker-compose.migrations.yml @@ -0,0 +1,13 @@ +version: '3.4' + +services: + migrations: + build: + context: ../../ + dockerfile: templates/service/database/Dockerfile + depends_on: + - sqlserver + environment: + - IdentityServer_DB=TaskScheduling_Identity + - TaskScheduling_DB=TaskScheduling_ModuleDb + - SA_PASSWORD=yourStrong(!)Password diff --git a/docker-compose.override.yml b/docker-compose.override.yml new file mode 100644 index 0000000..fa88d30 --- /dev/null +++ b/docker-compose.override.yml @@ -0,0 +1,29 @@ +version: '3.4' + +services: + sqlserver: + environment: + - SA_PASSWORD=yourStrong(!)Password + - ACCEPT_EULA=Y + ports: + - "51599:1433" + + identity-server: + environment: + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionStrings__Default=Server=sqlserver;Database=TaskScheduling_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=TaskScheduling_Cache;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + ports: + - "51600:80" + + task-scheduling: + environment: + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionStrings__Default=Server=sqlserver;Database=TaskScheduling_ModuleDb;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpSettingManagement=Server=sqlserver;Database=TaskScheduling_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpPermissionManagement=Server=sqlserver;Database=TaskScheduling_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__AbpAuditLogging=Server=sqlserver;Database=TaskScheduling_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=TaskScheduling_Cache;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false + - AuthServer__Authority=http://identity-server + ports: + - "51601:80" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..31a37d1 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.4' + +services: + sqlserver: + image: mcr.microsoft.com/mssql/server + volumes: + - dbdata:/var/opt/mssql + + identity-server: + build: + context: ../../ + dockerfile: templates/service/host/IdentityServerHost/Dockerfile + depends_on: + - sqlserver + + task-scheduling: + build: + context: ../../ + dockerfile: templates/service/host/Himp.TaskScheduling.Host/Dockerfile + depends_on: + - sqlserver + - identity-server + +volumes: + dbdata: \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Application.Contracts/FodyWeavers.xml b/src/Himp.TaskScheduling.Application.Contracts/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Application.Contracts/FodyWeavers.xsd b/src/Himp.TaskScheduling.Application.Contracts/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp.TaskScheduling.Application.Contracts.abppkg b/src/Himp.TaskScheduling.Application.Contracts/Himp.TaskScheduling.Application.Contracts.abppkg new file mode 100644 index 0000000..4903279 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp.TaskScheduling.Application.Contracts.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.application-contracts" +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp.TaskScheduling.Application.Contracts.csproj b/src/Himp.TaskScheduling.Application.Contracts/Himp.TaskScheduling.Application.Contracts.csproj new file mode 100644 index 0000000..111c99f --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp.TaskScheduling.Application.Contracts.csproj @@ -0,0 +1,17 @@ + + + + + + net8.0 + enable + + + + + + + + + + diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/CodeConversionDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/CodeConversionDto.cs new file mode 100644 index 0000000..1a605cd --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/CodeConversionDto.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class CodeConversionDto : EntityDto + { + /// + /// 原始码 + /// + public string SorcCode { get; set; } + + /// + /// 目标码 + /// + public string TargetCode { get; set; } + + /// + /// 1 规批码转制样码 + /// 2 制样码准化验码 + /// 3 化验码转瓶底码 + /// + public int ConversionType { get; set; } + + /// + /// + /// + public DateTime ConversionTime { get; set; } + + /// + /// + /// + public string OperName { get; set; } + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/CodeConversionInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/CodeConversionInput.cs new file mode 100644 index 0000000..8949577 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/CodeConversionInput.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class CodeConversionInput : PagedAndSortedResultRequestDtoExtend + { + /// + /// 1 规批码转制样码 + /// 2 制样码转化验码 + /// 3 制样码转瓶底码 + /// + public int? ConversionType { get; set; } + + public DateTime? Begntime { get; set; } + + public DateTime? Endtime { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ICodeConversionService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ICodeConversionService.cs new file mode 100644 index 0000000..43fa202 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ICodeConversionService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface ICodeConversionService : IApplicationService + { + Task> GetListAsync(CodeConversionInput input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IParamConfigService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IParamConfigService.cs new file mode 100644 index 0000000..8b8822e --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IParamConfigService.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IParamConfigService : ICrudAppService + { + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IParamConfigTaskService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IParamConfigTaskService.cs new file mode 100644 index 0000000..e4df90a --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IParamConfigTaskService.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IParamConfigTaskService : IApplicationService + { + /// + /// + /// + /// + /// + Task PostAsync(ParamConfigTaskCreateDto input); + + /// + /// + /// + /// + /// + Task> GetListAsync(ParamConfigTaskInput input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IParamConfigValueService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IParamConfigValueService.cs new file mode 100644 index 0000000..fd977c0 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IParamConfigValueService.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IParamConfigValueService : IApplicationService + { + Task> GetListAsync(ParamConfigValueInput input); + + Task> GetKeyListAsync(); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IQsCodeService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IQsCodeService.cs new file mode 100644 index 0000000..e4a3ab5 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/IQsCodeService.cs @@ -0,0 +1,14 @@ +using Himp.TaskScheduling.Configs; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public interface IQsCodeService + { + Task PostAsync(QsCodeInput input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigCreateOrUpdateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigCreateOrUpdateDto.cs new file mode 100644 index 0000000..d0b75b8 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigCreateOrUpdateDto.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class ParamConfigCreateOrUpdateDto + { + /// + /// 参数类别 + /// 类 + /// 对象 + /// 属性 + /// + public EnumParamType ParamType { get; set; } + + /// + /// 参数编码 + /// + public string ParamCodg { get; set; } + + /// + /// 参数名称 + /// + public string ParamName { get; set; } + + /// + /// 属性Key + /// + public string? PropertyKey { get; set; } + + /// + /// 属性类别 + /// + public int? PropertyType { get; set; } + + /// + /// 参数值 + /// + public string? ParamValue { get; set; } + + /// + /// 默认值 + /// + public string? DefValue { get; set; } + + /// + /// 有效标识 + /// + public bool ValiFlag { get; set; } + + /// + /// + /// + public string? KeyPath { get; set; } + + /// + /// + /// + public long? ParentId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigDto.cs new file mode 100644 index 0000000..1b7c88f --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigDto.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class ParamConfigDto : EntityDto + { + /// + /// 参数类别 + /// 类 + /// 对象 + /// 属性 + /// + public EnumParamType ParamType { get; set; } + + /// + /// 参数编码 + /// + public string ParamCodg { get; set; } + + /// + /// 参数名称 + /// + public string ParamName { get; set; } + + /// + /// 属性ID + /// + public string? PropertyKey { get; set; } + + /// + /// 属性类别 + /// + public int? PropertyType { get; set; } + + /// + /// 参数值 + /// + public string? ParamValue { get; set; } + + /// + /// 默认值 + /// + public string? DefValue { get; set; } + + /// + /// 有效标识 + /// + public bool ValiFlag { get; set; } + + /// + /// + /// + public long? ParentId { get; set; } + + /// + /// Topic 路径 + /// + public string? KeyPath { get; set; } + + /// + /// + /// + public List Children { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigInput.cs new file mode 100644 index 0000000..45fa830 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigInput.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class ParamConfigInput : PagedAndSortedResultRequestDtoExtend + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskCreateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskCreateDto.cs new file mode 100644 index 0000000..0db4fb7 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskCreateDto.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class ParamConfigTaskCreateDto + { + /// + /// 参数编码 + /// + public string ParamCodg { get; set; } + + /// + /// 属性值 + /// + public string PropertyValue { get; set; } + + /// + /// 任务类别 + /// + public int TaskType { get; set; } + + /// + /// + /// + public string OperatorName { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskDto.cs new file mode 100644 index 0000000..8567d7b --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskDto.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class ParamConfigTaskDto : EntityDto + { + /// + /// 任务内容描述 + /// + public string TaskContdesc { get; set; } + + /// + /// 属性Key + /// + public string PropertyKey { get; set; } + + /// + /// 属性值 + /// + public string PropertyValue { get; set; } + + /// + /// 参数 + /// + public int TaskType { get; set; } + + /// + /// + /// + public string OperatorName { get; set; } + + /// + /// + /// + public int TaskStas { get; set; } + + /// + /// + /// + public string TaskMsg { get; set; } + + /// + /// + /// + public DateTime OperationTime { get; set; } + + /// + /// + /// + public DateTime? ExecTime { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskInput.cs new file mode 100644 index 0000000..cdcb4d2 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskInput.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class ParamConfigTaskInput: PagedAndSortedResultRequestDtoExtend + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskUpdateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskUpdateDto.cs new file mode 100644 index 0000000..2be1c2b --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigTaskUpdateDto.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class ParamConfigTaskUpdateDto + { + /// + /// + /// + public string OperatorName { get; set; } + + /// + /// + /// + public int TaskStas { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigValueDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigValueDto.cs new file mode 100644 index 0000000..fab63fe --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigValueDto.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class ParamConfigValueDto : EntityDto + { + public object Value { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigValueInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigValueInput.cs new file mode 100644 index 0000000..5582d29 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/ParamConfigValueInput.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class ParamConfigValueInput + { + public List? Keys { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/QsCodeDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/QsCodeDto.cs new file mode 100644 index 0000000..456d909 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/QsCodeDto.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling.Configs +{ + public class QsCodeDto + { + public string QsCode { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/QsCodeInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/QsCodeInput.cs new file mode 100644 index 0000000..1a53f8d --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Configs/QsCodeInput.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling.Configs +{ + public class QsCodeInput + { + public string Code { get; set; } + + public string Oper { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/AutoSamplingConditionDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/AutoSamplingConditionDto.cs new file mode 100644 index 0000000..ae7a463 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/AutoSamplingConditionDto.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling.Datas +{ + public class AutoSamplingConditionDto + { + public string TipCont { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/AutoSamplingConditionInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/AutoSamplingConditionInput.cs new file mode 100644 index 0000000..5d4e9a9 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/AutoSamplingConditionInput.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling.Datas +{ + public class AutoSamplingConditionInput + { + public string Key { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/DataStatisticDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/DataStatisticDto.cs new file mode 100644 index 0000000..0efa8aa --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/DataStatisticDto.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling.Datas +{ + public class DataStatisticDto + { + public string Tit { get; set; } + + public int Type { get; set; } + + public decimal Cont { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/FullWaterCompCreateOrUpdateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/FullWaterCompCreateOrUpdateDto.cs new file mode 100644 index 0000000..6189c73 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/FullWaterCompCreateOrUpdateDto.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class FullWaterCompCreateOrUpdateDto + { + public string Type { get; set; } + + public string Index { get; set; } + + public decimal Value { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/FullWaterCompDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/FullWaterCompDto.cs new file mode 100644 index 0000000..e1d2c3e --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/FullWaterCompDto.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class FullWaterCompDto : EntityDto + { + public string Type { get; set; } + + public string Index { get; set; } + + public decimal Value { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/FullWaterCompInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/FullWaterCompInput.cs new file mode 100644 index 0000000..6bfc3f9 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/FullWaterCompInput.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class FullWaterCompInput : PagedAndSortedResultRequestDtoExtend + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IAutoSamplingConditionService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IAutoSamplingConditionService.cs new file mode 100644 index 0000000..48bd4ab --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IAutoSamplingConditionService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling.Datas +{ + public interface IAutoSamplingConditionService : IApplicationService + { + Task GetAsync(AutoSamplingConditionInput input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IDataStatisticService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IDataStatisticService.cs new file mode 100644 index 0000000..7f775cf --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IDataStatisticService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling.Datas +{ + public interface IDataStatisticService : IApplicationService + { + Task> GetAsync(); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IDataVService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IDataVService.cs new file mode 100644 index 0000000..43f25c7 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IDataVService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling.Datas +{ + public interface IDataVService : IApplicationService + { + Task> GetAsync(); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IFullWaterCompService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IFullWaterCompService.cs new file mode 100644 index 0000000..def9f4d --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IFullWaterCompService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IFullWaterCompService : ICrudAppService + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IManualTestingJobRecService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IManualTestingJobRecService.cs new file mode 100644 index 0000000..a9901cf --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IManualTestingJobRecService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling.Datas +{ + public interface IManualTestingJobRecService : IApplicationService + { + Task> GetListAsync(ManualTestingJobRecInput input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ISamplePreparationDatavService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ISamplePreparationDatavService.cs new file mode 100644 index 0000000..6a488ed --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ISamplePreparationDatavService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling.Datas +{ + public interface ISamplePreparationDatavService : IApplicationService + { + Task GetSampleData(); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IZYOperateRecordService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IZYOperateRecordService.cs new file mode 100644 index 0000000..42fb117 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/IZYOperateRecordService.cs @@ -0,0 +1,16 @@ +using Himp.TaskScheduling.Datas; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IZYOperateRecordService : IApplicationService + { + Task> GetListAsync(ZYOperateRecordInput input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ManualTestingJobRecDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ManualTestingJobRecDto.cs new file mode 100644 index 0000000..79db667 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ManualTestingJobRecDto.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class ManualTestingJobRecDto : EntityDto + { + public string TestingCode { get; set; } + + public string TestingProject { get; set; } + + public DateTime TestingDate { get; set; } + + public string Operator { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ManualTestingJobRecInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ManualTestingJobRecInput.cs new file mode 100644 index 0000000..3950cfb --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ManualTestingJobRecInput.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class ManualTestingJobRecInput : PagedAndSortedResultRequestDtoExtend + { + public DateTime? BegnDate { get; set; } + + public DateTime? EndDate { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplePreparationDatavDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplePreparationDatavDto.cs new file mode 100644 index 0000000..15db60f --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplePreparationDatavDto.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling.Datas +{ + public class SamplePreparationDatavDto + { + public int Tar6 { get; set; } + + public int Tar3 { get; set; } + + public int Tar2 { get; set; } + + public List CurWeight6 { get; set; } + + public List CurWeight3 { get; set; } + + public List CurWeight2 { get; set; } + + public int SampleEfficiencyCur { get; set; } + + public int SampleEfficiencyTotal { get; set; } + + public int FinishRateCur { get; set; } + + public int FinishRateTotal { get; set; } + + public SamplePreparationDatavDto() + { + CurWeight6 = new List(); + CurWeight3 = new List(); + CurWeight2 = new List(); + } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplePreparationRecDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplePreparationRecDto.cs new file mode 100644 index 0000000..6ae54dd --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplePreparationRecDto.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.Datas +{ + public class SamplePreparationRecDto : EntityDto + { + public string MachineCode { get; set; } + + public int AtuoSmapleFlag { get; set; } + + public string SampleID { get; set; } + + public string PackCode { get; set; } + + public int ZYWeight { get; set; } + + public int ZYType { get; set; } + + public int SampleType { get; set; } + public int Size { get; set; } + + public int Water { get; set; } + + public DateTime StartTime { get; set; } + + public DateTime EndTime { get; set; } + + public int SampleWeight { get; set; } + + public string UserName { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplingOperRecDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplingOperRecDto.cs new file mode 100644 index 0000000..e77e3f5 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplingOperRecDto.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling.Datas +{ + public class SamplingOperRecDto + { + public DateTime Time { get; set; } + + public string EqpName { get; set; } + + public string OperDescr { get; set; } + + public string OperName { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplingOperRecInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplingOperRecInput.cs new file mode 100644 index 0000000..589b926 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/SamplingOperRecInput.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling.Datas +{ + public class SamplingOperRecInput: PagedAndSortedResultRequestDtoExtend + { + public DateTime? BegnDate { get; set; } + + public DateTime? EndDate { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ZYOperateRecordDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ZYOperateRecordDto.cs new file mode 100644 index 0000000..10de9a6 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ZYOperateRecordDto.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.Datas +{ + public class ZYOperateRecordDto : EntityDto + { + public string Record { get; set; } + + public string MachineCode { get; set; } + + public string PersonId { get; set; } + + public string Name { get; set; } + + public DateTime DateTime { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ZYOperateRecordInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ZYOperateRecordInput.cs new file mode 100644 index 0000000..0acead2 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Datas/ZYOperateRecordInput.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class ZYOperateRecordInput : PagedAndSortedResultRequestDtoExtend + { + public DateTime? BegnTime { get; set; } + + public DateTime? EndTime { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgRecCreateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgRecCreateDto.cs new file mode 100644 index 0000000..aa1730f --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgRecCreateDto.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class EventMsgRecCreateDto + { + /// + /// 消息类型 + /// + public string MsgTopicName { get; set; } + + /// + /// 全路径 + /// + public string TopicFullPath { get; set; } + + /// + /// 消息内容 + /// + public string MsgCont { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgRecDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgRecDto.cs new file mode 100644 index 0000000..a9d8e0b --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgRecDto.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class EventMsgRecDto : EntityDto + { + /// + /// 消息类型 + /// + public string MsgTopicName { get; set; } + + /// + /// 全路径 + /// + public string TopicFullPath { get; set; } + + /// + /// 消息内容 + /// + public string MsgCont { get; set; } + + /// + /// + /// + public virtual DateTime CreationTime { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgRecInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgRecInput.cs new file mode 100644 index 0000000..587b919 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgRecInput.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class EventMsgRecInput : PagedAndSortedResultRequestDtoExtend + { + /// + /// 全路径 + /// + public string[] TopicFullPath { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicCreateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicCreateDto.cs new file mode 100644 index 0000000..ebc1efd --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicCreateDto.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class EventMsgTopicCreateDto + { + /// + /// + /// + public string EventMsgTopicCodg { get; set; } + + /// + /// + /// + public string EventMsgTopicName { get; set; } + + /// + /// + /// + public string TopicFullPath { get; set; } + + /// + /// + /// + public int Srtno { get; set; } + + /// + /// + /// + public int LvIndex { get; set; } + + /// + /// + /// + public bool DefaultFlag { get; set; } + + /// + /// + /// + public Guid? ParentId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicDto.cs new file mode 100644 index 0000000..1d26431 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicDto.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class EventMsgTopicDto : EntityDto + { + /// + /// + /// + public string EventMsgTopicCodg { get; set; } + + /// + /// + /// + public string EventMsgTopicName { get; set; } + + /// + /// + /// + public string TopicFullPath { get; set; } + + /// + /// + /// + public int Srtno { get; set; } + + /// + /// + /// + public int LvIndex { get; set; } + + /// + /// + /// + public bool DefaultFlag { get; set; } + + /// + /// + /// + public Guid? ParentId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicInput.cs new file mode 100644 index 0000000..fe3995e --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicInput.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class EventMsgTopicInput : PagedAndSortedResultRequestDtoExtend + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicUpdateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicUpdateDto.cs new file mode 100644 index 0000000..6e0fec8 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/EventMsgTopicUpdateDto.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class EventMsgTopicUpdateDto + { + /// + /// + /// + public string EventMsgTopicCodg { get; set; } + + /// + /// + /// + public string EventMsgTopicName { get; set; } + + /// + /// + /// + public string TopicFullPath { get; set; } + + /// + /// + /// + public int Srtno { get; set; } + + /// + /// + /// + public int LvIndex { get; set; } + + /// + /// + /// + public bool DefaultFlag { get; set; } + + /// + /// + /// + public Guid? ParentId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/IEventMsgRecService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/IEventMsgRecService.cs new file mode 100644 index 0000000..0488576 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/IEventMsgRecService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IEventMsgRecService : IApplicationService + { + Task> GetListAsync(EventMsgRecInput input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/IEventMsgTopicService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/IEventMsgTopicService.cs new file mode 100644 index 0000000..0d20891 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Msgs/IEventMsgTopicService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IEventMsgTopicService : IApplicationService + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/CmDeviceControlDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/CmDeviceControlDto.cs new file mode 100644 index 0000000..8d32eda --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/CmDeviceControlDto.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class CmDeviceControlDto + { + /// + /// + /// + public string Device { get; set; } + + /// + /// + /// + public int Enable { get; set; } + + /// + /// + /// + public DateTime? Betime { get; set; } + + /// + /// + /// + public DateTime? Totime { get; set; } + + /// + /// + /// + public string? Remark { get; set; } + + /// + /// + /// + public DateTime Uptime { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/CmDeviceControlUpdateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/CmDeviceControlUpdateDto.cs new file mode 100644 index 0000000..9d40dc4 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/CmDeviceControlUpdateDto.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class CmDeviceControlUpdateDto + { + public int Enable { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ICmDeviceControlService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ICmDeviceControlService.cs new file mode 100644 index 0000000..2c7f599 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ICmDeviceControlService.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface ICmDeviceControlService : IApplicationService + { + Task GetAsync(int id); + + Task PutAsync(int id, CmDeviceControlUpdateDto input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/IManualSamplingTaskService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/IManualSamplingTaskService.cs new file mode 100644 index 0000000..f26b40a --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/IManualSamplingTaskService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IManualSamplingTaskService : IApplicationService + { + Task PostAsync(ManualSamplingTaskCreateDto input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISampleDiscardedTaskService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISampleDiscardedTaskService.cs new file mode 100644 index 0000000..082d784 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISampleDiscardedTaskService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface ISampleDiscardedTaskService : IApplicationService + { + Task Post(SampleDiscardedTaskCreateDto input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISampleObtainTaskService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISampleObtainTaskService.cs new file mode 100644 index 0000000..f8296fa --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISampleObtainTaskService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface ISampleObtainTaskService : IApplicationService + { + Task PostAsync(SampleObtainTaskCreateDto input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISamplePreparationResultService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISamplePreparationResultService.cs new file mode 100644 index 0000000..efe315e --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISamplePreparationResultService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface ISamplePreparationResultService : IApplicationService + { + Task> GetListAsync(SamplePreparationResultInput input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISamplePreparationTaskService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISamplePreparationTaskService.cs new file mode 100644 index 0000000..ea00bc5 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISamplePreparationTaskService.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface ISamplePreparationTaskService : IApplicationService + { + Task> GetListAsync(SamplePreparationTaskInput input); + + Task PostAsync(SamplePreparationTaskCreateOrUpdateDto input); + + Task PutAsync(string id, SamplePreparationTaskCreateOrUpdateDto input); + + Task> GetPlanListAsync(string samplePreparationTaskId); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISampleTestTaskService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISampleTestTaskService.cs new file mode 100644 index 0000000..e9329d0 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ISampleTestTaskService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public interface ISampleTestTaskService + { + Task> GetListAsync(SampleTestTaskInput input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/IStandardTestTaskService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/IStandardTestTaskService.cs new file mode 100644 index 0000000..a8df8a2 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/IStandardTestTaskService.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public interface IStandardTestTaskService + { + Task> GetListAsync(StandardTestTaskInput input); + + Task> GetItemListAsync(); + + Task PostAuditAsync(StandardTestTaskAuditDto input); + + Task PutItemValiAsync(long id, bool valiFlag); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ManualSamplingTaskCreateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ManualSamplingTaskCreateDto.cs new file mode 100644 index 0000000..7fff150 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/ManualSamplingTaskCreateDto.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class ManualSamplingTaskCreateDto + { + /// + /// 制样码 + /// + public string SampleCode { get; set; } + + /// + /// 化验码 + /// + public string TestCode { get; set; } + + //瓶底码 + public string BottomCode { get; set; } + + /// + /// 煤样类型 + /// + public string Sampletype { get; set; } + + /// + /// 化验项目 + /// + public string TestItems { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleDiscardedTaskCreateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleDiscardedTaskCreateDto.cs new file mode 100644 index 0000000..b2a54e5 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleDiscardedTaskCreateDto.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class SampleDiscardedTaskCreateDto + { + public string BottomCode { get; set; } + + public int ManualFlag { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleObtainTaskCreateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleObtainTaskCreateDto.cs new file mode 100644 index 0000000..734bd9d --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleObtainTaskCreateDto.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class SampleObtainTaskCreateDto + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleObtainTaskDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleObtainTaskDto.cs new file mode 100644 index 0000000..9d5a416 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleObtainTaskDto.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class SampleObtainTaskDto : EntityDto + { + /// + /// 任务类型 + /// 1.人工化验 + /// 2.抽查取样 + /// + public int TaskType { get; set; } + + /// + /// 煤样入场时间 + /// + public DateTime CoalTime { get; set; } + + /// + /// 任务状态 + /// + public int TaskState { get; set; } + + /// + /// 结束状态 + /// + public bool TaskEndFlag { get; set; } + + /// + /// 任务开始时间 + /// + public DateTime TaskStartTime { get; set; } + + /// + /// 任务结束时间 + /// + public DateTime TaskEndTime { get; set; } + + /// + /// 供应商编码 + /// + public string CustCode { get; set; } + + /// + /// 采样码 + /// + public string SampleCode { get; set; } + + /// + /// 制样码 + /// + public string SamplePreparationCode { get; set; } + + /// + /// 化验码 + /// + public string AssayCode { get; set; } + + /// + /// 抽样码 + /// + public string ExtractCode { get; set; } + + /// + /// 分样码 + /// + public string SeparateCode { get; set; } + + /// + /// 煤样类型 + /// 1:0.2mm1(分析样) + /// + public int CoalType { get; set; } + + /// + /// 化验项目 + /// + public string[] TestItemCode { get; set; } + + /// + /// 操作人编码 + /// + public string Opercode { get; set; } + + /// + /// 操作人名称 + /// + public string Opername { get; set; } + + /// + /// 备注 + /// + public string task_remark { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleObtainTaskInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleObtainTaskInput.cs new file mode 100644 index 0000000..4c33640 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleObtainTaskInput.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class SampleObtainTaskInput : PagedAndSortedResultRequestDtoExtend + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationPlanDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationPlanDto.cs new file mode 100644 index 0000000..6134e67 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationPlanDto.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class SamplePreparationPlanDto + { + public string Id { get; set; } + + public string ParName { get; set; } + + public string ParValue { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationPlanInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationPlanInput.cs new file mode 100644 index 0000000..024ace3 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationPlanInput.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class SamplePreparationPlanInput : PagedAndSortedResultRequestDtoExtend + { + public string SamplePreparationTaskId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationResultDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationResultDto.cs new file mode 100644 index 0000000..75a5c8a --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationResultDto.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class SamplePreparationResultDto : EntityDto + { + /// + /// + /// + public string SampeWay { get; set; } + + /// + /// + /// + public string SampeEqp { get; set; } + + /// + /// + /// + public DateTime Begtime { get; set; } + + /// + /// + /// + public DateTime? Endtime { get; set; } + + /// + /// + /// + public string? BottomCode61 { get; set; } + + /// + /// + /// + public float Weight61Bottles { get; set; } + + /// + /// + /// + public string? BottomCode62 { get; set; } + + /// + /// + /// + public float Weight62Bottles { get; set; } + + public string? BottomCode31 { get; set; } + + public float Weight31Bottles { get; set; } + + public string? BottomCode21 { get; set; } + + public float Weight21Bottles { get; set; } + + public string? BottomCode22 { get; set; } + + public float Weight22Bottles { get; set; } + + public float TotalCoalSampleWeight { get; set; } + + /// + /// 3 弃料重量 + /// + public float Weight6Rejects { get; set; } + + /// + /// 2 弃料重量 + /// + public float Weight3Rejects { get; set; } + + /// + /// 2 弃料重量 + /// + public float Weight2Rejects { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationResultInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationResultInput.cs new file mode 100644 index 0000000..c43fa65 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationResultInput.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class SamplePreparationResultInput : PagedAndSortedResultRequestDtoExtend + { + public DateTime? Begntime { get; set; } + + public DateTime? Endtime { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationTaskCreateOrUpdateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationTaskCreateOrUpdateDto.cs new file mode 100644 index 0000000..8ec4bdd --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationTaskCreateOrUpdateDto.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class SamplePreparationTaskCreateOrUpdateDto + { + public string Id { get; set; } + + /// + /// 制样码 + /// + public string SampleCode { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationTaskDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationTaskDto.cs new file mode 100644 index 0000000..72d3a41 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationTaskDto.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class SamplePreparationTaskDto : EntityDto + { + /// + /// 制样码 + /// + public string SampleCode { get; set; } + + /// + /// 任务下达时间 + /// + public DateTime TaskAssgnTime { get; set; } + + /// + /// 制样方式 + /// + public string SampeWay { get; set; } + + /// + /// 任务接收时间 + /// + public DateTime? TaskRecptTime { get; set; } + + /// + /// 最后操作时间 + /// + public DateTime LastOperTime { get; set; } + + /// + /// 任务状态 + /// + public string ExecStas { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationTaskInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationTaskInput.cs new file mode 100644 index 0000000..ffb2abb --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SamplePreparationTaskInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class SamplePreparationTaskInput : PagedAndSortedResultRequestDtoExtend + { + public DateTime? Begntime { get; set; } + + public DateTime? Endtime { get; set; } + + public string? ExecStas { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestItemDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestItemDto.cs new file mode 100644 index 0000000..6577a28 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestItemDto.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class SampleTestItemDto : EntityDto + { + public string TestItem { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestTaskCreateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestTaskCreateDto.cs new file mode 100644 index 0000000..0c8c02a --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestTaskCreateDto.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + /// + /// + /// + public class SampleTestTaskCreateDto + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestTaskDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestTaskDto.cs new file mode 100644 index 0000000..6dd3e36 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestTaskDto.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class SampleTestTaskDto : EntityDto + { + /// + /// 制样码 + /// + public string SampleCode { get; set; } + + /// + /// 化验码 + /// + public string TestCode { get; set; } + + /// + /// 瓶底码 + /// + public string BottomCode { get; set; } + + /// + /// 煤样类型 + /// + public string SampleType { get; set; } + + /// + /// 测定次数 + /// + public int TestCnt { get; set; } + + /// + /// 任务下达时间 + /// + public DateTime TaskAssgnTime { get; set; } + + /// + /// 任务接收时间 + /// + public DateTime? TaskRecptTime { get; set; } + + /// + /// 最后操作时间 + /// + public DateTime LastOperTime { get; set; } + + /// + /// 化验项目 + /// + public string TestItems { get; set; } + + /// + /// 任务状态 + /// + public string ExecStas { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestTaskInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestTaskInput.cs new file mode 100644 index 0000000..011d1ba --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/SampleTestTaskInput.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class SampleTestTaskInput : PagedAndSortedResultRequestDtoExtend + { + public DateTime? Begntime { get; set; } + + public DateTime? Endtime { get; set; } + + public string? SampleCode { get; set; } + + public string? SampleType { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestItemDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestItemDto.cs new file mode 100644 index 0000000..e7244f4 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestItemDto.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class StandardTestItemDto : EntityDto + { + public string TestItems { get; set; } + + public string SampleType { get; set; } + + public bool ValiFlag { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestTaskAuditDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestTaskAuditDto.cs new file mode 100644 index 0000000..bb48613 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestTaskAuditDto.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class StandardTestTaskAuditDto + { + /// + /// + /// + public long[] StandardTestTaskId { get; set; } + + /// + /// 审核人 + /// + public string Aduitor { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestTaskDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestTaskDto.cs new file mode 100644 index 0000000..61e7247 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestTaskDto.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class StandardTestTaskDto : EntityDto + { + /// + /// 制样码 + /// + public string SampleCode { get; set; } + + /// + /// 化验码 + /// + public string TestCode { get; set; } + + /// + /// 瓶底码 + /// + public string BottomCode { get; set; } + + /// + /// 煤样类型 + /// + public string Sampletype { get; set; } + + /// + /// 任务类别 + /// + public EnumTaskType TaskType { get; set; } + + /// + /// 制样方式 + /// 手工 + /// 自动 + /// + public string SampeWay { get; set; } + + /// + /// 测定次数 + /// + public int TestCnt { get; set; } + + /// + /// 任务下达时间 + /// + public DateTime TaskAssgnTime { get; set; } + + /// + /// 最后操作时间 + /// + public DateTime LastOperTime { get; set; } + + /// + /// 审核人 + /// + public string? Auditor { get; set; } + + /// + /// 审核时间 + /// + public DateTime? AuditTime { get; set; } + + /// + /// 任务状态 + /// + public string ExecStas { get; set; } + + /// + /// + /// + public List SampleTestItems { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestTaskInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestTaskInput.cs new file mode 100644 index 0000000..b1e5895 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Tasks/StandardTestTaskInput.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class StandardTestTaskInput : PagedAndSortedResultRequestDtoExtend + { + public DateTime? Begntime { get; set; } + + public DateTime? Endtime { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigCreateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigCreateDto.cs new file mode 100644 index 0000000..2c0d176 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigCreateDto.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class BizflowConfigCreateDto : BizflowConfigCreateOrUpdateDto + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigCreateOrUpdateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigCreateOrUpdateDto.cs new file mode 100644 index 0000000..a0a33c1 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigCreateOrUpdateDto.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class BizflowConfigCreateOrUpdateDto + { + /// + /// 工作流模型Key + /// + public string WorkflowModelKey { get; set; } + + /// + /// 工作流模型名称 + /// + public string WorkflowModelName { get; set; } + + /// + /// 工作流授权提供器 + /// + public int WorkflowTypeProvider { get; set; } + + /// + /// 提供值 + /// + public string? ProviderKey { get; set; } + + /// + /// 业务流程代码 + /// + public string BizflowCode { get; set; } + + /// + /// 业务流程名称 + /// + public string BizflowName { get; set; } + + /// + /// 有效标识 + /// + public bool ValiFlag { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigDto.cs new file mode 100644 index 0000000..55b68e1 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigDto.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Data; + +namespace Himp.TaskScheduling +{ + public class BizflowConfigDto : EntityDto + { + /// + /// 工作流模型名称 + /// + public string WorkflowModelName { get; set; } + + /// + /// 工作流模型Key + /// + public string WorkflowModelKey { get; set; } + + + /// + /// 工作流授权提供器 + /// + public EnumWorkflowTypeProvider WorkflowTypeProvider { get; set; } + + /// + /// 提供值 + /// + public string? ProviderKey { get; set; } + + /// + /// 业务流程代码 + /// + public string BizflowCode { get; set; } + + /// + /// 业务流程名称 + /// + public string BizflowName { get; set; } + + /// + /// 有效标识 + /// + public bool ValiFlag { get; set; } + + /// + /// 工作流授权提供器 + /// + public string WorkflowTypeProviderName + { + get + { + return WorkflowTypeProvider.ToString(); + } + } + + /// + /// + /// + public List BizflowNodes { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigInput.cs new file mode 100644 index 0000000..4436230 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigInput.cs @@ -0,0 +1,12 @@ +using Himp.TaskScheduling; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class BizflowConfigInput : PagedAndSortedResultRequestDtoExtend + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigUpdateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigUpdateDto.cs new file mode 100644 index 0000000..24bf378 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowConfigUpdateDto.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class BizflowConfigUpdateDto : BizflowConfigCreateOrUpdateDto + { + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeCreateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeCreateDto.cs new file mode 100644 index 0000000..58d04de --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeCreateDto.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class BizflowNodeCreateDto: BizflowNodeCreateOrUpdateBaseDto + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeCreateOrUpdateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeCreateOrUpdateDto.cs new file mode 100644 index 0000000..60ec43a --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeCreateOrUpdateDto.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class BizflowNodeCreateOrUpdateBaseDto + { + /// + /// + /// + public Guid BizflowConfigId { get; set; } + + /// + /// 工作流节点Key + /// + public string WorkflowNodeKey { get; set; } + + /// + /// 工作流节点名称 + /// + public string WorkflowNodeName { get; set; } + + /// + /// 流程节点类别 + /// + public EnumBizflowNodeType WorkflowNodeType { get; set; } + + /// + /// 节点序号 + /// + public int WorkflowIndex { get; set; } + + /// + /// schema + /// + public string? SchemaUI { get; set; } + + /// + /// + /// + public string? AssigneeParName { get; set; } + + /// + /// + /// + public string? CaudidateUsersParName { get; set; } + + /// + /// + /// + public string? CaudidateGroupsParName { get; set; } + + /// + /// + /// + public string[] AssigneeDefValues { get; set; } + + /// + /// + /// + public string[] CaudidateUsersDefValues { get; set; } + + /// + /// + /// + public string[] CaudidateGroupsDefValues { get; set; } + + /// + /// 组件 + /// + public string? Component { get; set; } + + /// + /// + /// + public bool ValiFlag { get; set; } + + /// + /// 可审核 + /// + public bool CanAuditFlag { get; set; } + + /// + /// 可驳回 + /// + public bool CanRejectFlag { get; set; } + + /// + /// 可编辑 + /// + public bool CanEditFlag { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeDto.cs new file mode 100644 index 0000000..097da65 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeDto.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + /// + /// + /// + public class BizflowNodeDto : EntityDto + { + /// + /// + /// + public Guid BizflowConfigId { get; set; } + + /// + /// 工作流节点Key + /// + public string WorkflowNodeKey { get; set; } + + /// + /// 工作流节点名称 + /// + public string WorkflowNodeName { get; set; } + + /// + /// 流程节点类别 + /// + public EnumBizflowNodeType WorkflowNodeType { get; set; } + + /// + /// 节点序号 + /// + public int WorkflowIndex { get; set; } + + /// + /// schema + /// + public string? SchemaUI { get; set; } + + /// + /// + /// + public string? AssigneeParName { get; set; } + + /// + /// + /// + public string? CaudidateUsersParName { get; set; } + + /// + /// + /// + public string? CaudidateGroupsParName { get; set; } + + /// + /// + /// + public string[] AssigneeDefValues { get; set; } + + /// + /// + /// + public string[] CaudidateUsersDefValues { get; set; } + + /// + /// + /// + public string[] CaudidateGroupsDefValues { get; set; } + + /// + /// 组件 + /// + public string? Component { get; set; } + + /// + /// + /// + public bool ValiFlag { get; set; } + + /// + /// 可审核 + /// + public bool CanAuditFlag { get; set; } + + /// + /// 可驳回 + /// + public bool CanRejectFlag { get; set; } + + /// + /// 可编辑 + /// + public bool CanEditFlag { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeInput.cs new file mode 100644 index 0000000..2694bec --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeInput.cs @@ -0,0 +1,14 @@ +using Himp.TaskScheduling; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class BizflowNodeInput : PagedAndSortedResultRequestDtoExtend + { + public string? BizflowCode { get; set; } + + public int? WorkflowIndex { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeUpdateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeUpdateDto.cs new file mode 100644 index 0000000..2b4e45e --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/BizflowNodeUpdateDto.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class BizflowNodeUpdateDto: BizflowNodeCreateOrUpdateBaseDto + { + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IBizflowConfigService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IBizflowConfigService.cs new file mode 100644 index 0000000..a1c933d --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IBizflowConfigService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IBizflowConfigService : ICrudAppService + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IBizflowNodeService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IBizflowNodeService.cs new file mode 100644 index 0000000..bdb4c94 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IBizflowNodeService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IBizflowNodeService : ICrudAppService + { + + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IWorkflowDefinitionService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IWorkflowDefinitionService.cs new file mode 100644 index 0000000..402c809 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IWorkflowDefinitionService.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IWorkflowDefinitionService : IApplicationService + { + Task> GetListAsync(ProcessDefinitionInput input); + + Task PostDeployAsync(WorkflowDeployDto input); + + Task PostActivateAsync(WorkflowActivateDto input); + + Task DeleteAsync(string id); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IWorkflowInstanceService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IWorkflowInstanceService.cs new file mode 100644 index 0000000..bb12239 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IWorkflowInstanceService.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IWorkflowInstanceService : IApplicationService + { + Task> GetListAsync(WorkflowInstanceInput input); + + Task PostAsync(WorkflowInstanceCreateDto input); + + Task PutAsync(WorkflowInstanceExecDto input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IWorkflowTodoTaskService.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IWorkflowTodoTaskService.cs new file mode 100644 index 0000000..ec060fd --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/IWorkflowTodoTaskService.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling +{ + public interface IWorkflowTodoTaskService : IApplicationService + { + Task> GetListAsync(WorkflowTodoTaskInput input); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessDefinitionInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessDefinitionInput.cs new file mode 100644 index 0000000..990f987 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessDefinitionInput.cs @@ -0,0 +1,12 @@ +using Himp.TaskScheduling; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class ProcessDefinitionInput : PagedAndSortedResultRequestDtoExtend + { + public int? Status { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessModelAssocTypeCreateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessModelAssocTypeCreateDto.cs new file mode 100644 index 0000000..6c0c3e7 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessModelAssocTypeCreateDto.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class ProcessModelAssocTypeCreateDto + { + public string WorkflowModeId { get; set; } + + public string WorkflowModelName { get; set; } + + public Guid WorkflowTypeId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessModelAssocTypeDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessModelAssocTypeDto.cs new file mode 100644 index 0000000..38000cb --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessModelAssocTypeDto.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class ProcessModelAssocTypeDto : EntityDto + { + public string WorkflowModeId { get; set; } + + public string WorkflowModelName { get; set; } + + public Guid WorkflowTypeId { get; set; } + + public BizflowConfigDto WorkflowType { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessModelAssocTypeInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessModelAssocTypeInput.cs new file mode 100644 index 0000000..e6b6f9e --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/ProcessModelAssocTypeInput.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class ProcessModelAssocTypeInput + { + public Guid WorkflowTypeId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowActivateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowActivateDto.cs new file mode 100644 index 0000000..0f2ff01 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowActivateDto.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class WorkflowActivateDto + { + public string DeploymentKey { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowArgs.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowArgs.cs new file mode 100644 index 0000000..2e29970 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowArgs.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class WorkflowArgs + { + public List ParamConfigs { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowDeployDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowDeployDto.cs new file mode 100644 index 0000000..61048a7 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowDeployDto.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class WorkflowDeployDto + { + public string Id { get; set; } + + public string WorkflowName { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceCreateDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceCreateDto.cs new file mode 100644 index 0000000..62a75ba --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceCreateDto.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class WorkflowInstanceCreateDto + { + /// + /// + /// + public string BizFlowCode { get; set; } + + public string UserId { get; set; } + + public Dictionary> AssocUsers { get; set; } + + public Dictionary BizPars { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceDto.cs new file mode 100644 index 0000000..840f31c --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceDto.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Volo.Abp.Data; + +namespace Himp.TaskScheduling +{ + public class WorkflowInstanceDto : IHasExtraProperties + { + /// + /// + /// + public string Id { get; set; } + + /// + /// 流程模型Id + /// + public string WorkflowModelId { get; set; } + + /// + /// + /// + public string ProcessInstanceId { get; set; } + + /// + /// 流程实例名称 + /// + public string WorkflowInstanceName { get; set; } + + /// + /// 流程实例内容描述 + /// + public string WorkflowInstanceContdesc { get; set; } + + /// + /// 开始时间 + /// + public string Begintime { get; set; } + + /// + /// 当前节点编码 + /// + public string CurrNodeCodg { get; set; } + + /// + /// 当前节点名称 + /// + public string CurrNodeName { get; set; } + + /// + /// 状态 + /// + public EnumWorkflowInstanceStas WorkflowInstanceStas { get; set; } + + public string WorkflowInstanceStasName + { + get + { + return WorkflowInstanceStas.ToString(); + } + } + + public string? Fintime { get; set; } + + public virtual ExtraPropertyDictionary ExtraProperties { get; protected set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceExecDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceExecDto.cs new file mode 100644 index 0000000..3d191f8 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceExecDto.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class WorkflowInstanceExecDto + { + /// + /// 流程实例Id + /// + public string ProcessInstanceId { get; set; } + + /// + /// 用户 + /// + public string? UserId { get; set; } + + /// + /// 业务参数 + /// + public Dictionary BizPars { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceInput.cs new file mode 100644 index 0000000..4224e92 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceInput.cs @@ -0,0 +1,18 @@ +using Himp.TaskScheduling; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class WorkflowInstanceInput : PagedAndSortedResultRequestDtoExtend + { + public EnumWorkflowInstanceStas Status { get; set; } + + public DateTime? Begntime { get; set; } + + public DateTime? Endtime { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceStasDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceStasDto.cs new file mode 100644 index 0000000..207a081 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowInstanceStasDto.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class WorkflowInstanceStasDto + { + public int Code { get; set; } + + public string Msg { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowModelDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowModelDto.cs new file mode 100644 index 0000000..d6deab4 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowModelDto.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class WorkflowModelDto : EntityDto + { + public string WorkflowModelKey { get; set; } + + public string WorkflowModelName { get; set; } + + public int Version { get; set; } + + public string? LastUpdateTime { get; set; } + + public string CreateTime { get; set; } + + public EnumWorkflowModelStas? WorkflowModelStas { get; set; } + + public string WorkflowModelStasName + { + get + { + if (WorkflowModelStas != null) + { + return WorkflowModelStas.ToString(); + } + + return string.Empty; + } + } + + public string? DeploymentId { get; set; } + + public string? DeployKey { get; set; } + + public string EditorSourceExtraValueId { get; set; } + + public string EditorSourceValueId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowNodeSFSchemaDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowNodeSFSchemaDto.cs new file mode 100644 index 0000000..9358637 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowNodeSFSchemaDto.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class WorkflowNodeSFSchemaDto + { + public string PropertyName { get; set; } + + public string Type { get; set; } + + public string Title { get; set; } + + public string? Format { get; set; } + + public int? MaxLength { get; set; } + + public int? MinLength { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowTodoTaskDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowTodoTaskDto.cs new file mode 100644 index 0000000..54330bc --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowTodoTaskDto.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + /// + /// 工作流待办任务 + /// + public class WorkflowTodoTaskDto + { + /// + /// + /// + public string Id { get; set; } + + /// + /// 任务名 + /// + public string TaskName { get; set; } + + /// + /// 流程开始时间 + /// + public string ProcessStartTime { get; set; } + + /// + /// + /// + public Dictionary VariableMap { get; set; } + + /// + /// + /// + public string ModelName { get; set; } + + /// + /// + /// + public int SuspensionCode { get; set; } + + /// + /// + /// + public string SuspensionState { get; set; } + + /// + /// + /// + public string ModelId { get; set; } + + /// + /// + /// + public string TaskId { get; set; } + + /// + /// + /// + public string ProcessInstanceId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowTodoTaskInput.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowTodoTaskInput.cs new file mode 100644 index 0000000..1ca063f --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowTodoTaskInput.cs @@ -0,0 +1,12 @@ +using Himp.TaskScheduling; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class WorkflowTodoTaskInput: PagedAndSortedResultRequestDtoExtend + { + public string UserId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowTypeStColumnDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowTypeStColumnDto.cs new file mode 100644 index 0000000..f62f14a --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Himp/TaskScheduling/Workflows/WorkflowTypeStColumnDto.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public class WorkflowTypeStColumnDto + { + /// + /// 标题 + /// + public string Title { get; set; } + + /// + /// 类型 + /// + public string Type { get; set; } + + /// + /// 编号 + /// + public string Index { get; set; } + + /// + /// 值类别 + /// + public string ValueKind { get; set; } + + /// + /// 显示列 + /// + public bool ShowColumn { get; set; } + + /// + /// 显示内容描述 + /// + public bool ShowContdesc { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/PagedAndSortedResultRequestDtoExtend.cs b/src/Himp.TaskScheduling.Application.Contracts/PagedAndSortedResultRequestDtoExtend.cs new file mode 100644 index 0000000..cf52faa --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/PagedAndSortedResultRequestDtoExtend.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + public class PagedAndSortedResultRequestDtoExtend : PagedAndSortedResultRequestDto + { + public int Pi { get; set; } = 1; + + public int Ps { get; set; } = DefaultMaxResultCount; + + public string? Filter { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Permissions/TaskSchedulingPermissionDefinitionProvider.cs b/src/Himp.TaskScheduling.Application.Contracts/Permissions/TaskSchedulingPermissionDefinitionProvider.cs new file mode 100644 index 0000000..cc4ba73 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Permissions/TaskSchedulingPermissionDefinitionProvider.cs @@ -0,0 +1,18 @@ +using Himp.TaskScheduling.Localization; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Localization; + +namespace Himp.TaskScheduling.Permissions; + +public class TaskSchedulingPermissionDefinitionProvider : PermissionDefinitionProvider +{ + public override void Define(IPermissionDefinitionContext context) + { + var myGroup = context.AddGroup(TaskSchedulingPermissions.GroupName, L("Permission:TaskScheduling")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Permissions/TaskSchedulingPermissions.cs b/src/Himp.TaskScheduling.Application.Contracts/Permissions/TaskSchedulingPermissions.cs new file mode 100644 index 0000000..90d959c --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Permissions/TaskSchedulingPermissions.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Reflection; + +namespace Himp.TaskScheduling.Permissions; + +public class TaskSchedulingPermissions +{ + public const string GroupName = "TaskScheduling"; + + public static string[] GetAll() + { + return ReflectionHelper.GetPublicConstantsRecursively(typeof(TaskSchedulingPermissions)); + } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Samples/ISampleAppService.cs b/src/Himp.TaskScheduling.Application.Contracts/Samples/ISampleAppService.cs new file mode 100644 index 0000000..fede057 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Samples/ISampleAppService.cs @@ -0,0 +1,11 @@ +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling.Samples; + +public interface ISampleAppService : IApplicationService +{ + Task GetAsync(); + + Task GetAuthorizedAsync(); +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/Samples/SampleDto.cs b/src/Himp.TaskScheduling.Application.Contracts/Samples/SampleDto.cs new file mode 100644 index 0000000..e056983 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/Samples/SampleDto.cs @@ -0,0 +1,6 @@ +namespace Himp.TaskScheduling.Samples; + +public class SampleDto +{ + public int Value { get; set; } +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/TaskSchedulingApplicationContractsModule.cs b/src/Himp.TaskScheduling.Application.Contracts/TaskSchedulingApplicationContractsModule.cs new file mode 100644 index 0000000..028d06e --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/TaskSchedulingApplicationContractsModule.cs @@ -0,0 +1,15 @@ +using Volo.Abp.Application; +using Volo.Abp.Modularity; +using Volo.Abp.Authorization; + +namespace Himp.TaskScheduling; + +[DependsOn( + typeof(TaskSchedulingDomainSharedModule), + typeof(AbpDddApplicationContractsModule), + typeof(AbpAuthorizationModule) + )] +public class TaskSchedulingApplicationContractsModule : AbpModule +{ + +} diff --git a/src/Himp.TaskScheduling.Application.Contracts/TaskSchedulingRemoteServiceConsts.cs b/src/Himp.TaskScheduling.Application.Contracts/TaskSchedulingRemoteServiceConsts.cs new file mode 100644 index 0000000..0032019 --- /dev/null +++ b/src/Himp.TaskScheduling.Application.Contracts/TaskSchedulingRemoteServiceConsts.cs @@ -0,0 +1,8 @@ +namespace Himp.TaskScheduling; + +public class TaskSchedulingRemoteServiceConsts +{ + public const string RemoteServiceName = "TaskScheduling"; + + public const string ModuleName = "taskScheduling"; +} diff --git a/src/Himp.TaskScheduling.Application/FodyWeavers.xml b/src/Himp.TaskScheduling.Application/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Application/FodyWeavers.xsd b/src/Himp.TaskScheduling.Application/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Application/Himp.TaskScheduling.Application.abppkg b/src/Himp.TaskScheduling.Application/Himp.TaskScheduling.Application.abppkg new file mode 100644 index 0000000..412567a --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp.TaskScheduling.Application.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.application" +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Application/Himp.TaskScheduling.Application.csproj b/src/Himp.TaskScheduling.Application/Himp.TaskScheduling.Application.csproj new file mode 100644 index 0000000..61e5dcd --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp.TaskScheduling.Application.csproj @@ -0,0 +1,24 @@ + + + + + + net8.0 + enable + + + + + + + + + + + + + + + + + diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/CodeConversionService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/CodeConversionService.cs new file mode 100644 index 0000000..bc7ab6c --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/CodeConversionService.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.ObjectMapping; + +namespace Himp.TaskScheduling +{ + /// + /// 转码 + /// + public class CodeConversionService : TaskSchedulingAppService, ICodeConversionService + { + private IRepository _codeConversionRepository; + + /// + /// + /// + /// + public CodeConversionService(IRepository codeConversionRepository) + { + _codeConversionRepository = codeConversionRepository; + } + + /// + /// + /// + /// + /// + public async Task> GetListAsync(CodeConversionInput input) + { + var iQuery = await _codeConversionRepository.GetQueryableAsync(); + iQuery = iQuery.WhereIf(input.ConversionType != null, i => i.ConversionType == input.ConversionType); + iQuery = iQuery.WhereIf(input.Begntime != null, i => i.ConversionTime >= input.Begntime.Value.Date); + iQuery = iQuery.WhereIf(input.Endtime != null, i => i.ConversionTime < input.Endtime.Value.Date.AddDays(1)); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Skip((input.Pi - 1) * input.Ps).Take(input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigKeysService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigKeysService.cs new file mode 100644 index 0000000..6dca830 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigKeysService.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class ParamConfigKeysService : TaskSchedulingAppService + { + private ParamConfigManager _paramConfigManager; + + public ParamConfigKeysService(ParamConfigManager paramConfigManager) + { + _paramConfigManager = paramConfigManager; + } + + + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigService.cs new file mode 100644 index 0000000..7c055a3 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigService.cs @@ -0,0 +1,85 @@ +using AutoMapper.Internal.Mappers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// 参数配置 + /// + public class ParamConfigService : CrudAppService, IParamConfigService + { + private IRepository _paramConfigRepository; + + /// + /// + /// + /// + public ParamConfigService(IRepository paramConfigRepository) : base(paramConfigRepository) + { + _paramConfigRepository = paramConfigRepository; + } + + /// + /// + /// + /// + /// + public override async Task> GetListAsync(ParamConfigInput input) + { + var iQuery = await _paramConfigRepository.GetQueryableAsync(); + var allList = iQuery.ToList(); + allList = allList.Where(a => a.ParentId == null).ToList(); + + if (!string.IsNullOrEmpty(input.Filter)) + { + allList = allList.Where(a => a.ParamName.Contains(input.Filter) + || (a.Children!=null && a.Children.Any(aa => aa.ParamName.Contains(input.Filter) + || (aa.Children!=null&& aa.Children.Any(aaa => aaa.ParamName.Contains(input.Filter))))) + ).ToList(); + } + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(allList); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = allList.Count(); + var items = allList.Skip((input.Pi - 1) * input.Ps).Take(input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + + public override Task CreateAsync(ParamConfigCreateOrUpdateDto input) + { + if (!string.IsNullOrEmpty(input.KeyPath) && !string.IsNullOrEmpty(input.PropertyKey)) + { + RedisHelper.SetString($"TopicKeyPath:{input.PropertyKey}", input.KeyPath); + } + + return base.CreateAsync(input); + } + + public override Task UpdateAsync(long id, ParamConfigCreateOrUpdateDto input) + { + if (!string.IsNullOrEmpty(input.KeyPath) && !string.IsNullOrEmpty(input.PropertyKey)) + { + RedisHelper.SetString($"TopicKeyPath:{input.PropertyKey}", input.KeyPath); + } + + return base.UpdateAsync(id, input); + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigTaskService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigTaskService.cs new file mode 100644 index 0000000..4f5239f --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigTaskService.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.ObjectMapping; + +namespace Himp.TaskScheduling +{ + /// + /// 参数配置任务 + /// + public class ParamConfigTaskService : TaskSchedulingAppService, IParamConfigTaskService + { + private IRepository _paramConfigTaskRepository; + private IRepository _paramConfigRepository; + + /// + /// + /// + /// + /// + public ParamConfigTaskService(IRepository paramConfigTaskRepository, IRepository paramConfigRepository) + { + _paramConfigTaskRepository = paramConfigTaskRepository; + _paramConfigRepository = paramConfigRepository; + } + + /// + /// 获取配置参数记录 + /// + /// + public async Task> GetListAsync(ParamConfigTaskInput input) + { + var iQuery = await _paramConfigTaskRepository.GetQueryableAsync(); + iQuery = iQuery.OrderBy(i => i.OperationTime); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Skip((input.Pi - 1) * input.Ps).Take(input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + + /// + /// 创建配置参数任务 + /// + /// + /// + public async Task PostAsync(ParamConfigTaskCreateDto input) + { + var paramConfig = await _paramConfigRepository.GetAsync(p => p.ParamCodg == input.ParamCodg); + + if (string.IsNullOrEmpty(paramConfig.PropertyKey)) + { + throw new UserFriendlyException(message: "配置参数属性Key为空"); + } + + var paramConfigTask = ObjectMapper.Map(input); + paramConfigTask.SetPropertyKey(paramConfig.PropertyKey); + paramConfigTask.TaskContdesc = $"配置参数属性Key:{paramConfig.PropertyKey},值:{input.PropertyValue}"; + paramConfigTask = await _paramConfigTaskRepository.InsertAsync(paramConfigTask); + + var paramConfigTaskDto = ObjectMapper.Map(paramConfigTask); + RedisHelper.SetString(paramConfig.PropertyKey, input.PropertyValue); + + + return paramConfigTaskDto; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigValueService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigValueService.cs new file mode 100644 index 0000000..ed2c12c --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/ParamConfigValueService.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling +{ + /// + /// + /// + public class ParamConfigValueService : TaskSchedulingAppService, IParamConfigValueService + { + private ParamConfigManager _paramConfigManager; + + public ParamConfigValueService(ParamConfigManager paramConfigManager) + { + _paramConfigManager = paramConfigManager; + } + + public async Task> GetListAsync(ParamConfigValueInput input) + { + if (input.Keys == null || input.Keys.Count == 0) + { + return await _paramConfigManager.GetValues(); + } + + return await _paramConfigManager.GetValues(input.Keys); + } + + public async Task> GetKeyListAsync() + { + return await _paramConfigManager.GetKeys(); + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/QsCodeService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/QsCodeService.cs new file mode 100644 index 0000000..c3069a2 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/QsCodeService.cs @@ -0,0 +1,47 @@ +using Himp.RL; +using Himp.TaskScheduling.Configs; +using Himp.TaskScheduling.Datas; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// 获取全水码 + /// + public class QsCodeService : TaskSchedulingAppService, IQsCodeService + { + private readonly QsCodeRepository _qsCodeRepository; + private IRepository _codeConversionRepository; + + public QsCodeService(QsCodeRepository qsCodeRepository + , IRepository codeConversionRepository) + { + _qsCodeRepository = qsCodeRepository; + _codeConversionRepository = codeConversionRepository; + } + + /// + /// + /// + /// + /// + public async Task PostAsync(QsCodeInput input) + { + var code = await _qsCodeRepository.GetCodeAsync(input.Oper, input.Code); + CodeConversion codeConversion = new CodeConversion(); + codeConversion.ConversionTime = DateTime.Now; + codeConversion.ConversionType = 5; + codeConversion.OperName = input.Oper; + codeConversion.SorcCode = input.Code; + codeConversion.TargetCode = code; + await _codeConversionRepository.InsertAsync(codeConversion); + + return code; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/RedisConfigService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/RedisConfigService.cs new file mode 100644 index 0000000..1924925 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/RedisConfigService.cs @@ -0,0 +1,32 @@ +using StackExchange.Redis; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; + +namespace Himp.TaskScheduling +{ + public class RedisConfigService : ITransientDependency + { + //private readonly IConnectionMultiplexer _redis; + + //public RedisConfigService(IConnectionMultiplexer redis) + //{ + // _redis = redis; + //} + + //public async Task SetValueAsync(string key, string value) + //{ + // var db = _redis.GetDatabase(); + // await db.StringSetAsync(key, value); + //} + + //public async Task GetValueAsync(string key) + //{ + // var db = _redis.GetDatabase(); + // return await db.StringGetAsync(key); + //} + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/Workers/ParamConfigWorker.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/Workers/ParamConfigWorker.cs new file mode 100644 index 0000000..98f38dd --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Configs/Workers/ParamConfigWorker.cs @@ -0,0 +1,28 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.BackgroundWorkers; +using Volo.Abp.Threading; + +namespace Himp.TaskScheduling +{ + public class ParamConfigWorker : AsyncPeriodicBackgroundWorkerBase + { + public ParamConfigWorker(AbpAsyncTimer timer + ,IServiceScopeFactory serviceScopeFactory) : base(timer, serviceScopeFactory) + { + Timer.Period = 6000; //10 minutes + } + + protected async override Task DoWorkAsync( + PeriodicBackgroundWorkerContext workerContext) + { + //var obj = RedisHelper.Get("AsRb_Cmd_Code"); + //Logger.LogInformation(obj.ToString()) ; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/AutoSamplingConditionService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/AutoSamplingConditionService.cs new file mode 100644 index 0000000..dcd77fb --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/AutoSamplingConditionService.cs @@ -0,0 +1,47 @@ +using Himp.RL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling.Datas +{ + /// + /// 自动制样条件 + /// + public class AutoSamplingConditionService : TaskSchedulingAppService, IAutoSamplingConditionService + { + private readonly AutoSamplingNotifyRepository _autoSamplingNotifyRepository; + private IRepository _autoSamplingConditionRepository; + + public AutoSamplingConditionService(AutoSamplingNotifyRepository autoSamplingNotifyRepository + , IRepository autoSamplingConditionRepository) + { + _autoSamplingNotifyRepository = autoSamplingNotifyRepository; + _autoSamplingConditionRepository = autoSamplingConditionRepository; + } + + /// + /// + /// + /// + /// + public async Task GetAsync(AutoSamplingConditionInput input) + { + var autoSamplingConditionList = await _autoSamplingConditionRepository.GetListAsync(); + var names = autoSamplingConditionList.Select(s => s.ConditionName).ToList(); + var autoSamplingFlag = await _autoSamplingNotifyRepository.GetAutoSamplingFlagAsync(names, input.Key); + + if (autoSamplingFlag.Item1) + { + return new AutoSamplingConditionDto() { TipCont = $"{autoSamplingFlag.Item2}-{input.Key}-自动制样" }; + } + else + { + return new AutoSamplingConditionDto() { TipCont = $"{autoSamplingFlag.Item2}-{input.Key}-手工制样" }; + } + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/DataReportService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/DataReportService.cs new file mode 100644 index 0000000..132acde --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/DataReportService.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class DataReportService : TaskSchedulingAppService + { + + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/DataStatisticService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/DataStatisticService.cs new file mode 100644 index 0000000..702c48b --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/DataStatisticService.cs @@ -0,0 +1,108 @@ +using Himp.RL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.Datas +{ + /// + /// + /// + public class DataStatisticService : TaskSchedulingAppService, IDataStatisticService + { + private readonly DataStatisticRepository _dataStatisticRepository; + + public DataStatisticService(DataStatisticRepository dataStatisticRepository) + { + _dataStatisticRepository = dataStatisticRepository; + } + + + public async Task> GetAsync() + { + var stas1Cont = await _dataStatisticRepository.GetStas1(); + var stas2Cont = await _dataStatisticRepository.GetStas2(); + var stas3Cont = await _dataStatisticRepository.GetStas3(); + var stas4Cont = await _dataStatisticRepository.GetStas4(); + var stas5Cont = await _dataStatisticRepository.GetStas5(); + var stas61Cont = await _dataStatisticRepository.GetStas6_1(); + var stas62Cont = await _dataStatisticRepository.GetStas6_2(); + var stas63Cont = await _dataStatisticRepository.GetStas6_3(); + var stas64Cont = await _dataStatisticRepository.GetStas6_4(); + var stas8Cont = await _dataStatisticRepository.GetStas8(); + var stas9Cont = await _dataStatisticRepository.GetStas9(); + + List list = new List(); + DataStatisticDto dataStatistic1 = new DataStatisticDto(); + dataStatistic1.Tit = "进厂数量(吨数)"; + dataStatistic1.Type = 1; + dataStatistic1.Cont = (decimal)stas1Cont; + list.Add(dataStatistic1); + + DataStatisticDto dataStatistic2 = new DataStatisticDto(); + dataStatistic2.Tit = "计划入厂数量(吨数)"; + dataStatistic2.Type = 2; + dataStatistic2.Cont = (decimal)stas2Cont; + list.Add(dataStatistic2); + + DataStatisticDto dataStatistic3 = new DataStatisticDto(); + dataStatistic3.Tit = "计划入厂车数"; + dataStatistic3.Type = 3; + dataStatistic3.Cont = (decimal)stas3Cont; + list.Add(dataStatistic3); + + DataStatisticDto dataStatistic4 = new DataStatisticDto(); + dataStatistic4.Tit = "已验收车数"; + dataStatistic4.Type = 4; + dataStatistic4.Cont = (decimal)stas4Cont; + list.Add(dataStatistic4); + + DataStatisticDto dataStatistic5 = new DataStatisticDto(); + dataStatistic5.Tit = "厂内车数"; + dataStatistic5.Type = 5; + dataStatistic5.Cont = (decimal)stas5Cont; + list.Add(dataStatistic5); + + DataStatisticDto dataStatistic61 = new DataStatisticDto(); + dataStatistic61.Tit = "采样机采样次数-1"; + dataStatistic61.Type = 61; + dataStatistic61.Cont = (decimal)stas61Cont; + list.Add(dataStatistic61); + + DataStatisticDto dataStatistic62 = new DataStatisticDto(); + dataStatistic62.Tit = "采样机采样次数-2"; + dataStatistic62.Type = 62; + dataStatistic62.Cont = (decimal)stas62Cont; + list.Add(dataStatistic62); + + DataStatisticDto dataStatistic63 = new DataStatisticDto(); + dataStatistic63.Tit = "采样机采样次数-3"; + dataStatistic63.Type = 63; + dataStatistic63.Cont = (decimal)stas63Cont; + list.Add(dataStatistic63); + + DataStatisticDto dataStatistic64 = new DataStatisticDto(); + dataStatistic64.Tit = "采样机采样次数-4"; + dataStatistic64.Type = 64; + dataStatistic64.Cont = (decimal)stas64Cont; + list.Add(dataStatistic64); + + DataStatisticDto dataStatistic8 = new DataStatisticDto(); + dataStatistic8.Tit = "登记未入厂"; + dataStatistic8.Type = 8; + dataStatistic8.Cont = (decimal)stas8Cont; + list.Add(dataStatistic8); + + DataStatisticDto dataStatistic9 = new DataStatisticDto(); + dataStatistic9.Tit = "登记已出厂"; + dataStatistic9.Type = 9; + dataStatistic9.Cont = (decimal)stas9Cont; + list.Add(dataStatistic9); + + return new PagedResultDto(list.Count, list); + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/DataVService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/DataVService.cs new file mode 100644 index 0000000..4ecce3f --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/DataVService.cs @@ -0,0 +1,86 @@ +using Himp.RL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.Datas +{ + public class DataVService : TaskSchedulingAppService, IDataVService + { + private readonly DataStatisticRepository _dataStatisticRepository; + + public DataVService(DataStatisticRepository dataStatisticRepository) + { + _dataStatisticRepository = dataStatisticRepository; + } + + + public async Task> GetAsync() + { + var stas61Cont = await _dataStatisticRepository.GetStas6_1(); + var stas62Cont = await _dataStatisticRepository.GetStas6_2(); + var stas63Cont = await _dataStatisticRepository.GetStas6_3(); + var stas64Cont = await _dataStatisticRepository.GetStas6_4(); + + var stas11Cont = await _dataStatisticRepository.GetStas11(); + var stas12Cont = await _dataStatisticRepository.GetStas12(); + var stas13Cont = await _dataStatisticRepository.GetStas13(); + var stas14Cont = await _dataStatisticRepository.GetStas14(); + + List list = new List(); + + DataStatisticDto dataStatistic61 = new DataStatisticDto(); + dataStatistic61.Tit = "采样机采样次数-1"; + dataStatistic61.Type = 61; + dataStatistic61.Cont = (decimal)stas61Cont; + list.Add(dataStatistic61); + + DataStatisticDto dataStatistic62 = new DataStatisticDto(); + dataStatistic62.Tit = "采样机采样次数-2"; + dataStatistic62.Type = 62; + dataStatistic62.Cont = (decimal)stas62Cont; + list.Add(dataStatistic62); + + DataStatisticDto dataStatistic63 = new DataStatisticDto(); + dataStatistic63.Tit = "采样机采样次数-3"; + dataStatistic63.Type = 63; + dataStatistic63.Cont = (decimal)stas63Cont; + list.Add(dataStatistic63); + + DataStatisticDto dataStatistic64 = new DataStatisticDto(); + dataStatistic64.Tit = "采样机采样次数-4"; + dataStatistic64.Type = 64; + dataStatistic64.Cont = (decimal)stas64Cont; + list.Add(dataStatistic64); + + DataStatisticDto dataStatistic11 = new DataStatisticDto(); + dataStatistic11.Tit = "#1重磅重量"; + dataStatistic11.Type = 4; + dataStatistic11.Cont = (decimal)stas11Cont; + list.Add(dataStatistic11); + + DataStatisticDto dataStatistic12 = new DataStatisticDto(); + dataStatistic12.Tit = "#2重磅重量"; + dataStatistic12.Type = 4; + dataStatistic12.Cont = (decimal)stas12Cont; + list.Add(dataStatistic12); + + DataStatisticDto dataStatistic13 = new DataStatisticDto(); + dataStatistic13.Tit = "#3重磅重量"; + dataStatistic13.Type = 4; + dataStatistic13.Cont = (decimal)stas13Cont; + list.Add(dataStatistic13); + + DataStatisticDto dataStatistic14 = new DataStatisticDto(); + dataStatistic14.Tit = "#4重磅重量"; + dataStatistic14.Type = 4; + dataStatistic14.Cont = (decimal)stas14Cont; + list.Add(dataStatistic14); + + return new PagedResultDto(list.Count, list); + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/FullWaterCompService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/FullWaterCompService.cs new file mode 100644 index 0000000..0148c98 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/FullWaterCompService.cs @@ -0,0 +1,51 @@ +using AutoMapper.Internal.Mappers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// + /// + public class FullWaterCompService : CrudAppService, IFullWaterCompService + { + private IRepository _FullWaterCompRepository; + + public FullWaterCompService(IRepository FullWaterCompRepository) : base(FullWaterCompRepository) + { + _FullWaterCompRepository = FullWaterCompRepository; + } + + /// + /// 获取消息业务类别 + /// + /// + /// + public override async Task> GetListAsync(FullWaterCompInput input) + { + var iQuery = await _FullWaterCompRepository.GetQueryableAsync(); + + if (input.SkipCount == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.SkipCount, input.MaxResultCount); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/ManualTestingJobRecService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/ManualTestingJobRecService.cs new file mode 100644 index 0000000..82c6b9c --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/ManualTestingJobRecService.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling.Datas +{ + /// + /// + /// + public class ManualTestingJobRecService : TaskSchedulingAppService, IManualTestingJobRecService + { + private readonly IRepository _manualTestingJobRecRepository; + + /// + /// + /// + /// + /// + public ManualTestingJobRecService(IRepository manualTestingJobRecRepository) + { + _manualTestingJobRecRepository = manualTestingJobRecRepository; + } + + /// + /// + /// + /// + public async Task> GetListAsync(ManualTestingJobRecInput input) + { + var iQuery = await _manualTestingJobRecRepository.GetQueryableAsync(); + iQuery = iQuery.WhereIf(input.BegnDate != null, i => i.TestingDate >= input.BegnDate); + iQuery = iQuery.WhereIf(input.EndDate != null, i => i.TestingDate <= input.EndDate); + iQuery = iQuery.OrderByDescending(i => i.TestingDate); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.Pi, input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/SamplePreparationDatavService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/SamplePreparationDatavService.cs new file mode 100644 index 0000000..85ba0a1 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/SamplePreparationDatavService.cs @@ -0,0 +1,61 @@ +using Himp.RL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling.Datas +{ + public class SamplePreparationDatavService : TaskSchedulingAppService, ISamplePreparationDatavService + { + private readonly SamplePreparationRecRepository _samplePreparationRecRepository; + private IRepository _samplePreparationTask; + + public SamplePreparationDatavService(SamplePreparationRecRepository samplePreparationRecRepository + , IRepository samplePreparationTask) + { + _samplePreparationRecRepository = samplePreparationRecRepository; + _samplePreparationTask = samplePreparationTask; + } + + public async Task GetSampleData() + { + var samplePreparationRecList = await _samplePreparationRecRepository.GetAllPersonNamesAsync(); + + SamplePreparationDatavDto samplePreparationDatavDto = new SamplePreparationDatavDto(); + samplePreparationDatavDto.Tar6 = 1250; + samplePreparationDatavDto.Tar3 = 700; + samplePreparationDatavDto.Tar2 = 100; + + var samplePreparationTaskQuery = await _samplePreparationTask.GetQueryableAsync(); + samplePreparationTaskQuery = samplePreparationTaskQuery.Where(s => s.LastOperTime.Date == DateTime.Now.Date); + samplePreparationTaskQuery = samplePreparationTaskQuery.Where(s => s.SampeWay == "自动"); + samplePreparationTaskQuery.OrderBy(s => s.TaskAssgnTime); + var samplePreparationTaskList = samplePreparationTaskQuery.ToList(); + + foreach (var item in samplePreparationTaskList) + { + var w61 = samplePreparationRecList.FirstOrDefault(s => s.SampleID == item.SampleCode && s.SampleType == 1); + var w62 = samplePreparationRecList.FirstOrDefault(s => s.SampleID == item.SampleCode && s.SampleType == 2); + var w31 = samplePreparationRecList.FirstOrDefault(s => s.SampleID == item.SampleCode && s.SampleType == 3); + var w21 = samplePreparationRecList.FirstOrDefault(s => s.SampleID == item.SampleCode && s.SampleType == 4); + var w22 = samplePreparationRecList.FirstOrDefault(s => s.SampleID == item.SampleCode && s.SampleType == 5); + //item.SampleCode + + if (w61 != null || w62 != null || w31 != null || w21 != null || w21 != w22) + { + samplePreparationDatavDto.CurWeight6.Add(new int[] { w61 == null ? 0 : w61.SampleWeight, w62 == null ? 0 : w62.SampleWeight }); + samplePreparationDatavDto.CurWeight3.Add(new int[] { w31 == null ? 0 : w31.SampleWeight }); + samplePreparationDatavDto.CurWeight2.Add(new int[] { w21 == null ? 0 : w21.SampleWeight, w22 == null ? 0 : w22.SampleWeight }); + } + } + + samplePreparationDatavDto.FinishRateCur = samplePreparationRecList.Count; + samplePreparationDatavDto.FinishRateTotal = samplePreparationTaskList.Count * 5; + + return samplePreparationDatavDto; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/SamplingOperRecService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/SamplingOperRecService.cs new file mode 100644 index 0000000..c940768 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/SamplingOperRecService.cs @@ -0,0 +1,56 @@ +using Himp.TaskScheduling.Datas; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// 制样操作记录 + /// + public class SamplingOperRecService : TaskSchedulingAppService + { + private readonly IRepository _samplePreparationTaskRepository; + + /// + /// + /// + /// + /// + public SamplingOperRecService(IRepository samplePreparationTaskRepository) + { + _samplePreparationTaskRepository = samplePreparationTaskRepository; + } + + /// + /// + /// + /// + public async Task> GetListAsync(SamplingOperRecInput input) + { + var iQuery = await _samplePreparationTaskRepository.GetQueryableAsync(); + iQuery = iQuery.Where(i => i.TaskRecptTime.HasValue && i.TaskRecptTime.Value.Date == DateTime.Now.Date); + iQuery = iQuery.OrderByDescending(i => i.TaskRecptTime); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.Pi, input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/ZYOperateRecordService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/ZYOperateRecordService.cs new file mode 100644 index 0000000..185c954 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Datas/ZYOperateRecordService.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling.Datas +{ + /// + /// 制样机系统操作记录 + /// + public class ZYOperateRecordService : TaskSchedulingAppService, IZYOperateRecordService + { + private readonly IRepository _zyOperateRecordRepository; + + /// + /// + /// + /// + /// + public ZYOperateRecordService(IRepository zyOperateRecordRepository) + { + _zyOperateRecordRepository = zyOperateRecordRepository; + } + + /// + /// + /// + /// + public async Task> GetListAsync(ZYOperateRecordInput input) + { + var iQuery = await _zyOperateRecordRepository.GetQueryableAsync(); + iQuery = iQuery.WhereIf(input.BegnTime.HasValue, i => i.DateTime.Date >= input.BegnTime.Value.Date); + iQuery = iQuery.WhereIf(input.EndTime.HasValue, i => i.DateTime.Date <= input.EndTime.Value.Date); + iQuery = iQuery.OrderByDescending(i => i.DateTime); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.Pi, input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Msgs/EventMsgRecService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Msgs/EventMsgRecService.cs new file mode 100644 index 0000000..9c0ad9d --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Msgs/EventMsgRecService.cs @@ -0,0 +1,76 @@ +using Himp.TaskScheduling; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.ObjectMapping; + +namespace Himp.TaskScheduling +{ + /// + /// 事件消息接收 + /// + public class EventMsgRecService : TaskSchedulingAppService, IEventMsgRecService + { + private readonly IRepository _msgSendRecRepository; + + /// + /// + /// + /// + /// + public EventMsgRecService(IRepository msgSendRecRepository) + { + _msgSendRecRepository = msgSendRecRepository; + } + + /// + /// 获取消息发送记录 + /// + /// + public async Task> GetListAsync(EventMsgRecInput input) + { + if (input.TopicFullPath == null) + { + input.TopicFullPath = []; + } + + var iQuery = await _msgSendRecRepository.GetQueryableAsync(); + iQuery = iQuery.Where( i => input.TopicFullPath.Contains(i.TopicFullPath)); + iQuery = iQuery.OrderByDescending(i => i.CreationTime); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.Pi, input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + + /// + /// + /// + /// + /// + public async Task PostAsync(EventMsgRecCreateDto input) + { + var eventMsgRecvRec = ObjectMapper.Map(input); + eventMsgRecvRec = await _msgSendRecRepository.InsertAsync(eventMsgRecvRec); + var itemDto = ObjectMapper.Map(eventMsgRecvRec); + + return itemDto; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Msgs/EventMsgTopicService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Msgs/EventMsgTopicService.cs new file mode 100644 index 0000000..9112da7 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Msgs/EventMsgTopicService.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// 事件消息主题 + /// + public class EventMsgTopicService : CrudAppService, IEventMsgTopicService + { + private IRepository _eventMsgTopicRepository; + + public EventMsgTopicService(IRepository eventMsgTopicRepository) : base(eventMsgTopicRepository) + { + _eventMsgTopicRepository = eventMsgTopicRepository; + } + + /// + /// 获取消息业务类别 + /// + /// + /// + public override async Task> GetListAsync(EventMsgTopicInput input) + { + var iQuery = await _eventMsgTopicRepository.GetQueryableAsync(); + + if (input.SkipCount == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.SkipCount, input.MaxResultCount); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/CmDeviceControlService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/CmDeviceControlService.cs new file mode 100644 index 0000000..d7275a3 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/CmDeviceControlService.cs @@ -0,0 +1,41 @@ +using Himp.TaskScheduling.Tasks; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// 设备启停控制 + /// + public class CmDeviceControlService : TaskSchedulingAppService, ICmDeviceControlService + { + private IRepository _cmDeviceControlRepository; + + public CmDeviceControlService(IRepository cmDeviceControlRepository) + { + _cmDeviceControlRepository = cmDeviceControlRepository; + } + + public async Task GetAsync(int id) + { + var cmDeviceControl = await _cmDeviceControlRepository.GetAsync(id); + var itemDto = ObjectMapper.Map(cmDeviceControl); + + return itemDto; + } + + public async Task PutAsync(int id, CmDeviceControlUpdateDto input) + { + var cmDeviceControl = await _cmDeviceControlRepository.GetAsync(id); + cmDeviceControl.ENABLE = input.Enable; + cmDeviceControl = await _cmDeviceControlRepository.UpdateAsync(cmDeviceControl); + var itemDto = ObjectMapper.Map(cmDeviceControl); + + return itemDto; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/ManualSamplingTaskService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/ManualSamplingTaskService.cs new file mode 100644 index 0000000..98548a4 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/ManualSamplingTaskService.cs @@ -0,0 +1,44 @@ +using NRules.Fluent.Dsl; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling.Tasks +{ + /// + /// 手工取样任务 + /// + public class ManualSamplingTaskService : TaskSchedulingAppService, IManualSamplingTaskService + { + private IRepository _sampleTestTaskRepository; + + public ManualSamplingTaskService(IRepository sampleTestTaskRepository) + { + _sampleTestTaskRepository = sampleTestTaskRepository; + } + + /// + /// + /// + /// + /// + public async Task PostAsync(ManualSamplingTaskCreateDto input) + { + SampleTestTask sampleTestTask = new SampleTestTask(input.SampleCode + , input.TestCode + , input.BottomCode + , input.Sampletype + , 2 + , input.TestItems + , 1); + + sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + var itemDto = ObjectMapper.Map(sampleTestTask); + + return itemDto; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SampleDiscardedTaskService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SampleDiscardedTaskService.cs new file mode 100644 index 0000000..5ce15cf --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SampleDiscardedTaskService.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.ObjectMapping; + +namespace Himp.TaskScheduling +{ + /// + /// 弃样服务 + /// + public class SampleDiscardedTaskService : TaskSchedulingAppService, ISampleDiscardedTaskService + { + private IRepository _sampleTestTaskRepository; + + public SampleDiscardedTaskService( IRepository sampleTestTaskRepository) + { + _sampleTestTaskRepository = sampleTestTaskRepository; + } + + /// + /// 弃样 + /// + /// + /// + public async Task Post(SampleDiscardedTaskCreateDto input) + { + SampleTestTask sampleTestTask = new SampleTestTask(); + sampleTestTask.SampleCode = "-"; + sampleTestTask.TestCode = "-"; + sampleTestTask.BottomCode = input.BottomCode; + sampleTestTask.SampleType = "41"; + sampleTestTask.TestCnt = 0; + sampleTestTask.TaskAssgnTime = DateTime.Now; + sampleTestTask.LastOperTime = DateTime.Now; + sampleTestTask.TestItems = ""; + sampleTestTask.ExecStas = "就绪"; + sampleTestTask.ManualFlag = input.ManualFlag; + sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + var itemDto = ObjectMapper.Map(sampleTestTask); + + return itemDto; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SampleObtainTaskService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SampleObtainTaskService.cs new file mode 100644 index 0000000..c986010 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SampleObtainTaskService.cs @@ -0,0 +1,205 @@ +using AutoMapper.Internal.Mappers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// 煤样取样任务 + /// + public class SampleObtainTaskService : TaskSchedulingAppService, ISampleObtainTaskService + { + private IRepository _sampleTestTaskRepository; + + public SampleObtainTaskService(IRepository sampleTestTaskRepository) + { + _sampleTestTaskRepository = sampleTestTaskRepository; + } + + /// + /// + /// + /// + /// + public async Task> GetListAsync(SampleTestTaskInput input) + { + var iQuery = await _sampleTestTaskRepository.GetQueryableAsync(); + iQuery = iQuery.WhereIf(!string.IsNullOrEmpty(input.SampleCode) && !string.IsNullOrEmpty(input.SampleType), + i => i.SampleCode == input.SampleCode && i.SampleType == input.SampleType); + iQuery = iQuery.Where(i => i.ManualFlag == 1); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.Pi, input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + + /// + /// 下发取样化验任务 + /// + /// + /// + public async Task PostAsync(SampleObtainTaskCreateDto input) + { + #region 20240921 + + //SampleTestTask sampleTestTask = new SampleTestTask("C092001" + // , "T092001Z" + // , "2024092008350122" + // , "3" + // , 2 + // , "Mad,A" + // , 1); + + //SampleTestTask sampleTestTask = new SampleTestTask("C092008" + // , "T092008Z" + // , "2024092013080122" + // , "3" + // , 2 + // , "Mad,A" + // , 1); + + //SampleTestTask sampleTestTask = new SampleTestTask("C092003" + // , "T092003Z" + // , "2024092009440122" + // , "3" + // , 2 + // , "Mad,A" + // , 1); + + //SampleTestTask sampleTestTask = new SampleTestTask("C092009" + // , "T092009Z" + // , "2024092014240122" + // , "3" + // , 2 + // , "Mad,A" + // , 1); + + //SampleTestTask sampleTestTask = new SampleTestTask("C092005" + // , "T092005Z" + // , "2024092010510122" + // , "3" + // , 2 + // , "Mad,A" + // , 1); + + #endregion + + #region 20240922 + + //SampleTestTask sampleTestTask = new SampleTestTask("C092412" + // , "T092412Z" + // , "2024092314580122" + // , "3" + // , 2 + // , "Mad,A" + // , 1); + + //sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + + //sampleTestTask = new SampleTestTask("C092410" + // , "T092410Z" + // , "2024092313420122" + // , "3" + // , 2 + // , "Mad,A" + // , 1); + //sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + + //sampleTestTask = new SampleTestTask("C092408" + // , "T092408Z" + // , "2024092312290122" + // , "3" + // , 2 + // , "Mad,A" + // , 1); + //sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + + //sampleTestTask = new SampleTestTask("C092407" + // , "T092407Z" + // , "2024092311490122" + // , "3" + // , 2 + // , "Mad,A" + // , 1); + //sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + + //sampleTestTask = new SampleTestTask("C092402" + // , "T092402Z" + // , "2024092308570122" + // , "3" + // , 2 + // , "Mad,A" + // , 1); + + #endregion + + #region 20240926 + + SampleTestTask sampleTestTask = new SampleTestTask("C092612" + , "T092612Z" + , "2024092514460122" + , "3" + , 2 + , "Mad,A" + , 1); + + sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + + sampleTestTask = new SampleTestTask("C092610" + , "T092610Z" + , "2024092513340122" + , "3" + , 2 + , "Mad,A" + , 1); + sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + + sampleTestTask = new SampleTestTask("C092608" + , "T092608Z" + , "2024092512120122" + , "3" + , 2 + , "Mad,A" + , 1); + sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + + sampleTestTask = new SampleTestTask("C092607" + , "T092607Z" + , "2024092511400122" + , "3" + , 2 + , "Mad,A" + , 1); + sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + + sampleTestTask = new SampleTestTask("C092602" + , "T092602Z" + , "2024092508510122" + , "3" + , 2 + , "Mad,A" + , 1); + + #endregion + + sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SamplePreparationResultService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SamplePreparationResultService.cs new file mode 100644 index 0000000..0d04748 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SamplePreparationResultService.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// 制样结果服务 + /// + public class SamplePreparationResultService : TaskSchedulingAppService, ISamplePreparationResultService + { + private readonly IRepository _samplePreparationResultRepository; + + public SamplePreparationResultService(IRepository samplePreparationResultRepository) + { + _samplePreparationResultRepository = samplePreparationResultRepository; + } + + /// + /// + /// + /// + /// + public async Task> GetListAsync(SamplePreparationResultInput input) + { + var iQuery = await _samplePreparationResultRepository.GetQueryableAsync(); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.Pi, input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SamplePreparationTaskService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SamplePreparationTaskService.cs new file mode 100644 index 0000000..e164370 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SamplePreparationTaskService.cs @@ -0,0 +1,138 @@ +using NRules.Fluent.Dsl; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.ObjectMapping; + +namespace Himp.TaskScheduling +{ + /// + /// 制样任务 + /// + public class SamplePreparationTaskService : TaskSchedulingAppService, ISamplePreparationTaskService + { + private IRepository _samplePreparationTaskRepository; + private IRepository _samplePreparationPlanRepository; + private IRepository _codeConversionRepository; + + public SamplePreparationTaskService(IRepository samplePreparationTaskRepository + ,IRepository samplePreparationPlanRepository + ,IRepository codeConversionRepository) + { + _samplePreparationTaskRepository = samplePreparationTaskRepository; + _samplePreparationPlanRepository = samplePreparationPlanRepository; + _codeConversionRepository = codeConversionRepository; + } + + /// + /// 获取制样任务 + /// + /// + /// + public async Task> GetListAsync(SamplePreparationTaskInput input) + { + var iQuery = await _samplePreparationTaskRepository.GetQueryableAsync(); + iQuery = iQuery.WhereIf(input.Begntime != null, s => s.TaskAssgnTime >= input.Begntime); + iQuery = iQuery.WhereIf(input.Endtime != null, s => s.TaskAssgnTime <= input.Endtime.Value.AddDays(1)); + iQuery = iQuery.WhereIf(!string.IsNullOrEmpty(input.ExecStas), s => s.ExecStas == input.ExecStas); + iQuery = iQuery.OrderByDescending(i => i.LastOperTime); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.Pi, input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + + /// + /// 创建制样任务 + /// + /// + /// + public async Task PostAsync(SamplePreparationTaskCreateOrUpdateDto input) + { + var iQuery = await _samplePreparationTaskRepository.GetQueryableAsync(); + var existSamplePreparationTask = iQuery.FirstOrDefault(i => i.Id == input.Id); + + CodeConversion codeConversion = new CodeConversion(); + codeConversion.SorcCode = input.Id; + codeConversion.TargetCode = input.SampleCode; + codeConversion.ConversionType = 4; + codeConversion.ConversionTime = DateTime.Now; + codeConversion.OperName = "-"; + await _codeConversionRepository.InsertAsync(codeConversion); + + if (existSamplePreparationTask != null) + { + existSamplePreparationTask.SampleCode = input.SampleCode; + existSamplePreparationTask.LastOperTime = DateTime.Now; + existSamplePreparationTask = await _samplePreparationTaskRepository.UpdateAsync(existSamplePreparationTask); + var itemDto = ObjectMapper.Map(existSamplePreparationTask); + + return itemDto; + } + else + { + SamplePreparationTask samplePreparationTask = new SamplePreparationTask(input.Id, input.SampleCode); + samplePreparationTask = await _samplePreparationTaskRepository.InsertAsync(samplePreparationTask); + var itemDto = ObjectMapper.Map(samplePreparationTask); + + return itemDto; + } + } + + /// + /// 重新下发制样任务 + /// + /// + /// + /// + public async Task PutAsync(string id, SamplePreparationTaskCreateOrUpdateDto input) + { + if (id == input.Id) + { + var samplePreparationTask = await _samplePreparationTaskRepository.GetAsync(id); + samplePreparationTask.ReSet(input.SampleCode); + samplePreparationTask = await _samplePreparationTaskRepository.UpdateAsync(samplePreparationTask); + var itemDto = ObjectMapper.Map(samplePreparationTask); + return itemDto; + } + else + { + SamplePreparationTask samplePreparationTask = new SamplePreparationTask(input.Id, input.SampleCode); + samplePreparationTask = await _samplePreparationTaskRepository.InsertAsync(samplePreparationTask); + var itemDto = ObjectMapper.Map(samplePreparationTask); + return itemDto; + } + + } + + /// + /// + /// + /// + /// + public async Task> GetPlanListAsync(string samplePreparationTaskId) + { + var iQuery = await _samplePreparationPlanRepository.GetQueryableAsync(); + iQuery = iQuery.Where(i => i.Id == samplePreparationTaskId); + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return itemsDto; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SampleTestTaskService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SampleTestTaskService.cs new file mode 100644 index 0000000..352ac54 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/SampleTestTaskService.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Runtime.Intrinsics.Arm; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// 煤样化验任务 + /// + public class SampleTestTaskService : TaskSchedulingAppService, ISampleTestTaskService + { + private IRepository _sampleTestTaskRepository; + + public SampleTestTaskService(IRepository sampleTestTaskRepository) + { + _sampleTestTaskRepository = sampleTestTaskRepository; + } + + /// + /// + /// + /// + /// + public async Task> GetListAsync(SampleTestTaskInput input) + { + var iQuery = await _sampleTestTaskRepository.GetQueryableAsync(); + iQuery = iQuery.WhereIf(!string.IsNullOrEmpty(input.SampleCode) && !string.IsNullOrEmpty(input.SampleType), + i => i.SampleCode == input.SampleCode && i.SampleType == input.SampleType); + iQuery = iQuery.Where(i => i.ManualFlag == 0); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.Pi, input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/StandardTestTaskService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/StandardTestTaskService.cs new file mode 100644 index 0000000..d4b3044 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Tasks/StandardTestTaskService.cs @@ -0,0 +1,148 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Runtime.Intrinsics.Arm; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// 标准化验任务 + /// + public class StandardTestTaskService : TaskSchedulingAppService, IStandardTestTaskService + { + private IRepository _standardTestTaskRepository; + private IRepository _standardTestItemRepository; + private IRepository _sampleTestTaskRepository; + + public StandardTestTaskService(IRepository standardTestTaskRepository + , IRepository standardTestItemRepository + , IRepository sampleTestTaskRepository) + { + _standardTestTaskRepository = standardTestTaskRepository; + _standardTestItemRepository = standardTestItemRepository; + _sampleTestTaskRepository = sampleTestTaskRepository; + } + + /// + /// + /// + /// + /// + public async Task> GetListAsync(StandardTestTaskInput input) + { + var iQuery = await _standardTestTaskRepository.GetQueryableAsync(); + iQuery = iQuery.WhereIf(input.Begntime != null, i => i.TaskAssgnTime >= input.Begntime); + iQuery = iQuery.WhereIf(input.Endtime != null, i => i.TaskAssgnTime <= input.Endtime.Value.AddDays(1)); + iQuery = iQuery.OrderByDescending(i => i.LastOperTime); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.Pi, input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + + /// + /// 审核 + /// + /// + /// + public async Task PostAuditAsync(StandardTestTaskAuditDto input) + { + var standardTestTaskList = await _standardTestTaskRepository.GetListAsync( + i => input.StandardTestTaskId != null && input.StandardTestTaskId.Contains(i.Id) + && i.ExecStas =="未就绪" ); + var standardTestItems = await _standardTestItemRepository.GetListAsync(i => i.ValiFlag); + + foreach (var item in standardTestTaskList) + { + var testItems = ""; + var standardTest = standardTestItems.FirstOrDefault(s => s.SampleType == item.Sampletype); + + if (standardTest != null) + { + testItems = standardTest.TestItems; + } + + SampleTestTask sampleTestTask = new SampleTestTask(item.SampleCode + , item.TestCode + , item.BottomCode + , item.Sampletype + , 2 + , testItems + , 0); + + item.ExecStas = "已审核"; + item.Auditor = input.Aduitor; + item.AuditTime = DateTime.Now; + sampleTestTask = await _sampleTestTaskRepository.InsertAsync(sampleTestTask); + } + } + + /// + /// 重新发送 + /// + /// + /// + public async Task ReSendAsync(long id) + { + var standardTestTask = await _standardTestTaskRepository.GetAsync(id); + var standardTestItems = await _standardTestItemRepository.GetListAsync(i => i.ValiFlag); + + var testItems = ""; + var standardTest = standardTestItems.FirstOrDefault(s => s.SampleType == standardTestTask.Sampletype); + + if (standardTest != null) + { + testItems = standardTest.TestItems; + } + + SampleTestTask sampleTestTask = new SampleTestTask(standardTestTask.SampleCode + , standardTestTask.TestCode + , standardTestTask.BottomCode + , standardTestTask.Sampletype + , 2 + , testItems + , 0); + } + + /// + /// + /// + /// + /// + public async Task> GetItemListAsync() + { + var iQuery = await _standardTestItemRepository.GetQueryableAsync(); + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return itemsDto; + } + + /// + /// + /// + /// + /// + /// + public async Task PutItemValiAsync(long id, bool valiFlag) + { + var item = await _standardTestItemRepository.GetAsync(id); + item.ValiFlag = valiFlag; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Jobs/WorkflowJob.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Jobs/WorkflowJob.cs new file mode 100644 index 0000000..51b4973 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Jobs/WorkflowJob.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.BackgroundJobs; +using Volo.Abp.DependencyInjection; + +namespace Himp.TaskScheduling +{ + public class WorkflowJob : AsyncBackgroundJob, ITransientDependency + { + public WorkflowJob() + { + + } + + public override async Task ExecuteAsync(WorkflowArgs args) + { + while (true) + { + await Task.Delay(500); + Console.WriteLine(DateTime.Now.ToString("HH:mm:ss:ff")); + } + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Jobs/WorkflowJobService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Jobs/WorkflowJobService.cs new file mode 100644 index 0000000..2e7a406 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Jobs/WorkflowJobService.cs @@ -0,0 +1,38 @@ +using AutoMapper.Internal.Mappers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Mail; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.BackgroundJobs; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + public class WorkflowJobService : ISingletonDependency + { + private readonly IBackgroundJobManager _backgroundJobManager; + private IRepository _paramConfigRepository; + + public WorkflowJobService(IBackgroundJobManager backgroundJobManager + , IRepository paramConfigRepository) + { + _backgroundJobManager = backgroundJobManager; + _paramConfigRepository = paramConfigRepository; + } + + public async Task InitData() + { + var paramConfigList = await _paramConfigRepository.GetListAsync(); + + await _backgroundJobManager.EnqueueAsync( + new WorkflowArgs + { + ParamConfigs = new List() + } + ); + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/BizflowConfigService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/BizflowConfigService.cs new file mode 100644 index 0000000..f1de122 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/BizflowConfigService.cs @@ -0,0 +1,97 @@ +using AutoMapper.Internal.Mappers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// 业务流配置 + /// + public class BizflowConfigService : CrudAppService, IBizflowConfigService + { + private IRepository _bizflowConfigRepository; + + /// + /// + /// + /// + public BizflowConfigService(IRepository bizflowConfigRepository) : base(bizflowConfigRepository) + { + _bizflowConfigRepository = bizflowConfigRepository; + } + + /// + /// + /// + /// + /// + public override async Task> GetListAsync(BizflowConfigInput input) + { + var iQuery = await _bizflowConfigRepository.GetQueryableAsync(); + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.Pi, input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + + /// + /// + /// + /// + /// + public override async Task GetAsync(Guid id) + { + var processType = await _bizflowConfigRepository.GetAsync(id); + var itemDto = ObjectMapper.Map(processType); + + return itemDto; + } + + /// + /// + /// + /// + /// + public override async Task CreateAsync(BizflowConfigCreateDto input) + { + BizflowConfig processType = ObjectMapper.Map(input); + processType = await _bizflowConfigRepository.InsertAsync(processType); + var itemDto = ObjectMapper.Map(processType); + + return itemDto; + } + + /// + /// + /// + /// + /// + /// + public override async Task UpdateAsync(Guid id, BizflowConfigUpdateDto input) + { + var processType = await _bizflowConfigRepository.GetAsync(id); + processType = ObjectMapper.Map(input, processType); + var itemDto = ObjectMapper.Map(processType); + + return itemDto; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/BizflowNodeService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/BizflowNodeService.cs new file mode 100644 index 0000000..69fe217 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/BizflowNodeService.cs @@ -0,0 +1,101 @@ +using AutoMapper.Internal.Mappers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Repositories; + +namespace Himp.TaskScheduling +{ + /// + /// 业务流节点服务 + /// + public class BizflowNodeService : CrudAppService, IBizflowNodeService + { + private IRepository _bizflowNodeRepository; + private IRepository _bizflowConfigRepository; + + public BizflowNodeService(IRepository bizflowNodeRepository, IRepository bizflowConfigRepository) : base(bizflowNodeRepository) + { + _bizflowNodeRepository = bizflowNodeRepository; + _bizflowConfigRepository = bizflowConfigRepository; + } + + /// + /// 获取业务流节点 + /// + /// + /// + public override async Task> GetListAsync(BizflowNodeInput input) + { + var iQuery = await _bizflowNodeRepository.GetQueryableAsync(); + + if (!string.IsNullOrEmpty(input.BizflowCode)) + { + var bizflowConfig = await _bizflowConfigRepository.GetAsync(b => b.BizflowCode == input.BizflowCode); + iQuery = iQuery.Where(i => i.BizflowConfigId == bizflowConfig.Id); + } + + if (input.Pi == 0) + { + var itemsDto = ObjectMapper.Map, List>(iQuery.ToList()); + + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = iQuery.Count(); + var items = iQuery.Page(input.Pi, input.Ps); + var itemsDto = ObjectMapper.Map, List>(items.ToList()); + + return new PagedResultDto(totalCount, itemsDto); + } + } + + /// + /// + /// + /// + /// + public override async Task CreateAsync(BizflowNodeCreateDto input) + { + BizflowNode processType = ObjectMapper.Map(input); + processType = await _bizflowNodeRepository.InsertAsync(processType); + var itemDto = ObjectMapper.Map(processType); + + return itemDto; + } + + /// + /// + /// + /// + /// + public override async Task GetAsync(Guid id) + { + var processType = await _bizflowNodeRepository.GetAsync(id); + var itemDto = ObjectMapper.Map(processType); + + return itemDto; + } + + /// + /// + /// + /// + /// + /// + public override async Task UpdateAsync(Guid id, BizflowNodeUpdateDto input) + { + var processType = await _bizflowNodeRepository.GetAsync(id); + processType = ObjectMapper.Map(input, processType); + var itemDto = ObjectMapper.Map(processType); + + return itemDto; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/WorkflowDefinitionService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/WorkflowDefinitionService.cs new file mode 100644 index 0000000..4812a05 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/WorkflowDefinitionService.cs @@ -0,0 +1,91 @@ +using Himp.TaskScheduling; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.ObjectMapping; + +namespace Himp.Workflows +{ + /// + /// 流程定义服务 + /// + public class WorkflowDefinitionService : TaskSchedulingAppService, IWorkflowDefinitionService + { + private ActiviWorkflowManager _workflowManager; + + /// + /// + /// + /// + public WorkflowDefinitionService(ActiviWorkflowManager workflowManager) + { + _workflowManager = workflowManager; + } + + /// + /// + /// + /// + /// + public async Task> GetListAsync(ProcessDefinitionInput input) + { + var list = await _workflowManager.GetWorkflowModel(input.Status); + var itemsDto = ObjectMapper.Map, List>(list); + + if (input.Pi == 0) + { + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = itemsDto.Count(); + var pagedItems = itemsDto.Skip((input.Pi - 1) * input.Ps).Take(input.Ps); + + return new PagedResultDto(totalCount, pagedItems.ToList()); + } + } + + /// + /// 部署 + /// + /// + /// + public async Task PostDeployAsync(WorkflowDeployDto input) + { + var stas = await _workflowManager.DeployWorkflowModel(input.Id, input.WorkflowName); + var itemDto = ObjectMapper.Map(stas); + + return itemDto; + } + + /// + /// 激活/挂起 + /// + /// + /// + public async Task PostActivateAsync(WorkflowActivateDto input) + { + var stas = await _workflowManager.ActivateWorkflowModel(input.DeploymentKey); + var itemDto = ObjectMapper.Map(stas); + + return itemDto; + } + + /// + /// + /// + /// + /// + public async Task DeleteAsync(string id) + { + var stas = await _workflowManager.DeleteWorkflowModel(id); + var itemDto = ObjectMapper.Map(stas); + + return itemDto; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/WorkflowInstanceService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/WorkflowInstanceService.cs new file mode 100644 index 0000000..82908d3 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/WorkflowInstanceService.cs @@ -0,0 +1,104 @@ +using Himp.TaskScheduling; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.ObjectMapping; + +namespace Himp.TaskScheduling +{ + /// + /// 实例服务 + /// + public class WorkflowInstanceService : TaskSchedulingAppService, IWorkflowInstanceService + { + private ActiviWorkflowManager _workflowManager; + private IRepository _bizflowConfigRepository; + + public WorkflowInstanceService(ActiviWorkflowManager workflowManager, + IRepository bizflowConfigRepository) + { + _workflowManager = workflowManager; + _bizflowConfigRepository = bizflowConfigRepository; + } + + /// + /// + /// + /// + /// + public async Task> GetListAsync(WorkflowInstanceInput input) + { + string begntime = ""; + string endtime = ""; + + if (!input.Begntime.HasValue) + { + begntime = DateTime.Now.Date.ToString("yyyy-MM-dd HH:mm:ss"); + } + else + { + begntime = input.Begntime.Value.ToString("yyyy-MM-dd HH:mm:ss"); + } + + if (!input.Endtime.HasValue) + { + endtime = DateTime.Now.Date.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss"); + } + else + { + endtime = input.Endtime.Value.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss"); + } + + var list = await _workflowManager.GetProcessInstance(begntime, endtime, input.Status); + var itemsDto = ObjectMapper.Map, List>(list); + + if (input.Pi == 0) + { + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = itemsDto.Count(); + var pagedItems = itemsDto.Skip((input.Pi - 1) * input.Ps).Take(input.Ps); + + return new PagedResultDto(totalCount, pagedItems.ToList()); + } + } + + /// + /// 启动流程 + /// + /// + public async Task PostAsync(WorkflowInstanceCreateDto input) + { + string userId = string.IsNullOrEmpty(input.UserId) ? "admin" : input.UserId; + string bizFlowCode = input.BizFlowCode; //业务流程代码 + var bizflowConfigList = await _bizflowConfigRepository.GetListAsync(w => w.BizflowCode == bizFlowCode); + var bizflow = bizflowConfigList.FirstOrDefault(); + string workflowModelKey = bizflow.WorkflowModelKey; + var bizPars = input.BizPars; + var res = await _workflowManager.StartWorkflowInstance(workflowModelKey, input.AssocUsers, userId, bizPars); + var itemDto = ObjectMapper.Map(res); + + return itemDto; + } + + /// + /// 执行流程 + /// + /// + public async Task PutAsync(WorkflowInstanceExecDto input) + { + string processInstanceId = input.ProcessInstanceId; + string userId = string.IsNullOrEmpty(input.UserId) ? "admin" : input.UserId; + var res = await _workflowManager.ExecWorkflowInstance(processInstanceId, userId, input.BizPars); + var itemDto = ObjectMapper.Map(res); + + return itemDto; + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/WorkflowTodoTaskService.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/WorkflowTodoTaskService.cs new file mode 100644 index 0000000..8c8fabf --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Services/WorkflowTodoTaskService.cs @@ -0,0 +1,41 @@ +using Himp.TaskScheduling; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Himp.Workflows +{ + /// + /// 流程待办任务 + /// + public class WorkflowTodoTaskService : TaskSchedulingAppService, IWorkflowTodoTaskService + { + private ActiviWorkflowManager _workflowManager; + + public WorkflowTodoTaskService(ActiviWorkflowManager workflowManager) + { + _workflowManager = workflowManager; + } + + public async Task> GetListAsync(WorkflowTodoTaskInput input) + { + var list = await _workflowManager.GetTodoTask(input.UserId); + var itemsDto = ObjectMapper.Map, List>(list); + + if (input.Pi == 0) + { + return new PagedResultDto(itemsDto.Count, itemsDto); + } + else + { + var totalCount = itemsDto.Count(); + var pagedItems = itemsDto.Skip((input.Pi - 1) * input.Ps).Take(input.Ps); + + return new PagedResultDto(totalCount, pagedItems.ToList()); + } + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Workers/RedisConvertMqttWorker.cs b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Workers/RedisConvertMqttWorker.cs new file mode 100644 index 0000000..07360db --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Himp/TaskScheduling/Workflows/Workers/RedisConvertMqttWorker.cs @@ -0,0 +1,38 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.BackgroundWorkers; +using Volo.Abp.Threading; + +namespace Himp.TaskScheduling +{ + public class RedisConvertMqttWorker : AsyncPeriodicBackgroundWorkerBase + { + public RedisConvertMqttWorker( + AbpAsyncTimer timer, + IServiceScopeFactory serviceScopeFactory + ) : base( + timer, + serviceScopeFactory) + { + Timer.Period = 6000; //10 minutes + } + + protected async override Task DoWorkAsync( + PeriodicBackgroundWorkerContext workerContext) + { + Logger.LogInformation("Starting: Setting status of inactive users..."); + + + var a = await RedisHelper.GetString("bb"); + Logger.LogInformation($"{a}"); + await MqttClientHelper.PublishStringAsync("aa/aa", a); + + Logger.LogInformation("Completed: Setting status of inactive users..."); + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Samples/RuleEngine.cs b/src/Himp.TaskScheduling.Application/Samples/RuleEngine.cs new file mode 100644 index 0000000..958648f --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Samples/RuleEngine.cs @@ -0,0 +1,43 @@ +using NRules.Fluent; +using NRules; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class RuleEngine + { + private readonly ISessionFactory _sessionFactory; + + public RuleEngine() + { + var repository = new RuleRepository(); + repository.Load(x => x.From(typeof(SampleRule).Assembly)); + _sessionFactory = repository.Compile(); + } + + public void Execute(IEnumerable facts) + { + var session = _sessionFactory.CreateSession(); + foreach (var fact in facts) + { + session.Insert(fact); + } + + session.Fire(); + + //using (var session = _sessionFactory.CreateSession()) + //{ + // foreach (var fact in facts) + // { + // session.Insert(fact); + // } + + // session.Fire(); + //} + } + } +} diff --git a/src/Himp.TaskScheduling.Application/Samples/SampleAppService.cs b/src/Himp.TaskScheduling.Application/Samples/SampleAppService.cs new file mode 100644 index 0000000..220a928 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Samples/SampleAppService.cs @@ -0,0 +1,57 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using NRules.Fluent; +using NRules.RuleModel; +using NRules; +using System.Collections.Generic; +using Volo.Abp.BackgroundJobs; +using System.Net.Mail; + +namespace Himp.TaskScheduling.Samples; + +public class SampleAppService : TaskSchedulingAppService, ISampleAppService +{ + private readonly IBackgroundJobManager _backgroundJobManager; + + public SampleAppService(IBackgroundJobManager backgroundJobManager) + { + _backgroundJobManager = backgroundJobManager; + } + + public async Task GetAsync() + { + // await _backgroundJobManager.EnqueueAsync( + // new WorkflowArgs + // { + // Key = "1" + // } + //); + + //var ruleEngine = new RuleEngine(); + + //var facts = new List + //{ + // "TestInput", + // "AnotherInput", + // "TestInput111", + //}; + + //ruleEngine.Execute(facts); + + return new SampleDto + { + Value = 42 + }; + } + + [Authorize] + public Task GetAuthorizedAsync() + { + return Task.FromResult( + new SampleDto + { + Value = 42 + } + ); + } +} diff --git a/src/Himp.TaskScheduling.Application/Samples/SampleRule.cs b/src/Himp.TaskScheduling.Application/Samples/SampleRule.cs new file mode 100644 index 0000000..a26f706 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/Samples/SampleRule.cs @@ -0,0 +1,23 @@ +using NRules.Fluent.Dsl; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class SampleRule : Rule + { + public override void Define() + { + string input = null; + + When() + .Match(() => input, s => s.StartsWith("Test")); + + Then() + .Do(ctx => Console.WriteLine($"Rule matched with input: {input} :{ctx}")); + } + } +} diff --git a/src/Himp.TaskScheduling.Application/SamplingOperRecDto.cs b/src/Himp.TaskScheduling.Application/SamplingOperRecDto.cs new file mode 100644 index 0000000..e77e3f5 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/SamplingOperRecDto.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling.Datas +{ + public class SamplingOperRecDto + { + public DateTime Time { get; set; } + + public string EqpName { get; set; } + + public string OperDescr { get; set; } + + public string OperName { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Application/TaskSchedulingAppService.cs b/src/Himp.TaskScheduling.Application/TaskSchedulingAppService.cs new file mode 100644 index 0000000..6e5260c --- /dev/null +++ b/src/Himp.TaskScheduling.Application/TaskSchedulingAppService.cs @@ -0,0 +1,13 @@ +using Himp.TaskScheduling.Localization; +using Volo.Abp.Application.Services; + +namespace Himp.TaskScheduling; + +public abstract class TaskSchedulingAppService : ApplicationService +{ + protected TaskSchedulingAppService() + { + LocalizationResource = typeof(TaskSchedulingResource); + ObjectMapperContext = typeof(TaskSchedulingApplicationModule); + } +} diff --git a/src/Himp.TaskScheduling.Application/TaskSchedulingApplicationAutoMapperProfile.cs b/src/Himp.TaskScheduling.Application/TaskSchedulingApplicationAutoMapperProfile.cs new file mode 100644 index 0000000..d4f37c7 --- /dev/null +++ b/src/Himp.TaskScheduling.Application/TaskSchedulingApplicationAutoMapperProfile.cs @@ -0,0 +1,80 @@ +using AutoMapper; +using Himp.TaskScheduling.Datas; +using Himp.TaskScheduling.Tasks; + +namespace Himp.TaskScheduling; + +public class TaskSchedulingApplicationAutoMapperProfile : Profile +{ + public TaskSchedulingApplicationAutoMapperProfile() + { + CreateMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + CreateMap(); + + #region 任务 + + CreateMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + + CreateMap(); + + CreateMap() + .ForMember(dest => dest.Remark, opt => opt.MapFrom(src => src.REMARK)) + .ForMember(dest => dest.Uptime, opt => opt.MapFrom(src => src.UPTIME)) + .ForMember(dest => dest.Totime, opt => opt.MapFrom(src => src.TOTIME)) + .ForMember(dest => dest.Betime, opt => opt.MapFrom(src => src.BETIME)) + .ForMember(dest => dest.Enable, opt => opt.MapFrom(src => src.ENABLE)) + .ForMember(dest => dest.Device, opt => opt.MapFrom(src => src.DEVICE)); + + CreateMap(); + + #endregion + + #region 消息 + + CreateMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + + #endregion + + CreateMap(); + + CreateMap(); + + CreateMap(); + CreateMap(); + + } +} diff --git a/src/Himp.TaskScheduling.Application/TaskSchedulingApplicationModule.cs b/src/Himp.TaskScheduling.Application/TaskSchedulingApplicationModule.cs new file mode 100644 index 0000000..4456e5e --- /dev/null +++ b/src/Himp.TaskScheduling.Application/TaskSchedulingApplicationModule.cs @@ -0,0 +1,37 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; +using Volo.Abp.Application; +using Volo.Abp.BackgroundJobs; +using Microsoft.Extensions.Configuration; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.BackgroundWorkers; + +namespace Himp.TaskScheduling; + +[DependsOn( + typeof(TaskSchedulingDomainModule), + typeof(TaskSchedulingApplicationContractsModule), + typeof(AbpDddApplicationModule), + typeof(AbpAutoMapperModule), + typeof(AbpBackgroundWorkersModule) + )] +public class TaskSchedulingApplicationModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAutoMapperObjectMapper(); + Configure(options => + { + options.AddMaps(validate: false); + }); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + //context.AddBackgroundWorkerAsync(); + //context.AddBackgroundWorkerAsync(); + base.OnApplicationInitialization(context); + } +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/FodyWeavers.xml b/src/Himp.TaskScheduling.Domain.Shared/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/FodyWeavers.xsd b/src/Himp.TaskScheduling.Domain.Shared/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Himp.TaskScheduling.Domain.Shared.abppkg b/src/Himp.TaskScheduling.Domain.Shared/Himp.TaskScheduling.Domain.Shared.abppkg new file mode 100644 index 0000000..8b3de05 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Himp.TaskScheduling.Domain.Shared.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.domain-shared" +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Himp.TaskScheduling.Domain.Shared.csproj b/src/Himp.TaskScheduling.Domain.Shared/Himp.TaskScheduling.Domain.Shared.csproj new file mode 100644 index 0000000..47a1d06 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Himp.TaskScheduling.Domain.Shared.csproj @@ -0,0 +1,30 @@ + + + + + + net8.0 + enable + + true + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Configs/EnumParamType.cs b/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Configs/EnumParamType.cs new file mode 100644 index 0000000..3a4933d --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Configs/EnumParamType.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public enum EnumParamType + { + 类, + 对象, + 属性 + } +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Msgs/EnumEventMsgOperStas.cs b/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Msgs/EnumEventMsgOperStas.cs new file mode 100644 index 0000000..b08dce9 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Msgs/EnumEventMsgOperStas.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public enum EnumEventMsgOperStas + { + 未处理, + 已处理 + } +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Msgs/EnumMsgLv.cs b/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Msgs/EnumMsgLv.cs new file mode 100644 index 0000000..1b86ba4 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Msgs/EnumMsgLv.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public enum EnumMsgLv + { + Information = 0, + Warning = 1, + Error = 2 + } +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Msgs/EnumMsgStats.cs b/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Msgs/EnumMsgStats.cs new file mode 100644 index 0000000..fa15caf --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Msgs/EnumMsgStats.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + /// + /// 消息状态 + /// + public enum EnumMsgStats + { + 发送成功 = 0, + 发送失败 = -1 + } +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Tasks/EnumTaskType.cs b/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Tasks/EnumTaskType.cs new file mode 100644 index 0000000..3c845df --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Himp/TaskScheduling/Tasks/EnumTaskType.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public enum EnumTaskType + { + 标准化验任务 + } +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/ar.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/ar.json new file mode 100644 index 0000000..14ec38f --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/ar.json @@ -0,0 +1,7 @@ +{ + "culture": "ar", + "texts": { + "MyAccount": "إدارة ملفى", + "SamplePageMessage": "صفحة نموذجية للوحدة النمطية TaskScheduling" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/cs.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/cs.json new file mode 100644 index 0000000..6674522 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/cs.json @@ -0,0 +1,7 @@ +{ + "culture": "cs", + "texts": { + "MyAccount": "Spravovat profil", + "SamplePageMessage": "Ukázková stránka pro modul TaskScheduling" + } +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/de.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/de.json new file mode 100644 index 0000000..78336ff --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/de.json @@ -0,0 +1,7 @@ +{ + "culture": "de", + "texts": { + "MyAccount": "Mein Konto", + "SamplePageMessage": "Eine Beispielseite für das Modul TaskSchedulingModul" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/en-GB.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/en-GB.json new file mode 100644 index 0000000..e787d4c --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/en-GB.json @@ -0,0 +1,7 @@ +{ + "culture": "en-GB", + "texts": { + "MyAccount": "My account", + "SamplePageMessage": "A sample page for the TaskScheduling module" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/en.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/en.json new file mode 100644 index 0000000..47cce22 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/en.json @@ -0,0 +1,7 @@ +{ + "culture": "en", + "texts": { + "MyAccount": "My account", + "SamplePageMessage": "A sample page for the TaskScheduling module" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/es.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/es.json new file mode 100644 index 0000000..4a1a405 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/es.json @@ -0,0 +1,7 @@ +{ + "culture": "es", + "texts": { + "MyAccount": "Mi cuenta", + "SamplePageMessage": "Una página de ejemplo para el módulo TaskScheduling " + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/fi.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/fi.json new file mode 100644 index 0000000..3567dc8 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/fi.json @@ -0,0 +1,7 @@ +{ + "culture": "fi", + "texts": { + "MyAccount": "Tilini", + "SamplePageMessage": "Esimerkkisivu TaskScheduling-moduulille" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/fr.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/fr.json new file mode 100644 index 0000000..5ce31fd --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/fr.json @@ -0,0 +1,7 @@ +{ + "culture": "fr", + "texts": { + "MyAccount": "Mon compte", + "SamplePageMessage": "Exemple de page pour le module TaskScheduling" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/hi.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/hi.json new file mode 100644 index 0000000..20b67e0 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/hi.json @@ -0,0 +1,7 @@ +{ + "culture": "hi", + "texts": { + "MyAccount": "मेरा खाता", + "SamplePageMessage": "TaskScheduling मॉड्यूल के लिए एक नमूना पृष्ठ" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/hr.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/hr.json new file mode 100644 index 0000000..1d17cf5 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/hr.json @@ -0,0 +1,7 @@ +{ + "culture": "hr", + "texts": { + "MyAccount": "Moj račun", + "SamplePageMessage": "Ogledna stranica za modul TaskScheduling" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/hu.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/hu.json new file mode 100644 index 0000000..08668cd --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "MyAccount": "A fiókom", + "SamplePageMessage": "Mintaoldal a TaskScheduling modulhoz" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/is.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/is.json new file mode 100644 index 0000000..50780cc --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/is.json @@ -0,0 +1,7 @@ +{ + "culture": "is", + "texts": { + "MyAccount": "Minn aðgangur", + "SamplePageMessage": "Dæmi um síðu fyrir TaskScheduling eininguna" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/it.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/it.json new file mode 100644 index 0000000..781ae31 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/it.json @@ -0,0 +1,7 @@ +{ + "culture": "it", + "texts": { + "MyAccount": "Il mio conto", + "SamplePageMessage": "Una pagina di esempio per il modulo TaskScheduling" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/nl.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/nl.json new file mode 100644 index 0000000..d47a57a --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/nl.json @@ -0,0 +1,7 @@ +{ + "culture": "nl", + "texts": { + "MyAccount": "Mijn rekening", + "SamplePageMessage": "Een voorbeeldpagina voor de TaskScheduling module" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/pl-PL.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/pl-PL.json new file mode 100644 index 0000000..26c6174 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/pl-PL.json @@ -0,0 +1,7 @@ +{ + "culture": "pl-PL", + "texts": { + "MyAccount": "Moje konto", + "SamplePageMessage": "Przykładowa strona modułu TaskScheduling" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/pt-BR.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/pt-BR.json new file mode 100644 index 0000000..20c8d93 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/pt-BR.json @@ -0,0 +1,7 @@ +{ + "culture": "pt-BR", + "texts": { + "MyAccount": "Minha conta", + "SamplePageMessage": "Uma página de amostra para o módulo TaskScheduling" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/ro-RO.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/ro-RO.json new file mode 100644 index 0000000..de2a579 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/ro-RO.json @@ -0,0 +1,7 @@ +{ + "culture": "ro-RO", + "texts": { + "MyAccount": "Contul meu", + "SamplePageMessage": "Un exemplu de pagină pentru modululul TaskScheduling" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/ru.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/ru.json new file mode 100644 index 0000000..976e001 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/ru.json @@ -0,0 +1,7 @@ +{ + "culture": "ru", + "texts": { + "MyAccount": "Мой аккаунт", + "SamplePageMessage": "Пример страницы для модуля TaskScheduling" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/sk.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/sk.json new file mode 100644 index 0000000..3cd8980 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/sk.json @@ -0,0 +1,7 @@ +{ + "culture": "sk", + "texts": { + "MyAccount": "Môj účet", + "SamplePageMessage": "Ukážka stránky pre modul TaskScheduling" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/sl.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/sl.json new file mode 100644 index 0000000..fccf841 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/sl.json @@ -0,0 +1,7 @@ +{ + "culture": "sl", + "texts": { + "MyAccount": "Moj račun", + "SamplePageMessage": "Vzorčna stran za modul TaskScheduling" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/tr.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/tr.json new file mode 100644 index 0000000..4ca7183 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/tr.json @@ -0,0 +1,7 @@ +{ + "culture": "tr", + "texts": { + "MyAccount": "Hesabım", + "SamplePageMessage": "TaskScheduling modulünden örnek bir sayfa" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/vi.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/vi.json new file mode 100644 index 0000000..3570f1e --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/vi.json @@ -0,0 +1,7 @@ +{ + "culture": "vi", + "texts": { + "MyAccount": "Tài khoản của tôi", + "SamplePageMessage": "Trang mẫu cho mô-đun TaskScheduling" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/zh-Hans.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/zh-Hans.json new file mode 100644 index 0000000..509f373 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/zh-Hans.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hans", + "texts": { + "MyAccount": "我的账户", + "SamplePageMessage": "TaskScheduling 模块的示例页面" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/zh-Hant.json b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/zh-Hant.json new file mode 100644 index 0000000..23a6251 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskScheduling/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "culture": "zh-Hant", + "texts": { + "MyAccount": "我的賬戶", + "SamplePageMessage": "TaskScheduling 模塊的示例頁面" + } +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskSchedulingResource.cs b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskSchedulingResource.cs new file mode 100644 index 0000000..c004913 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Localization/TaskSchedulingResource.cs @@ -0,0 +1,9 @@ +using Volo.Abp.Localization; + +namespace Himp.TaskScheduling.Localization; + +[LocalizationResourceName("TaskScheduling")] +public class TaskSchedulingResource +{ + +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/TaskSchedulingDomainSharedModule.cs b/src/Himp.TaskScheduling.Domain.Shared/TaskSchedulingDomainSharedModule.cs new file mode 100644 index 0000000..08b1d47 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/TaskSchedulingDomainSharedModule.cs @@ -0,0 +1,38 @@ +using Volo.Abp.Modularity; +using Volo.Abp.Localization; +using Himp.TaskScheduling.Localization; +using Volo.Abp.Domain; +using Volo.Abp.Localization.ExceptionHandling; +using Volo.Abp.Validation; +using Volo.Abp.Validation.Localization; +using Volo.Abp.VirtualFileSystem; + +namespace Himp.TaskScheduling; + +[DependsOn( + typeof(AbpValidationModule), + typeof(AbpDddDomainSharedModule) +)] +public class TaskSchedulingDomainSharedModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + Configure(options => + { + options.Resources + .Add("en") + .AddBaseTypes(typeof(AbpValidationResource)) + .AddVirtualJson("/Localization/TaskScheduling"); + }); + + Configure(options => + { + options.MapCodeNamespace("TaskScheduling", typeof(TaskSchedulingResource)); + }); + } +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/TaskSchedulingErrorCodes.cs b/src/Himp.TaskScheduling.Domain.Shared/TaskSchedulingErrorCodes.cs new file mode 100644 index 0000000..2771881 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/TaskSchedulingErrorCodes.cs @@ -0,0 +1,6 @@ +namespace Himp.TaskScheduling; + +public static class TaskSchedulingErrorCodes +{ + //Add your business exception error codes here... +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumBizflowNodeType.cs b/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumBizflowNodeType.cs new file mode 100644 index 0000000..8d511f9 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumBizflowNodeType.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public enum EnumBizflowNodeType + { + 启动事件, + 用户活动 + } +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumWorkflowInstanceStas.cs b/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumWorkflowInstanceStas.cs new file mode 100644 index 0000000..7a9e710 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumWorkflowInstanceStas.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public enum EnumWorkflowInstanceStas + { + 默认 = 0, + 激活 = 1, + 挂起 = 2, + 完成 = 3, + } +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumWorkflowModelStas.cs b/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumWorkflowModelStas.cs new file mode 100644 index 0000000..430ebc7 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumWorkflowModelStas.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + public enum EnumWorkflowModelStas + { + 未部署, + 激活, + 挂起, + } +} diff --git a/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumWorkflowTypeProvider.cs b/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumWorkflowTypeProvider.cs new file mode 100644 index 0000000..5d736ed --- /dev/null +++ b/src/Himp.TaskScheduling.Domain.Shared/Workflows/EnumWorkflowTypeProvider.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Himp.TaskScheduling +{ + /// + /// 工作流授权 + /// + public enum EnumWorkflowTypeProvider + { + 默认, + 用户, + 角色 + } +} diff --git a/src/Himp.TaskScheduling.Domain/FodyWeavers.xml b/src/Himp.TaskScheduling.Domain/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain/FodyWeavers.xsd b/src/Himp.TaskScheduling.Domain/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain/Himp.TaskScheduling.Domain.abppkg b/src/Himp.TaskScheduling.Domain/Himp.TaskScheduling.Domain.abppkg new file mode 100644 index 0000000..1d574ef --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp.TaskScheduling.Domain.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.domain" +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Domain/Himp.TaskScheduling.Domain.csproj b/src/Himp.TaskScheduling.Domain/Himp.TaskScheduling.Domain.csproj new file mode 100644 index 0000000..d206250 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp.TaskScheduling.Domain.csproj @@ -0,0 +1,21 @@ + + + + + + net8.0 + enable + + + + + + + + + + + + + + diff --git a/src/Himp.TaskScheduling.Domain/Himp/RL/AutoSamplingNotifyRepository.cs b/src/Himp.TaskScheduling.Domain/Himp/RL/AutoSamplingNotifyRepository.cs new file mode 100644 index 0000000..26e4ba3 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/RL/AutoSamplingNotifyRepository.cs @@ -0,0 +1,79 @@ +using Dapper; +using Himp.TaskScheduling.Datas; +using Himp.TaskScheduling.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories.Dapper; +using Volo.Abp.EntityFrameworkCore; + +namespace Himp.RL +{ + /// + /// 自动制样提醒服务 + /// + public class AutoSamplingNotifyRepository : DapperRepository, ITransientDependency + { + #region SQL + + public const string SQL_SAMPLEPREPARATIONREC = @" + SELECT count(*) + FROM [CoalManager_2013].[dbo].[收样明细表] a, + [CoalManager_2013].[dbo].[供应标识信息] b + where a.供应识别号 = b.编号 + and b.名称 in @n1 + and a.一次编号=@o1 + "; + + public const string SQL_SAMPLEPREPARATIONREC_QS = @" + SELECT count(*) + FROM [CoalManager_2013].[dbo].[全水样] a, + [CoalManager_2013].[dbo].[供应标识信息] b + where a.供应识别号 = b.编号 + and b.名称 in @n1 + and a.一次编号=@o1 + "; + + #endregion + + public AutoSamplingNotifyRepository(IDbContextProvider dbContextProvider) + : base(dbContextProvider) + { + } + + public virtual async Task> GetAutoSamplingFlagAsync(List names, string o1) + { + var dbConnection = await GetDbConnectionAsync(); + + var existFlag = dbConnection.ExecuteScalar(SQL_SAMPLEPREPARATIONREC, + new + { + n1 = names, + o1 + }); + + if (existFlag != 0) + { + return new Tuple(true, "分析样"); + } + + existFlag = dbConnection.ExecuteScalar(SQL_SAMPLEPREPARATIONREC_QS, + new + { + n1 = names, + o1 + }); + + if (existFlag != 0) + { + return new Tuple(true, "全水样"); + } + + return new Tuple(false, ""); + } + + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/RL/CoalManagerDbContext.cs b/src/Himp.TaskScheduling.Domain/Himp/RL/CoalManagerDbContext.cs new file mode 100644 index 0000000..976c3d8 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/RL/CoalManagerDbContext.cs @@ -0,0 +1,23 @@ +using Himp.TaskScheduling; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace Himp.RL +{ + [ConnectionStringName(TaskSchedulingDbProperties.ConnectionStringCoalManagerName)] + public class CoalManagerDbContext : AbpDbContext, ICoalManagerDbContext + { + public CoalManagerDbContext(DbContextOptions options) + : base(options) + { + + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/RL/DataStatisticRepository.cs b/src/Himp.TaskScheduling.Domain/Himp/RL/DataStatisticRepository.cs new file mode 100644 index 0000000..5cae1df --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/RL/DataStatisticRepository.cs @@ -0,0 +1,254 @@ +using Dapper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories.Dapper; +using Volo.Abp.EntityFrameworkCore; + +namespace Himp.RL +{ + public class DataStatisticRepository : DapperRepository, ITransientDependency + { + #region SQL + + public const string SQL_STAS_1 = @" + select sum(实重) from 进煤表 + where CONVERT(VARCHAR(10), 开票时间, 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + and 验收时间 is not null + "; + + public const string SQL_STAS_2 = @" + select sum(进煤量) from 发运计划 + where CONVERT(VARCHAR(10), 日期, 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + "; + + public const string SQL_STAS_3 = @" + select sum(进煤量)/32 from 发运计划 + where CONVERT(VARCHAR(10), 日期, 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + "; + + public const string SQL_STAS_4 = @" + select count(1) from 进煤表 + where CONVERT(VARCHAR(10), 开票时间, 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + and 验收时间 is not null + "; + + public const string SQL_STAS_5 = @" + select count(1) from 进煤表 + where CONVERT(VARCHAR(10), 开票时间, 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + and 验收时间 is null + "; + + public const string SQL_STAS_6 = @" + select count(1) from 进煤表 + where CONVERT(VARCHAR(10), 采样时间, 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + and 采样机号 = @No + "; + + public const string SQL_STAS_8 = @" + select count(1) from 进煤表 + where CONVERT(VARCHAR(10), 开票时间, 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + and 采样时间 is null + "; + + public const string SQL_STAS_9 = @" + select count(1) from 进煤表 + where CONVERT(VARCHAR(10), 开票时间, 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + and 验收时间 is not null + "; + + public const string SQL_STAS_11 = @" + select top 1 出矿毛重 from 进煤表 + where 验收时间 is null + and 采样时间 is not null + and 称毛重时间 is not null + and 采样机号 ='#1采样机' + and CONVERT(VARCHAR(10), [采样时间], 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + order by 采样时间 desc + "; + + public const string SQL_STAS_12 = @" + select top 1 出矿毛重 from 进煤表 + where 验收时间 is null + and 采样时间 is not null + and 称毛重时间 is not null + and 采样机号 ='#2采样机' + and CONVERT(VARCHAR(10), [采样时间], 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + order by 采样时间 desc + "; + + public const string SQL_STAS_13 = @" + select top 1 出矿毛重 from 进煤表 + where 验收时间 is null + and 采样时间 is not null + and 称毛重时间 is not null + and 采样机号 ='#3采样机' + and CONVERT(VARCHAR(10), [采样时间], 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + order by 采样时间 desc + "; + + public const string SQL_STAS_14 = @" + select top 1 出矿毛重 from 进煤表 + where 验收时间 is null + and 采样时间 is not null + and 称毛重时间 is not null + and 采样机号 ='#4采样机' + and CONVERT(VARCHAR(10), [采样时间], 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + order by 采样时间 desc + "; + + #endregion + + public DataStatisticRepository(IDbContextProvider dbContextProvider) + : base(dbContextProvider) + { + + } + + public virtual async Task GetStas1() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_1, await GetDbTransactionAsync()); + + return cont; + } + + public virtual async Task GetStas2() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_2, await GetDbTransactionAsync()); + + return cont; + } + + public virtual async Task GetStas3() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_3, await GetDbTransactionAsync()); + + return cont; + } + + /// + /// 已验收车数 + /// + /// + /// + /// + public virtual async Task GetStas4() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_4, await GetDbTransactionAsync()); + + return cont; + } + + /// + /// 厂内车数 + /// + /// + public virtual async Task GetStas5() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_5, await GetDbTransactionAsync()); + + return cont; + } + + /// + /// 采样机采样次数 + /// + /// + public virtual async Task GetStas6_1() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_6,new { No= "#1采样机" }, await GetDbTransactionAsync()); + + return cont; + } + + public virtual async Task GetStas6_2() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_6, new { No = "#2采样机" }, await GetDbTransactionAsync()); + + return cont; + } + + public virtual async Task GetStas6_3() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_6, new { No = "#3采样机" }, await GetDbTransactionAsync()); + + return cont; + } + + public virtual async Task GetStas6_4() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_6, new { No = "#4采样机" }, await GetDbTransactionAsync()); + + return cont; + } + + /// + /// 登记未入厂 + /// + /// + public virtual async Task GetStas8() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_8, await GetDbTransactionAsync()); + + return cont; + } + + /// + /// 登记已出厂 + /// + /// + public virtual async Task GetStas9() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_9, await GetDbTransactionAsync()); + + return cont; + } + + public virtual async Task GetStas11() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_11, await GetDbTransactionAsync()); + + return cont; + } + + public virtual async Task GetStas12() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_12, await GetDbTransactionAsync()); + + return cont; + } + + public virtual async Task GetStas13() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_13, await GetDbTransactionAsync()); + + return cont; + } + + public virtual async Task GetStas14() + { + var dbConnection = await GetDbConnectionAsync(); + var cont = dbConnection.ExecuteScalar(SQL_STAS_14, await GetDbTransactionAsync()); + + return cont; + } + + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/RL/ICoalManagerDbContext.cs b/src/Himp.TaskScheduling.Domain/Himp/RL/ICoalManagerDbContext.cs new file mode 100644 index 0000000..916a8f9 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/RL/ICoalManagerDbContext.cs @@ -0,0 +1,16 @@ +using Himp.TaskScheduling; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace Himp.RL +{ + [ConnectionStringName(TaskSchedulingDbProperties.ConnectionStringCoalManagerName)] + public interface ICoalManagerDbContext : IEfCoreDbContext + { + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/RL/IRLWebDbContext.cs b/src/Himp.TaskScheduling.Domain/Himp/RL/IRLWebDbContext.cs new file mode 100644 index 0000000..ebe1407 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/RL/IRLWebDbContext.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace Himp.TaskScheduling.EntityFrameworkCore +{ + [ConnectionStringName(TaskSchedulingDbProperties.ConnectionStringRLWebName)] + public interface IRLWebDbContext : IEfCoreDbContext + { + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/RL/QsCodeRepository.cs b/src/Himp.TaskScheduling.Domain/Himp/RL/QsCodeRepository.cs new file mode 100644 index 0000000..14b7222 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/RL/QsCodeRepository.cs @@ -0,0 +1,161 @@ +using Dapper; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories.Dapper; +using Volo.Abp.EntityFrameworkCore; + +namespace Himp.RL +{ + public class QsCodeRepository : DapperRepository, ITransientDependency + { + #region SQL + + private ILogger _logger; + private static Random random = new Random(); + + public const string SQL_SAMPLEPREPARATIONREC = @" + select 二次编号 + from 全水表 + where 化验编号 = + (select 编号 from 全水样 + where 一次编号 =(select 一次编号 + from 全水样 + where 编号 in + (select 全水收样编号 + from 进煤表 + where 收样编号 in + (select 编号 + from 收样明细表 + where 三次编号 =@Code)))) + "; + + public const string GET_HYCODE_SQL = @" +select 编号 from 全水样 + where 一次编号 =(select 一次编号 + from 全水样 + where 编号 in + (select 全水收样编号 + from 进煤表 + where 收样编号 in + (select 编号 + from 收样明细表 + where 三次编号 =@Code)))"; + + public const string INSERT_QSB_SQL = @" + insert into [dbo].全水表 + ( + 操作员, + 二次编号, + 日期, + 化验编号, + 时间 + ) + values + ( + @Oper, + @CCode, + GETDATE(), + @HyCode, + GETDATE() + ) + "; + + public const string EXIST_C_CODE = @" + SELECT COUNT(*) + FROM [dbo].[全水表] + WHERE + [二次编号] = @TargetCode + "; + + public const string EXIST_C_CODE2 = @" + SELECT COUNT(*) + FROM [dbo].[收样明细表] + WHERE + [三次编号] = @TargetCode + "; + + + #endregion + + public QsCodeRepository(IDbContextProvider dbContextProvider + , ILogger logger) + : base(dbContextProvider) + { + _logger = logger; + } + + public virtual async Task GetCodeAsync(string operName, string o1) + { + var dbConnection = await GetDbConnectionAsync(); + var qsCodes = await dbConnection.QueryAsync(SQL_SAMPLEPREPARATIONREC, + new + { + Code = o1 + }, await GetDbTransactionAsync()); + var qsCode = qsCodes.FirstOrDefault(); + + if (!string.IsNullOrEmpty(qsCode)) + { + _logger.LogInformation($"全水码已转换,{o1},{qsCode}"); + return qsCode; + } + + var exitQsTargetFlag = true; + var cCode = "C" + DateTime.Now.ToString("yyMMdd") + random.Next(1000, 10000).ToString(); + _logger.LogInformation($"生成全水码,{o1},{cCode}"); + + while (exitQsTargetFlag) + { + //验证老库 + var existQsCount = dbConnection.ExecuteScalar(EXIST_C_CODE, new + { + TargetCode = cCode + }, await GetDbTransactionAsync()); + existQsCount += dbConnection.ExecuteScalar(EXIST_C_CODE2, new + { + TargetCode = cCode + }, await GetDbTransactionAsync()); + + if (existQsCount == 0) + { + exitQsTargetFlag = false; + } + else + { + cCode = "C" + DateTime.Now.ToString("yyMMdd") + random.Next(1000, 10000).ToString(); + } + } + + _logger.LogInformation($"生成全水码,{o1},{cCode}"); + var hyCodes = await dbConnection.QueryAsync(GET_HYCODE_SQL, + new + { + Code = o1 + }, await GetDbTransactionAsync()); + var hyCode = hyCodes.FirstOrDefault(); + _logger.LogInformation($"获取全水样编号,{o1},{hyCode}"); + + if (hyCode == null || hyCode == 0) + { + return string.Empty; + } + + var inserFlag = await dbConnection.ExecuteAsync(INSERT_QSB_SQL, + new + { + Oper = operName, + CCode = cCode, + HyCode = hyCode, + }, await GetDbTransactionAsync()); + _logger.LogInformation($"插入全水表,{o1},{inserFlag},{operName},{cCode},{hyCode}"); + + return cCode; + } + + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/RL/RLWebDbContext.cs b/src/Himp.TaskScheduling.Domain/Himp/RL/RLWebDbContext.cs new file mode 100644 index 0000000..167365e --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/RL/RLWebDbContext.cs @@ -0,0 +1,22 @@ +using Himp.TaskScheduling.Datas; +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace Himp.TaskScheduling.EntityFrameworkCore +{ + [ConnectionStringName(TaskSchedulingDbProperties.ConnectionStringRLWebName)] + public class RLWebDbContext : AbpDbContext, IRLWebDbContext + { + public RLWebDbContext(DbContextOptions options) + : base(options) + { + + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/RL/RLWebDbContextModelCreatingExtensions.cs b/src/Himp.TaskScheduling.Domain/Himp/RL/RLWebDbContextModelCreatingExtensions.cs new file mode 100644 index 0000000..7ee252b --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/RL/RLWebDbContextModelCreatingExtensions.cs @@ -0,0 +1,19 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; + +namespace Himp.TaskScheduling.EntityFrameworkCore +{ + public static class RLWebDbContextModelCreatingExtensions + { + public static void ConfigureRLWeb( + this ModelBuilder builder) + { + Check.NotNull(builder, nameof(builder)); + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/RL/SamplePreparationRecRepository.cs b/src/Himp.TaskScheduling.Domain/Himp/RL/SamplePreparationRecRepository.cs new file mode 100644 index 0000000..7f42e0f --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/RL/SamplePreparationRecRepository.cs @@ -0,0 +1,54 @@ +using Dapper; +using Himp.TaskScheduling.Datas; +using Himp.TaskScheduling.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories.Dapper; +using Volo.Abp.EntityFrameworkCore; + +namespace Himp.RL +{ + public class SamplePreparationRecRepository : DapperRepository, ITransientDependency + { + #region SQL + + public const string SQL_SAMPLEPREPARATIONREC = @" + SELECT + * + FROM + HY_SamplePreparationRec + WHERE + CONVERT(VARCHAR(10), [EndTime], 120) = CONVERT(VARCHAR(10), GETDATE(), 120) + "; + + #endregion + + public SamplePreparationRecRepository(IDbContextProvider dbContextProvider) + : base(dbContextProvider) + { + + } + + public virtual async Task> GetAllPersonNamesAsync() + { + var dbConnection = await GetDbConnectionAsync(); + return (await dbConnection.QueryAsync(SQL_SAMPLEPREPARATIONREC, + transaction: await GetDbTransactionAsync()) + ).ToList(); + } + + public virtual async Task UpdatePersonNamesAsync(string name) + { + var dbConnection = await GetDbConnectionAsync(); + return await dbConnection.ExecuteAsync( + "update People set Name = @NewName", + new { NewName = name }, + await GetDbTransactionAsync() + ); + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/CodeConversion.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/CodeConversion.cs new file mode 100644 index 0000000..a8a0a19 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/CodeConversion.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + /// + /// 转码 + /// + public class CodeConversion : Entity + { + /// + /// 原始码 + /// + public string SorcCode { get; set; } + + /// + /// 目标码 + /// + public string TargetCode { get; set; } + + /// + /// 1 规批码转制样码 自动 + /// 2 制样码转化验码 + /// 3 制样码转瓶底码 + /// 4 抽样码转制样码 + /// 5 分析制样码转全水制样码 + /// + public int ConversionType { get; set; } + + /// + /// + /// + public DateTime ConversionTime { get; set; } + + /// + /// + /// + public string OperName { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/MqttClientHelper.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/MqttClientHelper.cs new file mode 100644 index 0000000..48b38b6 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/MqttClientHelper.cs @@ -0,0 +1,92 @@ +using MQTTnet.Client; +using MQTTnet; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using StackExchange.Redis; +using Microsoft.Extensions.Options; +using MQTTnet.Server; +using MQTTnet.Client.Options; + +namespace Himp.TaskScheduling +{ + public static class MqttClientHelper + { + private static string Ip = "112.33.111.160"; + private static int Port = 8084; + private static object _locker = new Object(); + private static IMqttClient _instance = null; + + /// + /// 使用一个静态属性来返回已连接的实例,如下列中所示。这样,一旦 ConnectionMultiplexer 断开连接,便可以初始化新的连接实例。 + /// + public static IMqttClient Instance + { + get + { + if (Ip.Length == 0) + { + throw new Exception("连接字符串未设置!"); + } + + if (_instance == null) + { + lock (_locker) + { + if (_instance == null || !_instance.IsConnected) + { + // 创建客户端配置 + var options = new MqttClientOptionsBuilder() + .WithTcpServer(Ip, Port) + .WithClientId("TaskScheduling") // 客户端ID + .Build(); + + _instance = new MqttFactory().CreateMqttClient(); + + _instance.UseConnectedHandler(e => + { + Console.WriteLine("Connected to MQTT Broker"); + }); + + // 处理连接断开事件 + _instance.UseDisconnectedHandler(e => + { + Console.WriteLine("Disconnected from MQTT Broker"); + // 连接到MQTT服务器 + _instance.ConnectAsync(options, CancellationToken.None); + }); + + // 处理接收到消息事件 + _instance.UseApplicationMessageReceivedHandler(e => + { + Console.WriteLine($"Received message: {e.ApplicationMessage.Payload}"); + }); + + // 连接到MQTT服务器 + _instance.ConnectAsync(options, CancellationToken.None); + } + } + } + + return _instance; + } + } + + static MqttClientHelper() + { + } + + public static async Task PublishStringAsync(string topic,string cont) + { + var message1 = new MqttApplicationMessageBuilder() + .WithTopic(topic) + .WithPayload(cont) + .WithRetainFlag() + .Build(); + await Instance.PublishAsync(message1, CancellationToken.None); + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/ParamConfig.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/ParamConfig.cs new file mode 100644 index 0000000..ef7727f --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/ParamConfig.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + /// + /// 参数配置 + /// + public class ParamConfig : Entity + { + /// + /// 参数类别 + /// 类 + /// 对象 + /// 属性 + /// + public EnumParamType ParamType { get; set; } + + /// + /// 参数编码 + /// + public string ParamCodg { get; set; } + + /// + /// 参数名称 + /// + public string ParamName { get; set; } + + /// + /// 属性Key + /// + public string? PropertyKey { get; set; } + + /// + /// 属性类别 + /// 0 string + /// 1 int + /// 2 float + /// + public int? PropertyType { get; set; } + + /// + /// 参数值 + /// + public string? ParamValue { get; set; } + + /// + /// 默认值 + /// + public string? DefValue { get; set; } + + /// + /// + /// + public string? KeyPath { get; set; } + + /// + /// 有效标识 + /// + public bool ValiFlag { get; set; } + + /// + /// + /// + public long? ParentId { get; set; } + + /// + /// + /// + public ParamConfig? Parent { get; set; } + + /// + /// + /// + public List Children { get; set; } + + /// + /// + /// + public ParamConfig() + { } + + public ParamConfig(EnumParamType paramType, string paramCodg, string paramName + , string? propertyKey, int? propertyType) + { + ParamType = paramType; + ParamCodg = paramCodg; + ParamName = paramName; + PropertyKey = propertyKey; + PropertyType = propertyType; + ValiFlag = true; + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/ParamConfigManager.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/ParamConfigManager.cs new file mode 100644 index 0000000..8ae3360 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/ParamConfigManager.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; + +namespace Himp.TaskScheduling +{ + public class ParamConfigManager : DomainService + { + public async Task> GetValues(List keys) + { + Dictionary keyValuePairs = new Dictionary(); + + foreach (var key in keys) + { + var v = await RedisHelper.GetString(key); + keyValuePairs.Add(key, v); + } + + return keyValuePairs; + } + + public async Task> GetKeys() + { + var keys = RedisHelper.GetKeys(); + + return keys; + } + + public async Task> GetValues() + { + Dictionary keyValuePairs = new Dictionary(); + var keys = RedisHelper.GetKeys(); + + foreach (var key in keys) + { + var v = await RedisHelper.GetObject(key); + keyValuePairs.Add(key, v); + } + + return keyValuePairs; + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/ParamConfigTask.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/ParamConfigTask.cs new file mode 100644 index 0000000..9421c4c --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/ParamConfigTask.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + /// + /// 参数配置任务 + /// + public class ParamConfigTask : Entity + { + /// + /// 任务内容描述 + /// + public string TaskContdesc { get; set; } + + /// + /// 属性Key + /// + public string PropertyKey { get; set; } + + /// + /// 属性值 + /// + public string PropertyValue { get; set; } + + /// + /// 任务类别 + /// 0 手工参数修改 + /// 1 大屏操作修改 + /// + public int TaskType { get; set; } + + /// + /// + /// + public string OperatorName { get; set; } + + /// + /// 0 创建 + /// 9 完成 + /// + public int TaskStas { get; set; } + + /// + /// + /// + public string TaskMsg { get; set; } + + /// + /// + /// + public DateTime OperationTime { get; set; } + + /// + /// + /// + public DateTime? ExecTime { get; set; } + + public ParamConfigTask() + { + + } + + public ParamConfigTask(int taskType,string propertyValue + ,string operatorName) + { + PropertyValue = propertyValue; + TaskType = taskType; + OperatorName = operatorName; + TaskMsg = "-"; + OperationTime = DateTime.Now; + } + + public void SetPropertyKey(string propertyKey) + { + PropertyKey = propertyKey; + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/RedisHelper.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/RedisHelper.cs new file mode 100644 index 0000000..7ce81a8 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/RedisHelper.cs @@ -0,0 +1,460 @@ +using StackExchange.Redis; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Runtime.Serialization.Formatters.Binary; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + /// + /// Redis帮助类 + /// + public static class RedisHelper + { + private static string Constr = "112.33.111.160:8095,password=1q2w3E*"; + private static object _locker = new Object(); + private static ConnectionMultiplexer _instance = null; + + /// + /// 使用一个静态属性来返回已连接的实例,如下列中所示。这样,一旦 ConnectionMultiplexer 断开连接,便可以初始化新的连接实例。 + /// + public static ConnectionMultiplexer Instance + { + get + { + if (Constr.Length == 0) + { + throw new Exception("连接字符串未设置!"); + } + + if (_instance == null) + { + lock (_locker) + { + if (_instance == null || !_instance.IsConnected) + { + _instance = ConnectionMultiplexer.Connect(Constr); + } + } + } + + //注册如下事件 + _instance.ConnectionFailed += MuxerConnectionFailed; + _instance.ConnectionRestored += MuxerConnectionRestored; + _instance.ErrorMessage += MuxerErrorMessage; + _instance.ConfigurationChanged += MuxerConfigurationChanged; + _instance.HashSlotMoved += MuxerHashSlotMoved; + _instance.InternalError += MuxerInternalError; + return _instance; + } + } + + static RedisHelper() + { + } + + public static void SetCon(string config) + { + Constr = config; + } + + /// + /// + /// + /// + public static IDatabase GetDatabase() + { + return Instance.GetDatabase(); + } + + /// + /// GetServer方法会接收一个EndPoint类或者一个唯一标识一台服务器的键值对 + /// 有时候需要为单个服务器指定特定的命令 + /// 使用IServer可以使用所有的shell命令,比如: + /// DateTime lastSave = server.LastSave(); + /// ClientInfo[] clients = server.ClientList(); + /// 如果报错在连接字符串后加 ,allowAdmin=true; + /// + /// + public static IServer GetServer() + { + IServer server = Instance.GetServer(Constr); + return server; + } + + /// + /// 这里的 MergeKey 用来拼接 Key 的前缀,具体不同的业务模块使用不同的前缀。 + /// + /// + /// + private static string MergeKey(string key) + { + return key; + //return BaseSystemInfo.SystemCode + key; + } + + /// + /// 根据key获取缓存对象 + /// + /// + /// + /// + public static T Get(string key) + { + key = MergeKey(key); + return Deserialize(GetDatabase().StringGet(key)); + } + + /// + /// 根据key获取缓存对象 + /// + /// + /// + public static object Get(string key) + { + key = MergeKey(key); + return Deserialize(GetDatabase().StringGet(key)); + } + + public static List GetKeys() + { + var keys = GetServer().Keys(pattern: "*"); // 获取所有键 + return keys.Select(x => x.ToString()).ToList(); + } + + public static async Task GetString(string key) + { + key = MergeKey(key); + return await GetDatabase().StringGetAsync(key); + } + + public async static Task GetObject(string key) + { + key = MergeKey(key); + var keyType = (await GetDatabase().KeyTypeAsync(key)).ToString(); + + switch (keyType) + { + case "String": + var v = await GetDatabase().StringGetAsync(key); + return v.ToString(); + + case "List": + var listValues = await GetDatabase().ListRangeAsync(key); + + foreach (var item in listValues) + { + Console.WriteLine(item); + } + break; + + case "Set": + var setValues = await GetDatabase().SetMembersAsync(key); + + foreach (var item in setValues) + { + Console.WriteLine(item); + } + break; + + case "SortedSet": + var sortedSetValues = await GetDatabase().SortedSetRangeByRankAsync(key); + + foreach (var item in sortedSetValues) + { + Console.WriteLine(item); + } + break; + + case "Hash": + var hashEntries = await GetDatabase().HashGetAllAsync(key); + + foreach (var entry in hashEntries) + { + Console.WriteLine($"{entry.Name}: {entry.Value}"); + } + break; + + default: + Console.WriteLine("Unsupported key type."); + break; + } + + return string.Empty; + } + + public static void SetString(string key, string value, int expireMinutes = 0) + { + if (expireMinutes > 0) + { + GetDatabase().StringSet(key, value, TimeSpan.FromMinutes(expireMinutes)); + } + else + { + GetDatabase().StringSet(key, value); + } + } + + + /// + /// 设置缓存 + /// + /// + /// + /// + public static void Set(string key, object value, int expireMinutes = 0) + { + key = MergeKey(key); + if (expireMinutes > 0) + { + GetDatabase().StringSet(key, Serialize(value), TimeSpan.FromMinutes(expireMinutes)); + } + else + { + GetDatabase().StringSet(key, Serialize(value)); + } + } + + + /// + /// 判断在缓存中是否存在该key的缓存数据 + /// + /// + /// + public static bool Exists(string key) + { + key = MergeKey(key); + return GetDatabase().KeyExists(key); //可直接调用 + } + + /// + /// 移除指定key的缓存 + /// + /// + /// + public static bool Remove(string key) + { + key = MergeKey(key); + return GetDatabase().KeyDelete(key); + } + + /// + /// 异步设置 + /// + /// + /// + public static async Task SetAsync(string key, object value) + { + key = MergeKey(key); + await GetDatabase().StringSetAsync(key, Serialize(value)); + } + + /// + /// 根据key获取缓存对象 + /// + /// + /// + public static async Task GetAsync(string key) + { + key = MergeKey(key); + object value = await GetDatabase().StringGetAsync(key); + return value; + } + + /// + /// 实现递增 + /// + /// + /// + public static long Increment(string key) + { + key = MergeKey(key); + //三种命令模式 + //Sync,同步模式会直接阻塞调用者,但是显然不会阻塞其他线程。 + //Async,异步模式直接走的是Task模型。 + //Fire - and - Forget,就是发送命令,然后完全不关心最终什么时候完成命令操作。 + //即发即弃:通过配置 CommandFlags 来实现即发即弃功能,在该实例中该方法会立即返回,如果是string则返回null 如果是int则返回0.这个操作将会继续在后台运行,一个典型的用法页面计数器的实现: + return GetDatabase().StringIncrement(key, flags: CommandFlags.FireAndForget); + } + + /// + /// 实现递减 + /// + /// + /// + /// + public static long Decrement(string key, string value) + { + key = MergeKey(key); + return GetDatabase().HashDecrement(key, value, flags: CommandFlags.FireAndForget); + } + + /// + /// 序列化对象 + /// + /// + /// + private static byte[] Serialize(object o) + { + if (o == null) + { + return null; + } + + byte[] bytes = JsonSerializer.SerializeToUtf8Bytes(o); + return bytes; + } + + /// + /// 反序列化对象 + /// + /// + /// + /// + private static T Deserialize(byte[] stream) + { + if (stream == null) + { + return default(T); + } + + T deserializedObj = JsonSerializer.Deserialize(stream); + + return deserializedObj; + } + + /// + /// 配置更改时 + /// + /// + /// + private static void MuxerConfigurationChanged(object sender, EndPointEventArgs e) + { + //LogHelper.SafeLogMessage("Configuration changed: " + e.EndPoint); + } + + /// + /// 发生错误时 + /// + /// + /// + private static void MuxerErrorMessage(object sender, RedisErrorEventArgs e) + { + //LogHelper.SafeLogMessage("ErrorMessage: " + e.Message); + } + + /// + /// 重新建立连接之前的错误 + /// + /// + /// + private static void MuxerConnectionRestored(object sender, ConnectionFailedEventArgs e) + { + //LogHelper.SafeLogMessage("ConnectionRestored: " + e.EndPoint); + } + + /// + /// 连接失败 , 如果重新连接成功你将不会收到这个通知 + /// + /// + /// + private static void MuxerConnectionFailed(object sender, ConnectionFailedEventArgs e) + { + //LogHelper.SafeLogMessage("重新连接:Endpoint failed: " + e.EndPoint + ", " + e.FailureType +(e.Exception == null ? "" : (", " + e.Exception.Message))); + } + + /// + /// 更改集群 + /// + /// + /// + private static void MuxerHashSlotMoved(object sender, HashSlotMovedEventArgs e) + { + //LogHelper.SafeLogMessage("HashSlotMoved:NewEndPoint" + e.NewEndPoint + ", OldEndPoint" + e.OldEndPoint); + } + + /// + /// redis类库错误 + /// + /// + /// + private static void MuxerInternalError(object sender, InternalErrorEventArgs e) + { + //LogHelper.SafeLogMessage("InternalError:Message" + e.Exception.Message); + } + + //场景不一样,选择的模式便会不一样,大家可以按照自己系统架构情况合理选择长连接还是Lazy。 + //建立连接后,通过调用ConnectionMultiplexer.GetDatabase 方法返回对 Redis Cache 数据库的引用。从 GetDatabase 方法返回的对象是一个轻量级直通对象,不需要进行存储。 + + /// + /// 使用的是Lazy,在真正需要连接时创建连接。 + /// 延迟加载技术 + /// 微软azure中的配置 连接模板 + /// + //private static Lazy lazyConnection = new Lazy(() => + //{ + // //var options = ConfigurationOptions.Parse(constr); + // options.ClientName = GetAppName(); // only known at runtime + // //options.AllowAdmin = true; + // //return ConnectionMultiplexer.Connect(options); + // ConnectionMultiplexer muxer = ConnectionMultiplexer.Connect(Coonstr); + // muxer.ConnectionFailed += MuxerConnectionFailed; + // muxer.ConnectionRestored += MuxerConnectionRestored; + // muxer.ErrorMessage += MuxerErrorMessage; + // muxer.ConfigurationChanged += MuxerConfigurationChanged; + // muxer.HashSlotMoved += MuxerHashSlotMoved; + // muxer.InternalError += MuxerInternalError; + // return muxer; + //}); + + + #region 当作消息代理中间件使用 一般使用更专业的消息队列来处理这种业务场景 + + /// + /// 当作消息代理中间件使用 + /// 消息组建中,重要的概念便是生产者,消费者,消息中间件。 + /// + /// + /// + /// + public static long Publish(string channel, string message) + { + ISubscriber sub = Instance.GetSubscriber(); + //return sub.Publish("messages", "hello"); + return sub.Publish(channel, message); + } + + /// + /// 在消费者端得到该消息并输出 + /// + /// + /// + public static void Subscribe(string channelFrom) + { + ISubscriber sub = Instance.GetSubscriber(); + sub.Subscribe(channelFrom, (channel, message) => + { + Console.WriteLine((string)message); + }); + } + + #endregion + + + + /// + /// 获取全部终结点 + /// + /// + public static EndPoint[] GetEndPoints() + { + EndPoint[] endpoints = Instance.GetEndPoints(); + return endpoints; + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/RedisManager.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/RedisManager.cs new file mode 100644 index 0000000..fe5e9eb --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Configs/RedisManager.cs @@ -0,0 +1,32 @@ +using StackExchange.Redis; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; + +namespace Himp.TaskScheduling +{ + public class RedisManager : DomainService + { + private readonly IConnectionMultiplexer _redis; + + public RedisManager(IConnectionMultiplexer redis) + { + _redis = redis; + } + + public async Task SetValueAsync(string key, string value) + { + var db = _redis.GetDatabase(); + await db.StringSetAsync(key, value); + } + + public async Task GetValueAsync(string key) + { + var db = _redis.GetDatabase(); + return await db.StringGetAsync(key); + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/AutoSamplingCondition.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/AutoSamplingCondition.cs new file mode 100644 index 0000000..d84502a --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/AutoSamplingCondition.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + /// + /// + /// + public class AutoSamplingCondition : Entity + { + public int ConditionType { get; set; } + + public string ConditionName { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/DataReportManager.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/DataReportManager.cs new file mode 100644 index 0000000..7502ac3 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/DataReportManager.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling.Datas +{ + public class DataReportManager + { + + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/FullWaterComp.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/FullWaterComp.cs new file mode 100644 index 0000000..651255a --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/FullWaterComp.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + public class FullWaterComp : Entity + { + /// + /// + /// + public string Type { get; set; } + + public string Index { get; set; } + + public decimal Value { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/ManualTestingJobRec.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/ManualTestingJobRec.cs new file mode 100644 index 0000000..0817ac9 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/ManualTestingJobRec.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling.Datas +{ + /// + /// 手工化验作业记录 + /// + public class ManualTestingJobRec : Entity + { + public string TestingCode { get; set; } + + public string TestingProject { get; set; } + + public DateTime TestingDate { get; set; } + + public string Operator { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/SamplePreparationRec.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/SamplePreparationRec.cs new file mode 100644 index 0000000..8051c2d --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/SamplePreparationRec.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling.Datas +{ + public class SamplePreparationRec : Entity + { + public string MachineCode { get; set; } + + public int AtuoSmapleFlag { get; set; } + + public string SampleID { get; set; } + + public string PackCode { get; set; } + + public int ZYWeight { get; set; } + + public int ZYType { get; set; } + + public int SampleType { get; set; } + public int Size { get; set; } + + public int Water { get; set; } + + public DateTime StartTime { get; set; } + + public DateTime EndTime { get; set; } + + public int SampleWeight { get; set; } + + public string UserName { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/ZYOperateRecord.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/ZYOperateRecord.cs new file mode 100644 index 0000000..978f49a --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Datas/ZYOperateRecord.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling.Datas +{ + public class ZYOperateRecord : Entity + { + public string Record { get; set; } + + public string MachineCode { get; set; } + + public string PersonId { get; set; } + + public string Name { get; set; } + + public DateTime DateTime { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Msgs/EventMsgRec.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Msgs/EventMsgRec.cs new file mode 100644 index 0000000..4a10250 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Msgs/EventMsgRec.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Runtime.InteropServices.JavaScript; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Himp.TaskScheduling +{ + /// + /// 消息接收记录 + /// + public class EventMsgRec : AuditedAggregateRoot, IMultiTenant + { + /// + /// 全路径 + /// + public string TopicFullPath { get; set; } + + /// + /// 消息类型 + /// + public string MsgTopicName { get; set; } + + /// + /// 消息内容 + /// + public string MsgCont { get; set; } + + /// + /// + /// + public EnumEventMsgOperStas EventMsgOperStas { get; set; } + + #region 消息内容 + + ///// + ///// 消息发送人ID + ///// + //[Column("MSG_SEND_USERID")] + //public Guid? MsgSendUserid { get; set; } + + ///// + ///// 消息发送人名称 + ///// + //[Column("MSG_SEND_USERNAME")] + //public string? MsgSendUsername { get; set; } + + ///// + ///// 消息发送部门Id + ///// + //[Column("MSG_SEND_DEPTID")] + //public Guid? MsgSendDeptid { get; set; } + + ///// + ///// 消息发送科室名称 + ///// + //[Column("MSG_SEND_DEPTNAME")] + //public string? MsgSendDeptname { get; set; } + + ///// + ///// 消息接收科室ID + ///// + //[Column("MSG_RECV_DEPTID")] + //public string? MsgRecvDeptid { get; set; } + + ///// + ///// 消息接收科室名称 + ///// + //[Column("MSG_RECV_DEPTNAME")] + //public string? MsgRecvDeptname { get; set; } + + ///// + ///// 消息接收人员Id + ///// + //[Column("MSG_RECV_USERID")] + //public Guid? MsgRecvUserid { get; set; } + + ///// + ///// 消息接收人员Code + ///// + //[Column("MSG_RECV_USERNAME")] + //public string? MsgRecvUsername { get; set; } + + ///// + ///// 消息状态 + ///// + //[Column("MSG_STATS")] + //public EnumMsgStats MsgStats { get; set; } + + ///// + ///// 消息接收方式 + ///// 默认 + ///// 锁屏 + ///// 报警 + ///// + //[Column("MSG_LV")] + //public EnumMsgLv MsgLv { get; set; } + + ///// + ///// 业务编号 + ///// + //[Column("BIZ_NO")] + //public string? BizNo { get; set; } + + //public List? MsgReadRecs { get; set; } + + #endregion + + /// + /// + /// + public Guid? TenantId { get; set; } + + /// + /// + /// + public EventMsgRec() + { + + } + + /// + /// + /// + /// + /// + public EventMsgRec(string topicFullPath, string msgTopicName, string msgCont) + { + TopicFullPath = topicFullPath; + MsgTopicName = msgTopicName; + MsgCont = msgCont; + EventMsgOperStas = EnumEventMsgOperStas.未处理; + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Msgs/EventMsgRecOper.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Msgs/EventMsgRecOper.cs new file mode 100644 index 0000000..6b54dc3 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Msgs/EventMsgRecOper.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Entities.Auditing; +using Volo.Abp.MultiTenancy; + +namespace Himp.TaskScheduling +{ + /// + /// 事件消息操作记录 + /// + public class EventMsgRecOper : AuditedEntity, IMultiTenant + { + /// + /// + /// + public EventMsgRec EventMsgRec { get; set; } + + /// + /// + /// + public Guid EventMsgRecId { get; set; } + + /// + /// 操作日志 + /// + public string OperLog { get; set; } + + /// + /// + /// + public Guid? TenantId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Msgs/EventMsgTopic.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Msgs/EventMsgTopic.cs new file mode 100644 index 0000000..5fc9c05 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Msgs/EventMsgTopic.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace Himp.TaskScheduling +{ + /// + /// 事件消息主题 + /// + public class EventMsgTopic : Entity, IMultiTenant, ISoftDelete + { + /// + /// + /// + public string EventMsgTopicCodg { get; set; } + + /// + /// + /// + public string EventMsgTopicName { get; set; } + + /// + /// + /// + public string TopicFullPath { get; set; } + + /// + /// + /// + public int Srtno { get; set; } + + /// + /// + /// + public int LvIndex { get; set; } + + /// + /// + /// + public bool DefaultFlag { get; set; } + + /// + /// + /// + public Guid? ParentId { get; set; } + + /// + /// + /// + public EventMsgTopic? Parent { get; set; } + + /// + /// 上级菜单 + /// + public List Children { get; set; } + + /// + /// + /// + public Guid? TenantId { get; set; } + + /// + /// + /// + public bool IsDeleted { get; set; } + + public EventMsgTopic() + { + + } + + /// + /// + /// + /// + /// + /// + public EventMsgTopic(string topicCodg, string eventMsgTopicName, int srtno) + { + EventMsgTopicCodg = topicCodg; + EventMsgTopicName = eventMsgTopicName; + Srtno = srtno; + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/CmDeviceControl.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/CmDeviceControl.cs new file mode 100644 index 0000000..9ea09e7 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/CmDeviceControl.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling.Tasks +{ + /// + /// 设备控制 + /// + public class CmDeviceControl : Entity + { + public string DEVICE { get; set; } + + public int ENABLE { get; set; } + + public DateTime? BETIME { get; set; } + + public DateTime? TOTIME { get; set; } + + public string? REMARK { get; set; } + + public DateTime UPTIME { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SampleObtainTask.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SampleObtainTask.cs new file mode 100644 index 0000000..cb8e0b6 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SampleObtainTask.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + /// + /// 取样任务表 + /// + public class SampleObtainTask : Entity + { + /// + /// 任务类型 + /// 1.人工化验 + /// 2.抽查取样 + /// + public int TaskType { get; set; } + + /// + /// 煤样入场时间 + /// + public DateTime CoalTime { get; set; } + + /// + /// 任务状态 + /// + public int TaskState { get; set; } + + /// + /// 结束状态 + /// + public bool TaskEndFlag { get; set; } + + /// + /// 任务开始时间 + /// + public DateTime TaskStartTime { get; set; } + + /// + /// 任务结束时间 + /// + public DateTime TaskEndTime { get; set; } + + /// + /// 供应商编码 + /// + public string CustCode { get; set; } + + /// + /// 采样码 + /// + public string SampleCode { get; set; } + + /// + /// 制样码 + /// + public string SamplePreparationCode { get; set; } + + /// + /// 化验码 + /// + public string AssayCode { get; set; } + + /// + /// 抽样码 + /// + public string ExtractCode { get; set; } + + /// + /// 分样码 + /// + public string SeparateCode { get; set; } + + /// + /// 煤样类型 + /// 1:0.2mm1(分析样) + /// + public int CoalType { get; set; } + + /// + /// 操作人编码 + /// + public string Opercode { get; set; } + + /// + /// 操作人名称 + /// + public string Opername { get; set; } + + /// + /// 化验项目 + /// + public string[] TestItemCode { get; set; } + + /// + /// 备注 + /// + public string task_remark { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SamplePreparationPlan.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SamplePreparationPlan.cs new file mode 100644 index 0000000..4158f7d --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SamplePreparationPlan.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + /// + /// + /// + public class SamplePreparationPlan : Entity + { + public string ParName { get; set; } + + public string ParValue { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SamplePreparationResult.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SamplePreparationResult.cs new file mode 100644 index 0000000..b71a66f --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SamplePreparationResult.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + /// + /// 制样结果 + /// + public class SamplePreparationResult : Entity + { + /// + /// + /// + public string SampeWay { get; set; } + + /// + /// + /// + public string SampeEqp { get; set; } + + /// + /// + /// + public DateTime Begtime { get; set; } + + /// + /// + /// + public DateTime? Endtime { get; set; } + + /// + /// + /// + public string? BottomCode61 { get; set; } + + /// + /// + /// + public float Weight61Bottles { get; set; } + + /// + /// + /// + public string? BottomCode62 { get; set; } + + /// + /// + /// + public float Weight62Bottles { get; set; } + + public string? BottomCode31 { get; set; } + + public float Weight31Bottles { get; set; } + + public string? BottomCode21 { get; set; } + + public float Weight21Bottles { get; set; } + + public string? BottomCode22 { get; set; } + + public float Weight22Bottles { get; set; } + + public float TotalCoalSampleWeight { get; set; } + + /// + /// 3 弃料重量 + /// + public float Weight6Rejects { get; set; } + + /// + /// 2 弃料重量 + /// + public float Weight3Rejects { get; set; } + + /// + /// 2 弃料重量 + /// + public float Weight2Rejects { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SamplePreparationTask.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SamplePreparationTask.cs new file mode 100644 index 0000000..2bae8ff --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SamplePreparationTask.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + /// + /// 制样任务 + /// + public class SamplePreparationTask : Entity + { + /// + /// 制样码 + /// + public string SampleCode { get; set; } + + /// + /// 任务下达时间 + /// + public DateTime TaskAssgnTime { get; set; } + + /// + /// 制样方式 + /// + public string? SampeWay { get; set; } + + /// + /// 任务接收时间 + /// + public DateTime? TaskRecptTime { get; set; } + + /// + /// 最后操作时间 + /// + public DateTime LastOperTime { get; set; } + + /// + /// 任务状态 + /// + public string ExecStas { get; set; } + + public SamplePreparationTask() + { + + } + + public SamplePreparationTask(string id, string sampleCode) + { + Id = id; + SampleCode = sampleCode; + SampeWay = "自动"; + LastOperTime = TaskAssgnTime = DateTime.Now; + ExecStas = "就绪"; + } + + public void ReSet(string sampleCode) + { + SampleCode = sampleCode; + LastOperTime = TaskAssgnTime = DateTime.Now; + ExecStas = "就绪"; + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SampleTestTask.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SampleTestTask.cs new file mode 100644 index 0000000..1f848b1 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/SampleTestTask.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + /// + /// 化验任务 + /// + public class SampleTestTask : Entity + { + /// + /// 制样码 + /// + public string SampleCode { get; set; } + + /// + /// 化验码 + /// + public string TestCode { get; set; } + + /// + /// 瓶底码 + /// + public string BottomCode { get; set; } + + /// + /// 煤样类型 + /// + public string SampleType { get; set; } + + /// + /// 测定次数 + /// + public int TestCnt { get; set; } + + /// + /// 任务下达时间 + /// + public DateTime TaskAssgnTime { get; set; } + + /// + /// 任务接收时间 + /// + public DateTime? TaskRecptTime { get; set; } + + /// + /// 最后操作时间 + /// + public DateTime LastOperTime { get; set; } + + /// + /// 化验项目 + /// + public string TestItems { get; set; } + + /// + /// 任务状态 + /// + public string ExecStas { get; set; } + + /// + /// 手工取样标识 + /// + public int ManualFlag { get; set; } + + public SampleTestTask() + { } + + public SampleTestTask(string sampleCode, string testCode, string bottomCode + , string sampletype, int testCnt, string testItems ,int manualFlag) + { + SampleCode = sampleCode; + TestCode = testCode; + BottomCode = bottomCode; + SampleType = sampletype; + TestCnt = testCnt; + TestItems = testItems; + TaskAssgnTime = DateTime.Now; + LastOperTime = DateTime.Now; + ExecStas = "就绪"; + ManualFlag = manualFlag; + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/StandardTestItem.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/StandardTestItem.cs new file mode 100644 index 0000000..13cda18 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/StandardTestItem.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + public class StandardTestItem : Entity + { + public string TestItems { get; set; } + + public string SampleType { get; set; } + + public bool ValiFlag { get; set; } + + public StandardTestItem() + { + + } + + public StandardTestItem(long id, string testItem) + { + TestItems = testItem; + Id = id; + ValiFlag = false; + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/StandardTestTask.cs b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/StandardTestTask.cs new file mode 100644 index 0000000..150b542 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/TaskScheduling/Tasks/StandardTestTask.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + /// + /// 标准化验任务 + /// + public class StandardTestTask : Entity + { + /// + /// 制样码 + /// + public string SampleCode { get; set; } + + /// + /// 化验码 + /// + public string TestCode { get; set; } + + /// + /// 瓶底码 + /// + public string BottomCode { get; set; } + + /// + /// 煤样类型 + /// + public string Sampletype { get; set; } + + /// + /// 任务类别 + /// + public EnumTaskType TaskType { get; set; } + + /// + /// 制样方式 + /// 手工 + /// 自动 + /// + public string SampeWay { get; set; } + + /// + /// 测定次数 + /// + public int TestCnt { get; set; } + + /// + /// 任务下达时间 + /// + public DateTime TaskAssgnTime { get; set; } + + /// + /// 最后操作时间 + /// + public DateTime LastOperTime { get; set; } + + /// + /// 审核人 + /// + public string? Auditor { get; set; } + + /// + /// 审核时间 + /// + public DateTime? AuditTime { get; set; } + + /// + /// 任务状态 + /// + public string ExecStas { get; set; } + + /// + /// + /// + /// + public void SetAduit(string auditor) + { + Auditor = auditor; + AuditTime = DateTime.Now; + ExecStas = "就绪"; + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/Workflows/ActiviProcessModel.cs b/src/Himp.TaskScheduling.Domain/Himp/Workflows/ActiviProcessModel.cs new file mode 100644 index 0000000..ccd85ae --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/Workflows/ActiviProcessModel.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + /// + /// Activi7流程模型 + /// + public class ActiviProcessModel + { + /// + /// Id + /// + public string id_ { get; set; } + + /// + /// 名称 + /// + public string name_ { get; set; } + + /// + /// 版本 + /// + public int version_ { get; set; } + + /// + /// + /// + public string editor_SOURCE_EXTRA_VALUE_ID_ { get; set; } + + /// + /// + /// + public string editor_SOURCE_VALUE_ID_ { get; set; } + + /// + /// 最后修改时间 + /// + public string? last_UPDATE_TIME_ { get; set; } + + /// + /// 创建时间 + /// + public string create_TIME_ { get; set; } + + /// + /// + /// + public int? suspension_STATE_ { get; set; } + + /// + /// + /// + public string? deployment_ID_ { get; set; } + + /// + /// + /// + public string? definition_Id_ { get; set; } + + /// + /// + /// + public string? deploy_KEY_ { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/Workflows/ActiviWorkflowManager.cs b/src/Himp.TaskScheduling.Domain/Himp/Workflows/ActiviWorkflowManager.cs new file mode 100644 index 0000000..1798797 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/Workflows/ActiviWorkflowManager.cs @@ -0,0 +1,488 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net.Http; +using System.Net.Http.Json; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; +using System.Xml.Linq; +using Volo.Abp.Data; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Domain.Services; + +namespace Himp.TaskScheduling +{ + public class ActiviWorkflowManager : DomainService, IWorkflowManager + { + private readonly IHttpClientFactory _httpClientFactory; + private string _baseUrl = "http://112.33.34.123:8084/workflow"; + + /// + /// + /// + /// + public ActiviWorkflowManager(IHttpClientFactory httpClientFactory) + { + _httpClientFactory = httpClientFactory; + } + + /// + /// 工作流模型获取 + /// + /// + public async Task> GetWorkflowModel(int? status) + { + List processModels = new List(); + var client = _httpClientFactory.CreateClient(); + var url = string.Empty; + + switch (status) + { + case 1: url = $"{_baseUrl}/flow/isdeloy"; break; //部署 + case 2: url = $"{_baseUrl}/flow/notdeloy"; break; //未部署 + default: url = $"{_baseUrl}/flow/actremodel"; break; //全部 + } + + var responseModel = await client.GetAsync(url); + + if (responseModel.StatusCode == System.Net.HttpStatusCode.OK) + { + var activiProcessModels = await responseModel.Content.ReadFromJsonAsync>(); + + foreach (var item in activiProcessModels) + { + WorkflowModel processModel = new WorkflowModel(item.id_, item.name_, item.version_, item.create_TIME_); + processModel.LastUpdateTime = item.last_UPDATE_TIME_; + processModel.WorkflowModelStas = item.suspension_STATE_.HasValue ? (EnumWorkflowModelStas)item.suspension_STATE_ : EnumWorkflowModelStas.未部署; + processModel.DeploymentId = item.definition_Id_; + processModel.DeployKey = item.deploy_KEY_; + processModel.EditorSourceExtraValueId = item.editor_SOURCE_EXTRA_VALUE_ID_; + processModel.EditorSourceValueId = item.editor_SOURCE_VALUE_ID_; + processModels.Add(processModel); + } + } + + return processModels; + } + + /// + /// 删除工作流模型 + /// + /// + /// + public async Task DeleteWorkflowModel(string id) + { + WorkflowInstanceStas workflowInstanceStas = new WorkflowInstanceStas(); + var client = _httpClientFactory.CreateClient(); + var url = $"{_baseUrl}/flow/deleteModel"; + var req = new { modelId = id }; + + var responseModel = await client.PostAsJsonAsync(url, req); + + if (responseModel.StatusCode == System.Net.HttpStatusCode.OK) + { + var resultString = await responseModel.Content.ReadAsStringAsync(); + workflowInstanceStas.Msg = resultString; + } + else + { + workflowInstanceStas.Code = -1; + workflowInstanceStas.Msg = responseModel.ReasonPhrase; + } + + return workflowInstanceStas; + } + + /// + /// 部署工作流模型 + /// + /// + /// + public async Task DeployWorkflowModel(string id, string workflowName) + { + WorkflowInstanceStas workflowInstanceStas = new WorkflowInstanceStas(); + var client = _httpClientFactory.CreateClient(); + var url = $"{_baseUrl}/flow/deploy"; + var req = new + { + modelId = id, + processName = workflowName + }; + + var responseModel = await client.PostAsJsonAsync(url, req); + + if (responseModel.StatusCode == System.Net.HttpStatusCode.OK) + { + var resultString = await responseModel.Content.ReadAsStringAsync(); + workflowInstanceStas.Msg = resultString; + } + else + { + workflowInstanceStas.Code = -1; + workflowInstanceStas.Msg = responseModel.ReasonPhrase; + } + + return workflowInstanceStas; + } + + /// + /// 激活/挂起工作流 + /// + /// + public async Task ActivateWorkflowModel(string deploymentKey) + { + WorkflowInstanceStas workflowInstanceStas = new WorkflowInstanceStas(); + var client = _httpClientFactory.CreateClient(); + var url = $"{_baseUrl}/flow/activateOrPend"; + + var req = new + { + deploymentKey + }; + + var responseModel = await client.PostAsJsonAsync(url, req); + + if (responseModel.StatusCode == System.Net.HttpStatusCode.OK) + { + var resultString = await responseModel.Content.ReadAsStringAsync(); + workflowInstanceStas.Msg = resultString; + } + else + { + workflowInstanceStas.Code = -1; + workflowInstanceStas.Msg = responseModel.ReasonPhrase; + } + + return workflowInstanceStas; + } + + /// + /// 获取流程实例 + /// + /// + /// + /// + /// + public async Task> GetProcessInstance(string startTime, string endTime, EnumWorkflowInstanceStas status) + { + List processInstances = new List(); + var client = _httpClientFactory.CreateClient(); + var url = string.Empty; + + switch (status) + { + case EnumWorkflowInstanceStas.激活: url = $"{_baseUrl}/monitor/queryactive"; break; //激活 + case EnumWorkflowInstanceStas.挂起: url = $"{_baseUrl}/monitor/querypend"; break; //挂起 + case EnumWorkflowInstanceStas.完成: url = $"{_baseUrl}/monitor/completed"; break; //完成 + default: url = $"{_baseUrl}/monitor/queryactive"; break; //激活 + } + + var reqPars = new + { + startTime, + endTime, + }; + + var request = new HttpRequestMessage(HttpMethod.Get, url); + request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(reqPars), null, "application/json"); + var responseModel = await client.SendAsync(request); + + if (responseModel.StatusCode == System.Net.HttpStatusCode.OK) + { + var activiProcessModels = await responseModel.Content.ReadFromJsonAsync>(); + + foreach (var item in activiProcessModels) + { + //获取流程模型对应的类别 + WorkflowInstance workflowInstance = new WorkflowInstance(); + workflowInstance.Id = item.id; + workflowInstance.ProcessInstanceId = item.ProcessInstanceId; + workflowInstance.Begintime = item.processStartTime; + workflowInstance.Fintime = item.processEndTime; + workflowInstance.WorkflowModelKey = item.modelId; + workflowInstance.WorkflowInstanceName = item.modelName; + workflowInstance.WorkflowInstanceContdesc = Newtonsoft.Json.JsonConvert.SerializeObject(item.variableMap); + StringBuilder workflowInstanceContdescSb = new StringBuilder(); + + foreach (var variableMap in item.variableMap) + { + var key = variableMap.Key; + StringBuilder valueSB = new StringBuilder(); + var je = (JsonElement)variableMap.Value; + List workflowTypeStColumns = new List(); + + var workflowTypeStColumn = workflowTypeStColumns.FirstOrDefault(w => w.Index == key); + + if (workflowTypeStColumn != null) + { + workflowInstanceContdescSb.Append(workflowTypeStColumn.Title); + } + else + { + workflowInstanceContdescSb.Append(key); + } + + workflowInstanceContdescSb.Append(":"); + + if (je.ValueKind == JsonValueKind.Array) + { + foreach (JsonElement element in je.EnumerateArray()) + { + workflowInstanceContdescSb.Append(" "); + workflowInstanceContdescSb.Append(element.ToString()); + } + } + else + { + workflowInstanceContdescSb.Append(je.ToString()); + } + + workflowInstanceContdescSb.AppendLine(" "); + } + + workflowInstance.WorkflowInstanceContdesc = workflowInstanceContdescSb.ToString(); + workflowInstance.CurrNodeCodg = item.taskId; + workflowInstance.CurrNodeName = item.taskName; + workflowInstance.WorkflowInstanceStas = (EnumWorkflowInstanceStas)item.suspensionCode; + + processInstances.Add(workflowInstance); + } + } + + return processInstances; + } + + /// + /// 获取流程实例 + /// + /// + /// + /// + /// + public async Task> GetTodoTask(string userId) + { + List processInstances = new List(); + var client = _httpClientFactory.CreateClient(); + var url = $"{_baseUrl}/audit/notaudit"; + var reqPars = new + { + workId = userId + }; + + var request = new HttpRequestMessage(HttpMethod.Get, url); + request.Content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(reqPars), null, "application/json"); + var responseModel = await client.SendAsync(request); + + if (responseModel.StatusCode == System.Net.HttpStatusCode.OK) + { + processInstances = await responseModel.Content.ReadFromJsonAsync>(); + } + + return processInstances; + } + + /// + /// 启动工作流程实例 + /// + /// + /// + /// + /// + /// + public async Task StartWorkflowInstance(string processDefinitionId, Dictionary> assocUsers, string startId, Dictionary bizPars) + { + WorkflowInstanceStas res = new WorkflowInstanceStas(); + var client = _httpClientFactory.CreateClient(); + var url = $"{_baseUrl}/application/start"; + + Dictionary reqPars = new Dictionary(); + reqPars.Add("startId", startId); + reqPars.Add("processDefinitionId", processDefinitionId); + reqPars.Add("groupCode", assocUsers); + reqPars.Add("businessVariables", bizPars); + + var responseModel = await client.PostAsJsonAsync(url, reqPars); + + if (responseModel.StatusCode == System.Net.HttpStatusCode.OK) + { + var resultString = await responseModel.Content.ReadAsStringAsync(); + res.Msg = resultString; + + return res; + } + else + { + res.Code = -1; + res.Msg = responseModel.ReasonPhrase; + return res; + } + } + + /// + /// 流程执行 + /// + /// + /// + /// + /// + public async Task ExecWorkflowInstance(string processInstanceId, string userId, Dictionary bizPars) + { + WorkflowInstanceStas res = new WorkflowInstanceStas(); + var client = _httpClientFactory.CreateClient(); + var url = $"{_baseUrl}/monitor/claimTask"; + + Dictionary reqPars = new Dictionary(); + reqPars.Add("processinstanceid", processInstanceId); + reqPars.Add("workId", userId); + reqPars.Add("businessVariables", bizPars); + + var responseModel = await client.PostAsJsonAsync(url, reqPars); + + if (responseModel.StatusCode == System.Net.HttpStatusCode.OK) + { + var resultString = await responseModel.Content.ReadAsStringAsync(); + res.Msg = resultString; + + return res; + } + else + { + res.Code = -1; + res.Msg = responseModel.ReasonPhrase; + return res; + } + } + + /// + /// + /// + /// + /// + public async Task> GetProcessInstance(EnumWorkflowInstanceStas status) + { + List processInstances = new List(); + var client = _httpClientFactory.CreateClient(); + var url = string.Empty; + + switch (status) + { + case EnumWorkflowInstanceStas.激活: url = $"{_baseUrl}/monitor/queryactive"; break; //激活 + case EnumWorkflowInstanceStas.挂起: url = $"{_baseUrl}/monitor/querypend"; break; //挂起 + case EnumWorkflowInstanceStas.完成: url = $"{_baseUrl}/monitor/completed"; break; //完成 + default: url = $"{_baseUrl}/monitor/queryactive"; break; //激活 + } + + var responseModel = await client.GetAsync(url); + + if (responseModel.StatusCode == System.Net.HttpStatusCode.OK) + { + var activiProcessModels = await responseModel.Content.ReadFromJsonAsync>(); + + foreach (var item in activiProcessModels) + { + //获取流程模型对应的类别 + WorkflowInstance workflowInstance = new WorkflowInstance(); + workflowInstance.Id = item.id; + workflowInstance.ProcessInstanceId = item.ProcessInstanceId; + workflowInstance.Begintime = item.processStartTime; + workflowInstance.Fintime = item.processEndTime; + workflowInstance.WorkflowModelKey = item.modelId; + workflowInstance.WorkflowInstanceName = item.modelName; + workflowInstance.WorkflowInstanceContdesc = Newtonsoft.Json.JsonConvert.SerializeObject(item.variableMap); + StringBuilder workflowInstanceContdescSb = new StringBuilder(); + //var workflowModelAssocType = workflowModelAssocTypeQuery.FirstOrDefault(w => w.WorkflowModeId == item.modelId); + + foreach (var variableMap in item.variableMap) + { + var key = variableMap.Key; + StringBuilder valueSB = new StringBuilder(); + var je = (JsonElement)variableMap.Value; + List workflowTypeStColumns = new List(); + + //if (workflowModelAssocType != null) + //{ + // workflowTypeStColumns = workflowModelAssocType.WorkflowType.GetStColumns(); + //} + + var workflowTypeStColumn = workflowTypeStColumns.FirstOrDefault(w => w.Index == key); + + if (workflowTypeStColumn != null) + { + workflowInstanceContdescSb.Append(workflowTypeStColumn.Title); + } + else + { + //continue; + workflowInstanceContdescSb.Append(key); + } + + workflowInstanceContdescSb.Append(":"); + + if (je.ValueKind == JsonValueKind.Array) + { + foreach (JsonElement element in je.EnumerateArray()) + { + workflowInstanceContdescSb.Append(" "); + workflowInstanceContdescSb.Append(element.ToString()); + } + } + else + { + workflowInstanceContdescSb.Append(je.ToString()); + } + + workflowInstanceContdescSb.AppendLine("。"); + } + + workflowInstance.WorkflowInstanceContdesc = workflowInstanceContdescSb.ToString(); + workflowInstance.CurrNodeCodg = item.taskId; + workflowInstance.CurrNodeName = item.taskName; + workflowInstance.WorkflowInstanceStas = (EnumWorkflowInstanceStas)item.suspensionCode; + + processInstances.Add(workflowInstance); + } + } + + return processInstances; + } + + /// + /// + /// + /// + /// + /// + public async Task FinishWorkflowInstance(string workflowInstanceId, string userId) + { + var client = _httpClientFactory.CreateClient(); + var url = $"{_baseUrl}/monitor/claimTask"; + var req = new + { + processinstanceid = workflowInstanceId, + workId = userId + }; + + var responseModel = await client.PostAsJsonAsync(url, req); + + if (responseModel.StatusCode == System.Net.HttpStatusCode.OK) + { + var resultString = await responseModel.Content.ReadAsStringAsync(); + + return resultString; + } + else + { + return string.Empty; + } + } + } + + public class WorkflowInstanceStas + { + public int Code { get; set; } + + public string Msg { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/Workflows/ActivitiProcessInstance.cs b/src/Himp.TaskScheduling.Domain/Himp/Workflows/ActivitiProcessInstance.cs new file mode 100644 index 0000000..7de8ab9 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/Workflows/ActivitiProcessInstance.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + /// + /// Activi7流程实例 + /// + public class ActivitiProcessInstance + { + public string id { get; set; } + + /// + /// 节点名称 + /// + public string taskName { get; set; } + + /// + /// 创建时间 + /// + public string processStartTime { get; set; } + + /// + /// 模型Id + /// + public string modelId { get; set; } + + /// + /// 模型名称 + /// + public string modelName { get; set; } + + /// + /// 节点Id + /// + public string taskId { get; set; } + + /// + /// 流程实例id + /// + public string ProcessInstanceId { get; set; } + + /// + /// 流程实例状态 + /// + public int suspensionCode { get; set; } + + /// + /// 流程实例状态 + /// + public string suspensionState { get; set; } + + /// + /// 完成时间 + /// + public string? processEndTime { get; set; } + + /// + /// + /// + public Dictionary variableMap { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/Workflows/BizflowConfig.cs b/src/Himp.TaskScheduling.Domain/Himp/Workflows/BizflowConfig.cs new file mode 100644 index 0000000..1b8b7bc --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/Workflows/BizflowConfig.cs @@ -0,0 +1,145 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Data; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace Himp.TaskScheduling +{ + /// + /// 业务流配置 + /// + public class BizflowConfig : Entity, IMultiTenant, ISoftDelete, IHasExtraProperties + { + /// + /// 业务流程名称 + /// + public string BizflowName { get; set; } + + /// + /// 业务流程类别代码 + /// + public string BizflowCode { get; set; } + + /// + /// 工作流模型Key + /// 部署Key:版本: + /// + public string WorkflowModelKey { get; set; } + + /// + /// 工作流模型名称 + /// + public string WorkflowModelName { get; set; } + + /// + /// 工作流授权提供器 + /// + public EnumWorkflowTypeProvider WorkflowTypeProvider { get; set; } + + /// + /// 提供值 + /// + public string? ProviderKey { get; set; } + + /// + /// + /// + public List BizflowNodes { get; set; } + + /// + /// 有效标识 + /// + public bool ValiFlag { get; set; } + + /// + /// + /// + public Guid? TenantId { get; set; } + + /// + /// + /// + public bool IsDeleted { get; set; } + + /// + /// + /// + public ExtraPropertyDictionary ExtraProperties { get; set; } + + + public BizflowConfig(string processTypeCodg, string processTypeName) + { + WorkflowModelKey = processTypeCodg; + WorkflowModelName = processTypeName; + ExtraProperties = new ExtraPropertyDictionary(); + } + + public BizflowConfig() + { + ExtraProperties = new ExtraPropertyDictionary(); + } + } + + ///// + ///// + ///// + //public static class WorkflowTypeExtensions + //{ + // private const string StColumn = "StColumn"; + + // public static void SetStColumns(this BizflowConfig item, List pars) + // { + // //var jsonValue = JsonConvert.SerializeObject(pars); + // item.SetProperty(StColumn, pars); + // } + + // public static List GetStColumns(this BizflowConfig item) + // { + // return item.Property>(StColumn); + // } + //} + + /// + /// + /// + public class WorkflowTypeStColumn + { + /// + /// 标题 + /// + public string Title { get; set; } + + /// + /// 类型 + /// + public string Type { get; set; } + + /// + /// 编号 + /// + public string Index { get; set; } + + /// + /// 值类别 + /// + public string ValueKind { get; set; } + + /// + /// 显示列 + /// + public bool ShowColumn { get; set; } + + /// + /// 显示内容描述 + /// + public bool ShowContdesc { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/Workflows/BizflowNode.cs b/src/Himp.TaskScheduling.Domain/Himp/Workflows/BizflowNode.cs new file mode 100644 index 0000000..049ceba --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/Workflows/BizflowNode.cs @@ -0,0 +1,174 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; +using Volo.Abp; + +namespace Himp.TaskScheduling +{ + /// + /// 业务流节点 + /// + public class BizflowNode : Entity, IMultiTenant, ISoftDelete, IHasExtraProperties + { + /// + /// + /// + public Guid BizflowConfigId { get; set; } + + /// + /// + /// + public BizflowConfig BizflowConfig { get; set; } + + /// + /// 工作流节点Key + /// + public string WorkflowNodeKey { get; set; } + + /// + /// 工作流节点名称 + /// + public string WorkflowNodeName { get; set; } + + /// + /// 流程节点类别 + /// + public EnumBizflowNodeType WorkflowNodeType { get; set; } + + /// + /// 节点序号 + /// + public int WorkflowIndex { get; set; } + + /// + /// schema + /// + public string? SchemaUI { get; set; } + + /// + /// + /// + public string? AssigneeParName { get; set; } + + /// + /// + /// + public string? CaudidateUsersParName { get; set; } + + /// + /// + /// + public string? CaudidateGroupsParName { get; set; } + + /// + /// + /// + public string[] AssigneeDefValues { get; set; } + + /// + /// 候选用户 + /// + public string[] CandidateUsersDefValues { get; set; } + + /// + /// 候选组 + /// + public string[] CandidateGroupsDefValues { get; set; } + + /// + /// 组件 + /// + public string? Component { get; set; } + + /// + /// + /// + public bool ValiFlag { get; set; } + + /// + /// 可审核 + /// + public bool CanAuditFlag { get; set; } + + /// + /// 可驳回 + /// + public bool CanRejectFlag { get; set; } + + /// + /// 可编辑 + /// + public bool CanEditFlag { get; set; } + + /// + /// + /// + public Guid? TenantId { get; set; } + + /// + /// + /// + public bool IsDeleted { get; set; } + + /// + /// + /// + public ExtraPropertyDictionary ExtraProperties { get; set; } + + /// + /// 业务流程关联候选人列表 + /// + public List BizflowNodeAssocCandidateUsers { get; set; } + + public BizflowNode() + { + ExtraProperties = new ExtraPropertyDictionary(); + } + + public BizflowNode(Guid workflowTypeId, string workflowModelId, string processNodeName, EnumBizflowNodeType workflowNodeType) + { + //WorkflowAssocBizflowId = workflowTypeId; + WorkflowNodeType = workflowNodeType; + //SchemaUI = schema; + ExtraProperties = new ExtraPropertyDictionary(); + } + } + + ///// + ///// + ///// + //public static class WorkflowNodeExtensions + //{ + // private const string SFSchema = "SFSchema"; + + // public static void SetStColumns(this BizflowNode item, List pars) + // { + // item.SetProperty(SFSchema, pars); + // } + + // public static List GetStColumns(this BizflowNode item) + // { + // return item.Property>(SFSchema); + // } + //} + + public class WorkflowNodeSFSchema + { + public string PropertyName { get; set; } + + public string Type { get; set; } + + public string Title { get; set; } + + public string? Format { get; set; } + + public int? MaxLength { get; set; } + + public int? MinLength { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/Workflows/BizflowNodeAssocCandidateUser.cs b/src/Himp.TaskScheduling.Domain/Himp/Workflows/BizflowNodeAssocCandidateUser.cs new file mode 100644 index 0000000..2ba01c2 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/Workflows/BizflowNodeAssocCandidateUser.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace Himp.TaskScheduling +{ + /// + /// 业务流程关联候选人 + /// + public class BizflowNodeAssocCandidateUser : Entity, IMultiTenant + { + /// + /// + /// + public BizflowNode BizflowNode { get; set; } + + /// + /// + /// + public Guid BizflowNodeId { get; set; } + + /// + /// + /// + public string UserCode { get; set; } + + /// + /// + /// + public string UserName { get; set; } + + /// + /// + /// + public Guid? TenantId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/Workflows/IWorkflowManager.cs b/src/Himp.TaskScheduling.Domain/Himp/Workflows/IWorkflowManager.cs new file mode 100644 index 0000000..a8ab9f7 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/Workflows/IWorkflowManager.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public interface IWorkflowManager + { + + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/Workflows/WorkflowInstance.cs b/src/Himp.TaskScheduling.Domain/Himp/Workflows/WorkflowInstance.cs new file mode 100644 index 0000000..feb0b5f --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/Workflows/WorkflowInstance.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Data; + +namespace Himp.TaskScheduling +{ + /// + /// 工作流实例 + /// + public class WorkflowInstance : IHasExtraProperties + { + /// + /// + /// + public string Id { get; set; } + + /// + /// 工作流程模型Key + /// + public string WorkflowModelKey { get; set; } + + /// + /// 工作流实例编码 + /// + public string ProcessInstanceId { get; set; } + + /// + /// 流程实例名称 + /// + public string WorkflowInstanceName { get; set; } + + /// + /// 流程实例内容描述 + /// + public string WorkflowInstanceContdesc { get; set; } + + /// + /// 开始时间 + /// + public string Begintime { get; set; } + + /// + /// 当前节点编码 + /// + public string CurrNodeCodg { get; set; } + + /// + /// 当前节点名称 + /// + public string CurrNodeName { get; set; } + + /// + /// 状态 + /// + public EnumWorkflowInstanceStas WorkflowInstanceStas { get; set; } + + //public DateTime? PlanFintime { get; set; } + + //public bool OvdueFlag { get; set; } + + /// + /// 完成时间 + /// + public string? Fintime { get; set; } + + public virtual ExtraPropertyDictionary ExtraProperties { get; protected set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/Workflows/WorkflowModel.cs b/src/Himp.TaskScheduling.Domain/Himp/Workflows/WorkflowModel.cs new file mode 100644 index 0000000..b62af56 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/Workflows/WorkflowModel.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Entities; + +namespace Himp.TaskScheduling +{ + /// + /// 工作流模型 + /// + public class WorkflowModel + { + /// + /// Id + /// + public string Id { get; private set; } + + /// + /// 模型Key + /// + public string WorkflowModelKey { get; set; } + + /// + /// 模型名称 + /// + public string WorkflowModelName { get; private set; } + + /// + /// 版本号 + /// + public int Version { get; private set; } + + /// + /// 创建时间 + /// + public string CreateTime { get; private set; } + + /// + /// 最后修改时间 + /// + public string? LastUpdateTime { get; set; } + + /// + /// 状态 + /// + public EnumWorkflowModelStas? WorkflowModelStas { get; set; } + + /// + /// 部署id + /// + public string? DeploymentId { get; set; } + + /// + /// 部署key + /// + public string? DeployKey { get; set; } + + /// + /// bpmn文件id + /// + public string? EditorSourceExtraValueId { get; set; } + + /// + /// xml文件id + /// + public string? EditorSourceValueId { get; set; } + + public WorkflowModel(string id, string name, int version, string createTime) + { + Id = id; + WorkflowModelKey = id; + WorkflowModelName = name; + Version = version; + CreateTime = createTime; + } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Himp/Workflows/WorkflowTodoTask.cs b/src/Himp.TaskScheduling.Domain/Himp/Workflows/WorkflowTodoTask.cs new file mode 100644 index 0000000..00bf6e5 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Himp/Workflows/WorkflowTodoTask.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Himp.TaskScheduling +{ + public class WorkflowTodoTask + { + /// + /// + /// + public string Id { get; set; } + + /// + /// 任务名 + /// + public string TaskName { get; set; } + + /// + /// 流程开始时间 + /// + public string ProcessStartTime { get; set; } + + /// + /// + /// + public Dictionary VariableMap { get; set; } + + /// + /// + /// + public string ModelName { get; set; } + + /// + /// + /// + public int SuspensionCode { get; set; } + + /// + /// + /// + public string SuspensionState { get; set; } + + /// + /// + /// + public string ModelId { get; set; } + + /// + /// + /// + public string TaskId { get; set; } + + /// + /// + /// + public string ProcessInstanceId { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.Domain/Settings/TaskSchedulingSettingDefinitionProvider.cs b/src/Himp.TaskScheduling.Domain/Settings/TaskSchedulingSettingDefinitionProvider.cs new file mode 100644 index 0000000..cadfb01 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Settings/TaskSchedulingSettingDefinitionProvider.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Settings; + +namespace Himp.TaskScheduling.Settings; + +public class TaskSchedulingSettingDefinitionProvider : SettingDefinitionProvider +{ + public override void Define(ISettingDefinitionContext context) + { + /* Define module settings here. + * Use names from TaskSchedulingSettings class. + */ + } +} diff --git a/src/Himp.TaskScheduling.Domain/Settings/TaskSchedulingSettings.cs b/src/Himp.TaskScheduling.Domain/Settings/TaskSchedulingSettings.cs new file mode 100644 index 0000000..a715167 --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/Settings/TaskSchedulingSettings.cs @@ -0,0 +1,10 @@ +namespace Himp.TaskScheduling.Settings; + +public static class TaskSchedulingSettings +{ + public const string GroupName = "TaskScheduling"; + + /* Add constants for setting names. Example: + * public const string MySettingName = GroupName + ".MySettingName"; + */ +} diff --git a/src/Himp.TaskScheduling.Domain/TaskSchedulingDbProperties.cs b/src/Himp.TaskScheduling.Domain/TaskSchedulingDbProperties.cs new file mode 100644 index 0000000..cffadad --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/TaskSchedulingDbProperties.cs @@ -0,0 +1,14 @@ +namespace Himp.TaskScheduling; + +public static class TaskSchedulingDbProperties +{ + public static string DbTablePrefix { get; set; } = "TS_"; + + public static string? DbSchema { get; set; } = "TaskScheduling"; + + public const string ConnectionStringName = "TaskScheduling"; + + public const string ConnectionStringRLWebName = "RLWeb"; + + public const string ConnectionStringCoalManagerName = "CoalManager"; +} diff --git a/src/Himp.TaskScheduling.Domain/TaskSchedulingDomainModule.cs b/src/Himp.TaskScheduling.Domain/TaskSchedulingDomainModule.cs new file mode 100644 index 0000000..d5b8d6c --- /dev/null +++ b/src/Himp.TaskScheduling.Domain/TaskSchedulingDomainModule.cs @@ -0,0 +1,29 @@ +using Himp.RL; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Domain; +using Volo.Abp.Modularity; + +namespace Himp.TaskScheduling; + +[DependsOn( + typeof(AbpDddDomainModule), + typeof(TaskSchedulingDomainSharedModule) +)] +public class TaskSchedulingDomainModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(options => + { + + }); + + context.Services.AddAbpDbContext(options => + { + + }); + + base.ConfigureServices(context); + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/ITaskSchedulingDbContext.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/ITaskSchedulingDbContext.cs new file mode 100644 index 0000000..e479a32 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/ITaskSchedulingDbContext.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace Himp.TaskScheduling.EntityFrameworkCore; + +[ConnectionStringName(TaskSchedulingDbProperties.ConnectionStringName)] +public interface ITaskSchedulingDbContext : IEfCoreDbContext +{ + /* Add DbSet for each Aggregate Root here. Example: + * DbSet Questions { get; } + */ +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/TaskSchedulingDbContext.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/TaskSchedulingDbContext.cs new file mode 100644 index 0000000..8e8dcfe --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/TaskSchedulingDbContext.cs @@ -0,0 +1,129 @@ +using Himp.TaskScheduling.Datas; +using Himp.TaskScheduling.Tasks; +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace Himp.TaskScheduling.EntityFrameworkCore; + +[ConnectionStringName(TaskSchedulingDbProperties.ConnectionStringName)] +public class TaskSchedulingDbContext : AbpDbContext, ITaskSchedulingDbContext +{ + /// + /// 参数配置 + /// + public DbSet BizflowConfigs { get; set; } + + /// + /// + /// + public DbSet BizflowNodes { get; set; } + + /// + /// + /// + public DbSet BizflowNodeAssocCandidateUsers { get; set; } + + /// + /// + /// + public DbSet SampleObtainTasks { get; set; } + + /// + /// + /// + public DbSet ParamConfigs { get; set; } + + /// + /// + /// + public DbSet ParamConfigTasks { get; set; } + + /// + /// 制样任务 + /// + public DbSet SamplePreparationTasks { get; set; } + + /// + /// + /// + public DbSet SamplePreparationResults { get; set; } + + /// + /// + /// + public DbSet SamplePreparationPlans { get; set; } + + /// + /// + /// + public DbSet StandardTestTasks { get; set; } + + /// + /// + /// + public DbSet StandardTestItems { get; set; } + + public DbSet SampleTestTasks { get; set; } + + #region 消息 + + /// + /// + /// + public DbSet EventMsgTopics { get; set; } + + /// + /// + /// + public DbSet EventMsgRecs { get; set; } + + #endregion + + public DbSet CodeConversions { get; set; } + + /// + /// + /// + public DbSet CmDeviceControls { get; set; } + + /// + /// + /// + public DbSet ZYOperateRecords { get; set; } + + /// + /// + /// + public DbSet AutoSamplingConditions { get; set; } + + /// + /// + /// + public DbSet ManualTestingJobRecs { get; set; } + + /// + /// + /// + public DbSet FullWaterComps { get; set; } + + /// + /// + /// + /// + public TaskSchedulingDbContext(DbContextOptions options) + : base(options) + { + + } + + /// + /// + /// + /// + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + builder.ConfigureTaskScheduling(); + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/TaskSchedulingDbContextModelCreatingExtensions.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/TaskSchedulingDbContextModelCreatingExtensions.cs new file mode 100644 index 0000000..fea91e2 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/TaskSchedulingDbContextModelCreatingExtensions.cs @@ -0,0 +1,205 @@ +using Himp.TaskScheduling.Datas; +using Himp.TaskScheduling.Tasks; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; +using Volo.Abp.Domain.Entities; +using Volo.Abp.EntityFrameworkCore.Modeling; + +namespace Himp.TaskScheduling.EntityFrameworkCore; + +public static class TaskSchedulingDbContextModelCreatingExtensions +{ + public static void ConfigureTaskScheduling( + this ModelBuilder builder) + { + Check.NotNull(builder, nameof(builder)); + + /* Configure all entities here. Example: + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "Questions", TaskSchedulingDbProperties.DbSchema); + + b.ConfigureByConvention(); + + //Properties + b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); + + //Relations + b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); + + //Indexes + b.HasIndex(q => q.CreationTime); + }); + */ + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "SamplePreparationTasks", TaskSchedulingDbProperties.DbSchema); + + b.ConfigureByConvention(); + b.Property(q => q.Id).HasMaxLength(32); + b.Property(q => q.SampleCode).IsRequired().HasMaxLength(32); + b.Property(q => q.TaskAssgnTime).IsRequired(); + b.Property(q => q.SampeWay).HasMaxLength(16); + b.Property(q => q.ExecStas).IsRequired().HasMaxLength(16); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "StandardTestTasks", TaskSchedulingDbProperties.DbSchema); + b.Property(e => e.Id).ValueGeneratedOnAdd(); + b.ConfigureByConvention(); + + b.Property(q => q.SampleCode).IsRequired().HasMaxLength(32); + b.Property(q => q.TestCode).IsRequired().HasMaxLength(32); + b.Property(q => q.BottomCode).IsRequired().HasMaxLength(32); + b.Property(q => q.Sampletype).HasMaxLength(16); + b.Property(q => q.TaskAssgnTime).IsRequired(); + b.Property(q => q.LastOperTime).IsRequired(); + b.Property(q => q.ExecStas).IsRequired().HasMaxLength(16); + }); + + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "SampleTestTasks", TaskSchedulingDbProperties.DbSchema); + + b.ConfigureByConvention(); + b.Property(e => e.Id).ValueGeneratedOnAdd(); + b.Property(q => q.SampleCode).IsRequired().HasMaxLength(32); + b.Property(q => q.TestCode).IsRequired().HasMaxLength(32); + b.Property(q => q.BottomCode).HasMaxLength(32); + b.Property(q => q.SampleType).HasMaxLength(16); + b.Property(q => q.TaskAssgnTime).IsRequired(); + b.Property(q => q.LastOperTime).IsRequired(); + b.Property(q => q.ExecStas).IsRequired().HasMaxLength(16); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "BizflowConfig", TaskSchedulingDbProperties.DbSchema); + + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "BizflowNode", TaskSchedulingDbProperties.DbSchema); + + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "SampleObtainTask", TaskSchedulingDbProperties.DbSchema); + b.Property(e => e.Id).ValueGeneratedOnAdd(); + + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "SamplePreparationResult", TaskSchedulingDbProperties.DbSchema); + + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "BizflowNodeAssocCandidateUser", TaskSchedulingDbProperties.DbSchema); + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "ParamConfigTask", TaskSchedulingDbProperties.DbSchema); + b.Property(e => e.Id).ValueGeneratedOnAdd(); + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "ParamConfig", TaskSchedulingDbProperties.DbSchema); + b.Property(e => e.Id).ValueGeneratedOnAdd(); + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "SamplePreparationPlan", TaskSchedulingDbProperties.DbSchema); + + b.HasKey(oi => new { oi.Id, oi.ParName }); + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "StandardTestItem", TaskSchedulingDbProperties.DbSchema); + + b.HasKey(oi => new { oi.Id, oi.TestItems }); + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "EventMsgRec", TaskSchedulingDbProperties.DbSchema); + + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "EventMsgTopic", TaskSchedulingDbProperties.DbSchema); + + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "CodeConversion", TaskSchedulingDbProperties.DbSchema); + b.Property(e => e.Id).ValueGeneratedOnAdd(); + + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable("CM_DEVICE_CONTROL", TaskSchedulingDbProperties.DbSchema); + b.Property(e => e.Id).ValueGeneratedOnAdd(); + + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "ZYOperateRecord", TaskSchedulingDbProperties.DbSchema); + + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "AutoSamplingCondition", TaskSchedulingDbProperties.DbSchema); + + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "ManualTestingJobRec", TaskSchedulingDbProperties.DbSchema); + + b.ConfigureByConvention(); + }); + + builder.Entity(b => + { + b.ToTable(TaskSchedulingDbProperties.DbTablePrefix + "FullWaterComp", TaskSchedulingDbProperties.DbSchema); + b.Property(e => e.Id).ValueGeneratedOnAdd(); + b.ConfigureByConvention(); + }); + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/TaskSchedulingEntityFrameworkCoreModule.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/TaskSchedulingEntityFrameworkCoreModule.cs new file mode 100644 index 0000000..49a9475 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/EntityFrameworkCore/TaskSchedulingEntityFrameworkCoreModule.cs @@ -0,0 +1,20 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace Himp.TaskScheduling.EntityFrameworkCore; + +[DependsOn( + typeof(TaskSchedulingDomainModule), + typeof(AbpEntityFrameworkCoreModule) +)] +public class TaskSchedulingEntityFrameworkCoreModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(options => + { + options.AddDefaultRepositories(includeAllEntities: true); + }); + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/FodyWeavers.xml b/src/Himp.TaskScheduling.EntityFrameworkCore/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/FodyWeavers.xsd b/src/Himp.TaskScheduling.EntityFrameworkCore/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Himp.TaskScheduling.EntityFrameworkCore.abppkg b/src/Himp.TaskScheduling.EntityFrameworkCore/Himp.TaskScheduling.EntityFrameworkCore.abppkg new file mode 100644 index 0000000..e1c64f0 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Himp.TaskScheduling.EntityFrameworkCore.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.ef" +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Himp.TaskScheduling.EntityFrameworkCore.csproj b/src/Himp.TaskScheduling.EntityFrameworkCore/Himp.TaskScheduling.EntityFrameworkCore.csproj new file mode 100644 index 0000000..5776ae2 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Himp.TaskScheduling.EntityFrameworkCore.csproj @@ -0,0 +1,22 @@ + + + + + + net8.0 + enable + Himp.TaskScheduling + + + + + + + + + + + + + + diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240713040414_init.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240713040414_init.Designer.cs new file mode 100644 index 0000000..cb89e2a --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240713040414_init.Designer.cs @@ -0,0 +1,400 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240713040414_init")] + partial class init + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyID") + .HasColumnType("int"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240713040414_init.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240713040414_init.cs new file mode 100644 index 0000000..29fadf2 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240713040414_init.cs @@ -0,0 +1,228 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class init : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "TaskScheduling"); + + migrationBuilder.CreateTable( + name: "TS_BizflowConfig", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BizflowName = table.Column(type: "nvarchar(max)", nullable: false), + BizflowCode = table.Column(type: "nvarchar(max)", nullable: false), + WorkflowModelKey = table.Column(type: "nvarchar(max)", nullable: false), + WorkflowModelName = table.Column(type: "nvarchar(max)", nullable: false), + WorkflowTypeProvider = table.Column(type: "int", nullable: false), + ProviderKey = table.Column(type: "nvarchar(max)", nullable: true), + ValiFlag = table.Column(type: "bit", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_BizflowConfig", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "TS_ParamConfig", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + ParamType = table.Column(type: "int", nullable: false), + ParamCodg = table.Column(type: "nvarchar(max)", nullable: false), + ParamName = table.Column(type: "nvarchar(max)", nullable: false), + PropertyID = table.Column(type: "int", nullable: true), + PropertyType = table.Column(type: "int", nullable: true), + ParamValue = table.Column(type: "nvarchar(max)", nullable: true), + DefValue = table.Column(type: "nvarchar(max)", nullable: true), + KeyPath = table.Column(type: "nvarchar(max)", nullable: true), + ValiFlag = table.Column(type: "bit", nullable: false), + ParentId = table.Column(type: "bigint", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_ParamConfig", x => x.Id); + table.ForeignKey( + name: "FK_TS_ParamConfig_TS_ParamConfig_ParentId", + column: x => x.ParentId, + principalSchema: "TaskScheduling", + principalTable: "TS_ParamConfig", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "TS_ParamConfigTask", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + ParamCodg = table.Column(type: "nvarchar(max)", nullable: false), + TaskType = table.Column(type: "int", nullable: false), + ParamValue = table.Column(type: "nvarchar(max)", nullable: false), + OperatorName = table.Column(type: "nvarchar(max)", nullable: false), + TaskStas = table.Column(type: "int", nullable: false), + TaskMsg = table.Column(type: "nvarchar(max)", nullable: false), + OperationTime = table.Column(type: "datetime2", nullable: false), + ExecTime = table.Column(type: "datetime2", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_ParamConfigTask", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "TS_SampleObtainTask", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + TaskType = table.Column(type: "int", nullable: false), + CoalTime = table.Column(type: "datetime2", nullable: false), + TaskState = table.Column(type: "int", nullable: false), + TaskEndFlag = table.Column(type: "bit", nullable: false), + TaskStartTime = table.Column(type: "datetime2", nullable: false), + TaskEndTime = table.Column(type: "datetime2", nullable: false), + CustCode = table.Column(type: "nvarchar(max)", nullable: false), + SampleCode = table.Column(type: "nvarchar(max)", nullable: false), + SamplePreparationCode = table.Column(type: "nvarchar(max)", nullable: false), + AssayCode = table.Column(type: "nvarchar(max)", nullable: false), + ExtractCode = table.Column(type: "nvarchar(max)", nullable: false), + SeparateCode = table.Column(type: "nvarchar(max)", nullable: false), + CoalType = table.Column(type: "int", nullable: false), + Opercode = table.Column(type: "nvarchar(max)", nullable: false), + Opername = table.Column(type: "nvarchar(max)", nullable: false), + TestItemCode = table.Column(type: "nvarchar(max)", nullable: false), + task_remark = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_SampleObtainTask", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "TS_BizflowNode", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BizflowConfigId = table.Column(type: "uniqueidentifier", nullable: false), + WorkflowNodeKey = table.Column(type: "nvarchar(max)", nullable: false), + WorkflowNodeName = table.Column(type: "nvarchar(max)", nullable: false), + WorkflowNodeType = table.Column(type: "int", nullable: false), + WorkflowIndex = table.Column(type: "int", nullable: false), + SchemaUI = table.Column(type: "nvarchar(max)", nullable: true), + AssigneeParName = table.Column(type: "nvarchar(max)", nullable: true), + CaudidateUsersParName = table.Column(type: "nvarchar(max)", nullable: true), + CaudidateGroupsParName = table.Column(type: "nvarchar(max)", nullable: true), + AssigneeDefValues = table.Column(type: "nvarchar(max)", nullable: false), + CandidateUsersDefValues = table.Column(type: "nvarchar(max)", nullable: false), + CandidateGroupsDefValues = table.Column(type: "nvarchar(max)", nullable: false), + Component = table.Column(type: "nvarchar(max)", nullable: true), + ValiFlag = table.Column(type: "bit", nullable: false), + CanAuditFlag = table.Column(type: "bit", nullable: false), + CanRejectFlag = table.Column(type: "bit", nullable: false), + CanEditFlag = table.Column(type: "bit", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_BizflowNode", x => x.Id); + table.ForeignKey( + name: "FK_TS_BizflowNode_TS_BizflowConfig_BizflowConfigId", + column: x => x.BizflowConfigId, + principalSchema: "TaskScheduling", + principalTable: "TS_BizflowConfig", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "TS_BizflowNodeAssocCandidateUser", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + BizflowNodeId = table.Column(type: "uniqueidentifier", nullable: false), + UserCode = table.Column(type: "nvarchar(max)", nullable: false), + UserName = table.Column(type: "nvarchar(max)", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_BizflowNodeAssocCandidateUser", x => x.Id); + table.ForeignKey( + name: "FK_TS_BizflowNodeAssocCandidateUser_TS_BizflowNode_BizflowNodeId", + column: x => x.BizflowNodeId, + principalSchema: "TaskScheduling", + principalTable: "TS_BizflowNode", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_TS_BizflowNode_BizflowConfigId", + schema: "TaskScheduling", + table: "TS_BizflowNode", + column: "BizflowConfigId"); + + migrationBuilder.CreateIndex( + name: "IX_TS_BizflowNodeAssocCandidateUser_BizflowNodeId", + schema: "TaskScheduling", + table: "TS_BizflowNodeAssocCandidateUser", + column: "BizflowNodeId"); + + migrationBuilder.CreateIndex( + name: "IX_TS_ParamConfig_ParentId", + schema: "TaskScheduling", + table: "TS_ParamConfig", + column: "ParentId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_BizflowNodeAssocCandidateUser", + schema: "TaskScheduling"); + + migrationBuilder.DropTable( + name: "TS_ParamConfig", + schema: "TaskScheduling"); + + migrationBuilder.DropTable( + name: "TS_ParamConfigTask", + schema: "TaskScheduling"); + + migrationBuilder.DropTable( + name: "TS_SampleObtainTask", + schema: "TaskScheduling"); + + migrationBuilder.DropTable( + name: "TS_BizflowNode", + schema: "TaskScheduling"); + + migrationBuilder.DropTable( + name: "TS_BizflowConfig", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723021127_add_column_key_PropertyKey.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723021127_add_column_key_PropertyKey.Designer.cs new file mode 100644 index 0000000..7156381 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723021127_add_column_key_PropertyKey.Designer.cs @@ -0,0 +1,400 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240723021127_add_column_key_PropertyKey")] + partial class add_column_key_PropertyKey + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723021127_add_column_key_PropertyKey.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723021127_add_column_key_PropertyKey.cs new file mode 100644 index 0000000..2336cf3 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723021127_add_column_key_PropertyKey.cs @@ -0,0 +1,42 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_column_key_PropertyKey : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "PropertyID", + schema: "TaskScheduling", + table: "TS_ParamConfig"); + + migrationBuilder.AddColumn( + name: "PropertyKey", + schema: "TaskScheduling", + table: "TS_ParamConfig", + type: "nvarchar(max)", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "PropertyKey", + schema: "TaskScheduling", + table: "TS_ParamConfig"); + + migrationBuilder.AddColumn( + name: "PropertyID", + schema: "TaskScheduling", + table: "TS_ParamConfig", + type: "int", + nullable: true); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723030645_modify_table_ParamConfigTask.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723030645_modify_table_ParamConfigTask.Designer.cs new file mode 100644 index 0000000..eedd1b2 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723030645_modify_table_ParamConfigTask.Designer.cs @@ -0,0 +1,400 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240723030645_modify_table_ParamConfigTask")] + partial class modify_table_ParamConfigTask + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723030645_modify_table_ParamConfigTask.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723030645_modify_table_ParamConfigTask.cs new file mode 100644 index 0000000..1aa0fd8 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240723030645_modify_table_ParamConfigTask.cs @@ -0,0 +1,42 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class modify_table_ParamConfigTask : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "ParamValue", + schema: "TaskScheduling", + table: "TS_ParamConfigTask", + newName: "PropertyValue"); + + migrationBuilder.RenameColumn( + name: "ParamCodg", + schema: "TaskScheduling", + table: "TS_ParamConfigTask", + newName: "PropertyKey"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "PropertyValue", + schema: "TaskScheduling", + table: "TS_ParamConfigTask", + newName: "ParamValue"); + + migrationBuilder.RenameColumn( + name: "PropertyKey", + schema: "TaskScheduling", + table: "TS_ParamConfigTask", + newName: "ParamCodg"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240724024956_add_column_ParamConfigTask_contdesc.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240724024956_add_column_ParamConfigTask_contdesc.Designer.cs new file mode 100644 index 0000000..2389682 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240724024956_add_column_ParamConfigTask_contdesc.Designer.cs @@ -0,0 +1,404 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240724024956_add_column_ParamConfigTask_contdesc")] + partial class add_column_ParamConfigTask_contdesc + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240724024956_add_column_ParamConfigTask_contdesc.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240724024956_add_column_ParamConfigTask_contdesc.cs new file mode 100644 index 0000000..f14fa7f --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240724024956_add_column_ParamConfigTask_contdesc.cs @@ -0,0 +1,31 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_column_ParamConfigTask_contdesc : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "TaskContdesc", + schema: "TaskScheduling", + table: "TS_ParamConfigTask", + type: "nvarchar(max)", + nullable: false, + defaultValue: ""); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "TaskContdesc", + schema: "TaskScheduling", + table: "TS_ParamConfigTask"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730034726_add_table_SamplePreparationTask.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730034726_add_table_SamplePreparationTask.Designer.cs new file mode 100644 index 0000000..bafe53a --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730034726_add_table_SamplePreparationTask.Designer.cs @@ -0,0 +1,439 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240730034726_add_table_SamplePreparationTask")] + partial class add_table_SamplePreparationTask + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730034726_add_table_SamplePreparationTask.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730034726_add_table_SamplePreparationTask.cs new file mode 100644 index 0000000..d603db7 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730034726_add_table_SamplePreparationTask.cs @@ -0,0 +1,41 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_SamplePreparationTask : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_SamplePreparationTasks", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + SampleCode = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + TaskAssgnTime = table.Column(type: "datetime2", nullable: false), + SampeWay = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), + TaskRecptTime = table.Column(type: "datetime2", nullable: true), + LastOperTime = table.Column(type: "datetime2", nullable: false), + ExecStas = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_SamplePreparationTasks", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_SamplePreparationTasks", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730063747_modify_column_SampeWay_null.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730063747_modify_column_SampeWay_null.Designer.cs new file mode 100644 index 0000000..77badbc --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730063747_modify_column_SampeWay_null.Designer.cs @@ -0,0 +1,438 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240730063747_modify_column_SampeWay_null")] + partial class modify_column_SampeWay_null + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730063747_modify_column_SampeWay_null.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730063747_modify_column_SampeWay_null.cs new file mode 100644 index 0000000..6c2fa55 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240730063747_modify_column_SampeWay_null.cs @@ -0,0 +1,42 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class modify_column_SampeWay_null : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "SampeWay", + schema: "TaskScheduling", + table: "TS_SamplePreparationTasks", + type: "nvarchar(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(16)", + oldMaxLength: 16); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "SampeWay", + schema: "TaskScheduling", + table: "TS_SamplePreparationTasks", + type: "nvarchar(16)", + maxLength: 16, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(16)", + oldMaxLength: 16, + oldNullable: true); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731033448_add_table_SamplePreparationResult.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731033448_add_table_SamplePreparationResult.Designer.cs new file mode 100644 index 0000000..1df3889 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731033448_add_table_SamplePreparationResult.Designer.cs @@ -0,0 +1,505 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240731033448_add_table_SamplePreparationResult")] + partial class add_table_SamplePreparationResult + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731033448_add_table_SamplePreparationResult.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731033448_add_table_SamplePreparationResult.cs new file mode 100644 index 0000000..91685eb --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731033448_add_table_SamplePreparationResult.cs @@ -0,0 +1,53 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_SamplePreparationResult : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_SamplePreparationResult", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "nvarchar(450)", nullable: false), + SampeWay = table.Column(type: "nvarchar(max)", nullable: false), + SampeEqp = table.Column(type: "nvarchar(max)", nullable: false), + Begtime = table.Column(type: "datetime2", nullable: false), + Endtime = table.Column(type: "datetime2", nullable: true), + BottomCode61 = table.Column(type: "nvarchar(max)", nullable: true), + Weight61Bottles = table.Column(type: "real", nullable: false), + BottomCode62 = table.Column(type: "nvarchar(max)", nullable: true), + Weight62Bottles = table.Column(type: "real", nullable: false), + BottomCode31 = table.Column(type: "nvarchar(max)", nullable: true), + Weight31Bottles = table.Column(type: "real", nullable: false), + BottomCode21 = table.Column(type: "nvarchar(max)", nullable: true), + Weight21Bottles = table.Column(type: "real", nullable: false), + BottomCode22 = table.Column(type: "nvarchar(max)", nullable: true), + Weight22Bottles = table.Column(type: "real", nullable: false), + TotalCoalSampleWeight = table.Column(type: "real", nullable: false), + Weight6Rejects = table.Column(type: "real", nullable: false), + Weight3Rejects = table.Column(type: "real", nullable: false), + Weight2Rejects = table.Column(type: "real", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_SamplePreparationResult", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_SamplePreparationResult", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731074359_add_table_SamplePreparationPlan.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731074359_add_table_SamplePreparationPlan.Designer.cs new file mode 100644 index 0000000..6e3462c --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731074359_add_table_SamplePreparationPlan.Designer.cs @@ -0,0 +1,521 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240731074359_add_table_SamplePreparationPlan")] + partial class add_table_SamplePreparationPlan + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731074359_add_table_SamplePreparationPlan.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731074359_add_table_SamplePreparationPlan.cs new file mode 100644 index 0000000..0abdd4c --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731074359_add_table_SamplePreparationPlan.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_SamplePreparationPlan : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_SamplePreparationPlan", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "nvarchar(450)", nullable: false), + ParName = table.Column(type: "nvarchar(450)", nullable: false), + ParValue = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_SamplePreparationPlan", x => new { x.Id, x.ParName }); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_SamplePreparationPlan", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731085305_add_table_StandardTestItem.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731085305_add_table_StandardTestItem.Designer.cs new file mode 100644 index 0000000..9eced72 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731085305_add_table_StandardTestItem.Designer.cs @@ -0,0 +1,584 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240731085305_add_table_StandardTestItem")] + partial class add_table_StandardTestItem + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id", "TestItem"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731085305_add_table_StandardTestItem.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731085305_add_table_StandardTestItem.cs new file mode 100644 index 0000000..db03fec --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240731085305_add_table_StandardTestItem.cs @@ -0,0 +1,62 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_StandardTestItem : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_StandardTestItem", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false), + TestItem = table.Column(type: "nvarchar(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_StandardTestItem", x => new { x.Id, x.TestItem }); + }); + + migrationBuilder.CreateTable( + name: "TS_StandardTestTasks", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + SampleCode = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + TestCode = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + BottomCode = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + Sampletype = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), + TestCnt = table.Column(type: "int", nullable: false), + TaskAssgnTime = table.Column(type: "datetime2", nullable: false), + TaskRecptTime = table.Column(type: "datetime2", nullable: true), + LastOperTime = table.Column(type: "datetime2", nullable: false), + ExecStas = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_StandardTestTasks", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_StandardTestItem", + schema: "TaskScheduling"); + + migrationBuilder.DropTable( + name: "TS_StandardTestTasks", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240801083244_add_column_Auditor.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240801083244_add_column_Auditor.Designer.cs new file mode 100644 index 0000000..4ea5aac --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240801083244_add_column_Auditor.Designer.cs @@ -0,0 +1,590 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240801083244_add_column_Auditor")] + partial class add_column_Auditor + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id", "TestItem"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240801083244_add_column_Auditor.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240801083244_add_column_Auditor.cs new file mode 100644 index 0000000..109bb8b --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240801083244_add_column_Auditor.cs @@ -0,0 +1,43 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_column_Auditor : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "AuditTime", + schema: "TaskScheduling", + table: "TS_StandardTestTasks", + type: "datetime2", + nullable: true); + + migrationBuilder.AddColumn( + name: "Auditor", + schema: "TaskScheduling", + table: "TS_StandardTestTasks", + type: "nvarchar(max)", + nullable: true); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "AuditTime", + schema: "TaskScheduling", + table: "TS_StandardTestTasks"); + + migrationBuilder.DropColumn( + name: "Auditor", + schema: "TaskScheduling", + table: "TS_StandardTestTasks"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802091814_add_table_SampleTestTask.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802091814_add_table_SampleTestTask.Designer.cs new file mode 100644 index 0000000..749525a --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802091814_add_table_SampleTestTask.Designer.cs @@ -0,0 +1,657 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240802091814_add_table_SampleTestTask")] + partial class add_table_SampleTestTask + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id", "TestItem"); + + b.ToTable("TS_SampleTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id", "TestItem"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802091814_add_table_SampleTestTask.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802091814_add_table_SampleTestTask.cs new file mode 100644 index 0000000..ecc8406 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802091814_add_table_SampleTestTask.cs @@ -0,0 +1,75 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_SampleTestTask : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "SampeWay", + schema: "TaskScheduling", + table: "TS_StandardTestTasks", + type: "nvarchar(max)", + nullable: false, + defaultValue: ""); + + migrationBuilder.CreateTable( + name: "TS_SampleTestItem", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false), + TestItem = table.Column(type: "nvarchar(450)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_SampleTestItem", x => new { x.Id, x.TestItem }); + }); + + migrationBuilder.CreateTable( + name: "TS_SampleTestTasks", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + SampleCode = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + TestCode = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + BottomCode = table.Column(type: "nvarchar(32)", maxLength: 32, nullable: false), + Sampletype = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false), + TestCnt = table.Column(type: "int", nullable: false), + TaskAssgnTime = table.Column(type: "datetime2", nullable: false), + TaskRecptTime = table.Column(type: "datetime2", nullable: true), + LastOperTime = table.Column(type: "datetime2", nullable: false), + ExecStas = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_SampleTestTasks", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_SampleTestItem", + schema: "TaskScheduling"); + + migrationBuilder.DropTable( + name: "TS_SampleTestTasks", + schema: "TaskScheduling"); + + migrationBuilder.DropColumn( + name: "SampeWay", + schema: "TaskScheduling", + table: "TS_StandardTestTasks"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802094347_modify_column_SampleTestTask_Type.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802094347_modify_column_SampleTestTask_Type.Designer.cs new file mode 100644 index 0000000..d3612a8 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802094347_modify_column_SampleTestTask_Type.Designer.cs @@ -0,0 +1,657 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240802094347_modify_column_SampleTestTask_Type")] + partial class modify_column_SampleTestTask_Type + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id", "TestItem"); + + b.ToTable("TS_SampleTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id", "TestItem"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802094347_modify_column_SampleTestTask_Type.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802094347_modify_column_SampleTestTask_Type.cs new file mode 100644 index 0000000..000ee23 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240802094347_modify_column_SampleTestTask_Type.cs @@ -0,0 +1,30 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class modify_column_SampleTestTask_Type : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "Sampletype", + schema: "TaskScheduling", + table: "TS_SampleTestTasks", + newName: "SampleType"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "SampleType", + schema: "TaskScheduling", + table: "TS_SampleTestTasks", + newName: "Sampletype"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803011306_add_column_sampleTestTask_TestItems.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803011306_add_column_sampleTestTask_TestItems.Designer.cs new file mode 100644 index 0000000..24707ea --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803011306_add_column_sampleTestTask_TestItems.Designer.cs @@ -0,0 +1,661 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240803011306_add_column_sampleTestTask_TestItems")] + partial class add_column_sampleTestTask_TestItems + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id", "TestItem"); + + b.ToTable("TS_SampleTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id", "TestItem"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803011306_add_column_sampleTestTask_TestItems.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803011306_add_column_sampleTestTask_TestItems.cs new file mode 100644 index 0000000..9500f31 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803011306_add_column_sampleTestTask_TestItems.cs @@ -0,0 +1,31 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_column_sampleTestTask_TestItems : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "TestItems", + schema: "TaskScheduling", + table: "TS_SampleTestTasks", + type: "nvarchar(max)", + nullable: false, + defaultValue: ""); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "TestItems", + schema: "TaskScheduling", + table: "TS_SampleTestTasks"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803020118_add_column_standard_test_i.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803020118_add_column_standard_test_i.Designer.cs new file mode 100644 index 0000000..b03196f --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803020118_add_column_standard_test_i.Designer.cs @@ -0,0 +1,678 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240803020118_add_column_standard_test_i")] + partial class add_column_standard_test_i + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.Property("StandardTestTaskId") + .HasColumnType("bigint"); + + b.HasKey("Id", "TestItem"); + + b.HasIndex("StandardTestTaskId"); + + b.ToTable("TS_SampleTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id", "TestItem"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestItem", b => + { + b.HasOne("Himp.TaskScheduling.StandardTestTask", null) + .WithMany("SampleTestItems") + .HasForeignKey("StandardTestTaskId"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Navigation("SampleTestItems"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803020118_add_column_standard_test_i.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803020118_add_column_standard_test_i.cs new file mode 100644 index 0000000..9684b1f --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240803020118_add_column_standard_test_i.cs @@ -0,0 +1,81 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_column_standard_test_i : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "TaskRecptTime", + schema: "TaskScheduling", + table: "TS_StandardTestTasks"); + + migrationBuilder.AddColumn( + name: "TaskType", + schema: "TaskScheduling", + table: "TS_StandardTestTasks", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_SampleTestItem", + type: "bigint", + nullable: true); + + migrationBuilder.CreateIndex( + name: "IX_TS_SampleTestItem_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_SampleTestItem", + column: "StandardTestTaskId"); + + migrationBuilder.AddForeignKey( + name: "FK_TS_SampleTestItem_TS_StandardTestTasks_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_SampleTestItem", + column: "StandardTestTaskId", + principalSchema: "TaskScheduling", + principalTable: "TS_StandardTestTasks", + principalColumn: "Id"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_TS_SampleTestItem_TS_StandardTestTasks_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_SampleTestItem"); + + migrationBuilder.DropIndex( + name: "IX_TS_SampleTestItem_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_SampleTestItem"); + + migrationBuilder.DropColumn( + name: "TaskType", + schema: "TaskScheduling", + table: "TS_StandardTestTasks"); + + migrationBuilder.DropColumn( + name: "StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_SampleTestItem"); + + migrationBuilder.AddColumn( + name: "TaskRecptTime", + schema: "TaskScheduling", + table: "TS_StandardTestTasks", + type: "datetime2", + nullable: true); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807030231_modify_column_sampletestTask_bottomcode.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807030231_modify_column_sampletestTask_bottomcode.Designer.cs new file mode 100644 index 0000000..aa63421 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807030231_modify_column_sampletestTask_bottomcode.Designer.cs @@ -0,0 +1,678 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240807030231_modify_column_sampletestTask_bottomcode")] + partial class modify_column_sampletestTask_bottomcode + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.Property("StandardTestTaskId") + .HasColumnType("bigint"); + + b.HasKey("Id", "TestItem"); + + b.HasIndex("StandardTestTaskId"); + + b.ToTable("TS_SampleTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id", "TestItem"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestItem", b => + { + b.HasOne("Himp.TaskScheduling.StandardTestTask", null) + .WithMany("SampleTestItems") + .HasForeignKey("StandardTestTaskId"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Navigation("SampleTestItems"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807030231_modify_column_sampletestTask_bottomcode.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807030231_modify_column_sampletestTask_bottomcode.cs new file mode 100644 index 0000000..6b4497f --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807030231_modify_column_sampletestTask_bottomcode.cs @@ -0,0 +1,22 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class modify_column_sampletestTask_bottomcode : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807034921_rm_table_sample_testitem.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807034921_rm_table_sample_testitem.Designer.cs new file mode 100644 index 0000000..87de7d3 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807034921_rm_table_sample_testitem.Designer.cs @@ -0,0 +1,665 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240807034921_rm_table_sample_testitem")] + partial class rm_table_sample_testitem + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItem") + .HasColumnType("nvarchar(450)"); + + b.Property("StandardTestTaskId") + .HasColumnType("bigint"); + + b.HasKey("Id", "TestItem"); + + b.HasIndex("StandardTestTaskId"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.HasOne("Himp.TaskScheduling.StandardTestTask", null) + .WithMany("StandardTestItems") + .HasForeignKey("StandardTestTaskId"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Navigation("StandardTestItems"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807034921_rm_table_sample_testitem.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807034921_rm_table_sample_testitem.cs new file mode 100644 index 0000000..cf2114c --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240807034921_rm_table_sample_testitem.cs @@ -0,0 +1,85 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class rm_table_sample_testitem : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_SampleTestItem", + schema: "TaskScheduling"); + + migrationBuilder.AddColumn( + name: "StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem", + type: "bigint", + nullable: true); + + migrationBuilder.CreateIndex( + name: "IX_TS_StandardTestItem_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem", + column: "StandardTestTaskId"); + + migrationBuilder.AddForeignKey( + name: "FK_TS_StandardTestItem_TS_StandardTestTasks_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem", + column: "StandardTestTaskId", + principalSchema: "TaskScheduling", + principalTable: "TS_StandardTestTasks", + principalColumn: "Id"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_TS_StandardTestItem_TS_StandardTestTasks_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem"); + + migrationBuilder.DropIndex( + name: "IX_TS_StandardTestItem_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem"); + + migrationBuilder.DropColumn( + name: "StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem"); + + migrationBuilder.CreateTable( + name: "TS_SampleTestItem", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false), + TestItem = table.Column(type: "nvarchar(450)", nullable: false), + StandardTestTaskId = table.Column(type: "bigint", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_SampleTestItem", x => new { x.Id, x.TestItem }); + table.ForeignKey( + name: "FK_TS_SampleTestItem_TS_StandardTestTasks_StandardTestTaskId", + column: x => x.StandardTestTaskId, + principalSchema: "TaskScheduling", + principalTable: "TS_StandardTestTasks", + principalColumn: "Id"); + }); + + migrationBuilder.CreateIndex( + name: "IX_TS_SampleTestItem_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_SampleTestItem", + column: "StandardTestTaskId"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813030447_add_column_StandardTestItem_sampletype.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813030447_add_column_StandardTestItem_sampletype.Designer.cs new file mode 100644 index 0000000..64d5fa6 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813030447_add_column_StandardTestItem_sampletype.Designer.cs @@ -0,0 +1,672 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240813030447_add_column_StandardTestItem_sampletype")] + partial class add_column_StandardTestItem_sampletype + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("StandardTestTaskId") + .HasColumnType("bigint"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.HasIndex("StandardTestTaskId"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.HasOne("Himp.TaskScheduling.StandardTestTask", null) + .WithMany("StandardTestItems") + .HasForeignKey("StandardTestTaskId"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Navigation("StandardTestItems"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813030447_add_column_StandardTestItem_sampletype.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813030447_add_column_StandardTestItem_sampletype.cs new file mode 100644 index 0000000..7fd80ee --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813030447_add_column_StandardTestItem_sampletype.cs @@ -0,0 +1,56 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_column_StandardTestItem_sampletype : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "TestItem", + schema: "TaskScheduling", + table: "TS_StandardTestItem", + newName: "TestItems"); + + migrationBuilder.AddColumn( + name: "SampleType", + schema: "TaskScheduling", + table: "TS_StandardTestItem", + type: "nvarchar(max)", + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "ValiFlag", + schema: "TaskScheduling", + table: "TS_StandardTestItem", + type: "bit", + nullable: false, + defaultValue: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "SampleType", + schema: "TaskScheduling", + table: "TS_StandardTestItem"); + + migrationBuilder.DropColumn( + name: "ValiFlag", + schema: "TaskScheduling", + table: "TS_StandardTestItem"); + + migrationBuilder.RenameColumn( + name: "TestItems", + schema: "TaskScheduling", + table: "TS_StandardTestItem", + newName: "TestItem"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813031244_remove_column_StandardTestItem_taskid.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813031244_remove_column_StandardTestItem_taskid.Designer.cs new file mode 100644 index 0000000..2701d91 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813031244_remove_column_StandardTestItem_taskid.Designer.cs @@ -0,0 +1,655 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240813031244_remove_column_StandardTestItem_taskid")] + partial class remove_column_StandardTestItem_taskid + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813031244_remove_column_StandardTestItem_taskid.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813031244_remove_column_StandardTestItem_taskid.cs new file mode 100644 index 0000000..7307a18 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240813031244_remove_column_StandardTestItem_taskid.cs @@ -0,0 +1,55 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class remove_column_StandardTestItem_taskid : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_TS_StandardTestItem_TS_StandardTestTasks_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem"); + + migrationBuilder.DropIndex( + name: "IX_TS_StandardTestItem_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem"); + + migrationBuilder.DropColumn( + name: "StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem", + type: "bigint", + nullable: true); + + migrationBuilder.CreateIndex( + name: "IX_TS_StandardTestItem_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem", + column: "StandardTestTaskId"); + + migrationBuilder.AddForeignKey( + name: "FK_TS_StandardTestItem_TS_StandardTestTasks_StandardTestTaskId", + schema: "TaskScheduling", + table: "TS_StandardTestItem", + column: "StandardTestTaskId", + principalSchema: "TaskScheduling", + principalTable: "TS_StandardTestTasks", + principalColumn: "Id"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240826120306_add_table_EventMsgRec.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240826120306_add_table_EventMsgRec.Designer.cs new file mode 100644 index 0000000..db4ab7d --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240826120306_add_table_EventMsgRec.Designer.cs @@ -0,0 +1,775 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240826120306_add_table_EventMsgRec")] + partial class add_table_EventMsgRec + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240826120306_add_table_EventMsgRec.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240826120306_add_table_EventMsgRec.cs new file mode 100644 index 0000000..d3c8c44 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240826120306_add_table_EventMsgRec.cs @@ -0,0 +1,96 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_EventMsgRec : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + //migrationBuilder.AddColumn( + // name: "ManualFlag", + // schema: "TaskScheduling", + // table: "TS_SampleTestTasks", + // type: "int", + // nullable: false, + // defaultValue: 0); + + migrationBuilder.CreateTable( + name: "TS_EventMsgRec", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + TopicFullPath = table.Column(type: "nvarchar(max)", nullable: false), + MsgTopicName = table.Column(type: "nvarchar(max)", nullable: false), + MsgCont = table.Column(type: "nvarchar(max)", nullable: false), + EventMsgOperStas = table.Column(type: "int", nullable: false), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_EventMsgRec", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "TS_EventMsgTopic", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + EventMsgTopicCodg = table.Column(type: "nvarchar(max)", nullable: false), + EventMsgTopicName = table.Column(type: "nvarchar(max)", nullable: false), + TopicFullPath = table.Column(type: "nvarchar(max)", nullable: false), + Srtno = table.Column(type: "int", nullable: false), + LvIndex = table.Column(type: "int", nullable: false), + DefaultFlag = table.Column(type: "bit", nullable: false), + ParentId = table.Column(type: "uniqueidentifier", nullable: true), + TenantId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_EventMsgTopic", x => x.Id); + table.ForeignKey( + name: "FK_TS_EventMsgTopic_TS_EventMsgTopic_ParentId", + column: x => x.ParentId, + principalSchema: "TaskScheduling", + principalTable: "TS_EventMsgTopic", + principalColumn: "Id"); + }); + + migrationBuilder.CreateIndex( + name: "IX_TS_EventMsgTopic_ParentId", + schema: "TaskScheduling", + table: "TS_EventMsgTopic", + column: "ParentId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_EventMsgRec", + schema: "TaskScheduling"); + + migrationBuilder.DropTable( + name: "TS_EventMsgTopic", + schema: "TaskScheduling"); + + migrationBuilder.DropColumn( + name: "ManualFlag", + schema: "TaskScheduling", + table: "TS_SampleTestTasks"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240831070442_add_table_CodeConversion.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240831070442_add_table_CodeConversion.Designer.cs new file mode 100644 index 0000000..29cd79b --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240831070442_add_table_CodeConversion.Designer.cs @@ -0,0 +1,806 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240831070442_add_table_CodeConversion")] + partial class add_table_CodeConversion + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Configs.CodeConversion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionTime") + .HasColumnType("datetime2"); + + b.Property("ConversionType") + .HasColumnType("int"); + + b.Property("OperName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SorcCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TargetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_CodeConversion", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240831070442_add_table_CodeConversion.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240831070442_add_table_CodeConversion.cs new file mode 100644 index 0000000..452ee30 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240831070442_add_table_CodeConversion.cs @@ -0,0 +1,41 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_CodeConversion : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_CodeConversion", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + SorcCode = table.Column(type: "nvarchar(max)", nullable: false), + TargetCode = table.Column(type: "nvarchar(max)", nullable: false), + ConversionType = table.Column(type: "int", nullable: false), + ConversionTime = table.Column(type: "datetime2", nullable: false), + OperName = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_CodeConversion", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_CodeConversion", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910025713_add_table_CmDeviceControl.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910025713_add_table_CmDeviceControl.Designer.cs new file mode 100644 index 0000000..4e77b51 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910025713_add_table_CmDeviceControl.Designer.cs @@ -0,0 +1,838 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240910025713_add_table_CmDeviceControl")] + partial class add_table_CmDeviceControl + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Configs.CodeConversion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionTime") + .HasColumnType("datetime2"); + + b.Property("ConversionType") + .HasColumnType("int"); + + b.Property("OperName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SorcCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TargetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_CodeConversion", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Tasks.CmDeviceControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BETIME") + .HasColumnType("datetime2"); + + b.Property("DEVICE") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ENABLE") + .HasColumnType("int"); + + b.Property("REMARK") + .HasColumnType("nvarchar(max)"); + + b.Property("TOTIME") + .HasColumnType("datetime2"); + + b.Property("UPTIME") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_CM_DEVICE_CONTROL", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910025713_add_table_CmDeviceControl.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910025713_add_table_CmDeviceControl.cs new file mode 100644 index 0000000..e6e74f7 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910025713_add_table_CmDeviceControl.cs @@ -0,0 +1,42 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_CmDeviceControl : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_CM_DEVICE_CONTROL", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + DEVICE = table.Column(type: "nvarchar(max)", nullable: false), + ENABLE = table.Column(type: "int", nullable: false), + BETIME = table.Column(type: "datetime2", nullable: true), + TOTIME = table.Column(type: "datetime2", nullable: true), + REMARK = table.Column(type: "nvarchar(max)", nullable: true), + UPTIME = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_CM_DEVICE_CONTROL", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_CM_DEVICE_CONTROL", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910030601_add_table_CmDeviceControl_1.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910030601_add_table_CmDeviceControl_1.Designer.cs new file mode 100644 index 0000000..c14e467 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910030601_add_table_CmDeviceControl_1.Designer.cs @@ -0,0 +1,838 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240910030601_add_table_CmDeviceControl_1")] + partial class add_table_CmDeviceControl_1 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Configs.CodeConversion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionTime") + .HasColumnType("datetime2"); + + b.Property("ConversionType") + .HasColumnType("int"); + + b.Property("OperName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SorcCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TargetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_CodeConversion", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Tasks.CmDeviceControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BETIME") + .HasColumnType("datetime2"); + + b.Property("DEVICE") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ENABLE") + .HasColumnType("int"); + + b.Property("REMARK") + .HasColumnType("nvarchar(max)"); + + b.Property("TOTIME") + .HasColumnType("datetime2"); + + b.Property("UPTIME") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("CM_DEVICE_CONTROL", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910030601_add_table_CmDeviceControl_1.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910030601_add_table_CmDeviceControl_1.cs new file mode 100644 index 0000000..8c3cbba --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240910030601_add_table_CmDeviceControl_1.cs @@ -0,0 +1,52 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_CmDeviceControl_1 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropPrimaryKey( + name: "PK_TS_CM_DEVICE_CONTROL", + schema: "TaskScheduling", + table: "TS_CM_DEVICE_CONTROL"); + + migrationBuilder.RenameTable( + name: "TS_CM_DEVICE_CONTROL", + schema: "TaskScheduling", + newName: "CM_DEVICE_CONTROL", + newSchema: "TaskScheduling"); + + migrationBuilder.AddPrimaryKey( + name: "PK_CM_DEVICE_CONTROL", + schema: "TaskScheduling", + table: "CM_DEVICE_CONTROL", + column: "Id"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropPrimaryKey( + name: "PK_CM_DEVICE_CONTROL", + schema: "TaskScheduling", + table: "CM_DEVICE_CONTROL"); + + migrationBuilder.RenameTable( + name: "CM_DEVICE_CONTROL", + schema: "TaskScheduling", + newName: "TS_CM_DEVICE_CONTROL", + newSchema: "TaskScheduling"); + + migrationBuilder.AddPrimaryKey( + name: "PK_TS_CM_DEVICE_CONTROL", + schema: "TaskScheduling", + table: "TS_CM_DEVICE_CONTROL", + column: "Id"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925055339_add_table_ZYOperateRecord.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925055339_add_table_ZYOperateRecord.Designer.cs new file mode 100644 index 0000000..71df744 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925055339_add_table_ZYOperateRecord.Designer.cs @@ -0,0 +1,870 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240925055339_add_table_ZYOperateRecord")] + partial class add_table_ZYOperateRecord + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.CodeConversion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionTime") + .HasColumnType("datetime2"); + + b.Property("ConversionType") + .HasColumnType("int"); + + b.Property("OperName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SorcCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TargetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_CodeConversion", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Datas.ZYOperateRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTime") + .HasColumnType("datetime2"); + + b.Property("MachineCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PersonId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ReadStatus") + .HasColumnType("int"); + + b.Property("Record") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_ZYOperateRecord", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Tasks.CmDeviceControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BETIME") + .HasColumnType("datetime2"); + + b.Property("DEVICE") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ENABLE") + .HasColumnType("int"); + + b.Property("REMARK") + .HasColumnType("nvarchar(max)"); + + b.Property("TOTIME") + .HasColumnType("datetime2"); + + b.Property("UPTIME") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("CM_DEVICE_CONTROL", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925055339_add_table_ZYOperateRecord.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925055339_add_table_ZYOperateRecord.cs new file mode 100644 index 0000000..9deeb06 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925055339_add_table_ZYOperateRecord.cs @@ -0,0 +1,41 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_ZYOperateRecord : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_ZYOperateRecord", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Record = table.Column(type: "nvarchar(max)", nullable: false), + MachineCode = table.Column(type: "nvarchar(max)", nullable: false), + PersonId = table.Column(type: "nvarchar(max)", nullable: false), + Name = table.Column(type: "nvarchar(max)", nullable: false), + DateTime = table.Column(type: "datetime2", nullable: false), + ReadStatus = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_ZYOperateRecord", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_ZYOperateRecord", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925060951_remove_column_ZYOperateRecord_stas.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925060951_remove_column_ZYOperateRecord_stas.Designer.cs new file mode 100644 index 0000000..6404e78 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925060951_remove_column_ZYOperateRecord_stas.Designer.cs @@ -0,0 +1,867 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240925060951_remove_column_ZYOperateRecord_stas")] + partial class remove_column_ZYOperateRecord_stas + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.CodeConversion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionTime") + .HasColumnType("datetime2"); + + b.Property("ConversionType") + .HasColumnType("int"); + + b.Property("OperName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SorcCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TargetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_CodeConversion", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Datas.ZYOperateRecord", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DateTime") + .HasColumnType("datetime2"); + + b.Property("MachineCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PersonId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Record") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_ZYOperateRecord", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Tasks.CmDeviceControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BETIME") + .HasColumnType("datetime2"); + + b.Property("DEVICE") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ENABLE") + .HasColumnType("int"); + + b.Property("REMARK") + .HasColumnType("nvarchar(max)"); + + b.Property("TOTIME") + .HasColumnType("datetime2"); + + b.Property("UPTIME") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("CM_DEVICE_CONTROL", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925060951_remove_column_ZYOperateRecord_stas.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925060951_remove_column_ZYOperateRecord_stas.cs new file mode 100644 index 0000000..d34bf09 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925060951_remove_column_ZYOperateRecord_stas.cs @@ -0,0 +1,31 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class remove_column_ZYOperateRecord_stas : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ReadStatus", + schema: "TaskScheduling", + table: "TS_ZYOperateRecord"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ReadStatus", + schema: "TaskScheduling", + table: "TS_ZYOperateRecord", + type: "int", + nullable: false, + defaultValue: 0); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063203_remove_table_ZYOperateRecord.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063203_remove_table_ZYOperateRecord.Designer.cs new file mode 100644 index 0000000..0819b16 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063203_remove_table_ZYOperateRecord.Designer.cs @@ -0,0 +1,838 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240925063203_remove_table_ZYOperateRecord")] + partial class remove_table_ZYOperateRecord + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.CodeConversion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionTime") + .HasColumnType("datetime2"); + + b.Property("ConversionType") + .HasColumnType("int"); + + b.Property("OperName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SorcCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TargetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_CodeConversion", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Tasks.CmDeviceControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BETIME") + .HasColumnType("datetime2"); + + b.Property("DEVICE") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ENABLE") + .HasColumnType("int"); + + b.Property("REMARK") + .HasColumnType("nvarchar(max)"); + + b.Property("TOTIME") + .HasColumnType("datetime2"); + + b.Property("UPTIME") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("CM_DEVICE_CONTROL", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063203_remove_table_ZYOperateRecord.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063203_remove_table_ZYOperateRecord.cs new file mode 100644 index 0000000..af769a9 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063203_remove_table_ZYOperateRecord.cs @@ -0,0 +1,40 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class remove_table_ZYOperateRecord : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_ZYOperateRecord", + schema: "TaskScheduling"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_ZYOperateRecord", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + DateTime = table.Column(type: "datetime2", nullable: false), + MachineCode = table.Column(type: "nvarchar(max)", nullable: false), + Name = table.Column(type: "nvarchar(max)", nullable: false), + PersonId = table.Column(type: "nvarchar(max)", nullable: false), + Record = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_ZYOperateRecord", x => x.Id); + }); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063254_add_table_ZYOperateRecord1.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063254_add_table_ZYOperateRecord1.Designer.cs new file mode 100644 index 0000000..63ac7f7 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063254_add_table_ZYOperateRecord1.Designer.cs @@ -0,0 +1,870 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20240925063254_add_table_ZYOperateRecord1")] + partial class add_table_ZYOperateRecord1 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.CodeConversion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionTime") + .HasColumnType("datetime2"); + + b.Property("ConversionType") + .HasColumnType("int"); + + b.Property("OperName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SorcCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TargetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_CodeConversion", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Datas.ZYOperateRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DateTime") + .HasColumnType("datetime2"); + + b.Property("MachineCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PersonId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Record") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_ZYOperateRecord", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Tasks.CmDeviceControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BETIME") + .HasColumnType("datetime2"); + + b.Property("DEVICE") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ENABLE") + .HasColumnType("int"); + + b.Property("REMARK") + .HasColumnType("nvarchar(max)"); + + b.Property("TOTIME") + .HasColumnType("datetime2"); + + b.Property("UPTIME") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("CM_DEVICE_CONTROL", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063254_add_table_ZYOperateRecord1.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063254_add_table_ZYOperateRecord1.cs new file mode 100644 index 0000000..123a42d --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20240925063254_add_table_ZYOperateRecord1.cs @@ -0,0 +1,41 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_ZYOperateRecord1 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_ZYOperateRecord", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Record = table.Column(type: "nvarchar(max)", nullable: false), + MachineCode = table.Column(type: "nvarchar(max)", nullable: false), + PersonId = table.Column(type: "nvarchar(max)", nullable: false), + Name = table.Column(type: "nvarchar(max)", nullable: false), + DateTime = table.Column(type: "datetime2", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_ZYOperateRecord", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_ZYOperateRecord", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241007095809_add_tale_AutoSamplingCondition.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241007095809_add_tale_AutoSamplingCondition.Designer.cs new file mode 100644 index 0000000..52ed994 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241007095809_add_tale_AutoSamplingCondition.Designer.cs @@ -0,0 +1,887 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20241007095809_add_tale_AutoSamplingCondition")] + partial class add_tale_AutoSamplingCondition + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.AutoSamplingCondition", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConditionName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ConditionType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_AutoSamplingCondition", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.CodeConversion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionTime") + .HasColumnType("datetime2"); + + b.Property("ConversionType") + .HasColumnType("int"); + + b.Property("OperName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SorcCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TargetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_CodeConversion", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Datas.ZYOperateRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DateTime") + .HasColumnType("datetime2"); + + b.Property("MachineCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PersonId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Record") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_ZYOperateRecord", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Tasks.CmDeviceControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BETIME") + .HasColumnType("datetime2"); + + b.Property("DEVICE") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ENABLE") + .HasColumnType("int"); + + b.Property("REMARK") + .HasColumnType("nvarchar(max)"); + + b.Property("TOTIME") + .HasColumnType("datetime2"); + + b.Property("UPTIME") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("CM_DEVICE_CONTROL", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241007095809_add_tale_AutoSamplingCondition.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241007095809_add_tale_AutoSamplingCondition.cs new file mode 100644 index 0000000..602d4ff --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241007095809_add_tale_AutoSamplingCondition.cs @@ -0,0 +1,37 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_tale_AutoSamplingCondition : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_AutoSamplingCondition", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + ConditionType = table.Column(type: "int", nullable: false), + ConditionName = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_AutoSamplingCondition", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_AutoSamplingCondition", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241014014503_add_table_ManualTestingJobRec.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241014014503_add_table_ManualTestingJobRec.Designer.cs new file mode 100644 index 0000000..3184a94 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241014014503_add_table_ManualTestingJobRec.Designer.cs @@ -0,0 +1,915 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20241014014503_add_table_ManualTestingJobRec")] + partial class add_table_ManualTestingJobRec + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.AutoSamplingCondition", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConditionName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ConditionType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_AutoSamplingCondition", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.CodeConversion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionTime") + .HasColumnType("datetime2"); + + b.Property("ConversionType") + .HasColumnType("int"); + + b.Property("OperName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SorcCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TargetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_CodeConversion", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Datas.ManualTestingJobRec", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Operator") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TestingCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TestingDate") + .HasColumnType("datetime2"); + + b.Property("TestingProject") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_ManualTestingJobRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Datas.ZYOperateRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DateTime") + .HasColumnType("datetime2"); + + b.Property("MachineCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PersonId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Record") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_ZYOperateRecord", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Tasks.CmDeviceControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BETIME") + .HasColumnType("datetime2"); + + b.Property("DEVICE") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ENABLE") + .HasColumnType("int"); + + b.Property("REMARK") + .HasColumnType("nvarchar(max)"); + + b.Property("TOTIME") + .HasColumnType("datetime2"); + + b.Property("UPTIME") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("CM_DEVICE_CONTROL", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241014014503_add_table_ManualTestingJobRec.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241014014503_add_table_ManualTestingJobRec.cs new file mode 100644 index 0000000..682e573 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241014014503_add_table_ManualTestingJobRec.cs @@ -0,0 +1,40 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_ManualTestingJobRec : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_ManualTestingJobRec", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + TestingCode = table.Column(type: "nvarchar(max)", nullable: false), + TestingProject = table.Column(type: "nvarchar(max)", nullable: false), + TestingDate = table.Column(type: "datetime2", nullable: false), + Operator = table.Column(type: "nvarchar(max)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_ManualTestingJobRec", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_ManualTestingJobRec", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241101013705_add_table_FullWaterComp.Designer.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241101013705_add_table_FullWaterComp.Designer.cs new file mode 100644 index 0000000..4d4898c --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241101013705_add_table_FullWaterComp.Designer.cs @@ -0,0 +1,939 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + [Migration("20241101013705_add_table_FullWaterComp")] + partial class add_table_FullWaterComp + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.AutoSamplingCondition", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConditionName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ConditionType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_AutoSamplingCondition", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.CodeConversion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionTime") + .HasColumnType("datetime2"); + + b.Property("ConversionType") + .HasColumnType("int"); + + b.Property("OperName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SorcCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TargetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_CodeConversion", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Datas.ManualTestingJobRec", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Operator") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TestingCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TestingDate") + .HasColumnType("datetime2"); + + b.Property("TestingProject") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_ManualTestingJobRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Datas.ZYOperateRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DateTime") + .HasColumnType("datetime2"); + + b.Property("MachineCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PersonId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Record") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_ZYOperateRecord", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.FullWaterComp", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Index") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.ToTable("TS_FullWaterComp", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Tasks.CmDeviceControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BETIME") + .HasColumnType("datetime2"); + + b.Property("DEVICE") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ENABLE") + .HasColumnType("int"); + + b.Property("REMARK") + .HasColumnType("nvarchar(max)"); + + b.Property("TOTIME") + .HasColumnType("datetime2"); + + b.Property("UPTIME") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("CM_DEVICE_CONTROL", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241101013705_add_table_FullWaterComp.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241101013705_add_table_FullWaterComp.cs new file mode 100644 index 0000000..931be12 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/20241101013705_add_table_FullWaterComp.cs @@ -0,0 +1,38 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + /// + public partial class add_table_FullWaterComp : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "TS_FullWaterComp", + schema: "TaskScheduling", + columns: table => new + { + Id = table.Column(type: "bigint", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Type = table.Column(type: "nvarchar(max)", nullable: false), + Index = table.Column(type: "nvarchar(max)", nullable: false), + Value = table.Column(type: "decimal(18,2)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TS_FullWaterComp", x => x.Id); + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TS_FullWaterComp", + schema: "TaskScheduling"); + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/TaskSchedulingDbContextModelSnapshot.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/TaskSchedulingDbContextModelSnapshot.cs new file mode 100644 index 0000000..083e058 --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/Migrations/TaskSchedulingDbContextModelSnapshot.cs @@ -0,0 +1,936 @@ +// +using System; +using Himp.TaskScheduling.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Himp.TaskScheduling.Migrations +{ + [DbContext(typeof(TaskSchedulingDbContext))] + partial class TaskSchedulingDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("ProductVersion", "8.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Himp.TaskScheduling.AutoSamplingCondition", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConditionName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ConditionType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_AutoSamplingCondition", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowModelKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowModelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowTypeProvider") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_BizflowConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("AssigneeDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("AssigneeParName") + .HasColumnType("nvarchar(max)"); + + b.Property("BizflowConfigId") + .HasColumnType("uniqueidentifier"); + + b.Property("CanAuditFlag") + .HasColumnType("bit"); + + b.Property("CanEditFlag") + .HasColumnType("bit"); + + b.Property("CanRejectFlag") + .HasColumnType("bit"); + + b.Property("CandidateGroupsDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CandidateUsersDefValues") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateGroupsParName") + .HasColumnType("nvarchar(max)"); + + b.Property("CaudidateUsersParName") + .HasColumnType("nvarchar(max)"); + + b.Property("Component") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("SchemaUI") + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.Property("WorkflowIndex") + .HasColumnType("int"); + + b.Property("WorkflowNodeKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("WorkflowNodeType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BizflowConfigId"); + + b.ToTable("TS_BizflowNode", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("BizflowNodeId") + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("UserCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BizflowNodeId"); + + b.ToTable("TS_BizflowNodeAssocCandidateUser", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.CodeConversion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConversionTime") + .HasColumnType("datetime2"); + + b.Property("ConversionType") + .HasColumnType("int"); + + b.Property("OperName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SorcCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TargetCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_CodeConversion", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Datas.ManualTestingJobRec", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Operator") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TestingCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TestingDate") + .HasColumnType("datetime2"); + + b.Property("TestingProject") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_ManualTestingJobRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Datas.ZYOperateRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DateTime") + .HasColumnType("datetime2"); + + b.Property("MachineCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PersonId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Record") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_ZYOperateRecord", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgRec", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("EventMsgOperStas") + .HasColumnType("int"); + + b.Property("ExtraProperties") + .IsRequired() + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MsgCont") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("MsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_EventMsgRec", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Property("Id") + .HasColumnType("uniqueidentifier"); + + b.Property("DefaultFlag") + .HasColumnType("bit"); + + b.Property("EventMsgTopicCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("EventMsgTopicName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LvIndex") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Srtno") + .HasColumnType("int"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.Property("TopicFullPath") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_EventMsgTopic", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.FullWaterComp", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Index") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.ToTable("TS_FullWaterComp", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DefValue") + .HasColumnType("nvarchar(max)"); + + b.Property("KeyPath") + .HasColumnType("nvarchar(max)"); + + b.Property("ParamCodg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ParamType") + .HasColumnType("int"); + + b.Property("ParamValue") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("bigint"); + + b.Property("PropertyKey") + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyType") + .HasColumnType("int"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ParentId"); + + b.ToTable("TS_ParamConfig", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfigTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ExecTime") + .HasColumnType("datetime2"); + + b.Property("OperationTime") + .HasColumnType("datetime2"); + + b.Property("OperatorName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyKey") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PropertyValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskContdesc") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskMsg") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskStas") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("TS_ParamConfigTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleObtainTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AssayCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("CoalTime") + .HasColumnType("datetime2"); + + b.Property("CoalType") + .HasColumnType("int"); + + b.Property("CustCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ExtractCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opercode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Opername") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SamplePreparationCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SeparateCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TaskEndFlag") + .HasColumnType("bit"); + + b.Property("TaskEndTime") + .HasColumnType("datetime2"); + + b.Property("TaskStartTime") + .HasColumnType("datetime2"); + + b.Property("TaskState") + .HasColumnType("int"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestItemCode") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("task_remark") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleObtainTask", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationPlan", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ParName") + .HasColumnType("nvarchar(450)"); + + b.Property("ParValue") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id", "ParName"); + + b.ToTable("TS_SamplePreparationPlan", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationResult", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("Begtime") + .HasColumnType("datetime2"); + + b.Property("BottomCode21") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode22") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode31") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode61") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode62") + .HasColumnType("nvarchar(max)"); + + b.Property("Endtime") + .HasColumnType("datetime2"); + + b.Property("SampeEqp") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TotalCoalSampleWeight") + .HasColumnType("real"); + + b.Property("Weight21Bottles") + .HasColumnType("real"); + + b.Property("Weight22Bottles") + .HasColumnType("real"); + + b.Property("Weight2Rejects") + .HasColumnType("real"); + + b.Property("Weight31Bottles") + .HasColumnType("real"); + + b.Property("Weight3Rejects") + .HasColumnType("real"); + + b.Property("Weight61Bottles") + .HasColumnType("real"); + + b.Property("Weight62Bottles") + .HasColumnType("real"); + + b.Property("Weight6Rejects") + .HasColumnType("real"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationResult", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SamplePreparationTask", b => + { + b.Property("Id") + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("TS_SamplePreparationTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.SampleTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("ManualFlag") + .HasColumnType("int"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("SampleType") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskRecptTime") + .HasColumnType("datetime2"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("TestItems") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("TS_SampleTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestItem", b => + { + b.Property("Id") + .HasColumnType("bigint"); + + b.Property("TestItems") + .HasColumnType("nvarchar(450)"); + + b.Property("SampleType") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ValiFlag") + .HasColumnType("bit"); + + b.HasKey("Id", "TestItems"); + + b.ToTable("TS_StandardTestItem", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.StandardTestTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AuditTime") + .HasColumnType("datetime2"); + + b.Property("Auditor") + .HasColumnType("nvarchar(max)"); + + b.Property("BottomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("ExecStas") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("LastOperTime") + .HasColumnType("datetime2"); + + b.Property("SampeWay") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SampleCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.Property("Sampletype") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("nvarchar(16)"); + + b.Property("TaskAssgnTime") + .HasColumnType("datetime2"); + + b.Property("TaskType") + .HasColumnType("int"); + + b.Property("TestCnt") + .HasColumnType("int"); + + b.Property("TestCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("nvarchar(32)"); + + b.HasKey("Id"); + + b.ToTable("TS_StandardTestTasks", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.Tasks.CmDeviceControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BETIME") + .HasColumnType("datetime2"); + + b.Property("DEVICE") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ENABLE") + .HasColumnType("int"); + + b.Property("REMARK") + .HasColumnType("nvarchar(max)"); + + b.Property("TOTIME") + .HasColumnType("datetime2"); + + b.Property("UPTIME") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("CM_DEVICE_CONTROL", "TaskScheduling"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.HasOne("Himp.TaskScheduling.BizflowConfig", "BizflowConfig") + .WithMany("BizflowNodes") + .HasForeignKey("BizflowConfigId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowConfig"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNodeAssocCandidateUser", b => + { + b.HasOne("Himp.TaskScheduling.BizflowNode", "BizflowNode") + .WithMany("BizflowNodeAssocCandidateUsers") + .HasForeignKey("BizflowNodeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("BizflowNode"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.HasOne("Himp.TaskScheduling.EventMsgTopic", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.HasOne("Himp.TaskScheduling.ParamConfig", "Parent") + .WithMany("Children") + .HasForeignKey("ParentId"); + + b.Navigation("Parent"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowConfig", b => + { + b.Navigation("BizflowNodes"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.BizflowNode", b => + { + b.Navigation("BizflowNodeAssocCandidateUsers"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.EventMsgTopic", b => + { + b.Navigation("Children"); + }); + + modelBuilder.Entity("Himp.TaskScheduling.ParamConfig", b => + { + b.Navigation("Children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Himp.TaskScheduling.EntityFrameworkCore/SamplePreparationRecDapperRepository.cs b/src/Himp.TaskScheduling.EntityFrameworkCore/SamplePreparationRecDapperRepository.cs new file mode 100644 index 0000000..298447a --- /dev/null +++ b/src/Himp.TaskScheduling.EntityFrameworkCore/SamplePreparationRecDapperRepository.cs @@ -0,0 +1,40 @@ +using Dapper; +using Himp.TaskScheduling.EntityFrameworkCore; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Domain.Repositories.Dapper; +using Volo.Abp.EntityFrameworkCore; + +namespace Himp.RL +{ + public class SamplePreparationRecDapperRepository: DapperRepository, ITransientDependency + { + public SamplePreparationRecDapperRepository(IDbContextProvider dbContextProvider) + : base(dbContextProvider) + { + } + + public virtual async Task> GetAllPersonNamesAsync() + { + var dbConnection = await GetDbConnectionAsync(); + return (await dbConnection.QueryAsync( + "select MachineCode from HY_SamplePreparationRec", + transaction: await GetDbTransactionAsync()) + ).ToList(); + } + + public virtual async Task UpdatePersonNamesAsync(string name) + { + var dbConnection = await GetDbConnectionAsync(); + return await dbConnection.ExecuteAsync( + "update People set Name = @NewName", + new { NewName = name }, + await GetDbTransactionAsync() + ); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi.Client/FodyWeavers.xml b/src/Himp.TaskScheduling.HttpApi.Client/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi.Client/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.HttpApi.Client/FodyWeavers.xsd b/src/Himp.TaskScheduling.HttpApi.Client/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi.Client/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.HttpApi.Client/Himp.TaskScheduling.HttpApi.Client.abppkg b/src/Himp.TaskScheduling.HttpApi.Client/Himp.TaskScheduling.HttpApi.Client.abppkg new file mode 100644 index 0000000..7deef5e --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi.Client/Himp.TaskScheduling.HttpApi.Client.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.http-api-client" +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.HttpApi.Client/Himp.TaskScheduling.HttpApi.Client.csproj b/src/Himp.TaskScheduling.HttpApi.Client/Himp.TaskScheduling.HttpApi.Client.csproj new file mode 100644 index 0000000..8982b1a --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi.Client/Himp.TaskScheduling.HttpApi.Client.csproj @@ -0,0 +1,21 @@ + + + + + + net8.0 + enable + Himp.TaskScheduling + + + + + + + + + + + + + diff --git a/src/Himp.TaskScheduling.HttpApi.Client/TaskSchedulingHttpApiClientModule.cs b/src/Himp.TaskScheduling.HttpApi.Client/TaskSchedulingHttpApiClientModule.cs new file mode 100644 index 0000000..89cd06f --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi.Client/TaskSchedulingHttpApiClientModule.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Http.Client; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; + +namespace Himp.TaskScheduling; + +[DependsOn( + typeof(TaskSchedulingApplicationContractsModule), + typeof(AbpHttpClientModule))] +public class TaskSchedulingHttpApiClientModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddHttpClientProxies( + typeof(TaskSchedulingApplicationContractsModule).Assembly, + TaskSchedulingRemoteServiceConsts.RemoteServiceName + ); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/FodyWeavers.xml b/src/Himp.TaskScheduling.HttpApi/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.HttpApi/FodyWeavers.xsd b/src/Himp.TaskScheduling.HttpApi/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.HttpApi/Himp.TaskScheduling.HttpApi.abppkg b/src/Himp.TaskScheduling.HttpApi/Himp.TaskScheduling.HttpApi.abppkg new file mode 100644 index 0000000..515bfe6 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp.TaskScheduling.HttpApi.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.http-api" +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.HttpApi/Himp.TaskScheduling.HttpApi.csproj b/src/Himp.TaskScheduling.HttpApi/Himp.TaskScheduling.HttpApi.csproj new file mode 100644 index 0000000..1983ca0 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp.TaskScheduling.HttpApi.csproj @@ -0,0 +1,16 @@ + + + + + + net8.0 + enable + + + + + + + + + diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ApiDataReportConvertController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ApiDataReportConvertController.cs new file mode 100644 index 0000000..14753f7 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ApiDataReportConvertController.cs @@ -0,0 +1,76 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json.Nodes; +using System.Threading.Tasks; +using Volo.Abp; + +namespace Himp.TaskScheduling.V1 +{ + /// + /// + /// + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/apiDataReport")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("apiDataReport")] + public class ApiDataReportConvertController : TaskSchedulingController + { + [HttpGet] + public async Task GetAsync() + { + ApiDataReportDto apiDataReportDto = new ApiDataReportDto(); + apiDataReportDto.Data = new List(); + + 分析样商品煤制样记录 data1 = new 分析样商品煤制样记录(); + data1.序号 = "1"; + data1.制样编号 = "1"; + data1.存查样总质量 = "1"; + data1.分析样容器质量 = "1"; + data1.分析样总质量 = "1"; + data1.设备名称 = "1"; + data1.制样人 = "1"; + data1.制样时间 = "1"; + apiDataReportDto.Data.Add(data1); + apiDataReportDto.Total = 1; + apiDataReportDto.Count = 1; + + return apiDataReportDto; + } + } + + public class ApiDataReportDto + { + public List Data { get; set; } + + public int Total { get; set; } + + public int Count { get; set; } + } + + public class 分析样商品煤制样记录 + { + public string 序号 { get; set; } + + public string 制样编号 { get; set; } + + public string 存查样总质量 { get; set; } + + public string 分析样容器质量 { get; set; } + + public string 分析样总质量 { get; set; } + + public string 设备名称 { get; set; } + + public string 制样人 { get; set; } + + public string 制样时间 { get; set; } + + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/AutoSamplingConditionController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/AutoSamplingConditionController.cs new file mode 100644 index 0000000..3fbba50 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/AutoSamplingConditionController.cs @@ -0,0 +1,39 @@ +using Asp.Versioning; +using Himp.TaskScheduling.Datas; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/autoSamplingCondition")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("autoSamplingCondition")] + public class AutoSamplingConditionController : TaskSchedulingController + { + private IAutoSamplingConditionService _autoSamplingConditionService; + + public AutoSamplingConditionController(IAutoSamplingConditionService autoSamplingConditionService) + { + _autoSamplingConditionService = autoSamplingConditionService; + } + + /// + /// + /// + /// + /// + [HttpGet] + public async Task GetAsync([FromQuery] AutoSamplingConditionInput input) + { + return await _autoSamplingConditionService.GetAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/DataStatisticController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/DataStatisticController.cs new file mode 100644 index 0000000..4850ea9 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/DataStatisticController.cs @@ -0,0 +1,40 @@ +using Asp.Versioning; +using Himp.TaskScheduling.Datas; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1.Datas +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/v1/dataStatistic")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("dataStatistic")] + public class DataStatisticController : TaskSchedulingController + { + private IDataStatisticService _dataStatisticService; + + public DataStatisticController(IDataStatisticService dataStatisticService) + { + _dataStatisticService = dataStatisticService; + } + + /// + /// + /// + /// + /// + [HttpGet] + public async Task> GetAsync() + { + return await _dataStatisticService.GetAsync(); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/DataVController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/DataVController.cs new file mode 100644 index 0000000..938ec6b --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/DataVController.cs @@ -0,0 +1,40 @@ +using Asp.Versioning; +using Himp.TaskScheduling.Datas; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1.Datas +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/v1/dataV")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("dataV")] + public class DataVController : TaskSchedulingController + { + private IDataVService _dataStatisticService; + + public DataVController(IDataVService dataStatisticService) + { + _dataStatisticService = dataStatisticService; + } + + /// + /// + /// + /// + /// + [HttpGet] + public async Task> GetAsync() + { + return await _dataStatisticService.GetAsync(); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/FullWaterCompServiceController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/FullWaterCompServiceController.cs new file mode 100644 index 0000000..efef708 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/FullWaterCompServiceController.cs @@ -0,0 +1,65 @@ +using Asp.Versioning; +using Himp.TaskScheduling.Datas; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + /// + /// 全水补偿 + /// + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/fullWaterCompService")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("fullWaterCompService")] + public class FullWaterCompServiceController : TaskSchedulingController, IFullWaterCompService + { + private IFullWaterCompService _fullWaterCompServiceService; + + public FullWaterCompServiceController(IFullWaterCompService fullWaterCompServiceService) + { + _fullWaterCompServiceService = fullWaterCompServiceService; + } + + [HttpPost] + public async Task CreateAsync([FromBody]FullWaterCompCreateOrUpdateDto input) + { + return await _fullWaterCompServiceService.CreateAsync(input); + } + + [HttpDelete] + [Route("{id}")] + public async Task DeleteAsync(long id) + { + await _fullWaterCompServiceService.DeleteAsync(id); + } + + [HttpGet] + [Route("{id}")] + public async Task GetAsync(long id) + { + return await _fullWaterCompServiceService.GetAsync(id); + } + + [HttpGet] + public async Task> GetListAsync([FromQuery]FullWaterCompInput input) + { + return await _fullWaterCompServiceService.GetListAsync(input); + } + + [HttpPut] + [Route("{id}")] + public async Task UpdateAsync(long id, [FromBody]FullWaterCompCreateOrUpdateDto input) + { + return await _fullWaterCompServiceService.UpdateAsync(id, input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ManualTestingJobRecController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ManualTestingJobRecController.cs new file mode 100644 index 0000000..c81f3e4 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ManualTestingJobRecController.cs @@ -0,0 +1,35 @@ +using Asp.Versioning; +using Himp.TaskScheduling.Datas; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/manualTestingJobRec")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("manualTestingJobRec")] + public class ManualTestingJobRecController : TaskSchedulingController + { + private IManualTestingJobRecService _manualTestingJobRecService; + + public ManualTestingJobRecController(IManualTestingJobRecService manualTestingJobRecService) + { + _manualTestingJobRecService = manualTestingJobRecService; + } + + [HttpGet] + public async Task> GetListAsync([FromQuery] ManualTestingJobRecInput input) + { + return await _manualTestingJobRecService.GetListAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/SamplePreparationRecController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/SamplePreparationRecController.cs new file mode 100644 index 0000000..f6194c6 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/SamplePreparationRecController.cs @@ -0,0 +1,34 @@ +using Asp.Versioning; +using Himp.TaskScheduling.Datas; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/samplePreparationRec")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("samplePreparationRec")] + public class SamplePreparationRecController : TaskSchedulingController + { + private ISamplePreparationDatavService _samplePreparationRecService; + + public SamplePreparationRecController(ISamplePreparationDatavService samplePreparationRecService) + { + _samplePreparationRecService = samplePreparationRecService; + } + + [HttpGet] + public async Task GetAsync() + { + return await _samplePreparationRecService.GetSampleData(); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ThAuthController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ThAuthController.cs new file mode 100644 index 0000000..294bafd --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ThAuthController.cs @@ -0,0 +1,42 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; + +namespace Himp.TaskScheduling.V1.Datas +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/v1/thAuth")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("thAuth")] + public class ThAuthController : TaskSchedulingController + { + [HttpGet] + public async Task GetAsync(string code) + { + ThAuth thAuth = new ThAuth(); + thAuth.Data = new ThAuthData(); + thAuth.Data.Username = "admin"; + + return thAuth; + } + } + + public class ThAuth + { + public int Code { get; set; } + + public ThAuthData Data { get; set; } + } + + public class ThAuthData + { + public string Username { get; set; } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ZYOperateRecordController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ZYOperateRecordController.cs new file mode 100644 index 0000000..d992762 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Datas/ZYOperateRecordController.cs @@ -0,0 +1,35 @@ +using Asp.Versioning; +using Himp.TaskScheduling.Datas; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/zyOperateRecord")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("zyOperateRecord")] + public class ZYOperateRecordController : TaskSchedulingController + { + private IZYOperateRecordService _zyOperateRecordService; + + public ZYOperateRecordController(IZYOperateRecordService zyOperateRecordService) + { + _zyOperateRecordService = zyOperateRecordService; + } + + [HttpGet] + public async Task> GetListAsync([FromQuery]ZYOperateRecordInput input) + { + return await _zyOperateRecordService.GetListAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Msgs/EventMsgRecServiceController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Msgs/EventMsgRecServiceController.cs new file mode 100644 index 0000000..9208cff --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Msgs/EventMsgRecServiceController.cs @@ -0,0 +1,35 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/eventMsgRec")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("eventMsgRec")] + public class EventMsgRecServiceController : TaskSchedulingController, IEventMsgRecService + { + private IEventMsgRecService _eventMsgRecService; + + public EventMsgRecServiceController(IEventMsgRecService eventMsgRecService) + { + _eventMsgRecService = eventMsgRecService; + } + + [HttpGet] + [Route("list")] + public Task> GetListAsync([FromQuery] EventMsgRecInput input) + { + return _eventMsgRecService.GetListAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Msgs/EventMsgTopicServiceController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Msgs/EventMsgTopicServiceController.cs new file mode 100644 index 0000000..19b2586 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Msgs/EventMsgTopicServiceController.cs @@ -0,0 +1,21 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/eventMsgTopic")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("eventMsgTopic")] + public class EventMsgTopicServiceController : TaskSchedulingController, IEventMsgTopicService + { + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/CodeConversionController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/CodeConversionController.cs new file mode 100644 index 0000000..b4e284c --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/CodeConversionController.cs @@ -0,0 +1,44 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/codeConversion")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("codeConversion")] + public class CodeConversionController : TaskSchedulingController + { + private ICodeConversionService _codeConversionService; + + /// + /// + /// + /// + public CodeConversionController(ICodeConversionService codeConversionService) + { + _codeConversionService = codeConversionService; + } + + /// + /// + /// + /// + /// + [HttpGet] + [Route("list")] + public async Task> GetListAsync([FromQuery] CodeConversionInput input) + { + return await _codeConversionService.GetListAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/ParamConfigController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/ParamConfigController.cs new file mode 100644 index 0000000..bbea6de --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/ParamConfigController.cs @@ -0,0 +1,90 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/paramConfig")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("paramConfig")] + public class ParamConfigController : TaskSchedulingController, IParamConfigService + { + private IParamConfigService _paramConfigService; + + /// + /// + /// + /// + public ParamConfigController(IParamConfigService paramConfigService) + { + _paramConfigService = paramConfigService; + } + + /// + /// + /// + /// + /// + [HttpPost] + public async Task CreateAsync([FromBody] ParamConfigCreateOrUpdateDto input) + { + return await _paramConfigService.CreateAsync(input); + } + + /// + /// + /// + /// + /// + [HttpDelete] + public async Task DeleteAsync(long id) + { + await _paramConfigService.DeleteAsync(id); + } + + /// + /// + /// + /// + /// + [HttpGet] + public async Task GetAsync(long id) + { + return await _paramConfigService.GetAsync(id); + } + + /// + /// + /// + /// + /// + [HttpGet] + [Route("list")] + public async Task> GetListAsync([FromQuery] ParamConfigInput input) + { + return await _paramConfigService.GetListAsync(input); + } + + /// + /// + /// + /// + /// + /// + [HttpPut] + [Route("{id}")] + public async Task UpdateAsync(long id, [FromBody] ParamConfigCreateOrUpdateDto input) + { + return await _paramConfigService.UpdateAsync(id, input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/ParamConfigTaskController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/ParamConfigTaskController.cs new file mode 100644 index 0000000..cf521e6 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/ParamConfigTaskController.cs @@ -0,0 +1,58 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + /// + /// + /// + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/paramConfigTask")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("paramConfigTask")] + public class ParamConfigTaskController : TaskSchedulingController, IParamConfigTaskService + { + private IParamConfigTaskService _paramConfigTaskService; + + /// + /// + /// + /// + public ParamConfigTaskController(IParamConfigTaskService paramConfigTaskService) + { + _paramConfigTaskService = paramConfigTaskService; + } + + /// + /// + /// + /// + /// + /// + [HttpGet] + public Task> GetListAsync([FromQuery]ParamConfigTaskInput input) + { + return _paramConfigTaskService.GetListAsync(input); + } + + /// + /// + /// + /// + /// + [HttpPost] + public Task PostAsync([FromBody]ParamConfigTaskCreateDto input) + { + return _paramConfigTaskService.PostAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/ParamConfigValueController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/ParamConfigValueController.cs new file mode 100644 index 0000000..fc91d53 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/ParamConfigValueController.cs @@ -0,0 +1,44 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; + +namespace Himp.TaskScheduling +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/paramValue")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("paramValue")] + public class ParamConfigValueController : TaskSchedulingController, IParamConfigValueService + { + private IParamConfigValueService _paramConfigValueService; + + /// + /// + /// + /// + public ParamConfigValueController(IParamConfigValueService paramConfigValueService) + { + _paramConfigValueService = paramConfigValueService; + } + + [HttpGet] + [Route("keys")] + public Task> GetKeyListAsync() + { + return _paramConfigValueService.GetKeyListAsync(); + } + + [HttpGet] + public Task> GetListAsync([FromQuery] ParamConfigValueInput input) + { + return _paramConfigValueService.GetListAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/QsCodeController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/QsCodeController.cs new file mode 100644 index 0000000..1ecfd4b --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/ParamConfigs/QsCodeController.cs @@ -0,0 +1,48 @@ +using Asp.Versioning; +using Himp.TaskScheduling.Configs; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/qsCode")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("qsCode")] + public class QsCodeController : TaskSchedulingController + { + private IQsCodeService _qsCodeService; + + /// + /// + /// + /// + public QsCodeController(IQsCodeService qsCodeService) + { + _qsCodeService = qsCodeService; + } + + /// + /// + /// + /// + /// + [HttpPost] + public async Task PostAsync([FromBody] QsCodeInput input) + { + QsCodeDto qsCodeDto = new QsCodeDto(); + var code = await _qsCodeService.PostAsync(input); + qsCodeDto.QsCode = code; + + return qsCodeDto; + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/CmDeviceControlController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/CmDeviceControlController.cs new file mode 100644 index 0000000..b9fa0e6 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/CmDeviceControlController.cs @@ -0,0 +1,44 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; + +namespace Himp.TaskScheduling.V1 +{ + /// + /// + /// + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/cmDeviceControl")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("cmDeviceControl")] + public class CmDeviceControlController : TaskSchedulingController + { + private ICmDeviceControlService _cmDeviceControlService; + + public CmDeviceControlController(ICmDeviceControlService cmDeviceControlService) + { + _cmDeviceControlService = cmDeviceControlService; + } + + [HttpPut] + [Route("{id}")] + public async Task PutAsync(int id, [FromBody] CmDeviceControlUpdateDto input) + { + return await _cmDeviceControlService.PutAsync(id,input); + } + + [HttpGet] + [Route("{id}")] + public async Task GetAsync(int id) + { + return await _cmDeviceControlService.GetAsync(id); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/ManualSamplingTaskController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/ManualSamplingTaskController.cs new file mode 100644 index 0000000..88f1816 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/ManualSamplingTaskController.cs @@ -0,0 +1,34 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/manualSamplingTask")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("manualSamplingTask")] + public class ManualSamplingTaskController : TaskSchedulingController + { + private IManualSamplingTaskService _manualSamplingTaskServiceService; + + public ManualSamplingTaskController(IManualSamplingTaskService manualSamplingTaskServiceService) + { + _manualSamplingTaskServiceService = manualSamplingTaskServiceService; + } + + [HttpPost] + public Task PostAsync([FromBody] ManualSamplingTaskCreateDto input) + { + return _manualSamplingTaskServiceService.PostAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SampleDiscardedTaskController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SampleDiscardedTaskController.cs new file mode 100644 index 0000000..743d236 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SampleDiscardedTaskController.cs @@ -0,0 +1,33 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/sampleDiscardedTask")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("sampleDiscardedTask")] + public class SampleDiscardedTaskController : TaskSchedulingController + { + private ISampleDiscardedTaskService _sampleDiscardedTaskService; + + public SampleDiscardedTaskController(ISampleDiscardedTaskService sampleDiscardedTaskService) + { + _sampleDiscardedTaskService = sampleDiscardedTaskService; + } + + [HttpPost] + public async Task PostAsync([FromBody]SampleDiscardedTaskCreateDto input) + { + return await _sampleDiscardedTaskService.Post(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SampleObtainTaskController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SampleObtainTaskController.cs new file mode 100644 index 0000000..962bc53 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SampleObtainTaskController.cs @@ -0,0 +1,38 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/sampleObtainTask")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("sampleObtainTask")] + public class SampleObtainTaskController : TaskSchedulingController + { + private ISampleObtainTaskService _sampleObtainTaskService; + + public SampleObtainTaskController(ISampleObtainTaskService sampleObtainTaskService) + { + _sampleObtainTaskService = sampleObtainTaskService; + } + + /// + /// + /// + /// + /// + [HttpPost] + public async Task PostAuditAsync([FromBody] SampleObtainTaskCreateDto input) + { + await _sampleObtainTaskService.PostAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SamplePreparationResultController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SamplePreparationResultController.cs new file mode 100644 index 0000000..b1e5b6e --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SamplePreparationResultController.cs @@ -0,0 +1,34 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1.Tasks +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/samplePreparationResult")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("samplePreparationResult")] + public class SamplePreparationResultController : TaskSchedulingController, ISamplePreparationResultService + { + private ISamplePreparationResultService _samplePreparationResultService; + + public SamplePreparationResultController(ISamplePreparationResultService samplePreparationResultService) + { + _samplePreparationResultService = samplePreparationResultService; + } + + [HttpGet] + public Task> GetListAsync([FromQuery] SamplePreparationResultInput input) + { + return _samplePreparationResultService.GetListAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SamplePreparationTaskController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SamplePreparationTaskController.cs new file mode 100644 index 0000000..d19a4be --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SamplePreparationTaskController.cs @@ -0,0 +1,68 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + /// + /// + /// + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/samplePreparationTask")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("samplePreparationTask")] + public class SamplePreparationTaskController : TaskSchedulingController, ISamplePreparationTaskService + { + private ISamplePreparationTaskService _samplePreparationTaskService; + + public SamplePreparationTaskController(ISamplePreparationTaskService samplePreparationTaskService) + { + _samplePreparationTaskService = samplePreparationTaskService; + } + + [HttpGet] + public Task> GetListAsync([FromQuery]SamplePreparationTaskInput input) + { + return _samplePreparationTaskService.GetListAsync(input); + } + + [HttpGet] + [Route("{id}/plan")] + public Task> GetPlanListAsync([FromRoute] string id) + { + return _samplePreparationTaskService.GetPlanListAsync(id); + } + + /// + /// 下发制样任务 + /// + /// + /// + [HttpPost] + public Task PostAsync([FromBody]SamplePreparationTaskCreateOrUpdateDto input) + { + return _samplePreparationTaskService.PostAsync(input); + } + + /// + /// 重新下发制样任务 + /// + /// + /// + /// + [HttpPut] + [Route("{id}")] + public Task PutAsync([FromRoute]string id, [FromBody] SamplePreparationTaskCreateOrUpdateDto input) + { + return _samplePreparationTaskService.PutAsync(id, input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SampleTestTaskController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SampleTestTaskController.cs new file mode 100644 index 0000000..a8c6900 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/SampleTestTaskController.cs @@ -0,0 +1,34 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/sampleTestTask")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("sampleTestTask")] + public class SampleTestTaskController : TaskSchedulingController, ISampleTestTaskService + { + private ISampleTestTaskService _sampleTestTaskService; + + public SampleTestTaskController(ISampleTestTaskService sampleTestTaskService) + { + _sampleTestTaskService = sampleTestTaskService; + } + + [HttpGet] + public Task> GetListAsync([FromQuery] SampleTestTaskInput input) + { + return _sampleTestTaskService.GetListAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/StandardTestTaskController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/StandardTestTaskController.cs new file mode 100644 index 0000000..560fa6b --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Tasks/StandardTestTaskController.cs @@ -0,0 +1,70 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/standardTestTask")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("standardTestTask")] + public class StandardTestTaskController : TaskSchedulingController, IStandardTestTaskService + { + private IStandardTestTaskService _standardTestTaskService; + + public StandardTestTaskController(IStandardTestTaskService standardTestTaskService) + { + _standardTestTaskService = standardTestTaskService; + } + + [HttpGet] + public Task> GetListAsync([FromQuery] StandardTestTaskInput input) + { + return _standardTestTaskService.GetListAsync(input); + } + + /// + /// + /// + /// + /// + [HttpGet] + [Route("item")] + public Task> GetItemListAsync() + { + return _standardTestTaskService.GetItemListAsync(); + } + + /// + /// + /// + /// + /// + [HttpPut] + [Route("item/{id}")] + public async Task PutItemValiAsync(long id, [FromQuery] bool valiFlag = false) + { + await _standardTestTaskService.PutItemValiAsync(id, valiFlag); + } + + /// + /// + /// + /// + /// + [HttpPost] + [Route("audit")] + public async Task PostAuditAsync([FromBody] StandardTestTaskAuditDto input) + { + await _standardTestTaskService.PostAuditAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/BizflowConfigController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/BizflowConfigController.cs new file mode 100644 index 0000000..d19a5bc --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/BizflowConfigController.cs @@ -0,0 +1,59 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/bizflowConfig")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("bizflowConfig")] + public class BizflowConfigController : TaskSchedulingController, IBizflowConfigService + { + private IBizflowConfigService _bizflowConfigService; + + public BizflowConfigController(IBizflowConfigService bizflowConfigService) + { + _bizflowConfigService = bizflowConfigService; + } + + [HttpPost] + public async Task CreateAsync([FromBody]BizflowConfigCreateDto input) + { + return await _bizflowConfigService.CreateAsync(input); + } + + [HttpDelete] + public async Task DeleteAsync(Guid id) + { + await _bizflowConfigService.DeleteAsync(id); + } + + [HttpGet] + public async Task GetAsync(Guid id) + { + return await _bizflowConfigService.GetAsync(id); + } + + [HttpGet] + [Route("list")] + public async Task> GetListAsync([FromQuery]BizflowConfigInput input) + { + return await _bizflowConfigService.GetListAsync(input); + } + + [HttpPut] + public async Task UpdateAsync(Guid id, BizflowConfigUpdateDto input) + { + return await _bizflowConfigService.UpdateAsync(id, input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/BizflowNodeController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/BizflowNodeController.cs new file mode 100644 index 0000000..330f492 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/BizflowNodeController.cs @@ -0,0 +1,59 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/bizflowNode")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("bizflowNode")] + public class BizflowNodeController : TaskSchedulingController, IBizflowNodeService + { + private IBizflowNodeService _bizflowNodeService; + + public BizflowNodeController(IBizflowNodeService bizflowNodeService) + { + _bizflowNodeService = bizflowNodeService; + } + + [HttpPost] + public async Task CreateAsync(BizflowNodeCreateDto input) + { + return await _bizflowNodeService.CreateAsync(input); + } + + [HttpDelete] + public async Task DeleteAsync(Guid id) + { + await _bizflowNodeService.DeleteAsync(id); + } + + [HttpGet] + public async Task GetAsync(Guid id) + { + return await _bizflowNodeService.GetAsync(id); + } + + [HttpGet] + [Route("list")] + public async Task> GetListAsync([FromQuery]BizflowNodeInput input) + { + return await _bizflowNodeService.GetListAsync(input); + } + + [HttpPut] + public async Task UpdateAsync(Guid id, BizflowNodeUpdateDto input) + { + return await _bizflowNodeService.UpdateAsync(id, input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/WorkflowDefinitionController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/WorkflowDefinitionController.cs new file mode 100644 index 0000000..10785b9 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/WorkflowDefinitionController.cs @@ -0,0 +1,82 @@ +using Asp.Versioning; +using Himp.TaskScheduling.Samples; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + /// + /// 流程定义 + /// + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/workflowDefinition")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("workflowDefinition")] + public class WorkflowDefinitionController : TaskSchedulingController, IWorkflowDefinitionService + { + private readonly IWorkflowDefinitionService _workflowDefinitionService; + + public WorkflowDefinitionController(IWorkflowDefinitionService workflowDefinitionService) + { + _workflowDefinitionService = workflowDefinitionService; + } + + [HttpGet] + public async Task> GetListAsync([FromQuery] ProcessDefinitionInput input) + { + return await _workflowDefinitionService.GetListAsync(input); + } + + /// + /// 激活/挂起 + /// + /// + /// + [HttpPost] + [Route("activate")] + public async Task PostActivateAsync([FromBody] WorkflowActivateDto input) + { + WorkflowInstanceStasDto stasDto = new WorkflowInstanceStasDto(); + await _workflowDefinitionService.PostActivateAsync(input); + + return stasDto; + } + + /// + /// 部署 + /// + /// + /// + [HttpPost] + [Route("deploy")] + public async Task PostDeployAsync([FromBody] WorkflowDeployDto input) + { + WorkflowInstanceStasDto stasDto = new WorkflowInstanceStasDto(); + var res = await _workflowDefinitionService.PostDeployAsync(input); + + return stasDto; + } + + /// + /// 删除 + /// + /// + /// + [HttpDelete] + public async Task DeleteAsync(string id) + { + WorkflowInstanceStasDto stasDto = new WorkflowInstanceStasDto(); + await _workflowDefinitionService.DeleteAsync(id); + + return stasDto; + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/WorkflowInstanceController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/WorkflowInstanceController.cs new file mode 100644 index 0000000..06cc98c --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/WorkflowInstanceController.cs @@ -0,0 +1,49 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + /// + /// 流程实例 + /// + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/workflowInstance")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("workflowInstance")] + public class WorkflowInstanceController : TaskSchedulingController, IWorkflowInstanceService + { + private IWorkflowInstanceService _workflowInstanceService; + + public WorkflowInstanceController(IWorkflowInstanceService workflowInstanceService) + { + _workflowInstanceService = workflowInstanceService; + } + + [HttpGet] + public async Task> GetListAsync([FromQuery] WorkflowInstanceInput input) + { + return await _workflowInstanceService.GetListAsync(input); + } + + [HttpPost] + public async Task PostAsync(WorkflowInstanceCreateDto input) + { + return await _workflowInstanceService.PostAsync(input); + } + + [HttpPut] + public async Task PutAsync(WorkflowInstanceExecDto input) + { + return await _workflowInstanceService.PutAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/WorkflowTodoTaskController.cs b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/WorkflowTodoTaskController.cs new file mode 100644 index 0000000..f21271f --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Himp/TaskScheduling/V1/Workflows/WorkflowTodoTaskController.cs @@ -0,0 +1,37 @@ +using Asp.Versioning; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; + +namespace Himp.TaskScheduling.V1 +{ + /// + /// 流程待办 + /// + [Area(TaskSchedulingRemoteServiceConsts.ModuleName)] + [RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] + [Route("api/taskScheduling/workflowTodoTask")] + [ApiVersion("1.0")] + [ApiController] + [ControllerName("workflowTodoTask")] + public class WorkflowTodoTaskController : TaskSchedulingController, IWorkflowTodoTaskService + { + private IWorkflowTodoTaskService _workflowTodoTaskService; + + public WorkflowTodoTaskController(IWorkflowTodoTaskService workflowTodoTaskService) + { + _workflowTodoTaskService = workflowTodoTaskService; + } + + [HttpGet] + public async Task> GetListAsync([FromQuery]WorkflowTodoTaskInput input) + { + return await _workflowTodoTaskService.GetListAsync(input); + } + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/Samples/SampleController.cs b/src/Himp.TaskScheduling.HttpApi/Samples/SampleController.cs new file mode 100644 index 0000000..675d1bf --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/Samples/SampleController.cs @@ -0,0 +1,33 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; + +namespace Himp.TaskScheduling.Samples; + +[Area(TaskSchedulingRemoteServiceConsts.ModuleName)] +[RemoteService(Name = TaskSchedulingRemoteServiceConsts.RemoteServiceName)] +[Route("api/TaskScheduling/sample")] +public class SampleController : TaskSchedulingController, ISampleAppService +{ + private readonly ISampleAppService _sampleAppService; + + public SampleController(ISampleAppService sampleAppService) + { + _sampleAppService = sampleAppService; + } + + [HttpGet] + public async Task GetAsync() + { + return await _sampleAppService.GetAsync(); + } + + [HttpGet] + [Route("authorized")] + [Authorize] + public async Task GetAuthorizedAsync() + { + return await _sampleAppService.GetAsync(); + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/TaskSchedulingController.cs b/src/Himp.TaskScheduling.HttpApi/TaskSchedulingController.cs new file mode 100644 index 0000000..2c6f8e4 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/TaskSchedulingController.cs @@ -0,0 +1,12 @@ +using Himp.TaskScheduling.Localization; +using Volo.Abp.AspNetCore.Mvc; + +namespace Himp.TaskScheduling; + +public abstract class TaskSchedulingController : AbpControllerBase +{ + protected TaskSchedulingController() + { + LocalizationResource = typeof(TaskSchedulingResource); + } +} diff --git a/src/Himp.TaskScheduling.HttpApi/TaskSchedulingHttpApiModule.cs b/src/Himp.TaskScheduling.HttpApi/TaskSchedulingHttpApiModule.cs new file mode 100644 index 0000000..37e37f7 --- /dev/null +++ b/src/Himp.TaskScheduling.HttpApi/TaskSchedulingHttpApiModule.cs @@ -0,0 +1,32 @@ +using Localization.Resources.AbpUi; +using Himp.TaskScheduling.Localization; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Microsoft.Extensions.DependencyInjection; + +namespace Himp.TaskScheduling; + +[DependsOn( + typeof(TaskSchedulingApplicationContractsModule), + typeof(AbpAspNetCoreMvcModule))] +public class TaskSchedulingHttpApiModule : AbpModule +{ + public override void PreConfigureServices(ServiceConfigurationContext context) + { + PreConfigure(mvcBuilder => + { + mvcBuilder.AddApplicationPartIfNotExists(typeof(TaskSchedulingHttpApiModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes(typeof(AbpUiResource)); + }); + } +} diff --git a/src/Himp.TaskScheduling.Installer/FodyWeavers.xml b/src/Himp.TaskScheduling.Installer/FodyWeavers.xml new file mode 100644 index 0000000..be0de3a --- /dev/null +++ b/src/Himp.TaskScheduling.Installer/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Installer/FodyWeavers.xsd b/src/Himp.TaskScheduling.Installer/FodyWeavers.xsd new file mode 100644 index 0000000..3f3946e --- /dev/null +++ b/src/Himp.TaskScheduling.Installer/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.Installer/Himp.TaskScheduling.Installer.csproj b/src/Himp.TaskScheduling.Installer/Himp.TaskScheduling.Installer.csproj new file mode 100644 index 0000000..d432b24 --- /dev/null +++ b/src/Himp.TaskScheduling.Installer/Himp.TaskScheduling.Installer.csproj @@ -0,0 +1,24 @@ + + + + + + net8.0 + enable + true + Himp.TaskScheduling + + + + + + + + + + true + content\ + + + + diff --git a/src/Himp.TaskScheduling.Installer/TaskSchedulingInstallerModule.cs b/src/Himp.TaskScheduling.Installer/TaskSchedulingInstallerModule.cs new file mode 100644 index 0000000..9992630 --- /dev/null +++ b/src/Himp.TaskScheduling.Installer/TaskSchedulingInstallerModule.cs @@ -0,0 +1,18 @@ +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; + +namespace Himp.TaskScheduling; + +[DependsOn( + typeof(AbpVirtualFileSystemModule) + )] +public class TaskSchedulingInstallerModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + } +} diff --git a/src/Himp.TaskScheduling.MongoDB/FodyWeavers.xml b/src/Himp.TaskScheduling.MongoDB/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/src/Himp.TaskScheduling.MongoDB/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.MongoDB/FodyWeavers.xsd b/src/Himp.TaskScheduling.MongoDB/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/src/Himp.TaskScheduling.MongoDB/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/src/Himp.TaskScheduling.MongoDB/Himp.TaskScheduling.MongoDB.abppkg b/src/Himp.TaskScheduling.MongoDB/Himp.TaskScheduling.MongoDB.abppkg new file mode 100644 index 0000000..8b23fd1 --- /dev/null +++ b/src/Himp.TaskScheduling.MongoDB/Himp.TaskScheduling.MongoDB.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.mongodb" +} \ No newline at end of file diff --git a/src/Himp.TaskScheduling.MongoDB/Himp.TaskScheduling.MongoDB.csproj b/src/Himp.TaskScheduling.MongoDB/Himp.TaskScheduling.MongoDB.csproj new file mode 100644 index 0000000..7c7b905 --- /dev/null +++ b/src/Himp.TaskScheduling.MongoDB/Himp.TaskScheduling.MongoDB.csproj @@ -0,0 +1,16 @@ + + + + + + net8.0 + enable + Himp.TaskScheduling + + + + + + + + diff --git a/src/Himp.TaskScheduling.MongoDB/MongoDB/ITaskSchedulingMongoDbContext.cs b/src/Himp.TaskScheduling.MongoDB/MongoDB/ITaskSchedulingMongoDbContext.cs new file mode 100644 index 0000000..b475c65 --- /dev/null +++ b/src/Himp.TaskScheduling.MongoDB/MongoDB/ITaskSchedulingMongoDbContext.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Data; +using Volo.Abp.MongoDB; + +namespace Himp.TaskScheduling.MongoDB; + +[ConnectionStringName(TaskSchedulingDbProperties.ConnectionStringName)] +public interface ITaskSchedulingMongoDbContext : IAbpMongoDbContext +{ + /* Define mongo collections here. Example: + * IMongoCollection Questions { get; } + */ +} diff --git a/src/Himp.TaskScheduling.MongoDB/MongoDB/TaskSchedulingMongoDbContext.cs b/src/Himp.TaskScheduling.MongoDB/MongoDB/TaskSchedulingMongoDbContext.cs new file mode 100644 index 0000000..2404a6b --- /dev/null +++ b/src/Himp.TaskScheduling.MongoDB/MongoDB/TaskSchedulingMongoDbContext.cs @@ -0,0 +1,19 @@ +using Volo.Abp.Data; +using Volo.Abp.MongoDB; + +namespace Himp.TaskScheduling.MongoDB; + +[ConnectionStringName(TaskSchedulingDbProperties.ConnectionStringName)] +public class TaskSchedulingMongoDbContext : AbpMongoDbContext, ITaskSchedulingMongoDbContext +{ + /* Add mongo collections here. Example: + * public IMongoCollection Questions => Collection(); + */ + + protected override void CreateModel(IMongoModelBuilder modelBuilder) + { + base.CreateModel(modelBuilder); + + modelBuilder.ConfigureTaskScheduling(); + } +} diff --git a/src/Himp.TaskScheduling.MongoDB/MongoDB/TaskSchedulingMongoDbContextExtensions.cs b/src/Himp.TaskScheduling.MongoDB/MongoDB/TaskSchedulingMongoDbContextExtensions.cs new file mode 100644 index 0000000..d3b33bf --- /dev/null +++ b/src/Himp.TaskScheduling.MongoDB/MongoDB/TaskSchedulingMongoDbContextExtensions.cs @@ -0,0 +1,13 @@ +using Volo.Abp; +using Volo.Abp.MongoDB; + +namespace Himp.TaskScheduling.MongoDB; + +public static class TaskSchedulingMongoDbContextExtensions +{ + public static void ConfigureTaskScheduling( + this IMongoModelBuilder builder) + { + Check.NotNull(builder, nameof(builder)); + } +} diff --git a/src/Himp.TaskScheduling.MongoDB/MongoDB/TaskSchedulingMongoDbModule.cs b/src/Himp.TaskScheduling.MongoDB/MongoDB/TaskSchedulingMongoDbModule.cs new file mode 100644 index 0000000..ec6f4c2 --- /dev/null +++ b/src/Himp.TaskScheduling.MongoDB/MongoDB/TaskSchedulingMongoDbModule.cs @@ -0,0 +1,22 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Modularity; +using Volo.Abp.MongoDB; + +namespace Himp.TaskScheduling.MongoDB; + +[DependsOn( + typeof(TaskSchedulingDomainModule), + typeof(AbpMongoDbModule) + )] +public class TaskSchedulingMongoDbModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddMongoDbContext(options => + { + /* Add custom repositories here. Example: + * options.AddRepository(); + */ + }); + } +} diff --git a/test/Himp.TaskScheduling.Application.Tests/FodyWeavers.xml b/test/Himp.TaskScheduling.Application.Tests/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/test/Himp.TaskScheduling.Application.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/Himp.TaskScheduling.Application.Tests/FodyWeavers.xsd b/test/Himp.TaskScheduling.Application.Tests/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/test/Himp.TaskScheduling.Application.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/test/Himp.TaskScheduling.Application.Tests/Himp.TaskScheduling.Application.Tests.abppkg b/test/Himp.TaskScheduling.Application.Tests/Himp.TaskScheduling.Application.Tests.abppkg new file mode 100644 index 0000000..a686451 --- /dev/null +++ b/test/Himp.TaskScheduling.Application.Tests/Himp.TaskScheduling.Application.Tests.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/test/Himp.TaskScheduling.Application.Tests/Himp.TaskScheduling.Application.Tests.csproj b/test/Himp.TaskScheduling.Application.Tests/Himp.TaskScheduling.Application.Tests.csproj new file mode 100644 index 0000000..8902c98 --- /dev/null +++ b/test/Himp.TaskScheduling.Application.Tests/Himp.TaskScheduling.Application.Tests.csproj @@ -0,0 +1,17 @@ + + + + + + net8.0 + enable + Himp.TaskScheduling + + + + + + + + + diff --git a/test/Himp.TaskScheduling.Application.Tests/Samples/SampleAppService_Tests.cs b/test/Himp.TaskScheduling.Application.Tests/Samples/SampleAppService_Tests.cs new file mode 100644 index 0000000..172a436 --- /dev/null +++ b/test/Himp.TaskScheduling.Application.Tests/Samples/SampleAppService_Tests.cs @@ -0,0 +1,31 @@ +using System.Threading.Tasks; +using Shouldly; +using Volo.Abp.Modularity; +using Xunit; + +namespace Himp.TaskScheduling.Samples; + +public abstract class SampleAppService_Tests : TaskSchedulingApplicationTestBase + where TStartupModule : IAbpModule +{ + private readonly ISampleAppService _sampleAppService; + + protected SampleAppService_Tests() + { + _sampleAppService = GetRequiredService(); + } + + [Fact] + public async Task GetAsync() + { + var result = await _sampleAppService.GetAsync(); + result.Value.ShouldBe(42); + } + + [Fact] + public async Task GetAuthorizedAsync() + { + var result = await _sampleAppService.GetAuthorizedAsync(); + result.Value.ShouldBe(42); + } +} diff --git a/test/Himp.TaskScheduling.Application.Tests/TaskSchedulingApplicationTestBase.cs b/test/Himp.TaskScheduling.Application.Tests/TaskSchedulingApplicationTestBase.cs new file mode 100644 index 0000000..bb23c0b --- /dev/null +++ b/test/Himp.TaskScheduling.Application.Tests/TaskSchedulingApplicationTestBase.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Modularity; + +namespace Himp.TaskScheduling; + +/* Inherit from this class for your application layer tests. + * See SampleAppService_Tests for example. + */ +public abstract class TaskSchedulingApplicationTestBase : TaskSchedulingTestBase + where TStartupModule : IAbpModule +{ + +} diff --git a/test/Himp.TaskScheduling.Application.Tests/TaskSchedulingApplicationTestModule.cs b/test/Himp.TaskScheduling.Application.Tests/TaskSchedulingApplicationTestModule.cs new file mode 100644 index 0000000..0c3ad78 --- /dev/null +++ b/test/Himp.TaskScheduling.Application.Tests/TaskSchedulingApplicationTestModule.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Modularity; + +namespace Himp.TaskScheduling; + +[DependsOn( + typeof(TaskSchedulingApplicationModule), + typeof(TaskSchedulingDomainTestModule) + )] +public class TaskSchedulingApplicationTestModule : AbpModule +{ + +} diff --git a/test/Himp.TaskScheduling.Domain.Tests/FodyWeavers.xml b/test/Himp.TaskScheduling.Domain.Tests/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/test/Himp.TaskScheduling.Domain.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/Himp.TaskScheduling.Domain.Tests/FodyWeavers.xsd b/test/Himp.TaskScheduling.Domain.Tests/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/test/Himp.TaskScheduling.Domain.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/test/Himp.TaskScheduling.Domain.Tests/Himp.TaskScheduling.Domain.Tests.abppkg b/test/Himp.TaskScheduling.Domain.Tests/Himp.TaskScheduling.Domain.Tests.abppkg new file mode 100644 index 0000000..a686451 --- /dev/null +++ b/test/Himp.TaskScheduling.Domain.Tests/Himp.TaskScheduling.Domain.Tests.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/test/Himp.TaskScheduling.Domain.Tests/Himp.TaskScheduling.Domain.Tests.csproj b/test/Himp.TaskScheduling.Domain.Tests/Himp.TaskScheduling.Domain.Tests.csproj new file mode 100644 index 0000000..45ae696 --- /dev/null +++ b/test/Himp.TaskScheduling.Domain.Tests/Himp.TaskScheduling.Domain.Tests.csproj @@ -0,0 +1,21 @@ + + + + + + net8.0 + enable + Himp.TaskScheduling + + + + + + + + + + + + + diff --git a/test/Himp.TaskScheduling.Domain.Tests/Samples/SampleManager_Tests.cs b/test/Himp.TaskScheduling.Domain.Tests/Samples/SampleManager_Tests.cs new file mode 100644 index 0000000..3769b80 --- /dev/null +++ b/test/Himp.TaskScheduling.Domain.Tests/Samples/SampleManager_Tests.cs @@ -0,0 +1,22 @@ +using System.Threading.Tasks; +using Volo.Abp.Modularity; +using Xunit; + +namespace Himp.TaskScheduling.Samples; + +public abstract class SampleManager_Tests : TaskSchedulingDomainTestBase + where TStartupModule : IAbpModule +{ + //private readonly SampleManager _sampleManager; + + public SampleManager_Tests() + { + //_sampleManager = GetRequiredService(); + } + + [Fact] + public Task Method1Async() + { + return Task.CompletedTask; + } +} diff --git a/test/Himp.TaskScheduling.Domain.Tests/TaskSchedulingDomainTestBase.cs b/test/Himp.TaskScheduling.Domain.Tests/TaskSchedulingDomainTestBase.cs new file mode 100644 index 0000000..9cb4267 --- /dev/null +++ b/test/Himp.TaskScheduling.Domain.Tests/TaskSchedulingDomainTestBase.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Modularity; + +namespace Himp.TaskScheduling; + +/* Inherit from this class for your domain layer tests. + * See SampleManager_Tests for example. + */ +public abstract class TaskSchedulingDomainTestBase : TaskSchedulingTestBase + where TStartupModule : IAbpModule +{ + +} diff --git a/test/Himp.TaskScheduling.Domain.Tests/TaskSchedulingDomainTestModule.cs b/test/Himp.TaskScheduling.Domain.Tests/TaskSchedulingDomainTestModule.cs new file mode 100644 index 0000000..fb6c9dd --- /dev/null +++ b/test/Himp.TaskScheduling.Domain.Tests/TaskSchedulingDomainTestModule.cs @@ -0,0 +1,12 @@ +using Volo.Abp.Modularity; + +namespace Himp.TaskScheduling; + +[DependsOn( + typeof(TaskSchedulingDomainModule), + typeof(TaskSchedulingTestBaseModule) +)] +public class TaskSchedulingDomainTestModule : AbpModule +{ + +} diff --git a/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/Applications/EfCoreSampleAppService_Tests.cs b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/Applications/EfCoreSampleAppService_Tests.cs new file mode 100644 index 0000000..4666b97 --- /dev/null +++ b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/Applications/EfCoreSampleAppService_Tests.cs @@ -0,0 +1,9 @@ +using Himp.TaskScheduling.Samples; +using Xunit; + +namespace Himp.TaskScheduling.EntityFrameworkCore.Applications; + +public class EfCoreSampleAppService_Tests : SampleAppService_Tests +{ + +} diff --git a/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/Domains/EfCoreSampleDomain_Tests.cs b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/Domains/EfCoreSampleDomain_Tests.cs new file mode 100644 index 0000000..eab75fd --- /dev/null +++ b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/Domains/EfCoreSampleDomain_Tests.cs @@ -0,0 +1,9 @@ +using Himp.TaskScheduling.Samples; +using Xunit; + +namespace Himp.TaskScheduling.EntityFrameworkCore.Domains; + +public class EfCoreSampleDomain_Tests : SampleManager_Tests +{ + +} diff --git a/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs new file mode 100644 index 0000000..92a0bd7 --- /dev/null +++ b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs @@ -0,0 +1,11 @@ +using Himp.TaskScheduling.Samples; + +namespace Himp.TaskScheduling.EntityFrameworkCore.Samples; + +public class SampleRepository_Tests : SampleRepository_Tests +{ + /* Don't write custom repository tests here, instead write to + * the base class. + * One exception can be some specific tests related to EF core. + */ +} diff --git a/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/TaskSchedulingEntityFrameworkCoreTestBase.cs b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/TaskSchedulingEntityFrameworkCoreTestBase.cs new file mode 100644 index 0000000..579021f --- /dev/null +++ b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/TaskSchedulingEntityFrameworkCoreTestBase.cs @@ -0,0 +1,9 @@ +namespace Himp.TaskScheduling.EntityFrameworkCore; + +/* This class can be used as a base class for EF Core integration tests, + * while SampleRepository_Tests uses a different approach. + */ +public abstract class TaskSchedulingEntityFrameworkCoreTestBase : TaskSchedulingTestBase +{ + +} diff --git a/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/TaskSchedulingEntityFrameworkCoreTestModule.cs b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/TaskSchedulingEntityFrameworkCoreTestModule.cs new file mode 100644 index 0000000..2aecb94 --- /dev/null +++ b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/EntityFrameworkCore/TaskSchedulingEntityFrameworkCoreTestModule.cs @@ -0,0 +1,45 @@ +using Microsoft.Data.Sqlite; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Sqlite; +using Volo.Abp.Modularity; +using Volo.Abp.Uow; + +namespace Himp.TaskScheduling.EntityFrameworkCore; + +[DependsOn( + typeof(TaskSchedulingApplicationTestModule), + typeof(TaskSchedulingEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreSqliteModule) +)] +public class TaskSchedulingEntityFrameworkCoreTestModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAlwaysDisableUnitOfWorkTransaction(); + + var sqliteConnection = CreateDatabaseAndGetConnection(); + + Configure(options => + { + options.Configure(abpDbContextConfigurationContext => + { + abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection); + }); + }); + } + + private static SqliteConnection CreateDatabaseAndGetConnection() + { + var connection = new AbpUnitTestSqliteConnection("Data Source=:memory:"); + connection.Open(); + + new TaskSchedulingDbContext( + new DbContextOptionsBuilder().UseSqlite(connection).Options + ).GetService().CreateTables(); + + return connection; + } +} diff --git a/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/FodyWeavers.xml b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/FodyWeavers.xsd b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/Himp.TaskScheduling.EntityFrameworkCore.Tests.abppkg b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/Himp.TaskScheduling.EntityFrameworkCore.Tests.abppkg new file mode 100644 index 0000000..a686451 --- /dev/null +++ b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/Himp.TaskScheduling.EntityFrameworkCore.Tests.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/Himp.TaskScheduling.EntityFrameworkCore.Tests.csproj b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/Himp.TaskScheduling.EntityFrameworkCore.Tests.csproj new file mode 100644 index 0000000..00491bd --- /dev/null +++ b/test/Himp.TaskScheduling.EntityFrameworkCore.Tests/Himp.TaskScheduling.EntityFrameworkCore.Tests.csproj @@ -0,0 +1,20 @@ + + + + + + net8.0 + enable + Himp.TaskScheduling + + + + + + + + + + + + diff --git a/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs new file mode 100644 index 0000000..c57296b --- /dev/null +++ b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs @@ -0,0 +1,153 @@ +using System; +using System.Net.Http; +using System.Threading.Tasks; +using IdentityModel.Client; +using Microsoft.Extensions.Configuration; +using Himp.TaskScheduling.Samples; +using Volo.Abp.DependencyInjection; +using Volo.Abp.IdentityModel; + +namespace Himp.TaskScheduling; + +public class ClientDemoService : ITransientDependency +{ + private readonly ISampleAppService _sampleAppService; + private readonly IIdentityModelAuthenticationService _authenticationService; + private readonly IConfiguration _configuration; + + public ClientDemoService( + ISampleAppService sampleAppService, + IIdentityModelAuthenticationService authenticationService, + IConfiguration configuration) + { + _sampleAppService = sampleAppService; + _authenticationService = authenticationService; + _configuration = configuration; + } + + public async Task RunAsync() + { + await TestWithDynamicProxiesAsync(); + await TestWithHttpClientAndIdentityModelAuthenticationServiceAsync(); + await TestAllManuallyAsync(); + } + + /* Shows how to perform an HTTP request to the API using ABP's dynamic c# proxy + * feature. It is just simple as calling a local service method. + * Authorization and HTTP request details are handled by the ABP framework. + */ + private async Task TestWithDynamicProxiesAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestWithDynamicProxiesAsync)} *****"); + + var result = await _sampleAppService.GetAsync(); + Console.WriteLine("Result: " + result.Value); + + result = await _sampleAppService.GetAuthorizedAsync(); + Console.WriteLine("Result (authorized): " + result.Value); + } + + /* Shows how to use HttpClient to perform a request to the HTTP API. + * It uses ABP's IIdentityModelAuthenticationService to simplify obtaining access tokens. + */ + private async Task TestWithHttpClientAndIdentityModelAuthenticationServiceAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestWithHttpClientAndIdentityModelAuthenticationServiceAsync)} *****"); + + //Get access token using ABP's IIdentityModelAuthenticationService + + var accessToken = await _authenticationService.GetAccessTokenAsync( + new IdentityClientConfiguration( + _configuration["IdentityClients:Default:Authority"], + _configuration["IdentityClients:Default:Scope"], + _configuration["IdentityClients:Default:ClientId"], + _configuration["IdentityClients:Default:ClientSecret"], + _configuration["IdentityClients:Default:GrantType"], + _configuration["IdentityClients:Default:UserName"], + _configuration["IdentityClients:Default:UserPassword"] + ) + ); + + //Perform the actual HTTP request + + using (var httpClient = new HttpClient()) + { + httpClient.SetBearerToken(accessToken); + + var url = _configuration["RemoteServices:TaskScheduling:BaseUrl"] + + "api/TaskScheduling/sample/authorized"; + + var responseMessage = await httpClient.GetAsync(url); + if (responseMessage.IsSuccessStatusCode) + { + var responseString = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine("Result: " + responseString); + } + else + { + throw new Exception("Remote server returns error code: " + responseMessage.StatusCode); + } + } + } + + /* Shows how to use HttpClient to perform a request to the HTTP API. + */ + private async Task TestAllManuallyAsync() + { + Console.WriteLine(); + Console.WriteLine($"***** {nameof(TestAllManuallyAsync)} *****"); + + //Obtain access token from the IDS4 server + + // discover endpoints from metadata + var client = new HttpClient(); + var disco = await client.GetDiscoveryDocumentAsync(_configuration["IdentityClients:Default:Authority"]); + if (disco.IsError) + { + Console.WriteLine(disco.Error); + return; + } + + // request token + var tokenResponse = await client.RequestPasswordTokenAsync(new PasswordTokenRequest + { + Address = disco.TokenEndpoint, + ClientId = _configuration["IdentityClients:Default:ClientId"], + ClientSecret = _configuration["IdentityClients:Default:ClientSecret"], + UserName = _configuration["IdentityClients:Default:UserName"], + Password = _configuration["IdentityClients:Default:UserPassword"], + Scope = _configuration["IdentityClients:Default:Scope"] + }); + + if (tokenResponse.IsError) + { + Console.WriteLine(tokenResponse.Error); + return; + } + + Console.WriteLine(tokenResponse.Json); + + //Perform the actual HTTP request + + using (var httpClient = new HttpClient()) + { + httpClient.SetBearerToken(tokenResponse.AccessToken); + + var url = _configuration["RemoteServices:TaskScheduling:BaseUrl"] + + "api/TaskScheduling/sample/authorized"; + + var responseMessage = await httpClient.GetAsync(url); + if (responseMessage.IsSuccessStatusCode) + { + var responseString = await responseMessage.Content.ReadAsStringAsync(); + Console.WriteLine("Result: " + responseString); + } + else + { + throw new Exception("Remote server returns error code: " + responseMessage.StatusCode); + } + } + } +} diff --git a/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs new file mode 100644 index 0000000..a726cf0 --- /dev/null +++ b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -0,0 +1,40 @@ +using Microsoft.Extensions.Hosting; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; + +namespace Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp; + +public class ConsoleTestAppHostedService : IHostedService +{ + private readonly IConfiguration _configuration; + + public ConsoleTestAppHostedService(IConfiguration configuration) + { + _configuration = configuration; + } + + public async Task StartAsync(CancellationToken cancellationToken) + { + using (var application = await AbpApplicationFactory.CreateAsync(options => + { + options.Services.ReplaceConfiguration(_configuration); + options.UseAutofac(); + })) + { + await application.InitializeAsync(); + + var demo = application.ServiceProvider.GetRequiredService(); + await demo.RunAsync(); + + await application.ShutdownAsync(); + } + } + + public Task StopAsync(CancellationToken cancellationToken) + { + return Task.CompletedTask; + } +} diff --git a/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp.abppkg b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp.abppkg new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp.abppkg @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp.csproj b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp.csproj new file mode 100644 index 0000000..e10d2d9 --- /dev/null +++ b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp.csproj @@ -0,0 +1,33 @@ + + + + Exe + net8.0 + enable + Himp.TaskScheduling + + + + + + + + + + + + PreserveNewest + Always + + + + PreserveNewest + Always + + + + + + + + diff --git a/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/Program.cs b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/Program.cs new file mode 100644 index 0000000..d7a9746 --- /dev/null +++ b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/Program.cs @@ -0,0 +1,22 @@ +using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp; + +class Program +{ + static async Task Main(string[] args) + { + await CreateHostBuilder(args).RunConsoleAsync(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .AddAppSettingsSecretsJson() + .ConfigureServices((hostContext, services) => + { + services.AddHostedService(); + }); +} diff --git a/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/TaskSchedulingConsoleApiClientModule.cs b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/TaskSchedulingConsoleApiClientModule.cs new file mode 100644 index 0000000..d796efa --- /dev/null +++ b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/TaskSchedulingConsoleApiClientModule.cs @@ -0,0 +1,15 @@ +using Volo.Abp.Autofac; +using Volo.Abp.Http.Client.IdentityModel; +using Volo.Abp.Modularity; + +namespace Himp.TaskScheduling; + +[DependsOn( + typeof(AbpAutofacModule), + typeof(TaskSchedulingHttpApiClientModule), + typeof(AbpHttpClientIdentityModelModule) + )] +public class TaskSchedulingConsoleApiClientModule : AbpModule +{ + +} diff --git a/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/appsettings.json b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/appsettings.json new file mode 100644 index 0000000..9dc76da --- /dev/null +++ b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/appsettings.json @@ -0,0 +1,21 @@ +{ + "RemoteServices": { + "Default": { + "BaseUrl": "https://localhost:44365/" + }, + "TaskScheduling": { + "BaseUrl": "https://localhost:44346/" + } + }, + "IdentityClients": { + "Default": { + "GrantType": "password", + "ClientId": "TaskScheduling_App", + "ClientSecret": "1q2w3e*", + "UserName": "admin", + "UserPassword": "1q2w3E*", + "Authority": "https://localhost:44365/", + "Scope": "TaskScheduling" + } + } +} diff --git a/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/appsettings.secrets.json b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/appsettings.secrets.json new file mode 100644 index 0000000..7a73a41 --- /dev/null +++ b/test/Himp.TaskScheduling.HttpApi.Client.ConsoleTestApp/appsettings.secrets.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/test/Himp.TaskScheduling.MongoDB.Tests/FodyWeavers.xml b/test/Himp.TaskScheduling.MongoDB.Tests/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/test/Himp.TaskScheduling.MongoDB.Tests/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/Himp.TaskScheduling.MongoDB.Tests/FodyWeavers.xsd b/test/Himp.TaskScheduling.MongoDB.Tests/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/test/Himp.TaskScheduling.MongoDB.Tests/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/test/Himp.TaskScheduling.MongoDB.Tests/Himp.TaskScheduling.MongoDB.Tests.abppkg b/test/Himp.TaskScheduling.MongoDB.Tests/Himp.TaskScheduling.MongoDB.Tests.abppkg new file mode 100644 index 0000000..a686451 --- /dev/null +++ b/test/Himp.TaskScheduling.MongoDB.Tests/Himp.TaskScheduling.MongoDB.Tests.abppkg @@ -0,0 +1,3 @@ +{ + "role": "lib.test" +} \ No newline at end of file diff --git a/test/Himp.TaskScheduling.MongoDB.Tests/Himp.TaskScheduling.MongoDB.Tests.csproj b/test/Himp.TaskScheduling.MongoDB.Tests/Himp.TaskScheduling.MongoDB.Tests.csproj new file mode 100644 index 0000000..f7c1295 --- /dev/null +++ b/test/Himp.TaskScheduling.MongoDB.Tests/Himp.TaskScheduling.MongoDB.Tests.csproj @@ -0,0 +1,21 @@ + + + + + + net8.0 + enable + Himp.TaskScheduling + + + + + + + + + + + + + diff --git a/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/Applications/MongoDBSampleAppService_Tests.cs b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/Applications/MongoDBSampleAppService_Tests.cs new file mode 100644 index 0000000..d9ddc95 --- /dev/null +++ b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/Applications/MongoDBSampleAppService_Tests.cs @@ -0,0 +1,11 @@ +using Himp.TaskScheduling.MongoDB; +using Himp.TaskScheduling.Samples; +using Xunit; + +namespace Himp.TaskScheduling.MongoDb.Applications; + +[Collection(MongoTestCollection.Name)] +public class MongoDBSampleAppService_Tests : SampleAppService_Tests +{ + +} diff --git a/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/Domains/MongoDBSampleDomain_Tests.cs b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/Domains/MongoDBSampleDomain_Tests.cs new file mode 100644 index 0000000..c92e327 --- /dev/null +++ b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/Domains/MongoDBSampleDomain_Tests.cs @@ -0,0 +1,10 @@ +using Himp.TaskScheduling.Samples; +using Xunit; + +namespace Himp.TaskScheduling.MongoDB.Domains; + +[Collection(MongoTestCollection.Name)] +public class MongoDBSampleDomain_Tests : SampleManager_Tests +{ + +} diff --git a/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/MongoDbFixture.cs b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/MongoDbFixture.cs new file mode 100644 index 0000000..c92f911 --- /dev/null +++ b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/MongoDbFixture.cs @@ -0,0 +1,34 @@ +using System; +using EphemeralMongo; + +namespace Himp.TaskScheduling.MongoDB; + +public class MongoDbFixture : IDisposable +{ + public readonly static IMongoRunner MongoDbRunner; + + static MongoDbFixture() + { + MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions + { + UseSingleNodeReplicaSet = true + }); + } + + public static string GetRandomConnectionString() + { + return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); + } + + public static string GetConnectionString(string databaseName) + { + var stringArray = MongoDbRunner.ConnectionString.Split('?'); + var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; + return connectionString; + } + + public void Dispose() + { + MongoDbRunner?.Dispose(); + } +} diff --git a/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/MongoTestCollection.cs b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/MongoTestCollection.cs new file mode 100644 index 0000000..e0e0365 --- /dev/null +++ b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/MongoTestCollection.cs @@ -0,0 +1,9 @@ +using Xunit; + +namespace Himp.TaskScheduling.MongoDB; + +[CollectionDefinition(Name)] +public class MongoTestCollection : ICollectionFixture +{ + public const string Name = "MongoDB Collection"; +} diff --git a/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs new file mode 100644 index 0000000..84cdb1e --- /dev/null +++ b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs @@ -0,0 +1,13 @@ +using Himp.TaskScheduling.Samples; +using Xunit; + +namespace Himp.TaskScheduling.MongoDB.Samples; + +[Collection(MongoTestCollection.Name)] +public class SampleRepository_Tests : SampleRepository_Tests +{ + /* Don't write custom repository tests here, instead write to + * the base class. + * One exception can be some specific tests related to MongoDB. + */ +} diff --git a/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/TaskSchedulingMongoDbTestBase.cs b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/TaskSchedulingMongoDbTestBase.cs new file mode 100644 index 0000000..54deb8a --- /dev/null +++ b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/TaskSchedulingMongoDbTestBase.cs @@ -0,0 +1,9 @@ +namespace Himp.TaskScheduling.MongoDB; + +/* This class can be used as a base class for MongoDB integration tests, + * while SampleRepository_Tests uses a different approach. + */ +public abstract class TaskSchedulingMongoDbTestBase : TaskSchedulingTestBase +{ + +} diff --git a/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/TaskSchedulingMongoDbTestModule.cs b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/TaskSchedulingMongoDbTestModule.cs new file mode 100644 index 0000000..112693f --- /dev/null +++ b/test/Himp.TaskScheduling.MongoDB.Tests/MongoDB/TaskSchedulingMongoDbTestModule.cs @@ -0,0 +1,21 @@ +using System; +using Volo.Abp.Data; +using Volo.Abp.Modularity; +using Volo.Abp.Uow; + +namespace Himp.TaskScheduling.MongoDB; + +[DependsOn( + typeof(TaskSchedulingApplicationTestModule), + typeof(TaskSchedulingMongoDbModule) +)] +public class TaskSchedulingMongoDbTestModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); + }); + } +} diff --git a/test/Himp.TaskScheduling.TestBase/FodyWeavers.xml b/test/Himp.TaskScheduling.TestBase/FodyWeavers.xml new file mode 100644 index 0000000..1715698 --- /dev/null +++ b/test/Himp.TaskScheduling.TestBase/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/test/Himp.TaskScheduling.TestBase/FodyWeavers.xsd b/test/Himp.TaskScheduling.TestBase/FodyWeavers.xsd new file mode 100644 index 0000000..ffa6fc4 --- /dev/null +++ b/test/Himp.TaskScheduling.TestBase/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/test/Himp.TaskScheduling.TestBase/Himp.TaskScheduling.TestBase.abppkg b/test/Himp.TaskScheduling.TestBase/Himp.TaskScheduling.TestBase.abppkg new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/test/Himp.TaskScheduling.TestBase/Himp.TaskScheduling.TestBase.abppkg @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/test/Himp.TaskScheduling.TestBase/Himp.TaskScheduling.TestBase.csproj b/test/Himp.TaskScheduling.TestBase/Himp.TaskScheduling.TestBase.csproj new file mode 100644 index 0000000..64a99a3 --- /dev/null +++ b/test/Himp.TaskScheduling.TestBase/Himp.TaskScheduling.TestBase.csproj @@ -0,0 +1,28 @@ + + + + + + net8.0 + enable + Himp.TaskScheduling + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + + + + + diff --git a/test/Himp.TaskScheduling.TestBase/Samples/SampleRepository_Tests.cs b/test/Himp.TaskScheduling.TestBase/Samples/SampleRepository_Tests.cs new file mode 100644 index 0000000..ac0d10f --- /dev/null +++ b/test/Himp.TaskScheduling.TestBase/Samples/SampleRepository_Tests.cs @@ -0,0 +1,26 @@ +using System.Threading.Tasks; +using Volo.Abp.Modularity; +using Xunit; + +namespace Himp.TaskScheduling.Samples; + +/* Write your custom repository tests like that, in this project, as abstract classes. + * Then inherit these abstract classes from EF Core & MongoDB test projects. + * In this way, both database providers are tests with the same set tests. + */ +public abstract class SampleRepository_Tests : TaskSchedulingTestBase + where TStartupModule : IAbpModule +{ + //private readonly ISampleRepository _sampleRepository; + + protected SampleRepository_Tests() + { + //_sampleRepository = GetRequiredService(); + } + + [Fact] + public Task Method1Async() + { + return Task.CompletedTask; + } +} diff --git a/test/Himp.TaskScheduling.TestBase/Security/FakeCurrentPrincipalAccessor.cs b/test/Himp.TaskScheduling.TestBase/Security/FakeCurrentPrincipalAccessor.cs new file mode 100644 index 0000000..936a6a1 --- /dev/null +++ b/test/Himp.TaskScheduling.TestBase/Security/FakeCurrentPrincipalAccessor.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.Security.Claims; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Security.Claims; + +namespace Himp.TaskScheduling.Security; + +[Dependency(ReplaceServices = true)] +public class FakeCurrentPrincipalAccessor : ThreadCurrentPrincipalAccessor +{ + protected override ClaimsPrincipal GetClaimsPrincipal() + { + return GetPrincipal(); + } + + private ClaimsPrincipal GetPrincipal() + { + return new ClaimsPrincipal(new ClaimsIdentity(new List + { + new Claim(AbpClaimTypes.UserId, "2e701e62-0953-4dd3-910b-dc6cc93ccb0d"), + new Claim(AbpClaimTypes.UserName, "admin"), + new Claim(AbpClaimTypes.Email, "admin@abp.io") + } + ) + ); + } +} diff --git a/test/Himp.TaskScheduling.TestBase/TaskSchedulingDataSeedContributor.cs b/test/Himp.TaskScheduling.TestBase/TaskSchedulingDataSeedContributor.cs new file mode 100644 index 0000000..fdcc093 --- /dev/null +++ b/test/Himp.TaskScheduling.TestBase/TaskSchedulingDataSeedContributor.cs @@ -0,0 +1,32 @@ +using System.Threading.Tasks; +using Volo.Abp.Data; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Guids; +using Volo.Abp.MultiTenancy; + +namespace Himp.TaskScheduling; + +public class TaskSchedulingDataSeedContributor : IDataSeedContributor, ITransientDependency +{ + private readonly IGuidGenerator _guidGenerator; + private readonly ICurrentTenant _currentTenant; + + public TaskSchedulingDataSeedContributor( + IGuidGenerator guidGenerator, ICurrentTenant currentTenant) + { + _guidGenerator = guidGenerator; + _currentTenant = currentTenant; + } + + public Task SeedAsync(DataSeedContext context) + { + /* Instead of returning the Task.CompletedTask, you can insert your test data + * at this point! + */ + + using (_currentTenant.Change(context?.TenantId)) + { + return Task.CompletedTask; + } + } +} diff --git a/test/Himp.TaskScheduling.TestBase/TaskSchedulingTestBase.cs b/test/Himp.TaskScheduling.TestBase/TaskSchedulingTestBase.cs new file mode 100644 index 0000000..566ee3b --- /dev/null +++ b/test/Himp.TaskScheduling.TestBase/TaskSchedulingTestBase.cs @@ -0,0 +1,59 @@ +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Volo.Abp.Modularity; +using Volo.Abp.Uow; +using Volo.Abp.Testing; + +namespace Himp.TaskScheduling; + +/* All test classes are derived from this class, directly or indirectly. */ +public abstract class TaskSchedulingTestBase : AbpIntegratedTest + where TStartupModule : IAbpModule +{ + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + + protected virtual Task WithUnitOfWorkAsync(Func func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func action) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + await action(); + + await uow.CompleteAsync(); + } + } + } + + protected virtual Task WithUnitOfWorkAsync(Func> func) + { + return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); + } + + protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func> func) + { + using (var scope = ServiceProvider.CreateScope()) + { + var uowManager = scope.ServiceProvider.GetRequiredService(); + + using (var uow = uowManager.Begin(options)) + { + var result = await func(); + await uow.CompleteAsync(); + return result; + } + } + } +} diff --git a/test/Himp.TaskScheduling.TestBase/TaskSchedulingTestBaseModule.cs b/test/Himp.TaskScheduling.TestBase/TaskSchedulingTestBaseModule.cs new file mode 100644 index 0000000..980c056 --- /dev/null +++ b/test/Himp.TaskScheduling.TestBase/TaskSchedulingTestBaseModule.cs @@ -0,0 +1,42 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Volo.Abp.Authorization; +using Volo.Abp.Autofac; +using Volo.Abp.Data; +using Volo.Abp.Guids; +using Volo.Abp.Modularity; +using Volo.Abp.Threading; + +namespace Himp.TaskScheduling; + +[DependsOn( + typeof(AbpAutofacModule), + typeof(AbpTestBaseModule), + typeof(AbpAuthorizationModule), + typeof(AbpGuidsModule) +)] +public class TaskSchedulingTestBaseModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAlwaysAllowAuthorization(); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + SeedTestData(context); + } + + private static void SeedTestData(ApplicationInitializationContext context) + { + AsyncHelper.RunSync(async () => + { + using (var scope = context.ServiceProvider.CreateScope()) + { + await scope.ServiceProvider + .GetRequiredService() + .SeedAsync(); + } + }); + } +}