Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo
¶Ô±ÈÐÂÎļþ |
| | |
| | | # Paths |
| | | $rootFolder = (Get-Item -Path "./" -Verbose).FullName |
| | | |
| | | $serverFolder = Join-Path $rootFolder ("/server") |
| | | |
| | | Set-Location $serverFolder |
| | | & dotnet tool install --global dotnet-ef |
| | | |
| | | & dotnet restore -s https://nexus.sycdev.com/repository/nuget-group/index.json |
| | | |
| | | $migrationFolder = Join-Path $serverFolder ("/src/CMS.Plugin.HIAWms.MySQL") |
| | | Set-Location $migrationFolder |
| | | dotnet ef migrations add InitialCreate -c CMSPluginDbContext -o Migrations |
| | | |
| | | Set-Location $serverFolder |
| | | & dotnet build |
| | | |
| | | Set-Location $rootFolder |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # Paths |
| | | $rootFolder = (Get-Item -Path "./" -Verbose).FullName |
| | | |
| | | $webFolder = Join-Path $rootFolder ("/web") |
| | | |
| | | Set-Location $rootFolder |
| | | & npm install yarn -g |
| | | & npm install lmes-cli -g |
| | | |
| | | & lmes-cli create web |
| | | |
| | | Set-Location $webFolder |
| | | & yarn |
| | | & npm run build |
| | | |
| | | Set-Location $rootFolder |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" /> |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="UserContentModel"> |
| | | <attachedFolders /> |
| | | <explicitIncludes /> |
| | | <explicitExcludes /> |
| | | </component> |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="VcsDirectoryMappings"> |
| | | <mapping directory="$PROJECT_DIR$/../../../../.." vcs="Git" /> |
| | | </component> |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | Microsoft Visual Studio Solution File, Format Version 12.00 |
| | | # Visual Studio Version 17 |
| | | VisualStudioVersion = 17.4.33110.190 |
| | | MinimumVisualStudioVersion = 10.0.40219.1 |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "è§£å³æ¹æ¡é¡¹", "è§£å³æ¹æ¡é¡¹", "{28C418E6-AF1D-4B74-ACDF-7B81FA4C256E}" |
| | | ProjectSection(SolutionItems) = preProject |
| | | .editorconfig = .editorconfig |
| | | .gitignore = .gitignore |
| | | common.props = common.props |
| | | common.test.props = common.test.props |
| | | configureawait.props = configureawait.props |
| | | delete-bin-obj-folders.bat = delete-bin-obj-folders.bat |
| | | Directory.Build.props = Directory.Build.props |
| | | NuGet.config = NuGet.config |
| | | package.reference.props = package.reference.props |
| | | publish.ps1 = publish.ps1 |
| | | README.md = README.md |
| | | stylecop.json = stylecop.json |
| | | EndProjectSection |
| | | EndProject |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{19F68F40-2A05-48EB-86F0-56928B3CCE9C}" |
| | | EndProject |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{5632E2B3-5592-4C6A-9493-768E5B04804D}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms", "src\CMS.Plugin.HIAWms\CMS.Plugin.HIAWms.csproj", "{9926DE4C-376D-487E-9C64-494913D94379}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.EntityFrameworkCore", "src\CMS.Plugin.HIAWms.EntityFrameworkCore\CMS.Plugin.HIAWms.EntityFrameworkCore.csproj", "{0022A80F-6D52-4B58-B2B3-F029DB4AEC0A}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.Domain", "src\CMS.Plugin.HIAWms.Domain\CMS.Plugin.HIAWms.Domain.csproj", "{8B2BED13-2B0E-49B5-8B0A-F272D27B2F37}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.Domain.Shared", "src\CMS.Plugin.HIAWms.Domain.Shared\CMS.Plugin.HIAWms.Domain.Shared.csproj", "{F405C633-8100-49B8-A270-D5340A165742}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.Application.Contracts", "src\CMS.Plugin.HIAWms.Application.Contracts\CMS.Plugin.HIAWms.Application.Contracts.csproj", "{D65BB57E-618A-468C-AA28-BD8C9EBF0AF2}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.Application", "src\CMS.Plugin.HIAWms.Application\CMS.Plugin.HIAWms.Application.csproj", "{02CB86F3-E614-4193-8B7F-C2FB665C8A5A}" |
| | | EndProject |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{A68B3B6B-DDE8-431E-90F3-A9FEE1D14A53}" |
| | | ProjectSection(SolutionItems) = preProject |
| | | doc\Domain-Drive-Design.md = doc\Domain-Drive-Design.md |
| | | EndProjectSection |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.TestBase", "test\CMS.Plugin.HIAWms.TestBase\CMS.Plugin.HIAWms.TestBase.csproj", "{33999EE8-73A1-4CF2-BDFD-CE353B05A727}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.EntityFrameworkCore.Tests", "test\CMS.Plugin.HIAWms.EntityFrameworkCore.Tests\CMS.Plugin.HIAWms.EntityFrameworkCore.Tests.csproj", "{C6AFC427-C51D-4BD2-BBA6-8841D3495077}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.Domain.Tests", "test\CMS.Plugin.HIAWms.Domain.Tests\CMS.Plugin.HIAWms.Domain.Tests.csproj", "{74E86B03-F185-47B2-A4C3-04C1CEC84F14}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.Application.Tests", "test\CMS.Plugin.HIAWms.Application.Tests\CMS.Plugin.HIAWms.Application.Tests.csproj", "{731DE36F-27F5-48B8-865D-DA43C8910010}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.Abstractions", "src\CMS.Plugin.HIAWms.Abstractions\CMS.Plugin.HIAWms.Abstractions.csproj", "{87D957E4-FE12-4432-9B7B-827A98DD41D1}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.MySQL", "src\CMS.Plugin.HIAWms.MySQL\CMS.Plugin.HIAWms.MySQL.csproj", "{2F71D6DF-F19A-410C-BD79-F2F871E63902}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.PostgreSql", "src\CMS.Plugin.HIAWms.PostgreSql\CMS.Plugin.HIAWms.PostgreSql.csproj", "{698D9FFA-080C-4F22-9FBF-B9509B28A954}" |
| | | EndProject |
| | | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CMS.Plugin.HIAWms.SqlServer", "src\CMS.Plugin.HIAWms.SqlServer\CMS.Plugin.HIAWms.SqlServer.csproj", "{521D17FF-BD3A-43B4-9BEE-183FDE3522F4}" |
| | | EndProject |
| | | Global |
| | | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
| | | Debug|Any CPU = Debug|Any CPU |
| | | Release|Any CPU = Release|Any CPU |
| | | EndGlobalSection |
| | | GlobalSection(ProjectConfigurationPlatforms) = postSolution |
| | | {9926DE4C-376D-487E-9C64-494913D94379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {9926DE4C-376D-487E-9C64-494913D94379}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {9926DE4C-376D-487E-9C64-494913D94379}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {9926DE4C-376D-487E-9C64-494913D94379}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {0022A80F-6D52-4B58-B2B3-F029DB4AEC0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {0022A80F-6D52-4B58-B2B3-F029DB4AEC0A}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {0022A80F-6D52-4B58-B2B3-F029DB4AEC0A}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {0022A80F-6D52-4B58-B2B3-F029DB4AEC0A}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {8B2BED13-2B0E-49B5-8B0A-F272D27B2F37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {8B2BED13-2B0E-49B5-8B0A-F272D27B2F37}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {8B2BED13-2B0E-49B5-8B0A-F272D27B2F37}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {8B2BED13-2B0E-49B5-8B0A-F272D27B2F37}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {F405C633-8100-49B8-A270-D5340A165742}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {F405C633-8100-49B8-A270-D5340A165742}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {F405C633-8100-49B8-A270-D5340A165742}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {F405C633-8100-49B8-A270-D5340A165742}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {D65BB57E-618A-468C-AA28-BD8C9EBF0AF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {D65BB57E-618A-468C-AA28-BD8C9EBF0AF2}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {D65BB57E-618A-468C-AA28-BD8C9EBF0AF2}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {D65BB57E-618A-468C-AA28-BD8C9EBF0AF2}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {02CB86F3-E614-4193-8B7F-C2FB665C8A5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {02CB86F3-E614-4193-8B7F-C2FB665C8A5A}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {02CB86F3-E614-4193-8B7F-C2FB665C8A5A}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {02CB86F3-E614-4193-8B7F-C2FB665C8A5A}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {33999EE8-73A1-4CF2-BDFD-CE353B05A727}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {33999EE8-73A1-4CF2-BDFD-CE353B05A727}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {33999EE8-73A1-4CF2-BDFD-CE353B05A727}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {33999EE8-73A1-4CF2-BDFD-CE353B05A727}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {C6AFC427-C51D-4BD2-BBA6-8841D3495077}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {C6AFC427-C51D-4BD2-BBA6-8841D3495077}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {C6AFC427-C51D-4BD2-BBA6-8841D3495077}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {C6AFC427-C51D-4BD2-BBA6-8841D3495077}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {74E86B03-F185-47B2-A4C3-04C1CEC84F14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {74E86B03-F185-47B2-A4C3-04C1CEC84F14}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {74E86B03-F185-47B2-A4C3-04C1CEC84F14}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {74E86B03-F185-47B2-A4C3-04C1CEC84F14}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {731DE36F-27F5-48B8-865D-DA43C8910010}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {731DE36F-27F5-48B8-865D-DA43C8910010}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {731DE36F-27F5-48B8-865D-DA43C8910010}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {731DE36F-27F5-48B8-865D-DA43C8910010}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {87D957E4-FE12-4432-9B7B-827A98DD41D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {87D957E4-FE12-4432-9B7B-827A98DD41D1}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {87D957E4-FE12-4432-9B7B-827A98DD41D1}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {87D957E4-FE12-4432-9B7B-827A98DD41D1}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {2F71D6DF-F19A-410C-BD79-F2F871E63902}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {2F71D6DF-F19A-410C-BD79-F2F871E63902}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {2F71D6DF-F19A-410C-BD79-F2F871E63902}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {2F71D6DF-F19A-410C-BD79-F2F871E63902}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {698D9FFA-080C-4F22-9FBF-B9509B28A954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {698D9FFA-080C-4F22-9FBF-B9509B28A954}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {698D9FFA-080C-4F22-9FBF-B9509B28A954}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {698D9FFA-080C-4F22-9FBF-B9509B28A954}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {521D17FF-BD3A-43B4-9BEE-183FDE3522F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {521D17FF-BD3A-43B4-9BEE-183FDE3522F4}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {521D17FF-BD3A-43B4-9BEE-183FDE3522F4}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {521D17FF-BD3A-43B4-9BEE-183FDE3522F4}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | EndGlobalSection |
| | | GlobalSection(SolutionProperties) = preSolution |
| | | HideSolutionNode = FALSE |
| | | EndGlobalSection |
| | | GlobalSection(NestedProjects) = preSolution |
| | | {9926DE4C-376D-487E-9C64-494913D94379} = {19F68F40-2A05-48EB-86F0-56928B3CCE9C} |
| | | {0022A80F-6D52-4B58-B2B3-F029DB4AEC0A} = {19F68F40-2A05-48EB-86F0-56928B3CCE9C} |
| | | {8B2BED13-2B0E-49B5-8B0A-F272D27B2F37} = {19F68F40-2A05-48EB-86F0-56928B3CCE9C} |
| | | {F405C633-8100-49B8-A270-D5340A165742} = {19F68F40-2A05-48EB-86F0-56928B3CCE9C} |
| | | {D65BB57E-618A-468C-AA28-BD8C9EBF0AF2} = {19F68F40-2A05-48EB-86F0-56928B3CCE9C} |
| | | {02CB86F3-E614-4193-8B7F-C2FB665C8A5A} = {19F68F40-2A05-48EB-86F0-56928B3CCE9C} |
| | | {33999EE8-73A1-4CF2-BDFD-CE353B05A727} = {5632E2B3-5592-4C6A-9493-768E5B04804D} |
| | | {C6AFC427-C51D-4BD2-BBA6-8841D3495077} = {5632E2B3-5592-4C6A-9493-768E5B04804D} |
| | | {74E86B03-F185-47B2-A4C3-04C1CEC84F14} = {5632E2B3-5592-4C6A-9493-768E5B04804D} |
| | | {731DE36F-27F5-48B8-865D-DA43C8910010} = {5632E2B3-5592-4C6A-9493-768E5B04804D} |
| | | {87D957E4-FE12-4432-9B7B-827A98DD41D1} = {19F68F40-2A05-48EB-86F0-56928B3CCE9C} |
| | | {2F71D6DF-F19A-410C-BD79-F2F871E63902} = {19F68F40-2A05-48EB-86F0-56928B3CCE9C} |
| | | {698D9FFA-080C-4F22-9FBF-B9509B28A954} = {19F68F40-2A05-48EB-86F0-56928B3CCE9C} |
| | | {521D17FF-BD3A-43B4-9BEE-183FDE3522F4} = {19F68F40-2A05-48EB-86F0-56928B3CCE9C} |
| | | EndGlobalSection |
| | | GlobalSection(ExtensibilityGlobals) = postSolution |
| | | SolutionGuid = {220123E7-A888-4DE7-8F9A-8FE271543889} |
| | | EndGlobalSection |
| | | EndGlobal |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project> |
| | | <!-- C# compiler options (https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/) --> |
| | | <PropertyGroup> |
| | | <!-- Nullable (https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/language#nullable) --> |
| | | <Nullable>disable</Nullable> |
| | | <Deterministic>true</Deterministic> |
| | | <!-- report errors and warnings (https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings) --> |
| | | <WarningLevel>5</WarningLevel> |
| | | </PropertyGroup> |
| | | |
| | | <!-- Generated file properties (https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#generated-file-properties) --> |
| | | <PropertyGroup> |
| | | <ImplicitUsings>enable</ImplicitUsings> |
| | | </PropertyGroup> |
| | | |
| | | <!-- Code analysis properties (https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#code-analysis-properties) --> |
| | | <PropertyGroup> |
| | | <EnableNETAnalyzers>true</EnableNETAnalyzers> |
| | | <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> |
| | | <AnalysisMode>All</AnalysisMode> |
| | | <AnalysisLevel>latest</AnalysisLevel> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <AdditionalFiles Include="$([MSBuild]::GetPathOfFileAbove('stylecop.json'))" Visible="false" /> |
| | | </ItemGroup> |
| | | |
| | | <!-- Dependencies --> |
| | | <ItemGroup Condition="$(MSBuildProjectExtension) == '.csproj'" > |
| | | <PackageReference Include="SonarAnalyzer.CSharp" Version="8.32.0.39516" PrivateAssets="all" /> |
| | | <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" /> |
| | | <PackageReference Include="Roslynator.Analyzers" Version="3.3.0" PrivateAssets="all" /> |
| | | </ItemGroup> |
| | | |
| | | <PropertyGroup Condition=" '$(Configuration)' == 'Debug'"> |
| | | <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants> |
| | | <Optimize>false</Optimize> |
| | | <NullableReferenceTypes>true</NullableReferenceTypes> |
| | | <!-- report errors and warnings (https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings) --> |
| | | <TreatWarningsAsErrors>false</TreatWarningsAsErrors> |
| | | <CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors> |
| | | </PropertyGroup> |
| | | |
| | | <PropertyGroup Condition="'$(Configuration)' == 'Release'"> |
| | | <DefineConstants>$(DefineConstants);RELEASE</DefineConstants> |
| | | <Optimize>true</Optimize> |
| | | <!-- report errors and warnings (https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings) --> |
| | | <TreatWarningsAsErrors>false</TreatWarningsAsErrors> |
| | | <CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors> |
| | | </PropertyGroup> |
| | | |
| | | <!-- Import reference package --> |
| | | <Import Project="package.reference.props" /> |
| | | |
| | | <!-- Test Project coverlet collector --> |
| | | <PropertyGroup> |
| | | <IsTestProject Condition="$(MSBuildProjectFullPath.Contains('test')) and ($(MSBuildProjectName.EndsWith('.Tests')) or $(MSBuildProjectName.EndsWith('.TestBase')))">true</IsTestProject> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Condition="'$(IsTestProject)' == 'true'" Include="coverlet.collector" Version="3.1.0"> |
| | | <PrivateAssets>all</PrivateAssets> |
| | | <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
| | | </PackageReference> |
| | | </ItemGroup> |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <packageSources> |
| | | <clear /> |
| | | <add key="nexus" value="https://nexus.sycdev.com/repository/nuget-group/index.json" /> |
| | | <add key="nuget" value="https://api.nuget.org/v3/index.json" /> |
| | | </packageSources> |
| | | </configuration> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project> |
| | | <PropertyGroup> |
| | | <Company>SYC</Company> |
| | | <Copyright>Copyright © SYC. All rights reserved.</Copyright> |
| | | <NoWarn>$(NoWarn);CS1591</NoWarn> |
| | | <VersionMajor>1</VersionMajor> |
| | | <VersionMinor>0</VersionMinor> |
| | | <VersionPatch>0</VersionPatch> |
| | | <VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix> |
| | | <!--<VersionSuffix>-preview1</VersionSuffix>--> |
| | | <Version>$(VersionPrefix)$(VersionSuffix)</Version> |
| | | <AssemblyVersion>$(VersionMajor).0.0.0</AssemblyVersion> |
| | | <LangVersion>latest</LangVersion> |
| | | <GenerateDocumentationFile>true</GenerateDocumentationFile> |
| | | <!-- Include symbol files (*.pdb) in the built .nupkg --> |
| | | <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> |
| | | </PropertyGroup> |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project> |
| | | <PropertyGroup> |
| | | <LangVersion>latest</LangVersion> |
| | | <NoWarn>$(NoWarn);CS1591</NoWarn> |
| | | <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> |
| | | <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> |
| | | <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> |
| | | <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> |
| | | </PropertyGroup> |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project> |
| | | <ItemGroup> |
| | | <PackageReference Include="ConfigureAwait.Fody" Version="3.3.1" PrivateAssets="All" /> |
| | | <PackageReference Include="Fody" Version="6.6.1"> |
| | | <PrivateAssets>All</PrivateAssets> |
| | | <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
| | | </PackageReference> |
| | | </ItemGroup> |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | @ECHO off |
| | | cls |
| | | |
| | | ECHO Deleting all BIN and OBJ folders... |
| | | ECHO. |
| | | |
| | | FOR /d /r . %%d in (bin,obj) DO ( |
| | | IF EXIST "%%d" ( |
| | | ECHO %%d | FIND /I "\node_modules\" > Nul && ( |
| | | ECHO.Skipping: %%d |
| | | ) || ( |
| | | ECHO.Deleting: %%d |
| | | rd /s/q "%%d" |
| | | ) |
| | | ) |
| | | ) |
| | | |
| | | ECHO. |
| | | ECHO.BIN and OBJ folders have been successfully deleted. Press any key to exit. |
| | | pause > nul |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # é¢å模å设计 |
| | | |
| | | ## ä¸ãæ¯è¯ä¸å®ä¹ |
| | | |
| | | | è±æç¼©å | è±æå
¨ç§° | ä¸æç¿»è¯ | |
| | | | -------- | -------- | -------- | |
| | | | | | | |
| | | |
| | | ## äºãä¸å¡æµç¨ |
| | | |
| | | 䏿¶å |
| | | |
| | | ## ä¸ãæ°æ®ç±»å |
| | | |
| | | æ°æ®ç±»åéç¨çæ¯C#çæ°æ®ç±»åï¼ä¸»è¦æä¸é¢çä¸äºç±»åï¼ |
| | | |
| | | | æ°æ®ç±»å | å«ä¹ | æå°å¼/æå¤§å¼/精度 | å ç¨ç©ºé´ | 说æ | |
| | | | -------------- | -------------- | ------------------------------------------------------------ | ------------- | -------------------------------- | |
| | | | bool | å¸å°å¼ | false/true | 1åè | | |
| | | | sbyte | è¶
çæ´å | -128127 | 1åè | | |
| | | | byte | æ 符å·è¶
çæ´å | 0255 | 1åè | | |
| | | | short | çæ´å | -32,76832,767 | 2åè | | |
| | | | ushort | æ 符å·çæ´å | 065,535 | 2åè | | |
| | | | int | æ´å | -2,147,483,6482,147,483,647 | 4åè | | |
| | | | uint | æ ç¬¦å·æ´å | 04,294,967,295 | 4åè | | |
| | | | long | é¿æ´å | -9,223,372,036,854,775,8089,223,372,036,854,775,807 | 8åè | | |
| | | | ulong | æ 符å·é¿æ´å | 0/18,446,744,073,709,551,615 | 8åè | | |
| | | | float | åç²¾åº¦æµ®ç¹æ° | -3.40282347E+38/F3.40282347E+38F/6~7ä½æææ°å | 4åè | | |
| | | | double | åç²¾åº¦æµ®ç¹æ° | -1.7976931348623157E+308/1.7976931348623157E+308/15~16ä½æææ°å | 8åè | | |
| | | | DateTime | æ¥ææ¶é´ | 0000-01-01 00:00:00.0000000/9999-12-31 23:59:59.9999999/100ns | 8åè | ç»ä¸ä½¿ç¨UTCæ¶é´è¿è¡ä¼ è¾ååå¨ã | |
| | | | TimeSpan | æ¶é´è·¨åº¦ | -10,675,199.02:48:05.4775808/10,675,199.02:48:05.4775807100ns | 8åè | | |
| | | | string | å符串 | | nåè | ç»ä¸ä½¿ç¨UTF8ç¼ç è¿è¡ä¼ è¾ååå¨ã | |
| | | | Complex | 夿° | | 16åè | | |
| | | | IList<T> | å表 | [0]~[n-1] | n * sizeof(T) | | |
| | | | ICollection<T> | éå | | n * sizeof(T) | ä¸IList类似ï¼åªæ¯æ²¡æé¡ºåºå
³ç³»ã | |
| | | |
| | | ## åãå®ä½ï¼Entityï¼åèåæ ¹ï¼AggregateRootï¼ |
| | | |
| | | å®ä½æ¯æ¨¡åä¸éè¦åºå个ä½çå¯¹è±¡ï¼æ¥ææ è¯ãæ°æ®åè¡ä¸ºãå®ä½ææ è¯ï¼å
许ååï¼å¤æä¸¤ä¸ªå®ä½ç¸ççæ åæ¯æ è¯ç¸çãèåï¼Aggregateï¼è¡¨ç¤ºä¸ç»é¢å对象ï¼å
æ¬å®ä½åå¼å¯¹è±¡ï¼ï¼ç¨æ¥è¡¨è¿°ä¸ä¸ªå®æ´çé¢åæ¦å¿µãèæ¯ä¸ªèå齿ä¸ä¸ªæ ¹å®ä½ï¼è¿ä¸ªæ ¹å®ä½åå«åèåæ ¹ãèåæ ¹æ¯èåæè¡¨è¿°çé¢åæ¦å¿µç主ä½ï¼å¤é¨å¯¹è±¡éè¦è®¿é®èåå
çå®ä½æ¶ï¼åªè½éè¿èåæ ¹è¿è¡è®¿é®ï¼èä¸è½ç´æ¥è®¿é®ã |
| | | |
| | | ## äºãæä¸¾ |
| | | |
| | | |
| | | ## å
ãå¼å¯¹è±¡ï¼ValueObjectï¼ |
| | | |
| | | å¼å¯¹è±¡æ¯éè¿å±æ§æ¥è¯å«ç对象ï¼å®å°å¤ä¸ªç¸å
³å±æ§ç»å为ä¸ä¸ªæ¦å¿µæ´ä½ãå¼å¯¹è±¡æ²¡ææ è¯ï¼ä¸å
许ååï¼å¤æä¸¤ä¸ªå¼å¯¹è±¡ç¸ççæ åæ¯å¼å¯¹è±¡å
鍿æå±æ§å¼ç¸çã |
| | | |
| | | |
| | | ## å
ãé¢åæå¡ |
| | | |
| | | 䏿¶å |
| | | |
| | | ## ä¸ãé¢åäºä»¶ |
| | | |
| | | 䏿¶å |
| | | |
| | | ## å
«ãå
¶ä» |
| | | |
| | | 䏿¶å |
| | | |
| | | ## ä¹ãåèå¼ç¨ |
| | | |
| | | 䏿¶å |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project> |
| | | <PropertyGroup> |
| | | <!-- All Microsoft packages --> |
| | | <MicrosoftPackageVersion>6.0.0</MicrosoftPackageVersion> |
| | | |
| | | <!-- All Abp packages --> |
| | | <ABPPackageVersion>6.0.0</ABPPackageVersion> |
| | | |
| | | <!-- All LMES packages --> |
| | | <LMESPackageVersion>2.3.*</LMESPackageVersion> |
| | | |
| | | <!-- Microsoft.NET.Test.Sdk https://www.nuget.org/packages/Microsoft.NET.Test.Sdk --> |
| | | <MicrosoftNETTestSdkPackageVersion>16.11.0</MicrosoftNETTestSdkPackageVersion> |
| | | |
| | | <!-- NSubstitute https://www.nuget.org/packages/NSubstitute --> |
| | | <NSubstitutePackageVersion>4.2.2</NSubstitutePackageVersion> |
| | | |
| | | <!-- Shouldly https://www.nuget.org/packages/Shouldly --> |
| | | <ShouldlyPackageVersion>4.0.3</ShouldlyPackageVersion> |
| | | |
| | | <!-- xunit https://www.nuget.org/packages/xUnit --> |
| | | <xUnitPackageVersion>2.4.1</xUnitPackageVersion> |
| | | |
| | | <!-- xunit.extensibility.execution https://www.nuget.org/packages/xunit.extensibility.execution --> |
| | | <xUnitExtensibilityExecutionPackageVersion>2.4.1</xUnitExtensibilityExecutionPackageVersion> |
| | | |
| | | <!-- xunit.runner.visualstudio https://www.nuget.org/packages/xunit.runner.visualstudio --> |
| | | <xUnitRunnerVisualstudioPackageVersion>2.4.3</xUnitRunnerVisualstudioPackageVersion> |
| | | </PropertyGroup> |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # publishFolder |
| | | $publishFolder= $args[0] |
| | | |
| | | # Paths |
| | | $rootFolder = (Get-Item -Path "./" -Verbose).FullName |
| | | if ([String]::IsNullOrEmpty($publishFolder)) { |
| | | $publishFolder = Join-Path $rootFolder "output/publish" |
| | | $hasPath = Test-Path($publishFolder) |
| | | if (-Not $hasPath) { |
| | | new-item -path $rootFolder -name "output/publish" -type directory |
| | | } |
| | | } |
| | | Write-Host ("Publish Output " + $publishFolder) |
| | | |
| | | # List of projects |
| | | $projects = ( |
| | | "src/CMS.Plugin.HIAWms" |
| | | ) |
| | | |
| | | # Rebuild solution |
| | | Set-Location $rootFolder |
| | | dotnet restore -s https://nexus.sycdev.com/repository/nuget-hosted/ --runtime win-x64 |
| | | # dotnet restore --configfile NuGet.config --runtime win-x64 |
| | | Write-Host ("Restore Completed ! ") |
| | | # Publish all projects |
| | | foreach($project in $projects) { |
| | | $projectFolder = Join-Path $rootFolder $project |
| | | $projectName = $project.Substring($project.LastIndexOf("/") + 1) |
| | | Set-Location $projectFolder |
| | | Write-Host ("Publish " + $projectName) |
| | | # & dotnet publish ($projectName + ".csproj ") --configuration Release --output (Join-Path $publishFolder ("/" + $projectName.ToLower())) --nologo --verbosity quiet --no-restore |
| | | & dotnet publish ($projectName + ".csproj ") --configuration Release --output (Join-Path $publishFolder ("/" + $projectName.ToLower())) --nologo --verbosity quiet --no-restore --runtime win-x64 |
| | | } |
| | | |
| | | Write-Host ("Publish Completed ! ") |
| | | |
| | | # Go back to the root folder |
| | | Set-Location $rootFolder |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <Import Project="../../common.props" /> |
| | | <Import Project="../../configureawait.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <EnableDynamicLoading>true</EnableDynamicLoading> |
| | | <ProduceReferenceAssembly>false</ProduceReferenceAssembly> |
| | | <GenerateDocumentationFile>true</GenerateDocumentationFile> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="CMS.Plugin.FlowManagement.Abstractions" Version="$(LMESPackageVersion)" /> |
| | | <PackageReference Include="CMS.Plugin.BarcodeManagement.Abstractions" Version="$(LMESPackageVersion)" /> |
| | | <PackageReference Include="CMS.Plugin.FormulaManagement.Abstractions" Version="$(LMESPackageVersion)" /> |
| | | <PackageReference Include="CMS.Plugin.MaterialManagement.Abstractions" Version="$(LMESPackageVersion)" /> |
| | | <PackageReference Include="CMS.Plugin.ProductManagement.Abstractions" Version="$(LMESPackageVersion)" /> |
| | | <PackageReference Include="CMS.Plugin.ProductionManagement.Abstractions" Version="$(LMESPackageVersion)" /> |
| | | <PackageReference Include="CMS.Plugin.ProcessManagement.Abstractions" Version="$(LMESPackageVersion)" /> |
| | | <PackageReference Include="CMS.Plugin.ProductManagement.Abstractions" Version="$(LMESPackageVersion)" /> |
| | | <PackageReference Include="CMS.Plugin.QualityManagement.Abstractions" Version="$(LMESPackageVersion)" /> |
| | | <PackageReference Include="CMS.Plugin.OrderManagement.Abstractions" Version="$(LMESPackageVersion)" /> |
| | | <PackageReference Include="CMS.Plugin.TraceManagement.Abstractions" Version="$(LMESPackageVersion)" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Abstractions; |
| | | |
| | | /// <summary> |
| | | /// æµç¨ä¸å¡æ©å±æ¨¡å |
| | | /// </summary> |
| | | public class CMSPluginHIAWmsAbstractionsModule |
| | | { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Abstractions |
| | | { |
| | | /// <summary> |
| | | /// æ©å±æ¹æ³ |
| | | /// </summary> |
| | | public static class CMSPluginHIAWmsExtensions |
| | | { |
| | | /// <summary> |
| | | /// Tries the add setting management. |
| | | /// </summary> |
| | | /// <param name="services">The services.</param> |
| | | /// <param name="configureOptions">The configure options.</param> |
| | | /// <returns></returns> |
| | | public static IServiceCollection TryAddHIAWms(this IServiceCollection services, Action<CMSPluginHIAWmsOptions>? configureOptions = null) |
| | | { |
| | | if (configureOptions == null) |
| | | { |
| | | services.AddOptions().Configure<CMSPluginHIAWmsOptions>(options => {}); |
| | | } |
| | | else |
| | | { |
| | | services.AddOptions().PostConfigure(configureOptions); |
| | | } |
| | | |
| | | return services; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Abstractions |
| | | { |
| | | /// <summary> |
| | | /// åè½å®ä¹. |
| | | /// </summary> |
| | | public class CMSPluginHIAWmsFeatures |
| | | { |
| | | /// <summary> |
| | | /// The prefix |
| | | /// </summary> |
| | | private const string Prefix = "LMES"; |
| | | |
| | | /// <summary> |
| | | /// GroupName |
| | | /// </summary> |
| | | public const string GroupName = Prefix + ".HIAWms"; |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦å¼å¯ |
| | | /// </summary> |
| | | public const string Enable = GroupName + ".Enable"; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.MesSuite.Abstractions.Models; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Abstractions |
| | | { |
| | | public class CMSPluginHIAWmsOptions |
| | | { |
| | | public CMSPluginHIAWmsOptions() |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ©å±å±æ§ |
| | | /// </summary> |
| | | public List<ExtraProperty> ExtraProperties { get; set; } = new(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Abstractions |
| | | { |
| | | /// <summary> |
| | | /// CMSSettingNames |
| | | /// </summary> |
| | | public static class CMSPluginHIAWmsSettings |
| | | { |
| | | /// <summary> |
| | | /// The prefix |
| | | /// </summary> |
| | | private const string Prefix = "SCMS"; |
| | | |
| | | /// <summary> |
| | | /// The application settings prefix |
| | | /// </summary> |
| | | private const string AppSettingsPrefix = Prefix + ".AppSettings"; |
| | | |
| | | /// <summary> |
| | | /// ç»ä»¶ç¶æï¼0=å
³é,1=å¼å¯ |
| | | /// </summary> |
| | | public const string PluginState = AppSettingsPrefix + ".HIAWms.PluginState"; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
| | | <ConfigureAwait ContinueOnCapturedContext="false" /> |
| | | </Weavers> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.ComponentModel; |
| | | using System.Runtime.Serialization; |
| | | using CMS.Plugin.FlowManagement.Abstractions.Enums; |
| | | using CMS.Plugin.FlowManagement.Abstractions.FlowBusiness.Activitys; |
| | | using CMS.Plugin.MesSuite.Abstractions.Models; |
| | | using CMS.Plugin.OrderManagement.Abstractions.Models; |
| | | using CMS.Plugin.ProcessManagement.Abstractions.Models; |
| | | using CMS.Plugin.TraceManagement.Abstractions.Models.Traces; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Microsoft.Extensions.Logging; |
| | | using SYC.Flow.Kernel; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Abstractions |
| | | { |
| | | /// <summary> |
| | | /// HIAWms ä¸å¡æ¥éª¤ |
| | | /// </summary> |
| | | [Design("HIAWms", "HIAWms ä¸å¡æ¥éª¤", Sort = 99), Category("å®å¶æ¥éª¤")] |
| | | [Serializable] |
| | | public class HIAWmsActivity : BusinessActivity |
| | | { |
| | | /// <summary> |
| | | /// é
ç½®å±æ§1 |
| | | /// </summary> |
| | | [Design("é
ç½®å±æ§1", "é
ç½®å±æ§1", Sort = 1), Category("é
置信æ¯")] |
| | | [DataMember] |
| | | public string MyProperty1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é
ç½®å±æ§2 |
| | | /// </summary> |
| | | [Design("é
ç½®å±æ§2", "é
ç½®å±æ§2", Sort = 2), Category("é
置信æ¯")] |
| | | [DataMember] |
| | | public int MyProperty2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æµç¨ä¸ä¸ææ è¯éå |
| | | /// </summary> |
| | | public override List<FlowItemKey> FlowItemKeys => GetFlowItemKeys(); |
| | | |
| | | /// <summary> |
| | | /// å·¥èºæµç¨å¤ç |
| | | /// </summary> |
| | | public override async Task ProcessAsync(ProcessflowEventArgs args) |
| | | { |
| | | // å·¥èºæ¨¡å |
| | | var processModel = Flow.DataItems.ApplicationData as ProcessModel; |
| | | |
| | | // 工忍¡å |
| | | var orderModel = Flow.DataItems[FlowItemCollection.OrderModel] as OrderModel; |
| | | |
| | | // äº§åæ¨¡å |
| | | var productModel = Flow.DataItems[FlowItemCollection.ProductModel] as AssociationProductModel; |
| | | |
| | | // 追溯模å |
| | | var traceModel = Flow.DataItems[FlowItemCollection.TraceModel] as TraceModel; |
| | | |
| | | Flow.Logger.LogInformation($"æ§è¡æµç¨ï¼å®ä¾={Flow.Instance.ProcID} -> {Flow.Name} -> {Name} HIAWmsActivity"); |
| | | |
| | | // ä¸å¡å¤ç |
| | | // ç±äºServiceProvideræ¥æºäºFlowç»ä»¶ï¼æ¤å¤éå
±äº«CMS.Plugin.HIAWms.Abstractionsç¨åºéï¼å¦åæ æ³è°ç¨ï¼ä¿®æ¹CMS.Plugin.HIAWms项ç®ä¸çCMSPluginModule.csæä»¶ï¼åæ¶æ³¨éGetSharedAssemblies()æ¹æ³ |
| | | var hiawmsFlowService = Flow.ServiceProvider.GetService<IHIAWmsFlowService>(); |
| | | if (hiawmsFlowService != null) |
| | | { |
| | | await hiawmsFlowService.ProcessAsync(args); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Gets the flow item keys. |
| | | /// </summary> |
| | | protected virtual List<FlowItemKey> GetFlowItemKeys() |
| | | { |
| | | var result = new List<FlowItemKey>(); |
| | | return result; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SYC.Flow.Kernel; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Abstractions |
| | | { |
| | | /// <summary> |
| | | /// HIAWms æµç¨æå¡ |
| | | /// </summary> |
| | | public interface IHIAWmsFlowService |
| | | { |
| | | /// <summary> |
| | | /// å·¥èºæµç¨å¤ç |
| | | /// </summary> |
| | | Task ProcessAsync(ProcessflowEventArgs args); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SYC.Flow.Kernel; |
| | | |
| | | [assembly: ProcessflowExtention(true)] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <Import Project="../../common.props" /> |
| | | <Import Project="../../configureawait.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <GenerateDocumentationFile>True</GenerateDocumentationFile> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Volo.Abp.Authorization.Abstractions" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="MiniExcel" Version="1.31.3" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.Domain.Shared\CMS.Plugin.HIAWms.Domain.Shared.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared; |
| | | using Volo.Abp.Application; |
| | | using Volo.Abp.Modularity; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts; |
| | | |
| | | /// <summary> |
| | | /// æä»¶åºç¨æå¡å¥çº¦æ¨¡å |
| | | /// </summary> |
| | | [DependsOn( |
| | | typeof(CMSPluginDomainSharedModule), |
| | | typeof(AbpDddApplicationContractsModule) |
| | | )] |
| | | public class CMSPluginApplicationContractsModule : AbpModule |
| | | { |
| | | /// <inheritdoc /> |
| | | public override void PreConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | CMSPluginDtoExtensions.Configure(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Threading; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts; |
| | | |
| | | /// <summary> |
| | | /// Dtoæ©å± |
| | | /// </summary> |
| | | public static class CMSPluginDtoExtensions |
| | | { |
| | | private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
| | | |
| | | /// <summary> |
| | | /// Configures this instance. |
| | | /// </summary> |
| | | public static void Configure() |
| | | { |
| | | OneTimeRunner.Run(() => |
| | | { |
| | | /* You can add extension properties to DTOs |
| | | * defined in the depended modules. |
| | | * |
| | | * Example: |
| | | * |
| | | * ObjectExtensionManager.Instance |
| | | * .AddOrUpdateProperty<IdentityRoleDto, string>("Title"); |
| | | * |
| | | * See the documentation for more: |
| | | * https://docs.abp.io/en/abp/latest/Object-Extensions |
| | | */ |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas; |
| | | |
| | | /// <summary> |
| | | /// WmsAreaæ¥è¯¢åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class GetWmsAreasInput : ExtensiblePagedAndSortedResultRequestDto |
| | | { |
| | | /// <summary> |
| | | /// Gets or sets the filter. |
| | | /// </summary> |
| | | public string Filter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Gets or sets the name. |
| | | /// </summary> |
| | | public string Name { get; set; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas; |
| | | |
| | | /// <summary> |
| | | /// WmsAreaåå»ºåæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsAreaCreateDto : WmsAreaCreateOrUpdateDtoBase |
| | | { |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int? Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public bool? IsDisabled { get; set; } = false; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas; |
| | | |
| | | /// <summary> |
| | | /// WmsAreaåå»ºææ´æ°åºç±» |
| | | /// </summary> |
| | | public abstract class WmsAreaCreateOrUpdateDtoBase : ExtensibleEntityDto |
| | | { |
| | | /// <summary> |
| | | /// åºåºç¼å· |
| | | /// </summary> |
| | | public string AreaNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºåç§° |
| | | /// </summary> |
| | | public string AreaName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè¿° |
| | | /// </summary> |
| | | public string? AreaDesc { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºç¶æ |
| | | /// </summary> |
| | | public AreaStatusEnum AreaStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºç±»å |
| | | /// </summary> |
| | | public AreaTypeEnum AreaType { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsAreaCreateOrUpdateDtoBase"/> class. |
| | | /// </summary> |
| | | public WmsAreaCreateOrUpdateDtoBase() : base(false) |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas; |
| | | |
| | | /// <summary> |
| | | /// WmsAreaæ°æ®åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsAreaDto : ExtensibleEntityDto<Guid>, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// åºåºç¼å· |
| | | /// </summary> |
| | | public string AreaNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºåç§° |
| | | /// </summary> |
| | | public string AreaName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè¿° |
| | | /// </summary> |
| | | public string? AreaDesc { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºç¶æ |
| | | /// </summary> |
| | | public AreaStatusEnum AreaStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºç±»å |
| | | /// </summary> |
| | | public AreaTypeEnum AreaType { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Gets the export data. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public Dictionary<string, object> GetExportData() |
| | | { |
| | | var exportData = new Dictionary<string, object>(); |
| | | foreach (var property in this.GetType().GetProperties()) |
| | | { |
| | | exportData.Add(property.Name, property.GetValue(this)); |
| | | } |
| | | |
| | | return exportData; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas; |
| | | |
| | | /// <summary> |
| | | /// WmsAreaæ´æ°åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsAreaUpdateDto : WmsAreaCreateOrUpdateDtoBase, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using MiniExcelLibs.Attributes; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas |
| | | { |
| | | /// <summary> |
| | | /// WmsAreaså¯¼åºæ¨¡å |
| | | /// </summary> |
| | | public class WmsAreasExportModel |
| | | { |
| | | /// <summary> |
| | | /// WmsAreaå¯¼åºæ¨¡å |
| | | /// </summary> |
| | | public class WorkSectionExportModel |
| | | { |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®åºåºç¼å· |
| | | /// </summary> |
| | | /// <example>WH-AREA-001</example> |
| | | [ExcelColumn(Name = "åºåºç¼å·", Width = 20)] |
| | | public string AreaNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®åºåºåç§° |
| | | /// </summary> |
| | | /// <example>åææAåº</example> |
| | | [ExcelColumn(Name = "åºåºåç§°", Width = 25)] |
| | | public string AreaName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®åºåºæè¿°ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <example>åæ¾çµåå
å¨ä»¶</example> |
| | | [ExcelColumn(Name = "æè¿°", Width = 30)] |
| | | public string AreaDesc { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®åºåºç¶æ |
| | | /// </summary> |
| | | /// <example>Normal</example> |
| | | [ExcelColumn(Name = "åºåºç¶æ", Width = 15)] |
| | | public AreaStatusEnum AreaStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®åºåºç±»å |
| | | /// </summary> |
| | | /// <example>Storage</example> |
| | | [ExcelColumn(Name = "åºåºç±»å", Width = 15)] |
| | | public AreaTypeEnum AreaType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®é¢çæ©å±å段1 |
| | | /// </summary> |
| | | /// <example>èªå®ä¹ç¨é</example> |
| | | [ExcelColumn(Name = "æ©å±å段1", Width = 20)] |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®é¢çæ©å±å段2 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æ©å±å段2", Width = 20)] |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®é¢çæ©å±å段3 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æ©å±å段3", Width = 20)] |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "夿³¨", Width = 25)] |
| | | public virtual string Remark { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using static CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas.WmsAreasExportModel; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas |
| | | { |
| | | /// <summary> |
| | | /// WmsAreas导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsAreasImportModel |
| | | { |
| | | private List<WmsAreaImportModel> _wmsareas = new(); |
| | | |
| | | public List<WmsAreaImportModel> WmsAreas |
| | | { |
| | | get => _wmsareas; |
| | | set |
| | | { |
| | | _wmsareas = value; |
| | | var rowIndex = 2; |
| | | _wmsareas?.ForEach(x => x.RowIndex = rowIndex++); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WmsArea导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsAreaImportModel : WorkSectionExportModel |
| | | { |
| | | /// <summary> |
| | | /// è¡å· |
| | | /// </summary> |
| | | public int RowIndex { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | |
| | | /// <summary> |
| | | /// WmsContaineræ¥è¯¢åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class GetWmsContainersInput : ExtensiblePagedAndSortedResultRequestDto |
| | | { |
| | | /// <summary> |
| | | /// Gets or sets the filter. |
| | | /// </summary> |
| | | public string Filter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Gets or sets the name. |
| | | /// </summary> |
| | | public string Name { get; set; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | |
| | | /// <summary> |
| | | /// WmsContaineråå»ºåæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsContainerCreateDto : WmsContainerCreateOrUpdateDtoBase |
| | | { |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int? Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public bool? IsDisabled { get; set; } = false; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | |
| | | /// <summary> |
| | | /// WmsContaineråå»ºææ´æ°åºç±» |
| | | /// </summary> |
| | | public abstract class WmsContainerCreateOrUpdateDtoBase : ExtensibleEntityDto |
| | | { |
| | | |
| | | /// <summary> |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | public string ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç±»å |
| | | /// </summary> |
| | | public ContainerTypeEnum ContainerType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç¶æ |
| | | /// </summary> |
| | | public ContainerStatusEnum ContainerStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¿åº¦ |
| | | /// </summary> |
| | | public decimal? SpecLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 宽度 |
| | | /// </summary> |
| | | public decimal? SpecWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é«åº¦ |
| | | /// </summary> |
| | | public decimal? SpecHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé¿ |
| | | /// </summary> |
| | | public decimal? LimitLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é宽 |
| | | /// </summary> |
| | | public decimal? LimitWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé« |
| | | /// </summary> |
| | | public decimal? LimitHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è½½éä¸é |
| | | /// </summary> |
| | | public decimal? MaxWeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å¸¸æ°é |
| | | /// </summary> |
| | | public int? ExceptionNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | ///ç©ææ°é |
| | | /// </summary> |
| | | public int? MaterialNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainerCreateOrUpdateDtoBase"/> class. |
| | | /// </summary> |
| | | public WmsContainerCreateOrUpdateDtoBase() : base(false) |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | |
| | | /// <summary> |
| | | /// WmsContaineræ°æ®åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsContainerDto : ExtensibleEntityDto<Guid>, IHasConcurrencyStamp |
| | | { |
| | | |
| | | /// <summary> |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | public string ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç±»å |
| | | /// </summary> |
| | | public ContainerTypeEnum ContainerType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç¶æ |
| | | /// </summary> |
| | | public ContainerStatusEnum ContainerStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¿åº¦ |
| | | /// </summary> |
| | | public decimal? SpecLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 宽度 |
| | | /// </summary> |
| | | public decimal? SpecWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é«åº¦ |
| | | /// </summary> |
| | | public decimal? SpecHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé¿ |
| | | /// </summary> |
| | | public decimal? LimitLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é宽 |
| | | /// </summary> |
| | | public decimal? LimitWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé« |
| | | /// </summary> |
| | | public decimal? LimitHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è½½éä¸é |
| | | /// </summary> |
| | | public decimal? MaxWeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å¸¸æ°é |
| | | /// </summary> |
| | | public int? ExceptionNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | ///ç©ææ°é |
| | | /// </summary> |
| | | public int? MaterialNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Gets the export data. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public Dictionary<string, object> GetExportData() |
| | | { |
| | | var exportData = new Dictionary<string, object>(); |
| | | foreach (var property in this.GetType().GetProperties()) |
| | | { |
| | | exportData.Add(property.Name, property.GetValue(this)); |
| | | } |
| | | |
| | | return exportData; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | |
| | | /// <summary> |
| | | /// WmsContaineræ´æ°åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsContainerUpdateDto : WmsContainerCreateOrUpdateDtoBase, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using MiniExcelLibs.Attributes; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers |
| | | { |
| | | /// <summary> |
| | | /// WmsContainerså¯¼åºæ¨¡å |
| | | /// </summary> |
| | | public class WmsContainersExportModel |
| | | { |
| | | /// <summary> |
| | | /// WmsContainerå¯¼åºæ¨¡å |
| | | /// </summary> |
| | | public class WorkSectionExportModel |
| | | { |
| | | /// <summary> |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æçç¼å·", Width = 25)] |
| | | public string ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç±»å |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æçç±»å", Width = 25)] |
| | | public ContainerTypeEnum ContainerType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç¶æ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æçç¶æ", Width = 25)] |
| | | public ContainerStatusEnum ContainerStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¿åº¦ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "é¿åº¦", Width = 25)] |
| | | public decimal? SpecLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 宽度 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "宽度", Width = 25)] |
| | | public decimal? SpecWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é«åº¦ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "é«åº¦", Width = 25)] |
| | | public decimal? SpecHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé¿ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "éé¿", Width = 25)] |
| | | public decimal? LimitLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é宽 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "é宽", Width = 25)] |
| | | public decimal? LimitWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé« |
| | | /// </summary> |
| | | [ExcelColumn(Name = "éé«", Width = 25)] |
| | | public decimal? LimitHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è½½éä¸é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "è½½éä¸é", Width = 25)] |
| | | public decimal? MaxWeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å¸¸æ°é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "å¼å¸¸æ°é", Width = 25)] |
| | | public int? ExceptionNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©ææ°é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "ç©ææ°é", Width = 25)] |
| | | public int? MaterialNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "åä½å段1", Width = 25)] |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "åä½å段2", Width = 25)] |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | [ExcelColumn(Name = "åä½å段3", Width = 25)] |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "夿³¨", Width = 25)] |
| | | public virtual string Remark { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using static CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers.WmsContainersExportModel; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers |
| | | { |
| | | /// <summary> |
| | | /// WmsContainers导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsContainersImportModel |
| | | { |
| | | private List<WmsContainerImportModel> _wmscontainers = new(); |
| | | |
| | | public List<WmsContainerImportModel> WmsContainers |
| | | { |
| | | get => _wmscontainers; |
| | | set |
| | | { |
| | | _wmscontainers = value; |
| | | var rowIndex = 2; |
| | | _wmscontainers?.ForEach(x => x.RowIndex = rowIndex++); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WmsContainer导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsContainerImportModel : WorkSectionExportModel |
| | | { |
| | | /// <summary> |
| | | /// è¡å· |
| | | /// </summary> |
| | | public int RowIndex { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterials; |
| | | |
| | | /// <summary> |
| | | /// WmsMaterialæ¥è¯¢åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class GetWmsMaterialsInput : ExtensiblePagedAndSortedResultRequestDto |
| | | { |
| | | /// <summary> |
| | | /// Gets or sets the filter. |
| | | /// </summary> |
| | | public string Filter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Gets or sets the name. |
| | | /// </summary> |
| | | public string Name { get; set; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterials; |
| | | |
| | | /// <summary> |
| | | /// WmsMaterialåå»ºåæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsMaterialCreateDto : WmsMaterialCreateOrUpdateDtoBase |
| | | { |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int? Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public bool? IsDisabled { get; set; } = false; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterials; |
| | | |
| | | /// <summary> |
| | | /// WmsMaterialåå»ºææ´æ°åºç±» |
| | | /// </summary> |
| | | public abstract class WmsMaterialCreateOrUpdateDtoBase : ExtensibleEntityDto |
| | | { |
| | | /// <summary> |
| | | /// ç©æç¼ç ï¼å¯ä¸æ è¯ï¼ |
| | | /// </summary> |
| | | public string MaterialCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | public string MaterialName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éè´ç±»åï¼æä¸¾å¼ï¼ |
| | | /// </summary> |
| | | public PurchaseTypeEnum PurchaseType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç±»åï¼æä¸¾å¼ï¼ |
| | | /// </summary> |
| | | public MaterialTypeEnum MaterialType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 主åä½ï¼å¦ï¼kgãmãä¸ªï¼ |
| | | /// </summary> |
| | | public string PrimaryUnit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è§æ ¼/æ åï¼å¦ï¼GB/T 8163-2018ï¼ |
| | | /// </summary> |
| | | public string Standard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤å¾ï¼åä½ï¼mmï¼ |
| | | /// </summary> |
| | | public decimal OuterDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å£åï¼åä½ï¼mmï¼ |
| | | /// </summary> |
| | | public decimal WallThickness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè´¨ï¼å¦ï¼304ä¸éé¢ï¼ |
| | | /// </summary> |
| | | public string MaterialQuality { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¿åº¦ï¼åä½ï¼mï¼ |
| | | /// </summary> |
| | | public decimal Length { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ä¸ºä¸»æ¯ç®¡ï¼true: 主æ¯ç®¡, false: é主æ¯ç®¡ï¼ |
| | | /// </summary> |
| | | public bool IsMainBranch { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç产工å |
| | | /// </summary> |
| | | public string Factory { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¯ä¹¦ç¼å·ï¼å¦ï¼åå容å¨è®¤è¯ï¼ |
| | | /// </summary> |
| | | public string Certification { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsMaterialCreateOrUpdateDtoBase"/> class. |
| | | /// </summary> |
| | | public WmsMaterialCreateOrUpdateDtoBase() : base(false) |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterials; |
| | | |
| | | /// <summary> |
| | | /// WmsMaterialæ°æ®åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsMaterialDto : ExtensibleEntityDto<Guid>, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// ç©æç¼ç ï¼å¯ä¸æ è¯ï¼ |
| | | /// </summary> |
| | | public string MaterialCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | public string MaterialName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éè´ç±»åï¼æä¸¾å¼ï¼ |
| | | /// </summary> |
| | | public PurchaseTypeEnum PurchaseType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç±»åï¼æä¸¾å¼ï¼ |
| | | /// </summary> |
| | | public MaterialTypeEnum MaterialType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 主åä½ï¼å¦ï¼kgãmãä¸ªï¼ |
| | | /// </summary> |
| | | public string PrimaryUnit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è§æ ¼/æ åï¼å¦ï¼GB/T 8163-2018ï¼ |
| | | /// </summary> |
| | | public string Standard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤å¾ï¼åä½ï¼mmï¼ |
| | | /// </summary> |
| | | public decimal OuterDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å£åï¼åä½ï¼mmï¼ |
| | | /// </summary> |
| | | public decimal WallThickness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè´¨ï¼å¦ï¼304ä¸éé¢ï¼ |
| | | /// </summary> |
| | | public string MaterialQuality { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¿åº¦ï¼åä½ï¼mï¼ |
| | | /// </summary> |
| | | public decimal Length { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ä¸ºä¸»æ¯ç®¡ï¼true: 主æ¯ç®¡, false: é主æ¯ç®¡ï¼ |
| | | /// </summary> |
| | | public bool IsMainBranch { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç产工å |
| | | /// </summary> |
| | | public string Factory { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¯ä¹¦ç¼å·ï¼å¦ï¼åå容å¨è®¤è¯ï¼ |
| | | /// </summary> |
| | | public string Certification { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Gets the export data. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public Dictionary<string, object> GetExportData() |
| | | { |
| | | var exportData = new Dictionary<string, object>(); |
| | | foreach (var property in this.GetType().GetProperties()) |
| | | { |
| | | exportData.Add(property.Name, property.GetValue(this)); |
| | | } |
| | | |
| | | return exportData; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterials; |
| | | |
| | | /// <summary> |
| | | /// WmsMaterialæ´æ°åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsMaterialUpdateDto : WmsMaterialCreateOrUpdateDtoBase, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using MiniExcelLibs.Attributes; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.ComponentModel; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterials |
| | | { |
| | | |
| | | /// <summary> |
| | | /// WmsMaterialå¯¼åºæ¨¡å |
| | | /// </summary> |
| | | public class MaterialExportModel |
| | | { |
| | | /// <summary> |
| | | /// ç©æç¼ç ï¼å¯ä¸æ è¯ï¼ |
| | | /// </summary> |
| | | /// <example>MAT-2023-001</example> |
| | | [ExcelColumn(Name = "ç©æç¼ç ", Width = 25)] |
| | | public string MaterialCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | /// <example>304ä¸éé¢ç®¡</example> |
| | | [ExcelColumn(Name = "ç©æåç§°", Width = 25)] |
| | | public string MaterialName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éè´ç±»å |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 0:æ åéè´ 1:ç´§æ¥éè´ 2:åè®®éè´ |
| | | /// </remarks> |
| | | /// <example>0</example> |
| | | [ExcelColumn(Name = "éè´ç±»å", Width = 25)] |
| | | public PurchaseTypeEnum PurchaseType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç±»å |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 1:åææ 2:åæå 3:æå |
| | | /// </remarks> |
| | | /// <example>1</example> |
| | | [ExcelColumn(Name = "ç©æç±»å", Width = 25)] |
| | | public MaterialTypeEnum MaterialType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 主计éåä½ |
| | | /// </summary> |
| | | /// <example>kg</example> |
| | | [ExcelColumn(Name = "主åä½", Width = 25)] |
| | | public string PrimaryUnit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è§æ ¼/ææ¯æ å |
| | | /// </summary> |
| | | /// <example>GB/T 8163-2018</example> |
| | | [ExcelColumn(Name = "è§æ ¼/æ å", Width = 25)] |
| | | public string Standard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤å¾ï¼åä½ï¼æ¯«ç±³ï¼ |
| | | /// </summary> |
| | | /// <example>50.5</example> |
| | | [ExcelColumn(Name = "å¤å¾(mm)", Width = 25)] |
| | | public decimal OuterDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å£åï¼åä½ï¼æ¯«ç±³ï¼ |
| | | /// </summary> |
| | | /// <example>2.5</example> |
| | | [ExcelColumn(Name = "å£å(mm)", Width = 25)] |
| | | public decimal WallThickness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè´¨è¯´æ |
| | | /// </summary> |
| | | /// <example>304ä¸éé¢</example> |
| | | [ExcelColumn(Name = "æè´¨", Width = 25)] |
| | | public string MaterialQuality { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¿åº¦ï¼åä½ï¼ç±³ï¼ |
| | | /// </summary> |
| | | /// <example>6.0</example> |
| | | [ExcelColumn(Name = "é¿åº¦(m)", Width = 25)] |
| | | public decimal Length { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ä¸»æ¯ç®¡æ è¯ |
| | | /// </summary> |
| | | /// <example>true</example> |
| | | [ExcelColumn(Name = "æ¯å¦ä¸»æ¯ç®¡", Width = 25)] |
| | | [Description("æ¯/å¦")] |
| | | public bool IsMainBranch { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç产工ååç§° |
| | | /// </summary> |
| | | /// <example>䏿µ·ç¬¬ä¸å·¥å</example> |
| | | [ExcelColumn(Name = "ç产工å", Width = 25)] |
| | | public string Factory { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 认è¯è¯ä¹¦ç¼å· |
| | | /// </summary> |
| | | /// <example>CER-2023-001</example> |
| | | [ExcelColumn(Name = "è¯ä¹¦ç¼å·", Width = 25)] |
| | | public string Certification { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¢çæ©å±å段1 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// å¯ç¨äºä¸´æ¶åå¨ä¾åºåç¼ç çæ©å±ä¿¡æ¯ |
| | | /// </remarks> |
| | | [ExcelColumn(Name = "æ©å±å段1", Width = 25)] |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¢çæ©å±å段2 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// å¯ç¨äºä¸´æ¶å卿¹æ¬¡å·çæ©å±ä¿¡æ¯ |
| | | /// </remarks> |
| | | [ExcelColumn(Name = "æ©å±å段2", Width = 25)] |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¢çæ©å±å段3 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// å¯ç¨äºä¸´æ¶åå¨èªå®ä¹åç±»çæ©å±ä¿¡æ¯ |
| | | /// </remarks> |
| | | [ExcelColumn(Name = "æ©å±å段3", Width = 25)] |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | [ExcelColumn(Name = "夿³¨",Width = 25)] |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterials |
| | | { |
| | | /// <summary> |
| | | /// WmsMaterials导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsMaterialsImportModel |
| | | { |
| | | private List<WmsMaterialImportModel> _wmsmaterials = new(); |
| | | |
| | | public List<WmsMaterialImportModel> WmsMaterials |
| | | { |
| | | get => _wmsmaterials; |
| | | set |
| | | { |
| | | _wmsmaterials = value; |
| | | var rowIndex = 2; |
| | | _wmsmaterials?.ForEach(x => x.RowIndex = rowIndex++); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WmsMaterial导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsMaterialImportModel : MaterialExportModel |
| | | { |
| | | /// <summary> |
| | | /// è¡å· |
| | | /// </summary> |
| | | public int RowIndex { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces; |
| | | |
| | | /// <summary> |
| | | /// WmsPlaceæ¥è¯¢åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class GetWmsPlacesInput : ExtensiblePagedAndSortedResultRequestDto |
| | | { |
| | | /// <summary> |
| | | /// Gets or sets the filter. |
| | | /// </summary> |
| | | public string Filter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Gets or sets the name. |
| | | /// </summary> |
| | | public string Name { get; set; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces; |
| | | |
| | | /// <summary> |
| | | /// WmsPlaceåå»ºåæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsPlaceCreateDto : WmsPlaceCreateOrUpdateDtoBase |
| | | { |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int? Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public bool? IsDisabled { get; set; } = false; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces; |
| | | |
| | | /// <summary> |
| | | /// WmsPlaceåå»ºææ´æ°åºç±» |
| | | /// </summary> |
| | | public abstract class WmsPlaceCreateOrUpdateDtoBase : ExtensibleEntityDto |
| | | { |
| | | /// <summary> |
| | | /// ç¼å· |
| | | /// </summary> |
| | | public virtual string PlaceNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ç±»å |
| | | /// </summary> |
| | | public PlaceTypeEnum StorageTypeNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ç¶æ |
| | | /// </summary> |
| | | public PlaceStatusEnum PlaceStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå¨åºåº |
| | | /// </summary> |
| | | public string AreaCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å··é |
| | | /// </summary> |
| | | public int Aisle { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ |
| | | /// </summary> |
| | | public int RowNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å |
| | | /// </summary> |
| | | public int ColumnNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å± |
| | | /// </summary> |
| | | public int LayerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦éå® |
| | | /// </summary> |
| | | public YesNoEnum Islock { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç©ºæ |
| | | /// </summary> |
| | | public YesNoEnum EmptyContainer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsPlaceCreateOrUpdateDtoBase"/> class. |
| | | /// </summary> |
| | | public WmsPlaceCreateOrUpdateDtoBase() : base(false) |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces; |
| | | |
| | | /// <summary> |
| | | /// WmsPlaceæ°æ®åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsPlaceDto : ExtensibleEntityDto<Guid>, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// ç¼å· |
| | | /// </summary> |
| | | public virtual string PlaceNo { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ç±»å |
| | | /// </summary> |
| | | public PlaceTypeEnum StorageTypeNo { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ç¶æ |
| | | /// </summary> |
| | | public PlaceStatusEnum PlaceStatus { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// æå¨åºåº |
| | | /// </summary> |
| | | public string AreaCode { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// å··é |
| | | /// </summary> |
| | | public int Aisle { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// æ |
| | | /// </summary> |
| | | public int RowNo { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// å |
| | | /// </summary> |
| | | public int ColumnNo { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// å± |
| | | /// </summary> |
| | | public int LayerNo { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦éå® |
| | | /// </summary> |
| | | public YesNoEnum Islock { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç©ºæ |
| | | /// </summary> |
| | | public YesNoEnum EmptyContainer { get; protected set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Gets the export data. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public Dictionary<string, object> GetExportData() |
| | | { |
| | | var exportData = new Dictionary<string, object>(); |
| | | foreach (var property in this.GetType().GetProperties()) |
| | | { |
| | | exportData.Add(property.Name, property.GetValue(this)); |
| | | } |
| | | |
| | | return exportData; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces; |
| | | |
| | | /// <summary> |
| | | /// WmsPlaceæ´æ°åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsPlaceUpdateDto : WmsPlaceCreateOrUpdateDtoBase, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using MiniExcelLibs.Attributes; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces |
| | | { |
| | | /// <summary> |
| | | /// WmsPlaceså¯¼åºæ¨¡å |
| | | /// </summary> |
| | | public class WmsPlacesExportModel |
| | | { |
| | | /// <summary> |
| | | /// WmsPlaceå¯¼åºæ¨¡å |
| | | /// </summary> |
| | | public class WorkSectionExportModel |
| | | { |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®è´§ä½ç¼å· |
| | | /// </summary> |
| | | /// <example>PL-001-01-01</example> |
| | | [ExcelColumn(Name = "è´§ä½ç¼å·", Width = 20)] |
| | | public string PlaceNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®è´§ä½ç±»å |
| | | /// </summary> |
| | | /// <example>Normal</example> |
| | | [ExcelColumn(Name = "è´§ä½ç±»å", Width = 15)] |
| | | public PlaceTypeEnum StorageTypeNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®è´§ä½ç¶æ |
| | | /// </summary> |
| | | /// <example>Available</example> |
| | | [ExcelColumn(Name = "è´§ä½ç¶æ", Width = 15)] |
| | | public PlaceStatusEnum PlaceStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®æå¨åºåºç¼å· |
| | | /// </summary> |
| | | /// <example>AREA-001</example> |
| | | [ExcelColumn(Name = "æå±åºåº", Width = 20)] |
| | | public string AreaCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®å··éç¼å· |
| | | /// </summary> |
| | | /// <example>1</example> |
| | | [ExcelColumn(Name = "å··é", Width = 10)] |
| | | public int Aisle { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®æå· |
| | | /// </summary> |
| | | /// <example>2</example> |
| | | [ExcelColumn(Name = "æ", Width = 10)] |
| | | public int RowNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®åå· |
| | | /// </summary> |
| | | /// <example>3</example> |
| | | [ExcelColumn(Name = "å", Width = 10)] |
| | | public int ColumnNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®å±å· |
| | | /// </summary> |
| | | /// <example>1</example> |
| | | [ExcelColumn(Name = "å±", Width = 10)] |
| | | public int LayerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®éå®ç¶æ |
| | | /// </summary> |
| | | /// <example>No</example> |
| | | [ExcelColumn(Name = "æ¯å¦éå®", Width = 12)] |
| | | public YesNoEnum Islock { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®ç©ºæç¶æ |
| | | /// </summary> |
| | | /// <example>Yes</example> |
| | | [ExcelColumn(Name = "æ¯å¦ç©ºæ", Width = 12)] |
| | | public YesNoEnum EmptyContainer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®é¢çæ©å±å段1 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æ©å±å段1", Width = 20)] |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®é¢çæ©å±å段2 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æ©å±å段2", Width = 20)] |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®é¢çæ©å±å段3 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æ©å±å段3", Width = 20)] |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "夿³¨", Width = 25)] |
| | | public virtual string Remark { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using static CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces.WmsPlacesExportModel; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces |
| | | { |
| | | /// <summary> |
| | | /// WmsPlaces导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsPlacesImportModel |
| | | { |
| | | private List<WmsPlaceImportModel> _wmsplaces = new(); |
| | | |
| | | public List<WmsPlaceImportModel> WmsPlaces |
| | | { |
| | | get => _wmsplaces; |
| | | set |
| | | { |
| | | _wmsplaces = value; |
| | | var rowIndex = 2; |
| | | _wmsplaces?.ForEach(x => x.RowIndex = rowIndex++); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WmsPlace导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsPlaceImportModel : WorkSectionExportModel |
| | | { |
| | | /// <summary> |
| | | /// è¡å· |
| | | /// </summary> |
| | | public int RowIndex { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores; |
| | | |
| | | /// <summary> |
| | | /// WmsStoreæ¥è¯¢åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class GetWmsStoresInput : ExtensiblePagedAndSortedResultRequestDto |
| | | { |
| | | /// <summary> |
| | | /// Gets or sets the filter. |
| | | /// </summary> |
| | | public string Filter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Gets or sets the name. |
| | | /// </summary> |
| | | public string Name { get; set; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores; |
| | | |
| | | /// <summary> |
| | | /// WmsStoreåå»ºåæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsStoreCreateDto : WmsStoreCreateOrUpdateDtoBase |
| | | { |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int? Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public bool? IsDisabled { get; set; } = false; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores; |
| | | |
| | | /// <summary> |
| | | /// WmsStoreåå»ºææ´æ°åºç±» |
| | | /// </summary> |
| | | public abstract class WmsStoreCreateOrUpdateDtoBase : ExtensibleEntityDto |
| | | { |
| | | /// <summary> |
| | | /// ä»åºä»£ç |
| | | /// </summary> |
| | | public string? StoreCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºåç§° |
| | | /// </summary> |
| | | public string? StoreName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsStoreCreateOrUpdateDtoBase"/> class. |
| | | /// </summary> |
| | | public WmsStoreCreateOrUpdateDtoBase() : base(false) |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores; |
| | | |
| | | /// <summary> |
| | | /// WmsStoreæ°æ®åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsStoreDto : ExtensibleEntityDto<Guid>, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// ä»åºä»£ç |
| | | /// </summary> |
| | | public string? StoreCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºåç§° |
| | | /// </summary> |
| | | public string? StoreName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Gets the export data. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public Dictionary<string, object> GetExportData() |
| | | { |
| | | var exportData = new Dictionary<string, object>(); |
| | | foreach (var property in this.GetType().GetProperties()) |
| | | { |
| | | exportData.Add(property.Name, property.GetValue(this)); |
| | | } |
| | | |
| | | return exportData; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Domain.Entities; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores; |
| | | |
| | | /// <summary> |
| | | /// WmsStoreæ´æ°åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | public class WmsStoreUpdateDto : WmsStoreCreateOrUpdateDtoBase, IHasConcurrencyStamp |
| | | { |
| | | /// <summary> |
| | | /// å¹¶åæ³ |
| | | /// </summary> |
| | | public string ConcurrencyStamp { get; set; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using MiniExcelLibs.Attributes; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores |
| | | { |
| | | /// <summary> |
| | | /// WmsStoreså¯¼åºæ¨¡å |
| | | /// </summary> |
| | | public class WmsStoresExportModel |
| | | { |
| | | /// <summary> |
| | | /// WmsStoreå¯¼åºæ¨¡å |
| | | /// </summary> |
| | | public class WorkSectionExportModel |
| | | { |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®ä»åºä»£ç |
| | | /// </summary> |
| | | /// <example>WH-001</example> |
| | | [ExcelColumn(Name = "ä»åºä»£ç ", Width = 20)] |
| | | public string StoreCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®ä»åºåç§° |
| | | /// </summary> |
| | | /// <example>䏿µ·ä¸å¿ä»</example> |
| | | [ExcelColumn(Name = "ä»åºåç§°", Width = 25)] |
| | | public string StoreName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®é¢çæ©å±å段1 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æ©å±å段1", Width = 20)] |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®é¢çæ©å±å段2 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æ©å±å段2", Width = 20)] |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®é¢çæ©å±å段3 |
| | | /// </summary> |
| | | [ExcelColumn(Name = "æ©å±å段3", Width = 20)] |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [ExcelColumn(Name = "夿³¨", Width = 25)] |
| | | public virtual string Remark { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using static CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores.WmsStoresExportModel; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores |
| | | { |
| | | /// <summary> |
| | | /// WmsStores导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsStoresImportModel |
| | | { |
| | | private List<WmsStoreImportModel> _wmsstores = new(); |
| | | |
| | | public List<WmsStoreImportModel> WmsStores |
| | | { |
| | | get => _wmsstores; |
| | | set |
| | | { |
| | | _wmsstores = value; |
| | | var rowIndex = 2; |
| | | _wmsstores?.ForEach(x => x.RowIndex = rowIndex++); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WmsStore导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class WmsStoreImportModel : WorkSectionExportModel |
| | | { |
| | | /// <summary> |
| | | /// è¡å· |
| | | /// </summary> |
| | | public int RowIndex { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
| | | <ConfigureAwait ContinueOnCapturedContext="false" /> |
| | | </Weavers> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Application.Services; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts; |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢åºç¨æå¡ |
| | | /// </summary> |
| | | public interface ICMSPluginQueryAppService : IApplicationService |
| | | { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas; |
| | | using Volo.Abp.Application.Services; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | |
| | | /// <summary> |
| | | /// WmsAreaåºç¨æå¡ |
| | | /// </summary> |
| | | public interface IWmsAreaAppService : ICrudAppService<WmsAreaDto, Guid, GetWmsAreasInput, WmsAreaCreateDto, WmsAreaUpdateDto> |
| | | { |
| | | /// <summary> |
| | | /// Clones the asynchronous. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | Task<List<WmsAreaDto>> CloneAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// Deletes the many asynchronous. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | Task DeleteManyAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort asynchronous. |
| | | /// </summary> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <param name="sort">The sort.</param> |
| | | /// <returns></returns> |
| | | Task AdjustSortAsync(Guid id, int sort); |
| | | |
| | | /// <summary> |
| | | /// Imports the asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | /// <returns></returns> |
| | | Task ImportAsync(WmsAreasImportModel input); |
| | | |
| | | /// <summary> |
| | | /// Exports the asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | /// <returns></returns> |
| | | Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsAreasInput input); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | using Volo.Abp.Application.Services; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | |
| | | /// <summary> |
| | | /// WmsContaineråºç¨æå¡ |
| | | /// </summary> |
| | | public interface IWmsContainerAppService : ICrudAppService<WmsContainerDto, Guid, GetWmsContainersInput, WmsContainerCreateDto, WmsContainerUpdateDto> |
| | | { |
| | | /// <summary> |
| | | /// Clones the asynchronous. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | Task<List<WmsContainerDto>> CloneAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// Deletes the many asynchronous. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | Task DeleteManyAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort asynchronous. |
| | | /// </summary> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <param name="sort">The sort.</param> |
| | | /// <returns></returns> |
| | | Task AdjustSortAsync(Guid id, int sort); |
| | | |
| | | /// <summary> |
| | | /// Imports the asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | /// <returns></returns> |
| | | Task ImportAsync(WmsContainersImportModel input); |
| | | |
| | | /// <summary> |
| | | /// Exports the asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | /// <returns></returns> |
| | | Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsContainersInput input); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterials; |
| | | using Volo.Abp.Application.Services; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | |
| | | /// <summary> |
| | | /// WmsMaterialåºç¨æå¡ |
| | | /// </summary> |
| | | public interface IWmsMaterialAppService : ICrudAppService<WmsMaterialDto, Guid, GetWmsMaterialsInput, WmsMaterialCreateDto, WmsMaterialUpdateDto> |
| | | { |
| | | /// <summary> |
| | | /// Clones the asynchronous. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | Task<List<WmsMaterialDto>> CloneAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// Deletes the many asynchronous. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | Task DeleteManyAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort asynchronous. |
| | | /// </summary> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <param name="sort">The sort.</param> |
| | | /// <returns></returns> |
| | | Task AdjustSortAsync(Guid id, int sort); |
| | | |
| | | /// <summary> |
| | | /// Imports the asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | /// <returns></returns> |
| | | Task ImportAsync(WmsMaterialsImportModel input); |
| | | |
| | | /// <summary> |
| | | /// Exports the asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | /// <returns></returns> |
| | | Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsMaterialsInput input); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces; |
| | | using Volo.Abp.Application.Services; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | |
| | | /// <summary> |
| | | /// WmsPlaceåºç¨æå¡ |
| | | /// </summary> |
| | | public interface IWmsPlaceAppService : ICrudAppService<WmsPlaceDto, Guid, GetWmsPlacesInput, WmsPlaceCreateDto, WmsPlaceUpdateDto> |
| | | { |
| | | /// <summary> |
| | | /// Clones the asynchronous. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | Task<List<WmsPlaceDto>> CloneAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// Deletes the many asynchronous. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | Task DeleteManyAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort asynchronous. |
| | | /// </summary> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <param name="sort">The sort.</param> |
| | | /// <returns></returns> |
| | | Task AdjustSortAsync(Guid id, int sort); |
| | | |
| | | /// <summary> |
| | | /// Imports the asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | /// <returns></returns> |
| | | Task ImportAsync(WmsPlacesImportModel input); |
| | | |
| | | /// <summary> |
| | | /// Exports the asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | /// <returns></returns> |
| | | Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsPlacesInput input); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores; |
| | | using Volo.Abp.Application.Services; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | |
| | | /// <summary> |
| | | /// WmsStoreåºç¨æå¡ |
| | | /// </summary> |
| | | public interface IWmsStoreAppService : ICrudAppService<WmsStoreDto, Guid, GetWmsStoresInput, WmsStoreCreateDto, WmsStoreUpdateDto> |
| | | { |
| | | /// <summary> |
| | | /// Clones the asynchronous. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | Task<List<WmsStoreDto>> CloneAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// Deletes the many asynchronous. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | Task DeleteManyAsync(IEnumerable<Guid> ids); |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort asynchronous. |
| | | /// </summary> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <param name="sort">The sort.</param> |
| | | /// <returns></returns> |
| | | Task AdjustSortAsync(Guid id, int sort); |
| | | |
| | | /// <summary> |
| | | /// Imports the asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | /// <returns></returns> |
| | | Task ImportAsync(WmsStoresImportModel input); |
| | | |
| | | /// <summary> |
| | | /// Exports the asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | /// <returns></returns> |
| | | Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsStoresInput input); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <Import Project="../../common.props" /> |
| | | <Import Project="../../configureawait.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Volo.Abp.Dapper" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Volo.Abp.AutoMapper" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Volo.Abp.Ddd.Application" Version="$(ABPPackageVersion)" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.Application.Contracts\CMS.Plugin.HIAWms.Application.Contracts.csproj" /> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.Domain\CMS.Plugin.HIAWms.Domain.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Localization; |
| | | using Volo.Abp.Application.Services; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application; |
| | | |
| | | /// <summary> |
| | | /// Inherit your application services from this class. |
| | | /// </summary> |
| | | public abstract class CMSPluginAppService : ApplicationService |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="CMSPluginAppService"/> class. |
| | | /// </summary> |
| | | protected CMSPluginAppService() |
| | | { |
| | | ObjectMapperContext = typeof(CMSPluginApplicationModule); |
| | | LocalizationResource = typeof(HIAWmsResource); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts; |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Volo.Abp.Application; |
| | | using Volo.Abp.AutoMapper; |
| | | using Volo.Abp.EventBus; |
| | | using Volo.Abp.Modularity; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application; |
| | | |
| | | /// <summary> |
| | | /// æä»¶åºç¨æå¡æ¨¡å |
| | | /// </summary> |
| | | [DependsOn( |
| | | typeof(CMSPluginDomainModule), |
| | | typeof(CMSPluginApplicationContractsModule), |
| | | typeof(AbpAutoMapperModule), |
| | | typeof(AbpEventBusModule), |
| | | typeof(AbpDddApplicationModule) |
| | | )] |
| | | public class CMSPluginApplicationModule : AbpModule |
| | | { |
| | | public override void ConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | context.Services.AddAutoMapperObjectMapper<CMSPluginApplicationModule>(); |
| | | Configure<AbpAutoMapperOptions>(options => |
| | | { |
| | | options.AddMaps<CMSPluginApplicationModule>(validate: true); |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts; |
| | | using CMS.Plugin.HIAWms.Domain.Data; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application; |
| | | |
| | | /// <inheritdoc /> |
| | | public class CMSPluginQueryAppService : CMSPluginAppService, ICMSPluginQueryAppService |
| | | { |
| | | private readonly ICMSPluginDapperRepository _dapperRepository; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="CMSPluginQueryAppService"/> class. |
| | | /// </summary> |
| | | /// <param name="dapperRepository">The dapper repository.</param> |
| | | public CMSPluginQueryAppService(ICMSPluginDapperRepository dapperRepository) |
| | | { |
| | | _dapperRepository = dapperRepository; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
| | | <ConfigureAwait ContinueOnCapturedContext="false" /> |
| | | </Weavers> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using CMS.Plugin.HIAWms.Domain.WmsAreas; |
| | | using CMS.Plugin.HIAWms.Domain.Shared; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsAreas; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.ObjectExtending; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Implements; |
| | | |
| | | /// <inheritdoc /> |
| | | public class WmsAreaAppService : CMSPluginAppService, IWmsAreaAppService |
| | | { |
| | | private readonly IWmsAreaRepository _wmsareaRepository; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsAreaAppService"/> class. |
| | | /// </summary> |
| | | /// <param name="wmsareaRepository">The task job repository.</param> |
| | | public WmsAreaAppService(IWmsAreaRepository wmsareaRepository) |
| | | { |
| | | _wmsareaRepository = wmsareaRepository; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsAreaDto> GetAsync(Guid id) |
| | | { |
| | | return ObjectMapper.Map<WmsArea, WmsAreaDto>(await _wmsareaRepository.GetAsync(id)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<PagedResultDto<WmsAreaDto>> GetListAsync(GetWmsAreasInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsArea.Sort); |
| | | } |
| | | |
| | | var specification = new WmsAreaSpecification(input.Name); |
| | | var count = await _wmsareaRepository.GetCountAsync(input.Filter, specification); |
| | | var list = await _wmsareaRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification); |
| | | |
| | | return new PagedResultDto<WmsAreaDto>(count, ObjectMapper.Map<List<WmsArea>, List<WmsAreaDto>>(list)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsAreaDto> CreateAsync(WmsAreaCreateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var exist = await _wmsareaRepository.NameExistAsync(input.AreaNo); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.AreaNo]); |
| | | } |
| | | |
| | | var maxSort = await _wmsareaRepository.GetMaxSortAsync(); |
| | | var sort = input.Sort ?? maxSort; |
| | | var wmsarea = new WmsArea |
| | | { |
| | | |
| | | }; |
| | | input.MapExtraPropertiesTo(wmsarea, MappingPropertyDefinitionChecks.None); |
| | | |
| | | await _wmsareaRepository.InsertAsync(wmsarea); |
| | | |
| | | if (input.Sort.HasValue && wmsarea.Sort != maxSort) |
| | | { |
| | | await AdjustSortAsync(wmsarea.Id, wmsarea.Sort); |
| | | } |
| | | |
| | | return ObjectMapper.Map<WmsArea, WmsAreaDto>(wmsarea); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsAreaDto> UpdateAsync(Guid id, WmsAreaUpdateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var wmsarea = await _wmsareaRepository.GetAsync(id); |
| | | var exist = await _wmsareaRepository.NameExistAsync(input.AreaNo, wmsarea.Id); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.AreaNo]); |
| | | } |
| | | |
| | | wmsarea.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp); |
| | | input.MapExtraPropertiesTo(wmsarea, MappingPropertyDefinitionChecks.None); |
| | | |
| | | wmsarea.AreaNo = input.AreaNo; |
| | | |
| | | await _wmsareaRepository.UpdateAsync(wmsarea); |
| | | |
| | | return ObjectMapper.Map<WmsArea, WmsAreaDto>(wmsarea); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<List<WmsAreaDto>> CloneAsync(IEnumerable<Guid> ids) |
| | | { |
| | | var wmsareas = new List<WmsArea>(); |
| | | if (ids != null) |
| | | { |
| | | var sort = await _wmsareaRepository.GetMaxSortAsync(); |
| | | foreach (var id in ids) |
| | | { |
| | | var wmsarea = await _wmsareaRepository.FindAsync(id); |
| | | if (wmsarea != null) |
| | | { |
| | | var name = wmsarea.AreaNo + WmsAreaConsts.CloneTag; |
| | | var notExist = false; |
| | | while (!notExist) |
| | | { |
| | | var exist = await _wmsareaRepository.NameExistAsync(name); |
| | | if (exist || wmsareas.Any(x => x.AreaNo == name)) |
| | | { |
| | | name += WmsAreaConsts.CloneTag; |
| | | continue; |
| | | } |
| | | |
| | | notExist = true; |
| | | } |
| | | |
| | | wmsareas.Add(wmsarea); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ObjectMapper.Map<List<WmsArea>, List<WmsAreaDto>>(wmsareas); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmsareaRepository.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task DeleteManyAsync(IEnumerable<Guid> ids) |
| | | { |
| | | foreach (var id in ids) |
| | | { |
| | | await DeleteAsync(id); |
| | | } |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | var list = await _wmsareaRepository.GetListAsync(nameof(WmsArea.Sort)); |
| | | if (list != null && list.Any()) |
| | | { |
| | | var initSort = 1; |
| | | list.ForEach(x => x.AdjustSort(initSort++)); |
| | | var entity = list.FirstOrDefault(x => x.Id == id); |
| | | if (entity != null) |
| | | { |
| | | if (sort == 1) |
| | | { |
| | | list.Where(x => x.Id != id).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | } |
| | | else if (entity.Sort > sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort >= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort < sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | else if (entity.Sort < sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort > sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort <= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | |
| | | entity.AdjustSort(sort); |
| | | } |
| | | } |
| | | |
| | | await _wmsareaRepository.UpdateManyAsync(list); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task ImportAsync(WmsAreasImportModel input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | var wmsareaCreateDtos = new List<(int RowIndex, WmsAreaCreateDto Item)>(); |
| | | var wmsareaUpdateDtos = new List<(int RowIndex, Guid Id, WmsAreaUpdateDto Item)>(); |
| | | var wmsareas = input.WmsAreas; |
| | | |
| | | if (wmsareas != null && wmsareas.Any()) |
| | | { |
| | | #region 导å
¥æ ¡éª |
| | | |
| | | // 夿åç§°æ¯å¦éå¤ï¼å¹¶è¾åºç¬¬å è¡éå¤ |
| | | var duplicateWmsAreas = wmsareas.GroupBy(x => x.AreaNo).Where(x => x.Count() > 1).ToList(); |
| | | if (duplicateWmsAreas?.Any() == true) |
| | | { |
| | | var duplicateWmsAreaMsgs = duplicateWmsAreas.Select(x => $"第 {string.Join(",", x.Select(x => x.RowIndex))} è¡ï¼{x.Key} åç§°éå¤"); |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ {string.Join(",", duplicateWmsAreaMsgs)}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | foreach (var wmsarea in wmsareas) |
| | | { |
| | | if (wmsarea.AreaNo.IsNullOrWhiteSpace() && wmsarea.AreaName.IsNullOrWhiteSpace()) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (wmsarea.AreaName.IsNullOrWhiteSpace()) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsarea.RowIndex}è¡ï¼WmsAreaåç§°ä¸è½ä¸ºç©º"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | |
| | | var oldWmsArea = await _wmsareaRepository.FindByNameAsync(wmsarea.AreaName); |
| | | if (oldWmsArea != null) |
| | | { |
| | | var wmsareaUpdateDto = new WmsAreaUpdateDto |
| | | { |
| | | AreaNo = wmsarea.AreaNo, |
| | | AreaName = wmsarea.AreaName, |
| | | Remark = wmsarea.Remark, |
| | | }; |
| | | |
| | | wmsareaUpdateDtos.Add((wmsarea.RowIndex, oldWmsArea.Id, wmsareaUpdateDto)); |
| | | } |
| | | else |
| | | { |
| | | var wmsareaCreateDto = new WmsAreaCreateDto |
| | | { |
| | | AreaNo = wmsarea.AreaNo, |
| | | AreaName = wmsarea.AreaName, |
| | | Remark = wmsarea.Remark, |
| | | }; |
| | | |
| | | wmsareaCreateDtos.Add((wmsarea.RowIndex, wmsareaCreateDto)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // æ°å¢ |
| | | foreach (var wmsareaDto in wmsareaCreateDtos) |
| | | { |
| | | try |
| | | { |
| | | await CreateAsync(wmsareaDto.Item); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsareaDto.RowIndex}è¡ï¼{e.Message}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | // æ´æ° |
| | | foreach (var wmsareaDto in wmsareaUpdateDtos) |
| | | { |
| | | try |
| | | { |
| | | await UpdateAsync(wmsareaDto.Id, wmsareaDto.Item); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsareaDto.RowIndex}è¡ï¼{e.Message}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsAreasInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsArea.Sort); |
| | | } |
| | | |
| | | var specification = new WmsAreaSpecification(input.Name); |
| | | var list = await _wmsareaRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification, includeDetails: true); |
| | | var result = ObjectMapper.Map<List<WmsArea>, List<WmsAreaDto>>(list); |
| | | |
| | | var sheets = new Dictionary<string, object> |
| | | { |
| | | ["é
ç½®"] = result.Select(x => x.GetExportData()).ToList(), |
| | | }; |
| | | |
| | | var fileName = result.Count > 1 ? "WmsAreaå表" : result.Count == 1 ? result.First()?.AreaName : "WmsArea模ç"; |
| | | return (sheets, fileName); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Checks the create or update dto asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | protected Task CheckCreateOrUpdateDtoAsync(WmsAreaCreateOrUpdateDtoBase input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | Check.NotNullOrWhiteSpace(input.AreaNo, "ç¼å·", WmsAreaConsts.MaxCodeLength); |
| | | Check.NotNullOrWhiteSpace(input.AreaName, "åç§°", WmsAreaConsts.MaxNameLength); |
| | | Check.Length(input.Remark, "夿³¨", WmsAreaConsts.MaxRemarkLength); |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainers; |
| | | using CMS.Plugin.HIAWms.Domain.Shared; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsContainers; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.ObjectExtending; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Implements; |
| | | |
| | | /// <inheritdoc /> |
| | | public class WmsContainerAppService : CMSPluginAppService, IWmsContainerAppService |
| | | { |
| | | private readonly IWmsContainerRepository _wmscontainerRepository; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainerAppService"/> class. |
| | | /// </summary> |
| | | /// <param name="wmscontainerRepository">The task job repository.</param> |
| | | public WmsContainerAppService(IWmsContainerRepository wmscontainerRepository) |
| | | { |
| | | _wmscontainerRepository = wmscontainerRepository; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsContainerDto> GetAsync(Guid id) |
| | | { |
| | | return ObjectMapper.Map<WmsContainer, WmsContainerDto>(await _wmscontainerRepository.GetAsync(id)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<PagedResultDto<WmsContainerDto>> GetListAsync(GetWmsContainersInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsContainer.Sort); |
| | | } |
| | | |
| | | var specification = new WmsContainerSpecification(input.Name); |
| | | var count = await _wmscontainerRepository.GetCountAsync(input.Filter, specification); |
| | | var list = await _wmscontainerRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification); |
| | | |
| | | return new PagedResultDto<WmsContainerDto>(count, ObjectMapper.Map<List<WmsContainer>, List<WmsContainerDto>>(list)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsContainerDto> CreateAsync(WmsContainerCreateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var exist = await _wmscontainerRepository.NameExistAsync(input.ContainerNo); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.ContainerNo]); |
| | | } |
| | | |
| | | var maxSort = await _wmscontainerRepository.GetMaxSortAsync(); |
| | | var sort = input.Sort ?? maxSort; |
| | | var wmscontainer = new WmsContainer { Id = GuidGenerator.Create(), ContainerNo = input.ContainerNo, Remark = input.Remark }; |
| | | input.MapExtraPropertiesTo(wmscontainer, MappingPropertyDefinitionChecks.None); |
| | | |
| | | await _wmscontainerRepository.InsertAsync(wmscontainer); |
| | | |
| | | if (input.Sort.HasValue && wmscontainer.Sort != maxSort) |
| | | { |
| | | await AdjustSortAsync(wmscontainer.Id, wmscontainer.Sort); |
| | | } |
| | | |
| | | return ObjectMapper.Map<WmsContainer, WmsContainerDto>(wmscontainer); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsContainerDto> UpdateAsync(Guid id, WmsContainerUpdateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var wmscontainer = await _wmscontainerRepository.GetAsync(id); |
| | | var exist = await _wmscontainerRepository.NameExistAsync(input.ContainerNo, wmscontainer.Id); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.ContainerNo]); |
| | | } |
| | | |
| | | wmscontainer.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp); |
| | | input.MapExtraPropertiesTo(wmscontainer, MappingPropertyDefinitionChecks.None); |
| | | |
| | | wmscontainer.ContainerStatus = input.ContainerStatus; |
| | | |
| | | await _wmscontainerRepository.UpdateAsync(wmscontainer); |
| | | |
| | | return ObjectMapper.Map<WmsContainer, WmsContainerDto>(wmscontainer); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<List<WmsContainerDto>> CloneAsync(IEnumerable<Guid> ids) |
| | | { |
| | | var wmscontainers = new List<WmsContainer>(); |
| | | if (ids != null) |
| | | { |
| | | var sort = await _wmscontainerRepository.GetMaxSortAsync(); |
| | | foreach (var id in ids) |
| | | { |
| | | var wmscontainer = await _wmscontainerRepository.FindAsync(id); |
| | | if (wmscontainer != null) |
| | | { |
| | | var containerNo = wmscontainer.ContainerNo + WmsContainerConsts.CloneTag; |
| | | var notExist = false; |
| | | while (!notExist) |
| | | { |
| | | var exist = await _wmscontainerRepository.NameExistAsync(containerNo); |
| | | if (exist || wmscontainers.Any(x => x.ContainerNo == containerNo)) |
| | | { |
| | | containerNo += WmsContainerConsts.CloneTag; |
| | | continue; |
| | | } |
| | | |
| | | notExist = true; |
| | | } |
| | | |
| | | //wmscontainer = await _wmscontainerRepository.InsertAsync(wmscontainer.Clone(GuidGenerator.Create(), containerNo, sort++)); |
| | | wmscontainers.Add(wmscontainer); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ObjectMapper.Map<List<WmsContainer>, List<WmsContainerDto>>(wmscontainers); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmscontainerRepository.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task DeleteManyAsync(IEnumerable<Guid> ids) |
| | | { |
| | | foreach (var id in ids) |
| | | { |
| | | await DeleteAsync(id); |
| | | } |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | var list = await _wmscontainerRepository.GetListAsync(nameof(WmsContainer.Sort)); |
| | | if (list != null && list.Any()) |
| | | { |
| | | var initSort = 1; |
| | | list.ForEach(x => x.AdjustSort(initSort++)); |
| | | var entity = list.FirstOrDefault(x => x.Id == id); |
| | | if (entity != null) |
| | | { |
| | | if (sort == 1) |
| | | { |
| | | list.Where(x => x.Id != id).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | } |
| | | else if (entity.Sort > sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort >= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort < sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | else if (entity.Sort < sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort > sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort <= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | |
| | | entity.AdjustSort(sort); |
| | | } |
| | | } |
| | | |
| | | await _wmscontainerRepository.UpdateManyAsync(list); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task ImportAsync(WmsContainersImportModel input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | var wmscontainerCreateDtos = new List<(int RowIndex, WmsContainerCreateDto Item)>(); |
| | | var wmscontainerUpdateDtos = new List<(int RowIndex, Guid Id, WmsContainerUpdateDto Item)>(); |
| | | var wmscontainers = input.WmsContainers; |
| | | |
| | | if (wmscontainers != null && wmscontainers.Any()) |
| | | { |
| | | #region 导å
¥æ ¡éª |
| | | |
| | | // 夿åç§°æ¯å¦éå¤ï¼å¹¶è¾åºç¬¬å è¡éå¤ |
| | | var duplicateWmsContainers = wmscontainers.GroupBy(x => x.ContainerNo).Where(x => x.Count() > 1).ToList(); |
| | | if (duplicateWmsContainers?.Any() == true) |
| | | { |
| | | var duplicateWmsContainerMsgs = duplicateWmsContainers.Select(x => $"第 {string.Join(",", x.Select(x => x.RowIndex))} è¡ï¼{x.Key} åç§°éå¤"); |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ {string.Join(",", duplicateWmsContainerMsgs)}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | foreach (var wmscontainer in wmscontainers) |
| | | { |
| | | if (wmscontainer.ContainerNo.IsNullOrWhiteSpace() && wmscontainer.ContainerNo.IsNullOrWhiteSpace()) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (wmscontainer.ContainerNo.IsNullOrWhiteSpace()) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmscontainer.RowIndex}è¡ï¼WmsContaineråç§°ä¸è½ä¸ºç©º"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | |
| | | var oldWmsContainer = await _wmscontainerRepository.FindByNameAsync(wmscontainer.ContainerNo); |
| | | if (oldWmsContainer != null) |
| | | { |
| | | var wmscontainerUpdateDto = new WmsContainerUpdateDto |
| | | { |
| | | ContainerNo = wmscontainer.ContainerNo, |
| | | ContainerStatus = wmscontainer.ContainerStatus, |
| | | Remark = wmscontainer.Remark, |
| | | }; |
| | | |
| | | wmscontainerUpdateDtos.Add((wmscontainer.RowIndex, oldWmsContainer.Id, wmscontainerUpdateDto)); |
| | | } |
| | | else |
| | | { |
| | | var wmscontainerCreateDto = new WmsContainerCreateDto |
| | | { |
| | | ContainerNo = wmscontainer.ContainerNo, |
| | | ContainerStatus = wmscontainer.ContainerStatus, |
| | | Remark = wmscontainer.Remark, |
| | | }; |
| | | |
| | | wmscontainerCreateDtos.Add((wmscontainer.RowIndex, wmscontainerCreateDto)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // æ°å¢ |
| | | foreach (var wmscontainerDto in wmscontainerCreateDtos) |
| | | { |
| | | try |
| | | { |
| | | await CreateAsync(wmscontainerDto.Item); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmscontainerDto.RowIndex}è¡ï¼{e.Message}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | // æ´æ° |
| | | foreach (var wmscontainerDto in wmscontainerUpdateDtos) |
| | | { |
| | | try |
| | | { |
| | | await UpdateAsync(wmscontainerDto.Id, wmscontainerDto.Item); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmscontainerDto.RowIndex}è¡ï¼{e.Message}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsContainersInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsContainer.Sort); |
| | | } |
| | | |
| | | var specification = new WmsContainerSpecification(input.Name); |
| | | var list = await _wmscontainerRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification, includeDetails: true); |
| | | var result = ObjectMapper.Map<List<WmsContainer>, List<WmsContainerDto>>(list); |
| | | |
| | | var sheets = new Dictionary<string, object> |
| | | { |
| | | ["é
ç½®"] = result.Select(x => x.GetExportData()).ToList(), |
| | | }; |
| | | |
| | | var fileName = result.Count > 1 ? "WmsContainerå表" : result.Count == 1 ? result.First()?.ContainerNo : "WmsContainer模ç"; |
| | | return (sheets, fileName); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Checks the create or update dto asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | protected Task CheckCreateOrUpdateDtoAsync(WmsContainerCreateOrUpdateDtoBase input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | Check.NotNullOrWhiteSpace(input.ContainerNo, "ç¼å·", WmsContainerConsts.MaxCodeLength); |
| | | Check.Length(input.Remark, "夿³¨", WmsContainerConsts.MaxRemarkLength); |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterials; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using CMS.Plugin.HIAWms.Domain.WmsMaterials; |
| | | using CMS.Plugin.HIAWms.Domain.Shared; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsMaterials; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.ObjectExtending; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Implements; |
| | | |
| | | /// <inheritdoc /> |
| | | public class WmsMaterialAppService : CMSPluginAppService, IWmsMaterialAppService |
| | | { |
| | | private readonly IWmsMaterialRepository _wmsmaterialRepository; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsMaterialAppService"/> class. |
| | | /// </summary> |
| | | /// <param name="wmsmaterialRepository">The task job repository.</param> |
| | | public WmsMaterialAppService(IWmsMaterialRepository wmsmaterialRepository) |
| | | { |
| | | _wmsmaterialRepository = wmsmaterialRepository; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsMaterialDto> GetAsync(Guid id) |
| | | { |
| | | return ObjectMapper.Map<WmsMaterial, WmsMaterialDto>(await _wmsmaterialRepository.GetAsync(id)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<PagedResultDto<WmsMaterialDto>> GetListAsync(GetWmsMaterialsInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsMaterial.Sort); |
| | | } |
| | | |
| | | var specification = new WmsMaterialSpecification(input.Name); |
| | | var count = await _wmsmaterialRepository.GetCountAsync(input.Filter, specification); |
| | | var list = await _wmsmaterialRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification); |
| | | |
| | | return new PagedResultDto<WmsMaterialDto>(count, ObjectMapper.Map<List<WmsMaterial>, List<WmsMaterialDto>>(list)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsMaterialDto> CreateAsync(WmsMaterialCreateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var exist = await _wmsmaterialRepository.NameExistAsync(input.MaterialCode); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.MaterialCode]); |
| | | } |
| | | |
| | | var maxSort = await _wmsmaterialRepository.GetMaxSortAsync(); |
| | | var sort = input.Sort ?? maxSort; |
| | | var wmsmaterial = new WmsMaterial |
| | | { |
| | | |
| | | }; |
| | | input.MapExtraPropertiesTo(wmsmaterial, MappingPropertyDefinitionChecks.None); |
| | | |
| | | await _wmsmaterialRepository.InsertAsync(wmsmaterial); |
| | | |
| | | if (input.Sort.HasValue && wmsmaterial.Sort != maxSort) |
| | | { |
| | | await AdjustSortAsync(wmsmaterial.Id, wmsmaterial.Sort); |
| | | } |
| | | |
| | | return ObjectMapper.Map<WmsMaterial, WmsMaterialDto>(wmsmaterial); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsMaterialDto> UpdateAsync(Guid id, WmsMaterialUpdateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var wmsmaterial = await _wmsmaterialRepository.GetAsync(id); |
| | | var exist = await _wmsmaterialRepository.NameExistAsync(input.MaterialCode, wmsmaterial.Id); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.MaterialCode]); |
| | | } |
| | | |
| | | wmsmaterial.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp); |
| | | input.MapExtraPropertiesTo(wmsmaterial, MappingPropertyDefinitionChecks.None); |
| | | |
| | | wmsmaterial.MaterialCode = input.MaterialCode; |
| | | |
| | | await _wmsmaterialRepository.UpdateAsync(wmsmaterial); |
| | | |
| | | return ObjectMapper.Map<WmsMaterial, WmsMaterialDto>(wmsmaterial); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<List<WmsMaterialDto>> CloneAsync(IEnumerable<Guid> ids) |
| | | { |
| | | //var wmsmaterials = new List<WmsMaterial>(); |
| | | //if (ids != null) |
| | | //{ |
| | | // var sort = await _wmsmaterialRepository.GetMaxSortAsync(); |
| | | // foreach (var id in ids) |
| | | // { |
| | | // var wmsmaterial = await _wmsmaterialRepository.FindAsync(id); |
| | | // if (wmsmaterial != null) |
| | | // { |
| | | // var name = wmsmaterial.Name + WmsMaterialConsts.CloneTag; |
| | | // var notExist = false; |
| | | // while (!notExist) |
| | | // { |
| | | // var exist = await _wmsmaterialRepository.NameExistAsync(name); |
| | | // if (exist || wmsmaterials.Any(x => x.Name == name)) |
| | | // { |
| | | // name += WmsMaterialConsts.CloneTag; |
| | | // continue; |
| | | // } |
| | | |
| | | // notExist = true; |
| | | // } |
| | | |
| | | // //wmsmaterial = await _wmsmaterialRepository.InsertAsync(wmsmaterial.Clone(GuidGenerator.Create(), name, sort++)); |
| | | // wmsmaterials.Add(wmsmaterial); |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | //return ObjectMapper.Map<List<WmsMaterial>, List<WmsMaterialDto>>(wmsmaterials); |
| | | return new List<WmsMaterialDto>(); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmsmaterialRepository.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task DeleteManyAsync(IEnumerable<Guid> ids) |
| | | { |
| | | foreach (var id in ids) |
| | | { |
| | | await DeleteAsync(id); |
| | | } |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | var list = await _wmsmaterialRepository.GetListAsync(nameof(WmsMaterial.Sort)); |
| | | if (list != null && list.Any()) |
| | | { |
| | | var initSort = 1; |
| | | list.ForEach(x => x.AdjustSort(initSort++)); |
| | | var entity = list.FirstOrDefault(x => x.Id == id); |
| | | if (entity != null) |
| | | { |
| | | if (sort == 1) |
| | | { |
| | | list.Where(x => x.Id != id).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | } |
| | | else if (entity.Sort > sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort >= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort < sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | else if (entity.Sort < sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort > sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort <= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | |
| | | entity.AdjustSort(sort); |
| | | } |
| | | } |
| | | |
| | | await _wmsmaterialRepository.UpdateManyAsync(list); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task ImportAsync(WmsMaterialsImportModel input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | var wmsmaterialCreateDtos = new List<(int RowIndex, WmsMaterialCreateDto Item)>(); |
| | | var wmsmaterialUpdateDtos = new List<(int RowIndex, Guid Id, WmsMaterialUpdateDto Item)>(); |
| | | var wmsmaterials = input.WmsMaterials; |
| | | |
| | | if (wmsmaterials != null && wmsmaterials.Any()) |
| | | { |
| | | #region 导å
¥æ ¡éª |
| | | |
| | | // 夿åç§°æ¯å¦éå¤ï¼å¹¶è¾åºç¬¬å è¡éå¤ |
| | | var duplicateWmsMaterials = wmsmaterials.GroupBy(x => x.MaterialCode).Where(x => x.Count() > 1).ToList(); |
| | | if (duplicateWmsMaterials?.Any() == true) |
| | | { |
| | | var duplicateWmsMaterialMsgs = duplicateWmsMaterials.Select(x => $"第 {string.Join(",", x.Select(x => x.RowIndex))} è¡ï¼{x.Key} åç§°éå¤"); |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ {string.Join(",", duplicateWmsMaterialMsgs)}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | foreach (var wmsmaterial in wmsmaterials) |
| | | { |
| | | if (wmsmaterial.MaterialCode.IsNullOrWhiteSpace() && wmsmaterial.MaterialName.IsNullOrWhiteSpace()) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (wmsmaterial.MaterialCode.IsNullOrWhiteSpace()) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsmaterial.RowIndex}è¡ï¼WmsMaterialåç§°ä¸è½ä¸ºç©º"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | |
| | | var oldWmsMaterial = await _wmsmaterialRepository.FindByNameAsync(wmsmaterial.MaterialCode); |
| | | if (oldWmsMaterial != null) |
| | | { |
| | | var wmsmaterialUpdateDto = new WmsMaterialUpdateDto |
| | | { |
| | | MaterialCode = wmsmaterial.MaterialCode, |
| | | MaterialName = wmsmaterial.MaterialName, |
| | | Remark = wmsmaterial.Remark, |
| | | }; |
| | | |
| | | wmsmaterialUpdateDtos.Add((wmsmaterial.RowIndex, oldWmsMaterial.Id, wmsmaterialUpdateDto)); |
| | | } |
| | | else |
| | | { |
| | | var wmsmaterialCreateDto = new WmsMaterialCreateDto |
| | | { |
| | | MaterialCode = wmsmaterial.MaterialCode, |
| | | MaterialName = wmsmaterial.MaterialName, |
| | | Remark = wmsmaterial.Remark, |
| | | }; |
| | | |
| | | wmsmaterialCreateDtos.Add((wmsmaterial.RowIndex, wmsmaterialCreateDto)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // æ°å¢ |
| | | foreach (var wmsmaterialDto in wmsmaterialCreateDtos) |
| | | { |
| | | try |
| | | { |
| | | await CreateAsync(wmsmaterialDto.Item); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsmaterialDto.RowIndex}è¡ï¼{e.Message}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | // æ´æ° |
| | | foreach (var wmsmaterialDto in wmsmaterialUpdateDtos) |
| | | { |
| | | try |
| | | { |
| | | await UpdateAsync(wmsmaterialDto.Id, wmsmaterialDto.Item); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsmaterialDto.RowIndex}è¡ï¼{e.Message}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsMaterialsInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsMaterial.Sort); |
| | | } |
| | | |
| | | var specification = new WmsMaterialSpecification(input.Name); |
| | | var list = await _wmsmaterialRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification, includeDetails: true); |
| | | var result = ObjectMapper.Map<List<WmsMaterial>, List<WmsMaterialDto>>(list); |
| | | |
| | | var sheets = new Dictionary<string, object> |
| | | { |
| | | ["é
ç½®"] = result.Select(x => x.GetExportData()).ToList(), |
| | | }; |
| | | |
| | | var fileName = result.Count > 1 ? "WmsMaterialå表" : result.Count == 1 ? result.First()?.MaterialCode : "WmsMaterial模ç"; |
| | | return (sheets, fileName); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Checks the create or update dto asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | protected Task CheckCreateOrUpdateDtoAsync(WmsMaterialCreateOrUpdateDtoBase input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | Check.NotNullOrWhiteSpace(input.MaterialCode, "ç¼å·", WmsMaterialConsts.MaxCodeLength); |
| | | Check.NotNullOrWhiteSpace(input.MaterialName, "åç§°", WmsMaterialConsts.MaxNameLength); |
| | | Check.Length(input.Remark, "夿³¨", WmsMaterialConsts.MaxRemarkLength); |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using CMS.Plugin.HIAWms.Domain.WmsPlaces; |
| | | using CMS.Plugin.HIAWms.Domain.Shared; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsPlaces; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.ObjectExtending; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Implements; |
| | | |
| | | /// <inheritdoc /> |
| | | public class WmsPlaceAppService : CMSPluginAppService, IWmsPlaceAppService |
| | | { |
| | | private readonly IWmsPlaceRepository _wmsplaceRepository; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsPlaceAppService"/> class. |
| | | /// </summary> |
| | | /// <param name="wmsplaceRepository">The task job repository.</param> |
| | | public WmsPlaceAppService(IWmsPlaceRepository wmsplaceRepository) |
| | | { |
| | | _wmsplaceRepository = wmsplaceRepository; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsPlaceDto> GetAsync(Guid id) |
| | | { |
| | | return ObjectMapper.Map<WmsPlace, WmsPlaceDto>(await _wmsplaceRepository.GetAsync(id)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<PagedResultDto<WmsPlaceDto>> GetListAsync(GetWmsPlacesInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsPlace.Sort); |
| | | } |
| | | |
| | | var specification = new WmsPlaceSpecification(input.Name); |
| | | var count = await _wmsplaceRepository.GetCountAsync(input.Filter, specification); |
| | | var list = await _wmsplaceRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification); |
| | | |
| | | return new PagedResultDto<WmsPlaceDto>(count, ObjectMapper.Map<List<WmsPlace>, List<WmsPlaceDto>>(list)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsPlaceDto> CreateAsync(WmsPlaceCreateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var exist = await _wmsplaceRepository.NameExistAsync(input.PlaceNo); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.PlaceNo]); |
| | | } |
| | | |
| | | var maxSort = await _wmsplaceRepository.GetMaxSortAsync(); |
| | | var sort = input.Sort ?? maxSort; |
| | | var wmsplace = new WmsPlace |
| | | { |
| | | |
| | | }; |
| | | input.MapExtraPropertiesTo(wmsplace, MappingPropertyDefinitionChecks.None); |
| | | |
| | | await _wmsplaceRepository.InsertAsync(wmsplace); |
| | | |
| | | if (input.Sort.HasValue && wmsplace.Sort != maxSort) |
| | | { |
| | | await AdjustSortAsync(wmsplace.Id, wmsplace.Sort); |
| | | } |
| | | |
| | | return ObjectMapper.Map<WmsPlace, WmsPlaceDto>(wmsplace); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsPlaceDto> UpdateAsync(Guid id, WmsPlaceUpdateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var wmsplace = await _wmsplaceRepository.GetAsync(id); |
| | | var exist = await _wmsplaceRepository.NameExistAsync(input.PlaceNo, wmsplace.Id); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.PlaceNo]); |
| | | } |
| | | |
| | | wmsplace.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp); |
| | | input.MapExtraPropertiesTo(wmsplace, MappingPropertyDefinitionChecks.None); |
| | | |
| | | wmsplace.PlaceNo = input.PlaceNo; |
| | | |
| | | await _wmsplaceRepository.UpdateAsync(wmsplace); |
| | | |
| | | return ObjectMapper.Map<WmsPlace, WmsPlaceDto>(wmsplace); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<List<WmsPlaceDto>> CloneAsync(IEnumerable<Guid> ids) |
| | | { |
| | | var wmsplaces = new List<WmsPlace>(); |
| | | if (ids != null) |
| | | { |
| | | var sort = await _wmsplaceRepository.GetMaxSortAsync(); |
| | | foreach (var id in ids) |
| | | { |
| | | var wmsplace = await _wmsplaceRepository.FindAsync(id); |
| | | if (wmsplace != null) |
| | | { |
| | | var name = wmsplace.PlaceNo + WmsPlaceConsts.CloneTag; |
| | | var notExist = false; |
| | | while (!notExist) |
| | | { |
| | | var exist = await _wmsplaceRepository.NameExistAsync(name); |
| | | if (exist || wmsplaces.Any(x => x.PlaceNo == name)) |
| | | { |
| | | name += WmsPlaceConsts.CloneTag; |
| | | continue; |
| | | } |
| | | |
| | | notExist = true; |
| | | } |
| | | |
| | | //wmsplace = await _wmsplaceRepository.InsertAsync(wmsplace.Clone(GuidGenerator.Create(), name, sort++)); |
| | | wmsplaces.Add(wmsplace); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ObjectMapper.Map<List<WmsPlace>, List<WmsPlaceDto>>(wmsplaces); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmsplaceRepository.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task DeleteManyAsync(IEnumerable<Guid> ids) |
| | | { |
| | | foreach (var id in ids) |
| | | { |
| | | await DeleteAsync(id); |
| | | } |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | var list = await _wmsplaceRepository.GetListAsync(nameof(WmsPlace.Sort)); |
| | | if (list != null && list.Any()) |
| | | { |
| | | var initSort = 1; |
| | | list.ForEach(x => x.AdjustSort(initSort++)); |
| | | var entity = list.FirstOrDefault(x => x.Id == id); |
| | | if (entity != null) |
| | | { |
| | | if (sort == 1) |
| | | { |
| | | list.Where(x => x.Id != id).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | } |
| | | else if (entity.Sort > sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort >= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort < sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | else if (entity.Sort < sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort > sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort <= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | |
| | | entity.AdjustSort(sort); |
| | | } |
| | | } |
| | | |
| | | await _wmsplaceRepository.UpdateManyAsync(list); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task ImportAsync(WmsPlacesImportModel input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | var wmsplaceCreateDtos = new List<(int RowIndex, WmsPlaceCreateDto Item)>(); |
| | | var wmsplaceUpdateDtos = new List<(int RowIndex, Guid Id, WmsPlaceUpdateDto Item)>(); |
| | | var wmsplaces = input.WmsPlaces; |
| | | |
| | | if (wmsplaces != null && wmsplaces.Any()) |
| | | { |
| | | #region 导å
¥æ ¡éª |
| | | |
| | | // 夿åç§°æ¯å¦éå¤ï¼å¹¶è¾åºç¬¬å è¡éå¤ |
| | | var duplicateWmsPlaces = wmsplaces.GroupBy(x => x.PlaceNo).Where(x => x.Count() > 1).ToList(); |
| | | if (duplicateWmsPlaces?.Any() == true) |
| | | { |
| | | var duplicateWmsPlaceMsgs = duplicateWmsPlaces.Select(x => $"第 {string.Join(",", x.Select(x => x.RowIndex))} è¡ï¼{x.Key} åç§°éå¤"); |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ {string.Join(",", duplicateWmsPlaceMsgs)}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | foreach (var wmsplace in wmsplaces) |
| | | { |
| | | if (wmsplace.PlaceNo.IsNullOrWhiteSpace()) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (wmsplace.PlaceNo.IsNullOrWhiteSpace()) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsplace.RowIndex}è¡ï¼WmsPlaceåç§°ä¸è½ä¸ºç©º"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | |
| | | var oldWmsPlace = await _wmsplaceRepository.FindByNameAsync(wmsplace.PlaceNo); |
| | | if (oldWmsPlace != null) |
| | | { |
| | | var wmsplaceUpdateDto = new WmsPlaceUpdateDto |
| | | { |
| | | PlaceNo = wmsplace.PlaceNo, |
| | | PlaceStatus = wmsplace.PlaceStatus, |
| | | Remark = wmsplace.Remark, |
| | | }; |
| | | |
| | | wmsplaceUpdateDtos.Add((wmsplace.RowIndex, oldWmsPlace.Id, wmsplaceUpdateDto)); |
| | | } |
| | | else |
| | | { |
| | | var wmsplaceCreateDto = new WmsPlaceCreateDto |
| | | { |
| | | PlaceNo = wmsplace.PlaceNo, |
| | | PlaceStatus = wmsplace.PlaceStatus, |
| | | Remark = wmsplace.Remark, |
| | | }; |
| | | |
| | | wmsplaceCreateDtos.Add((wmsplace.RowIndex, wmsplaceCreateDto)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // æ°å¢ |
| | | foreach (var wmsplaceDto in wmsplaceCreateDtos) |
| | | { |
| | | try |
| | | { |
| | | await CreateAsync(wmsplaceDto.Item); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsplaceDto.RowIndex}è¡ï¼{e.Message}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | // æ´æ° |
| | | foreach (var wmsplaceDto in wmsplaceUpdateDtos) |
| | | { |
| | | try |
| | | { |
| | | await UpdateAsync(wmsplaceDto.Id, wmsplaceDto.Item); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsplaceDto.RowIndex}è¡ï¼{e.Message}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsPlacesInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsPlace.Sort); |
| | | } |
| | | |
| | | var specification = new WmsPlaceSpecification(input.Name); |
| | | var list = await _wmsplaceRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification, includeDetails: true); |
| | | var result = ObjectMapper.Map<List<WmsPlace>, List<WmsPlaceDto>>(list); |
| | | |
| | | var sheets = new Dictionary<string, object> |
| | | { |
| | | ["é
ç½®"] = result.Select(x => x.GetExportData()).ToList(), |
| | | }; |
| | | |
| | | var fileName = result.Count > 1 ? "WmsPlaceå表" : result.Count == 1 ? result.First()?.PlaceNo : "WmsPlace模ç"; |
| | | return (sheets, fileName); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Checks the create or update dto asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | protected Task CheckCreateOrUpdateDtoAsync(WmsPlaceCreateOrUpdateDtoBase input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | Check.NotNullOrWhiteSpace(input.PlaceNo, "ç¼å·", WmsPlaceConsts.MaxCodeLength); |
| | | Check.Length(input.Remark, "夿³¨", WmsPlaceConsts.MaxRemarkLength); |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using CMS.Plugin.HIAWms.Domain.WmsStores; |
| | | using CMS.Plugin.HIAWms.Domain.Shared; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsStores; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.ObjectExtending; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Implements; |
| | | |
| | | /// <inheritdoc /> |
| | | public class WmsStoreAppService : CMSPluginAppService, IWmsStoreAppService |
| | | { |
| | | private readonly IWmsStoreRepository _wmsstoreRepository; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsStoreAppService"/> class. |
| | | /// </summary> |
| | | /// <param name="wmsstoreRepository">The task job repository.</param> |
| | | public WmsStoreAppService(IWmsStoreRepository wmsstoreRepository) |
| | | { |
| | | _wmsstoreRepository = wmsstoreRepository; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsStoreDto> GetAsync(Guid id) |
| | | { |
| | | return ObjectMapper.Map<WmsStore, WmsStoreDto>(await _wmsstoreRepository.GetAsync(id)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<PagedResultDto<WmsStoreDto>> GetListAsync(GetWmsStoresInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsStore.Sort); |
| | | } |
| | | |
| | | var specification = new WmsStoreSpecification(input.Name); |
| | | var count = await _wmsstoreRepository.GetCountAsync(input.Filter, specification); |
| | | var list = await _wmsstoreRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification); |
| | | |
| | | return new PagedResultDto<WmsStoreDto>(count, ObjectMapper.Map<List<WmsStore>, List<WmsStoreDto>>(list)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsStoreDto> CreateAsync(WmsStoreCreateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var exist = await _wmsstoreRepository.NameExistAsync(input.StoreCode); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.StoreCode]); |
| | | } |
| | | |
| | | var maxSort = await _wmsstoreRepository.GetMaxSortAsync(); |
| | | var sort = input.Sort ?? maxSort; |
| | | var wmsstore = new WmsStore |
| | | { |
| | | |
| | | }; |
| | | input.MapExtraPropertiesTo(wmsstore, MappingPropertyDefinitionChecks.None); |
| | | |
| | | await _wmsstoreRepository.InsertAsync(wmsstore); |
| | | |
| | | if (input.Sort.HasValue && wmsstore.Sort != maxSort) |
| | | { |
| | | await AdjustSortAsync(wmsstore.Id, wmsstore.Sort); |
| | | } |
| | | |
| | | return ObjectMapper.Map<WmsStore, WmsStoreDto>(wmsstore); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsStoreDto> UpdateAsync(Guid id, WmsStoreUpdateDto input) |
| | | { |
| | | await CheckCreateOrUpdateDtoAsync(input); |
| | | |
| | | var wmsstore = await _wmsstoreRepository.GetAsync(id); |
| | | var exist = await _wmsstoreRepository.NameExistAsync(input.StoreCode, wmsstore.Id); |
| | | if (exist) |
| | | { |
| | | throw new UserFriendlyException(L[CMSPluginDomainErrorCodes.NameAlreadyExists, input.StoreCode]); |
| | | } |
| | | |
| | | wmsstore.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp); |
| | | input.MapExtraPropertiesTo(wmsstore, MappingPropertyDefinitionChecks.None); |
| | | |
| | | wmsstore.StoreCode = input.StoreCode; |
| | | |
| | | await _wmsstoreRepository.UpdateAsync(wmsstore); |
| | | |
| | | return ObjectMapper.Map<WmsStore, WmsStoreDto>(wmsstore); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<List<WmsStoreDto>> CloneAsync(IEnumerable<Guid> ids) |
| | | { |
| | | var wmsstores = new List<WmsStore>(); |
| | | if (ids != null) |
| | | { |
| | | var sort = await _wmsstoreRepository.GetMaxSortAsync(); |
| | | foreach (var id in ids) |
| | | { |
| | | var wmsstore = await _wmsstoreRepository.FindAsync(id); |
| | | if (wmsstore != null) |
| | | { |
| | | var name = wmsstore.StoreName + WmsStoreConsts.CloneTag; |
| | | var notExist = false; |
| | | while (!notExist) |
| | | { |
| | | var exist = await _wmsstoreRepository.NameExistAsync(name); |
| | | if (exist || wmsstores.Any(x => x.StoreCode == name)) |
| | | { |
| | | name += WmsStoreConsts.CloneTag; |
| | | continue; |
| | | } |
| | | |
| | | notExist = true; |
| | | } |
| | | |
| | | //wmsstore = await _wmsstoreRepository.InsertAsync(wmsstore.Clone(GuidGenerator.Create(), name, sort++)); |
| | | wmsstores.Add(wmsstore); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ObjectMapper.Map<List<WmsStore>, List<WmsStoreDto>>(wmsstores); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmsstoreRepository.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task DeleteManyAsync(IEnumerable<Guid> ids) |
| | | { |
| | | foreach (var id in ids) |
| | | { |
| | | await DeleteAsync(id); |
| | | } |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | var list = await _wmsstoreRepository.GetListAsync(nameof(WmsStore.Sort)); |
| | | if (list != null && list.Any()) |
| | | { |
| | | var initSort = 1; |
| | | list.ForEach(x => x.AdjustSort(initSort++)); |
| | | var entity = list.FirstOrDefault(x => x.Id == id); |
| | | if (entity != null) |
| | | { |
| | | if (sort == 1) |
| | | { |
| | | list.Where(x => x.Id != id).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | } |
| | | else if (entity.Sort > sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort >= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort < sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | else if (entity.Sort < sort) |
| | | { |
| | | list.Where(x => x.Id != id && x.Sort > sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort + 1)); |
| | | list.Where(x => x.Id != id && x.Sort <= sort).ToList()?.ForEach(x => x.AdjustSort(x.Sort - 1)); |
| | | } |
| | | |
| | | entity.AdjustSort(sort); |
| | | } |
| | | } |
| | | |
| | | await _wmsstoreRepository.UpdateManyAsync(list); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task ImportAsync(WmsStoresImportModel input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | var wmsstoreCreateDtos = new List<(int RowIndex, WmsStoreCreateDto Item)>(); |
| | | var wmsstoreUpdateDtos = new List<(int RowIndex, Guid Id, WmsStoreUpdateDto Item)>(); |
| | | var wmsstores = input.WmsStores; |
| | | |
| | | if (wmsstores != null && wmsstores.Any()) |
| | | { |
| | | #region 导å
¥æ ¡éª |
| | | |
| | | // 夿åç§°æ¯å¦éå¤ï¼å¹¶è¾åºç¬¬å è¡éå¤ |
| | | var duplicateWmsStores = wmsstores.GroupBy(x => x.StoreCode).Where(x => x.Count() > 1).ToList(); |
| | | if (duplicateWmsStores?.Any() == true) |
| | | { |
| | | var duplicateWmsStoreMsgs = duplicateWmsStores.Select(x => $"第 {string.Join(",", x.Select(x => x.RowIndex))} è¡ï¼{x.Key} åç§°éå¤"); |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ {string.Join(",", duplicateWmsStoreMsgs)}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | foreach (var wmsstore in wmsstores) |
| | | { |
| | | if (wmsstore.StoreCode.IsNullOrWhiteSpace() && wmsstore.StoreName.IsNullOrWhiteSpace()) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | if (wmsstore.StoreCode.IsNullOrWhiteSpace()) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsstore.RowIndex}è¡ï¼WmsStoreåç§°ä¸è½ä¸ºç©º"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | |
| | | var oldWmsStore = await _wmsstoreRepository.FindByNameAsync(wmsstore.StoreCode); |
| | | if (oldWmsStore != null) |
| | | { |
| | | var wmsstoreUpdateDto = new WmsStoreUpdateDto |
| | | { |
| | | StoreCode = wmsstore.StoreCode, |
| | | StoreName = wmsstore.StoreName, |
| | | Remark = wmsstore.Remark, |
| | | }; |
| | | |
| | | wmsstoreUpdateDtos.Add((wmsstore.RowIndex, oldWmsStore.Id, wmsstoreUpdateDto)); |
| | | } |
| | | else |
| | | { |
| | | var wmsstoreCreateDto = new WmsStoreCreateDto |
| | | { |
| | | StoreCode = wmsstore.StoreCode, |
| | | StoreName = wmsstore.StoreName, |
| | | Remark = wmsstore.Remark, |
| | | }; |
| | | |
| | | wmsstoreCreateDtos.Add((wmsstore.RowIndex, wmsstoreCreateDto)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // æ°å¢ |
| | | foreach (var wmsstoreDto in wmsstoreCreateDtos) |
| | | { |
| | | try |
| | | { |
| | | await CreateAsync(wmsstoreDto.Item); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsstoreDto.RowIndex}è¡ï¼{e.Message}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | // æ´æ° |
| | | foreach (var wmsstoreDto in wmsstoreUpdateDtos) |
| | | { |
| | | try |
| | | { |
| | | await UpdateAsync(wmsstoreDto.Id, wmsstoreDto.Item); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | var errorMsg = $"导å
¥å¤±è´¥ï¼é
ç½®ï¼ç¬¬{wmsstoreDto.RowIndex}è¡ï¼{e.Message}ï¼ç»æ¢å¯¼å
¥"; |
| | | throw new UserFriendlyException(errorMsg); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsStoresInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | | if (input.Sorting.IsNullOrWhiteSpace()) |
| | | { |
| | | input.Sorting = nameof(WmsStore.Sort); |
| | | } |
| | | |
| | | var specification = new WmsStoreSpecification(input.Name); |
| | | var list = await _wmsstoreRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification, includeDetails: true); |
| | | var result = ObjectMapper.Map<List<WmsStore>, List<WmsStoreDto>>(list); |
| | | |
| | | var sheets = new Dictionary<string, object> |
| | | { |
| | | ["é
ç½®"] = result.Select(x => x.GetExportData()).ToList(), |
| | | }; |
| | | |
| | | var fileName = result.Count > 1 ? "WmsStoreå表" : result.Count == 1 ? result.First()?.StoreCode : "WmsStore模ç"; |
| | | return (sheets, fileName); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Checks the create or update dto asynchronous. |
| | | /// </summary> |
| | | /// <param name="input">The input.</param> |
| | | protected Task CheckCreateOrUpdateDtoAsync(WmsStoreCreateOrUpdateDtoBase input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | Check.NotNullOrWhiteSpace(input.StoreCode, "ç¼å·", WmsStoreConsts.MaxCodeLength); |
| | | Check.NotNullOrWhiteSpace(input.StoreName, "åç§°", WmsStoreConsts.MaxNameLength); |
| | | Check.Length(input.Remark, "夿³¨", WmsStoreConsts.MaxRemarkLength); |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas; |
| | | using CMS.Plugin.HIAWms.Domain.WmsAreas; |
| | | using Volo.Abp.ObjectExtending; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.MapperProfiles; |
| | | |
| | | /// <summary> |
| | | /// AutoMapperé
ç½® |
| | | /// </summary> |
| | | /// <seealso cref="AutoMapper.Profile" /> |
| | | public class WmsAreaAutoMapperProfile : Profile |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsAreaAutoMapperProfile"/> class. |
| | | /// </summary> |
| | | public WmsAreaAutoMapperProfile() |
| | | { |
| | | /* You can configure your AutoMapper mapping configuration here. |
| | | * Alternatively, you can split your mapping configurations |
| | | * into multiple profile classes for a better organization. */ |
| | | CreateMap<WmsArea, WmsAreaDto>(MemberList.None).MapExtraProperties(MappingPropertyDefinitionChecks.None); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainers; |
| | | using Volo.Abp.ObjectExtending; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.MapperProfiles; |
| | | |
| | | /// <summary> |
| | | /// AutoMapperé
ç½® |
| | | /// </summary> |
| | | /// <seealso cref="AutoMapper.Profile" /> |
| | | public class WmsContainerAutoMapperProfile : Profile |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainerAutoMapperProfile"/> class. |
| | | /// </summary> |
| | | public WmsContainerAutoMapperProfile() |
| | | { |
| | | /* You can configure your AutoMapper mapping configuration here. |
| | | * Alternatively, you can split your mapping configurations |
| | | * into multiple profile classes for a better organization. */ |
| | | CreateMap<WmsContainer, WmsContainerDto>(MemberList.None).MapExtraProperties(MappingPropertyDefinitionChecks.None); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterials; |
| | | using CMS.Plugin.HIAWms.Domain.WmsMaterials; |
| | | using Volo.Abp.ObjectExtending; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.MapperProfiles; |
| | | |
| | | /// <summary> |
| | | /// AutoMapperé
ç½® |
| | | /// </summary> |
| | | /// <seealso cref="AutoMapper.Profile" /> |
| | | public class WmsMaterialAutoMapperProfile : Profile |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsMaterialAutoMapperProfile"/> class. |
| | | /// </summary> |
| | | public WmsMaterialAutoMapperProfile() |
| | | { |
| | | /* You can configure your AutoMapper mapping configuration here. |
| | | * Alternatively, you can split your mapping configurations |
| | | * into multiple profile classes for a better organization. */ |
| | | CreateMap<WmsMaterial, WmsMaterialDto>(MemberList.None).MapExtraProperties(MappingPropertyDefinitionChecks.None); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces; |
| | | using CMS.Plugin.HIAWms.Domain.WmsPlaces; |
| | | using Volo.Abp.ObjectExtending; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.MapperProfiles; |
| | | |
| | | /// <summary> |
| | | /// AutoMapperé
ç½® |
| | | /// </summary> |
| | | /// <seealso cref="AutoMapper.Profile" /> |
| | | public class WmsPlaceAutoMapperProfile : Profile |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsPlaceAutoMapperProfile"/> class. |
| | | /// </summary> |
| | | public WmsPlaceAutoMapperProfile() |
| | | { |
| | | /* You can configure your AutoMapper mapping configuration here. |
| | | * Alternatively, you can split your mapping configurations |
| | | * into multiple profile classes for a better organization. */ |
| | | CreateMap<WmsPlace, WmsPlaceDto>(MemberList.None).MapExtraProperties(MappingPropertyDefinitionChecks.None); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores; |
| | | using CMS.Plugin.HIAWms.Domain.WmsStores; |
| | | using Volo.Abp.ObjectExtending; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.MapperProfiles; |
| | | |
| | | /// <summary> |
| | | /// AutoMapperé
ç½® |
| | | /// </summary> |
| | | /// <seealso cref="AutoMapper.Profile" /> |
| | | public class WmsStoreAutoMapperProfile : Profile |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsStoreAutoMapperProfile"/> class. |
| | | /// </summary> |
| | | public WmsStoreAutoMapperProfile() |
| | | { |
| | | /* You can configure your AutoMapper mapping configuration here. |
| | | * Alternatively, you can split your mapping configurations |
| | | * into multiple profile classes for a better organization. */ |
| | | CreateMap<WmsStore, WmsStoreDto>(MemberList.None).MapExtraProperties(MappingPropertyDefinitionChecks.None); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Runtime.CompilerServices; |
| | | [assembly:InternalsVisibleToAttribute("CMS.Plugin.Application.Tests")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <Import Project="../../common.props" /> |
| | | <Import Project="../../configureawait.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> |
| | | <GenerateDocumentationFile>True</GenerateDocumentationFile> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="KissUtil" Version="1.0.1" /> |
| | | <PackageReference Include="Volo.Abp.Localization" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Volo.Abp.Validation" Version="$(ABPPackageVersion)" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <EmbeddedResource Include="Localization\HIAWms\*.json" /> |
| | | <Content Remove="Localization\HIAWms\*.json" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" /> |
| | | <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.20" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared; |
| | | |
| | | /// <summary> |
| | | /// é误ç¼ç å®ä¹ |
| | | /// </summary> |
| | | public static class CMSPluginDomainErrorCodes |
| | | { |
| | | /// <summary> |
| | | /// The prefix |
| | | /// </summary> |
| | | private const string Prefix = "CMS.Plugin.HIAWms:"; |
| | | |
| | | /* You can add your business exception error codes here, as constants */ |
| | | |
| | | public const string NameAlreadyExists = Prefix + nameof(NameAlreadyExists); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Localization; |
| | | using Volo.Abp.Localization; |
| | | using Volo.Abp.Modularity; |
| | | using Volo.Abp.Validation; |
| | | using Volo.Abp.Validation.Localization; |
| | | using Volo.Abp.VirtualFileSystem; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared; |
| | | |
| | | /// <summary> |
| | | /// é¢åå
±äº«æ¨¡å |
| | | /// </summary> |
| | | [DependsOn(typeof(AbpLocalizationModule), |
| | | typeof(AbpValidationModule))] |
| | | public class CMSPluginDomainSharedModule : AbpModule |
| | | { |
| | | /// <inheritdoc /> |
| | | public override void PreConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | CMSPluginModuleExtensionConfigurator.Configure(); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override void ConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | Configure<AbpVirtualFileSystemOptions>(options => |
| | | { |
| | | options.FileSets.AddEmbedded<CMSPluginDomainSharedModule>(); |
| | | }); |
| | | |
| | | Configure<AbpLocalizationOptions>(options => |
| | | { |
| | | options.Resources |
| | | .Add<HIAWmsResource>("en") |
| | | .AddBaseTypes(typeof(AbpValidationResource)) |
| | | .AddVirtualJson("/Localization/HIAWms"); |
| | | |
| | | options.DefaultResourceType = typeof(HIAWmsResource); |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Threading; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared; |
| | | |
| | | /// <summary> |
| | | /// æ¨¡åæ©å±é
ç½®å¨ |
| | | /// </summary> |
| | | public static class CMSPluginModuleExtensionConfigurator |
| | | { |
| | | private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
| | | |
| | | /// <summary> |
| | | /// Configures this instance. |
| | | /// </summary> |
| | | public static void Configure() |
| | | { |
| | | OneTimeRunner.Run(() => |
| | | { |
| | | ConfigureExistingProperties(); |
| | | ConfigureExtraProperties(); |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Configures the existing properties. |
| | | /// </summary> |
| | | private static void ConfigureExistingProperties() |
| | | { |
| | | /* You can change max lengths for properties of the |
| | | * entities defined in the modules used by your application. |
| | | * |
| | | * Example: Change user and role name max lengths |
| | | |
| | | IdentityUserConsts.MaxNameLength = 99; |
| | | IdentityRoleConsts.MaxNameLength = 99; |
| | | |
| | | * Notice: It is not suggested to change property lengths |
| | | * unless you really need it. Go with the standard values wherever possible. |
| | | * |
| | | * If you are using EF Core, you will need to run the add-migration command after your changes. |
| | | */ |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Configures the extra properties. |
| | | /// </summary> |
| | | private static void ConfigureExtraProperties() |
| | | { |
| | | /* You can configure extra properties for the |
| | | * entities defined in the modules used by your application. |
| | | * |
| | | * This class can be used to define these extra properties |
| | | * with a high level, easy to use API. |
| | | * |
| | | * Example: Add a new property to the user entity of the identity module |
| | | |
| | | ObjectExtensionManager.Instance.Modules() |
| | | .ConfigureIdentity(identity => |
| | | { |
| | | identity.ConfigureUser(user => |
| | | { |
| | | user.AddOrUpdateProperty<string>( //property type: string |
| | | "SocialSecurityNumber", //property name |
| | | property => |
| | | { |
| | | //validation rules |
| | | property.Attributes.Add(new RequiredAttribute()); |
| | | property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4}); |
| | | |
| | | property.Configuration[IdentityModuleExtensionConsts.ConfigurationNames.AllowUserToEdit] = true; |
| | | |
| | | //...other configurations for this property |
| | | } |
| | | ); |
| | | }); |
| | | }); |
| | | |
| | | * See the documentation for more: |
| | | * https://docs.abp.io/en/abp/latest/Module-Entity-Extensions |
| | | */ |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// åºåºç¶æ |
| | | /// </summary> |
| | | [Description("åºåºç¶æ")] |
| | | public enum AreaStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æ£å¸¸ |
| | | /// </summary> |
| | | [Description("æ£å¸¸")] |
| | | ZHEGNCHANGSHIYONG = 1, |
| | | |
| | | /// <summary> |
| | | /// åç¨ |
| | | /// </summary> |
| | | [Description("åç¨")] |
| | | TINGYONG = 2 |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | |
| | | /// <summary> |
| | | /// åºåºç±»å |
| | | /// </summary> |
| | | [Description("åºåºç±»å")] |
| | | public enum AreaTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// ç«ä½åº |
| | | /// </summary> |
| | | [Description("ç«ä½åº")] |
| | | LITIKU = 1, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | |
| | | /// <summary> |
| | | /// æçç¶æ |
| | | /// </summary> |
| | | [Description("æçç¶æ")] |
| | | public enum ContainerStatusEnum |
| | | { |
| | | |
| | | /// <summary> |
| | | /// ç©ºé² |
| | | /// </summary> |
| | | [Description("空é²")] |
| | | KOUXIAN = 1, |
| | | |
| | | /// <summary> |
| | | /// ç»ç |
| | | /// </summary> |
| | | [Description("ç»ç")] |
| | | ZUPANG = 2, |
| | | |
| | | /// <summary> |
| | | /// åºä½ |
| | | /// </summary> |
| | | [Description("åºä½")] |
| | | KUWEI = 3, |
| | | |
| | | /// <summary> |
| | | /// èæåºä½ |
| | | /// </summary> |
| | | [Description("èæåºä½")] |
| | | XUNIKUWEI = 4, |
| | | |
| | | /// <summary> |
| | | /// ç»æ |
| | | /// </summary> |
| | | [Description("ç»æ")] |
| | | ZUTUO = 5, |
| | | |
| | | /// <summary> |
| | | /// å¼å¸¸ |
| | | /// </summary> |
| | | [Description("å¼å¸¸")] |
| | | EXCEPTION = 9, |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// æçç±»å |
| | | /// </summary> |
| | | [Description("æçç±»å")] |
| | | public enum ContainerTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// èªå¶ä»¶æç |
| | | /// </summary> |
| | | [Description("èªå¶ä»¶æç")] |
| | | ZIZHIJIAN = 1, |
| | | |
| | | /// <summary> |
| | | /// å¤åä»¶æç |
| | | /// </summary> |
| | | [Description("å¤åä»¶æç")] |
| | | WAIXIEJIAN = 2, |
| | | |
| | | /// <summary> |
| | | /// èææç |
| | | /// </summary> |
| | | [Description("èææç")] |
| | | XUNI = 3, |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.ComponentModel; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// HIAWmsç¶æ |
| | | /// </summary> |
| | | public enum HIAWmsStatus : byte |
| | | { |
| | | /// <summary> |
| | | /// æªæ§è¡ |
| | | /// </summary> |
| | | [Description("æªæ§è¡")] |
| | | Initial = 0, |
| | | |
| | | /// <summary> |
| | | /// æ§è¡ä¸ |
| | | /// </summary> |
| | | [Description("æ§è¡ä¸")] |
| | | Excuting = 1, |
| | | |
| | | /// <summary> |
| | | /// 已宿 |
| | | /// </summary> |
| | | [Description("已宿")] |
| | | Completed = 4, |
| | | |
| | | /// <summary> |
| | | /// 已强å¶å®æ |
| | | /// </summary> |
| | | [Description("已宿")] |
| | | Finished = 5, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// ç©æç±»å |
| | | /// </summary> |
| | | [Description("ç©æç±»å")] |
| | | public enum MaterialTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// æå |
| | | /// </summary> |
| | | [Description(" æå")] |
| | | FinishedGoods =1, |
| | | |
| | | /// <summary> |
| | | /// åæå |
| | | /// </summary> |
| | | [Description("åæå")] |
| | | SemiFinishedGoods =2, |
| | | |
| | | /// <summary> |
| | | /// åææ |
| | | /// </summary> |
| | | [Description("åææ")] |
| | | RawMaterials =3, |
| | | |
| | | /// <summary> |
| | | /// éä»¶ |
| | | /// </summary> |
| | | [Description(" éä»¶")] |
| | | Attachments =4 |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// åºä½ç¶æ |
| | | /// </summary> |
| | | [Description("åºä½ç¶æ")] |
| | | public enum PlaceStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// ç©ºé² |
| | | /// </summary> |
| | | [Description("空é²")] |
| | | KONGXIAN = 1, |
| | | /// <summary> |
| | | /// å¾
å
¥ |
| | | /// </summary> |
| | | [Description("å¾
å
¥")] |
| | | DAIRU = 2, |
| | | /// <summary> |
| | | /// åè´§ |
| | | /// </summary> |
| | | [Description("åè´§")] |
| | | CUNHUO = 3, |
| | | /// <summary> |
| | | /// å¾
åº |
| | | /// </summary> |
| | | [Description("å¾
åº")] |
| | | DAICHU = 4, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// åºä½ç±»å |
| | | /// </summary> |
| | | [Description("åºä½ç±»å")] |
| | | public enum PlaceTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// åæåºä½ |
| | | /// </summary> |
| | | [Description("åæåºä½")] |
| | | YUANLIAOKUWEI = 1, |
| | | |
| | | [Description("èæåºä½")] |
| | | XUNIKUWEI = 2, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// éè´ç±»å |
| | | /// </summary> |
| | | [Description("éè´ç±»å")] |
| | | public enum PurchaseTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// /èªå¶ |
| | | /// </summary> |
| | | [Description("Self-made - èªå¶")] |
| | | SelfMade, |
| | | |
| | | /// <summary> |
| | | /// éè´ |
| | | /// </summary> |
| | | [Description("Purchased - éè´")] |
| | | Purchased, |
| | | |
| | | /// <summary> |
| | | /// åå¯ |
| | | /// </summary> |
| | | [Description("Both - åå¯")] |
| | | Both |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Enums |
| | | { |
| | | /// <summary> |
| | | /// æ¯å¦éå® |
| | | /// </summary> |
| | | [Description("æ¯å¦éå®")] |
| | | public enum YesNoEnum |
| | | { |
| | | /// <summary> |
| | | /// æ¯ |
| | | /// </summary> |
| | | [Description("æ¯")] |
| | | Y = 1, |
| | | |
| | | /// <summary> |
| | | /// å¦ |
| | | /// </summary> |
| | | [Description("å¦")] |
| | | N = 2 |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
| | | <ConfigureAwait ContinueOnCapturedContext="false" /> |
| | | </Weavers> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "culture": "en", |
| | | "texts": { |
| | | "DisplayName:SCMS.AppSettings.HIAWms.PluginState": "HIAWms plugin state", |
| | | "CMS.Plugin.HIAWms:NameAlreadyExists": "The '{0}' name already exists, please re-enter it !" |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "culture": "zh-Hans", |
| | | "texts": { |
| | | "DisplayName:SCMS.AppSettings.HIAWms.PluginState": "HIAWms æä»¶ç¶æ", |
| | | "CMS.Plugin.HIAWms:NameAlreadyExists": "该'{0}'åç§°å·²åå¨ï¼è¯·éæ°è¾å
¥ï¼" |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Localization; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.Localization; |
| | | |
| | | /// <summary> |
| | | /// HIAWmsæ¬å°åèµæº |
| | | /// </summary> |
| | | [LocalizationResourceName("HIAWms")] |
| | | public class HIAWmsResource |
| | | { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.WmsAreas; |
| | | |
| | | /// <summary> |
| | | /// WmsArea常éå®ä¹ |
| | | /// </summary> |
| | | public static class WmsAreaConsts |
| | | { |
| | | public const string CloneTag = "_坿¬"; |
| | | public static int MaxCodeLength { get; set; } = 64; |
| | | public static int MaxNameLength { get; set; } = 64; |
| | | public static int MaxRemarkLength { get; set; } = 256; |
| | | |
| | | public static int MaxAreaNoLength = 50; |
| | | |
| | | public static int MaxAreaNameLength = 100; |
| | | |
| | | public static int MaxAreaDescLength = 200; |
| | | |
| | | public static int MaxRedundantFieldLength = 100; |
| | | |
| | | public static int MaxStoreCodeLength = 50; |
| | | |
| | | public static int MaxStoreNameLength = 100; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.WmsAreas; |
| | | |
| | | /// <summary> |
| | | /// WmsAreaäºä»¶åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | [Serializable] |
| | | public class WmsAreaEto |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsAreaEto"/> class. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | public WmsAreaEto(string name) |
| | | { |
| | | Name = name; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// </summary> |
| | | public string Name { get; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.WmsContainers; |
| | | |
| | | /// <summary> |
| | | /// WmsContainer常éå®ä¹ |
| | | /// </summary> |
| | | public static class WmsContainerConsts |
| | | { |
| | | public const string CloneTag = "_坿¬"; |
| | | public static int MaxCodeLength { get; set; } = 64; |
| | | public static int MaxNameLength { get; set; } = 64; |
| | | public static int MaxRemarkLength { get; set; } = 256; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.WmsContainers; |
| | | |
| | | /// <summary> |
| | | /// WmsContaineräºä»¶åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | [Serializable] |
| | | public class WmsContainerEto |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainerEto"/> class. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | public WmsContainerEto(string name) |
| | | { |
| | | Name = name; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// </summary> |
| | | public string Name { get; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.WmsMaterials; |
| | | |
| | | /// <summary> |
| | | /// WmsMaterial常éå®ä¹ |
| | | /// </summary> |
| | | public static class WmsMaterialConsts |
| | | { |
| | | public const string CloneTag = "_坿¬"; |
| | | public static int MaxCodeLength { get; set; } = 64; |
| | | public static int MaxNameLength { get; set; } = 64; |
| | | public static int MaxRemarkLength { get; set; } = 256; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.WmsMaterials; |
| | | |
| | | /// <summary> |
| | | /// WmsMaterialäºä»¶åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | [Serializable] |
| | | public class WmsMaterialEto |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsMaterialEto"/> class. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | public WmsMaterialEto(string name) |
| | | { |
| | | Name = name; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// </summary> |
| | | public string Name { get; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.WmsPlaces; |
| | | |
| | | /// <summary> |
| | | /// WmsPlace常éå®ä¹ |
| | | /// </summary> |
| | | public static class WmsPlaceConsts |
| | | { |
| | | public const string CloneTag = "_坿¬"; |
| | | public static int MaxCodeLength { get; set; } = 64; |
| | | public static int MaxNameLength { get; set; } = 64; |
| | | public static int MaxRemarkLength { get; set; } = 256; |
| | | |
| | | public const int MaxPlaceNoLength = 50; |
| | | |
| | | public const int MaxAreaCodeLength = 50; |
| | | |
| | | public const int MaxRedundantFieldLength = 100; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.WmsPlaces; |
| | | |
| | | /// <summary> |
| | | /// WmsPlaceäºä»¶åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | [Serializable] |
| | | public class WmsPlaceEto |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsPlaceEto"/> class. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | public WmsPlaceEto(string name) |
| | | { |
| | | Name = name; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// </summary> |
| | | public string Name { get; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.WmsStores; |
| | | |
| | | /// <summary> |
| | | /// WmsStore常éå®ä¹ |
| | | /// </summary> |
| | | public static class WmsStoreConsts |
| | | { |
| | | public const string CloneTag = "_坿¬"; |
| | | public static int MaxCodeLength { get; set; } = 64; |
| | | public static int MaxNameLength { get; set; } = 64; |
| | | public static int MaxRemarkLength { get; set; } = 256; |
| | | |
| | | public const int MaxStoreCodeLength = 50; |
| | | |
| | | public const int MaxStoreNameLength = 100; |
| | | |
| | | public const int MaxRedundantFieldLength = 100; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Shared.WmsStores; |
| | | |
| | | /// <summary> |
| | | /// WmsStoreäºä»¶åæ°å¯¹è±¡ |
| | | /// </summary> |
| | | [Serializable] |
| | | public class WmsStoreEto |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsStoreEto"/> class. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | public WmsStoreEto(string name) |
| | | { |
| | | Name = name; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// </summary> |
| | | public string Name { get; } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <Import Project="../../common.props" /> |
| | | <Import Project="../../configureawait.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Volo.Abp.Ddd.Domain" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Volo.Abp.Settings" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Volo.Abp.Caching" Version="$(ABPPackageVersion)" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.Abstractions\CMS.Plugin.HIAWms.Abstractions.csproj" /> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.Domain.Shared\CMS.Plugin.HIAWms.Domain.Shared.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain; |
| | | |
| | | /// <summary> |
| | | /// æ°æ®åºå±æ§å®ä¹ |
| | | /// </summary> |
| | | public static class CMSPluginDbProperties |
| | | { |
| | | /// <summary> |
| | | /// Gets or sets the database table prefix. |
| | | /// </summary> |
| | | public static string DbTablePrefix { get; set; } = "SCMS"; |
| | | |
| | | /// <summary> |
| | | /// Gets or sets the database schema. |
| | | /// </summary> |
| | | public static string DbSchema { get; set; } |
| | | |
| | | /// <summary> |
| | | /// The connection string name |
| | | /// </summary> |
| | | public const string ConnectionStringName = "HIAWms"; |
| | | |
| | | /// <summary> |
| | | /// The migrations history table |
| | | /// </summary> |
| | | public const string MigrationsHistoryTable = "__EFMigrationsHistoryForHIAWms"; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared; |
| | | using Volo.Abp.Caching; |
| | | using Volo.Abp.Domain; |
| | | using Volo.Abp.Modularity; |
| | | using Volo.Abp.Settings; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain; |
| | | |
| | | /// <summary> |
| | | /// é¢å模å |
| | | /// </summary> |
| | | [DependsOn( |
| | | typeof(CMSPluginDomainSharedModule), |
| | | typeof(AbpSettingsModule), |
| | | typeof(AbpDddDomainModule), |
| | | typeof(AbpCachingModule) |
| | | )] |
| | | public class CMSPluginDomainModule : AbpModule |
| | | { |
| | | /// <inheritdoc /> |
| | | public override void ConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.Extensions.Logging; |
| | | using System.Diagnostics; |
| | | using System.Runtime.InteropServices; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.DependencyInjection; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Data; |
| | | |
| | | /// <summary> |
| | | /// æ°æ®åºè¿ç§»æå¡ |
| | | /// </summary> |
| | | public class CMSPluginDbMigrationService : ITransientDependency |
| | | { |
| | | private readonly IDataSeeder _dataSeeder; |
| | | private readonly IEnumerable<ICMSPluginDbSchemaMigrator> _dbSchemaMigrators; |
| | | private readonly ILogger<CMSPluginDbMigrationService> _logger; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="CMSPluginDbMigrationService"/> class. |
| | | /// </summary> |
| | | /// <param name="dataSeeder">The data seeder.</param> |
| | | /// <param name="dbSchemaMigrators">The database schema migrators.</param> |
| | | /// <param name="logger">The logger.</param> |
| | | public CMSPluginDbMigrationService(IDataSeeder dataSeeder, |
| | | IEnumerable<ICMSPluginDbSchemaMigrator> dbSchemaMigrators, ILogger<CMSPluginDbMigrationService> logger) |
| | | { |
| | | _dataSeeder = dataSeeder; |
| | | _dbSchemaMigrators = dbSchemaMigrators; |
| | | _logger = logger; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Migrates the asynchronous. |
| | | /// </summary> |
| | | public async Task MigrateAsync() |
| | | { |
| | | var initialMigrationAdded = AddInitialMigrationIfNotExist(); |
| | | |
| | | if (initialMigrationAdded) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | _logger.LogDebug("Started database migrations..."); |
| | | |
| | | await MigrateDatabaseSchemaAsync(); |
| | | await SeedDataAsync(); |
| | | |
| | | _logger.LogDebug($"Successfully completed host database migrations."); |
| | | _logger.LogDebug("You can safely end this process..."); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Migrates the database schema asynchronous. |
| | | /// </summary> |
| | | private async Task MigrateDatabaseSchemaAsync() |
| | | { |
| | | _logger.LogDebug($"Migrating schema for database..."); |
| | | |
| | | foreach (var migrator in _dbSchemaMigrators) |
| | | { |
| | | await migrator.MigrateAsync(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Seeds the data asynchronous. |
| | | /// </summary> |
| | | private async Task SeedDataAsync() |
| | | { |
| | | _logger.LogDebug($"Executing database seed..."); |
| | | |
| | | await _dataSeeder.SeedAsync(new DataSeedContext().WithProperty(CMSPluginDbProperties.ConnectionStringName, CMSPluginDbProperties.ConnectionStringName)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Adds the initial migration if not exist. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private bool AddInitialMigrationIfNotExist() |
| | | { |
| | | try |
| | | { |
| | | if (!DbMigrationsProjectExists()) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | catch (Exception) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | try |
| | | { |
| | | if (!MigrationsFolderExists()) |
| | | { |
| | | AddInitialMigration(); |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | _logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Databases the migrations project exists. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private bool DbMigrationsProjectExists() |
| | | { |
| | | var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath(); |
| | | |
| | | return dbMigrationsProjectFolder != null; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Migrationses the folder exists. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private bool MigrationsFolderExists() |
| | | { |
| | | var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath(); |
| | | |
| | | return Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "Migrations")); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Adds the initial migration. |
| | | /// </summary> |
| | | /// <exception cref="System.Exception">Couldn't run ABP CLI...</exception> |
| | | private void AddInitialMigration() |
| | | { |
| | | _logger.LogDebug("Creating initial migration..."); |
| | | |
| | | string argumentPrefix; |
| | | string fileName; |
| | | |
| | | if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) |
| | | { |
| | | argumentPrefix = "-c"; |
| | | fileName = "/bin/bash"; |
| | | } |
| | | else |
| | | { |
| | | argumentPrefix = "/C"; |
| | | fileName = "cmd.exe"; |
| | | } |
| | | |
| | | var procStartInfo = new ProcessStartInfo(fileName, |
| | | $"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetEntityFrameworkCoreProjectFolderPath()}\"\"" |
| | | ); |
| | | |
| | | try |
| | | { |
| | | Process.Start(procStartInfo); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | throw new Exception("Couldn't run ABP CLI..."); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Gets the entity framework core project folder path. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | /// <exception cref="System.Exception">Solution folder not found!</exception> |
| | | private string GetEntityFrameworkCoreProjectFolderPath() |
| | | { |
| | | var slnDirectoryPath = GetSolutionDirectoryPath(); |
| | | |
| | | if (slnDirectoryPath == null) |
| | | { |
| | | throw new Exception("Solution folder not found!"); |
| | | } |
| | | |
| | | var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src"); |
| | | |
| | | return Directory.GetDirectories(srcDirectoryPath) |
| | | .FirstOrDefault(d => d.EndsWith(".EntityFrameworkCore")); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Gets the solution directory path. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private string GetSolutionDirectoryPath() |
| | | { |
| | | var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); |
| | | |
| | | while (Directory.GetParent(currentDirectory.FullName) != null) |
| | | { |
| | | currentDirectory = Directory.GetParent(currentDirectory.FullName); |
| | | |
| | | if (Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null) |
| | | { |
| | | return currentDirectory.FullName; |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Data; |
| | | using Volo.Abp.DependencyInjection; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Data; |
| | | |
| | | /// <summary> |
| | | /// Dapperä»å¨ |
| | | /// </summary> |
| | | public interface ICMSPluginDapperRepository : ITransientDependency |
| | | { |
| | | /// <summary> |
| | | /// Gets the database connection asynchronous. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<IDbConnection> GetDbConnectionAsync(); |
| | | |
| | | /// <summary> |
| | | /// Gets the database transaction asynchronous. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<IDbTransaction> GetDbTransactionAsync(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Domain.Data; |
| | | |
| | | /// <summary> |
| | | /// æ°æ®åºæ¶æè¿ç§»å¨ |
| | | /// </summary> |
| | | public interface ICMSPluginDbSchemaMigrator |
| | | { |
| | | /// <summary> |
| | | /// Migrates the asynchronous. |
| | | /// </summary> |
| | | Task MigrateAsync(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.DependencyInjection; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Data; |
| | | |
| | | /// <summary> |
| | | /// This is used if database provider does't define |
| | | /// ICMSDbSchemaMigrator implementation. |
| | | /// </summary> |
| | | public class NullCMSPluginDbSchemaMigrator : ICMSPluginDbSchemaMigrator, ITransientDependency |
| | | { |
| | | /// <inheritdoc /> |
| | | public Task MigrateAsync() |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsAreas; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.EventBus.Distributed; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.EventHandlers; |
| | | |
| | | /// <summary> |
| | | /// WmsAreaäºä»¶å¤çç¨åº |
| | | /// </summary> |
| | | public class WmsAreaEventHandler : IDistributedEventHandler<WmsAreaEto>, ITransientDependency |
| | | { |
| | | /// <inheritdoc /> |
| | | public Task HandleEventAsync(WmsAreaEto eventData) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsContainers; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.EventBus.Distributed; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.EventHandlers; |
| | | |
| | | /// <summary> |
| | | /// WmsContaineräºä»¶å¤çç¨åº |
| | | /// </summary> |
| | | public class WmsContainerEventHandler : IDistributedEventHandler<WmsContainerEto>, ITransientDependency |
| | | { |
| | | /// <inheritdoc /> |
| | | public Task HandleEventAsync(WmsContainerEto eventData) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsMaterials; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.EventBus.Distributed; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.EventHandlers; |
| | | |
| | | /// <summary> |
| | | /// WmsMaterialäºä»¶å¤çç¨åº |
| | | /// </summary> |
| | | public class WmsMaterialEventHandler : IDistributedEventHandler<WmsMaterialEto>, ITransientDependency |
| | | { |
| | | /// <inheritdoc /> |
| | | public Task HandleEventAsync(WmsMaterialEto eventData) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsPlaces; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.EventBus.Distributed; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.EventHandlers; |
| | | |
| | | /// <summary> |
| | | /// WmsPlaceäºä»¶å¤çç¨åº |
| | | /// </summary> |
| | | public class WmsPlaceEventHandler : IDistributedEventHandler<WmsPlaceEto>, ITransientDependency |
| | | { |
| | | /// <inheritdoc /> |
| | | public Task HandleEventAsync(WmsPlaceEto eventData) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsStores; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.EventBus.Distributed; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.EventHandlers; |
| | | |
| | | /// <summary> |
| | | /// WmsStoreäºä»¶å¤çç¨åº |
| | | /// </summary> |
| | | public class WmsStoreEventHandler : IDistributedEventHandler<WmsStoreEto>, ITransientDependency |
| | | { |
| | | /// <inheritdoc /> |
| | | public Task HandleEventAsync(WmsStoreEto eventData) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
| | | <ConfigureAwait ContinueOnCapturedContext="false" /> |
| | | </Weavers> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Runtime.CompilerServices; |
| | | [assembly:InternalsVisibleToAttribute("CMS.Plugin.Domain.Tests")] |
| | | [assembly:InternalsVisibleToAttribute("CMS.Plugin.TestBase")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Abstractions; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Localization; |
| | | using Volo.Abp.Localization; |
| | | using Volo.Abp.Settings; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Settings; |
| | | |
| | | /// <summary> |
| | | /// 设置å®ä¹æä¾ç¨åº |
| | | /// </summary> |
| | | public class CMSPluginSettingDefinitionProvider : SettingDefinitionProvider |
| | | { |
| | | public override void Define(ISettingDefinitionContext context) |
| | | { |
| | | context.Add(new SettingDefinition(CMSPluginHIAWmsSettings.PluginState, "1", L($"DisplayName:{CMSPluginHIAWmsSettings.PluginState}"), isInherited: true)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ls the specified name. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | /// <returns></returns> |
| | | private static LocalizableString L(string name) |
| | | { |
| | | return LocalizableString.Create<HIAWmsResource>(name); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Domain.Repositories; |
| | | using Volo.Abp.Specifications; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsAreas; |
| | | |
| | | /// <summary> |
| | | /// WmsAreaä»å¨ |
| | | /// </summary> |
| | | public interface IWmsAreaRepository : IBasicRepository<WmsArea, Guid> |
| | | { |
| | | /// <summary> |
| | | /// Finds the by name asynchronous. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<WmsArea> FindByNameAsync(string name, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// Names the exist asynchronous. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <returns></returns> |
| | | Task<bool> NameExistAsync(string name, Guid? id = null); |
| | | |
| | | /// <summary> |
| | | /// Gets the maximum sort asynchronous. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<int> GetMaxSortAsync(); |
| | | |
| | | /// <summary> |
| | | /// Gets the list asynchronous. |
| | | /// </summary> |
| | | /// <param name="sorting">The sorting.</param> |
| | | /// <param name="maxResultCount">The maximum result count.</param> |
| | | /// <param name="skipCount">The skip count.</param> |
| | | /// <param name="filter">The filter.</param> |
| | | /// <param name="specification">The specification.</param> |
| | | /// <param name="includeDetails">if set to <c>true</c> [include details].</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<List<WmsArea>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<WmsArea> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// Gets the count asynchronous. |
| | | /// </summary> |
| | | /// <param name="filter">The filter.</param> |
| | | /// <param name="specification">The specification.</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<long> GetCountAsync(string filter = null, Specification<WmsArea> specification = null, CancellationToken cancellationToken = default); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsAreas; |
| | | using Microsoft.EntityFrameworkCore.Metadata.Internal; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Domain.Entities.Auditing; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsAreas |
| | | { |
| | | /// <summary> |
| | | /// WmsArea |
| | | /// </summary> |
| | | public class WmsArea : FullAuditedAggregateRoot<Guid> |
| | | { |
| | | /// <summary> |
| | | /// åºåºç¼å· |
| | | /// </summary> |
| | | public string AreaNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºåç§° |
| | | /// </summary> |
| | | public string AreaName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè¿° |
| | | /// </summary> |
| | | public string? AreaDesc { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºç¶æ |
| | | /// </summary> |
| | | public AreaStatusEnum AreaStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºç±»å |
| | | /// </summary> |
| | | public AreaTypeEnum AreaType { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// ä»åºä»£ç |
| | | /// </summary> |
| | | public string? StoreCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºåç§° |
| | | /// </summary> |
| | | public string? StoreName { get; set; } |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort. |
| | | /// </summary> |
| | | /// <param name="sort">The sort.</param> |
| | | public void AdjustSort(int sort) |
| | | { |
| | | Sort = sort; |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.Guids; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsAreas |
| | | { |
| | | /// <summary> |
| | | /// WmsAreaç§åæ°æ®æä¾ç¨åº |
| | | /// </summary> |
| | | public class WmsAreaDataSeedContributor : IDataSeedContributor, ITransientDependency |
| | | { |
| | | private readonly IUnitOfWorkManager _unitOfWorkManager; |
| | | private readonly IWmsAreaRepository _wmsareaRepository; |
| | | private readonly IGuidGenerator _guidGenerator; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsAreaDataSeedContributor"/> class. |
| | | /// </summary> |
| | | /// <param name="unitOfWorkManager">The unit of work manager.</param> |
| | | /// <param name="guidGenerator">The unique identifier generator.</param> |
| | | /// <param name="wmsareaRepository">The work section repository.</param> |
| | | public WmsAreaDataSeedContributor(IUnitOfWorkManager unitOfWorkManager, IGuidGenerator guidGenerator, IWmsAreaRepository wmsareaRepository) |
| | | { |
| | | _unitOfWorkManager = unitOfWorkManager; |
| | | _wmsareaRepository = wmsareaRepository; |
| | | _guidGenerator = guidGenerator; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task SeedAsync(DataSeedContext context) |
| | | { |
| | | if (context.Properties.ContainsKey(CMSPluginDbProperties.ConnectionStringName) && context.Properties[CMSPluginDbProperties.ConnectionStringName]?.ToString() == CMSPluginDbProperties.ConnectionStringName) |
| | | { |
| | | try |
| | | { |
| | | //using var unitofWork = _unitOfWorkManager.Begin(requiresNew: true); |
| | | //await unitofWork.SaveChangesAsync(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.WriteLine(ex.Message); |
| | | } |
| | | } |
| | | |
| | | if (context.Properties.ContainsKey("SeedTestData") && context.Properties["SeedTestData"]?.ToString() == "SeedTestData") |
| | | { |
| | | try |
| | | { |
| | | await SeedWmsAreaDataAsync(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Console.WriteLine(e.Message); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Seeds the work section data asynchronous. |
| | | /// </summary> |
| | | private async Task SeedWmsAreaDataAsync() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Linq.Expressions; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsAreas |
| | | { |
| | | /// <summary> |
| | | /// WmsAreaè§çº¦ |
| | | /// </summary> |
| | | public class WmsAreaSpecification : Volo.Abp.Specifications.Specification<WmsArea> |
| | | { |
| | | private readonly string _areaCode; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsAreaSpecification"/> class. |
| | | /// </summary> |
| | | public WmsAreaSpecification() |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsAreaSpecification"/> class. |
| | | /// </summary> |
| | | /// <param name="areaCode">The name.</param> |
| | | public WmsAreaSpecification(string areaCode = null) |
| | | { |
| | | _areaCode = areaCode; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override Expression<Func<WmsArea, bool>> ToExpression() |
| | | { |
| | | Expression<Func<WmsArea, bool>> expression = c => 1 == 1; |
| | | |
| | | if (_areaCode != null) |
| | | { |
| | | expression = expression.And(c => c.AreaNo == _areaCode); |
| | | } |
| | | |
| | | return expression; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Domain.Repositories; |
| | | using Volo.Abp.Specifications; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsContainers; |
| | | |
| | | /// <summary> |
| | | /// WmsContainerä»å¨ |
| | | /// </summary> |
| | | public interface IWmsContainerRepository : IBasicRepository<WmsContainer, Guid> |
| | | { |
| | | /// <summary> |
| | | /// Finds the by name asynchronous. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<WmsContainer> FindByNameAsync(string name, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// Names the exist asynchronous. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <returns></returns> |
| | | Task<bool> NameExistAsync(string name, Guid? id = null); |
| | | |
| | | /// <summary> |
| | | /// Gets the maximum sort asynchronous. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<int> GetMaxSortAsync(); |
| | | |
| | | /// <summary> |
| | | /// Gets the list asynchronous. |
| | | /// </summary> |
| | | /// <param name="sorting">The sorting.</param> |
| | | /// <param name="maxResultCount">The maximum result count.</param> |
| | | /// <param name="skipCount">The skip count.</param> |
| | | /// <param name="filter">The filter.</param> |
| | | /// <param name="specification">The specification.</param> |
| | | /// <param name="includeDetails">if set to <c>true</c> [include details].</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<List<WmsContainer>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<WmsContainer> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// Gets the count asynchronous. |
| | | /// </summary> |
| | | /// <param name="filter">The filter.</param> |
| | | /// <param name="specification">The specification.</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<long> GetCountAsync(string filter = null, Specification<WmsContainer> specification = null, CancellationToken cancellationToken = default); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsContainers; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Domain.Entities.Auditing; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsContainers |
| | | { |
| | | /// <summary> |
| | | /// WmsContainer |
| | | /// </summary> |
| | | public class WmsContainer : FullAuditedAggregateRoot<Guid> |
| | | { |
| | | /// <summary> |
| | | /// ID |
| | | /// </summary> |
| | | public Guid Id { get; set; } |
| | | /// <summary> |
| | | /// æçç¼å· |
| | | /// </summary> |
| | | public string ContainerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç±»å |
| | | /// </summary> |
| | | public ContainerTypeEnum ContainerType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçç¶æ |
| | | /// </summary> |
| | | public ContainerStatusEnum ContainerStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¿åº¦ |
| | | /// </summary> |
| | | public decimal? SpecLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 宽度 |
| | | /// </summary> |
| | | public decimal? SpecWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é«åº¦ |
| | | /// </summary> |
| | | public decimal? SpecHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé¿ |
| | | /// </summary> |
| | | public decimal? LimitLength { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é宽 |
| | | /// </summary> |
| | | public decimal? LimitWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éé« |
| | | /// </summary> |
| | | public decimal? LimitHeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è½½éä¸é |
| | | /// </summary> |
| | | public decimal? MaxWeight { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¼å¸¸æ°é |
| | | /// </summary> |
| | | public int? ExceptionNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | ///ç©ææ°é |
| | | /// </summary> |
| | | public int? MaterialNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort. |
| | | /// </summary> |
| | | /// <param name="sort">The sort.</param> |
| | | public void AdjustSort(int sort) |
| | | { |
| | | Sort = sort; |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.Guids; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsContainers |
| | | { |
| | | /// <summary> |
| | | /// WmsContainerç§åæ°æ®æä¾ç¨åº |
| | | /// </summary> |
| | | public class WmsContainerDataSeedContributor : IDataSeedContributor, ITransientDependency |
| | | { |
| | | private readonly IUnitOfWorkManager _unitOfWorkManager; |
| | | private readonly IWmsContainerRepository _wmscontainerRepository; |
| | | private readonly IGuidGenerator _guidGenerator; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainerDataSeedContributor"/> class. |
| | | /// </summary> |
| | | /// <param name="unitOfWorkManager">The unit of work manager.</param> |
| | | /// <param name="guidGenerator">The unique identifier generator.</param> |
| | | /// <param name="wmscontainerRepository">The work section repository.</param> |
| | | public WmsContainerDataSeedContributor(IUnitOfWorkManager unitOfWorkManager, IGuidGenerator guidGenerator, IWmsContainerRepository wmscontainerRepository) |
| | | { |
| | | _unitOfWorkManager = unitOfWorkManager; |
| | | _wmscontainerRepository = wmscontainerRepository; |
| | | _guidGenerator = guidGenerator; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task SeedAsync(DataSeedContext context) |
| | | { |
| | | if (context.Properties.ContainsKey(CMSPluginDbProperties.ConnectionStringName) && context.Properties[CMSPluginDbProperties.ConnectionStringName]?.ToString() == CMSPluginDbProperties.ConnectionStringName) |
| | | { |
| | | try |
| | | { |
| | | //using var unitofWork = _unitOfWorkManager.Begin(requiresNew: true); |
| | | //await unitofWork.SaveChangesAsync(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.WriteLine(ex.Message); |
| | | } |
| | | } |
| | | |
| | | if (context.Properties.ContainsKey("SeedTestData") && context.Properties["SeedTestData"]?.ToString() == "SeedTestData") |
| | | { |
| | | try |
| | | { |
| | | await SeedWmsContainerDataAsync(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Console.WriteLine(e.Message); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Seeds the work section data asynchronous. |
| | | /// </summary> |
| | | private async Task SeedWmsContainerDataAsync() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Linq.Expressions; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsContainers |
| | | { |
| | | /// <summary> |
| | | /// WmsContainerè§çº¦ |
| | | /// </summary> |
| | | public class WmsContainerSpecification : Volo.Abp.Specifications.Specification<WmsContainer> |
| | | { |
| | | private readonly string _containerNo; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainerSpecification"/> class. |
| | | /// </summary> |
| | | public WmsContainerSpecification() |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainerSpecification"/> class. |
| | | /// </summary> |
| | | /// <param name="containerNo">The name.</param> |
| | | public WmsContainerSpecification(string containerNo = null) |
| | | { |
| | | _containerNo = containerNo; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override Expression<Func<WmsContainer, bool>> ToExpression() |
| | | { |
| | | Expression<Func<WmsContainer, bool>> expression = c => 1 == 1; |
| | | |
| | | if (_containerNo != null) |
| | | { |
| | | expression = expression.And(c => c.ContainerNo == _containerNo); |
| | | } |
| | | |
| | | return expression; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Domain.Repositories; |
| | | using Volo.Abp.Specifications; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsMaterials; |
| | | |
| | | /// <summary> |
| | | /// WmsMaterialä»å¨ |
| | | /// </summary> |
| | | public interface IWmsMaterialRepository : IBasicRepository<WmsMaterial, Guid> |
| | | { |
| | | /// <summary> |
| | | /// Finds the by name asynchronous. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<WmsMaterial> FindByNameAsync(string name, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// Names the exist asynchronous. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <returns></returns> |
| | | Task<bool> NameExistAsync(string name, Guid? id = null); |
| | | |
| | | /// <summary> |
| | | /// Gets the maximum sort asynchronous. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<int> GetMaxSortAsync(); |
| | | |
| | | /// <summary> |
| | | /// Gets the list asynchronous. |
| | | /// </summary> |
| | | /// <param name="sorting">The sorting.</param> |
| | | /// <param name="maxResultCount">The maximum result count.</param> |
| | | /// <param name="skipCount">The skip count.</param> |
| | | /// <param name="filter">The filter.</param> |
| | | /// <param name="specification">The specification.</param> |
| | | /// <param name="includeDetails">if set to <c>true</c> [include details].</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<List<WmsMaterial>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<WmsMaterial> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// Gets the count asynchronous. |
| | | /// </summary> |
| | | /// <param name="filter">The filter.</param> |
| | | /// <param name="specification">The specification.</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<long> GetCountAsync(string filter = null, Specification<WmsMaterial> specification = null, CancellationToken cancellationToken = default); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsMaterials; |
| | | using MathNet.Numerics; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Domain.Entities.Auditing; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsMaterials |
| | | { |
| | | /// <summary> |
| | | /// WmsMaterial |
| | | /// </summary> |
| | | public class WmsMaterial : FullAuditedAggregateRoot<Guid> |
| | | { |
| | | /// <summary> |
| | | /// ç©æç¼ç ï¼å¯ä¸æ è¯ï¼ |
| | | /// </summary> |
| | | public string MaterialCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | public string MaterialName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éè´ç±»åï¼æä¸¾å¼ï¼ |
| | | /// </summary> |
| | | public PurchaseTypeEnum PurchaseType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç±»åï¼æä¸¾å¼ï¼ |
| | | /// </summary> |
| | | public MaterialTypeEnum MaterialType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 主åä½ï¼å¦ï¼kgãmãä¸ªï¼ |
| | | /// </summary> |
| | | public string PrimaryUnit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è§æ ¼/æ åï¼å¦ï¼GB/T 8163-2018ï¼ |
| | | /// </summary> |
| | | public string Standard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¤å¾ï¼åä½ï¼mmï¼ |
| | | /// </summary> |
| | | public decimal OuterDiameter { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å£åï¼åä½ï¼mmï¼ |
| | | /// </summary> |
| | | public decimal WallThickness { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æè´¨ï¼å¦ï¼304ä¸éé¢ï¼ |
| | | /// </summary> |
| | | public string MaterialQuality { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¿åº¦ï¼åä½ï¼mï¼ |
| | | /// </summary> |
| | | public decimal Length { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ä¸ºä¸»æ¯ç®¡ï¼true: 主æ¯ç®¡, false: é主æ¯ç®¡ï¼ |
| | | /// </summary> |
| | | public bool IsMainBranch { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç产工å |
| | | /// </summary> |
| | | public string Factory { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¯ä¹¦ç¼å·ï¼å¦ï¼åå容å¨è®¤è¯ï¼ |
| | | /// </summary> |
| | | public string Certification { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort. |
| | | /// </summary> |
| | | /// <param name="sort">The sort.</param> |
| | | public void AdjustSort(int sort) |
| | | { |
| | | Sort = sort; |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.Guids; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsMaterials |
| | | { |
| | | /// <summary> |
| | | /// WmsMaterialç§åæ°æ®æä¾ç¨åº |
| | | /// </summary> |
| | | public class WmsMaterialDataSeedContributor : IDataSeedContributor, ITransientDependency |
| | | { |
| | | private readonly IUnitOfWorkManager _unitOfWorkManager; |
| | | private readonly IWmsMaterialRepository _wmsmaterialRepository; |
| | | private readonly IGuidGenerator _guidGenerator; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsMaterialDataSeedContributor"/> class. |
| | | /// </summary> |
| | | /// <param name="unitOfWorkManager">The unit of work manager.</param> |
| | | /// <param name="guidGenerator">The unique identifier generator.</param> |
| | | /// <param name="wmsmaterialRepository">The work section repository.</param> |
| | | public WmsMaterialDataSeedContributor(IUnitOfWorkManager unitOfWorkManager, IGuidGenerator guidGenerator, IWmsMaterialRepository wmsmaterialRepository) |
| | | { |
| | | _unitOfWorkManager = unitOfWorkManager; |
| | | _wmsmaterialRepository = wmsmaterialRepository; |
| | | _guidGenerator = guidGenerator; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task SeedAsync(DataSeedContext context) |
| | | { |
| | | if (context.Properties.ContainsKey(CMSPluginDbProperties.ConnectionStringName) && context.Properties[CMSPluginDbProperties.ConnectionStringName]?.ToString() == CMSPluginDbProperties.ConnectionStringName) |
| | | { |
| | | try |
| | | { |
| | | //using var unitofWork = _unitOfWorkManager.Begin(requiresNew: true); |
| | | //await unitofWork.SaveChangesAsync(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.WriteLine(ex.Message); |
| | | } |
| | | } |
| | | |
| | | if (context.Properties.ContainsKey("SeedTestData") && context.Properties["SeedTestData"]?.ToString() == "SeedTestData") |
| | | { |
| | | try |
| | | { |
| | | await SeedWmsMaterialDataAsync(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Console.WriteLine(e.Message); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Seeds the work section data asynchronous. |
| | | /// </summary> |
| | | private async Task SeedWmsMaterialDataAsync() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Linq.Expressions; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsMaterials |
| | | { |
| | | /// <summary> |
| | | /// WmsMaterialè§çº¦ |
| | | /// </summary> |
| | | public class WmsMaterialSpecification : Volo.Abp.Specifications.Specification<WmsMaterial> |
| | | { |
| | | private readonly string _materialCode; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsMaterialSpecification"/> class. |
| | | /// </summary> |
| | | public WmsMaterialSpecification() |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsMaterialSpecification"/> class. |
| | | /// </summary> |
| | | /// <param name="materialCode">The name.</param> |
| | | public WmsMaterialSpecification(string materialCode = null) |
| | | { |
| | | _materialCode = materialCode; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override Expression<Func<WmsMaterial, bool>> ToExpression() |
| | | { |
| | | Expression<Func<WmsMaterial, bool>> expression = c => 1 == 1; |
| | | |
| | | if (_materialCode != null) |
| | | { |
| | | expression = expression.And(c => c.MaterialCode == _materialCode); |
| | | } |
| | | |
| | | return expression; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Domain.Repositories; |
| | | using Volo.Abp.Specifications; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsPlaces; |
| | | |
| | | /// <summary> |
| | | /// WmsPlaceä»å¨ |
| | | /// </summary> |
| | | public interface IWmsPlaceRepository : IBasicRepository<WmsPlace, Guid> |
| | | { |
| | | /// <summary> |
| | | /// Finds the by name asynchronous. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<WmsPlace> FindByNameAsync(string name, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// Names the exist asynchronous. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <returns></returns> |
| | | Task<bool> NameExistAsync(string name, Guid? id = null); |
| | | |
| | | /// <summary> |
| | | /// Gets the maximum sort asynchronous. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<int> GetMaxSortAsync(); |
| | | |
| | | /// <summary> |
| | | /// Gets the list asynchronous. |
| | | /// </summary> |
| | | /// <param name="sorting">The sorting.</param> |
| | | /// <param name="maxResultCount">The maximum result count.</param> |
| | | /// <param name="skipCount">The skip count.</param> |
| | | /// <param name="filter">The filter.</param> |
| | | /// <param name="specification">The specification.</param> |
| | | /// <param name="includeDetails">if set to <c>true</c> [include details].</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<List<WmsPlace>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<WmsPlace> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// Gets the count asynchronous. |
| | | /// </summary> |
| | | /// <param name="filter">The filter.</param> |
| | | /// <param name="specification">The specification.</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<long> GetCountAsync(string filter = null, Specification<WmsPlace> specification = null, CancellationToken cancellationToken = default); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.Enums; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsPlaces; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Domain.Entities.Auditing; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsPlaces |
| | | { |
| | | /// <summary> |
| | | /// WmsPlace |
| | | /// </summary> |
| | | public class WmsPlace : FullAuditedAggregateRoot<Guid> |
| | | { |
| | | /// <summary> |
| | | /// ç¼å· |
| | | /// </summary> |
| | | public virtual string PlaceNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ç±»å |
| | | /// </summary> |
| | | public PlaceTypeEnum StorageTypeNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ç¶æ |
| | | /// </summary> |
| | | public PlaceStatusEnum PlaceStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æå¨åºåº |
| | | /// </summary> |
| | | public string AreaCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å··é |
| | | /// </summary> |
| | | public int Aisle { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ |
| | | /// </summary> |
| | | public int RowNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å |
| | | /// </summary> |
| | | public int ColumnNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å± |
| | | /// </summary> |
| | | public int LayerNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦éå® |
| | | /// </summary> |
| | | public YesNoEnum Islock { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç©ºæ |
| | | /// </summary> |
| | | public YesNoEnum EmptyContainer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | public virtual string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort. |
| | | /// </summary> |
| | | /// <param name="sort">The sort.</param> |
| | | public void AdjustSort(int sort) |
| | | { |
| | | Sort = sort; |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.Guids; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsPlaces |
| | | { |
| | | /// <summary> |
| | | /// WmsPlaceç§åæ°æ®æä¾ç¨åº |
| | | /// </summary> |
| | | public class WmsPlaceDataSeedContributor : IDataSeedContributor, ITransientDependency |
| | | { |
| | | private readonly IUnitOfWorkManager _unitOfWorkManager; |
| | | private readonly IWmsPlaceRepository _wmsplaceRepository; |
| | | private readonly IGuidGenerator _guidGenerator; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsPlaceDataSeedContributor"/> class. |
| | | /// </summary> |
| | | /// <param name="unitOfWorkManager">The unit of work manager.</param> |
| | | /// <param name="guidGenerator">The unique identifier generator.</param> |
| | | /// <param name="wmsplaceRepository">The work section repository.</param> |
| | | public WmsPlaceDataSeedContributor(IUnitOfWorkManager unitOfWorkManager, IGuidGenerator guidGenerator, IWmsPlaceRepository wmsplaceRepository) |
| | | { |
| | | _unitOfWorkManager = unitOfWorkManager; |
| | | _wmsplaceRepository = wmsplaceRepository; |
| | | _guidGenerator = guidGenerator; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task SeedAsync(DataSeedContext context) |
| | | { |
| | | if (context.Properties.ContainsKey(CMSPluginDbProperties.ConnectionStringName) && context.Properties[CMSPluginDbProperties.ConnectionStringName]?.ToString() == CMSPluginDbProperties.ConnectionStringName) |
| | | { |
| | | try |
| | | { |
| | | //using var unitofWork = _unitOfWorkManager.Begin(requiresNew: true); |
| | | //await unitofWork.SaveChangesAsync(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.WriteLine(ex.Message); |
| | | } |
| | | } |
| | | |
| | | if (context.Properties.ContainsKey("SeedTestData") && context.Properties["SeedTestData"]?.ToString() == "SeedTestData") |
| | | { |
| | | try |
| | | { |
| | | await SeedWmsPlaceDataAsync(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Console.WriteLine(e.Message); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Seeds the work section data asynchronous. |
| | | /// </summary> |
| | | private async Task SeedWmsPlaceDataAsync() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Linq.Expressions; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsPlaces |
| | | { |
| | | /// <summary> |
| | | /// WmsPlaceè§çº¦ |
| | | /// </summary> |
| | | public class WmsPlaceSpecification : Volo.Abp.Specifications.Specification<WmsPlace> |
| | | { |
| | | private readonly string _placeNo; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsPlaceSpecification"/> class. |
| | | /// </summary> |
| | | public WmsPlaceSpecification() |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsPlaceSpecification"/> class. |
| | | /// </summary> |
| | | /// <param name="placeNo">The name.</param> |
| | | public WmsPlaceSpecification(string placeNo = null) |
| | | { |
| | | _placeNo = placeNo; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override Expression<Func<WmsPlace, bool>> ToExpression() |
| | | { |
| | | Expression<Func<WmsPlace, bool>> expression = c => 1 == 1; |
| | | |
| | | if (_placeNo != null) |
| | | { |
| | | expression = expression.And(c => c.PlaceNo == _placeNo); |
| | | } |
| | | |
| | | return expression; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Domain.Repositories; |
| | | using Volo.Abp.Specifications; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsStores; |
| | | |
| | | /// <summary> |
| | | /// WmsStoreä»å¨ |
| | | /// </summary> |
| | | public interface IWmsStoreRepository : IBasicRepository<WmsStore, Guid> |
| | | { |
| | | /// <summary> |
| | | /// Finds the by name asynchronous. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<WmsStore> FindByNameAsync(string name, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// Names the exist asynchronous. |
| | | /// </summary> |
| | | /// <param name="name">The name.</param> |
| | | /// <param name="id">The identifier.</param> |
| | | /// <returns></returns> |
| | | Task<bool> NameExistAsync(string name, Guid? id = null); |
| | | |
| | | /// <summary> |
| | | /// Gets the maximum sort asynchronous. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<int> GetMaxSortAsync(); |
| | | |
| | | /// <summary> |
| | | /// Gets the list asynchronous. |
| | | /// </summary> |
| | | /// <param name="sorting">The sorting.</param> |
| | | /// <param name="maxResultCount">The maximum result count.</param> |
| | | /// <param name="skipCount">The skip count.</param> |
| | | /// <param name="filter">The filter.</param> |
| | | /// <param name="specification">The specification.</param> |
| | | /// <param name="includeDetails">if set to <c>true</c> [include details].</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<List<WmsStore>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<WmsStore> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default); |
| | | |
| | | /// <summary> |
| | | /// Gets the count asynchronous. |
| | | /// </summary> |
| | | /// <param name="filter">The filter.</param> |
| | | /// <param name="specification">The specification.</param> |
| | | /// <param name="cancellationToken">The cancellation token.</param> |
| | | /// <returns></returns> |
| | | Task<long> GetCountAsync(string filter = null, Specification<WmsStore> specification = null, CancellationToken cancellationToken = default); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsStores; |
| | | using Microsoft.EntityFrameworkCore.Metadata.Internal; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Domain.Entities.Auditing; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsStores |
| | | { |
| | | /// <summary> |
| | | /// WmsStore |
| | | /// </summary> |
| | | public class WmsStore : FullAuditedAggregateRoot<Guid> |
| | | { |
| | | |
| | | /// <summary> |
| | | /// ä»åºä»£ç |
| | | /// </summary> |
| | | public string? StoreCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºåç§° |
| | | /// </summary> |
| | | public string? StoreName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段1 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField1 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段2 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField2 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½å段3 - é¢çæ©å±ç¨é |
| | | /// </summary> |
| | | public string RedundantField3 { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨. |
| | | /// </summary> |
| | | public string? Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåº |
| | | /// </summary> |
| | | public virtual int Sort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦ç¦ç¨ |
| | | /// </summary> |
| | | public virtual bool? IsDisabled { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Adjusts the sort. |
| | | /// </summary> |
| | | /// <param name="sort">The sort.</param> |
| | | public void AdjustSort(int sort) |
| | | { |
| | | Sort = sort; |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.Guids; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsStores |
| | | { |
| | | /// <summary> |
| | | /// WmsStoreç§åæ°æ®æä¾ç¨åº |
| | | /// </summary> |
| | | public class WmsStoreDataSeedContributor : IDataSeedContributor, ITransientDependency |
| | | { |
| | | private readonly IUnitOfWorkManager _unitOfWorkManager; |
| | | private readonly IWmsStoreRepository _wmsstoreRepository; |
| | | private readonly IGuidGenerator _guidGenerator; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsStoreDataSeedContributor"/> class. |
| | | /// </summary> |
| | | /// <param name="unitOfWorkManager">The unit of work manager.</param> |
| | | /// <param name="guidGenerator">The unique identifier generator.</param> |
| | | /// <param name="wmsstoreRepository">The work section repository.</param> |
| | | public WmsStoreDataSeedContributor(IUnitOfWorkManager unitOfWorkManager, IGuidGenerator guidGenerator, IWmsStoreRepository wmsstoreRepository) |
| | | { |
| | | _unitOfWorkManager = unitOfWorkManager; |
| | | _wmsstoreRepository = wmsstoreRepository; |
| | | _guidGenerator = guidGenerator; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task SeedAsync(DataSeedContext context) |
| | | { |
| | | if (context.Properties.ContainsKey(CMSPluginDbProperties.ConnectionStringName) && context.Properties[CMSPluginDbProperties.ConnectionStringName]?.ToString() == CMSPluginDbProperties.ConnectionStringName) |
| | | { |
| | | try |
| | | { |
| | | //using var unitofWork = _unitOfWorkManager.Begin(requiresNew: true); |
| | | //await unitofWork.SaveChangesAsync(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.WriteLine(ex.Message); |
| | | } |
| | | } |
| | | |
| | | if (context.Properties.ContainsKey("SeedTestData") && context.Properties["SeedTestData"]?.ToString() == "SeedTestData") |
| | | { |
| | | try |
| | | { |
| | | await SeedWmsStoreDataAsync(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | Console.WriteLine(e.Message); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Seeds the work section data asynchronous. |
| | | /// </summary> |
| | | private async Task SeedWmsStoreDataAsync() |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Linq.Expressions; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsStores |
| | | { |
| | | /// <summary> |
| | | /// WmsStoreè§çº¦ |
| | | /// </summary> |
| | | public class WmsStoreSpecification : Volo.Abp.Specifications.Specification<WmsStore> |
| | | { |
| | | private readonly string _storeCode; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsStoreSpecification"/> class. |
| | | /// </summary> |
| | | public WmsStoreSpecification() |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsStoreSpecification"/> class. |
| | | /// </summary> |
| | | /// <param name="storeCode">The name.</param> |
| | | public WmsStoreSpecification(string storeCode = null) |
| | | { |
| | | _storeCode = storeCode; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override Expression<Func<WmsStore, bool>> ToExpression() |
| | | { |
| | | Expression<Func<WmsStore, bool>> expression = c => 1 == 1; |
| | | |
| | | if (_storeCode != null) |
| | | { |
| | | expression = expression.And(c => c.StoreCode == _storeCode); |
| | | } |
| | | |
| | | return expression; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <Import Project="../../common.props" /> |
| | | <Import Project="../../configureawait.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Volo.Abp.Dapper" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="$(ABPPackageVersion)" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.Domain\CMS.Plugin.HIAWms.Domain.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Data; |
| | | using Volo.Abp.Domain.Repositories.Dapper; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | |
| | | /// <inheritdoc /> |
| | | public class CMSPluginDapperRepository : DapperRepository<ICMSPluginDbContext>, ICMSPluginDapperRepository |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="CMSPluginDapperRepository"/> class. |
| | | /// </summary> |
| | | /// <param name="dbContextProvider">The database context provider.</param> |
| | | public CMSPluginDapperRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider) |
| | | : base(dbContextProvider) |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Data; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Microsoft.Extensions.Logging; |
| | | using Volo.Abp.DependencyInjection; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | |
| | | /// <inheritdoc /> |
| | | public class CMSPluginDbSchemaMigrator : ICMSPluginDbSchemaMigrator, ITransientDependency |
| | | { |
| | | private readonly IServiceProvider _serviceProvider; |
| | | private readonly ILogger<CMSPluginDbSchemaMigrator> _logger; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="CMSPluginDbSchemaMigrator"/> class. |
| | | /// </summary> |
| | | /// <param name="serviceProvider">The service provider.</param> |
| | | public CMSPluginDbSchemaMigrator(IServiceProvider serviceProvider, ILogger<CMSPluginDbSchemaMigrator> logger) |
| | | { |
| | | _serviceProvider = serviceProvider; |
| | | _logger = logger; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task MigrateAsync() |
| | | { |
| | | /* We intentionally resolving the CMSDbContext |
| | | * from IServiceProvider (instead of directly injecting it) |
| | | * to properly get the connection string of the current tenant in the |
| | | * current scope. |
| | | */ |
| | | var database = _serviceProvider.GetRequiredService<ICMSPluginDbContext>().Database; |
| | | _logger.LogInformation($"Start database {database.GetDbConnection().Database} migrate"); |
| | | await database.MigrateAsync(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Shared; |
| | | using Volo.Abp.Threading; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | |
| | | /// <summary> |
| | | /// EfCoreå®ä½æ©å± |
| | | /// </summary> |
| | | public static class CMSPluginEfCoreEntityExtensionMappings |
| | | { |
| | | private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
| | | |
| | | /// <summary> |
| | | /// Configures this instance. |
| | | /// </summary> |
| | | public static void Configure() |
| | | { |
| | | CMSPluginModuleExtensionConfigurator.Configure(); |
| | | |
| | | OneTimeRunner.Run(() => |
| | | { |
| | | /* You can configure extra properties for the |
| | | * entities defined in the modules used by your application. |
| | | * |
| | | * This class can be used to map these extra properties to table fields in the database. |
| | | * |
| | | * USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING. |
| | | * USE CMSModuleExtensionConfigurator CLASS (in the Domain.Shared project) |
| | | * FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES |
| | | * |
| | | * Example: Map a property to a table field: |
| | | |
| | | ObjectExtensionManager.Instance |
| | | .MapEfCoreProperty<WmsContainer, string>( |
| | | "MyProperty", |
| | | (entityBuilder, propertyBuilder) => |
| | | { |
| | | propertyBuilder.HasMaxLength(128); |
| | | } |
| | | ); |
| | | |
| | | * See the documentation for more: |
| | | * https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities |
| | | */ |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.Modularity; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | |
| | | /// <summary> |
| | | /// EntityFrameworkCore模å |
| | | /// </summary> |
| | | [DependsOn( |
| | | typeof(CMSPluginDomainModule), |
| | | typeof(AbpEntityFrameworkCoreModule) |
| | | )] |
| | | public class CMSPluginEntityFrameworkCoreModule : AbpModule |
| | | { |
| | | /// <inheritdoc /> |
| | | public override void PreConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | CMSPluginEfCoreEntityExtensionMappings.Configure(); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override void ConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.Domain.WmsAreas; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsAreas; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp; |
| | | using Volo.Abp.EntityFrameworkCore.Modeling; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | |
| | | /// <summary> |
| | | /// EfCoreæ©å± |
| | | /// </summary> |
| | | public static partial class CMSPluginEfCoreExtensions |
| | | { |
| | | /// <summary> |
| | | /// Includes the details. |
| | | /// </summary> |
| | | /// <param name="queryable">The queryable.</param> |
| | | /// <param name="include">if set to <c>true</c> [include].</param> |
| | | /// <returns></returns> |
| | | public static IQueryable<WmsArea> IncludeDetails(this IQueryable<WmsArea> queryable, bool include = true) |
| | | { |
| | | if (!include) |
| | | { |
| | | return queryable; |
| | | } |
| | | |
| | | return queryable; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Configures the wmsarea. |
| | | /// </summary> |
| | | /// <param name="builder">The builder.</param> |
| | | public static void ConfigureWmsArea(this ModelBuilder builder) |
| | | { |
| | | Check.NotNull(builder, nameof(builder)); |
| | | |
| | | builder.Entity<WmsArea>(b => |
| | | { |
| | | // Configure table & schema name |
| | | b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsAreas").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("åºåºè¡¨"); |
| | | |
| | | b.ConfigureByConvention(); |
| | | |
| | | // Properties |
| | | b.Property(x => x.AreaNo).HasMaxLength(WmsAreaConsts.MaxNameLength).IsRequired().HasComment("åºåºç¼å·"); |
| | | b.Property(x => x.AreaName).HasMaxLength(WmsAreaConsts.MaxAreaNameLength).IsRequired().HasComment("åºåºåç§°"); |
| | | b.Property(x => x.AreaDesc).HasMaxLength(WmsAreaConsts.MaxAreaDescLength).IsRequired(false).HasComment("æè¿°"); |
| | | b.Property(x => x.AreaStatus).HasComment("åºåºç¶æ"); |
| | | b.Property(x => x.AreaType).HasComment("åºåºç±»å"); |
| | | b.Property(x => x.RedundantField1).HasMaxLength(WmsAreaConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | b.Property(x => x.RedundantField2).HasMaxLength(WmsAreaConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | b.Property(x => x.RedundantField3).HasMaxLength(WmsAreaConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | b.Property(x => x.StoreCode).HasMaxLength(WmsAreaConsts.MaxStoreCodeLength).IsRequired(false).HasComment("ä»åºä»£ç "); |
| | | b.Property(x => x.StoreName).HasMaxLength(WmsAreaConsts.MaxStoreNameLength).IsRequired(false).HasComment("ä»åºåç§°"); |
| | | b.Property(x => x.Sort).HasComment("æåº"); |
| | | b.Property(x => x.Remark).HasMaxLength(WmsAreaConsts.MaxRemarkLength).IsRequired(false).HasComment("夿³¨"); |
| | | b.Property(x => x.IsDisabled).IsRequired(false).HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | // Indexes |
| | | b.HasIndex(u => u.AreaName); |
| | | |
| | | // Apply object extension mappings |
| | | b.ApplyObjectExtensionMappings(); |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainers; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsContainers; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp; |
| | | using Volo.Abp.EntityFrameworkCore.Modeling; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | |
| | | /// <summary> |
| | | /// EfCoreæ©å± |
| | | /// </summary> |
| | | public static partial class CMSPluginEfCoreExtensions |
| | | { |
| | | /// <summary> |
| | | /// Includes the details. |
| | | /// </summary> |
| | | /// <param name="queryable">The queryable.</param> |
| | | /// <param name="include">if set to <c>true</c> [include].</param> |
| | | /// <returns></returns> |
| | | public static IQueryable<WmsContainer> IncludeDetails(this IQueryable<WmsContainer> queryable, bool include = true) |
| | | { |
| | | if (!include) |
| | | { |
| | | return queryable; |
| | | } |
| | | |
| | | return queryable; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Configures the wmscontainer. |
| | | /// </summary> |
| | | /// <param name="builder">The builder.</param> |
| | | public static void ConfigureWmsContainer(this ModelBuilder builder) |
| | | { |
| | | Check.NotNull(builder, nameof(builder)); |
| | | |
| | | builder.Entity<WmsContainer>(b => |
| | | { |
| | | b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsContainers").ToLower(), CMSPluginDbProperties.DbSchema) |
| | | .HasComment("æçä¿¡æ¯è¡¨"); |
| | | |
| | | b.ConfigureByConvention(); |
| | | |
| | | //Properties |
| | | b.Property(x => x.ContainerNo) |
| | | .HasMaxLength(50) |
| | | .IsRequired() |
| | | .HasComment("æçç¼å·"); |
| | | |
| | | b.Property(x => x.ContainerType) |
| | | .IsRequired() |
| | | .HasComment("æçç±»å"); |
| | | |
| | | b.Property(x => x.ContainerStatus) |
| | | .IsRequired() |
| | | .HasComment("æçç¶æ"); |
| | | |
| | | b.Property(x => x.SpecLength) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("é¿åº¦"); |
| | | |
| | | b.Property(x => x.SpecWidth) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("宽度"); |
| | | |
| | | b.Property(x => x.SpecHeight) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("é«åº¦"); |
| | | |
| | | b.Property(x => x.LimitLength) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("éé¿"); |
| | | |
| | | b.Property(x => x.LimitWidth) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("é宽"); |
| | | |
| | | b.Property(x => x.LimitHeight) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("éé«"); |
| | | |
| | | b.Property(x => x.MaxWeight) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("è½½éä¸é"); |
| | | |
| | | b.Property(x => x.ExceptionNumber) |
| | | .HasComment("å¼å¸¸æ°é"); |
| | | |
| | | b.Property(x => x.MaterialNumber) |
| | | .HasComment("ç©ææ°é"); |
| | | |
| | | b.Property(x => x.RedundantField1) |
| | | .HasMaxLength(200) |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property(x => x.RedundantField2) |
| | | .HasMaxLength(200) |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property(x => x.RedundantField3) |
| | | .HasMaxLength(200) |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property(x => x.Sort).HasComment("æåº"); |
| | | b.Property(x => x.IsDisabled).IsRequired(false).HasComment("æ¯å¦ç¦ç¨"); |
| | | b.Property(x => x.Remark).HasMaxLength(WmsContainerConsts.MaxRemarkLength).IsRequired(false).HasComment("夿³¨"); |
| | | |
| | | b.HasIndex(u => u.ContainerNo).IsUnique(); |
| | | b.HasIndex(u => u.ContainerType); |
| | | b.HasIndex(u => u.ContainerStatus); |
| | | |
| | | b.ApplyObjectExtensionMappings(); |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.Domain.WmsMaterials; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsMaterials; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp; |
| | | using Volo.Abp.EntityFrameworkCore.Modeling; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | |
| | | /// <summary> |
| | | /// EfCoreæ©å± |
| | | /// </summary> |
| | | public static partial class CMSPluginEfCoreExtensions |
| | | { |
| | | /// <summary> |
| | | /// Includes the details. |
| | | /// </summary> |
| | | /// <param name="queryable">The queryable.</param> |
| | | /// <param name="include">if set to <c>true</c> [include].</param> |
| | | /// <returns></returns> |
| | | public static IQueryable<WmsMaterial> IncludeDetails(this IQueryable<WmsMaterial> queryable, bool include = true) |
| | | { |
| | | if (!include) |
| | | { |
| | | return queryable; |
| | | } |
| | | |
| | | return queryable; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Configures the wmsmaterial. |
| | | /// </summary> |
| | | /// <param name="builder">The builder.</param> |
| | | public static void ConfigureWmsMaterial(this ModelBuilder builder) |
| | | { |
| | | Check.NotNull(builder, nameof(builder)); |
| | | |
| | | builder.Entity<WmsMaterial>(b => |
| | | { |
| | | // é
置表ååæ³¨é |
| | | b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsMaterials").ToLower(), |
| | | CMSPluginDbProperties.DbSchema) |
| | | .HasComment("ç©æåºç¡ä¿¡æ¯è¡¨"); |
| | | |
| | | b.ConfigureByConvention(); |
| | | |
| | | // 主é®é
ç½®ï¼FullAuditedAggregateRoot<Guid> å·²é»è®¤å
å« Idï¼ |
| | | b.HasKey(x => x.Id); |
| | | |
| | | // åæ®µé
ç½® |
| | | b.Property(x => x.MaterialCode) |
| | | .HasMaxLength(64) |
| | | .IsRequired() |
| | | .HasComment("ç©æç¼ç ï¼å¯ä¸æ è¯ï¼"); |
| | | |
| | | b.Property(x => x.MaterialName) |
| | | .HasMaxLength(128) |
| | | .IsRequired() |
| | | .HasComment("ç©æåç§°"); |
| | | |
| | | b.Property(x => x.PurchaseType) |
| | | .HasComment("éè´ç±»åï¼æä¸¾å¼ï¼"); |
| | | |
| | | b.Property(x => x.MaterialType) |
| | | .HasComment("ç©æç±»åï¼æä¸¾å¼ï¼"); |
| | | |
| | | b.Property(x => x.PrimaryUnit) |
| | | .HasMaxLength(20) |
| | | .HasComment("主åä½ï¼å¦ï¼kgãmã个ï¼"); |
| | | |
| | | b.Property(x => x.Standard) |
| | | .HasMaxLength(128) |
| | | .HasComment("è§æ ¼/æ åï¼å¦ï¼GB/T 8163-2018ï¼"); |
| | | |
| | | b.Property(x => x.OuterDiameter) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("å¤å¾ï¼åä½ï¼mmï¼"); |
| | | |
| | | b.Property(x => x.WallThickness) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("å£åï¼åä½ï¼mmï¼"); |
| | | |
| | | b.Property(x => x.MaterialQuality) |
| | | .HasMaxLength(64) |
| | | .HasComment("æè´¨ï¼å¦ï¼304ä¸éé¢ï¼"); |
| | | |
| | | b.Property(x => x.Length) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("é¿åº¦ï¼åä½ï¼mï¼"); |
| | | |
| | | b.Property(x => x.IsMainBranch) |
| | | .HasDefaultValue(false) |
| | | .HasComment("æ¯å¦ä¸ºä¸»æ¯ç®¡"); |
| | | |
| | | b.Property(x => x.Factory) |
| | | .HasMaxLength(64) |
| | | .HasComment("ç产工å"); |
| | | |
| | | b.Property(x => x.Certification) |
| | | .HasMaxLength(128) |
| | | .HasComment("è¯ä¹¦ç¼å·"); |
| | | |
| | | // åä½å段é
ç½® |
| | | b.Property(x => x.RedundantField1) |
| | | .HasMaxLength(256) |
| | | .IsRequired(false) |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property(x => x.RedundantField2) |
| | | .HasMaxLength(256) |
| | | .IsRequired(false) |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property(x => x.RedundantField3) |
| | | .HasMaxLength(256) |
| | | .IsRequired(false) |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | // å
¶ä»éç¨å段 |
| | | b.Property(x => x.Sort) |
| | | .HasDefaultValue(0) |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property(x => x.Remark) |
| | | .HasMaxLength(500) |
| | | .IsRequired(false) |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property(x => x.IsDisabled) |
| | | .IsRequired(false) |
| | | .HasDefaultValue(false) |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | // ç´¢å¼é
ç½® |
| | | b.HasIndex(x => x.MaterialCode).IsUnique(); // ç©æç¼ç å¯ä¸ç´¢å¼ |
| | | b.HasIndex(x => x.MaterialName); // ç©æåç§°æ®éç´¢å¼ |
| | | b.HasIndex(x => x.PurchaseType); // éè´ç±»åç´¢å¼ï¼å¦éæ¥è¯¢è¿æ»¤ï¼ |
| | | b.HasIndex(x => x.MaterialType); // ç©æç±»åç´¢å¼ï¼å¦éæ¥è¯¢è¿æ»¤ï¼ |
| | | |
| | | b.ApplyObjectExtensionMappings(); |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.Domain.WmsPlaces; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsPlaces; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp; |
| | | using Volo.Abp.EntityFrameworkCore.Modeling; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | |
| | | /// <summary> |
| | | /// EfCoreæ©å± |
| | | /// </summary> |
| | | public static partial class CMSPluginEfCoreExtensions |
| | | { |
| | | /// <summary> |
| | | /// Includes the details. |
| | | /// </summary> |
| | | /// <param name="queryable">The queryable.</param> |
| | | /// <param name="include">if set to <c>true</c> [include].</param> |
| | | /// <returns></returns> |
| | | public static IQueryable<WmsPlace> IncludeDetails(this IQueryable<WmsPlace> queryable, bool include = true) |
| | | { |
| | | if (!include) |
| | | { |
| | | return queryable; |
| | | } |
| | | |
| | | return queryable; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Configures the wmsplace. |
| | | /// </summary> |
| | | /// <param name="builder">The builder.</param> |
| | | public static void ConfigureWmsPlace(this ModelBuilder builder) |
| | | { |
| | | Check.NotNull(builder, nameof(builder)); |
| | | |
| | | builder.Entity<WmsPlace>(b => |
| | | { |
| | | // Configure table & schema name |
| | | b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsPlaces").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("åºä½è¡¨"); |
| | | |
| | | b.ConfigureByConvention(); |
| | | |
| | | // Properties |
| | | b.Property(x => x.PlaceNo).HasMaxLength(WmsPlaceConsts.MaxPlaceNoLength).IsRequired().HasComment("ç¼å·"); |
| | | b.Property(x => x.StorageTypeNo).HasComment("è´§ä½ç±»å"); |
| | | b.Property(x => x.PlaceStatus).HasComment("è´§ä½ç¶æ"); |
| | | b.Property(x => x.AreaCode).HasMaxLength(WmsPlaceConsts.MaxAreaCodeLength).IsRequired().HasComment("æå¨åºåº"); |
| | | b.Property(x => x.Aisle).HasComment("å··é"); |
| | | b.Property(x => x.RowNo).HasComment("æ"); |
| | | b.Property(x => x.ColumnNo).HasComment("å"); |
| | | b.Property(x => x.LayerNo).HasComment("å±"); |
| | | b.Property(x => x.Islock).HasComment("æ¯å¦éå®"); |
| | | b.Property(x => x.EmptyContainer).HasComment("æ¯å¦ç©ºæ"); |
| | | b.Property(x => x.RedundantField1).HasMaxLength(WmsPlaceConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | b.Property(x => x.RedundantField2).HasMaxLength(WmsPlaceConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | b.Property(x => x.RedundantField3).HasMaxLength(WmsPlaceConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | b.Property(x => x.Sort).HasComment("æåº"); |
| | | b.Property(x => x.Remark).HasMaxLength(WmsPlaceConsts.MaxRemarkLength).IsRequired(false).HasComment("夿³¨"); |
| | | b.Property(x => x.IsDisabled).IsRequired(false).HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | // Indexes |
| | | b.HasIndex(u => u.PlaceNo).IsUnique(); // ç¼å·å段添å å¯ä¸ç´¢å¼ |
| | | b.HasIndex(u => u.AreaCode); // æå¨åºåºåæ®µæ·»å æ®éç´¢å¼ |
| | | b.HasIndex(u => u.StorageTypeNo); // è´§ä½ç±»ååæ®µæ·»å æ®éç´¢å¼ |
| | | b.HasIndex(u => u.PlaceStatus); // è´§ä½ç±»ååæ®µæ·»å æ®éç´¢å¼ |
| | | |
| | | // Apply object extension mappings |
| | | b.ApplyObjectExtensionMappings(); |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.Domain.WmsStores; |
| | | using CMS.Plugin.HIAWms.Domain.Shared.WmsStores; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp; |
| | | using Volo.Abp.EntityFrameworkCore.Modeling; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | |
| | | /// <summary> |
| | | /// EfCoreæ©å± |
| | | /// </summary> |
| | | public static partial class CMSPluginEfCoreExtensions |
| | | { |
| | | /// <summary> |
| | | /// Includes the details. |
| | | /// </summary> |
| | | /// <param name="queryable">The queryable.</param> |
| | | /// <param name="include">if set to <c>true</c> [include].</param> |
| | | /// <returns></returns> |
| | | public static IQueryable<WmsStore> IncludeDetails(this IQueryable<WmsStore> queryable, bool include = true) |
| | | { |
| | | if (!include) |
| | | { |
| | | return queryable; |
| | | } |
| | | |
| | | return queryable; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Configures the wmsstore. |
| | | /// </summary> |
| | | /// <param name="builder">The builder.</param> |
| | | public static void ConfigureWmsStore(this ModelBuilder builder) |
| | | { |
| | | Check.NotNull(builder, nameof(builder)); |
| | | |
| | | builder.Entity<WmsStore>(b => |
| | | { |
| | | // Configure table & schema name |
| | | b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsStores").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("ä»åºä¿¡æ¯è¡¨"); |
| | | |
| | | b.ConfigureByConvention(); |
| | | |
| | | // Properties |
| | | b.Property(x => x.StoreCode).HasMaxLength(WmsStoreConsts.MaxStoreCodeLength).IsRequired(false).HasComment("ä»åºä»£ç "); |
| | | b.Property(x => x.StoreName).HasMaxLength(WmsStoreConsts.MaxStoreNameLength).IsRequired(false).HasComment("ä»åºåç§°"); |
| | | b.Property(x => x.RedundantField1).HasMaxLength(WmsStoreConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | b.Property(x => x.RedundantField2).HasMaxLength(WmsStoreConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | b.Property(x => x.RedundantField3).HasMaxLength(WmsStoreConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | b.Property(x => x.Remark).HasMaxLength(WmsStoreConsts.MaxRemarkLength).IsRequired(false).HasComment("夿³¨"); |
| | | b.Property(x => x.Sort).HasComment("æåº"); |
| | | b.Property(x => x.IsDisabled).IsRequired(false).HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | // Indexes |
| | | b.HasIndex(u => u.StoreName); |
| | | |
| | | // Apply object extension mappings |
| | | b.ApplyObjectExtensionMappings(); |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
| | | <ConfigureAwait ContinueOnCapturedContext="false" /> |
| | | </Weavers> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore |
| | | { |
| | | /// <summary> |
| | | /// æ°æ®åºä¸ä¸æ |
| | | /// </summary> |
| | | [ConnectionStringName(CMSPluginDbProperties.ConnectionStringName)] |
| | | public interface ICMSPluginDbContext : IEfCoreDbContext |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Runtime.CompilerServices; |
| | | [assembly:InternalsVisibleToAttribute("CMS.Plugin.EntityFrameworkCore.Tests")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Linq.Dynamic.Core; |
| | | using CMS.Plugin.HIAWms.Domain.WmsAreas; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.Specifications; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Repositories; |
| | | |
| | | /// <inheritdoc /> |
| | | public class EfCoreWmsAreaRepository : EfCoreRepository<ICMSPluginDbContext, WmsArea, Guid>, IWmsAreaRepository |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="EfCoreWmsAreaRepository"/> class. |
| | | /// </summary> |
| | | /// <param name="dbContextProvider">The database context provider.</param> |
| | | public EfCoreWmsAreaRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider) |
| | | : base(dbContextProvider) |
| | | { |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsArea> FindByNameAsync(string name, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .OrderBy(t => t.Sort) |
| | | .FirstOrDefaultAsync(t => t.AreaName == name, GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æ¥çåºåºæ¯å¦åå¨ |
| | | /// </summary> |
| | | /// <param name="areaNo"></param> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | public async Task<bool> NameExistAsync(string areaNo, Guid? id = null) |
| | | { |
| | | return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).AnyAsync(x => x.AreaNo == areaNo); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<int> GetMaxSortAsync() |
| | | { |
| | | var hasAny = await (await GetQueryableAsync()).AnyAsync(); |
| | | if (!hasAny) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | var sort = await (await GetQueryableAsync()).MaxAsync(x => x.Sort); |
| | | return sort + 1; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<List<WmsArea>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<WmsArea> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default) |
| | | { |
| | | specification ??= new WmsAreaSpecification(); |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails(includeDetails) |
| | | .Where(specification.ToExpression()) |
| | | .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.AreaNo.Contains(filter)) |
| | | .OrderBy(sorting.IsNullOrEmpty() ? nameof(WmsArea.Sort) : sorting) |
| | | .PageBy(skipCount, maxResultCount) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<long> GetCountAsync(string filter = null, Specification<WmsArea> specification = null, CancellationToken cancellationToken = default) |
| | | { |
| | | specification ??= new WmsAreaSpecification(); |
| | | return await (await GetQueryableAsync()) |
| | | .Where(specification.ToExpression()) |
| | | .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.AreaNo.Contains(filter)) |
| | | .CountAsync(cancellationToken: GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override async Task<IQueryable<WmsArea>> WithDetailsAsync() |
| | | { |
| | | return (await GetQueryableAsync()).IncludeDetails(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Linq.Dynamic.Core; |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainers; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.Specifications; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Repositories; |
| | | |
| | | /// <inheritdoc /> |
| | | public class EfCoreWmsContainerRepository : EfCoreRepository<ICMSPluginDbContext, WmsContainer, Guid>, IWmsContainerRepository |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="EfCoreWmsContainerRepository"/> class. |
| | | /// </summary> |
| | | /// <param name="dbContextProvider">The database context provider.</param> |
| | | public EfCoreWmsContainerRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider) |
| | | : base(dbContextProvider) |
| | | { |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsContainer> FindByNameAsync(string containerNo, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .OrderBy(t => t.Sort) |
| | | .FirstOrDefaultAsync(t => t.ContainerNo == containerNo, GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<bool> NameExistAsync(string containerNo, Guid? id = null) |
| | | { |
| | | return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).AnyAsync(x => x.ContainerNo == containerNo); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<int> GetMaxSortAsync() |
| | | { |
| | | var hasAny = await (await GetQueryableAsync()).AnyAsync(); |
| | | if (!hasAny) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | var sort = await (await GetQueryableAsync()).MaxAsync(x => x.Sort); |
| | | return sort + 1; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<List<WmsContainer>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<WmsContainer> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default) |
| | | { |
| | | specification ??= new WmsContainerSpecification(); |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails(includeDetails) |
| | | .Where(specification.ToExpression()) |
| | | .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.ContainerNo.Contains(filter)) |
| | | .OrderBy(sorting.IsNullOrEmpty() ? nameof(WmsContainer.Sort) : sorting) |
| | | .PageBy(skipCount, maxResultCount) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<long> GetCountAsync(string filter = null, Specification<WmsContainer> specification = null, CancellationToken cancellationToken = default) |
| | | { |
| | | specification ??= new WmsContainerSpecification(); |
| | | return await (await GetQueryableAsync()) |
| | | .Where(specification.ToExpression()) |
| | | .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.ContainerNo.Contains(filter)) |
| | | .CountAsync(cancellationToken: GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override async Task<IQueryable<WmsContainer>> WithDetailsAsync() |
| | | { |
| | | return (await GetQueryableAsync()).IncludeDetails(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Linq.Dynamic.Core; |
| | | using CMS.Plugin.HIAWms.Domain.WmsMaterials; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.Specifications; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Repositories; |
| | | |
| | | /// <inheritdoc /> |
| | | public class EfCoreWmsMaterialRepository : EfCoreRepository<ICMSPluginDbContext, WmsMaterial, Guid>, IWmsMaterialRepository |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="EfCoreWmsMaterialRepository"/> class. |
| | | /// </summary> |
| | | /// <param name="dbContextProvider">The database context provider.</param> |
| | | public EfCoreWmsMaterialRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider) |
| | | : base(dbContextProvider) |
| | | { |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsMaterial> FindByNameAsync(string name, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .OrderBy(t => t.Sort) |
| | | .FirstOrDefaultAsync(t => t.MaterialCode == name, GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<bool> NameExistAsync(string materialCode, Guid? id = null) |
| | | { |
| | | return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).AnyAsync(x => x.MaterialCode == materialCode); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<int> GetMaxSortAsync() |
| | | { |
| | | var hasAny = await (await GetQueryableAsync()).AnyAsync(); |
| | | if (!hasAny) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | var sort = await (await GetQueryableAsync()).MaxAsync(x => x.Sort); |
| | | return sort + 1; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<List<WmsMaterial>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<WmsMaterial> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default) |
| | | { |
| | | specification ??= new WmsMaterialSpecification(); |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails(includeDetails) |
| | | .Where(specification.ToExpression()) |
| | | .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.MaterialCode.Contains(filter)) |
| | | .OrderBy(sorting.IsNullOrEmpty() ? nameof(WmsMaterial.Sort) : sorting) |
| | | .PageBy(skipCount, maxResultCount) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<long> GetCountAsync(string filter = null, Specification<WmsMaterial> specification = null, CancellationToken cancellationToken = default) |
| | | { |
| | | specification ??= new WmsMaterialSpecification(); |
| | | return await (await GetQueryableAsync()) |
| | | .Where(specification.ToExpression()) |
| | | .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.MaterialCode.Contains(filter)) |
| | | .CountAsync(cancellationToken: GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override async Task<IQueryable<WmsMaterial>> WithDetailsAsync() |
| | | { |
| | | return (await GetQueryableAsync()).IncludeDetails(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Linq.Dynamic.Core; |
| | | using CMS.Plugin.HIAWms.Domain.WmsPlaces; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.Specifications; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Repositories; |
| | | |
| | | /// <inheritdoc /> |
| | | public class EfCoreWmsPlaceRepository : EfCoreRepository<ICMSPluginDbContext, WmsPlace, Guid>, IWmsPlaceRepository |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="EfCoreWmsPlaceRepository"/> class. |
| | | /// </summary> |
| | | /// <param name="dbContextProvider">The database context provider.</param> |
| | | public EfCoreWmsPlaceRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider) |
| | | : base(dbContextProvider) |
| | | { |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsPlace> FindByNameAsync(string name, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .OrderBy(t => t.Sort) |
| | | .FirstOrDefaultAsync(t => t.PlaceNo == name, GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<bool> NameExistAsync(string name, Guid? id = null) |
| | | { |
| | | return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).AnyAsync(x => x.PlaceNo == name); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<int> GetMaxSortAsync() |
| | | { |
| | | var hasAny = await (await GetQueryableAsync()).AnyAsync(); |
| | | if (!hasAny) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | var sort = await (await GetQueryableAsync()).MaxAsync(x => x.Sort); |
| | | return sort + 1; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<List<WmsPlace>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<WmsPlace> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default) |
| | | { |
| | | specification ??= new WmsPlaceSpecification(); |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails(includeDetails) |
| | | .Where(specification.ToExpression()) |
| | | .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.PlaceNo.Contains(filter)) |
| | | .OrderBy(sorting.IsNullOrEmpty() ? nameof(WmsPlace.Sort) : sorting) |
| | | .PageBy(skipCount, maxResultCount) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<long> GetCountAsync(string filter = null, Specification<WmsPlace> specification = null, CancellationToken cancellationToken = default) |
| | | { |
| | | specification ??= new WmsPlaceSpecification(); |
| | | return await (await GetQueryableAsync()) |
| | | .Where(specification.ToExpression()) |
| | | .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.PlaceNo.Contains(filter)) |
| | | .CountAsync(cancellationToken: GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override async Task<IQueryable<WmsPlace>> WithDetailsAsync() |
| | | { |
| | | return (await GetQueryableAsync()).IncludeDetails(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Linq.Dynamic.Core; |
| | | using CMS.Plugin.HIAWms.Domain.WmsStores; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.Specifications; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Repositories; |
| | | |
| | | /// <inheritdoc /> |
| | | public class EfCoreWmsStoreRepository : EfCoreRepository<ICMSPluginDbContext, WmsStore, Guid>, IWmsStoreRepository |
| | | { |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="EfCoreWmsStoreRepository"/> class. |
| | | /// </summary> |
| | | /// <param name="dbContextProvider">The database context provider.</param> |
| | | public EfCoreWmsStoreRepository(IDbContextProvider<ICMSPluginDbContext> dbContextProvider) |
| | | : base(dbContextProvider) |
| | | { |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<WmsStore> FindByNameAsync(string name, CancellationToken cancellationToken = default) |
| | | { |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails() |
| | | .OrderBy(t => t.Sort) |
| | | .FirstOrDefaultAsync(t => t.StoreCode == name, GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<bool> NameExistAsync(string storeCode, Guid? id = null) |
| | | { |
| | | return await (await GetDbSetAsync()).WhereIf(id.HasValue, p => p.Id != id).AnyAsync(x => x.StoreCode == storeCode); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<int> GetMaxSortAsync() |
| | | { |
| | | var hasAny = await (await GetQueryableAsync()).AnyAsync(); |
| | | if (!hasAny) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | var sort = await (await GetQueryableAsync()).MaxAsync(x => x.Sort); |
| | | return sort + 1; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<List<WmsStore>> GetListAsync(string sorting = null, int maxResultCount = int.MaxValue, int skipCount = 0, string filter = null, Specification<WmsStore> specification = null, bool includeDetails = false, CancellationToken cancellationToken = default) |
| | | { |
| | | specification ??= new WmsStoreSpecification(); |
| | | return await (await GetDbSetAsync()) |
| | | .IncludeDetails(includeDetails) |
| | | .Where(specification.ToExpression()) |
| | | .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.StoreCode.Contains(filter)) |
| | | .OrderBy(sorting.IsNullOrEmpty() ? nameof(WmsStore.Sort) : sorting) |
| | | .PageBy(skipCount, maxResultCount) |
| | | .ToListAsync(GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<long> GetCountAsync(string filter = null, Specification<WmsStore> specification = null, CancellationToken cancellationToken = default) |
| | | { |
| | | specification ??= new WmsStoreSpecification(); |
| | | return await (await GetQueryableAsync()) |
| | | .Where(specification.ToExpression()) |
| | | .WhereIf(!filter.IsNullOrWhiteSpace(), u => u.StoreCode.Contains(filter)) |
| | | .CountAsync(cancellationToken: GetCancellationToken(cancellationToken)); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override async Task<IQueryable<WmsStore>> WithDetailsAsync() |
| | | { |
| | | return (await GetQueryableAsync()).IncludeDetails(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "ConnectionStrings": { |
| | | "Default": "Server=localhost;Database=CMS.Plugin.HIAWms;User ID=root;Password=123abc.com" |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <Import Project="../../common.props" /> |
| | | <Import Project="../../configureawait.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" Version="$(ABPPackageVersion)" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.5"> |
| | | <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
| | | <PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets> |
| | | </PackageReference> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.EntityFrameworkCore\CMS.Plugin.HIAWms.EntityFrameworkCore.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.EntityFrameworkCore.Modeling; |
| | | |
| | | namespace CMS.Plugin.HIAWms.MySQL; |
| | | |
| | | /// <summary> |
| | | /// æ°æ®åºä¸ä¸æ |
| | | /// </summary> |
| | | [ConnectionStringName(CMSPluginDbProperties.ConnectionStringName)] |
| | | public class CMSPluginDbContext : AbpDbContext<CMSPluginDbContext>, ICMSPluginDbContext |
| | | { |
| | | /* Add DbSet properties for your Aggregate Roots / Entities here. */ |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="CMSPluginDbContext"/> class. |
| | | /// </summary> |
| | | /// <param name="options">The options.</param> |
| | | public CMSPluginDbContext(DbContextOptions<CMSPluginDbContext> options) |
| | | : base(options) |
| | | { |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | protected override void OnModelCreating(ModelBuilder builder) |
| | | { |
| | | base.OnModelCreating(builder); |
| | | |
| | | /* Include modules to your migration db context */ |
| | | |
| | | builder.ConfigureWmsContainer(); |
| | | builder.ConfigureWmsStore(); |
| | | builder.ConfigureWmsArea(); |
| | | builder.ConfigureWmsPlace(); |
| | | builder.ConfigureWmsMaterial(); |
| | | |
| | | /* Configure your own tables/entities inside here */ |
| | | |
| | | //builder.Entity<YourEntity>(b => |
| | | //{ |
| | | // b.ToTable(CMSPluginDbProperties.DbTablePrefix + "YourEntities", CMSPluginDbProperties.DbSchema); |
| | | // b.ConfigureByConvention(); //auto configure for the base class props |
| | | // //... |
| | | //}); |
| | | |
| | | builder.TryConfigureObjectExtensions<CMSPluginDbContext>(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore.Design; |
| | | using Microsoft.Extensions.Configuration; |
| | | |
| | | namespace CMS.Plugin.HIAWms.MySQL; |
| | | |
| | | /// <summary> |
| | | /// This class is needed for EF Core console commands |
| | | /// (like Add-Migration and Update-Database commands) |
| | | /// </summary> |
| | | public class CMSPluginDbContextFactory : IDesignTimeDbContextFactory<CMSPluginDbContext> |
| | | { |
| | | /// <summary> |
| | | /// Creates a new instance of a derived context. |
| | | /// </summary> |
| | | /// <param name="args">Arguments provided by the design-time service.</param> |
| | | public CMSPluginDbContext CreateDbContext(string[] args) |
| | | { |
| | | CMSPluginEfCoreEntityExtensionMappings.Configure(); |
| | | |
| | | var configuration = BuildConfiguration(); |
| | | |
| | | var builder = new DbContextOptionsBuilder<CMSPluginDbContext>() |
| | | .UseMySql(configuration.GetConnectionString("Default"), MySqlServerVersion.LatestSupportedServerVersion, x => x.MigrationsHistoryTable(CMSPluginDbProperties.MigrationsHistoryTable, CMSPluginDbProperties.DbSchema)); |
| | | |
| | | return new CMSPluginDbContext(builder.Options); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Builds the configuration. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private static IConfigurationRoot BuildConfiguration() |
| | | { |
| | | var builder = new ConfigurationBuilder() |
| | | .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../CMS.Plugin.HIAWms.EntityFrameworkCore/")) |
| | | .AddJsonFile("appsettings.json", optional: false); |
| | | |
| | | return builder.Build(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.Modularity; |
| | | |
| | | namespace CMS.Plugin.HIAWms.MySQL; |
| | | |
| | | /// <summary> |
| | | /// EntityFrameworkCore模å |
| | | /// </summary> |
| | | [DependsOn(typeof(CMSPluginEntityFrameworkCoreModule))] |
| | | public class CMSPluginMySQLModule : AbpModule |
| | | { |
| | | /// <inheritdoc /> |
| | | public override void PreConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | CMSPluginEfCoreEntityExtensionMappings.Configure(); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override void ConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | context.Services.AddAbpDbContext<CMSPluginDbContext>(options => |
| | | { |
| | | /* Remove "includeAllEntities: true" to create |
| | | * default repositories only for aggregate roots */ |
| | | //options.AddDefaultRepositories(includeAllEntities: true); |
| | | }); |
| | | |
| | | Configure<AbpDbContextOptions>(options => |
| | | { |
| | | /* The main point to change your DBMS. |
| | | * See also CMSMigrationsDbContextFactory for EF Core tooling. */ |
| | | options.UseMySQL(x => |
| | | { |
| | | x.MigrationsHistoryTable(CMSPluginDbProperties.MigrationsHistoryTable, CMSPluginDbProperties.DbSchema); |
| | | //x.EnableRetryOnFailure(); |
| | | }); |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
| | | <ConfigureAwait ContinueOnCapturedContext="false" /> |
| | | </Weavers> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // <auto-generated /> |
| | | using System; |
| | | using CMS.Plugin.HIAWms.MySQL; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore.Infrastructure; |
| | | using Microsoft.EntityFrameworkCore.Migrations; |
| | | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | |
| | | #nullable disable |
| | | |
| | | namespace CMS.Plugin.HIAWms.MySQL.Migrations |
| | | { |
| | | [DbContext(typeof(CMSPluginDbContext))] |
| | | [Migration("20250429025531_InitialCreate")] |
| | | partial class InitialCreate |
| | | { |
| | | protected override void BuildTargetModel(ModelBuilder modelBuilder) |
| | | { |
| | | #pragma warning disable 612, 618 |
| | | modelBuilder |
| | | .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
| | | .HasAnnotation("ProductVersion", "6.0.16") |
| | | .HasAnnotation("Relational:MaxIdentifierLength", 64); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsAreas.WmsArea", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<string>("AreaDesc") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("æè¿°"); |
| | | |
| | | b.Property<string>("AreaName") |
| | | .IsRequired() |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åºåºåç§°"); |
| | | |
| | | b.Property<string>("AreaNo") |
| | | .IsRequired() |
| | | .HasMaxLength(64) |
| | | .HasColumnType("varchar(64)") |
| | | .HasComment("åºåºç¼å·"); |
| | | |
| | | b.Property<int>("AreaStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("åºåºç¶æ"); |
| | | |
| | | b.Property<int>("AreaType") |
| | | .HasColumnType("int") |
| | | .HasComment("åºåºç±»å"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<string>("RedundantField1") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField2") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField3") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("Remark") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("StoreCode") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("ä»åºä»£ç "); |
| | | |
| | | b.Property<string>("StoreName") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("ä»åºåç§°"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("AreaName"); |
| | | |
| | | b.ToTable("scms_wmsareas", (string)null); |
| | | |
| | | b.HasComment("åºåºè¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsContainers.WmsContainer", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<string>("ContainerNo") |
| | | .IsRequired() |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("æçç¼å·"); |
| | | |
| | | b.Property<int>("ContainerStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("æçç¶æ"); |
| | | |
| | | b.Property<int>("ContainerType") |
| | | .HasColumnType("int") |
| | | .HasComment("æçç±»å"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<int?>("ExceptionNumber") |
| | | .HasColumnType("int") |
| | | .HasComment("å¼å¸¸æ°é"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<decimal?>("LimitHeight") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("éé«"); |
| | | |
| | | b.Property<decimal?>("LimitLength") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("éé¿"); |
| | | |
| | | b.Property<decimal?>("LimitWidth") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("é宽"); |
| | | |
| | | b.Property<int?>("MaterialNumber") |
| | | .HasColumnType("int") |
| | | .HasComment("ç©ææ°é"); |
| | | |
| | | b.Property<decimal?>("MaxWeight") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("è½½éä¸é"); |
| | | |
| | | b.Property<string>("RedundantField1") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField2") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField3") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("Remark") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<decimal?>("SpecHeight") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("é«åº¦"); |
| | | |
| | | b.Property<decimal?>("SpecLength") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("é¿åº¦"); |
| | | |
| | | b.Property<decimal?>("SpecWidth") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("宽度"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("ContainerNo") |
| | | .IsUnique(); |
| | | |
| | | b.HasIndex("ContainerStatus"); |
| | | |
| | | b.HasIndex("ContainerType"); |
| | | |
| | | b.ToTable("scms_wmscontainers", (string)null); |
| | | |
| | | b.HasComment("æçä¿¡æ¯è¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsMaterials.WmsMaterial", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<string>("Certification") |
| | | .HasMaxLength(128) |
| | | .HasColumnType("varchar(128)") |
| | | .HasComment("è¯ä¹¦ç¼å·"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<string>("Factory") |
| | | .HasMaxLength(64) |
| | | .HasColumnType("varchar(64)") |
| | | .HasComment("ç产工å"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<bool>("IsMainBranch") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasComment("æ¯å¦ä¸ºä¸»æ¯ç®¡"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<decimal>("Length") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("é¿åº¦ï¼åä½ï¼mï¼"); |
| | | |
| | | b.Property<string>("MaterialCode") |
| | | .IsRequired() |
| | | .HasMaxLength(64) |
| | | .HasColumnType("varchar(64)") |
| | | .HasComment("ç©æç¼ç ï¼å¯ä¸æ è¯ï¼"); |
| | | |
| | | b.Property<string>("MaterialName") |
| | | .IsRequired() |
| | | .HasMaxLength(128) |
| | | .HasColumnType("varchar(128)") |
| | | .HasComment("ç©æåç§°"); |
| | | |
| | | b.Property<string>("MaterialQuality") |
| | | .HasMaxLength(64) |
| | | .HasColumnType("varchar(64)") |
| | | .HasComment("æè´¨ï¼å¦ï¼304ä¸éé¢ï¼"); |
| | | |
| | | b.Property<int>("MaterialType") |
| | | .HasColumnType("int") |
| | | .HasComment("ç©æç±»åï¼æä¸¾å¼ï¼"); |
| | | |
| | | b.Property<decimal>("OuterDiameter") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("å¤å¾ï¼åä½ï¼mmï¼"); |
| | | |
| | | b.Property<string>("PrimaryUnit") |
| | | .HasMaxLength(20) |
| | | .HasColumnType("varchar(20)") |
| | | .HasComment("主åä½ï¼å¦ï¼kgãmã个ï¼"); |
| | | |
| | | b.Property<int>("PurchaseType") |
| | | .HasColumnType("int") |
| | | .HasComment("éè´ç±»åï¼æä¸¾å¼ï¼"); |
| | | |
| | | b.Property<string>("RedundantField1") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField2") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField3") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("Remark") |
| | | .HasMaxLength(500) |
| | | .HasColumnType("varchar(500)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("int") |
| | | .HasDefaultValue(0) |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("Standard") |
| | | .HasMaxLength(128) |
| | | .HasColumnType("varchar(128)") |
| | | .HasComment("è§æ ¼/æ åï¼å¦ï¼GB/T 8163-2018ï¼"); |
| | | |
| | | b.Property<decimal>("WallThickness") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("å£åï¼åä½ï¼mmï¼"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("MaterialCode") |
| | | .IsUnique(); |
| | | |
| | | b.HasIndex("MaterialName"); |
| | | |
| | | b.HasIndex("MaterialType"); |
| | | |
| | | b.HasIndex("PurchaseType"); |
| | | |
| | | b.ToTable("scms_wmsmaterials", (string)null); |
| | | |
| | | b.HasComment("ç©æåºç¡ä¿¡æ¯è¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsPlaces.WmsPlace", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<int>("Aisle") |
| | | .HasColumnType("int") |
| | | .HasComment("å··é"); |
| | | |
| | | b.Property<string>("AreaCode") |
| | | .IsRequired() |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("æå¨åºåº"); |
| | | |
| | | b.Property<int>("ColumnNo") |
| | | .HasColumnType("int") |
| | | .HasComment("å"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<int>("EmptyContainer") |
| | | .HasColumnType("int") |
| | | .HasComment("æ¯å¦ç©ºæ"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<int>("Islock") |
| | | .HasColumnType("int") |
| | | .HasComment("æ¯å¦éå®"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<int>("LayerNo") |
| | | .HasColumnType("int") |
| | | .HasComment("å±"); |
| | | |
| | | b.Property<string>("PlaceNo") |
| | | .IsRequired() |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("ç¼å·"); |
| | | |
| | | b.Property<int>("PlaceStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("è´§ä½ç¶æ"); |
| | | |
| | | b.Property<string>("RedundantField1") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField2") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField3") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("Remark") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("RowNo") |
| | | .HasColumnType("int") |
| | | .HasComment("æ"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<int>("StorageTypeNo") |
| | | .HasColumnType("int") |
| | | .HasComment("è´§ä½ç±»å"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("AreaCode"); |
| | | |
| | | b.HasIndex("PlaceNo") |
| | | .IsUnique(); |
| | | |
| | | b.HasIndex("PlaceStatus"); |
| | | |
| | | b.HasIndex("StorageTypeNo"); |
| | | |
| | | b.ToTable("scms_wmsplaces", (string)null); |
| | | |
| | | b.HasComment("åºä½è¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsStores.WmsStore", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<string>("RedundantField1") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField2") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField3") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("Remark") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("StoreCode") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("ä»åºä»£ç "); |
| | | |
| | | b.Property<string>("StoreName") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("ä»åºåç§°"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("StoreName"); |
| | | |
| | | b.ToTable("scms_wmsstores", (string)null); |
| | | |
| | | b.HasComment("ä»åºä¿¡æ¯è¡¨"); |
| | | }); |
| | | #pragma warning restore 612, 618 |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using Microsoft.EntityFrameworkCore.Migrations; |
| | | |
| | | #nullable disable |
| | | |
| | | namespace CMS.Plugin.HIAWms.MySQL.Migrations |
| | | { |
| | | public partial class InitialCreate : Migration |
| | | { |
| | | protected override void Up(MigrationBuilder migrationBuilder) |
| | | { |
| | | migrationBuilder.AlterDatabase() |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateTable( |
| | | name: "scms_wmsareas", |
| | | columns: table => new |
| | | { |
| | | Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
| | | AreaNo = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "åºåºç¼å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | AreaName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "åºåºåç§°") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | AreaDesc = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "æè¿°") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | AreaStatus = table.Column<int>(type: "int", nullable: false, comment: "åºåºç¶æ"), |
| | | AreaType = table.Column<int>(type: "int", nullable: false, comment: "åºåºç±»å"), |
| | | RedundantField1 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "åä½å段1 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField2 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "åä½å段2 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField3 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "åä½å段3 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | StoreCode = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "ä»åºä»£ç ") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | StoreName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "ä»åºåç§°") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Sort = table.Column<int>(type: "int", nullable: false, comment: "æåº"), |
| | | Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "夿³¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "æ¯å¦ç¦ç¨"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
| | | CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
| | | LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
| | | DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
| | | }, |
| | | constraints: table => |
| | | { |
| | | table.PrimaryKey("PK_scms_wmsareas", x => x.Id); |
| | | }, |
| | | comment: "åºåºè¡¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateTable( |
| | | name: "scms_wmscontainers", |
| | | columns: table => new |
| | | { |
| | | Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
| | | ContainerNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "æçç¼å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ContainerType = table.Column<int>(type: "int", nullable: false, comment: "æçç±»å"), |
| | | ContainerStatus = table.Column<int>(type: "int", nullable: false, comment: "æçç¶æ"), |
| | | SpecLength = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "é¿åº¦"), |
| | | SpecWidth = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "宽度"), |
| | | SpecHeight = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "é«åº¦"), |
| | | LimitLength = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "éé¿"), |
| | | LimitWidth = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "é宽"), |
| | | LimitHeight = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "éé«"), |
| | | MaxWeight = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true, comment: "è½½éä¸é"), |
| | | ExceptionNumber = table.Column<int>(type: "int", nullable: true, comment: "å¼å¸¸æ°é"), |
| | | MaterialNumber = table.Column<int>(type: "int", nullable: true, comment: "ç©ææ°é"), |
| | | RedundantField1 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "åä½å段1 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField2 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "åä½å段2 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField3 = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "åä½å段3 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Sort = table.Column<int>(type: "int", nullable: false, comment: "æåº"), |
| | | Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "夿³¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "æ¯å¦ç¦ç¨"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
| | | CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
| | | LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
| | | DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
| | | }, |
| | | constraints: table => |
| | | { |
| | | table.PrimaryKey("PK_scms_wmscontainers", x => x.Id); |
| | | }, |
| | | comment: "æçä¿¡æ¯è¡¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateTable( |
| | | name: "scms_wmsmaterials", |
| | | columns: table => new |
| | | { |
| | | Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
| | | MaterialCode = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "ç©æç¼ç ï¼å¯ä¸æ è¯ï¼") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | MaterialName = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false, comment: "ç©æåç§°") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | PurchaseType = table.Column<int>(type: "int", nullable: false, comment: "éè´ç±»åï¼æä¸¾å¼ï¼"), |
| | | MaterialType = table.Column<int>(type: "int", nullable: false, comment: "ç©æç±»åï¼æä¸¾å¼ï¼"), |
| | | PrimaryUnit = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "主åä½ï¼å¦ï¼kgãmã个ï¼") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Standard = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true, comment: "è§æ ¼/æ åï¼å¦ï¼GB/T 8163-2018ï¼") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | OuterDiameter = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "å¤å¾ï¼åä½ï¼mmï¼"), |
| | | WallThickness = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "å£åï¼åä½ï¼mmï¼"), |
| | | MaterialQuality = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "æè´¨ï¼å¦ï¼304ä¸éé¢ï¼") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Length = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "é¿åº¦ï¼åä½ï¼mï¼"), |
| | | IsMainBranch = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "æ¯å¦ä¸ºä¸»æ¯ç®¡"), |
| | | Factory = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "ç产工å") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Certification = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: true, comment: "è¯ä¹¦ç¼å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField1 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "åä½å段1 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField2 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "åä½å段2 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField3 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "åä½å段3 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Sort = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "æåº"), |
| | | Remark = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "夿³¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, defaultValue: false, comment: "æ¯å¦ç¦ç¨"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
| | | CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
| | | LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
| | | DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
| | | }, |
| | | constraints: table => |
| | | { |
| | | table.PrimaryKey("PK_scms_wmsmaterials", x => x.Id); |
| | | }, |
| | | comment: "ç©æåºç¡ä¿¡æ¯è¡¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateTable( |
| | | name: "scms_wmsplaces", |
| | | columns: table => new |
| | | { |
| | | Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
| | | PlaceNo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "ç¼å·") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | StorageTypeNo = table.Column<int>(type: "int", nullable: false, comment: "è´§ä½ç±»å"), |
| | | PlaceStatus = table.Column<int>(type: "int", nullable: false, comment: "è´§ä½ç¶æ"), |
| | | AreaCode = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "æå¨åºåº") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Aisle = table.Column<int>(type: "int", nullable: false, comment: "å··é"), |
| | | RowNo = table.Column<int>(type: "int", nullable: false, comment: "æ"), |
| | | ColumnNo = table.Column<int>(type: "int", nullable: false, comment: "å"), |
| | | LayerNo = table.Column<int>(type: "int", nullable: false, comment: "å±"), |
| | | Islock = table.Column<int>(type: "int", nullable: false, comment: "æ¯å¦éå®"), |
| | | EmptyContainer = table.Column<int>(type: "int", nullable: false, comment: "æ¯å¦ç©ºæ"), |
| | | RedundantField1 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "åä½å段1 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField2 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "åä½å段2 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField3 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "åä½å段3 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Sort = table.Column<int>(type: "int", nullable: false, comment: "æåº"), |
| | | Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "夿³¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "æ¯å¦ç¦ç¨"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
| | | CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
| | | LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
| | | DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
| | | }, |
| | | constraints: table => |
| | | { |
| | | table.PrimaryKey("PK_scms_wmsplaces", x => x.Id); |
| | | }, |
| | | comment: "åºä½è¡¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateTable( |
| | | name: "scms_wmsstores", |
| | | columns: table => new |
| | | { |
| | | Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"), |
| | | StoreCode = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "ä»åºä»£ç ") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | StoreName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "ä»åºåç§°") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField1 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "åä½å段1 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField2 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "åä½å段2 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | RedundantField3 = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "åä½å段3 - é¢çæ©å±ç¨é") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "夿³¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | Sort = table.Column<int>(type: "int", nullable: false, comment: "æåº"), |
| | | IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "æ¯å¦ç¦ç¨"), |
| | | ExtraProperties = table.Column<string>(type: "longtext", nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true) |
| | | .Annotation("MySql:CharSet", "utf8mb4"), |
| | | CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false), |
| | | CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true), |
| | | LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false), |
| | | DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"), |
| | | DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true) |
| | | }, |
| | | constraints: table => |
| | | { |
| | | table.PrimaryKey("PK_scms_wmsstores", x => x.Id); |
| | | }, |
| | | comment: "ä»åºä¿¡æ¯è¡¨") |
| | | .Annotation("MySql:CharSet", "utf8mb4"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsareas_AreaName", |
| | | table: "scms_wmsareas", |
| | | column: "AreaName"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmscontainers_ContainerNo", |
| | | table: "scms_wmscontainers", |
| | | column: "ContainerNo", |
| | | unique: true); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmscontainers_ContainerStatus", |
| | | table: "scms_wmscontainers", |
| | | column: "ContainerStatus"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmscontainers_ContainerType", |
| | | table: "scms_wmscontainers", |
| | | column: "ContainerType"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsmaterials_MaterialCode", |
| | | table: "scms_wmsmaterials", |
| | | column: "MaterialCode", |
| | | unique: true); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsmaterials_MaterialName", |
| | | table: "scms_wmsmaterials", |
| | | column: "MaterialName"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsmaterials_MaterialType", |
| | | table: "scms_wmsmaterials", |
| | | column: "MaterialType"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsmaterials_PurchaseType", |
| | | table: "scms_wmsmaterials", |
| | | column: "PurchaseType"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsplaces_AreaCode", |
| | | table: "scms_wmsplaces", |
| | | column: "AreaCode"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsplaces_PlaceNo", |
| | | table: "scms_wmsplaces", |
| | | column: "PlaceNo", |
| | | unique: true); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsplaces_PlaceStatus", |
| | | table: "scms_wmsplaces", |
| | | column: "PlaceStatus"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsplaces_StorageTypeNo", |
| | | table: "scms_wmsplaces", |
| | | column: "StorageTypeNo"); |
| | | |
| | | migrationBuilder.CreateIndex( |
| | | name: "IX_scms_wmsstores_StoreName", |
| | | table: "scms_wmsstores", |
| | | column: "StoreName"); |
| | | } |
| | | |
| | | protected override void Down(MigrationBuilder migrationBuilder) |
| | | { |
| | | migrationBuilder.DropTable( |
| | | name: "scms_wmsareas"); |
| | | |
| | | migrationBuilder.DropTable( |
| | | name: "scms_wmscontainers"); |
| | | |
| | | migrationBuilder.DropTable( |
| | | name: "scms_wmsmaterials"); |
| | | |
| | | migrationBuilder.DropTable( |
| | | name: "scms_wmsplaces"); |
| | | |
| | | migrationBuilder.DropTable( |
| | | name: "scms_wmsstores"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // <auto-generated /> |
| | | using System; |
| | | using CMS.Plugin.HIAWms.MySQL; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore.Infrastructure; |
| | | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | |
| | | #nullable disable |
| | | |
| | | namespace CMS.Plugin.HIAWms.MySQL.Migrations |
| | | { |
| | | [DbContext(typeof(CMSPluginDbContext))] |
| | | partial class CMSPluginDbContextModelSnapshot : ModelSnapshot |
| | | { |
| | | protected override void BuildModel(ModelBuilder modelBuilder) |
| | | { |
| | | #pragma warning disable 612, 618 |
| | | modelBuilder |
| | | .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
| | | .HasAnnotation("ProductVersion", "6.0.16") |
| | | .HasAnnotation("Relational:MaxIdentifierLength", 64); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsAreas.WmsArea", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<string>("AreaDesc") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("æè¿°"); |
| | | |
| | | b.Property<string>("AreaName") |
| | | .IsRequired() |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åºåºåç§°"); |
| | | |
| | | b.Property<string>("AreaNo") |
| | | .IsRequired() |
| | | .HasMaxLength(64) |
| | | .HasColumnType("varchar(64)") |
| | | .HasComment("åºåºç¼å·"); |
| | | |
| | | b.Property<int>("AreaStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("åºåºç¶æ"); |
| | | |
| | | b.Property<int>("AreaType") |
| | | .HasColumnType("int") |
| | | .HasComment("åºåºç±»å"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<string>("RedundantField1") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField2") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField3") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("Remark") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("StoreCode") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("ä»åºä»£ç "); |
| | | |
| | | b.Property<string>("StoreName") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("ä»åºåç§°"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("AreaName"); |
| | | |
| | | b.ToTable("scms_wmsareas", (string)null); |
| | | |
| | | b.HasComment("åºåºè¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsContainers.WmsContainer", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<string>("ContainerNo") |
| | | .IsRequired() |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("æçç¼å·"); |
| | | |
| | | b.Property<int>("ContainerStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("æçç¶æ"); |
| | | |
| | | b.Property<int>("ContainerType") |
| | | .HasColumnType("int") |
| | | .HasComment("æçç±»å"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<int?>("ExceptionNumber") |
| | | .HasColumnType("int") |
| | | .HasComment("å¼å¸¸æ°é"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<decimal?>("LimitHeight") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("éé«"); |
| | | |
| | | b.Property<decimal?>("LimitLength") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("éé¿"); |
| | | |
| | | b.Property<decimal?>("LimitWidth") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("é宽"); |
| | | |
| | | b.Property<int?>("MaterialNumber") |
| | | .HasColumnType("int") |
| | | .HasComment("ç©ææ°é"); |
| | | |
| | | b.Property<decimal?>("MaxWeight") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("è½½éä¸é"); |
| | | |
| | | b.Property<string>("RedundantField1") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField2") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField3") |
| | | .HasMaxLength(200) |
| | | .HasColumnType("varchar(200)") |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("Remark") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<decimal?>("SpecHeight") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("é«åº¦"); |
| | | |
| | | b.Property<decimal?>("SpecLength") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("é¿åº¦"); |
| | | |
| | | b.Property<decimal?>("SpecWidth") |
| | | .HasPrecision(18, 2) |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("宽度"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("ContainerNo") |
| | | .IsUnique(); |
| | | |
| | | b.HasIndex("ContainerStatus"); |
| | | |
| | | b.HasIndex("ContainerType"); |
| | | |
| | | b.ToTable("scms_wmscontainers", (string)null); |
| | | |
| | | b.HasComment("æçä¿¡æ¯è¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsMaterials.WmsMaterial", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<string>("Certification") |
| | | .HasMaxLength(128) |
| | | .HasColumnType("varchar(128)") |
| | | .HasComment("è¯ä¹¦ç¼å·"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<string>("Factory") |
| | | .HasMaxLength(64) |
| | | .HasColumnType("varchar(64)") |
| | | .HasComment("ç产工å"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<bool>("IsMainBranch") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasComment("æ¯å¦ä¸ºä¸»æ¯ç®¡"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<decimal>("Length") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("é¿åº¦ï¼åä½ï¼mï¼"); |
| | | |
| | | b.Property<string>("MaterialCode") |
| | | .IsRequired() |
| | | .HasMaxLength(64) |
| | | .HasColumnType("varchar(64)") |
| | | .HasComment("ç©æç¼ç ï¼å¯ä¸æ è¯ï¼"); |
| | | |
| | | b.Property<string>("MaterialName") |
| | | .IsRequired() |
| | | .HasMaxLength(128) |
| | | .HasColumnType("varchar(128)") |
| | | .HasComment("ç©æåç§°"); |
| | | |
| | | b.Property<string>("MaterialQuality") |
| | | .HasMaxLength(64) |
| | | .HasColumnType("varchar(64)") |
| | | .HasComment("æè´¨ï¼å¦ï¼304ä¸éé¢ï¼"); |
| | | |
| | | b.Property<int>("MaterialType") |
| | | .HasColumnType("int") |
| | | .HasComment("ç©æç±»åï¼æä¸¾å¼ï¼"); |
| | | |
| | | b.Property<decimal>("OuterDiameter") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("å¤å¾ï¼åä½ï¼mmï¼"); |
| | | |
| | | b.Property<string>("PrimaryUnit") |
| | | .HasMaxLength(20) |
| | | .HasColumnType("varchar(20)") |
| | | .HasComment("主åä½ï¼å¦ï¼kgãmã个ï¼"); |
| | | |
| | | b.Property<int>("PurchaseType") |
| | | .HasColumnType("int") |
| | | .HasComment("éè´ç±»åï¼æä¸¾å¼ï¼"); |
| | | |
| | | b.Property<string>("RedundantField1") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField2") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField3") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("Remark") |
| | | .HasMaxLength(500) |
| | | .HasColumnType("varchar(500)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("int") |
| | | .HasDefaultValue(0) |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("Standard") |
| | | .HasMaxLength(128) |
| | | .HasColumnType("varchar(128)") |
| | | .HasComment("è§æ ¼/æ åï¼å¦ï¼GB/T 8163-2018ï¼"); |
| | | |
| | | b.Property<decimal>("WallThickness") |
| | | .HasColumnType("decimal(18,2)") |
| | | .HasComment("å£åï¼åä½ï¼mmï¼"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("MaterialCode") |
| | | .IsUnique(); |
| | | |
| | | b.HasIndex("MaterialName"); |
| | | |
| | | b.HasIndex("MaterialType"); |
| | | |
| | | b.HasIndex("PurchaseType"); |
| | | |
| | | b.ToTable("scms_wmsmaterials", (string)null); |
| | | |
| | | b.HasComment("ç©æåºç¡ä¿¡æ¯è¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsPlaces.WmsPlace", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<int>("Aisle") |
| | | .HasColumnType("int") |
| | | .HasComment("å··é"); |
| | | |
| | | b.Property<string>("AreaCode") |
| | | .IsRequired() |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("æå¨åºåº"); |
| | | |
| | | b.Property<int>("ColumnNo") |
| | | .HasColumnType("int") |
| | | .HasComment("å"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<int>("EmptyContainer") |
| | | .HasColumnType("int") |
| | | .HasComment("æ¯å¦ç©ºæ"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<int>("Islock") |
| | | .HasColumnType("int") |
| | | .HasComment("æ¯å¦éå®"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<int>("LayerNo") |
| | | .HasColumnType("int") |
| | | .HasComment("å±"); |
| | | |
| | | b.Property<string>("PlaceNo") |
| | | .IsRequired() |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("ç¼å·"); |
| | | |
| | | b.Property<int>("PlaceStatus") |
| | | .HasColumnType("int") |
| | | .HasComment("è´§ä½ç¶æ"); |
| | | |
| | | b.Property<string>("RedundantField1") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField2") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField3") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("Remark") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("RowNo") |
| | | .HasColumnType("int") |
| | | .HasComment("æ"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<int>("StorageTypeNo") |
| | | .HasColumnType("int") |
| | | .HasComment("è´§ä½ç±»å"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("AreaCode"); |
| | | |
| | | b.HasIndex("PlaceNo") |
| | | .IsUnique(); |
| | | |
| | | b.HasIndex("PlaceStatus"); |
| | | |
| | | b.HasIndex("StorageTypeNo"); |
| | | |
| | | b.ToTable("scms_wmsplaces", (string)null); |
| | | |
| | | b.HasComment("åºä½è¡¨"); |
| | | }); |
| | | |
| | | modelBuilder.Entity("CMS.Plugin.HIAWms.Domain.WmsStores.WmsStore", b => |
| | | { |
| | | b.Property<Guid>("Id") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("char(36)"); |
| | | |
| | | b.Property<string>("ConcurrencyStamp") |
| | | .IsConcurrencyToken() |
| | | .HasMaxLength(40) |
| | | .HasColumnType("varchar(40)") |
| | | .HasColumnName("ConcurrencyStamp"); |
| | | |
| | | b.Property<DateTime>("CreationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("CreationTime"); |
| | | |
| | | b.Property<Guid?>("CreatorId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("CreatorId"); |
| | | |
| | | b.Property<Guid?>("DeleterId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("DeleterId"); |
| | | |
| | | b.Property<DateTime?>("DeletionTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("DeletionTime"); |
| | | |
| | | b.Property<string>("ExtraProperties") |
| | | .HasColumnType("longtext") |
| | | .HasColumnName("ExtraProperties"); |
| | | |
| | | b.Property<bool>("IsDeleted") |
| | | .ValueGeneratedOnAdd() |
| | | .HasColumnType("tinyint(1)") |
| | | .HasDefaultValue(false) |
| | | .HasColumnName("IsDeleted"); |
| | | |
| | | b.Property<bool?>("IsDisabled") |
| | | .HasColumnType("tinyint(1)") |
| | | .HasComment("æ¯å¦ç¦ç¨"); |
| | | |
| | | b.Property<DateTime?>("LastModificationTime") |
| | | .HasColumnType("datetime(6)") |
| | | .HasColumnName("LastModificationTime"); |
| | | |
| | | b.Property<Guid?>("LastModifierId") |
| | | .HasColumnType("char(36)") |
| | | .HasColumnName("LastModifierId"); |
| | | |
| | | b.Property<string>("RedundantField1") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段1 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField2") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段2 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("RedundantField3") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("åä½å段3 - é¢çæ©å±ç¨é"); |
| | | |
| | | b.Property<string>("Remark") |
| | | .HasMaxLength(256) |
| | | .HasColumnType("varchar(256)") |
| | | .HasComment("夿³¨"); |
| | | |
| | | b.Property<int>("Sort") |
| | | .HasColumnType("int") |
| | | .HasComment("æåº"); |
| | | |
| | | b.Property<string>("StoreCode") |
| | | .HasMaxLength(50) |
| | | .HasColumnType("varchar(50)") |
| | | .HasComment("ä»åºä»£ç "); |
| | | |
| | | b.Property<string>("StoreName") |
| | | .HasMaxLength(100) |
| | | .HasColumnType("varchar(100)") |
| | | .HasComment("ä»åºåç§°"); |
| | | |
| | | b.HasKey("Id"); |
| | | |
| | | b.HasIndex("StoreName"); |
| | | |
| | | b.ToTable("scms_wmsstores", (string)null); |
| | | |
| | | b.HasComment("ä»åºä¿¡æ¯è¡¨"); |
| | | }); |
| | | #pragma warning restore 612, 618 |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Runtime.CompilerServices; |
| | | [assembly:InternalsVisibleToAttribute("CMS.Plugin.EntityFrameworkCore.Tests")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | cd ../ |
| | | dotnet ef database update -c CMSPluginDbContext |
| | | cmd |
¶Ô±ÈÐÂÎļþ |
| | |
| | | cd ../ |
| | | dotnet ef migrations add InitialCreate -c CMSPluginDbContext -o Migrations |
| | | ::dotnet ef migrations add Update1 -c CMSPluginDbContext -o Migrations |
| | | ::dotnet ef migrations add Update2 -c CMSPluginDbContext -o Migrations |
| | | ::dotnet ef migrations add Update3 -c CMSPluginDbContext -o Migrations |
| | | cmd |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <Import Project="../../common.props" /> |
| | | <Import Project="../../configureawait.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="$(ABPPackageVersion)" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.5"> |
| | | <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
| | | <PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets> |
| | | </PackageReference> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.EntityFrameworkCore\CMS.Plugin.HIAWms.EntityFrameworkCore.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="Migrations\" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.EntityFrameworkCore.Modeling; |
| | | |
| | | namespace CMS.Plugin.HIAWms.PostgreSql; |
| | | |
| | | /// <summary> |
| | | /// æ°æ®åºä¸ä¸æ |
| | | /// </summary> |
| | | [ConnectionStringName(CMSPluginDbProperties.ConnectionStringName)] |
| | | public class CMSPluginDbContext : AbpDbContext<CMSPluginDbContext>, ICMSPluginDbContext |
| | | { |
| | | /* Add DbSet properties for your Aggregate Roots / Entities here. */ |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="CMSPluginDbContext"/> class. |
| | | /// </summary> |
| | | /// <param name="options">The options.</param> |
| | | public CMSPluginDbContext(DbContextOptions<CMSPluginDbContext> options) |
| | | : base(options) |
| | | { |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | protected override void OnModelCreating(ModelBuilder builder) |
| | | { |
| | | base.OnModelCreating(builder); |
| | | |
| | | /* Include modules to your migration db context */ |
| | | |
| | | builder.ConfigureWmsContainer(); |
| | | builder.ConfigureWmsStore(); |
| | | builder.ConfigureWmsArea(); |
| | | builder.ConfigureWmsPlace(); |
| | | builder.ConfigureWmsMaterial(); |
| | | /* Configure your own tables/entities inside here */ |
| | | |
| | | //builder.Entity<YourEntity>(b => |
| | | //{ |
| | | // b.ToTable(CMSPluginDbProperties.DbTablePrefix + "YourEntities", CMSPluginDbProperties.DbSchema); |
| | | // b.ConfigureByConvention(); //auto configure for the base class props |
| | | // //... |
| | | //}); |
| | | |
| | | builder.TryConfigureObjectExtensions<CMSPluginDbContext>(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore.Design; |
| | | using Microsoft.Extensions.Configuration; |
| | | |
| | | namespace CMS.Plugin.HIAWms.PostgreSql; |
| | | |
| | | /// <summary> |
| | | /// This class is needed for EF Core console commands |
| | | /// (like Add-Migration and Update-Database commands) |
| | | /// </summary> |
| | | public class CMSPluginDbContextFactory : IDesignTimeDbContextFactory<CMSPluginDbContext> |
| | | { |
| | | /// <summary> |
| | | /// Creates a new instance of a derived context. |
| | | /// </summary> |
| | | /// <param name="args">Arguments provided by the design-time service.</param> |
| | | public CMSPluginDbContext CreateDbContext(string[] args) |
| | | { |
| | | CMSPluginEfCoreEntityExtensionMappings.Configure(); |
| | | |
| | | var configuration = BuildConfiguration(); |
| | | |
| | | var builder = new DbContextOptionsBuilder<CMSPluginDbContext>() |
| | | .UseNpgsql(configuration.GetConnectionString("Default"), x => x.MigrationsHistoryTable(CMSPluginDbProperties.MigrationsHistoryTable, CMSPluginDbProperties.DbSchema)); |
| | | |
| | | return new CMSPluginDbContext(builder.Options); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Builds the configuration. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private static IConfigurationRoot BuildConfiguration() |
| | | { |
| | | var builder = new ConfigurationBuilder() |
| | | .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../CMS.Plugin.HIAWms.EntityFrameworkCore/")) |
| | | .AddJsonFile("appsettings.json", optional: false); |
| | | |
| | | return builder.Build(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.Modularity; |
| | | |
| | | namespace CMS.Plugin.HIAWms.PostgreSql; |
| | | |
| | | /// <summary> |
| | | /// EntityFrameworkCore模å |
| | | /// </summary> |
| | | [DependsOn(typeof(CMSPluginEntityFrameworkCoreModule))] |
| | | public class CMSPluginPostgreSqlModule : AbpModule |
| | | { |
| | | /// <inheritdoc /> |
| | | public override void PreConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | CMSPluginEfCoreEntityExtensionMappings.Configure(); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override void ConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | context.Services.AddAbpDbContext<CMSPluginDbContext>(options => |
| | | { |
| | | /* Remove "includeAllEntities: true" to create |
| | | * default repositories only for aggregate roots */ |
| | | //options.AddDefaultRepositories(includeAllEntities: true); |
| | | }); |
| | | |
| | | Configure<AbpDbContextOptions>(options => |
| | | { |
| | | /* The main point to change your DBMS. |
| | | * See also CMSMigrationsDbContextFactory for EF Core tooling. */ |
| | | options.UseNpgsql(x => |
| | | { |
| | | x.MigrationsHistoryTable(CMSPluginDbProperties.MigrationsHistoryTable, CMSPluginDbProperties.DbSchema); |
| | | //x.EnableRetryOnFailure(); |
| | | }); |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
| | | <ConfigureAwait ContinueOnCapturedContext="false" /> |
| | | </Weavers> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Runtime.CompilerServices; |
| | | [assembly:InternalsVisibleToAttribute("CMS.Plugin.EntityFrameworkCore.Tests")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | cd ../ |
| | | dotnet ef database update -c CMSPluginDbContext |
| | | cmd |
¶Ô±ÈÐÂÎļþ |
| | |
| | | cd ../ |
| | | dotnet ef migrations add InitialCreate -c CMSPluginDbContext -o Migrations |
| | | ::dotnet ef migrations add Update1 -c CMSPluginDbContext -o Migrations |
| | | ::dotnet ef migrations add Update2 -c CMSPluginDbContext -o Migrations |
| | | ::dotnet ef migrations add Update3 -c CMSPluginDbContext -o Migrations |
| | | cmd |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <Import Project="../../common.props" /> |
| | | <Import Project="../../configureawait.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="$(ABPPackageVersion)" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.5"> |
| | | <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> |
| | | <PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets> |
| | | </PackageReference> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.EntityFrameworkCore\CMS.Plugin.HIAWms.EntityFrameworkCore.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="Migrations\" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.EntityFrameworkCore.Modeling; |
| | | |
| | | namespace CMS.Plugin.HIAWms.SqlServer; |
| | | |
| | | /// <summary> |
| | | /// æ°æ®åºä¸ä¸æ |
| | | /// </summary> |
| | | [ConnectionStringName(CMSPluginDbProperties.ConnectionStringName)] |
| | | public class CMSPluginDbContext : AbpDbContext<CMSPluginDbContext>, ICMSPluginDbContext |
| | | { |
| | | /* Add DbSet properties for your Aggregate Roots / Entities here. */ |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="CMSPluginDbContext"/> class. |
| | | /// </summary> |
| | | /// <param name="options">The options.</param> |
| | | public CMSPluginDbContext(DbContextOptions<CMSPluginDbContext> options) |
| | | : base(options) |
| | | { |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | protected override void OnModelCreating(ModelBuilder builder) |
| | | { |
| | | base.OnModelCreating(builder); |
| | | |
| | | /* Include modules to your migration db context */ |
| | | |
| | | builder.ConfigureWmsContainer(); |
| | | builder.ConfigureWmsStore(); |
| | | builder.ConfigureWmsArea(); |
| | | builder.ConfigureWmsPlace(); |
| | | builder.ConfigureWmsMaterial(); |
| | | |
| | | /* Configure your own tables/entities inside here */ |
| | | |
| | | //builder.Entity<YourEntity>(b => |
| | | //{ |
| | | // b.ToTable(CMSPluginDbProperties.DbTablePrefix + "YourEntities", CMSPluginDbProperties.DbSchema); |
| | | // b.ConfigureByConvention(); //auto configure for the base class props |
| | | // //... |
| | | //}); |
| | | |
| | | builder.TryConfigureObjectExtensions<CMSPluginDbContext>(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore.Design; |
| | | using Microsoft.Extensions.Configuration; |
| | | |
| | | namespace CMS.Plugin.HIAWms.SqlServer; |
| | | |
| | | /// <summary> |
| | | /// This class is needed for EF Core console commands |
| | | /// (like Add-Migration and Update-Database commands) |
| | | /// </summary> |
| | | public class CMSPluginDbContextFactory : IDesignTimeDbContextFactory<CMSPluginDbContext> |
| | | { |
| | | /// <summary> |
| | | /// Creates a new instance of a derived context. |
| | | /// </summary> |
| | | /// <param name="args">Arguments provided by the design-time service.</param> |
| | | public CMSPluginDbContext CreateDbContext(string[] args) |
| | | { |
| | | CMSPluginEfCoreEntityExtensionMappings.Configure(); |
| | | |
| | | var configuration = BuildConfiguration(); |
| | | |
| | | var builder = new DbContextOptionsBuilder<CMSPluginDbContext>() |
| | | .UseSqlServer(configuration.GetConnectionString("Default"), x => x.MigrationsHistoryTable(CMSPluginDbProperties.MigrationsHistoryTable, CMSPluginDbProperties.DbSchema)); |
| | | |
| | | return new CMSPluginDbContext(builder.Options); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Builds the configuration. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private static IConfigurationRoot BuildConfiguration() |
| | | { |
| | | var builder = new ConfigurationBuilder() |
| | | .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../CMS.Plugin.HIAWms.EntityFrameworkCore/")) |
| | | .AddJsonFile("appsettings.json", optional: false); |
| | | |
| | | return builder.Build(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Volo.Abp.EntityFrameworkCore; |
| | | using Volo.Abp.Modularity; |
| | | |
| | | namespace CMS.Plugin.HIAWms.SqlServer; |
| | | |
| | | /// <summary> |
| | | /// EntityFrameworkCore模å |
| | | /// </summary> |
| | | [DependsOn(typeof(CMSPluginEntityFrameworkCoreModule))] |
| | | public class CMSPluginSqlServerModule : AbpModule |
| | | { |
| | | /// <inheritdoc /> |
| | | public override void PreConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | CMSPluginEfCoreEntityExtensionMappings.Configure(); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override void ConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | context.Services.AddAbpDbContext<CMSPluginDbContext>(options => |
| | | { |
| | | /* Remove "includeAllEntities: true" to create |
| | | * default repositories only for aggregate roots */ |
| | | //options.AddDefaultRepositories(includeAllEntities: true); |
| | | }); |
| | | |
| | | Configure<AbpDbContextOptions>(options => |
| | | { |
| | | /* The main point to change your DBMS. |
| | | * See also CMSMigrationsDbContextFactory for EF Core tooling. */ |
| | | options.UseSqlServer(x => |
| | | { |
| | | x.MigrationsHistoryTable(CMSPluginDbProperties.MigrationsHistoryTable, CMSPluginDbProperties.DbSchema); |
| | | //x.EnableRetryOnFailure(); |
| | | }); |
| | | }); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
| | | <ConfigureAwait ContinueOnCapturedContext="false" /> |
| | | </Weavers> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Runtime.CompilerServices; |
| | | [assembly:InternalsVisibleToAttribute("CMS.Plugin.EntityFrameworkCore.Tests")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | cd ../ |
| | | dotnet ef database update -c CMSPluginDbContext |
| | | cmd |
¶Ô±ÈÐÂÎļþ |
| | |
| | | cd ../ |
| | | dotnet ef migrations add InitialCreate -c CMSPluginDbContext -o Migrations |
| | | ::dotnet ef migrations add Update1 -c CMSPluginDbContext -o Migrations |
| | | ::dotnet ef migrations add Update2 -c CMSPluginDbContext -o Migrations |
| | | ::dotnet ef migrations add Update3 -c CMSPluginDbContext -o Migrations |
| | | cmd |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | using WebApiClientCore.Attributes; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Apis |
| | | { |
| | | /// <summary> |
| | | /// å¤é¨Http APIå¯¹æ¥ // https://webapiclient.github.io/guide/getting-started.html |
| | | /// </summary> |
| | | public interface IHIAWmsExternalApi |
| | | { |
| | | /// <summary> |
| | | /// CreateAsync |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("api/v1/hiawms/wmscontainer")] |
| | | Task<WmsContainerDto> CreateAsync([JsonContent] WmsContainerCreateDto input); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | |
| | | <Import Project="../../common.props" /> |
| | | <Import Project="../../configureawait.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | <EnableDynamicLoading>true</EnableDynamicLoading> |
| | | <ProduceReferenceAssembly>false</ProduceReferenceAssembly> |
| | | <GenerateDocumentationFile>true</GenerateDocumentationFile> |
| | | </PropertyGroup> |
| | | |
| | | <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))"> |
| | | <CMSRootPath>D:\syc\CMS Editor</CMSRootPath> |
| | | <OutputPath>$(CMSRootPath)\plugins\cms.plugin.messuite</OutputPath> |
| | | </PropertyGroup> |
| | | |
| | | <PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))"> |
| | | <CMSRootPath>/Volumes/SSD/CMS Editor</CMSRootPath> |
| | | <OutputPath>$(CMSRootPath)\plugins\cms.plugin.messuite</OutputPath> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <None Remove="appsettings.json" /> |
| | | <None Remove="Flows\50001_1.pfd" /> |
| | | <None Remove="Flows\FlowInfo.xml" /> |
| | | <None Remove="Resources\Templates\WmsContainerå¯¼åºæ¨¡æ¿.xlsx" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Content Include="appsettings.json"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </Content> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <EmbeddedResource Include="Resources\Templates\WmsContainerå¯¼åºæ¨¡æ¿.xlsx"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </EmbeddedResource> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="CMS.Framework.AspNetCore" Version="2.16.1" /> |
| | | <PackageReference Include="CMS.Extensions.Variable" Version="2.16.1" /> |
| | | <PackageReference Include="CMS.Extensions.Data" Version="2.16.1" /> |
| | | <PackageReference Include="CMS.Data.Stressing" Version="2.16.1" /> |
| | | <PackageReference Include="CMS.Extensions.Abp" Version="1.4.0" /> |
| | | <PackageReference Include="WebApiClientCore" Version="2.0.4" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.Application\CMS.Plugin.HIAWms.Application.csproj" /> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.MySQL\CMS.Plugin.HIAWms.MySQL.csproj" /> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.PostgreSql\CMS.Plugin.HIAWms.PostgreSql.csproj" /> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.SqlServer\CMS.Plugin.HIAWms.SqlServer.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Resource Include="Flows\50001_1.pfd"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </Resource> |
| | | <Resource Include="Flows\FlowInfo.xml"> |
| | | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
| | | </Resource> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Collections; |
| | | using Autofac; |
| | | using CMS.Data.Stressing; |
| | | using CMS.DataPersistence; |
| | | using CMS.DataPersistence.Data; |
| | | using CMS.Extensions.Abp.Autofac.Extensions.DependencyInjection; |
| | | using CMS.Plugin.MesSuite.Abstractions; |
| | | using CMS.Plugin.MesSuite.Abstractions.Consts; |
| | | using CMS.Plugin.HIAWms.Abstractions; |
| | | using CMS.Plugin.HIAWms.Apis; |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using CMS.Plugin.HIAWms.ProjectService; |
| | | using CMS.Plugin.HIAWms.Workers; |
| | | using CMS.Plugin.HIAWms.Apis; |
| | | using CMS.Project.Abstractions; |
| | | using Microsoft.AspNetCore.Builder; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Structing.AspNetCore; |
| | | using Structing.Core; |
| | | using Structing.Web; |
| | | using SYC.Plugin; |
| | | using Volo.Abp.BackgroundWorkers; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.Modularity.PlugIns; |
| | | |
| | | namespace CMS.Plugin.HIAWms; |
| | | |
| | | /// <summary> |
| | | /// CMSæä»¶å
¥å£ï¼ä½¿ç¨<see cref="EnableApplicationPartAttribute"/>å°å¯¼å
¥Controller. |
| | | /// </summary> |
| | | [EnableApplicationPart] |
| | | public class CMSPluginEntry : PluginEntry |
| | | { |
| | | private readonly IServiceCollection _service = new ServiceCollection(); |
| | | |
| | | /// <inheritdoc /> |
| | | public override void Register(IRegisteContext context) |
| | | { |
| | | var configuration = context.Features.GetConfiguration(); |
| | | |
| | | // é
ç½®å¤é¨HttpApiï¼ https://webapiclient.github.io/ |
| | | context.Services |
| | | .AddHttpApi<IHIAWmsExternalApi>() |
| | | .ConfigureHttpApi(configuration.GetSection(nameof(IHIAWmsExternalApi))); |
| | | |
| | | context.Services.TryAddHIAWms(); |
| | | |
| | | context.Services.AddScoped<IProjectRuntimeMigrator, CMSPluginRuntimeMigrator>(); |
| | | context.Services.AddSingleton<IProjectService, HIAWmsProjectService>(); |
| | | |
| | | context.Services.AddScoped<IEFDataProvider>(p => |
| | | { |
| | | var cfg = p.GetRequiredService<IDataRuntimeConfig>(); |
| | | return new DefaultEFDataProvider(CMSPluginMesSuiteOptions.DataProviderName, CMSPluginMesSuiteOptions.GetDatabaseSuffix(CMSPluginDbProperties.MigrationsHistoryTable), CMSPluginDbProperties.MigrationsHistoryTable, cfg); |
| | | }); |
| | | |
| | | _service.AddObjectAccessor<IApplicationBuilder>(); |
| | | _service.AddApplication<CMSPluginModule>(options => |
| | | { |
| | | var databaseType = configuration[SectionName.DatabaseType] ?? "mysql"; |
| | | if (KnowsDbCode.IsMysql(databaseType)) |
| | | { |
| | | options.PlugInSources.Add(new TypePlugInSource( |
| | | typeof(MySQL.CMSPluginMySQLModule) |
| | | )); |
| | | } |
| | | else if (KnowsDbCode.IsSqlServer(databaseType)) |
| | | { |
| | | options.PlugInSources.Add(new TypePlugInSource( |
| | | typeof(SqlServer.CMSPluginSqlServerModule) |
| | | )); |
| | | } |
| | | else if (KnowsDbCode.IsPostgreSql(databaseType)) |
| | | { |
| | | options.PlugInSources.Add(new TypePlugInSource( |
| | | typeof(PostgreSql.CMSPluginPostgreSqlModule) |
| | | )); |
| | | } |
| | | }); |
| | | |
| | | base.Register(context); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override void ConfigureContainer(ContainerBuilder builder) |
| | | { |
| | | builder.Populate(_service); |
| | | |
| | | base.ConfigureContainer(builder); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override async Task ReadyAsync(IReadyContext context) |
| | | { |
| | | context.Provider.GetRequiredService<ObjectAccessor<IApplicationBuilder>>().Value = context.Features.GetApplicationBuilder(); |
| | | var app = context.Features.GetApplicationBuilder(); |
| | | await app.InitializeApplicationAsync(); |
| | | |
| | | await base.ReadyAsync(context); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override async Task AfterReadyAsync(IReadyContext context) |
| | | { |
| | | await context.GetRequiredService<IBackgroundWorkerManager>().AddAsync(context.GetRequiredService<HIAWmsWorker>()); |
| | | |
| | | await base.AfterReadyAsync(context); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System.Reflection; |
| | | using CMS.Extensions.Abp; |
| | | using CMS.Extensions.Abp.AspNetCore; |
| | | using CMS.Plugin.HIAWms.Abstractions; |
| | | using CMS.Plugin.HIAWms.Application; |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using CMS.Plugin.HIAWms.Jobs; |
| | | using Volo.Abp.BackgroundJobs; |
| | | using Volo.Abp.Modularity; |
| | | |
| | | namespace CMS.Plugin.HIAWms |
| | | { |
| | | /// <summary> |
| | | /// CMS æä»¶ä¾èµå è½½å¯å¨æ¨¡å |
| | | /// </summary> |
| | | [DependsOn( |
| | | typeof(CMSPluginAbpModule), |
| | | typeof(CMSPluginAbpAspNetCoreModule), |
| | | typeof(CMSPluginApplicationModule), |
| | | typeof(CMSPluginEntityFrameworkCoreModule) |
| | | )] |
| | | public class CMSPluginModule : AbpStartupModule |
| | | { |
| | | /// <inheritdoc /> |
| | | public override void ConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | Configure<AbpBackgroundJobOptions>(options => |
| | | { |
| | | options.AddJob<HIAWmsJob>(); |
| | | }); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override Assembly[]? GetSharedAssemblies() |
| | | { |
| | | return base.GetSharedAssemblies().Concat(new[] |
| | | { |
| | | typeof(CMSPluginHIAWmsAbstractionsModule).Assembly, |
| | | }).ToArray(); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Data; |
| | | using CMS.Project.Abstractions; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Microsoft.Extensions.Logging; |
| | | using Volo.Abp.DependencyInjection; |
| | | |
| | | namespace CMS.Plugin.HIAWms |
| | | { |
| | | /// <summary> |
| | | /// å·¥ç¨æ°æ®åºè¿ç§»å¨ï¼å½<see cref="IProjectRunner"/>å è½½å·¥ç¨æ¶æ¤å¯¹è±¡ä¼è¢«å建è°ç¨ |
| | | /// </summary> |
| | | public class CMSPluginRuntimeMigrator : IProjectRuntimeMigrator |
| | | { |
| | | /// <summary> |
| | | /// æ§è¡è¿ç§» |
| | | /// </summary> |
| | | /// <param name="project">å½åè¦è¿è¡çå·¥ç¨</param> |
| | | /// <param name="serviceProvider">åå¨è¿è¡å·¥ç¨ä¸ä¸æçserviceProvider</param> |
| | | /// <returns></returns> |
| | | public async Task UpgradeAsync(Project.Project project, IServiceProvider serviceProvider) |
| | | { |
| | | var objectAccessor = serviceProvider.GetService<ObjectAccessor<Project.Project>>(); |
| | | if (objectAccessor != null) |
| | | { |
| | | objectAccessor.Value = project; |
| | | } |
| | | |
| | | var logger = serviceProvider.GetRequiredService<ILogger<CMSPluginRuntimeMigrator>>(); |
| | | try |
| | | { |
| | | // éè¿serviceProviderè·åèªå·±çDbContextå¹¶è¿è¡å建æè¿ç§»æµç¨ |
| | | logger.LogInformation($"Start {project.Info.Id} HIAWms dbcontext create"); |
| | | await serviceProvider.GetRequiredService<CMSPluginDbMigrationService>().MigrateAsync(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | logger.LogError(ex, "Create HIAWms db failed"); |
| | | } |
| | | |
| | | if (objectAccessor != null) |
| | | { |
| | | objectAccessor.Value = null; |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Ao.Lang; |
| | | using CMS.Extensions.Abp.AspNetCore.Mvc.Filters; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsAreas; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using MiniExcelLibs; |
| | | using System.Reflection; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Controller |
| | | { |
| | | /// <summary> |
| | | /// WmsAreaæå¡ |
| | | /// </summary> |
| | | [ApiController] |
| | | [TypeFilter(typeof(CMSLanguageFilter))] |
| | | [TypeFilter(typeof(CMSUowActionFilter))] |
| | | [TypeFilter(typeof(CMSAuditActionFilter))] |
| | | [TypeFilter(typeof(CMSExceptionFilter))] |
| | | [Route("api/v{version:apiVersion}/HIAWms/[controller]")] |
| | | public class WmsAreaController : ControllerBase |
| | | { |
| | | private readonly IWmsAreaAppService _wmsareaAppService; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsAreaController"/> class. |
| | | /// </summary> |
| | | /// <param name="wmsareaAppService">The wmsarea application service.</param> |
| | | public WmsAreaController(IWmsAreaAppService wmsareaAppService) |
| | | { |
| | | _wmsareaAppService = wmsareaAppService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åwmsarea. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsAreaDto> GetAsync(Guid id) |
| | | { |
| | | return _wmsareaAppService.GetAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åwmsareaçå表. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public virtual Task<PagedResultDto<WmsAreaDto>> GetListAsync([FromQuery] GetWmsAreasInput input) |
| | | { |
| | | return _wmsareaAppService.GetListAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å建wmsarea. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | public virtual Task<WmsAreaDto> CreateAsync(WmsAreaCreateDto input) |
| | | { |
| | | return _wmsareaAppService.CreateAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°wmsarea. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPut] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsAreaDto> UpdateAsync(Guid id, WmsAreaUpdateDto input) |
| | | { |
| | | return _wmsareaAppService.UpdateAsync(id, input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
éWmsArea. |
| | | /// </summary> |
| | | /// <param name="ids">Idéå.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | [Route("Clone")] |
| | | public virtual Task<List<WmsAreaDto>> CloneAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmsareaAppService.CloneAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤wmsarea. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | [Route("{id}")] |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmsareaAppService.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¹éå é¤wmsarea. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | public virtual Task DeleteAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmsareaAppService.DeleteManyAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è°æ´æåº. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpPut] |
| | | [Route("{id}/AdjustSort/{sort}")] |
| | | public virtual Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | return _wmsareaAppService.AdjustSortAsync(id, sort); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导å
¥wmsarea. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPost] |
| | | [Route("Import")] |
| | | public virtual async Task<IActionResult> ImportAsync(IFormFile file) |
| | | { |
| | | using var stream = new MemoryStream(); |
| | | await file.CopyToAsync(stream); |
| | | stream.Seek(0L, SeekOrigin.Begin); |
| | | |
| | | var sheetNames = stream.GetSheetNames(); |
| | | var wmsareaRows = sheetNames.Contains("é
ç½®") ? MiniExcel.Query<WmsAreasImportModel.WmsAreaImportModel>(stream, sheetName: "é
ç½®").ToList() : new(); |
| | | |
| | | if (!wmsareaRows.Any()) |
| | | { |
| | | throw new UserFriendlyException("è¯·æ£æ¥å¯¼å
¥çè¡¨æ ¼"); |
| | | } |
| | | |
| | | await _wmsareaAppService.ImportAsync(new WmsAreasImportModel |
| | | { |
| | | WmsAreas = wmsareaRows, |
| | | }); |
| | | |
| | | return Ok(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导åºwmsarea. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("Export")] |
| | | public virtual async Task<IActionResult> ExportAsync([FromQuery] GetWmsAreasInput input) |
| | | { |
| | | input.MaxResultCount = int.MaxValue; |
| | | var exportData = await _wmsareaAppService.ExportAsync(input); |
| | | var templatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Resources/Templates/WmsAreaå¯¼åºæ¨¡æ¿.xlsx"); |
| | | if (!System.IO.File.Exists(templatePath)) |
| | | { |
| | | templatePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty, $"Resources/Templates/WmsAreaå¯¼åºæ¨¡æ¿.xlsx"); |
| | | } |
| | | |
| | | var memoryStream = new MemoryStream(); |
| | | await memoryStream.SaveAsByTemplateAsync(templatePath, exportData.Sheets); |
| | | memoryStream.Seek(0L, SeekOrigin.Begin); |
| | | return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") { FileDownloadName = $"{exportData.FileName}_{DateTime.Now:yyyyMMddhhmmss}.xlsx" }; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Ao.Lang; |
| | | using CMS.Extensions.Abp.AspNetCore.Mvc.Filters; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using MiniExcelLibs; |
| | | using System.Reflection; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Controller |
| | | { |
| | | /// <summary> |
| | | /// WmsContaineræå¡ |
| | | /// </summary> |
| | | [ApiController] |
| | | [TypeFilter(typeof(CMSLanguageFilter))] |
| | | [TypeFilter(typeof(CMSUowActionFilter))] |
| | | [TypeFilter(typeof(CMSAuditActionFilter))] |
| | | [TypeFilter(typeof(CMSExceptionFilter))] |
| | | [Route("api/v{version:apiVersion}/HIAWms/[controller]")] |
| | | public class WmsContainerController : ControllerBase |
| | | { |
| | | private readonly IWmsContainerAppService _wmscontainerAppService; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsContainerController"/> class. |
| | | /// </summary> |
| | | /// <param name="wmscontainerAppService">The wmscontainer application service.</param> |
| | | public WmsContainerController(IWmsContainerAppService wmscontainerAppService) |
| | | { |
| | | _wmscontainerAppService = wmscontainerAppService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åwmscontainer. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsContainerDto> GetAsync(Guid id) |
| | | { |
| | | return _wmscontainerAppService.GetAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åwmscontainerçå表. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public virtual Task<PagedResultDto<WmsContainerDto>> GetListAsync([FromQuery] GetWmsContainersInput input) |
| | | { |
| | | return _wmscontainerAppService.GetListAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å建wmscontainer. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | public virtual Task<WmsContainerDto> CreateAsync(WmsContainerCreateDto input) |
| | | { |
| | | return _wmscontainerAppService.CreateAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°wmscontainer. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPut] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsContainerDto> UpdateAsync(Guid id, WmsContainerUpdateDto input) |
| | | { |
| | | return _wmscontainerAppService.UpdateAsync(id, input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
éWmsContainer. |
| | | /// </summary> |
| | | /// <param name="ids">Idéå.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | [Route("Clone")] |
| | | public virtual Task<List<WmsContainerDto>> CloneAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmscontainerAppService.CloneAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤wmscontainer. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | [Route("{id}")] |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmscontainerAppService.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¹éå é¤wmscontainer. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | public virtual Task DeleteAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmscontainerAppService.DeleteManyAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è°æ´æåº. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpPut] |
| | | [Route("{id}/AdjustSort/{sort}")] |
| | | public virtual Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | return _wmscontainerAppService.AdjustSortAsync(id, sort); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导å
¥wmscontainer. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPost] |
| | | [Route("Import")] |
| | | public virtual async Task<IActionResult> ImportAsync(IFormFile file) |
| | | { |
| | | using var stream = new MemoryStream(); |
| | | await file.CopyToAsync(stream); |
| | | stream.Seek(0L, SeekOrigin.Begin); |
| | | |
| | | var sheetNames = stream.GetSheetNames(); |
| | | var wmscontainerRows = sheetNames.Contains("é
ç½®") ? MiniExcel.Query<WmsContainersImportModel.WmsContainerImportModel>(stream, sheetName: "é
ç½®").ToList() : new(); |
| | | |
| | | if (!wmscontainerRows.Any()) |
| | | { |
| | | throw new UserFriendlyException("è¯·æ£æ¥å¯¼å
¥çè¡¨æ ¼"); |
| | | } |
| | | |
| | | await _wmscontainerAppService.ImportAsync(new WmsContainersImportModel |
| | | { |
| | | WmsContainers = wmscontainerRows, |
| | | }); |
| | | |
| | | return Ok(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导åºwmscontainer. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("Export")] |
| | | public virtual async Task<IActionResult> ExportAsync([FromQuery] GetWmsContainersInput input) |
| | | { |
| | | input.MaxResultCount = int.MaxValue; |
| | | var exportData = await _wmscontainerAppService.ExportAsync(input); |
| | | var templatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Resources/Templates/WmsContainerå¯¼åºæ¨¡æ¿.xlsx"); |
| | | if (!System.IO.File.Exists(templatePath)) |
| | | { |
| | | templatePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty, $"Resources/Templates/WmsContainerå¯¼åºæ¨¡æ¿.xlsx"); |
| | | } |
| | | |
| | | var memoryStream = new MemoryStream(); |
| | | await memoryStream.SaveAsByTemplateAsync(templatePath, exportData.Sheets); |
| | | memoryStream.Seek(0L, SeekOrigin.Begin); |
| | | return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") { FileDownloadName = $"{exportData.FileName}_{DateTime.Now:yyyyMMddhhmmss}.xlsx" }; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Ao.Lang; |
| | | using CMS.Extensions.Abp.AspNetCore.Mvc.Filters; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsMaterials; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using MiniExcelLibs; |
| | | using System.Reflection; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Controller |
| | | { |
| | | /// <summary> |
| | | /// WmsMaterialæå¡ |
| | | /// </summary> |
| | | [ApiController] |
| | | [TypeFilter(typeof(CMSLanguageFilter))] |
| | | [TypeFilter(typeof(CMSUowActionFilter))] |
| | | [TypeFilter(typeof(CMSAuditActionFilter))] |
| | | [TypeFilter(typeof(CMSExceptionFilter))] |
| | | [Route("api/v{version:apiVersion}/HIAWms/[controller]")] |
| | | public class WmsMaterialController : ControllerBase |
| | | { |
| | | private readonly IWmsMaterialAppService _wmsmaterialAppService; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsMaterialController"/> class. |
| | | /// </summary> |
| | | /// <param name="wmsmaterialAppService">The wmsmaterial application service.</param> |
| | | public WmsMaterialController(IWmsMaterialAppService wmsmaterialAppService) |
| | | { |
| | | _wmsmaterialAppService = wmsmaterialAppService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åwmsmaterial. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsMaterialDto> GetAsync(Guid id) |
| | | { |
| | | return _wmsmaterialAppService.GetAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åwmsmaterialçå表. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public virtual Task<PagedResultDto<WmsMaterialDto>> GetListAsync([FromQuery] GetWmsMaterialsInput input) |
| | | { |
| | | return _wmsmaterialAppService.GetListAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å建wmsmaterial. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | public virtual Task<WmsMaterialDto> CreateAsync(WmsMaterialCreateDto input) |
| | | { |
| | | return _wmsmaterialAppService.CreateAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°wmsmaterial. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPut] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsMaterialDto> UpdateAsync(Guid id, WmsMaterialUpdateDto input) |
| | | { |
| | | return _wmsmaterialAppService.UpdateAsync(id, input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
éWmsMaterial. |
| | | /// </summary> |
| | | /// <param name="ids">Idéå.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | [Route("Clone")] |
| | | public virtual Task<List<WmsMaterialDto>> CloneAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmsmaterialAppService.CloneAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤wmsmaterial. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | [Route("{id}")] |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmsmaterialAppService.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¹éå é¤wmsmaterial. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | public virtual Task DeleteAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmsmaterialAppService.DeleteManyAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è°æ´æåº. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpPut] |
| | | [Route("{id}/AdjustSort/{sort}")] |
| | | public virtual Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | return _wmsmaterialAppService.AdjustSortAsync(id, sort); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导å
¥wmsmaterial. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPost] |
| | | [Route("Import")] |
| | | public virtual async Task<IActionResult> ImportAsync(IFormFile file) |
| | | { |
| | | using var stream = new MemoryStream(); |
| | | await file.CopyToAsync(stream); |
| | | stream.Seek(0L, SeekOrigin.Begin); |
| | | |
| | | var sheetNames = stream.GetSheetNames(); |
| | | var wmsmaterialRows = sheetNames.Contains("é
ç½®") ? MiniExcel.Query<WmsMaterialsImportModel.WmsMaterialImportModel>(stream, sheetName: "é
ç½®").ToList() : new(); |
| | | |
| | | if (!wmsmaterialRows.Any()) |
| | | { |
| | | throw new UserFriendlyException("è¯·æ£æ¥å¯¼å
¥çè¡¨æ ¼"); |
| | | } |
| | | |
| | | await _wmsmaterialAppService.ImportAsync(new WmsMaterialsImportModel |
| | | { |
| | | WmsMaterials = wmsmaterialRows, |
| | | }); |
| | | |
| | | return Ok(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导åºwmsmaterial. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("Export")] |
| | | public virtual async Task<IActionResult> ExportAsync([FromQuery] GetWmsMaterialsInput input) |
| | | { |
| | | input.MaxResultCount = int.MaxValue; |
| | | var exportData = await _wmsmaterialAppService.ExportAsync(input); |
| | | var templatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Resources/Templates/WmsMaterialå¯¼åºæ¨¡æ¿.xlsx"); |
| | | if (!System.IO.File.Exists(templatePath)) |
| | | { |
| | | templatePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty, $"Resources/Templates/WmsMaterialå¯¼åºæ¨¡æ¿.xlsx"); |
| | | } |
| | | |
| | | var memoryStream = new MemoryStream(); |
| | | await memoryStream.SaveAsByTemplateAsync(templatePath, exportData.Sheets); |
| | | memoryStream.Seek(0L, SeekOrigin.Begin); |
| | | return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") { FileDownloadName = $"{exportData.FileName}_{DateTime.Now:yyyyMMddhhmmss}.xlsx" }; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Ao.Lang; |
| | | using CMS.Extensions.Abp.AspNetCore.Mvc.Filters; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using MiniExcelLibs; |
| | | using System.Reflection; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Controller |
| | | { |
| | | /// <summary> |
| | | /// WmsPlaceæå¡ |
| | | /// </summary> |
| | | [ApiController] |
| | | [TypeFilter(typeof(CMSLanguageFilter))] |
| | | [TypeFilter(typeof(CMSUowActionFilter))] |
| | | [TypeFilter(typeof(CMSAuditActionFilter))] |
| | | [TypeFilter(typeof(CMSExceptionFilter))] |
| | | [Route("api/v{version:apiVersion}/HIAWms/[controller]")] |
| | | public class WmsPlaceController : ControllerBase |
| | | { |
| | | private readonly IWmsPlaceAppService _wmsplaceAppService; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsPlaceController"/> class. |
| | | /// </summary> |
| | | /// <param name="wmsplaceAppService">The wmsplace application service.</param> |
| | | public WmsPlaceController(IWmsPlaceAppService wmsplaceAppService) |
| | | { |
| | | _wmsplaceAppService = wmsplaceAppService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åwmsplace. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsPlaceDto> GetAsync(Guid id) |
| | | { |
| | | return _wmsplaceAppService.GetAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åwmsplaceçå表. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public virtual Task<PagedResultDto<WmsPlaceDto>> GetListAsync([FromQuery] GetWmsPlacesInput input) |
| | | { |
| | | return _wmsplaceAppService.GetListAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å建wmsplace. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | public virtual Task<WmsPlaceDto> CreateAsync(WmsPlaceCreateDto input) |
| | | { |
| | | return _wmsplaceAppService.CreateAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°wmsplace. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPut] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsPlaceDto> UpdateAsync(Guid id, WmsPlaceUpdateDto input) |
| | | { |
| | | return _wmsplaceAppService.UpdateAsync(id, input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
éWmsPlace. |
| | | /// </summary> |
| | | /// <param name="ids">Idéå.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | [Route("Clone")] |
| | | public virtual Task<List<WmsPlaceDto>> CloneAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmsplaceAppService.CloneAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤wmsplace. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | [Route("{id}")] |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmsplaceAppService.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¹éå é¤wmsplace. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | public virtual Task DeleteAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmsplaceAppService.DeleteManyAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è°æ´æåº. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpPut] |
| | | [Route("{id}/AdjustSort/{sort}")] |
| | | public virtual Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | return _wmsplaceAppService.AdjustSortAsync(id, sort); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导å
¥wmsplace. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPost] |
| | | [Route("Import")] |
| | | public virtual async Task<IActionResult> ImportAsync(IFormFile file) |
| | | { |
| | | using var stream = new MemoryStream(); |
| | | await file.CopyToAsync(stream); |
| | | stream.Seek(0L, SeekOrigin.Begin); |
| | | |
| | | var sheetNames = stream.GetSheetNames(); |
| | | var wmsplaceRows = sheetNames.Contains("é
ç½®") ? MiniExcel.Query<WmsPlacesImportModel.WmsPlaceImportModel>(stream, sheetName: "é
ç½®").ToList() : new(); |
| | | |
| | | if (!wmsplaceRows.Any()) |
| | | { |
| | | throw new UserFriendlyException("è¯·æ£æ¥å¯¼å
¥çè¡¨æ ¼"); |
| | | } |
| | | |
| | | await _wmsplaceAppService.ImportAsync(new WmsPlacesImportModel |
| | | { |
| | | WmsPlaces = wmsplaceRows, |
| | | }); |
| | | |
| | | return Ok(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导åºwmsplace. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("Export")] |
| | | public virtual async Task<IActionResult> ExportAsync([FromQuery] GetWmsPlacesInput input) |
| | | { |
| | | input.MaxResultCount = int.MaxValue; |
| | | var exportData = await _wmsplaceAppService.ExportAsync(input); |
| | | var templatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Resources/Templates/WmsPlaceå¯¼åºæ¨¡æ¿.xlsx"); |
| | | if (!System.IO.File.Exists(templatePath)) |
| | | { |
| | | templatePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty, $"Resources/Templates/WmsPlaceå¯¼åºæ¨¡æ¿.xlsx"); |
| | | } |
| | | |
| | | var memoryStream = new MemoryStream(); |
| | | await memoryStream.SaveAsByTemplateAsync(templatePath, exportData.Sheets); |
| | | memoryStream.Seek(0L, SeekOrigin.Begin); |
| | | return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") { FileDownloadName = $"{exportData.FileName}_{DateTime.Now:yyyyMMddhhmmss}.xlsx" }; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Ao.Lang; |
| | | using CMS.Extensions.Abp.AspNetCore.Mvc.Filters; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using MiniExcelLibs; |
| | | using System.Reflection; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Application.Dtos; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Controller |
| | | { |
| | | /// <summary> |
| | | /// WmsStoreæå¡ |
| | | /// </summary> |
| | | [ApiController] |
| | | [TypeFilter(typeof(CMSLanguageFilter))] |
| | | [TypeFilter(typeof(CMSUowActionFilter))] |
| | | [TypeFilter(typeof(CMSAuditActionFilter))] |
| | | [TypeFilter(typeof(CMSExceptionFilter))] |
| | | [Route("api/v{version:apiVersion}/HIAWms/[controller]")] |
| | | public class WmsStoreController : ControllerBase |
| | | { |
| | | private readonly IWmsStoreAppService _wmsstoreAppService; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsStoreController"/> class. |
| | | /// </summary> |
| | | /// <param name="wmsstoreAppService">The wmsstore application service.</param> |
| | | public WmsStoreController(IWmsStoreAppService wmsstoreAppService) |
| | | { |
| | | _wmsstoreAppService = wmsstoreAppService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åwmsstore. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsStoreDto> GetAsync(Guid id) |
| | | { |
| | | return _wmsstoreAppService.GetAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åwmsstoreçå表. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | public virtual Task<PagedResultDto<WmsStoreDto>> GetListAsync([FromQuery] GetWmsStoresInput input) |
| | | { |
| | | return _wmsstoreAppService.GetListAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å建wmsstore. |
| | | /// </summary> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | public virtual Task<WmsStoreDto> CreateAsync(WmsStoreCreateDto input) |
| | | { |
| | | return _wmsstoreAppService.CreateAsync(input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°wmsstore. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <param name="input">è¾å
¥.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPut] |
| | | [Route("{id}")] |
| | | public virtual Task<WmsStoreDto> UpdateAsync(Guid id, WmsStoreUpdateDto input) |
| | | { |
| | | return _wmsstoreAppService.UpdateAsync(id, input); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
éWmsStore. |
| | | /// </summary> |
| | | /// <param name="ids">Idéå.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpPost] |
| | | [Route("Clone")] |
| | | public virtual Task<List<WmsStoreDto>> CloneAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmsstoreAppService.CloneAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å é¤wmsstore. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | [Route("{id}")] |
| | | public virtual Task DeleteAsync(Guid id) |
| | | { |
| | | return _wmsstoreAppService.DeleteAsync(id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¹éå é¤wmsstore. |
| | | /// </summary> |
| | | /// <param name="ids">The ids.</param> |
| | | /// <returns></returns> |
| | | //[Authorize] |
| | | [HttpDelete] |
| | | public virtual Task DeleteAsync([FromBody] IEnumerable<Guid> ids) |
| | | { |
| | | return _wmsstoreAppService.DeleteManyAsync(ids); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è°æ´æåº. |
| | | /// </summary> |
| | | /// <param name="id">æ è¯ç¬¦.</param> |
| | | /// <returns></returns> |
| | | [HttpPut] |
| | | [Route("{id}/AdjustSort/{sort}")] |
| | | public virtual Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | return _wmsstoreAppService.AdjustSortAsync(id, sort); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导å
¥wmsstore. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Authorize] |
| | | [HttpPost] |
| | | [Route("Import")] |
| | | public virtual async Task<IActionResult> ImportAsync(IFormFile file) |
| | | { |
| | | using var stream = new MemoryStream(); |
| | | await file.CopyToAsync(stream); |
| | | stream.Seek(0L, SeekOrigin.Begin); |
| | | |
| | | var sheetNames = stream.GetSheetNames(); |
| | | var wmsstoreRows = sheetNames.Contains("é
ç½®") ? MiniExcel.Query<WmsStoresImportModel.WmsStoreImportModel>(stream, sheetName: "é
ç½®").ToList() : new(); |
| | | |
| | | if (!wmsstoreRows.Any()) |
| | | { |
| | | throw new UserFriendlyException("è¯·æ£æ¥å¯¼å
¥çè¡¨æ ¼"); |
| | | } |
| | | |
| | | await _wmsstoreAppService.ImportAsync(new WmsStoresImportModel |
| | | { |
| | | WmsStores = wmsstoreRows, |
| | | }); |
| | | |
| | | return Ok(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导åºwmsstore. |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [Route("Export")] |
| | | public virtual async Task<IActionResult> ExportAsync([FromQuery] GetWmsStoresInput input) |
| | | { |
| | | input.MaxResultCount = int.MaxValue; |
| | | var exportData = await _wmsstoreAppService.ExportAsync(input); |
| | | var templatePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Resources/Templates/WmsStoreå¯¼åºæ¨¡æ¿.xlsx"); |
| | | if (!System.IO.File.Exists(templatePath)) |
| | | { |
| | | templatePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty, $"Resources/Templates/WmsStoreå¯¼åºæ¨¡æ¿.xlsx"); |
| | | } |
| | | |
| | | var memoryStream = new MemoryStream(); |
| | | await memoryStream.SaveAsByTemplateAsync(templatePath, exportData.Sheets); |
| | | memoryStream.Seek(0L, SeekOrigin.Begin); |
| | | return new FileStreamResult(memoryStream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") { FileDownloadName = $"{exportData.FileName}_{DateTime.Now:yyyyMMddhhmmss}.xlsx" }; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.MesSuite.Abstractions.Events; |
| | | using CMS.Plugin.MesSuite.Abstractions.Models; |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainers; |
| | | using CMS.Plugin.OrderManagement.Abstractions.Models; |
| | | using CMS.Plugin.ProcessManagement.Abstractions.Models; |
| | | using CMS.Plugin.TraceManagement.Abstractions.Models.Traces; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Microsoft.Extensions.Logging; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.EventBus.Distributed; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EventHandlers |
| | | { |
| | | /// <summary> |
| | | /// æµç¨äºä»¶å¤çç¨åº |
| | | /// </summary> |
| | | public class HIAWmsEventHandler : IDistributedEventHandler<ProcessFlowEto>, ITransientDependency |
| | | { |
| | | private readonly ILogger _logger; |
| | | private readonly IServiceProvider _serviceProvider; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="HIAWmsEventHandler"/> class. |
| | | /// </summary> |
| | | /// <param name="logger">The logger.</param> |
| | | /// <param name="serviceProvider">The service provider.</param> |
| | | public HIAWmsEventHandler(ILogger<HIAWmsEventHandler> logger, IServiceProvider serviceProvider) |
| | | { |
| | | this._logger = logger; |
| | | this._serviceProvider = serviceProvider; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Handler handles the event by implementing this method. |
| | | /// </summary> |
| | | /// <param name="eventData">Event data</param> |
| | | public async Task HandleEventAsync(ProcessFlowEto eventData) |
| | | { |
| | | if (eventData.Activity.Equals("æ¥éª¤åç§°")) |
| | | { |
| | | _logger.LogInformation($"WmsContainerEventHandler: Activity={eventData.Activity}"); |
| | | |
| | | var serialNumber = eventData?.FlowItems[FlowItemCollection.SerialNumber]?.ToString(); |
| | | |
| | | // å·¥èºæ¨¡å |
| | | var process = eventData?.FlowItems[FlowItemCollection.ApplicationData] as ProcessModel; |
| | | |
| | | // äº§åæ¨¡å |
| | | var product = eventData?.FlowItems[FlowItemCollection.ProductModel] as AssociationProductModel; |
| | | |
| | | // 追溯模å |
| | | var trace = eventData?.FlowItems[FlowItemCollection.TraceModel] as TraceModel; |
| | | |
| | | // 工忍¡å |
| | | var order = eventData?.FlowItems[FlowItemCollection.OrderModel] as OrderModel; |
| | | |
| | | // ä¸å¡å¤ç |
| | | await ProcessAsync(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Processes the asynchronous. |
| | | /// </summary> |
| | | private async Task ProcessAsync() |
| | | { |
| | | using var scope = _serviceProvider.CreateScope(); |
| | | var unitOfWorkManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>(); |
| | | using var uow = unitOfWorkManager.Begin(requiresNew: true); |
| | | var wmscontainerRepository = scope.ServiceProvider.GetRequiredService<IWmsContainerRepository>(); |
| | | var count = await wmscontainerRepository.GetCountAsync(); |
| | | |
| | | // å¦æææ´æ°æ°æ®åºæä½ï¼éæäº¤ä¿å |
| | | // await uow.SaveChangesAsync(); |
| | | |
| | | _logger.LogInformation($"ProcessAsyncï¼Count={count}"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.FlowManagement.Abstractions; |
| | | using CMS.Plugin.FlowManagement.Abstractions.Models; |
| | | using CMS.Plugin.MesSuite.Abstractions.Models; |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainers; |
| | | using CMS.Plugin.OrderManagement.Abstractions.Models; |
| | | using CMS.Plugin.ProcessManagement.Abstractions.Models; |
| | | using CMS.Plugin.TraceManagement.Abstractions.Models.Traces; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Microsoft.Extensions.Logging; |
| | | using SYC.Flow.Kernel; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.FlowProcessors |
| | | { |
| | | /// <summary> |
| | | /// æµç¨å¤çå¨ |
| | | /// </summary> |
| | | public class HIAWmsFlowProcessor : IFlowProcessor, ISingletonDependency |
| | | { |
| | | private readonly ILogger<HIAWmsFlowProcessor> _logger; |
| | | private readonly IServiceProvider _serviceProvider; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="FlowProcessor"/> class. |
| | | /// </summary> |
| | | public HIAWmsFlowProcessor(ILogger<HIAWmsFlowProcessor> logger, IServiceProvider serviceProvider) |
| | | { |
| | | _logger = logger; |
| | | _serviceProvider = serviceProvider; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public Task OnEnterAsync(FlowProcessor flowProcessor, object sender, EventArgs args) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task OnExecuteAsync(FlowProcessor flowProcessor, object sender, EventArgs args) |
| | | { |
| | | if (sender is Activity activity) |
| | | { |
| | | var eventArgs = args as ProcessflowEventArgs; |
| | | var procID = eventArgs.DataItems["Instance_ProcID"]; |
| | | if (activity?.Name == "ç¬¬ä¸æ¹ç³»ç»åæ ¼å¤æ") |
| | | { |
| | | // å·¥èºæ¨¡å |
| | | var processModel = eventArgs.DataItems.ApplicationData as ProcessModel; |
| | | |
| | | // 工忍¡å |
| | | var orderModel = eventArgs.DataItems[FlowItemCollection.OrderModel] as OrderModel; |
| | | |
| | | // äº§åæ¨¡å |
| | | var productModel = eventArgs.DataItems[FlowItemCollection.ProductModel] as AssociationProductModel; |
| | | |
| | | // 追溯模å |
| | | var traceModel = eventArgs.DataItems[FlowItemCollection.TraceModel] as TraceModel; |
| | | |
| | | // ä¸å¡å¤ç |
| | | await ProcessAsync(); |
| | | |
| | | _logger.LogInformation($"æ§è¡æµç¨ï¼å®ä¾={procID} -> {flowProcessor.ProcName} -> {activity.Name} ProductionFlowProcessor"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Processes the asynchronous. |
| | | /// </summary> |
| | | private async Task ProcessAsync() |
| | | { |
| | | using var scope = _serviceProvider.CreateScope(); |
| | | var unitOfWorkManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>(); |
| | | using var uow = unitOfWorkManager.Begin(requiresNew: true); |
| | | var wmscontainerRepository = scope.ServiceProvider.GetRequiredService<IWmsContainerRepository>(); |
| | | var count = await wmscontainerRepository.GetCountAsync(); |
| | | |
| | | // å¦æææ´æ°æ°æ®åºæä½ï¼éæäº¤ä¿å |
| | | // await uow.SaveChangesAsync(); |
| | | |
| | | _logger.LogInformation($"ProcessAsyncï¼Count={count}"); |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public Task OnExitAsync(FlowProcessor flowProcessor, object sender, EventArgs args) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <ProcessflowDefine Version="1"> |
| | | <Define> |
| | | <ProcessflowBuilder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
| | | <Parameters/> |
| | | <Name>HIAWmsä¸å¡æµç¨</Name> |
| | | <Description></Description> |
| | | <Root xsi:type="Activity"> |
| | | <Alias>å¯å¨</Alias> |
| | | <Name>å¯å¨</Name> |
| | | <Description></Description> |
| | | <EnterMode>Automatic</EnterMode> |
| | | <ExitMode>Automatic</ExitMode> |
| | | <JoinType>JoinXOR</JoinType> |
| | | <SplitType>SplitXOR</SplitType> |
| | | <ExtendedProperty></ExtendedProperty> |
| | | </Root> |
| | | <Activities> |
| | | <Activity xsi:type="VariableMonitorActivity"> |
| | | <Alias>åéçå¬</Alias> |
| | | <Name>触åä¿¡å·çå¬</Name> |
| | | <EnterMode>Automatic</EnterMode> |
| | | <ExitMode>Automatic</ExitMode> |
| | | <JoinType>JoinXOR</JoinType> |
| | | <SplitType>SplitXOR</SplitType> |
| | | <NeedTagChange>true</NeedTagChange> |
| | | <TaskDelay>0</TaskDelay> |
| | | <MonitorVariableName>HIAWms_TriggerSignal</MonitorVariableName> |
| | | <CompareVariableValue>1</CompareVariableValue> |
| | | <ExtendedProperty></ExtendedProperty> |
| | | </Activity> |
| | | <Activity xsi:type="VariableReadActivity"> |
| | | <Alias>åé读å</Alias> |
| | | <Name>åé读å</Name> |
| | | <EnterMode>Automatic</EnterMode> |
| | | <ExitMode>Automatic</ExitMode> |
| | | <JoinType>JoinXOR</JoinType> |
| | | <SplitType>SplitXOR</SplitType> |
| | | <TaskDelay>0</TaskDelay> |
| | | <ReadRetryCount>10</ReadRetryCount> |
| | | <ReadRetryDelay>500</ReadRetryDelay> |
| | | <ExtendedProperty></ExtendedProperty> |
| | | <ParameterVariables> |
| | | <ReadParameterVariable> |
| | | <VariableName>HIAWms_BarcodeVariable</VariableName> |
| | | <WriteIntoExtAttribute>true</WriteIntoExtAttribute> |
| | | </ReadParameterVariable> |
| | | </ParameterVariables> |
| | | </Activity> |
| | | <Activity xsi:type="HIAWmsActivity"> |
| | | <Alias>åéçå¬</Alias> |
| | | <Name>æ©å±æ¥éª¤</Name> |
| | | <EnterMode>Automatic</EnterMode> |
| | | <ExitMode>Automatic</ExitMode> |
| | | <JoinType>JoinXOR</JoinType> |
| | | <SplitType>SplitXOR</SplitType> |
| | | <TaskDelay>0</TaskDelay> |
| | | <MyProperty>MyProperty1</MyProperty> |
| | | <ExtendedProperty></ExtendedProperty> |
| | | </Activity> |
| | | <Activity xsi:type="VariableMonitorActivity"> |
| | | <Alias>åéçå¬</Alias> |
| | | <Name>触åä¿¡å·å¤ä½çå¬</Name> |
| | | <EnterMode>Automatic</EnterMode> |
| | | <ExitMode>Automatic</ExitMode> |
| | | <JoinType>JoinXOR</JoinType> |
| | | <SplitType>SplitXOR</SplitType> |
| | | <NeedTagChange>true</NeedTagChange> |
| | | <TaskDelay>0</TaskDelay> |
| | | <MonitorVariableName>HIAWms_TriggerSignal</MonitorVariableName> |
| | | <CompareVariableValue>0</CompareVariableValue> |
| | | <ExtendedProperty></ExtendedProperty> |
| | | </Activity> |
| | | <Activity xsi:type="BusinessActivity"> |
| | | <Alias>éç¨æ¥éª¤</Alias> |
| | | <Name>éç¨æ¥éª¤</Name> |
| | | <EnterMode>Automatic</EnterMode> |
| | | <ExitMode>Automatic</ExitMode> |
| | | <JoinType>JoinXOR</JoinType> |
| | | <SplitType>SplitXOR</SplitType> |
| | | <PublishFlowEvent>true</PublishFlowEvent> |
| | | <TaskDelay>0</TaskDelay> |
| | | <ExtendedProperty> |
| | | <MyExtendedProperty>MyExtendedProperty1</MyExtendedProperty> |
| | | </ExtendedProperty> |
| | | </Activity> |
| | | <Activity xsi:type="VariableWriteActivity"> |
| | | <Alias>åéä¸å</Alias> |
| | | <Name>åéä¸å</Name> |
| | | <EnterMode>Automatic</EnterMode> |
| | | <ExitMode>Automatic</ExitMode> |
| | | <JoinType>JoinXOR</JoinType> |
| | | <SplitType>SplitXOR</SplitType> |
| | | <TaskDelay>0</TaskDelay> |
| | | <WriteRetryCount>10</WriteRetryCount> |
| | | <WriteRetryDelay>500</WriteRetryDelay> |
| | | <ParameterVariables> |
| | | <WriteParameterVariable> |
| | | <Sort>1</Sort> |
| | | <WriteVariableName>HIAWms_BarcodeVariable</WriteVariableName> |
| | | <WriteVariableValue></WriteVariableValue> |
| | | </WriteParameterVariable> |
| | | </ParameterVariables> |
| | | <ExtendedProperty></ExtendedProperty> |
| | | </Activity> |
| | | <Activity xsi:type="EndActivity"> |
| | | <Alias>ç»æ</Alias> |
| | | <Name>ç»æ</Name> |
| | | <EnterMode>Automatic</EnterMode> |
| | | <ExitMode>Automatic</ExitMode> |
| | | <JoinType>JoinXOR</JoinType> |
| | | <SplitType>SplitXOR</SplitType> |
| | | <ExtendedProperty></ExtendedProperty> |
| | | </Activity> |
| | | </Activities> |
| | | <Transitions> |
| | | <Transition> |
| | | <Label>å¯å¨->触åä¿¡å·çå¬</Label> |
| | | <Source>å¯å¨</Source> |
| | | <Sink>触åä¿¡å·çå¬</Sink> |
| | | </Transition> |
| | | <Transition> |
| | | <Label>触åä¿¡å·çå¬->åé读å</Label> |
| | | <Source>触åä¿¡å·çå¬</Source> |
| | | <Sink>åé读å</Sink> |
| | | </Transition> |
| | | <Transition> |
| | | <Label>åé读å->æ©å±æ¥éª¤</Label> |
| | | <Source>åé读å</Source> |
| | | <Sink>æ©å±æ¥éª¤</Sink> |
| | | </Transition> |
| | | <Transition> |
| | | <Label>æ©å±æ¥éª¤->触åä¿¡å·å¤ä½çå¬</Label> |
| | | <Source>æ©å±æ¥éª¤</Source> |
| | | <Sink>触åä¿¡å·å¤ä½çå¬</Sink> |
| | | </Transition> |
| | | <Transition> |
| | | <Label>触åä¿¡å·å¤ä½çå¬->éç¨æ¥éª¤</Label> |
| | | <Source>触åä¿¡å·å¤ä½çå¬</Source> |
| | | <Sink>éç¨æ¥éª¤</Sink> |
| | | </Transition> |
| | | <Transition> |
| | | <Label>éç¨æ¥éª¤->åéä¸å</Label> |
| | | <Source>éç¨æ¥éª¤</Source> |
| | | <Sink>åéä¸å</Sink> |
| | | </Transition> |
| | | <Transition> |
| | | <Label>åéä¸å->ç»æ</Label> |
| | | <Source>åéä¸å</Source> |
| | | <Sink>ç»æ</Sink> |
| | | </Transition> |
| | | </Transitions> |
| | | </ProcessflowBuilder> |
| | | </Define> |
| | | <Appearance> |
| | | <ProcessflowAppearance xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
| | | </ProcessflowAppearance> |
| | | </Appearance> |
| | | </ProcessflowDefine> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Root> |
| | | <FlowInfo> |
| | | <Type>50001</Type> |
| | | <Name>æµè¯æµç¨</Name> |
| | | <Description></Description> |
| | | <Version>1</Version> |
| | | <FilePath>FlowPfd/50001_1.pfd</FilePath> |
| | | <BusinessType> |
| | | <Name>Other</Name> |
| | | <Value>1</Value> |
| | | <Description>æµè¯æµç¨</Description> |
| | | </BusinessType> |
| | | </FlowInfo> |
| | | </Root> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
| | | <ConfigureAwait ContinueOnCapturedContext="false" /> |
| | | </Weavers> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace CMS.Plugin.HIAWms.Jobs |
| | | { |
| | | /// <summary> |
| | | /// HIAWms ä½ä¸åæ° |
| | | /// </summary> |
| | | public class HIAWmsArgs |
| | | { |
| | | /// <summary> |
| | | /// Gets or sets the subject. |
| | | /// </summary> |
| | | public string Subject { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Gets or sets the body. |
| | | /// </summary> |
| | | public string Body { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainers; |
| | | using Microsoft.Extensions.Logging; |
| | | using Volo.Abp.BackgroundJobs; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Jobs |
| | | { |
| | | /// <summary> |
| | | /// HIAWms åå°ä½ä¸ |
| | | /// </summary> |
| | | public class HIAWmsJob : BackgroundJob<HIAWmsArgs>, ITransientDependency |
| | | { |
| | | private readonly ILogger<HIAWmsJob> _logger; |
| | | private readonly IUnitOfWorkManager _unitOfWorkManager; |
| | | private readonly IWmsContainerRepository _wmscontainerRepository; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="HIAWmsJob"/> class. |
| | | /// </summary> |
| | | /// <param name="logger">The logger.</param> |
| | | /// <param name="unitOfWorkManager">The unit of work manager.</param> |
| | | /// <param name="wmscontainerRepository">My entity name repository.</param> |
| | | public HIAWmsJob(ILogger<HIAWmsJob> logger, IUnitOfWorkManager unitOfWorkManager, IWmsContainerRepository wmscontainerRepository) |
| | | { |
| | | _logger = logger; |
| | | _unitOfWorkManager = unitOfWorkManager; |
| | | _wmscontainerRepository = wmscontainerRepository; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public override void Execute(HIAWmsArgs args) |
| | | { |
| | | using var uow = _unitOfWorkManager.Begin(requiresNew: true); |
| | | var count = _wmscontainerRepository.GetCountAsync().GetAwaiter().GetResult(); |
| | | |
| | | // å¦æææ´æ°æ°æ®åºæä½ï¼éæäº¤ä¿å |
| | | // uow.SaveChangesAsync().GetAwaiter().GetResult(); |
| | | |
| | | _logger.LogInformation($"HIAWmsJob Executeï¼Subject={args.Subject}ï¼Body={args.Body}ï¼Count={count}"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.FlowManagement.Abstractions.FlowBusiness; |
| | | using CMS.Plugin.HIAWms.Apis; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsContainers; |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainers; |
| | | using CMS.Plugin.HIAWms.Jobs; |
| | | using CMS.Project; |
| | | using CMS.Project.Abstractions; |
| | | using CMS.Unit.RuntimeValue.Abstractions; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Microsoft.Extensions.Logging; |
| | | using Volo.Abp.BackgroundJobs; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.ProjectService |
| | | { |
| | | /// <summary> |
| | | /// å·¥ç¨æå¡ï¼åå·¥ç¨å
³èçåå°æå¡ï¼å½<see cref="IProjectServiceRunner"/>以å½åKeyè°ç¨æ¶ä¼è¢«æ§è¡ |
| | | /// </summary> |
| | | public class HIAWmsProjectService : BaseProjectService |
| | | { |
| | | private IServiceProvider _serviceProvider; |
| | | private readonly ILogger<HIAWmsProjectService> _logger; |
| | | private readonly IVariableDataCache _variableDataCache; |
| | | private FlowVariableChannelListener _channelListener; |
| | | private Dictionary<string, string> _monitorVariableNames; |
| | | |
| | | /// <summary> |
| | | /// æå¡çKeyï¼å¯ä¸ï¼ä¾<see cref="IProjectServiceRunner"/>ä½¿ç¨ |
| | | /// </summary> |
| | | public override string Key => "HIAWms"; |
| | | |
| | | /// <summary> |
| | | /// æå¡æè¿°ï¼æ¾ç¤ºå¨æå¡å表UIä¸çåç§° |
| | | /// </summary> |
| | | public override string Description => "HIAWmsæå¡"; |
| | | |
| | | /// <summary> |
| | | /// å¯ç¨ææ |
| | | /// </summary> |
| | | public override bool AuthRequired => false; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="HIAWmsProjectService"/> class. |
| | | /// </summary> |
| | | /// <param name="logger">The logger.</param> |
| | | /// <param name="variableDataCache">The variable data cache.</param> |
| | | public HIAWmsProjectService(IServiceProvider serviceProvider, ILogger<HIAWmsProjectService> logger, IVariableDataCache variableDataCache) |
| | | { |
| | | _serviceProvider = serviceProvider; |
| | | _logger = logger; |
| | | _variableDataCache = variableDataCache; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¼å¯æå¡ |
| | | /// </summary> |
| | | /// <param name="serviceProvider">å
·æå·¥ç¨ä¸ä¸æçå®ä¾</param> |
| | | public override async Task StartAsync(IServiceProvider serviceProvider) |
| | | { |
| | | if (State == ProjectServiceState.Started) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | // çå¬åé |
| | | _monitorVariableNames = new Dictionary<string, string> |
| | | { |
| | | { "HIAWms_Variable1", "çå¬åé1" }, |
| | | { "HIAWms_Variable2", "çå¬åé2" } |
| | | }; |
| | | |
| | | // å建ééçå¬ |
| | | _channelListener?.Token?.Dispose(); |
| | | _channelListener = new FlowVariableChannelListener(_logger, _variableDataCache); |
| | | _channelListener.CreateChannel(Key, waitListener: false, timeout: TimeSpan.FromSeconds(30), variableFilter: _monitorVariableNames.Keys.ToHashSet()); |
| | | _channelListener.TagChanged += OnTagValueChanged; |
| | | |
| | | await base.StartAsync(serviceProvider); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 忢æå¡ |
| | | /// </summary> |
| | | /// <param name="serviceProvider">å
·æå·¥ç¨ä¸ä¸æçå®ä¾</param> |
| | | public override async Task StopAsync(IServiceProvider serviceProvider) |
| | | { |
| | | if (_channelListener != null) |
| | | { |
| | | // éæ¾çå¬ |
| | | _channelListener.TagChanged -= OnTagValueChanged; |
| | | _channelListener.Token.Dispose(); |
| | | _channelListener = null; |
| | | } |
| | | |
| | | // 使ç¨åå°ä½ä¸å¼æ¥å¤ç |
| | | //await _serviceProvider.GetRequiredService<IBackgroundJobManager>().EnqueueAsync(new HIAWmsArgs |
| | | //{ |
| | | // Subject = "HIAWms_Subject", |
| | | // Body = "HIAWms_Body", |
| | | //}); |
| | | |
| | | |
| | | await base.StopAsync(serviceProvider); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Called when [tag value changed]. |
| | | /// </summary> |
| | | /// <param name="sender">The sender.</param> |
| | | /// <param name="e">The <see cref="TagChangedEventArgs"/> instance containing the event data.</param> |
| | | private async void OnTagValueChanged(object sender, TagChangedEventArgs e) |
| | | { |
| | | var changeds = e.Changeds.Where(x => _monitorVariableNames != null && _monitorVariableNames.ContainsKey(x.Name)); |
| | | if (!changeds.Any()) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | foreach (var changed in changeds) |
| | | { |
| | | var oldValue = changed.Old?.Value; |
| | | var newValue = changed.New?.Value; |
| | | var traceId = e.TraceId; |
| | | |
| | | _logger.LogInformation($"{changed.Name} åéå¼åçååï¼æ§å¼{oldValue}=æ°å¼{newValue}ï¼TraceId={traceId}"); |
| | | |
| | | // TODO: å¤çåéå¼åå |
| | | // Tipsï¼https://cms-docs.shengyc.com/cms/api/%E5%90%8E%E7%AB%AF#3-%E5%8F%98%E9%87%8F%E6%A8%A1%E5%9D%97 |
| | | /* 说æï¼éè¿è®¢é
IVariableDataCache.TagChanged äºä»¶ï¼æ¨å¯ä»¥å®æ¶çæ§åéçååãæ¤äºä»¶ä¼ä¼ éææåéè³äºä»¶å¤ç彿°ï¼å æ¤ï¼ä¸å¡å±éå¨å½æ°ä¸çéå
³æ³¨çåéã |
| | | 注æäºé¡¹ï¼ |
| | | ï¼1ï¼æ§è½å½±åï¼ åå¸äºä»¶æ¶ï¼äºä»¶çåéè
å°é»å¡æµç¨ãå æ¤ï¼å¼ºç建议é¿å
å¨äºä»¶å¤ç彿°ä¸æ§è¡ I/ O æä½ãHTTP æ¥å£è®¿é®æå
¶ä»èæ¶æä½ï¼ä»¥é²æ¢å¯¹ç³»ç»æ§è½äº§ç严éå½±åï¼å¯¼è´æ´ä¸ªç³»ç»ååºå»¶è¿ã |
| | | ï¼2ï¼é«é¢ç触åï¼ ç±äºäºä»¶è®¢é
äºå
¨éåéï¼è§¦åé¢çå¯è½é常é«ã |
| | | ï¼3ï¼å¼æ¥å¤çï¼ é´äºäºä»¶è§¦åé¢çå¾é«ï¼å»ºè®®ä¸å¡å±å¨çéå
³æ³¨åéåï¼ä½¿ç¨ Task å¯å¨æ°çº¿ç¨å¤çä¸å¡é»è¾ï¼ä»¥é¿å
é»å¡æ ¸å¿çåéçå¬åè½ï¼å®ç°ä¸å¡å±ä¸å¹³å°åºåº§çè§£è¦ã |
| | | ï¼4ï¼å¹¶å管çï¼ å¦æä¸å¡å±å¹¶åé大ï¼å¿
é¡»ä¼å代ç 设计å宿½ï¼ä»¥åå°å¨é«å¹¶åæ
åµä¸çç³»ç»èµæºæ¶èï¼é²æ¢ç³»ç»æ§è½é®é¢ã |
| | | ï¼5ï¼ä»£ç å®å
¨ï¼ å®è£
å¹¶ä½¿ç¨ CMS.CodeAnalysis åæå¨æ¥åæ IVariableDataCache.TagChanged çä½¿ç¨æ
åµã该工å
·è½å¨ä½¿ç¨ä¸å½æ¶æä¾ç¼è¯é误ï¼å¸®å©æ¨æé«ä»£ç è´¨éã*/ |
| | | |
| | | _ = Task.Run(async () => |
| | | { |
| | | // ä¾1ï¼åæ¥å¤ç |
| | | //await ProcessAsync(); |
| | | |
| | | // ä¾2ï¼è°ç¨å¤é¨API |
| | | //await ExecuteExternalApiAsync(); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Processes the asynchronous. |
| | | /// </summary> |
| | | private async Task ProcessAsync() |
| | | { |
| | | using var scope = _serviceProvider.CreateScope(); |
| | | var unitOfWorkManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>(); |
| | | using var uow = unitOfWorkManager.Begin(requiresNew: true); |
| | | var wmscontainerRepository = scope.ServiceProvider.GetRequiredService<IWmsContainerRepository>(); |
| | | var count = await wmscontainerRepository.GetCountAsync(); |
| | | |
| | | // å¦æææ´æ°æ°æ®åºæä½ï¼éæäº¤ä¿å |
| | | // await uow.SaveChangesAsync(); |
| | | |
| | | _logger.LogInformation($"ProcessAsyncï¼Count={count}"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "profiles": { |
| | | "DebugFromCMS": { |
| | | "commandName": "Executable", |
| | | "executablePath": "$(CMSRootPath)\\host\\CMS.Host.exe", |
| | | "workingDirectory": "$(CMSRootPath)\\host", |
| | | "commandLineArgs":"-d", |
| | | "environmentVariables": { |
| | | "DOTNET_ENVIRONMENT": "Development", |
| | | "ASPNETCORE_URLS": "http://*:18000", |
| | | "PluginPath": "../plugins", |
| | | "DatabaseType": "MySQL" |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Abstractions; |
| | | using CMS.Plugin.HIAWms.Domain.WmsContainers; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Microsoft.Extensions.Logging; |
| | | using SYC.Flow.Kernel; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Services |
| | | { |
| | | /// <inheritdoc /> |
| | | public class HIAWmsFlowService : IHIAWmsFlowService, ITransientDependency |
| | | { |
| | | private readonly ILogger<HIAWmsFlowService> _logger; |
| | | private readonly IServiceProvider _serviceProvider; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="HIAWmsFlowService"/> class. |
| | | /// </summary> |
| | | /// <param name="logger">The logger.</param> |
| | | public HIAWmsFlowService(ILogger<HIAWmsFlowService> logger, IServiceProvider serviceProvider) |
| | | { |
| | | _logger = logger; |
| | | _serviceProvider = serviceProvider; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task ProcessAsync(ProcessflowEventArgs args) |
| | | { |
| | | using var scope = _serviceProvider.CreateScope(); |
| | | var unitOfWorkManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>(); |
| | | using var uow = unitOfWorkManager.Begin(requiresNew: true); |
| | | var wmscontainerRepository = scope.ServiceProvider.GetRequiredService<IWmsContainerRepository>(); |
| | | var count = await wmscontainerRepository.GetCountAsync(); |
| | | |
| | | // å¦æææ´æ°æ°æ®åºæä½ï¼éæäº¤ä¿å |
| | | // await uow.SaveChangesAsync(); |
| | | |
| | | // è¾åºæ¥å¿ |
| | | _logger.LogInformation($"HIAWmsFlowServiceï¼ProcessAsync()"); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Extensions.Variable; |
| | | using CMS.Project.Abstractions; |
| | | using KissUtil.Extensions; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Microsoft.Extensions.Logging; |
| | | using Volo.Abp.BackgroundWorkers; |
| | | using Volo.Abp.Threading; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Workers |
| | | { |
| | | /// <summary> |
| | | /// HIAWmsåå°å·¥ä½è
|
| | | /// </summary> |
| | | public class HIAWmsWorker : AsyncPeriodicBackgroundWorkerBase |
| | | { |
| | | private readonly ILogger<HIAWmsWorker> _logger; |
| | | private readonly VariableService _variableService; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="HIAWmsWorker"/> class. |
| | | /// </summary> |
| | | /// <param name="timer">The timer.</param> |
| | | /// <param name="serviceScopeFactory">The service scope factory.</param> |
| | | public HIAWmsWorker(ILogger<HIAWmsWorker> logger, AbpAsyncTimer timer, VariableService variableService, IServiceScopeFactory serviceScopeFactory) : base(timer, serviceScopeFactory) |
| | | { |
| | | _logger = logger; |
| | | _variableService = variableService; |
| | | Timer.Period = 1 * 300 * 1000; // æ¯é 300 ç§ æ§è¡ä¸æ¬¡ |
| | | Timer.RunOnStart = true; |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext) |
| | | { |
| | | var projectAccessor = workerContext.ServiceProvider.GetRequiredService<IProjectAccessor>(); |
| | | var project = await projectAccessor.GetProjectAsync(); |
| | | if (project?.Info == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | //_logger.LogInformation($"HIAWmsWorker is working for project {project.Info.Id}"); |
| | | |
| | | //// 计ç®OEE |
| | | //double oee = await CalculateOEEAsync(); |
| | | |
| | | //// 使ç¨ç¾åæ¯æ ¼å¼ æå°ç»ææ¥å¿ |
| | | //_logger.LogInformation($"OEE:{oee:P2}"); |
| | | |
| | | //// åå
¥åé |
| | | //await _variableService.WriteValueAsync(new Dictionary<string, object> {{ "OEE", oee } }); |
| | | } |
| | | |
| | | // 计ç®OEE=å¯ç¨æ§Ãæ§è½Ãè´¨é |
| | | public async Task<double> CalculateOEEAsync() |
| | | { |
| | | // 读åOEEè®¡ç®æéçå¼ |
| | | double availability = await ReadDoubleValueAsync("Availability"); |
| | | double performance = await ReadDoubleValueAsync("Performance"); |
| | | double quality = await ReadDoubleValueAsync("Quality"); |
| | | |
| | | // 计ç®OEE |
| | | double oee = availability * performance * quality; |
| | | |
| | | // è¿å计ç®ç»æ |
| | | return oee; |
| | | } |
| | | |
| | | // æä¾ä¸ä¸ªæ³åæ¹æ³ï¼æ¹ä¾¿ç´æ¥è·ådoubleç±»åçå¼ |
| | | public async Task<double> ReadDoubleValueAsync(string variableName) |
| | | { |
| | | var variable = await _variableService.ReadValueAsync(variableName); |
| | | return (variable?.Content?.Value).SafeString().ToDoubleOrNull().GetValueOrDefault(); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | // é
ç½®æä»¶å°½å¯è½åå¨/host/appsettings.jsonææ°æ®åºä¸ï¼é¿å
æä»¶å级æ¶è¢«è¦ç |
| | | "IHIAWmsExternalApi": { |
| | | "HttpHost": "http://127.0.0.1:18000/" // External API对æ¥å°å |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", |
| | | "settings": { |
| | | "orderingRules": { |
| | | "systemUsingDirectivesFirst": false, |
| | | "usingDirectivesPlacement": "outsideNamespace", |
| | | "blankLinesBetweenUsingGroups": "omit" |
| | | }, |
| | | "namingRules": { |
| | | "allowCommonHungarianPrefixes": false, |
| | | "allowedNamespaceComponents": [ |
| | | "iOS" |
| | | ], |
| | | "includeInferredTupleElementNames": true |
| | | }, |
| | | "maintainabilityRules": { |
| | | "topLevelTypes": [ |
| | | "class", |
| | | "interface", |
| | | "struct" |
| | | ] |
| | | }, |
| | | "layoutRules": { |
| | | "newlineAtEndOfFile": "require" |
| | | }, |
| | | "documentationRules": { |
| | | "companyName": "广å·çåæç§ææéå
¬å¸", |
| | | "copyrightText": "Copyright (c) {companyName}. All rights reserved." |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | <Import Project="../../common.test.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\..\src\CMS.Plugin.HIAWms.Application\CMS.Plugin.HIAWms.Application.csproj" /> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.Domain.Tests\CMS.Plugin.HIAWms.Domain.Tests.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using CMS.Plugin.HIAWms.MySQL; |
| | | using CMS.Plugin.HIAWms.TestBase; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Tests |
| | | { |
| | | /// <summary> |
| | | /// HIAWmsApplicationTestBase |
| | | /// </summary> |
| | | public class HIAWmsApplicationTestBase : HIAWmsTestBase<HIAWmsApplicationTestModule> |
| | | { |
| | | /// <summary> |
| | | /// UsingDbContext |
| | | /// </summary> |
| | | /// <param name="action">IHIAWmsDbContext</param> |
| | | protected virtual void UsingDbContext(Action<CMSPluginDbContext> action) |
| | | { |
| | | using (var dbContext = GetRequiredService<CMSPluginDbContext>()) |
| | | { |
| | | action.Invoke(dbContext); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// UsingDbContext |
| | | /// </summary> |
| | | /// <typeparam name="T">T</typeparam> |
| | | /// <param name="action">IHIAWmsDbContext</param> |
| | | /// <returns>T</returns> |
| | | protected virtual T UsingDbContext<T>(Func<CMSPluginDbContext, T> action) |
| | | { |
| | | using (var dbContext = GetRequiredService<CMSPluginDbContext>()) |
| | | { |
| | | return action.Invoke(dbContext); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain.Tests; |
| | | using Volo.Abp.Modularity; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Tests |
| | | { |
| | | /// <summary> |
| | | /// HIAWmsApplicationTestModule |
| | | /// </summary> |
| | | [DependsOn( |
| | | typeof(CMSPluginApplicationModule), |
| | | typeof(HIAWmsDomainTestModule))] |
| | | public class HIAWmsApplicationTestModule : AbpModule |
| | | { |
| | | public override void ConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | base.ConfigureServices(context); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | <Import Project="../../common.test.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkPackageVersion)" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.EntityFrameworkCore.Tests\CMS.Plugin.HIAWms.EntityFrameworkCore.Tests.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore; |
| | | using CMS.Plugin.HIAWms.MySQL; |
| | | using CMS.Plugin.HIAWms.TestBase; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Tests |
| | | { |
| | | /// <summary> |
| | | /// HIAWms DomainTestBase |
| | | /// </summary> |
| | | public class HIAWmsDomainTestBase : HIAWmsTestBase<HIAWmsDomainTestModule> |
| | | { |
| | | /// <summary> |
| | | /// UsingDbContext |
| | | /// </summary> |
| | | /// <param name="action">IHIAWmsDbContext</param> |
| | | protected virtual void UsingDbContext(Action<CMSPluginDbContext> action) |
| | | { |
| | | using (var dbContext = GetRequiredService<CMSPluginDbContext>()) |
| | | { |
| | | action.Invoke(dbContext); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// UsingDbContext |
| | | /// </summary> |
| | | /// <typeparam name="T">T</typeparam> |
| | | /// <param name="action">IHIAWmsDbContext</param> |
| | | /// <returns>T</returns> |
| | | protected virtual T UsingDbContext<T>(Func<CMSPluginDbContext, T> action) |
| | | { |
| | | using (var dbContext = GetRequiredService<CMSPluginDbContext>()) |
| | | { |
| | | return action.Invoke(dbContext); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.EntityFrameworkCore.Tests; |
| | | using Volo.Abp.Modularity; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.Tests |
| | | { |
| | | /// <summary> |
| | | /// HIAWms DomainTestModule |
| | | /// </summary> |
| | | [DependsOn(typeof(HIAWmsTestEntityFrameworkCoreModule))] |
| | | public class HIAWmsDomainTestModule : AbpModule |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | <Import Project="../../common.test.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Volo.Abp.EntityFrameworkCore.Sqlite" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkPackageVersion)" /> |
| | | <PackageReference Include="NSubstitute" Version="$(NSubstitutePackageVersion)" /> |
| | | <PackageReference Include="Shouldly" Version="$(ShouldlyPackageVersion)" /> |
| | | <PackageReference Include="xunit" Version="$(xUnitPackageVersion)" /> |
| | | <PackageReference Include="xunit.extensibility.execution" Version="$(xUnitExtensibilityExecutionPackageVersion)" /> |
| | | <PackageReference Include="xunit.runner.visualstudio" Version="$(xUnitRunnerVisualstudioPackageVersion)" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\..\src\CMS.Plugin.HIAWms.EntityFrameworkCore\CMS.Plugin.HIAWms.EntityFrameworkCore.csproj" /> |
| | | <ProjectReference Include="..\..\src\CMS.Plugin.HIAWms.MySQL\CMS.Plugin.HIAWms.MySQL.csproj" /> |
| | | <ProjectReference Include="..\CMS.Plugin.HIAWms.TestBase\CMS.Plugin.HIAWms.TestBase.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.TestBase; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Tests |
| | | { |
| | | /// <summary> |
| | | /// MyProjectName TestBase |
| | | /// </summary> |
| | | public class HIAWmsEntityFrameworkTestBase : HIAWmsTestBase<HIAWmsTestEntityFrameworkCoreModule> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.MySQL; |
| | | using CMS.Plugin.HIAWms.TestBase; |
| | | 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; |
| | | |
| | | namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Tests |
| | | { |
| | | /// <summary> |
| | | /// MyProjectName TestEntityFrameworkCoreModule |
| | | /// </summary> |
| | | [DependsOn( |
| | | typeof(HIAWmsTestBaseModule), |
| | | typeof(CMSPluginEntityFrameworkCoreModule), |
| | | typeof(AbpEntityFrameworkCoreSqliteModule))] |
| | | public class HIAWmsTestEntityFrameworkCoreModule : AbpModule |
| | | { |
| | | /// <summary> |
| | | /// ConfigureServices |
| | | /// </summary> |
| | | /// <param name="context">ServiceConfigurationContext</param> |
| | | public override void ConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | var sqliteConnection = CreateDatabaseAndGetConnection(); |
| | | |
| | | Configure<AbpDbContextOptions>(options => |
| | | { |
| | | options.Configure(dbContextConfigurationContext => |
| | | { |
| | | dbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection); |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | private static SqliteConnection CreateDatabaseAndGetConnection() |
| | | { |
| | | var connection = new SqliteConnection("Data Source=:memory:"); |
| | | connection.Open(); |
| | | |
| | | new CMSPluginDbContext( |
| | | new DbContextOptionsBuilder<CMSPluginDbContext>().UseSqlite(connection).Options).GetService<IRelationalDatabaseCreator>().CreateTables(); |
| | | |
| | | return connection; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <Project Sdk="Microsoft.NET.Sdk"> |
| | | <Import Project="../../common.test.props" /> |
| | | |
| | | <PropertyGroup> |
| | | <TargetFramework>net6.0</TargetFramework> |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Volo.Abp.Autofac" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Volo.Abp.TestBase" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Volo.Abp.Authorization" Version="$(ABPPackageVersion)" /> |
| | | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkPackageVersion)" /> |
| | | <PackageReference Include="NSubstitute" Version="$(NSubstitutePackageVersion)" /> |
| | | <PackageReference Include="Shouldly" Version="$(ShouldlyPackageVersion)" /> |
| | | <PackageReference Include="xunit" Version="$(xUnitPackageVersion)" /> |
| | | <PackageReference Include="xunit.extensibility.execution" Version="$(xUnitExtensibilityExecutionPackageVersion)" /> |
| | | <PackageReference Include="xunit.runner.visualstudio" Version="$(xUnitRunnerVisualstudioPackageVersion)" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\..\src\CMS.Plugin.HIAWms.Domain\CMS.Plugin.HIAWms.Domain.csproj" /> |
| | | </ItemGroup> |
| | | </Project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.DependencyInjection; |
| | | using Volo.Abp.Guids; |
| | | |
| | | namespace CMS.Plugin.HIAWms.TestBase |
| | | { |
| | | /// <summary> |
| | | /// MyProjectName DataSeedContributor |
| | | /// </summary> |
| | | public class HIAWmsDataSeedContributor : IDataSeedContributor, ITransientDependency |
| | | { |
| | | private readonly HIAWmsTestData _myProjectNameTestData; |
| | | private readonly IGuidGenerator _guidGenerator; |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="HIAWmsDataSeedContributor"/> class. |
| | | /// </summary> |
| | | /// <param name="serviceProvider">IServiceProvider</param> |
| | | public HIAWmsDataSeedContributor(IServiceProvider serviceProvider) |
| | | { |
| | | _myProjectNameTestData = serviceProvider.GetRequiredService<HIAWmsTestData>(); |
| | | _guidGenerator = serviceProvider.GetRequiredService<IGuidGenerator>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// SeedAsync |
| | | /// </summary> |
| | | /// <param name="context">DataSeedContext</param> |
| | | /// <returns>Task</returns> |
| | | public async Task SeedAsync(DataSeedContext context) |
| | | { |
| | | await Task.CompletedTask; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Modularity; |
| | | using Volo.Abp.Testing; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.TestBase |
| | | { |
| | | /// <summary> |
| | | /// MyProjectName TestBase |
| | | /// </summary> |
| | | /// <typeparam name="TStartupModule">IAbpModule</typeparam> |
| | | public class HIAWmsTestBase<TStartupModule> : AbpIntegratedTest<TStartupModule> |
| | | where TStartupModule : IAbpModule |
| | | { |
| | | /// <summary> |
| | | /// SetAbpApplicationCreationOptions |
| | | /// </summary> |
| | | /// <param name="options">AbpApplicationCreationOptions</param> |
| | | protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) |
| | | { |
| | | options.UseAutofac(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WithUnitOfWorkAsync |
| | | /// </summary> |
| | | /// <param name="func">func</param> |
| | | /// <returns>Task</returns> |
| | | protected virtual Task WithUnitOfWorkAsync(Func<Task> func) |
| | | { |
| | | return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WithUnitOfWorkAsync |
| | | /// </summary> |
| | | /// <param name="options">AbpUnitOfWorkOptions</param> |
| | | /// <param name="action">action</param> |
| | | /// <returns>Task</returns> |
| | | protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action) |
| | | { |
| | | using (var scope = ServiceProvider.CreateScope()) |
| | | { |
| | | var uowManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>(); |
| | | |
| | | using (var uow = uowManager.Begin(options)) |
| | | { |
| | | await action(); |
| | | |
| | | await uow.CompleteAsync(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WithUnitOfWorkAsync |
| | | /// </summary> |
| | | /// <typeparam name="TResult">t</typeparam> |
| | | /// <param name="func">TResult</param> |
| | | /// <returns>TResult</returns> |
| | | protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) |
| | | { |
| | | return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// WithUnitOfWorkAsync |
| | | /// </summary> |
| | | /// <typeparam name="TResult">T</typeparam> |
| | | /// <param name="options">AbpUnitOfWorkOptions</param> |
| | | /// <param name="func">Func</param> |
| | | /// <returns>TResult</returns> |
| | | protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func) |
| | | { |
| | | using (var scope = ServiceProvider.CreateScope()) |
| | | { |
| | | var uowManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>(); |
| | | |
| | | using (var uow = uowManager.Begin(options)) |
| | | { |
| | | var result = await func(); |
| | | await uow.CompleteAsync(); |
| | | return result; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using CMS.Plugin.HIAWms.Domain; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using Volo.Abp; |
| | | using Volo.Abp.Autofac; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.Modularity; |
| | | using Volo.Abp.Threading; |
| | | using Volo.Abp.Uow; |
| | | |
| | | namespace CMS.Plugin.HIAWms.TestBase |
| | | { |
| | | /// <summary> |
| | | /// MyProjectName TestBaseModule |
| | | /// </summary> |
| | | [DependsOn( |
| | | typeof(AbpAutofacModule), |
| | | typeof(AbpTestBaseModule), |
| | | typeof(CMSPluginDomainModule))] |
| | | public class HIAWmsTestBaseModule : AbpModule |
| | | { |
| | | /// <summary> |
| | | /// PreConfigureServices |
| | | /// </summary> |
| | | /// <param name="context">ServiceConfigurationContext</param> |
| | | public override void PreConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ConfigureServices |
| | | /// </summary> |
| | | /// <param name="context">ServiceConfigurationContext</param> |
| | | public override void ConfigureServices(ServiceConfigurationContext context) |
| | | { |
| | | context.Services.AddAlwaysAllowAuthorization(); |
| | | Configure<AbpUnitOfWorkDefaultOptions>(options => |
| | | { |
| | | options.TransactionBehavior = UnitOfWorkTransactionBehavior.Enabled; |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// OnApplicationInitialization |
| | | /// </summary> |
| | | /// <param name="context">ApplicationInitializationContext</param> |
| | | public override void OnApplicationInitialization(ApplicationInitializationContext context) |
| | | { |
| | | SeedTestData(context); |
| | | } |
| | | |
| | | private static void SeedTestData(ApplicationInitializationContext context) |
| | | { |
| | | AsyncHelper.RunSync(async () => |
| | | { |
| | | using (var scope = context.ServiceProvider.CreateScope()) |
| | | { |
| | | var dataSeeder = scope.ServiceProvider.GetRequiredService<IDataSeeder>(); |
| | | await dataSeeder.SeedAsync(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Volo.Abp.DependencyInjection; |
| | | |
| | | namespace CMS.Plugin.HIAWms.TestBase |
| | | { |
| | | public class HIAWmsTestData : ISingletonDependency |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # port 端å£å· |
| | | VITE_PORT = 8001 |
| | | |
| | | VITE_APP_TITLE= CMS |
| | | |
| | | VITE_API_URL = 'http://192.168.5.94:18002' # å¼åç-è²èª |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # |
| | | # 请å¤å¶æ¤æä»¶å¹¶å½å为 `.env.development.local` |
| | | # 个人å¼åè¯·å¨ `.env.development.local` æä»¶ä¸æ¹å¨ |
| | | # |
| | | |
| | | # æ¬å°ç¯å¢ |
| | | ENV = 'development' |
| | | |
| | | VITE_APP_TITLE= CMS |
| | | |
| | | VITE_APP_NAMESPACE= 'cs' |
| | | |
| | | # VITE_API_URL = 'http://192.168.2.13:18002' |
| | | VITE_API_URL = 'http://127.0.0.1:18002' |
| | | |
| | | VITE_PROJECT_API_URL='http://127.0.0.1:8800' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # 线ä¸ç¯å¢ |
| | | ENV = 'production' |
| | | |
| | | # 线ä¸ç¯å¢æ¥å£å°å |
| | | VITE_API_URL = 'http://127.0.0.1:18002/' |
| | | |
| | | VITE_APP_NAMESPACE= 'cs' |
| | | |
| | | VITE_APP_VERSION = 'beta-9' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* eslint-env node */ |
| | | require('@rushstack/eslint-patch/modern-module-resolution') |
| | | |
| | | module.exports = { |
| | | root: true, |
| | | extends: [ |
| | | 'plugin:vue/vue3-essential', |
| | | 'eslint:recommended', |
| | | '@vue/eslint-config-typescript', |
| | | '@vue/eslint-config-prettier', |
| | | ], |
| | | parserOptions: { |
| | | ecmaVersion: 'latest', |
| | | }, |
| | | rules: { |
| | | 'vue/multi-word-component-names': [0], |
| | | }, |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "semi": false, |
| | | "singleQuote": true, |
| | | "endOfLine": "auto", |
| | | "trailingComma": "es5" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # information-standard-tpl |
| | | |
| | | ## å®è£
ç¯å¢ |
| | | |
| | | å®è£
[nodeJs](https://nodejs.cn/)ç¯å¢,ä¸è½½ nodejsï¼å®è£
宿åï¼ |
| | | |
| | | ```js |
| | | node - v |
| | | ``` |
| | | |
| | | ## å®è£
yarn |
| | | |
| | | ```js |
| | | npm install -g yarn |
| | | ``` |
| | | |
| | | ## å®è£
ä¾èµ |
| | | |
| | | ```js |
| | | yarn |
| | | ``` |
| | | |
| | | ## è¿è¡ |
| | | |
| | | ```js |
| | | npm run dev |
| | | // or |
| | | yarn dev |
| | | |
| | | ``` |
| | | |
| | | ## ç¼è¯ |
| | | |
| | | ```js |
| | | npm run build |
| | | ``` |
| | | |
| | | ## ç®å½ç»æ |
| | | |
| | | ```js |
| | | |- public |
| | | |- script |
| | | |- src |
| | | |----api //ææ¶åºå¼ |
| | | |----assets //èµæº |
| | | |----cms //cms sdkä¾èµ |
| | | |----components //cms sdkä¾èµ |
| | | |------BaseDialog //å°è£
çå¼¹çªï¼æ ·å¼ç»ä¸ |
| | | |------Table//å°è£
çè¡¨æ ¼ï¼æ ·å¼ç»ä¸ |
| | | |------other...//å
¶ä» |
| | | |----provider //å
¨å±æ³¨å
¥ï¼elementå½åç©ºé´ |
| | | |------provider.ts // h |
| | | |------provider.vue // renderç»ä»¶ |
| | | |----utils //å·¥å
· |
| | | |------enum //æä¸¾ |
| | | |----widgets //ç»ä»¶ |
| | | |------hook.ts //é©å |
| | | |------... |
| | | index.html |
| | | ``` |
| | | |
| | | ## åè½ |
| | | |
| | | #### å½åç©ºé´ |
| | | |
| | | > `element-plus`éç¨`sass`ç`$namespace`æ¥è§£å³`css`æ ·å¼å²çªé®é¢ |
| | | |
| | | ```js |
| | | $namespace = 'cs' |
| | | ``` |
| | | |
| | | element-plus ç»ä»¶çæ ·å¼ä» el-xx æ¿æ¢æ cs-xxï¼ä½¿ç¨æ¶ï¼ä»ç¶ä½¿ç¨<el-xx></el-xx> |
| | | |
| | | > element-plus èªå¨æéå¼å
¥ï¼æ éæå¨å¼å
¥ï¼æ éå
¨å±å®è£
|
| | | |
| | | <b>ï¼ï¼ï¼æ³¨æ</b> |
| | | |
| | | ä½¿ç¨ ElMessage å ElMessageBox æ¶ï¼éè¦æå¨å¼å
¥ |
| | | |
| | | ```js |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | ``` |
| | | |
| | | ### æé |
| | | |
| | | å¨/src/widgets/hook.ts ä¸å¼å
¥æéæ§å¶ hook |
| | | |
| | | ```js |
| | | import { usePermission } from '@/libs/Permission/Permission' |
| | | import { permissionCodes } from '../enum' |
| | | |
| | | usePermission(props, permissionCodes) |
| | | |
| | | ... |
| | | defineComponent({ |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | | }) |
| | | |
| | | <IconButton |
| | | //æéæ§å¶ |
| | | v-permission="workSection-add" |
| | | icon="add-p" |
| | | onClick={onAddProcess} |
| | | type="primary" |
| | | > |
| | | æ·»å WmsContainer |
| | | </IconButton> |
| | | |
| | | ``` |
| | | |
| | | ### è·¯ç±å°å |
| | | |
| | | è·¯ç±å°åç»ä¸ç± package.json ä¸ç name å/widgets/[ç»ä»¶å]æ¼æ¥èæ |
| | | å¦ï¼ |
| | | |
| | | > https://localhost:8001/#/base/PersonnelQualification |
| | | |
| | | ### ç»ä¸ä½¿ç¨`BaseDialog`å`Table`æ¥å¼å |
| | | |
| | | #### å¼¹çªä¾å |
| | | |
| | | ```vue |
| | | <BaseDialog |
| | | :title="t('ç¼è¾äººåèµè´¨')" |
| | | v-model="visible" |
| | | class="person-dialog" |
| | | @close="visible = false" |
| | | @confirm="onConfirm" |
| | | > |
| | | <el-form |
| | | label-width="113px" |
| | | :inline="true" |
| | | :model="formData" |
| | | label-position="left" |
| | | > |
| | | <el-form-item :label="t('人åID')" class="person-item"> |
| | | <el-input |
| | | v-model="formData.user" |
| | | :placeholder="t('请è¾å
¥äººåID')" |
| | | class="person-input" |
| | | disabled |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | ... |
| | | </el-form> |
| | | </BaseDialog> |
| | | ``` |
| | | |
| | | #### Table è¡¨æ ¼ç»ä»¶ |
| | | |
| | | ```vue |
| | | <div class="table-content"> |
| | | <Table |
| | | :dataSource="dataSource" |
| | | :columns="columns" |
| | | :total="total" |
| | | :pageSize="MaxResultCount" |
| | | :isChecked="true" |
| | | @sort="onSort" |
| | | @page="onPageChange" |
| | | > |
| | | <template #printTime="{ row }"> |
| | | <span>{{ dayjs(row.printTime).format('YYYY-MM-DD HH:MM:ss') }}</span> |
| | | </template> |
| | | <template #action="{ row }"> |
| | | <el-button @click="onEdit(row)" class="btn-edit" type="info">{{ |
| | | t('ä¿®æ¹') |
| | | }}</el-button> |
| | | </template> |
| | | </Table> |
| | | </div> |
| | | |
| | | ... |
| | | |
| | | <script> |
| | | const columns = [ |
| | | { |
| | | title: 'åºå·', |
| | | type: 'seq', |
| | | width: '60', |
| | | }, |
| | | { |
| | | title: '人åID', |
| | | field: 'personID', |
| | | }, |
| | | { |
| | | title: '人åå§å', |
| | | field: 'name', |
| | | }, |
| | | { |
| | | title: 'èµè´¨å·¥åºç ', |
| | | field: 'qualification', |
| | | }, |
| | | { |
| | | title: 'å¡å·', |
| | | field: 'cardNumber', |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | field: 'action', |
| | | width: '100', |
| | | }, |
| | | ] |
| | | </script> |
| | | ``` |
| | | |
| | | ### 忝å½å |
| | | |
| | | > å¼åï¼feature/xx |
| | | > 稳å®ï¼release/xx |
| | | |
| | | ### é®é¢ |
| | | |
| | | å¦éå°é®é¢ï¼æé®é¢æå°ç¾¤éï¼å¤§å®¶ä¸èµ·æ³åæ³è§£å³ï¼ä¸è¦ä¸ä¸ªäººé·çã |
| | | |
| | | ### å¾®å端é
ç½® |
| | | |
| | | **`single-spa`** |
| | | å¾
è¡¥å
... |
| | | |
| | | ### èµæºæ´åå¹³å° |
| | | |
| | | è§£å³å¼åæçå项ç®èµæºæµªè´¹çé®é¢ |
| | | å¾
è¡¥å
... |
| | | æ¹æ¡å¾
æ´æ°... |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { importFileToService, exportFileToClient } from '@/api/file' |
| | | import { ElMessage } from 'element-plus' |
| | | import { downloadFile } from '@/utils' |
| | | import dayjs from 'dayjs' |
| | | |
| | | export const useFile = () => { |
| | | /** |
| | | * 导å
¥æä»¶ |
| | | * @param url |
| | | */ |
| | | const importFile = async (url: string, file: File) => { |
| | | const formData = new FormData() |
| | | formData.append('file', file) |
| | | await importFileToService(url, formData) |
| | | ElMessage('导å
¥æå') |
| | | } |
| | | /** |
| | | * å¯¼åºæä»¶ |
| | | * @param url |
| | | */ |
| | | const exportFile = async (url: string, params: any, name: string) => { |
| | | const res = await exportFileToClient(url, params) |
| | | downloadFile(res, `${name}_${dayjs().format('YYYYMMDDHHMMss')}.xlsx`) |
| | | ElMessage.success('å¯¼åºæå') |
| | | } |
| | | |
| | | return { |
| | | importFile, |
| | | exportFile, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, Ref, nextTick, computed } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { Sample } from '../Models/Sample' |
| | | import { ElMessage } from 'element-plus' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { useFile } from './File' |
| | | |
| | | interface CurrentType { |
| | | row: any |
| | | index: number |
| | | } |
| | | export const useSample = (props: any, ctx?: any) => { |
| | | const sample = injectModel<Sample>('sample') |
| | | const { exportFile } = useFile() |
| | | /** |
| | | * 头é¨é
ç½® |
| | | */ |
| | | const headers = ref({}) |
| | | /** |
| | | * 卿åé
ç½® |
| | | */ |
| | | const sampleColumns = ref<Record<string, any>>([]) |
| | | /** |
| | | * æç´¢å¼ |
| | | */ |
| | | const search = ref('') |
| | | |
| | | /** |
| | | * æåº |
| | | */ |
| | | const sort = ref(0) |
| | | /** |
| | | * 鿩项 |
| | | */ |
| | | const selection = ref([]) |
| | | /** |
| | | * å½åéä¸çè¡ |
| | | */ |
| | | const current = ref<any>(null) |
| | | /** |
| | | * æ°æ®æº |
| | | */ |
| | | const dataSource: Ref<any[]> = ref([]) |
| | | |
| | | /** |
| | | * è¡¨æ ¼ |
| | | */ |
| | | const tableRef = ref() |
| | | const dialogConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | isAdd: false, |
| | | }) |
| | | |
| | | const dialogSettingConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | }) |
| | | |
| | | /** |
| | | * åé¡µæ°æ® |
| | | */ |
| | | const paginationParams = ref({}) |
| | | |
| | | /** |
| | | * æå¼è¯¦æ
|
| | | * @param row |
| | | */ |
| | | const openDetail = (row: any) => { |
| | | current.value = row |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = row.name |
| | | dialogConfig.isAdd = false |
| | | sort.value = row.sort |
| | | } |
| | | |
| | | const contextMenu = [ |
| | | { |
| | | label: 'å±å¼è¯¦æ
', |
| | | fn: (c: CurrentType) => { |
| | | current.value = null |
| | | sort.value = c.row.sort |
| | | nextTick(() => openDetail(c.row)) |
| | | }, |
| | | divided: true, |
| | | icon: 'o', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 1 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'up', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 2 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'down', |
| | | }, |
| | | { |
| | | label: 'åå»ºå¯æ¬', |
| | | fn: async ({ row }: CurrentType) => { |
| | | await sample.cloneData([row.id]) |
| | | ElMessage.success('åå»ºå¯æ¬æå') |
| | | tableRef.value?.getList() |
| | | }, |
| | | divided: true, |
| | | icon: 'copy', |
| | | }, |
| | | { |
| | | label: 'å é¤', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map((item: { name: string }) => item.name) |
| | | ConfirmBox( |
| | | `æ¯å¦å é¤${names.length ? names.join(',') : c.row.name}` |
| | | ).then(async () => { |
| | | const ids = selection.value.map((item: { id: string }) => item.id) |
| | | await sample.deleteSamples(ids.length ? ids : [c.row.id]) |
| | | ElMessage.success('å 餿å') |
| | | tableRef.value.getList() |
| | | }) |
| | | }, |
| | | icon: 'close', |
| | | }, |
| | | ] |
| | | |
| | | const onCheck = (records: any) => { |
| | | selection.value = records |
| | | } |
| | | |
| | | const onAddSample = () => { |
| | | const params = tableRef.value?.getPaginationParams() |
| | | current.value = null |
| | | dialogConfig.visible = true |
| | | dialogConfig.isAdd = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | sort.value = params.totalCount + 1 |
| | | } |
| | | |
| | | const onConfirmSample = async () => { |
| | | dialogConfig.visible = false |
| | | if (dialogConfig.isAdd) { |
| | | tableRef.value?.scrollToRow({ |
| | | skip: true, |
| | | }) |
| | | } else { |
| | | await tableRef.value?.getList() |
| | | } |
| | | } |
| | | /** |
| | | * è¡ç¹å»æ¶æ´æ°current |
| | | */ |
| | | const onRowClick = ({ row }: any) => { |
| | | if (dialogConfig.visible && current.value) { |
| | | current.value = row |
| | | } |
| | | } |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | const onExport = () => { |
| | | const params = tableRef.value?.getParams() |
| | | exportFile( |
| | | '/api/v1/hiawms/sample/export', |
| | | params, |
| | | 'hiawms' |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * å
³é®åæç´¢ |
| | | */ |
| | | const onSearch = () => { |
| | | tableRef.value?.getList({ |
| | | Filter: search.value, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * éç½®è¡¨æ ¼æ°æ® |
| | | */ |
| | | const reloadList = () => { |
| | | tableRef.value?.getList() |
| | | } |
| | | /** |
| | | * ä¸ä¼ æå |
| | | */ |
| | | const onSuccess = () => { |
| | | tableRef.value?.getList() |
| | | ElMessage.success('导å
¥æå') |
| | | } |
| | | /** |
| | | * 失败 |
| | | * @param err |
| | | */ |
| | | const onError = (err: any) => { |
| | | try { |
| | | const message = JSON.parse(err.message) |
| | | ElMessage.error(message.msg) |
| | | } catch (error) { |
| | | ElMessage.error('导å
¥å¤±è´¥') |
| | | } |
| | | } |
| | | /** |
| | | * ä¸ä¼ é©å |
| | | */ |
| | | const onBeforeUpload = (file: File) => { |
| | | const format = ['xlsx', 'xls', 'csv'] |
| | | if (!format.includes(file.name.split('.')[1])) { |
| | | ElMessage.error('导å
¥æä»¶æ ¼å¼ä¸æ£ç¡®ï¼è¯·å¯¼å
¥.xlsx/.xlsä¸.csvæ ¼å¼çæä»¶') |
| | | return false |
| | | } |
| | | return true |
| | | } |
| | | |
| | | onMounted(() => { |
| | | headers.value = { |
| | | Authorization: `Bearer ${sessionStorage.getItem('Token')}`, |
| | | 'X-Project': sessionStorage.getItem('X-Project'), |
| | | } |
| | | }) |
| | | |
| | | ctx.expose({ |
| | | reloadList, |
| | | }) |
| | | |
| | | return { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | dialogSettingConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | sampleColumns, |
| | | paginationParams, |
| | | headers, |
| | | onBeforeUpload, |
| | | onError, |
| | | onSuccess, |
| | | openDetail, |
| | | onSearch, |
| | | onExport, |
| | | onRowClick, |
| | | onConfirmSample, |
| | | onCheck, |
| | | onAddSample, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, computed, Ref, watch } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { SampleDrawer } from '../Models/SampleDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | |
| | | export const useSampleDrawer = (props: any, ctx?: any) => { |
| | | const sampleDrawer = |
| | | injectModel<SampleDrawer>('sampleDrawer') |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | const initiateData: Ref<Record<string, any>> = ref({}) |
| | | const formData = ref<Record<string, any>>({}) |
| | | // ref |
| | | const formRef = ref() |
| | | |
| | | const current = computed(() => { |
| | | return props.row || null |
| | | }) |
| | | const visible = computed({ |
| | | get() { |
| | | return props.modelValue |
| | | }, |
| | | set(val) { |
| | | ctx.emit('update:modelValue', val) |
| | | }, |
| | | }) |
| | | /** |
| | | * æ·»å çformåæ®µ |
| | | */ |
| | | const formItems = reactive([ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'name', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥åç§°', |
| | | rules: [{ required: true, message: 'åç§°', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'ç¼å·', |
| | | prop: 'code', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥ç¼å·', |
| | | rules: [{ required: true, message: 'ç¼å·', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | const checkIsEqualObject = () => { |
| | | const data = { |
| | | formData: formData.value, |
| | | } |
| | | const check = isEqual(initiateData.value, data) |
| | | return check |
| | | } |
| | | |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | if (checkIsEqualObject()) { |
| | | visible.value = false |
| | | done && done() |
| | | } else { |
| | | ConfirmBox('æ¯å¦ä¿å设置ï¼') |
| | | .then(() => { |
| | | onConfirm() |
| | | }) |
| | | .catch(() => { |
| | | visible.value = false |
| | | done && done() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * ä¿å |
| | | */ |
| | | const onConfirm = async () => { |
| | | await formRef.value?.validate() |
| | | const data = { |
| | | name: formData.value.name, |
| | | code: formData.value.code, |
| | | remark: formData.value.remark, |
| | | sort: props.sort, |
| | | } |
| | | if (!current.value) { |
| | | await sampleDrawer.addSample(data) |
| | | } else { |
| | | const id = current.value.id |
| | | await sampleDrawer.updateSample(id, data) |
| | | } |
| | | ElMessage.success('ä¿åæå') |
| | | ctx.emit('confirm') |
| | | } |
| | | |
| | | const updateCheckData = () => { |
| | | initiateData.value = { |
| | | formData: { |
| | | ...formData.value, |
| | | }, |
| | | } |
| | | } |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | const onOpen = async () => { |
| | | if (current.value) { |
| | | const res = await sampleDrawer.getSampleDetail(current.value) |
| | | |
| | | formData.value = { |
| | | name: res.name, |
| | | code: res.code, |
| | | remark: res.remark, |
| | | id: res.id, |
| | | } |
| | | updateCheckData() |
| | | } else { |
| | | formData.value = {} |
| | | updateCheckData() |
| | | } |
| | | } |
| | | |
| | | watch(() => current.value, onOpen) |
| | | |
| | | return { |
| | | formItems, |
| | | formData, |
| | | visible, |
| | | formRef, |
| | | onOpen, |
| | | onClose, |
| | | onConfirm, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, Ref, nextTick, computed } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsArea } from '../Models/WmsArea' |
| | | import { ElMessage } from 'element-plus' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { useFile } from './File' |
| | | |
| | | interface CurrentType { |
| | | row: any |
| | | index: number |
| | | } |
| | | export const useWmsArea = (props: any, ctx?: any) => { |
| | | const wmsarea = injectModel<WmsArea>('wmsarea') |
| | | const { exportFile } = useFile() |
| | | /** |
| | | * 头é¨é
ç½® |
| | | */ |
| | | const headers = ref({}) |
| | | /** |
| | | * 卿åé
ç½® |
| | | */ |
| | | const wmsareaColumns = ref<Record<string, any>>([]) |
| | | /** |
| | | * æç´¢å¼ |
| | | */ |
| | | const search = ref('') |
| | | |
| | | /** |
| | | * æåº |
| | | */ |
| | | const sort = ref(0) |
| | | /** |
| | | * 鿩项 |
| | | */ |
| | | const selection = ref([]) |
| | | /** |
| | | * å½åéä¸çè¡ |
| | | */ |
| | | const current = ref<any>(null) |
| | | /** |
| | | * æ°æ®æº |
| | | */ |
| | | const dataSource: Ref<any[]> = ref([]) |
| | | |
| | | /** |
| | | * è¡¨æ ¼ |
| | | */ |
| | | const tableRef = ref() |
| | | const dialogConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | isAdd: false, |
| | | }) |
| | | |
| | | const dialogSettingConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | }) |
| | | |
| | | /** |
| | | * åé¡µæ°æ® |
| | | */ |
| | | const paginationParams = ref({}) |
| | | |
| | | /** |
| | | * æå¼è¯¦æ
|
| | | * @param row |
| | | */ |
| | | const openDetail = (row: any) => { |
| | | current.value = row |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = row.name |
| | | dialogConfig.isAdd = false |
| | | sort.value = row.sort |
| | | } |
| | | |
| | | const contextMenu = [ |
| | | { |
| | | label: 'å±å¼è¯¦æ
', |
| | | fn: (c: CurrentType) => { |
| | | current.value = null |
| | | sort.value = c.row.sort |
| | | nextTick(() => openDetail(c.row)) |
| | | }, |
| | | divided: true, |
| | | icon: 'o', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 1 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'up', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 2 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'down', |
| | | }, |
| | | { |
| | | label: 'åå»ºå¯æ¬', |
| | | fn: async ({ row }: CurrentType) => { |
| | | await wmsarea.cloneData([row.id]) |
| | | ElMessage.success('åå»ºå¯æ¬æå') |
| | | tableRef.value?.getList() |
| | | }, |
| | | divided: true, |
| | | icon: 'copy', |
| | | }, |
| | | { |
| | | label: 'å é¤', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map((item: { name: string }) => item.name) |
| | | ConfirmBox( |
| | | `æ¯å¦å é¤${names.length ? names.join(',') : c.row.name}` |
| | | ).then(async () => { |
| | | const ids = selection.value.map((item: { id: string }) => item.id) |
| | | await wmsarea.deleteWmsAreas(ids.length ? ids : [c.row.id]) |
| | | ElMessage.success('å 餿å') |
| | | tableRef.value.getList() |
| | | }) |
| | | }, |
| | | icon: 'close', |
| | | }, |
| | | ] |
| | | |
| | | const onCheck = (records: any) => { |
| | | selection.value = records |
| | | } |
| | | |
| | | const onAddWmsArea = () => { |
| | | const params = tableRef.value?.getPaginationParams() |
| | | current.value = null |
| | | dialogConfig.visible = true |
| | | dialogConfig.isAdd = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | sort.value = params.totalCount + 1 |
| | | } |
| | | |
| | | const onConfirmWmsArea = async () => { |
| | | dialogConfig.visible = false |
| | | if (dialogConfig.isAdd) { |
| | | tableRef.value?.scrollToRow({ |
| | | skip: true, |
| | | }) |
| | | } else { |
| | | await tableRef.value?.getList() |
| | | } |
| | | } |
| | | /** |
| | | * è¡ç¹å»æ¶æ´æ°current |
| | | */ |
| | | const onRowClick = ({ row }: any) => { |
| | | if (dialogConfig.visible && current.value) { |
| | | current.value = row |
| | | } |
| | | } |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | const onExport = () => { |
| | | const params = tableRef.value?.getParams() |
| | | exportFile( |
| | | '/api/v1/hiawms/wmsarea/export', |
| | | params, |
| | | 'hiawms' |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * å
³é®åæç´¢ |
| | | */ |
| | | const onSearch = () => { |
| | | tableRef.value?.getList({ |
| | | Filter: search.value, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * éç½®è¡¨æ ¼æ°æ® |
| | | */ |
| | | const reloadList = () => { |
| | | tableRef.value?.getList() |
| | | } |
| | | /** |
| | | * ä¸ä¼ æå |
| | | */ |
| | | const onSuccess = () => { |
| | | tableRef.value?.getList() |
| | | ElMessage.success('导å
¥æå') |
| | | } |
| | | /** |
| | | * 失败 |
| | | * @param err |
| | | */ |
| | | const onError = (err: any) => { |
| | | try { |
| | | const message = JSON.parse(err.message) |
| | | ElMessage.error(message.msg) |
| | | } catch (error) { |
| | | ElMessage.error('导å
¥å¤±è´¥') |
| | | } |
| | | } |
| | | /** |
| | | * ä¸ä¼ é©å |
| | | */ |
| | | const onBeforeUpload = (file: File) => { |
| | | const format = ['xlsx', 'xls', 'csv'] |
| | | if (!format.includes(file.name.split('.')[1])) { |
| | | ElMessage.error('导å
¥æä»¶æ ¼å¼ä¸æ£ç¡®ï¼è¯·å¯¼å
¥.xlsx/.xlsä¸.csvæ ¼å¼çæä»¶') |
| | | return false |
| | | } |
| | | return true |
| | | } |
| | | |
| | | onMounted(() => { |
| | | headers.value = { |
| | | Authorization: `Bearer ${sessionStorage.getItem('Token')}`, |
| | | 'X-Project': sessionStorage.getItem('X-Project'), |
| | | } |
| | | }) |
| | | |
| | | ctx.expose({ |
| | | reloadList, |
| | | }) |
| | | |
| | | return { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | dialogSettingConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | wmsareaColumns, |
| | | paginationParams, |
| | | headers, |
| | | onBeforeUpload, |
| | | onError, |
| | | onSuccess, |
| | | openDetail, |
| | | onSearch, |
| | | onExport, |
| | | onRowClick, |
| | | onConfirmWmsArea, |
| | | onCheck, |
| | | onAddWmsArea, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, computed, Ref, watch } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsAreaDrawer } from '../Models/WmsAreaDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | |
| | | export const useWmsAreaDrawer = (props: any, ctx?: any) => { |
| | | const wmsareaDrawer = |
| | | injectModel<WmsAreaDrawer>('wmsareaDrawer') |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | const initiateData: Ref<Record<string, any>> = ref({}) |
| | | const formData = ref<Record<string, any>>({}) |
| | | // ref |
| | | const formRef = ref() |
| | | |
| | | const current = computed(() => { |
| | | return props.row || null |
| | | }) |
| | | const visible = computed({ |
| | | get() { |
| | | return props.modelValue |
| | | }, |
| | | set(val) { |
| | | ctx.emit('update:modelValue', val) |
| | | }, |
| | | }) |
| | | /** |
| | | * æ·»å çformåæ®µ |
| | | */ |
| | | const formItems = reactive([ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'name', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥åç§°', |
| | | rules: [{ required: true, message: 'åç§°', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'ç¼å·', |
| | | prop: 'code', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥ç¼å·', |
| | | rules: [{ required: true, message: 'ç¼å·', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | const checkIsEqualObject = () => { |
| | | const data = { |
| | | formData: formData.value, |
| | | } |
| | | const check = isEqual(initiateData.value, data) |
| | | return check |
| | | } |
| | | |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | if (checkIsEqualObject()) { |
| | | visible.value = false |
| | | done && done() |
| | | } else { |
| | | ConfirmBox('æ¯å¦ä¿å设置ï¼') |
| | | .then(() => { |
| | | onConfirm() |
| | | }) |
| | | .catch(() => { |
| | | visible.value = false |
| | | done && done() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * ä¿å |
| | | */ |
| | | const onConfirm = async () => { |
| | | await formRef.value?.validate() |
| | | const data = { |
| | | name: formData.value.name, |
| | | code: formData.value.code, |
| | | remark: formData.value.remark, |
| | | sort: props.sort, |
| | | } |
| | | if (!current.value) { |
| | | await wmsareaDrawer.addWmsArea(data) |
| | | } else { |
| | | const id = current.value.id |
| | | await wmsareaDrawer.updateWmsArea(id, data) |
| | | } |
| | | ElMessage.success('ä¿åæå') |
| | | ctx.emit('confirm') |
| | | } |
| | | |
| | | const updateCheckData = () => { |
| | | initiateData.value = { |
| | | formData: { |
| | | ...formData.value, |
| | | }, |
| | | } |
| | | } |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | const onOpen = async () => { |
| | | if (current.value) { |
| | | const res = await wmsareaDrawer.getWmsAreaDetail(current.value) |
| | | |
| | | formData.value = { |
| | | name: res.name, |
| | | code: res.code, |
| | | remark: res.remark, |
| | | id: res.id, |
| | | } |
| | | updateCheckData() |
| | | } else { |
| | | formData.value = {} |
| | | updateCheckData() |
| | | } |
| | | } |
| | | |
| | | watch(() => current.value, onOpen) |
| | | |
| | | return { |
| | | formItems, |
| | | formData, |
| | | visible, |
| | | formRef, |
| | | onOpen, |
| | | onClose, |
| | | onConfirm, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, Ref, nextTick, computed } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsContainer } from '../Models/WmsContainer' |
| | | import { ElMessage } from 'element-plus' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { useFile } from './File' |
| | | |
| | | interface CurrentType { |
| | | row: any |
| | | index: number |
| | | } |
| | | export const useWmsContainer = (props: any, ctx?: any) => { |
| | | const wmscontainer = injectModel<WmsContainer>('wmscontainer') |
| | | const { exportFile } = useFile() |
| | | /** |
| | | * 头é¨é
ç½® |
| | | */ |
| | | const headers = ref({}) |
| | | /** |
| | | * 卿åé
ç½® |
| | | */ |
| | | const wmscontainerColumns = ref<Record<string, any>>([]) |
| | | /** |
| | | * æç´¢å¼ |
| | | */ |
| | | const search = ref('') |
| | | |
| | | /** |
| | | * æåº |
| | | */ |
| | | const sort = ref(0) |
| | | /** |
| | | * 鿩项 |
| | | */ |
| | | const selection = ref([]) |
| | | /** |
| | | * å½åéä¸çè¡ |
| | | */ |
| | | const current = ref<any>(null) |
| | | /** |
| | | * æ°æ®æº |
| | | */ |
| | | const dataSource: Ref<any[]> = ref([]) |
| | | |
| | | /** |
| | | * è¡¨æ ¼ |
| | | */ |
| | | const tableRef = ref() |
| | | const dialogConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | isAdd: false, |
| | | }) |
| | | |
| | | const dialogSettingConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | }) |
| | | |
| | | /** |
| | | * åé¡µæ°æ® |
| | | */ |
| | | const paginationParams = ref({}) |
| | | |
| | | /** |
| | | * æå¼è¯¦æ
|
| | | * @param row |
| | | */ |
| | | const openDetail = (row: any) => { |
| | | current.value = row |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = row.name |
| | | dialogConfig.isAdd = false |
| | | sort.value = row.sort |
| | | } |
| | | |
| | | const contextMenu = [ |
| | | { |
| | | label: 'å±å¼è¯¦æ
', |
| | | fn: (c: CurrentType) => { |
| | | current.value = null |
| | | sort.value = c.row.sort |
| | | nextTick(() => openDetail(c.row)) |
| | | }, |
| | | divided: true, |
| | | icon: 'o', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 1 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'up', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 2 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'down', |
| | | }, |
| | | { |
| | | label: 'åå»ºå¯æ¬', |
| | | fn: async ({ row }: CurrentType) => { |
| | | await wmscontainer.cloneData([row.id]) |
| | | ElMessage.success('åå»ºå¯æ¬æå') |
| | | tableRef.value?.getList() |
| | | }, |
| | | divided: true, |
| | | icon: 'copy', |
| | | }, |
| | | { |
| | | label: 'å é¤', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map((item: { name: string }) => item.name) |
| | | ConfirmBox( |
| | | `æ¯å¦å é¤${names.length ? names.join(',') : c.row.name}` |
| | | ).then(async () => { |
| | | const ids = selection.value.map((item: { id: string }) => item.id) |
| | | await wmscontainer.deleteWmsContainers(ids.length ? ids : [c.row.id]) |
| | | ElMessage.success('å 餿å') |
| | | tableRef.value.getList() |
| | | }) |
| | | }, |
| | | icon: 'close', |
| | | }, |
| | | ] |
| | | |
| | | const onCheck = (records: any) => { |
| | | selection.value = records |
| | | } |
| | | |
| | | const onAddWmsContainer = () => { |
| | | const params = tableRef.value?.getPaginationParams() |
| | | current.value = null |
| | | dialogConfig.visible = true |
| | | dialogConfig.isAdd = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | sort.value = params.totalCount + 1 |
| | | } |
| | | |
| | | const onConfirmWmsContainer = async () => { |
| | | dialogConfig.visible = false |
| | | if (dialogConfig.isAdd) { |
| | | tableRef.value?.scrollToRow({ |
| | | skip: true, |
| | | }) |
| | | } else { |
| | | await tableRef.value?.getList() |
| | | } |
| | | } |
| | | /** |
| | | * è¡ç¹å»æ¶æ´æ°current |
| | | */ |
| | | const onRowClick = ({ row }: any) => { |
| | | if (dialogConfig.visible && current.value) { |
| | | current.value = row |
| | | } |
| | | } |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | const onExport = () => { |
| | | const params = tableRef.value?.getParams() |
| | | exportFile( |
| | | '/api/v1/hiawms/wmscontainer/export', |
| | | params, |
| | | 'hiawms' |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * å
³é®åæç´¢ |
| | | */ |
| | | const onSearch = () => { |
| | | tableRef.value?.getList({ |
| | | Filter: search.value, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * éç½®è¡¨æ ¼æ°æ® |
| | | */ |
| | | const reloadList = () => { |
| | | tableRef.value?.getList() |
| | | } |
| | | /** |
| | | * ä¸ä¼ æå |
| | | */ |
| | | const onSuccess = () => { |
| | | tableRef.value?.getList() |
| | | ElMessage.success('导å
¥æå') |
| | | } |
| | | /** |
| | | * 失败 |
| | | * @param err |
| | | */ |
| | | const onError = (err: any) => { |
| | | try { |
| | | const message = JSON.parse(err.message) |
| | | ElMessage.error(message.msg) |
| | | } catch (error) { |
| | | ElMessage.error('导å
¥å¤±è´¥') |
| | | } |
| | | } |
| | | /** |
| | | * ä¸ä¼ é©å |
| | | */ |
| | | const onBeforeUpload = (file: File) => { |
| | | const format = ['xlsx', 'xls', 'csv'] |
| | | if (!format.includes(file.name.split('.')[1])) { |
| | | ElMessage.error('导å
¥æä»¶æ ¼å¼ä¸æ£ç¡®ï¼è¯·å¯¼å
¥.xlsx/.xlsä¸.csvæ ¼å¼çæä»¶') |
| | | return false |
| | | } |
| | | return true |
| | | } |
| | | |
| | | onMounted(() => { |
| | | headers.value = { |
| | | Authorization: `Bearer ${sessionStorage.getItem('Token')}`, |
| | | 'X-Project': sessionStorage.getItem('X-Project'), |
| | | } |
| | | }) |
| | | |
| | | ctx.expose({ |
| | | reloadList, |
| | | }) |
| | | |
| | | return { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | dialogSettingConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | wmscontainerColumns, |
| | | paginationParams, |
| | | headers, |
| | | onBeforeUpload, |
| | | onError, |
| | | onSuccess, |
| | | openDetail, |
| | | onSearch, |
| | | onExport, |
| | | onRowClick, |
| | | onConfirmWmsContainer, |
| | | onCheck, |
| | | onAddWmsContainer, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, computed, Ref, watch } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsContainerDrawer } from '../Models/WmsContainerDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | |
| | | export const useWmsContainerDrawer = (props: any, ctx?: any) => { |
| | | const wmscontainerDrawer = |
| | | injectModel<WmsContainerDrawer>('wmscontainerDrawer') |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | const initiateData: Ref<Record<string, any>> = ref({}) |
| | | const formData = ref<Record<string, any>>({}) |
| | | // ref |
| | | const formRef = ref() |
| | | |
| | | const current = computed(() => { |
| | | return props.row || null |
| | | }) |
| | | const visible = computed({ |
| | | get() { |
| | | return props.modelValue |
| | | }, |
| | | set(val) { |
| | | ctx.emit('update:modelValue', val) |
| | | }, |
| | | }) |
| | | /** |
| | | * æ·»å çformåæ®µ |
| | | */ |
| | | const formItems = reactive([ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'name', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥åç§°', |
| | | rules: [{ required: true, message: 'åç§°', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'ç¼å·', |
| | | prop: 'code', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥ç¼å·', |
| | | rules: [{ required: true, message: 'ç¼å·', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | const checkIsEqualObject = () => { |
| | | const data = { |
| | | formData: formData.value, |
| | | } |
| | | const check = isEqual(initiateData.value, data) |
| | | return check |
| | | } |
| | | |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | if (checkIsEqualObject()) { |
| | | visible.value = false |
| | | done && done() |
| | | } else { |
| | | ConfirmBox('æ¯å¦ä¿å设置ï¼') |
| | | .then(() => { |
| | | onConfirm() |
| | | }) |
| | | .catch(() => { |
| | | visible.value = false |
| | | done && done() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * ä¿å |
| | | */ |
| | | const onConfirm = async () => { |
| | | await formRef.value?.validate() |
| | | const data = { |
| | | name: formData.value.name, |
| | | code: formData.value.code, |
| | | remark: formData.value.remark, |
| | | sort: props.sort, |
| | | } |
| | | if (!current.value) { |
| | | await wmscontainerDrawer.addWmsContainer(data) |
| | | } else { |
| | | const id = current.value.id |
| | | await wmscontainerDrawer.updateWmsContainer(id, data) |
| | | } |
| | | ElMessage.success('ä¿åæå') |
| | | ctx.emit('confirm') |
| | | } |
| | | |
| | | const updateCheckData = () => { |
| | | initiateData.value = { |
| | | formData: { |
| | | ...formData.value, |
| | | }, |
| | | } |
| | | } |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | const onOpen = async () => { |
| | | if (current.value) { |
| | | const res = await wmscontainerDrawer.getWmsContainerDetail(current.value) |
| | | |
| | | formData.value = { |
| | | name: res.name, |
| | | code: res.code, |
| | | remark: res.remark, |
| | | id: res.id, |
| | | } |
| | | updateCheckData() |
| | | } else { |
| | | formData.value = {} |
| | | updateCheckData() |
| | | } |
| | | } |
| | | |
| | | watch(() => current.value, onOpen) |
| | | |
| | | return { |
| | | formItems, |
| | | formData, |
| | | visible, |
| | | formRef, |
| | | onOpen, |
| | | onClose, |
| | | onConfirm, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, Ref, nextTick, computed } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsMaterial } from '../Models/WmsMaterial' |
| | | import { ElMessage } from 'element-plus' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { useFile } from './File' |
| | | |
| | | interface CurrentType { |
| | | row: any |
| | | index: number |
| | | } |
| | | export const useWmsMaterial = (props: any, ctx?: any) => { |
| | | const wmsmaterial = injectModel<WmsMaterial>('wmsmaterial') |
| | | const { exportFile } = useFile() |
| | | /** |
| | | * 头é¨é
ç½® |
| | | */ |
| | | const headers = ref({}) |
| | | /** |
| | | * 卿åé
ç½® |
| | | */ |
| | | const wmsmaterialColumns = ref<Record<string, any>>([]) |
| | | /** |
| | | * æç´¢å¼ |
| | | */ |
| | | const search = ref('') |
| | | |
| | | /** |
| | | * æåº |
| | | */ |
| | | const sort = ref(0) |
| | | /** |
| | | * 鿩项 |
| | | */ |
| | | const selection = ref([]) |
| | | /** |
| | | * å½åéä¸çè¡ |
| | | */ |
| | | const current = ref<any>(null) |
| | | /** |
| | | * æ°æ®æº |
| | | */ |
| | | const dataSource: Ref<any[]> = ref([]) |
| | | |
| | | /** |
| | | * è¡¨æ ¼ |
| | | */ |
| | | const tableRef = ref() |
| | | const dialogConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | isAdd: false, |
| | | }) |
| | | |
| | | const dialogSettingConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | }) |
| | | |
| | | /** |
| | | * åé¡µæ°æ® |
| | | */ |
| | | const paginationParams = ref({}) |
| | | |
| | | /** |
| | | * æå¼è¯¦æ
|
| | | * @param row |
| | | */ |
| | | const openDetail = (row: any) => { |
| | | current.value = row |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = row.name |
| | | dialogConfig.isAdd = false |
| | | sort.value = row.sort |
| | | } |
| | | |
| | | const contextMenu = [ |
| | | { |
| | | label: 'å±å¼è¯¦æ
', |
| | | fn: (c: CurrentType) => { |
| | | current.value = null |
| | | sort.value = c.row.sort |
| | | nextTick(() => openDetail(c.row)) |
| | | }, |
| | | divided: true, |
| | | icon: 'o', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 1 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'up', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 2 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'down', |
| | | }, |
| | | { |
| | | label: 'åå»ºå¯æ¬', |
| | | fn: async ({ row }: CurrentType) => { |
| | | await wmsmaterial.cloneData([row.id]) |
| | | ElMessage.success('åå»ºå¯æ¬æå') |
| | | tableRef.value?.getList() |
| | | }, |
| | | divided: true, |
| | | icon: 'copy', |
| | | }, |
| | | { |
| | | label: 'å é¤', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map((item: { name: string }) => item.name) |
| | | ConfirmBox( |
| | | `æ¯å¦å é¤${names.length ? names.join(',') : c.row.name}` |
| | | ).then(async () => { |
| | | const ids = selection.value.map((item: { id: string }) => item.id) |
| | | await wmsmaterial.deleteWmsMaterials(ids.length ? ids : [c.row.id]) |
| | | ElMessage.success('å 餿å') |
| | | tableRef.value.getList() |
| | | }) |
| | | }, |
| | | icon: 'close', |
| | | }, |
| | | ] |
| | | |
| | | const onCheck = (records: any) => { |
| | | selection.value = records |
| | | } |
| | | |
| | | const onAddWmsMaterial = () => { |
| | | const params = tableRef.value?.getPaginationParams() |
| | | current.value = null |
| | | dialogConfig.visible = true |
| | | dialogConfig.isAdd = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | sort.value = params.totalCount + 1 |
| | | } |
| | | |
| | | const onConfirmWmsMaterial = async () => { |
| | | dialogConfig.visible = false |
| | | if (dialogConfig.isAdd) { |
| | | tableRef.value?.scrollToRow({ |
| | | skip: true, |
| | | }) |
| | | } else { |
| | | await tableRef.value?.getList() |
| | | } |
| | | } |
| | | /** |
| | | * è¡ç¹å»æ¶æ´æ°current |
| | | */ |
| | | const onRowClick = ({ row }: any) => { |
| | | if (dialogConfig.visible && current.value) { |
| | | current.value = row |
| | | } |
| | | } |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | const onExport = () => { |
| | | const params = tableRef.value?.getParams() |
| | | exportFile( |
| | | '/api/v1/hiawms/wmsmaterial/export', |
| | | params, |
| | | 'hiawms' |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * å
³é®åæç´¢ |
| | | */ |
| | | const onSearch = () => { |
| | | tableRef.value?.getList({ |
| | | Filter: search.value, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * éç½®è¡¨æ ¼æ°æ® |
| | | */ |
| | | const reloadList = () => { |
| | | tableRef.value?.getList() |
| | | } |
| | | /** |
| | | * ä¸ä¼ æå |
| | | */ |
| | | const onSuccess = () => { |
| | | tableRef.value?.getList() |
| | | ElMessage.success('导å
¥æå') |
| | | } |
| | | /** |
| | | * 失败 |
| | | * @param err |
| | | */ |
| | | const onError = (err: any) => { |
| | | try { |
| | | const message = JSON.parse(err.message) |
| | | ElMessage.error(message.msg) |
| | | } catch (error) { |
| | | ElMessage.error('导å
¥å¤±è´¥') |
| | | } |
| | | } |
| | | /** |
| | | * ä¸ä¼ é©å |
| | | */ |
| | | const onBeforeUpload = (file: File) => { |
| | | const format = ['xlsx', 'xls', 'csv'] |
| | | if (!format.includes(file.name.split('.')[1])) { |
| | | ElMessage.error('导å
¥æä»¶æ ¼å¼ä¸æ£ç¡®ï¼è¯·å¯¼å
¥.xlsx/.xlsä¸.csvæ ¼å¼çæä»¶') |
| | | return false |
| | | } |
| | | return true |
| | | } |
| | | |
| | | onMounted(() => { |
| | | headers.value = { |
| | | Authorization: `Bearer ${sessionStorage.getItem('Token')}`, |
| | | 'X-Project': sessionStorage.getItem('X-Project'), |
| | | } |
| | | }) |
| | | |
| | | ctx.expose({ |
| | | reloadList, |
| | | }) |
| | | |
| | | return { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | dialogSettingConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | wmsmaterialColumns, |
| | | paginationParams, |
| | | headers, |
| | | onBeforeUpload, |
| | | onError, |
| | | onSuccess, |
| | | openDetail, |
| | | onSearch, |
| | | onExport, |
| | | onRowClick, |
| | | onConfirmWmsMaterial, |
| | | onCheck, |
| | | onAddWmsMaterial, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, computed, Ref, watch } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsMaterialDrawer } from '../Models/WmsMaterialDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | |
| | | export const useWmsMaterialDrawer = (props: any, ctx?: any) => { |
| | | const wmsmaterialDrawer = |
| | | injectModel<WmsMaterialDrawer>('wmsmaterialDrawer') |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | const initiateData: Ref<Record<string, any>> = ref({}) |
| | | const formData = ref<Record<string, any>>({}) |
| | | // ref |
| | | const formRef = ref() |
| | | |
| | | const current = computed(() => { |
| | | return props.row || null |
| | | }) |
| | | const visible = computed({ |
| | | get() { |
| | | return props.modelValue |
| | | }, |
| | | set(val) { |
| | | ctx.emit('update:modelValue', val) |
| | | }, |
| | | }) |
| | | /** |
| | | * æ·»å çformåæ®µ |
| | | */ |
| | | const formItems = reactive([ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'name', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥åç§°', |
| | | rules: [{ required: true, message: 'åç§°', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'ç¼å·', |
| | | prop: 'code', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥ç¼å·', |
| | | rules: [{ required: true, message: 'ç¼å·', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | const checkIsEqualObject = () => { |
| | | const data = { |
| | | formData: formData.value, |
| | | } |
| | | const check = isEqual(initiateData.value, data) |
| | | return check |
| | | } |
| | | |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | if (checkIsEqualObject()) { |
| | | visible.value = false |
| | | done && done() |
| | | } else { |
| | | ConfirmBox('æ¯å¦ä¿å设置ï¼') |
| | | .then(() => { |
| | | onConfirm() |
| | | }) |
| | | .catch(() => { |
| | | visible.value = false |
| | | done && done() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * ä¿å |
| | | */ |
| | | const onConfirm = async () => { |
| | | await formRef.value?.validate() |
| | | const data = { |
| | | name: formData.value.name, |
| | | code: formData.value.code, |
| | | remark: formData.value.remark, |
| | | sort: props.sort, |
| | | } |
| | | if (!current.value) { |
| | | await wmsmaterialDrawer.addWmsMaterial(data) |
| | | } else { |
| | | const id = current.value.id |
| | | await wmsmaterialDrawer.updateWmsMaterial(id, data) |
| | | } |
| | | ElMessage.success('ä¿åæå') |
| | | ctx.emit('confirm') |
| | | } |
| | | |
| | | const updateCheckData = () => { |
| | | initiateData.value = { |
| | | formData: { |
| | | ...formData.value, |
| | | }, |
| | | } |
| | | } |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | const onOpen = async () => { |
| | | if (current.value) { |
| | | const res = await wmsmaterialDrawer.getWmsMaterialDetail(current.value) |
| | | |
| | | formData.value = { |
| | | name: res.name, |
| | | code: res.code, |
| | | remark: res.remark, |
| | | id: res.id, |
| | | } |
| | | updateCheckData() |
| | | } else { |
| | | formData.value = {} |
| | | updateCheckData() |
| | | } |
| | | } |
| | | |
| | | watch(() => current.value, onOpen) |
| | | |
| | | return { |
| | | formItems, |
| | | formData, |
| | | visible, |
| | | formRef, |
| | | onOpen, |
| | | onClose, |
| | | onConfirm, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, Ref, nextTick, computed } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsPlace } from '../Models/WmsPlace' |
| | | import { ElMessage } from 'element-plus' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { useFile } from './File' |
| | | |
| | | interface CurrentType { |
| | | row: any |
| | | index: number |
| | | } |
| | | export const useWmsPlace = (props: any, ctx?: any) => { |
| | | const wmsplace = injectModel<WmsPlace>('wmsplace') |
| | | const { exportFile } = useFile() |
| | | /** |
| | | * 头é¨é
ç½® |
| | | */ |
| | | const headers = ref({}) |
| | | /** |
| | | * 卿åé
ç½® |
| | | */ |
| | | const wmsplaceColumns = ref<Record<string, any>>([]) |
| | | /** |
| | | * æç´¢å¼ |
| | | */ |
| | | const search = ref('') |
| | | |
| | | /** |
| | | * æåº |
| | | */ |
| | | const sort = ref(0) |
| | | /** |
| | | * 鿩项 |
| | | */ |
| | | const selection = ref([]) |
| | | /** |
| | | * å½åéä¸çè¡ |
| | | */ |
| | | const current = ref<any>(null) |
| | | /** |
| | | * æ°æ®æº |
| | | */ |
| | | const dataSource: Ref<any[]> = ref([]) |
| | | |
| | | /** |
| | | * è¡¨æ ¼ |
| | | */ |
| | | const tableRef = ref() |
| | | const dialogConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | isAdd: false, |
| | | }) |
| | | |
| | | const dialogSettingConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | }) |
| | | |
| | | /** |
| | | * åé¡µæ°æ® |
| | | */ |
| | | const paginationParams = ref({}) |
| | | |
| | | /** |
| | | * æå¼è¯¦æ
|
| | | * @param row |
| | | */ |
| | | const openDetail = (row: any) => { |
| | | current.value = row |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = row.name |
| | | dialogConfig.isAdd = false |
| | | sort.value = row.sort |
| | | } |
| | | |
| | | const contextMenu = [ |
| | | { |
| | | label: 'å±å¼è¯¦æ
', |
| | | fn: (c: CurrentType) => { |
| | | current.value = null |
| | | sort.value = c.row.sort |
| | | nextTick(() => openDetail(c.row)) |
| | | }, |
| | | divided: true, |
| | | icon: 'o', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 1 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'up', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 2 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'down', |
| | | }, |
| | | { |
| | | label: 'åå»ºå¯æ¬', |
| | | fn: async ({ row }: CurrentType) => { |
| | | await wmsplace.cloneData([row.id]) |
| | | ElMessage.success('åå»ºå¯æ¬æå') |
| | | tableRef.value?.getList() |
| | | }, |
| | | divided: true, |
| | | icon: 'copy', |
| | | }, |
| | | { |
| | | label: 'å é¤', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map((item: { name: string }) => item.name) |
| | | ConfirmBox( |
| | | `æ¯å¦å é¤${names.length ? names.join(',') : c.row.name}` |
| | | ).then(async () => { |
| | | const ids = selection.value.map((item: { id: string }) => item.id) |
| | | await wmsplace.deleteWmsPlaces(ids.length ? ids : [c.row.id]) |
| | | ElMessage.success('å 餿å') |
| | | tableRef.value.getList() |
| | | }) |
| | | }, |
| | | icon: 'close', |
| | | }, |
| | | ] |
| | | |
| | | const onCheck = (records: any) => { |
| | | selection.value = records |
| | | } |
| | | |
| | | const onAddWmsPlace = () => { |
| | | const params = tableRef.value?.getPaginationParams() |
| | | current.value = null |
| | | dialogConfig.visible = true |
| | | dialogConfig.isAdd = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | sort.value = params.totalCount + 1 |
| | | } |
| | | |
| | | const onConfirmWmsPlace = async () => { |
| | | dialogConfig.visible = false |
| | | if (dialogConfig.isAdd) { |
| | | tableRef.value?.scrollToRow({ |
| | | skip: true, |
| | | }) |
| | | } else { |
| | | await tableRef.value?.getList() |
| | | } |
| | | } |
| | | /** |
| | | * è¡ç¹å»æ¶æ´æ°current |
| | | */ |
| | | const onRowClick = ({ row }: any) => { |
| | | if (dialogConfig.visible && current.value) { |
| | | current.value = row |
| | | } |
| | | } |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | const onExport = () => { |
| | | const params = tableRef.value?.getParams() |
| | | exportFile( |
| | | '/api/v1/hiawms/wmsplace/export', |
| | | params, |
| | | 'hiawms' |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * å
³é®åæç´¢ |
| | | */ |
| | | const onSearch = () => { |
| | | tableRef.value?.getList({ |
| | | Filter: search.value, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * éç½®è¡¨æ ¼æ°æ® |
| | | */ |
| | | const reloadList = () => { |
| | | tableRef.value?.getList() |
| | | } |
| | | /** |
| | | * ä¸ä¼ æå |
| | | */ |
| | | const onSuccess = () => { |
| | | tableRef.value?.getList() |
| | | ElMessage.success('导å
¥æå') |
| | | } |
| | | /** |
| | | * 失败 |
| | | * @param err |
| | | */ |
| | | const onError = (err: any) => { |
| | | try { |
| | | const message = JSON.parse(err.message) |
| | | ElMessage.error(message.msg) |
| | | } catch (error) { |
| | | ElMessage.error('导å
¥å¤±è´¥') |
| | | } |
| | | } |
| | | /** |
| | | * ä¸ä¼ é©å |
| | | */ |
| | | const onBeforeUpload = (file: File) => { |
| | | const format = ['xlsx', 'xls', 'csv'] |
| | | if (!format.includes(file.name.split('.')[1])) { |
| | | ElMessage.error('导å
¥æä»¶æ ¼å¼ä¸æ£ç¡®ï¼è¯·å¯¼å
¥.xlsx/.xlsä¸.csvæ ¼å¼çæä»¶') |
| | | return false |
| | | } |
| | | return true |
| | | } |
| | | |
| | | onMounted(() => { |
| | | headers.value = { |
| | | Authorization: `Bearer ${sessionStorage.getItem('Token')}`, |
| | | 'X-Project': sessionStorage.getItem('X-Project'), |
| | | } |
| | | }) |
| | | |
| | | ctx.expose({ |
| | | reloadList, |
| | | }) |
| | | |
| | | return { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | dialogSettingConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | wmsplaceColumns, |
| | | paginationParams, |
| | | headers, |
| | | onBeforeUpload, |
| | | onError, |
| | | onSuccess, |
| | | openDetail, |
| | | onSearch, |
| | | onExport, |
| | | onRowClick, |
| | | onConfirmWmsPlace, |
| | | onCheck, |
| | | onAddWmsPlace, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, computed, Ref, watch } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsPlaceDrawer } from '../Models/WmsPlaceDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | |
| | | export const useWmsPlaceDrawer = (props: any, ctx?: any) => { |
| | | const wmsplaceDrawer = |
| | | injectModel<WmsPlaceDrawer>('wmsplaceDrawer') |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | const initiateData: Ref<Record<string, any>> = ref({}) |
| | | const formData = ref<Record<string, any>>({}) |
| | | // ref |
| | | const formRef = ref() |
| | | |
| | | const current = computed(() => { |
| | | return props.row || null |
| | | }) |
| | | const visible = computed({ |
| | | get() { |
| | | return props.modelValue |
| | | }, |
| | | set(val) { |
| | | ctx.emit('update:modelValue', val) |
| | | }, |
| | | }) |
| | | /** |
| | | * æ·»å çformåæ®µ |
| | | */ |
| | | const formItems = reactive([ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'name', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥åç§°', |
| | | rules: [{ required: true, message: 'åç§°', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'ç¼å·', |
| | | prop: 'code', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥ç¼å·', |
| | | rules: [{ required: true, message: 'ç¼å·', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | const checkIsEqualObject = () => { |
| | | const data = { |
| | | formData: formData.value, |
| | | } |
| | | const check = isEqual(initiateData.value, data) |
| | | return check |
| | | } |
| | | |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | if (checkIsEqualObject()) { |
| | | visible.value = false |
| | | done && done() |
| | | } else { |
| | | ConfirmBox('æ¯å¦ä¿å设置ï¼') |
| | | .then(() => { |
| | | onConfirm() |
| | | }) |
| | | .catch(() => { |
| | | visible.value = false |
| | | done && done() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * ä¿å |
| | | */ |
| | | const onConfirm = async () => { |
| | | await formRef.value?.validate() |
| | | const data = { |
| | | name: formData.value.name, |
| | | code: formData.value.code, |
| | | remark: formData.value.remark, |
| | | sort: props.sort, |
| | | } |
| | | if (!current.value) { |
| | | await wmsplaceDrawer.addWmsPlace(data) |
| | | } else { |
| | | const id = current.value.id |
| | | await wmsplaceDrawer.updateWmsPlace(id, data) |
| | | } |
| | | ElMessage.success('ä¿åæå') |
| | | ctx.emit('confirm') |
| | | } |
| | | |
| | | const updateCheckData = () => { |
| | | initiateData.value = { |
| | | formData: { |
| | | ...formData.value, |
| | | }, |
| | | } |
| | | } |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | const onOpen = async () => { |
| | | if (current.value) { |
| | | const res = await wmsplaceDrawer.getWmsPlaceDetail(current.value) |
| | | |
| | | formData.value = { |
| | | name: res.name, |
| | | code: res.code, |
| | | remark: res.remark, |
| | | id: res.id, |
| | | } |
| | | updateCheckData() |
| | | } else { |
| | | formData.value = {} |
| | | updateCheckData() |
| | | } |
| | | } |
| | | |
| | | watch(() => current.value, onOpen) |
| | | |
| | | return { |
| | | formItems, |
| | | formData, |
| | | visible, |
| | | formRef, |
| | | onOpen, |
| | | onClose, |
| | | onConfirm, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, Ref, nextTick, computed } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsStore } from '../Models/WmsStore' |
| | | import { ElMessage } from 'element-plus' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { useFile } from './File' |
| | | |
| | | interface CurrentType { |
| | | row: any |
| | | index: number |
| | | } |
| | | export const useWmsStore = (props: any, ctx?: any) => { |
| | | const wmsstore = injectModel<WmsStore>('wmsstore') |
| | | const { exportFile } = useFile() |
| | | /** |
| | | * 头é¨é
ç½® |
| | | */ |
| | | const headers = ref({}) |
| | | /** |
| | | * 卿åé
ç½® |
| | | */ |
| | | const wmsstoreColumns = ref<Record<string, any>>([]) |
| | | /** |
| | | * æç´¢å¼ |
| | | */ |
| | | const search = ref('') |
| | | |
| | | /** |
| | | * æåº |
| | | */ |
| | | const sort = ref(0) |
| | | /** |
| | | * 鿩项 |
| | | */ |
| | | const selection = ref([]) |
| | | /** |
| | | * å½åéä¸çè¡ |
| | | */ |
| | | const current = ref<any>(null) |
| | | /** |
| | | * æ°æ®æº |
| | | */ |
| | | const dataSource: Ref<any[]> = ref([]) |
| | | |
| | | /** |
| | | * è¡¨æ ¼ |
| | | */ |
| | | const tableRef = ref() |
| | | const dialogConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | isAdd: false, |
| | | }) |
| | | |
| | | const dialogSettingConfig = reactive({ |
| | | visible: false, |
| | | title: '', |
| | | }) |
| | | |
| | | /** |
| | | * åé¡µæ°æ® |
| | | */ |
| | | const paginationParams = ref({}) |
| | | |
| | | /** |
| | | * æå¼è¯¦æ
|
| | | * @param row |
| | | */ |
| | | const openDetail = (row: any) => { |
| | | current.value = row |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = row.name |
| | | dialogConfig.isAdd = false |
| | | sort.value = row.sort |
| | | } |
| | | |
| | | const contextMenu = [ |
| | | { |
| | | label: 'å±å¼è¯¦æ
', |
| | | fn: (c: CurrentType) => { |
| | | current.value = null |
| | | sort.value = c.row.sort |
| | | nextTick(() => openDetail(c.row)) |
| | | }, |
| | | divided: true, |
| | | icon: 'o', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 1 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'up', |
| | | }, |
| | | { |
| | | label: 'å䏿·»å ', |
| | | fn: (c: CurrentType, pageNum: number) => { |
| | | current.value = null |
| | | sort.value = c.index + 2 + (pageNum - 1) * 50 |
| | | dialogConfig.visible = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | dialogConfig.isAdd = false |
| | | }, |
| | | divided: true, |
| | | icon: 'down', |
| | | }, |
| | | { |
| | | label: 'åå»ºå¯æ¬', |
| | | fn: async ({ row }: CurrentType) => { |
| | | await wmsstore.cloneData([row.id]) |
| | | ElMessage.success('åå»ºå¯æ¬æå') |
| | | tableRef.value?.getList() |
| | | }, |
| | | divided: true, |
| | | icon: 'copy', |
| | | }, |
| | | { |
| | | label: 'å é¤', |
| | | fn: async (c: CurrentType) => { |
| | | const names = selection.value.map((item: { name: string }) => item.name) |
| | | ConfirmBox( |
| | | `æ¯å¦å é¤${names.length ? names.join(',') : c.row.name}` |
| | | ).then(async () => { |
| | | const ids = selection.value.map((item: { id: string }) => item.id) |
| | | await wmsstore.deleteWmsStores(ids.length ? ids : [c.row.id]) |
| | | ElMessage.success('å 餿å') |
| | | tableRef.value.getList() |
| | | }) |
| | | }, |
| | | icon: 'close', |
| | | }, |
| | | ] |
| | | |
| | | const onCheck = (records: any) => { |
| | | selection.value = records |
| | | } |
| | | |
| | | const onAddWmsStore = () => { |
| | | const params = tableRef.value?.getPaginationParams() |
| | | current.value = null |
| | | dialogConfig.visible = true |
| | | dialogConfig.isAdd = true |
| | | dialogConfig.title = 'æ·»å ' |
| | | sort.value = params.totalCount + 1 |
| | | } |
| | | |
| | | const onConfirmWmsStore = async () => { |
| | | dialogConfig.visible = false |
| | | if (dialogConfig.isAdd) { |
| | | tableRef.value?.scrollToRow({ |
| | | skip: true, |
| | | }) |
| | | } else { |
| | | await tableRef.value?.getList() |
| | | } |
| | | } |
| | | /** |
| | | * è¡ç¹å»æ¶æ´æ°current |
| | | */ |
| | | const onRowClick = ({ row }: any) => { |
| | | if (dialogConfig.visible && current.value) { |
| | | current.value = row |
| | | } |
| | | } |
| | | /** |
| | | * å¯¼åº |
| | | */ |
| | | const onExport = () => { |
| | | const params = tableRef.value?.getParams() |
| | | exportFile( |
| | | '/api/v1/hiawms/wmsstore/export', |
| | | params, |
| | | 'hiawms' |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * å
³é®åæç´¢ |
| | | */ |
| | | const onSearch = () => { |
| | | tableRef.value?.getList({ |
| | | Filter: search.value, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * éç½®è¡¨æ ¼æ°æ® |
| | | */ |
| | | const reloadList = () => { |
| | | tableRef.value?.getList() |
| | | } |
| | | /** |
| | | * ä¸ä¼ æå |
| | | */ |
| | | const onSuccess = () => { |
| | | tableRef.value?.getList() |
| | | ElMessage.success('导å
¥æå') |
| | | } |
| | | /** |
| | | * 失败 |
| | | * @param err |
| | | */ |
| | | const onError = (err: any) => { |
| | | try { |
| | | const message = JSON.parse(err.message) |
| | | ElMessage.error(message.msg) |
| | | } catch (error) { |
| | | ElMessage.error('导å
¥å¤±è´¥') |
| | | } |
| | | } |
| | | /** |
| | | * ä¸ä¼ é©å |
| | | */ |
| | | const onBeforeUpload = (file: File) => { |
| | | const format = ['xlsx', 'xls', 'csv'] |
| | | if (!format.includes(file.name.split('.')[1])) { |
| | | ElMessage.error('导å
¥æä»¶æ ¼å¼ä¸æ£ç¡®ï¼è¯·å¯¼å
¥.xlsx/.xlsä¸.csvæ ¼å¼çæä»¶') |
| | | return false |
| | | } |
| | | return true |
| | | } |
| | | |
| | | onMounted(() => { |
| | | headers.value = { |
| | | Authorization: `Bearer ${sessionStorage.getItem('Token')}`, |
| | | 'X-Project': sessionStorage.getItem('X-Project'), |
| | | } |
| | | }) |
| | | |
| | | ctx.expose({ |
| | | reloadList, |
| | | }) |
| | | |
| | | return { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | dialogSettingConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | wmsstoreColumns, |
| | | paginationParams, |
| | | headers, |
| | | onBeforeUpload, |
| | | onError, |
| | | onSuccess, |
| | | openDetail, |
| | | onSearch, |
| | | onExport, |
| | | onRowClick, |
| | | onConfirmWmsStore, |
| | | onCheck, |
| | | onAddWmsStore, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, onMounted, reactive, computed, Ref, watch } from 'vue' |
| | | import { injectModel } from '@/libs/Provider/Provider' |
| | | import { WmsStoreDrawer } from '../Models/WmsStoreDrawer' |
| | | import { ElMessage } from 'element-plus' |
| | | import isEqual from 'lodash/isEqual' |
| | | import { ConfirmBox } from '@/components/ConfirmBox/ConfirmBox' |
| | | import { cloneDeep } from 'lodash' |
| | | |
| | | export const useWmsStoreDrawer = (props: any, ctx?: any) => { |
| | | const wmsstoreDrawer = |
| | | injectModel<WmsStoreDrawer>('wmsstoreDrawer') |
| | | /** |
| | | * ç¨æ¥å¯¹æ¯çåå§åæ°æ® |
| | | */ |
| | | const initiateData: Ref<Record<string, any>> = ref({}) |
| | | const formData = ref<Record<string, any>>({}) |
| | | // ref |
| | | const formRef = ref() |
| | | |
| | | const current = computed(() => { |
| | | return props.row || null |
| | | }) |
| | | const visible = computed({ |
| | | get() { |
| | | return props.modelValue |
| | | }, |
| | | set(val) { |
| | | ctx.emit('update:modelValue', val) |
| | | }, |
| | | }) |
| | | /** |
| | | * æ·»å çformåæ®µ |
| | | */ |
| | | const formItems = reactive([ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'name', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥åç§°', |
| | | rules: [{ required: true, message: 'åç§°', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: 'ç¼å·', |
| | | prop: 'code', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥ç¼å·', |
| | | rules: [{ required: true, message: 'ç¼å·', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | el: 'input', |
| | | placeholder: '请è¾å
¥å¤æ³¨', |
| | | }, |
| | | ]) |
| | | /** |
| | | * æ ¡éªæ¯å¦ææ°æ®åå |
| | | */ |
| | | const checkIsEqualObject = () => { |
| | | const data = { |
| | | formData: formData.value, |
| | | } |
| | | const check = isEqual(initiateData.value, data) |
| | | return check |
| | | } |
| | | |
| | | const onClose = (done: () => void) => { |
| | | if (visible.value) { |
| | | if (checkIsEqualObject()) { |
| | | visible.value = false |
| | | done && done() |
| | | } else { |
| | | ConfirmBox('æ¯å¦ä¿å设置ï¼') |
| | | .then(() => { |
| | | onConfirm() |
| | | }) |
| | | .catch(() => { |
| | | visible.value = false |
| | | done && done() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * ä¿å |
| | | */ |
| | | const onConfirm = async () => { |
| | | await formRef.value?.validate() |
| | | const data = { |
| | | name: formData.value.name, |
| | | code: formData.value.code, |
| | | remark: formData.value.remark, |
| | | sort: props.sort, |
| | | } |
| | | if (!current.value) { |
| | | await wmsstoreDrawer.addWmsStore(data) |
| | | } else { |
| | | const id = current.value.id |
| | | await wmsstoreDrawer.updateWmsStore(id, data) |
| | | } |
| | | ElMessage.success('ä¿åæå') |
| | | ctx.emit('confirm') |
| | | } |
| | | |
| | | const updateCheckData = () => { |
| | | initiateData.value = { |
| | | formData: { |
| | | ...formData.value, |
| | | }, |
| | | } |
| | | } |
| | | /** |
| | | * å¼¹çªæå¼è·å详æ
|
| | | */ |
| | | const onOpen = async () => { |
| | | if (current.value) { |
| | | const res = await wmsstoreDrawer.getWmsStoreDetail(current.value) |
| | | |
| | | formData.value = { |
| | | name: res.name, |
| | | code: res.code, |
| | | remark: res.remark, |
| | | id: res.id, |
| | | } |
| | | updateCheckData() |
| | | } else { |
| | | formData.value = {} |
| | | updateCheckData() |
| | | } |
| | | } |
| | | |
| | | watch(() => current.value, onOpen) |
| | | |
| | | return { |
| | | formItems, |
| | | formData, |
| | | visible, |
| | | formRef, |
| | | onOpen, |
| | | onClose, |
| | | onConfirm, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | deleteSamples, |
| | | addSample, |
| | | cloneData, |
| | | } from './Service/Sample' |
| | | |
| | | export class Sample extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | }) |
| | | } |
| | | onMounted() {} |
| | | /** |
| | | * å é¤ |
| | | * @param id |
| | | * @returns |
| | | */ |
| | | async deleteSamples(ids: string[]) { |
| | | return deleteSamples(ids) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * @param data |
| | | * @returns |
| | | */ |
| | | addSample(data: Record<string, any>) { |
| | | return addSample(data) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @param ids |
| | | * @returns |
| | | */ |
| | | cloneData(ids: string[]) { |
| | | return cloneData(ids) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addSample, |
| | | getSample, |
| | | updateSample, |
| | | } from './Service/SampleDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class SampleDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | sample: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addSample(data: Record<string, any>) { |
| | | return addSample(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateSample(id: string, data: Record<string, any>) { |
| | | return updateSample(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getSampleDetail(current: any, id?: string) { |
| | | return getSample(id || current?.id) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addSample = (data: any) => { |
| | | return request.post('/api/v1/hiawms/sample', data) |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @returns |
| | | */ |
| | | export const deleteSamples = (ids: string[]) => { |
| | | return request({ |
| | | data: ids, |
| | | url: '/api/v1/hiawms/sample', |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @returns |
| | | */ |
| | | export const cloneData = (data: any) => { |
| | | return request.post('/api/v1/hiawms/sample/clone', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addSample = (data: any) => { |
| | | return request.post('/api/v1/hiawms/sample', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getSample = (id: string) => { |
| | | return request.get(`/api/v1/hiawms/sample/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateSample = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/hiawms/sample/${id}`, data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsArea = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsarea', data) |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @returns |
| | | */ |
| | | export const deleteWmsAreas = (ids: string[]) => { |
| | | return request({ |
| | | data: ids, |
| | | url: '/api/v1/hiawms/wmsarea', |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @returns |
| | | */ |
| | | export const cloneData = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsarea/clone', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsArea = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsarea', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getWmsArea = (id: string) => { |
| | | return request.get(`/api/v1/hiawms/wmsarea/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateWmsArea = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/hiawms/wmsarea/${id}`, data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsContainer = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmscontainer', data) |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @returns |
| | | */ |
| | | export const deleteWmsContainers = (ids: string[]) => { |
| | | return request({ |
| | | data: ids, |
| | | url: '/api/v1/hiawms/wmscontainer', |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @returns |
| | | */ |
| | | export const cloneData = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmscontainer/clone', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsContainer = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmscontainer', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getWmsContainer = (id: string) => { |
| | | return request.get(`/api/v1/hiawms/wmscontainer/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateWmsContainer = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/hiawms/wmscontainer/${id}`, data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsMaterial = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsmaterial', data) |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @returns |
| | | */ |
| | | export const deleteWmsMaterials = (ids: string[]) => { |
| | | return request({ |
| | | data: ids, |
| | | url: '/api/v1/hiawms/wmsmaterial', |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @returns |
| | | */ |
| | | export const cloneData = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsmaterial/clone', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsMaterial = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsmaterial', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getWmsMaterial = (id: string) => { |
| | | return request.get(`/api/v1/hiawms/wmsmaterial/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateWmsMaterial = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/hiawms/wmsmaterial/${id}`, data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsPlace = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsplace', data) |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @returns |
| | | */ |
| | | export const deleteWmsPlaces = (ids: string[]) => { |
| | | return request({ |
| | | data: ids, |
| | | url: '/api/v1/hiawms/wmsplace', |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @returns |
| | | */ |
| | | export const cloneData = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsplace/clone', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsPlace = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsplace', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getWmsPlace = (id: string) => { |
| | | return request.get(`/api/v1/hiawms/wmsplace/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateWmsPlace = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/hiawms/wmsplace/${id}`, data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsStore = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsstore', data) |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * @returns |
| | | */ |
| | | export const deleteWmsStores = (ids: string[]) => { |
| | | return request({ |
| | | data: ids, |
| | | url: '/api/v1/hiawms/wmsstore', |
| | | method: 'delete', |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @returns |
| | | */ |
| | | export const cloneData = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsstore/clone', data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | const request = Base.request |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @returns |
| | | */ |
| | | export const addWmsStore = (data: any) => { |
| | | return request.post('/api/v1/hiawms/wmsstore', data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | * @returns |
| | | */ |
| | | export const getWmsStore = (id: string) => { |
| | | return request.get(`/api/v1/hiawms/wmsstore/${id}`) |
| | | } |
| | | |
| | | /** |
| | | * æ´æ° |
| | | * @returns |
| | | */ |
| | | export const updateWmsStore = (id: string, data: Record<string, any>) => { |
| | | return request.put(`/api/v1/hiawms/wmsstore/${id}`, data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | deleteWmsAreas, |
| | | addWmsArea, |
| | | cloneData, |
| | | } from './Service/WmsArea' |
| | | |
| | | export class WmsArea extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | }) |
| | | } |
| | | onMounted() {} |
| | | /** |
| | | * å é¤ |
| | | * @param id |
| | | * @returns |
| | | */ |
| | | async deleteWmsAreas(ids: string[]) { |
| | | return deleteWmsAreas(ids) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * @param data |
| | | * @returns |
| | | */ |
| | | addWmsArea(data: Record<string, any>) { |
| | | return addWmsArea(data) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @param ids |
| | | * @returns |
| | | */ |
| | | cloneData(ids: string[]) { |
| | | return cloneData(ids) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsArea, |
| | | getWmsArea, |
| | | updateWmsArea, |
| | | } from './Service/WmsAreaDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WmsAreaDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | wmsarea: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addWmsArea(data: Record<string, any>) { |
| | | return addWmsArea(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateWmsArea(id: string, data: Record<string, any>) { |
| | | return updateWmsArea(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getWmsAreaDetail(current: any, id?: string) { |
| | | return getWmsArea(id || current?.id) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | deleteWmsContainers, |
| | | addWmsContainer, |
| | | cloneData, |
| | | } from './Service/WmsContainer' |
| | | |
| | | export class WmsContainer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | }) |
| | | } |
| | | onMounted() {} |
| | | /** |
| | | * å é¤ |
| | | * @param id |
| | | * @returns |
| | | */ |
| | | async deleteWmsContainers(ids: string[]) { |
| | | return deleteWmsContainers(ids) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * @param data |
| | | * @returns |
| | | */ |
| | | addWmsContainer(data: Record<string, any>) { |
| | | return addWmsContainer(data) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @param ids |
| | | * @returns |
| | | */ |
| | | cloneData(ids: string[]) { |
| | | return cloneData(ids) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsContainer, |
| | | getWmsContainer, |
| | | updateWmsContainer, |
| | | } from './Service/WmsContainerDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WmsContainerDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | wmscontainer: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addWmsContainer(data: Record<string, any>) { |
| | | return addWmsContainer(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateWmsContainer(id: string, data: Record<string, any>) { |
| | | return updateWmsContainer(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getWmsContainerDetail(current: any, id?: string) { |
| | | return getWmsContainer(id || current?.id) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | deleteWmsMaterials, |
| | | addWmsMaterial, |
| | | cloneData, |
| | | } from './Service/WmsMaterial' |
| | | |
| | | export class WmsMaterial extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | }) |
| | | } |
| | | onMounted() {} |
| | | /** |
| | | * å é¤ |
| | | * @param id |
| | | * @returns |
| | | */ |
| | | async deleteWmsMaterials(ids: string[]) { |
| | | return deleteWmsMaterials(ids) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * @param data |
| | | * @returns |
| | | */ |
| | | addWmsMaterial(data: Record<string, any>) { |
| | | return addWmsMaterial(data) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @param ids |
| | | * @returns |
| | | */ |
| | | cloneData(ids: string[]) { |
| | | return cloneData(ids) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsMaterial, |
| | | getWmsMaterial, |
| | | updateWmsMaterial, |
| | | } from './Service/WmsMaterialDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WmsMaterialDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | wmsmaterial: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addWmsMaterial(data: Record<string, any>) { |
| | | return addWmsMaterial(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateWmsMaterial(id: string, data: Record<string, any>) { |
| | | return updateWmsMaterial(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getWmsMaterialDetail(current: any, id?: string) { |
| | | return getWmsMaterial(id || current?.id) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | deleteWmsPlaces, |
| | | addWmsPlace, |
| | | cloneData, |
| | | } from './Service/WmsPlace' |
| | | |
| | | export class WmsPlace extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | }) |
| | | } |
| | | onMounted() {} |
| | | /** |
| | | * å é¤ |
| | | * @param id |
| | | * @returns |
| | | */ |
| | | async deleteWmsPlaces(ids: string[]) { |
| | | return deleteWmsPlaces(ids) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * @param data |
| | | * @returns |
| | | */ |
| | | addWmsPlace(data: Record<string, any>) { |
| | | return addWmsPlace(data) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @param ids |
| | | * @returns |
| | | */ |
| | | cloneData(ids: string[]) { |
| | | return cloneData(ids) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsPlace, |
| | | getWmsPlace, |
| | | updateWmsPlace, |
| | | } from './Service/WmsPlaceDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WmsPlaceDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | wmsplace: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addWmsPlace(data: Record<string, any>) { |
| | | return addWmsPlace(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateWmsPlace(id: string, data: Record<string, any>) { |
| | | return updateWmsPlace(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getWmsPlaceDetail(current: any, id?: string) { |
| | | return getWmsPlace(id || current?.id) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | deleteWmsStores, |
| | | addWmsStore, |
| | | cloneData, |
| | | } from './Service/WmsStore' |
| | | |
| | | export class WmsStore extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | }) |
| | | } |
| | | onMounted() {} |
| | | /** |
| | | * å é¤ |
| | | * @param id |
| | | * @returns |
| | | */ |
| | | async deleteWmsStores(ids: string[]) { |
| | | return deleteWmsStores(ids) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å æ°æ® |
| | | * @param data |
| | | * @returns |
| | | */ |
| | | addWmsStore(data: Record<string, any>) { |
| | | return addWmsStore(data) |
| | | } |
| | | |
| | | /** |
| | | * å
é |
| | | * @param ids |
| | | * @returns |
| | | */ |
| | | cloneData(ids: string[]) { |
| | | return cloneData(ids) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Base } from '@/libs/Base/Base' |
| | | import { |
| | | addWmsStore, |
| | | getWmsStore, |
| | | updateWmsStore, |
| | | } from './Service/WmsStoreDrawer' |
| | | import { useGlobalState } from '@/libs/Store/Store' |
| | | |
| | | export class WmsStoreDrawer extends Base<{ [key: string]: any }> { |
| | | constructor() { |
| | | super({ |
| | | data: [], |
| | | wmsstore: {}, |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * @param data |
| | | */ |
| | | async addWmsStore(data: Record<string, any>) { |
| | | return addWmsStore(data) |
| | | } |
| | | /** |
| | | * æ´æ° |
| | | * @param data |
| | | */ |
| | | async updateWmsStore(id: string, data: Record<string, any>) { |
| | | return updateWmsStore(id, data) |
| | | } |
| | | |
| | | /** |
| | | * è·å详æ
|
| | | */ |
| | | async getWmsStoreDetail(current: any, id?: string) { |
| | | return getWmsStore(id || current?.id) |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .HIAWms { |
| | | background-color: #fff; |
| | | border-radius: 5px 5px 0 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | border: 1px solid #dbdbdb; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { |
| | | Component, |
| | | DefineComponent, |
| | | defineComponent, |
| | | markRaw, |
| | | ref, |
| | | SetupContext, |
| | | onMounted, |
| | | } from 'vue' |
| | | import styles from './HIAWms.module.scss' |
| | | // import WmsContainer from './Pages/WmsContainer/WmsContainer' |
| | | import Tab from '@/components/Tab/Tab' |
| | | import { useProvideModels } from '@/libs/Provider/app' |
| | | import { usePermission } from '@/libs/Permission/Permission' |
| | | import { permissionCodes } from '../enum' |
| | | import { ModuleType, TabItem } from '../type/Type' |
| | | import { getEntityNames } from '@/hooks/hook' |
| | | import TabPane from '@/components/Tab/TabPane' |
| | | |
| | | const Models: ModuleType = import.meta.glob('./config/*.json', { |
| | | eager: true, |
| | | }) |
| | | |
| | | const entityNames = getEntityNames(Models) |
| | | |
| | | export default defineComponent({ |
| | | name: 'HIAWms', |
| | | |
| | | setup(props, ctx: SetupContext) { |
| | | useProvideModels() |
| | | usePermission(props, permissionCodes) |
| | | |
| | | const rf = ref<{ |
| | | [key: string]: any |
| | | }>({}) |
| | | |
| | | const tabData = ref<TabItem[]>([]) |
| | | |
| | | const onTabChange = (v: string) => { |
| | | rf.value?.[v]?.reloadList() |
| | | } |
| | | |
| | | const initTableData = async () => { |
| | | for (const i in entityNames) { |
| | | const name = entityNames[i] |
| | | const module = await import(`./Pages/${name}/${name}.tsx`) |
| | | const WmsContainer = markRaw(module.default) |
| | | tabData.value.push({ |
| | | label: name, |
| | | name, |
| | | component: WmsContainer, |
| | | }) |
| | | } |
| | | } |
| | | |
| | | initTableData() |
| | | |
| | | return () => { |
| | | return ( |
| | | <div class={styles.HIAWms}> |
| | | <Tab data={tabData.value} type="list" onTab={onTabChange}> |
| | | {tabData.value.map((widgetInfo) => { |
| | | const Widget: any = widgetInfo.component |
| | | return ( |
| | | <TabPane label={widgetInfo.label} name={widgetInfo.name}> |
| | | <Widget |
| | | ref={(r: any) => (rf.value['WmsContainer'] = r)} |
| | | ></Widget> |
| | | </TabPane> |
| | | ) |
| | | })} |
| | | </Tab> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseDrawer from '@/components/BaseDrawer/BaseDrawer' |
| | | import styles from './SampleDrawer.module.scss' |
| | | import { useSampleDrawer } from '../../../../Controllers/SampleDrawer' |
| | | import DyForm from '@/components/DyForm/DyForm' |
| | | |
| | | // @ts-ignore |
| | | export default defineComponent<{ |
| | | [key: string]: any |
| | | }>({ |
| | | name: 'å¼¹çª', |
| | | props: { |
| | | modelValue: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | }, |
| | | sort: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirm'], |
| | | setup(props: Record<string, any>, ctx: SetupContext) { |
| | | const { |
| | | onClose, |
| | | onConfirm, |
| | | onOpen, |
| | | formRef, |
| | | visible, |
| | | formItems, |
| | | formData, |
| | | } = useSampleDrawer(props, ctx) |
| | | return () => ( |
| | | <BaseDrawer |
| | | class={styles.drawer} |
| | | size="800px" |
| | | title={props.title || 'æ·»å '} |
| | | v-model={visible.value} |
| | | close-on-click-modal={true} |
| | | onConfirm={onConfirm} |
| | | onOpen={onOpen} |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | | > |
| | | <DyForm |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyForm> |
| | | </BaseDrawer> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseDrawer from '@/components/BaseDrawer/BaseDrawer' |
| | | import styles from './WmsAreaDrawer.module.scss' |
| | | import { useWmsAreaDrawer } from '../../../../Controllers/WmsAreaDrawer' |
| | | import DyForm from '@/components/DyForm/DyForm' |
| | | |
| | | // @ts-ignore |
| | | export default defineComponent<{ |
| | | [key: string]: any |
| | | }>({ |
| | | name: 'å¼¹çª', |
| | | props: { |
| | | modelValue: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | }, |
| | | sort: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirm'], |
| | | setup(props: Record<string, any>, ctx: SetupContext) { |
| | | const { |
| | | onClose, |
| | | onConfirm, |
| | | onOpen, |
| | | formRef, |
| | | visible, |
| | | formItems, |
| | | formData, |
| | | } = useWmsAreaDrawer(props, ctx) |
| | | return () => ( |
| | | <BaseDrawer |
| | | class={styles.drawer} |
| | | size="800px" |
| | | title={props.title || 'æ·»å '} |
| | | v-model={visible.value} |
| | | close-on-click-modal={true} |
| | | onConfirm={onConfirm} |
| | | onOpen={onOpen} |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | | > |
| | | <DyForm |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyForm> |
| | | </BaseDrawer> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseDrawer from '@/components/BaseDrawer/BaseDrawer' |
| | | import styles from './WmsContainerDrawer.module.scss' |
| | | import { useWmsContainerDrawer } from '../../../../Controllers/WmsContainerDrawer' |
| | | import DyForm from '@/components/DyForm/DyForm' |
| | | |
| | | // @ts-ignore |
| | | export default defineComponent<{ |
| | | [key: string]: any |
| | | }>({ |
| | | name: 'å¼¹çª', |
| | | props: { |
| | | modelValue: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | }, |
| | | sort: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirm'], |
| | | setup(props: Record<string, any>, ctx: SetupContext) { |
| | | const { |
| | | onClose, |
| | | onConfirm, |
| | | onOpen, |
| | | formRef, |
| | | visible, |
| | | formItems, |
| | | formData, |
| | | } = useWmsContainerDrawer(props, ctx) |
| | | return () => ( |
| | | <BaseDrawer |
| | | class={styles.drawer} |
| | | size="800px" |
| | | title={props.title || 'æ·»å '} |
| | | v-model={visible.value} |
| | | close-on-click-modal={true} |
| | | onConfirm={onConfirm} |
| | | onOpen={onOpen} |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | | > |
| | | <DyForm |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyForm> |
| | | </BaseDrawer> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseDrawer from '@/components/BaseDrawer/BaseDrawer' |
| | | import styles from './WmsMaterialDrawer.module.scss' |
| | | import { useWmsMaterialDrawer } from '../../../../Controllers/WmsMaterialDrawer' |
| | | import DyForm from '@/components/DyForm/DyForm' |
| | | |
| | | // @ts-ignore |
| | | export default defineComponent<{ |
| | | [key: string]: any |
| | | }>({ |
| | | name: 'å¼¹çª', |
| | | props: { |
| | | modelValue: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | }, |
| | | sort: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirm'], |
| | | setup(props: Record<string, any>, ctx: SetupContext) { |
| | | const { |
| | | onClose, |
| | | onConfirm, |
| | | onOpen, |
| | | formRef, |
| | | visible, |
| | | formItems, |
| | | formData, |
| | | } = useWmsMaterialDrawer(props, ctx) |
| | | return () => ( |
| | | <BaseDrawer |
| | | class={styles.drawer} |
| | | size="800px" |
| | | title={props.title || 'æ·»å '} |
| | | v-model={visible.value} |
| | | close-on-click-modal={true} |
| | | onConfirm={onConfirm} |
| | | onOpen={onOpen} |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | | > |
| | | <DyForm |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyForm> |
| | | </BaseDrawer> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseDrawer from '@/components/BaseDrawer/BaseDrawer' |
| | | import styles from './WmsPlaceDrawer.module.scss' |
| | | import { useWmsPlaceDrawer } from '../../../../Controllers/WmsPlaceDrawer' |
| | | import DyForm from '@/components/DyForm/DyForm' |
| | | |
| | | // @ts-ignore |
| | | export default defineComponent<{ |
| | | [key: string]: any |
| | | }>({ |
| | | name: 'å¼¹çª', |
| | | props: { |
| | | modelValue: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | }, |
| | | sort: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirm'], |
| | | setup(props: Record<string, any>, ctx: SetupContext) { |
| | | const { |
| | | onClose, |
| | | onConfirm, |
| | | onOpen, |
| | | formRef, |
| | | visible, |
| | | formItems, |
| | | formData, |
| | | } = useWmsPlaceDrawer(props, ctx) |
| | | return () => ( |
| | | <BaseDrawer |
| | | class={styles.drawer} |
| | | size="800px" |
| | | title={props.title || 'æ·»å '} |
| | | v-model={visible.value} |
| | | close-on-click-modal={true} |
| | | onConfirm={onConfirm} |
| | | onOpen={onOpen} |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | | > |
| | | <DyForm |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyForm> |
| | | </BaseDrawer> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .drawer { |
| | | width: 800px; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { SetupContext, defineComponent } from 'vue' |
| | | import BaseDrawer from '@/components/BaseDrawer/BaseDrawer' |
| | | import styles from './WmsStoreDrawer.module.scss' |
| | | import { useWmsStoreDrawer } from '../../../../Controllers/WmsStoreDrawer' |
| | | import DyForm from '@/components/DyForm/DyForm' |
| | | |
| | | // @ts-ignore |
| | | export default defineComponent<{ |
| | | [key: string]: any |
| | | }>({ |
| | | name: 'å¼¹çª', |
| | | props: { |
| | | modelValue: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | title: { |
| | | type: String, |
| | | default: '', |
| | | }, |
| | | row: { |
| | | type: Object, |
| | | }, |
| | | sort: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirm'], |
| | | setup(props: Record<string, any>, ctx: SetupContext) { |
| | | const { |
| | | onClose, |
| | | onConfirm, |
| | | onOpen, |
| | | formRef, |
| | | visible, |
| | | formItems, |
| | | formData, |
| | | } = useWmsStoreDrawer(props, ctx) |
| | | return () => ( |
| | | <BaseDrawer |
| | | class={styles.drawer} |
| | | size="800px" |
| | | title={props.title || 'æ·»å '} |
| | | v-model={visible.value} |
| | | close-on-click-modal={true} |
| | | onConfirm={onConfirm} |
| | | onOpen={onOpen} |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | | > |
| | | <DyForm |
| | | ref={formRef} |
| | | formData={formData.value} |
| | | labelWidth="106px" |
| | | formItemProps={formItems} |
| | | ></DyForm> |
| | | </BaseDrawer> |
| | | ) |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const columns = [ |
| | | { |
| | | type: 'seq', |
| | | width: 60, |
| | | title: 'åºå·', |
| | | }, |
| | | { |
| | | field: 'name', |
| | | title: 'åç§°', |
| | | }, |
| | | { |
| | | field: 'code', |
| | | title: 'ç¼å·', |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '夿³¨', |
| | | }, |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .sampleContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .sampleList { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | } |
| | | .headerContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 43px; |
| | | } |
| | | .header { |
| | | margin-bottom: 12px; |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .tagBox { |
| | | width: auto; |
| | | min-width: 80px; |
| | | height: 24px; |
| | | background: #ffffff; |
| | | border-radius: 19px 19px 19px 19px; |
| | | opacity: 1; |
| | | border: 1px dashed #bcc4cc; |
| | | width: 50px; |
| | | height: 20px; |
| | | font-size: 14px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | color: #5a84ff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // cursor: pointer; |
| | | } |
| | | |
| | | .group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .groupTable { |
| | | width: 100%; |
| | | } |
| | | |
| | | .overBox { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | overflow: auto; |
| | | :global(.cs-collapse-item__header) { |
| | | background-color: #f1f1f1; |
| | | padding: 0 20px; |
| | | height: 35px; |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 500; |
| | | } |
| | | :global(.cs-collapse-item__content) { |
| | | padding-bottom: 0px; |
| | | } |
| | | } |
| | | .groupHeader { |
| | | width: 100%; |
| | | height: 30px; |
| | | background: #ccc; |
| | | } |
| | | |
| | | .hideBlock { |
| | | display: none; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { defineComponent } from 'vue' |
| | | import type { Ref } from 'vue' |
| | | import BaseTable from '@/components/Table/Table' |
| | | import styles from './Sample.module.scss' |
| | | import { useSample } from '../../../Controllers/Sample' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import SampleDrawer from '../Dialog/SampleDrawer/SampleDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | | import { vPermission } from '@/libs/Permission/Permission' |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | | dataSource: Ref<any[]> |
| | | isDrag?: boolean |
| | | isChecked?: boolean |
| | | isHidePagination?: boolean |
| | | params?: Record<string, any> |
| | | autoHeight?: boolean |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'Sample', |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | | setup(props, ctx) { |
| | | const { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | headers, |
| | | onError, |
| | | onSearch, |
| | | onRowClick, |
| | | onConfirmSample, |
| | | onCheck, |
| | | onAddSample, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useSample(props, ctx) |
| | | |
| | | /** |
| | | * @returns è¡¨æ ¼ |
| | | */ |
| | | const RenderBaseTable = (props: RenderTableType) => { |
| | | const { |
| | | url, |
| | | dataSource, |
| | | isDrag, |
| | | isChecked, |
| | | isHidePagination, |
| | | params, |
| | | autoHeight, |
| | | } = props |
| | | |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.sampleList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/hiawms/sample/{id}/adjustsort/{sort}" |
| | | v-model:dataSource={dataSource.value} |
| | | columns={columns} |
| | | contextMenu={contextMenu} |
| | | params={params} |
| | | isDrag={isDrag} |
| | | isChecked={isChecked} |
| | | autoHeight={autoHeight} |
| | | onCheck={onCheck} |
| | | onRowClick={onRowClick} |
| | | isHidePagination={isHidePagination} |
| | | pageSize={50} |
| | | v-slots={{ |
| | | name: ({ row }: any) => { |
| | | return row?.name ? ( |
| | | <TdButton |
| | | onClick={() => openDetail(row)} |
| | | text={<span style="color:#5a84ff">详æ
</span>} |
| | | icon="scale" |
| | | tip={row?.name} |
| | | hover |
| | | > |
| | | {row?.name} |
| | | </TdButton> |
| | | ) : ( |
| | | '-' |
| | | ) |
| | | }, |
| | | }} |
| | | ></BaseTable> |
| | | </div> |
| | | ) |
| | | } |
| | | return () => { |
| | | return ( |
| | | <div class={styles.sampleContent}> |
| | | {/* æ·»å /ç¼è¾ */} |
| | | <SampleDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmSample} |
| | | /> |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="sample-add" |
| | | icon="add-p" |
| | | onClick={onAddSample} |
| | | type="primary" |
| | | > |
| | | æ·»å |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <el-upload |
| | | v-permission="sample-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | | show-file-list={false} |
| | | onError={onError} |
| | | onSuccess={onSuccess} |
| | | before-upload={onBeforeUpload} |
| | | headers={headers.value} |
| | | action="/api/v1/hiawms/sample/import" |
| | | > |
| | | <IconButton icon="in">导å
¥</IconButton> |
| | | </el-upload> |
| | | |
| | | <IconButton |
| | | v-permission="sample-output" |
| | | icon="out" |
| | | onClick={onExport} |
| | | > |
| | | å¯¼åº |
| | | </IconButton> |
| | | </div> |
| | | <Search |
| | | placeholder="请è¾å
¥å
³é®å" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/hiawms/sample" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |
| | | /> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const columns = [ |
| | | { |
| | | type: 'seq', |
| | | width: 60, |
| | | title: 'åºå·', |
| | | }, |
| | | { |
| | | field: 'name', |
| | | title: 'åç§°', |
| | | }, |
| | | { |
| | | field: 'code', |
| | | title: 'ç¼å·', |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '夿³¨', |
| | | }, |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .wmsareaContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .wmsareaList { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | } |
| | | .headerContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 43px; |
| | | } |
| | | .header { |
| | | margin-bottom: 12px; |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .tagBox { |
| | | width: auto; |
| | | min-width: 80px; |
| | | height: 24px; |
| | | background: #ffffff; |
| | | border-radius: 19px 19px 19px 19px; |
| | | opacity: 1; |
| | | border: 1px dashed #bcc4cc; |
| | | width: 50px; |
| | | height: 20px; |
| | | font-size: 14px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | color: #5a84ff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // cursor: pointer; |
| | | } |
| | | |
| | | .group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .groupTable { |
| | | width: 100%; |
| | | } |
| | | |
| | | .overBox { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | overflow: auto; |
| | | :global(.cs-collapse-item__header) { |
| | | background-color: #f1f1f1; |
| | | padding: 0 20px; |
| | | height: 35px; |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 500; |
| | | } |
| | | :global(.cs-collapse-item__content) { |
| | | padding-bottom: 0px; |
| | | } |
| | | } |
| | | .groupHeader { |
| | | width: 100%; |
| | | height: 30px; |
| | | background: #ccc; |
| | | } |
| | | |
| | | .hideBlock { |
| | | display: none; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { defineComponent } from 'vue' |
| | | import type { Ref } from 'vue' |
| | | import BaseTable from '@/components/Table/Table' |
| | | import styles from './WmsArea.module.scss' |
| | | import { useWmsArea } from '../../../Controllers/WmsArea' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import WmsAreaDrawer from '../Dialog/WmsAreaDrawer/WmsAreaDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | | import { vPermission } from '@/libs/Permission/Permission' |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | | dataSource: Ref<any[]> |
| | | isDrag?: boolean |
| | | isChecked?: boolean |
| | | isHidePagination?: boolean |
| | | params?: Record<string, any> |
| | | autoHeight?: boolean |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'WmsArea', |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | | setup(props, ctx) { |
| | | const { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | headers, |
| | | onError, |
| | | onSearch, |
| | | onRowClick, |
| | | onConfirmWmsArea, |
| | | onCheck, |
| | | onAddWmsArea, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useWmsArea(props, ctx) |
| | | |
| | | /** |
| | | * @returns è¡¨æ ¼ |
| | | */ |
| | | const RenderBaseTable = (props: RenderTableType) => { |
| | | const { |
| | | url, |
| | | dataSource, |
| | | isDrag, |
| | | isChecked, |
| | | isHidePagination, |
| | | params, |
| | | autoHeight, |
| | | } = props |
| | | |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.wmsareaList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/hiawms/wmsarea/{id}/adjustsort/{sort}" |
| | | v-model:dataSource={dataSource.value} |
| | | columns={columns} |
| | | contextMenu={contextMenu} |
| | | params={params} |
| | | isDrag={isDrag} |
| | | isChecked={isChecked} |
| | | autoHeight={autoHeight} |
| | | onCheck={onCheck} |
| | | onRowClick={onRowClick} |
| | | isHidePagination={isHidePagination} |
| | | pageSize={50} |
| | | v-slots={{ |
| | | name: ({ row }: any) => { |
| | | return row?.name ? ( |
| | | <TdButton |
| | | onClick={() => openDetail(row)} |
| | | text={<span style="color:#5a84ff">详æ
</span>} |
| | | icon="scale" |
| | | tip={row?.name} |
| | | hover |
| | | > |
| | | {row?.name} |
| | | </TdButton> |
| | | ) : ( |
| | | '-' |
| | | ) |
| | | }, |
| | | }} |
| | | ></BaseTable> |
| | | </div> |
| | | ) |
| | | } |
| | | return () => { |
| | | return ( |
| | | <div class={styles.wmsareaContent}> |
| | | {/* æ·»å /ç¼è¾ */} |
| | | <WmsAreaDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmWmsArea} |
| | | /> |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="wmsarea-add" |
| | | icon="add-p" |
| | | onClick={onAddWmsArea} |
| | | type="primary" |
| | | > |
| | | æ·»å |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <el-upload |
| | | v-permission="wmsarea-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | | show-file-list={false} |
| | | onError={onError} |
| | | onSuccess={onSuccess} |
| | | before-upload={onBeforeUpload} |
| | | headers={headers.value} |
| | | action="/api/v1/hiawms/wmsarea/import" |
| | | > |
| | | <IconButton icon="in">导å
¥</IconButton> |
| | | </el-upload> |
| | | |
| | | <IconButton |
| | | v-permission="wmsarea-output" |
| | | icon="out" |
| | | onClick={onExport} |
| | | > |
| | | å¯¼åº |
| | | </IconButton> |
| | | </div> |
| | | <Search |
| | | placeholder="请è¾å
¥å
³é®å" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/hiawms/wmsarea" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |
| | | /> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const columns = [ |
| | | { |
| | | type: 'seq', |
| | | width: 60, |
| | | title: 'åºå·', |
| | | }, |
| | | { |
| | | field: 'name', |
| | | title: 'åç§°', |
| | | }, |
| | | { |
| | | field: 'code', |
| | | title: 'ç¼å·', |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '夿³¨', |
| | | }, |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .wmscontainerContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .wmscontainerList { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | } |
| | | .headerContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 43px; |
| | | } |
| | | .header { |
| | | margin-bottom: 12px; |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .tagBox { |
| | | width: auto; |
| | | min-width: 80px; |
| | | height: 24px; |
| | | background: #ffffff; |
| | | border-radius: 19px 19px 19px 19px; |
| | | opacity: 1; |
| | | border: 1px dashed #bcc4cc; |
| | | width: 50px; |
| | | height: 20px; |
| | | font-size: 14px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | color: #5a84ff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // cursor: pointer; |
| | | } |
| | | |
| | | .group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .groupTable { |
| | | width: 100%; |
| | | } |
| | | |
| | | .overBox { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | overflow: auto; |
| | | :global(.cs-collapse-item__header) { |
| | | background-color: #f1f1f1; |
| | | padding: 0 20px; |
| | | height: 35px; |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 500; |
| | | } |
| | | :global(.cs-collapse-item__content) { |
| | | padding-bottom: 0px; |
| | | } |
| | | } |
| | | .groupHeader { |
| | | width: 100%; |
| | | height: 30px; |
| | | background: #ccc; |
| | | } |
| | | |
| | | .hideBlock { |
| | | display: none; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { defineComponent } from 'vue' |
| | | import type { Ref } from 'vue' |
| | | import BaseTable from '@/components/Table/Table' |
| | | import styles from './WmsContainer.module.scss' |
| | | import { useWmsContainer } from '../../../Controllers/WmsContainer' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import WmsContainerDrawer from '../Dialog/WmsContainerDrawer/WmsContainerDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | | import { vPermission } from '@/libs/Permission/Permission' |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | | dataSource: Ref<any[]> |
| | | isDrag?: boolean |
| | | isChecked?: boolean |
| | | isHidePagination?: boolean |
| | | params?: Record<string, any> |
| | | autoHeight?: boolean |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'WmsContainer', |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | | setup(props, ctx) { |
| | | const { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | headers, |
| | | onError, |
| | | onSearch, |
| | | onRowClick, |
| | | onConfirmWmsContainer, |
| | | onCheck, |
| | | onAddWmsContainer, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useWmsContainer(props, ctx) |
| | | |
| | | /** |
| | | * @returns è¡¨æ ¼ |
| | | */ |
| | | const RenderBaseTable = (props: RenderTableType) => { |
| | | const { |
| | | url, |
| | | dataSource, |
| | | isDrag, |
| | | isChecked, |
| | | isHidePagination, |
| | | params, |
| | | autoHeight, |
| | | } = props |
| | | |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.wmscontainerList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/hiawms/wmscontainer/{id}/adjustsort/{sort}" |
| | | v-model:dataSource={dataSource.value} |
| | | columns={columns} |
| | | contextMenu={contextMenu} |
| | | params={params} |
| | | isDrag={isDrag} |
| | | isChecked={isChecked} |
| | | autoHeight={autoHeight} |
| | | onCheck={onCheck} |
| | | onRowClick={onRowClick} |
| | | isHidePagination={isHidePagination} |
| | | pageSize={50} |
| | | v-slots={{ |
| | | name: ({ row }: any) => { |
| | | return row?.name ? ( |
| | | <TdButton |
| | | onClick={() => openDetail(row)} |
| | | text={<span style="color:#5a84ff">详æ
</span>} |
| | | icon="scale" |
| | | tip={row?.name} |
| | | hover |
| | | > |
| | | {row?.name} |
| | | </TdButton> |
| | | ) : ( |
| | | '-' |
| | | ) |
| | | }, |
| | | }} |
| | | ></BaseTable> |
| | | </div> |
| | | ) |
| | | } |
| | | return () => { |
| | | return ( |
| | | <div class={styles.wmscontainerContent}> |
| | | {/* æ·»å /ç¼è¾ */} |
| | | <WmsContainerDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmWmsContainer} |
| | | /> |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="wmscontainer-add" |
| | | icon="add-p" |
| | | onClick={onAddWmsContainer} |
| | | type="primary" |
| | | > |
| | | æ·»å |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <el-upload |
| | | v-permission="wmscontainer-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | | show-file-list={false} |
| | | onError={onError} |
| | | onSuccess={onSuccess} |
| | | before-upload={onBeforeUpload} |
| | | headers={headers.value} |
| | | action="/api/v1/hiawms/wmscontainer/import" |
| | | > |
| | | <IconButton icon="in">导å
¥</IconButton> |
| | | </el-upload> |
| | | |
| | | <IconButton |
| | | v-permission="wmscontainer-output" |
| | | icon="out" |
| | | onClick={onExport} |
| | | > |
| | | å¯¼åº |
| | | </IconButton> |
| | | </div> |
| | | <Search |
| | | placeholder="请è¾å
¥å
³é®å" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/hiawms/wmscontainer" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |
| | | /> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const columns = [ |
| | | { |
| | | type: 'seq', |
| | | width: 60, |
| | | title: 'åºå·', |
| | | }, |
| | | { |
| | | field: 'name', |
| | | title: 'åç§°', |
| | | }, |
| | | { |
| | | field: 'code', |
| | | title: 'ç¼å·', |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '夿³¨', |
| | | }, |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .wmsmaterialContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .wmsmaterialList { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | } |
| | | .headerContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 43px; |
| | | } |
| | | .header { |
| | | margin-bottom: 12px; |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .tagBox { |
| | | width: auto; |
| | | min-width: 80px; |
| | | height: 24px; |
| | | background: #ffffff; |
| | | border-radius: 19px 19px 19px 19px; |
| | | opacity: 1; |
| | | border: 1px dashed #bcc4cc; |
| | | width: 50px; |
| | | height: 20px; |
| | | font-size: 14px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | color: #5a84ff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // cursor: pointer; |
| | | } |
| | | |
| | | .group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .groupTable { |
| | | width: 100%; |
| | | } |
| | | |
| | | .overBox { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | overflow: auto; |
| | | :global(.cs-collapse-item__header) { |
| | | background-color: #f1f1f1; |
| | | padding: 0 20px; |
| | | height: 35px; |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 500; |
| | | } |
| | | :global(.cs-collapse-item__content) { |
| | | padding-bottom: 0px; |
| | | } |
| | | } |
| | | .groupHeader { |
| | | width: 100%; |
| | | height: 30px; |
| | | background: #ccc; |
| | | } |
| | | |
| | | .hideBlock { |
| | | display: none; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { defineComponent } from 'vue' |
| | | import type { Ref } from 'vue' |
| | | import BaseTable from '@/components/Table/Table' |
| | | import styles from './WmsMaterial.module.scss' |
| | | import { useWmsMaterial } from '../../../Controllers/WmsMaterial' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import WmsMaterialDrawer from '../Dialog/WmsMaterialDrawer/WmsMaterialDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | | import { vPermission } from '@/libs/Permission/Permission' |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | | dataSource: Ref<any[]> |
| | | isDrag?: boolean |
| | | isChecked?: boolean |
| | | isHidePagination?: boolean |
| | | params?: Record<string, any> |
| | | autoHeight?: boolean |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'WmsMaterial', |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | | setup(props, ctx) { |
| | | const { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | headers, |
| | | onError, |
| | | onSearch, |
| | | onRowClick, |
| | | onConfirmWmsMaterial, |
| | | onCheck, |
| | | onAddWmsMaterial, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useWmsMaterial(props, ctx) |
| | | |
| | | /** |
| | | * @returns è¡¨æ ¼ |
| | | */ |
| | | const RenderBaseTable = (props: RenderTableType) => { |
| | | const { |
| | | url, |
| | | dataSource, |
| | | isDrag, |
| | | isChecked, |
| | | isHidePagination, |
| | | params, |
| | | autoHeight, |
| | | } = props |
| | | |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.wmsmaterialList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/hiawms/wmsmaterial/{id}/adjustsort/{sort}" |
| | | v-model:dataSource={dataSource.value} |
| | | columns={columns} |
| | | contextMenu={contextMenu} |
| | | params={params} |
| | | isDrag={isDrag} |
| | | isChecked={isChecked} |
| | | autoHeight={autoHeight} |
| | | onCheck={onCheck} |
| | | onRowClick={onRowClick} |
| | | isHidePagination={isHidePagination} |
| | | pageSize={50} |
| | | v-slots={{ |
| | | name: ({ row }: any) => { |
| | | return row?.name ? ( |
| | | <TdButton |
| | | onClick={() => openDetail(row)} |
| | | text={<span style="color:#5a84ff">详æ
</span>} |
| | | icon="scale" |
| | | tip={row?.name} |
| | | hover |
| | | > |
| | | {row?.name} |
| | | </TdButton> |
| | | ) : ( |
| | | '-' |
| | | ) |
| | | }, |
| | | }} |
| | | ></BaseTable> |
| | | </div> |
| | | ) |
| | | } |
| | | return () => { |
| | | return ( |
| | | <div class={styles.wmsmaterialContent}> |
| | | {/* æ·»å /ç¼è¾ */} |
| | | <WmsMaterialDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmWmsMaterial} |
| | | /> |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="wmsmaterial-add" |
| | | icon="add-p" |
| | | onClick={onAddWmsMaterial} |
| | | type="primary" |
| | | > |
| | | æ·»å |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <el-upload |
| | | v-permission="wmsmaterial-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | | show-file-list={false} |
| | | onError={onError} |
| | | onSuccess={onSuccess} |
| | | before-upload={onBeforeUpload} |
| | | headers={headers.value} |
| | | action="/api/v1/hiawms/wmsmaterial/import" |
| | | > |
| | | <IconButton icon="in">导å
¥</IconButton> |
| | | </el-upload> |
| | | |
| | | <IconButton |
| | | v-permission="wmsmaterial-output" |
| | | icon="out" |
| | | onClick={onExport} |
| | | > |
| | | å¯¼åº |
| | | </IconButton> |
| | | </div> |
| | | <Search |
| | | placeholder="请è¾å
¥å
³é®å" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/hiawms/wmsmaterial" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |
| | | /> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const columns = [ |
| | | { |
| | | type: 'seq', |
| | | width: 60, |
| | | title: 'åºå·', |
| | | }, |
| | | { |
| | | field: 'name', |
| | | title: 'åç§°', |
| | | }, |
| | | { |
| | | field: 'code', |
| | | title: 'ç¼å·', |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '夿³¨', |
| | | }, |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .wmsplaceContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .wmsplaceList { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | } |
| | | .headerContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 43px; |
| | | } |
| | | .header { |
| | | margin-bottom: 12px; |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .tagBox { |
| | | width: auto; |
| | | min-width: 80px; |
| | | height: 24px; |
| | | background: #ffffff; |
| | | border-radius: 19px 19px 19px 19px; |
| | | opacity: 1; |
| | | border: 1px dashed #bcc4cc; |
| | | width: 50px; |
| | | height: 20px; |
| | | font-size: 14px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | color: #5a84ff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // cursor: pointer; |
| | | } |
| | | |
| | | .group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .groupTable { |
| | | width: 100%; |
| | | } |
| | | |
| | | .overBox { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | overflow: auto; |
| | | :global(.cs-collapse-item__header) { |
| | | background-color: #f1f1f1; |
| | | padding: 0 20px; |
| | | height: 35px; |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 500; |
| | | } |
| | | :global(.cs-collapse-item__content) { |
| | | padding-bottom: 0px; |
| | | } |
| | | } |
| | | .groupHeader { |
| | | width: 100%; |
| | | height: 30px; |
| | | background: #ccc; |
| | | } |
| | | |
| | | .hideBlock { |
| | | display: none; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { defineComponent } from 'vue' |
| | | import type { Ref } from 'vue' |
| | | import BaseTable from '@/components/Table/Table' |
| | | import styles from './WmsPlace.module.scss' |
| | | import { useWmsPlace } from '../../../Controllers/WmsPlace' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import WmsPlaceDrawer from '../Dialog/WmsPlaceDrawer/WmsPlaceDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | | import { vPermission } from '@/libs/Permission/Permission' |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | | dataSource: Ref<any[]> |
| | | isDrag?: boolean |
| | | isChecked?: boolean |
| | | isHidePagination?: boolean |
| | | params?: Record<string, any> |
| | | autoHeight?: boolean |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'WmsPlace', |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | | setup(props, ctx) { |
| | | const { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | headers, |
| | | onError, |
| | | onSearch, |
| | | onRowClick, |
| | | onConfirmWmsPlace, |
| | | onCheck, |
| | | onAddWmsPlace, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useWmsPlace(props, ctx) |
| | | |
| | | /** |
| | | * @returns è¡¨æ ¼ |
| | | */ |
| | | const RenderBaseTable = (props: RenderTableType) => { |
| | | const { |
| | | url, |
| | | dataSource, |
| | | isDrag, |
| | | isChecked, |
| | | isHidePagination, |
| | | params, |
| | | autoHeight, |
| | | } = props |
| | | |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.wmsplaceList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/hiawms/wmsplace/{id}/adjustsort/{sort}" |
| | | v-model:dataSource={dataSource.value} |
| | | columns={columns} |
| | | contextMenu={contextMenu} |
| | | params={params} |
| | | isDrag={isDrag} |
| | | isChecked={isChecked} |
| | | autoHeight={autoHeight} |
| | | onCheck={onCheck} |
| | | onRowClick={onRowClick} |
| | | isHidePagination={isHidePagination} |
| | | pageSize={50} |
| | | v-slots={{ |
| | | name: ({ row }: any) => { |
| | | return row?.name ? ( |
| | | <TdButton |
| | | onClick={() => openDetail(row)} |
| | | text={<span style="color:#5a84ff">详æ
</span>} |
| | | icon="scale" |
| | | tip={row?.name} |
| | | hover |
| | | > |
| | | {row?.name} |
| | | </TdButton> |
| | | ) : ( |
| | | '-' |
| | | ) |
| | | }, |
| | | }} |
| | | ></BaseTable> |
| | | </div> |
| | | ) |
| | | } |
| | | return () => { |
| | | return ( |
| | | <div class={styles.wmsplaceContent}> |
| | | {/* æ·»å /ç¼è¾ */} |
| | | <WmsPlaceDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmWmsPlace} |
| | | /> |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="wmsplace-add" |
| | | icon="add-p" |
| | | onClick={onAddWmsPlace} |
| | | type="primary" |
| | | > |
| | | æ·»å |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <el-upload |
| | | v-permission="wmsplace-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | | show-file-list={false} |
| | | onError={onError} |
| | | onSuccess={onSuccess} |
| | | before-upload={onBeforeUpload} |
| | | headers={headers.value} |
| | | action="/api/v1/hiawms/wmsplace/import" |
| | | > |
| | | <IconButton icon="in">导å
¥</IconButton> |
| | | </el-upload> |
| | | |
| | | <IconButton |
| | | v-permission="wmsplace-output" |
| | | icon="out" |
| | | onClick={onExport} |
| | | > |
| | | å¯¼åº |
| | | </IconButton> |
| | | </div> |
| | | <Search |
| | | placeholder="请è¾å
¥å
³é®å" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/hiawms/wmsplace" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |
| | | /> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export const columns = [ |
| | | { |
| | | type: 'seq', |
| | | width: 60, |
| | | title: 'åºå·', |
| | | }, |
| | | { |
| | | field: 'name', |
| | | title: 'åç§°', |
| | | }, |
| | | { |
| | | field: 'code', |
| | | title: 'ç¼å·', |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | title: '夿³¨', |
| | | }, |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | .wmsstoreContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | .wmsstoreList { |
| | | width: 100%; |
| | | height: calc(100% - 70px); |
| | | } |
| | | .headerContent { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 43px; |
| | | } |
| | | .header { |
| | | margin-bottom: 12px; |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .tagBox { |
| | | width: auto; |
| | | min-width: 80px; |
| | | height: 24px; |
| | | background: #ffffff; |
| | | border-radius: 19px 19px 19px 19px; |
| | | opacity: 1; |
| | | border: 1px dashed #bcc4cc; |
| | | width: 50px; |
| | | height: 20px; |
| | | font-size: 14px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | color: #5a84ff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | // cursor: pointer; |
| | | } |
| | | |
| | | .group { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .groupTable { |
| | | width: 100%; |
| | | } |
| | | |
| | | .overBox { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | overflow: auto; |
| | | :global(.cs-collapse-item__header) { |
| | | background-color: #f1f1f1; |
| | | padding: 0 20px; |
| | | height: 35px; |
| | | font-size: 16px; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 500; |
| | | } |
| | | :global(.cs-collapse-item__content) { |
| | | padding-bottom: 0px; |
| | | } |
| | | } |
| | | .groupHeader { |
| | | width: 100%; |
| | | height: 30px; |
| | | background: #ccc; |
| | | } |
| | | |
| | | .hideBlock { |
| | | display: none; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { defineComponent } from 'vue' |
| | | import type { Ref } from 'vue' |
| | | import BaseTable from '@/components/Table/Table' |
| | | import styles from './WmsStore.module.scss' |
| | | import { useWmsStore } from '../../../Controllers/WmsStore' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import WmsStoreDrawer from '../Dialog/WmsStoreDrawer/WmsStoreDrawer' |
| | | import Search from '@/components/Search/Search' |
| | | import { columns } from './Config' |
| | | import TdButton from '@/components/TdButton/TdButton' |
| | | import { vPermission } from '@/libs/Permission/Permission' |
| | | |
| | | interface RenderTableType { |
| | | url?: string |
| | | dataSource: Ref<any[]> |
| | | isDrag?: boolean |
| | | isChecked?: boolean |
| | | isHidePagination?: boolean |
| | | params?: Record<string, any> |
| | | autoHeight?: boolean |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'WmsStore', |
| | | directives: { |
| | | permission: vPermission, |
| | | }, |
| | | setup(props, ctx) { |
| | | const { |
| | | dataSource, |
| | | contextMenu, |
| | | dialogConfig, |
| | | tableRef, |
| | | current, |
| | | search, |
| | | sort, |
| | | headers, |
| | | onError, |
| | | onSearch, |
| | | onRowClick, |
| | | onConfirmWmsStore, |
| | | onCheck, |
| | | onAddWmsStore, |
| | | onExport, |
| | | openDetail, |
| | | onSuccess, |
| | | onBeforeUpload, |
| | | } = useWmsStore(props, ctx) |
| | | |
| | | /** |
| | | * @returns è¡¨æ ¼ |
| | | */ |
| | | const RenderBaseTable = (props: RenderTableType) => { |
| | | const { |
| | | url, |
| | | dataSource, |
| | | isDrag, |
| | | isChecked, |
| | | isHidePagination, |
| | | params, |
| | | autoHeight, |
| | | } = props |
| | | |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.wmsstoreList]: true, |
| | | }} |
| | | > |
| | | <BaseTable |
| | | ref={tableRef} |
| | | url={url} |
| | | sortUrlTpl="/api/v1/hiawms/wmsstore/{id}/adjustsort/{sort}" |
| | | v-model:dataSource={dataSource.value} |
| | | columns={columns} |
| | | contextMenu={contextMenu} |
| | | params={params} |
| | | isDrag={isDrag} |
| | | isChecked={isChecked} |
| | | autoHeight={autoHeight} |
| | | onCheck={onCheck} |
| | | onRowClick={onRowClick} |
| | | isHidePagination={isHidePagination} |
| | | pageSize={50} |
| | | v-slots={{ |
| | | name: ({ row }: any) => { |
| | | return row?.name ? ( |
| | | <TdButton |
| | | onClick={() => openDetail(row)} |
| | | text={<span style="color:#5a84ff">详æ
</span>} |
| | | icon="scale" |
| | | tip={row?.name} |
| | | hover |
| | | > |
| | | {row?.name} |
| | | </TdButton> |
| | | ) : ( |
| | | '-' |
| | | ) |
| | | }, |
| | | }} |
| | | ></BaseTable> |
| | | </div> |
| | | ) |
| | | } |
| | | return () => { |
| | | return ( |
| | | <div class={styles.wmsstoreContent}> |
| | | {/* æ·»å /ç¼è¾ */} |
| | | <WmsStoreDrawer |
| | | v-model={dialogConfig.visible} |
| | | title={dialogConfig.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirm={onConfirmWmsStore} |
| | | /> |
| | | <div class={styles.headerContent}> |
| | | <div class={styles.header}> |
| | | <IconButton |
| | | v-permission="wmsstore-add" |
| | | icon="add-p" |
| | | onClick={onAddWmsStore} |
| | | type="primary" |
| | | > |
| | | æ·»å |
| | | </IconButton> |
| | | <el-divider direction="vertical" /> |
| | | <el-upload |
| | | v-permission="wmsstore-import" |
| | | name="file" |
| | | accept=".xlsx,.xls,.csv" |
| | | show-file-list={false} |
| | | onError={onError} |
| | | onSuccess={onSuccess} |
| | | before-upload={onBeforeUpload} |
| | | headers={headers.value} |
| | | action="/api/v1/hiawms/wmsstore/import" |
| | | > |
| | | <IconButton icon="in">导å
¥</IconButton> |
| | | </el-upload> |
| | | |
| | | <IconButton |
| | | v-permission="wmsstore-output" |
| | | icon="out" |
| | | onClick={onExport} |
| | | > |
| | | å¯¼åº |
| | | </IconButton> |
| | | </div> |
| | | <Search |
| | | placeholder="请è¾å
¥å
³é®å" |
| | | v-model={search.value} |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> |
| | | </div> |
| | | <RenderBaseTable |
| | | url="/api/v1/hiawms/wmsstore" |
| | | dataSource={dataSource} |
| | | isChecked={true} |
| | | isDrag={true} |
| | | /> |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "Sample" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "WmsArea" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "WmsContainer" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "WmsMaterial" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "WmsPlace" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "WmsStore" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export interface TabType { |
| | | label: string |
| | | name: string |
| | | columns?: any[] |
| | | data?: any[] |
| | | isFooter: boolean |
| | | [key: string]: any |
| | | } |
| | | |
| | | export const permissionCodes = { |
| | | 'wmscontainer-list': 'å表-å表', |
| | | 'wmscontainer-add': 'å表-æ·»å ', |
| | | 'wmscontainer-import': 'å表-导å
¥', |
| | | 'wmscontainer-output': 'å表-è¾åº', |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import HIAWms from './Views/HIAWms' |
| | | import Setting from '@/components/Setting/Setting' |
| | | import { provider } from '@/provider/index' |
| | | import p from '../../assets/svg/p.svg' |
| | | |
| | | export default { |
| | | is: 'HIAWms', |
| | | name: '${{widgetName}}', |
| | | category: 'run', |
| | | icon: p, |
| | | authorizationRequired: false, |
| | | canvasView: provider(HIAWms), |
| | | settingsView: Setting, |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { Component } from 'vue' |
| | | |
| | | export interface DataItemType { |
| | | id?: string |
| | | name?: string |
| | | code?: string |
| | | description?: string |
| | | label?: string |
| | | value?: string | number |
| | | } |
| | | |
| | | export interface WmsContainerBaseType { |
| | | id?: string |
| | | name?: string |
| | | code?: string |
| | | value?: number |
| | | description?: string |
| | | options?: Array<DataItemType> |
| | | abilityValue?: number | string |
| | | data?: DataItemType |
| | | defaultValue?: string | number |
| | | flow: string |
| | | } |
| | | |
| | | export interface FlowDefinitionType { |
| | | id?: string |
| | | name?: string |
| | | code?: string |
| | | description?: string |
| | | } |
| | | |
| | | export type ModuleType = Record< |
| | | string, |
| | | { |
| | | default: Record<string, string> |
| | | name: string |
| | | } |
| | | > |
| | | |
| | | export interface TabItem { |
| | | name: string |
| | | label: string |
| | | component: Component |
| | | hidden?: boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* eslint-disable */ |
| | | /* prettier-ignore */ |
| | | // @ts-nocheck |
| | | // Generated by unplugin-vue-components |
| | | // Read more: https://github.com/vuejs/core/pull/3399 |
| | | export {} |
| | | |
| | | declare module 'vue' { |
| | | export interface GlobalComponents { |
| | | BaseDialog: typeof import('./src/components/BaseDialog/index.vue')['default'] |
| | | ContextMenu: typeof import('./src/components/vue3-context-menu/ContextMenu.vue')['default'] |
| | | ContextMenuGroup: typeof import('./src/components/vue3-context-menu/ContextMenuGroup.vue')['default'] |
| | | ContextMenuIconCheck: typeof import('./src/components/vue3-context-menu/ContextMenuIconCheck.vue')['default'] |
| | | ContextMenuIconRight: typeof import('./src/components/vue3-context-menu/ContextMenuIconRight.vue')['default'] |
| | | ContextMenuItem: typeof import('./src/components/vue3-context-menu/ContextMenuItem.vue')['default'] |
| | | ContextMenuSeparator: typeof import('./src/components/vue3-context-menu/ContextMenuSeparator.vue')['default'] |
| | | ContextSubMenu: typeof import('./src/components/vue3-context-menu/ContextSubMenu.vue')['default'] |
| | | ContextSubMenuWrapper: typeof import('./src/components/vue3-context-menu/ContextSubMenuWrapper.vue')['default'] |
| | | CustomVxeColumn: typeof import('./src/components/Table/components/custom-vxe-column.vue')['default'] |
| | | DatePicker: typeof import('./src/components/DatePicker/index.vue')['default'] |
| | | Dialog: typeof import('./src/components/Dialog/index.vue')['default'] |
| | | ElButton: typeof import('element-plus/es')['ElButton'] |
| | | ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] |
| | | ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] |
| | | ElDialog: typeof import('element-plus/es')['ElDialog'] |
| | | ElDivider: typeof import('element-plus/es')['ElDivider'] |
| | | ElDrawer: typeof import('element-plus/es')['ElDrawer'] |
| | | ElDropdown: typeof import('element-plus/es')['ElDropdown'] |
| | | ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] |
| | | ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] |
| | | ElEmpty: typeof import('element-plus/es')['ElEmpty'] |
| | | ElForm: typeof import('element-plus/es')['ElForm'] |
| | | ElFormItem: typeof import('element-plus/es')['ElFormItem'] |
| | | ElIcon: typeof import('element-plus/es')['ElIcon'] |
| | | ElInput: typeof import('element-plus/es')['ElInput'] |
| | | ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] |
| | | ElMenu: typeof import('element-plus/es')['ElMenu'] |
| | | ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] |
| | | ElOption: typeof import('element-plus/es')['ElOption'] |
| | | ElPagination: typeof import('element-plus/es')['ElPagination'] |
| | | ElPopover: typeof import('element-plus/es')['ElPopover'] |
| | | ElRadio: typeof import('element-plus/es')['ElRadio'] |
| | | ElSelect: typeof import('element-plus/es')['ElSelect'] |
| | | ElTabPane: typeof import('element-plus/es')['ElTabPane'] |
| | | ElTabs: typeof import('element-plus/es')['ElTabs'] |
| | | ElTag: typeof import('element-plus/es')['ElTag'] |
| | | ElTooltip: typeof import('element-plus/es')['ElTooltip'] |
| | | ElUpload: typeof import('element-plus/es')['ElUpload'] |
| | | Menu: typeof import('./src/components/Menu/index.vue')['default'] |
| | | MenuBar: typeof import('./src/components/vue3-context-menu/MenuBar.vue')['default'] |
| | | MenuBarIconMenu: typeof import('./src/components/vue3-context-menu/MenuBarIconMenu.vue')['default'] |
| | | MyPages: typeof import('./src/components/MyPages/index.vue')['default'] |
| | | Pagination: typeof import('./src/components/Table/components/pagination.vue')['default'] |
| | | Pdf: typeof import('./src/components/Pdf/index.vue')['default'] |
| | | PrefixIcon: typeof import('./src/components/DatePicker/PrefixIcon.vue')['default'] |
| | | PreviewDialog: typeof import('./src/components/PreviewDialog/index.vue')['default'] |
| | | RouterLink: typeof import('vue-router')['RouterLink'] |
| | | RouterView: typeof import('vue-router')['RouterView'] |
| | | SettingItem: typeof import('./src/components/SettingItem/SettingItem.vue')['default'] |
| | | Table: typeof import('./src/components/Table/index.vue')['default'] |
| | | TouchScale: typeof import('./src/components/TouchScale/index.vue')['default'] |
| | | Upload: typeof import('./src/components/Upload/index.vue')['default'] |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /// <reference types="vite/client" /> |
| | | |
| | | declare module '*.vue' { |
| | | import { DefineComponent } from 'vue' |
| | | const component: DefineComponent<{}, {}, any> |
| | | export default component |
| | | } |
| | | |
| | | declare module 'koa-compose' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh-CN" theme="industrialBlack"> |
| | | <head> |
| | | <meta charset="UTF-8" /> |
| | | <link rel="icon" href="/favicon.ico" /> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| | | <!-- <link rel="stylesheet" href="http://at.alicdn.com/t/font_3273823_ids2nmnjyss.css"> --> |
| | | <title>information-standard</title> |
| | | <script> |
| | | window.cmstype = 'Web' |
| | | </script> |
| | | </head> |
| | | |
| | | <body> |
| | | <div id="app"></div> |
| | | <script type="module" src="/src/main.ts"></script> |
| | | </body> |
| | | </html> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // @ts-nocheck |
| | | import './cms/index.css' |
| | | import { createApp, ComponentPublicInstance } from 'vue' |
| | | import App from './App.vue' |
| | | import { setXProject } from './api/index' |
| | | import { router, routeInfo } from './router' |
| | | import { |
| | | renderWithQiankun, |
| | | qiankunWindow, |
| | | } from 'vite-plugin-qiankun/dist/helper' |
| | | let instance: ComponentPublicInstance | null = null |
| | | import sdk from 'sdk' |
| | | |
| | | function render(props = {}) { |
| | | instance = createApp(App) |
| | | instance.use(router) |
| | | instance.use(sdk.lib.useTable) |
| | | setXProject() |
| | | instance.mount('#app') |
| | | } |
| | | |
| | | renderWithQiankun({ |
| | | mount(props) { |
| | | props.setGlobalState(routeInfo) |
| | | render(props) |
| | | }, |
| | | bootstrap() { |
| | | console.log('bootstrap') |
| | | }, |
| | | unmount(props: any) { |
| | | instance.$destroy() |
| | | instance.$el.innerHTML = '' |
| | | instance = null |
| | | }, |
| | | }) |
| | | |
| | | // ç¬ç«è¿è¡æ¶ |
| | | if (!qiankunWindow.__POWERED_BY_QIANKUN__) { |
| | | render({}) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "name": "information-base", |
| | | "version": "1.0.0", |
| | | "files": [ |
| | | "sdk", |
| | | "packages.json" |
| | | ], |
| | | "scripts": { |
| | | "menu": "node ./script/autoMenu.js", |
| | | "dev": "npm run menu && vite --host", |
| | | "open": "vite --host --open", |
| | | "build": "node ./script/build.js", |
| | | "build:all": "npm run menu && vite build", |
| | | "build-lib": "vite build --config=vite.lib.config.ts", |
| | | "widgets": "vite build --config=vite.lib.config.ts", |
| | | "serve": "vite preview --host --port=8888", |
| | | "build-serve": "npm run build && npm run serve", |
| | | "vue-tsc": "vue-tsc --noEmit", |
| | | "test": "jest" |
| | | }, |
| | | "dependencies": { |
| | | "@fullhuman/postcss-purgecss": "^5.0.0", |
| | | "@imengyu/vue3-context-menu": "1.3.5", |
| | | "@optimize-lodash/rollup-plugin": "^4.0.4", |
| | | "@vue/cli-service": "^5.0.4", |
| | | "@vueuse/core": "^10.4.1", |
| | | "axios": "^0.24.0", |
| | | "dayjs": "^1.11.10", |
| | | "echarts": "^5.4.3", |
| | | "element-plus": "2.6.3", |
| | | "fast-xml-parser": "4.3.5", |
| | | "jsencrypt": "^3.3.2", |
| | | "koa-compose": "^4.1.0", |
| | | "lightningcss": "^1.21.7", |
| | | "lodash": "^4.17.21", |
| | | "sortablejs": "^1.15.0", |
| | | "vite-plugin-qiankun": "^1.0.15", |
| | | "vite-plugin-single-spa": "^0.1.0", |
| | | "vue": "3.4.27", |
| | | "vue-i18n": "9.1.9", |
| | | "vue-router": "4.0.11", |
| | | "vuex": "4.0.2", |
| | | "vxe-table": "4.5.9", |
| | | "vxe-table-plugin-element": "^3.1.0", |
| | | "xe-utils": "^3.5.13" |
| | | }, |
| | | "devDependencies": { |
| | | "@babel/preset-typescript": "^7.16.7", |
| | | "cross-spawn": "7.0.5", |
| | | "@types/crypto-js": "^4.1.1", |
| | | "@types/jest": "^27.4.1", |
| | | "@types/keyboardjs": "^2.5.0", |
| | | "@types/lodash": "^4.14.181", |
| | | "@types/node": "^16.11.26", |
| | | "@types/sortablejs": "^1.13.0", |
| | | "@typescript-eslint/eslint-plugin": "^5.12.1", |
| | | "@typescript-eslint/parser": "^5.12.1", |
| | | "@vitejs/plugin-vue": "^2.3.3", |
| | | "@vitejs/plugin-vue-jsx": "^3.1.0", |
| | | "@vue/compiler-sfc": "^3.2.31", |
| | | "@vue/tsconfig": "^0.4.0", |
| | | "babel-eslint": "^10.1.0", |
| | | "eslint": "^8.12.0", |
| | | "eslint-config-airbnb": "^19.0.4", |
| | | "eslint-plugin-import": "^2.25.4", |
| | | "eslint-plugin-vue": "^8.5.0", |
| | | "eslint-plugin-vue-libs": "^4.0.0", |
| | | "glob": "10.2.6", |
| | | "jest": "^27.5.1", |
| | | "kill-port": "^2.0.1", |
| | | "lmes-create-widget": "^1.0.3", |
| | | "postcss": "8.4.29", |
| | | "sass": "1.49.9", |
| | | "slash": "3.0.0", |
| | | "terser": "^5.19.4", |
| | | "ts-jest": "^27.1.3", |
| | | "typescript": "^4.5.5", |
| | | "unplugin-auto-import": "^0.16.6", |
| | | "unplugin-element-plus": "^0.1.3", |
| | | "unplugin-vue-components": "^0.25.2", |
| | | "vite": "5.1.5", |
| | | "vite-plugin-build": "^0.10.0", |
| | | "vite-plugin-css-injected-by-js": "^3.1.1", |
| | | "vite-plugin-style-import": "^2.0.0", |
| | | "vite-plugin-vue-type-imports": "^0.2.5", |
| | | "vue-tsc": "^0.3.0" |
| | | }, |
| | | "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "maxUsedJSHeapSizeToReload": 1000, |
| | | "maxUsedJSHeapSizeToReloadInterval": 10000 |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | :root{ |
| | | --module_background:#F1F1F1; |
| | | --x_tab_background:#F4F8FE; |
| | | --x_tab_color:#787878; |
| | | --cms_boxshadow:0px 3px 6px 0px rgba(185, 190, 202, 0.54); |
| | | --elinput: #fff; |
| | | --elinput_border: #fff; |
| | | --elinput_word: #787878; |
| | | --eltable_head: #DBDFE7; |
| | | --eltable_head_middle: #CACDD3; |
| | | --eltable_head_word: #35363B; |
| | | --eltable_body:#fff; |
| | | --eltable_body_word: #8B9CA4; |
| | | --eltable_body_td_border:#E3E6ED; |
| | | --eltable_body_hover:#F4F4F8; |
| | | --eltable_body_border_hover:1px solid #DBDFE7; |
| | | --cms_button_search:#8B9CA4; |
| | | --cms_button_add:#569e58; |
| | | --cms_button_del:#F86B6B; |
| | | --cms_button_change:#8B9CA4; |
| | | --cms_button_change_word:#fff; |
| | | --cms_button_save:#569E58; |
| | | --cms_button_determine:#5A84FF; |
| | | --cms_button_cancel:#D6D6D6; |
| | | --cms_button_cancel_word:#666666; |
| | | --popup_head: #EDEFF0; |
| | | --popup_head_word: #35363B; |
| | | --popup_body_word: #2E2F33; |
| | | --popup_body: #FBFBFB; |
| | | --elselect_empty-block:#fff; |
| | | --el_popper_arrow:#fff; |
| | | --el_popper_word:#3c3d42; |
| | | --el-tag--info:#F0F2F5; |
| | | --el-select__tags-text:#878B93; |
| | | --el-select-dropdown__item_selected:#fff; |
| | | --el-checkbox__label:#606266; |
| | | --el-checkbox__inner:#fff; |
| | | --head_condition_word: #787878; |
| | | --el-picker__popper_border:#E4E7ED; |
| | | --el-date-table-cell:#f2f6fc; |
| | | --el-picker-panel:#606266; |
| | | --el-date_okbutton:#fff; |
| | | --el-date_okbutton_border:#DCDFE6; |
| | | --el-time-spinner__item_hover:#F5F7FA; |
| | | --el-time-spinner__item:#606266; |
| | | --el-time-spinner__item_selected:#000; |
| | | --el-time-panel__footer_cancel:#303133; |
| | | --usermanagement_m_dialog:#F8F8FA; |
| | | --usermanagement_m_dialog_header_word:#000; |
| | | --usermanagement_m_dialog_wrap: #fff; |
| | | --usermanagement_m_wrap_th:#DBDFE7; |
| | | --usermanagement_m_wrap_border:#E3E6ED; |
| | | --usermanagement_m_wrap_body_odd:#F7F8F9; |
| | | --usermanagement_m_wrap_body_even:#F2F2F3; |
| | | --usermanagement_m_wrap_th_color:#3D6EFF; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "MesSuite": { "æµè¯": "test" } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "UI": { |
| | | "éæææ¬": "Static text", |
| | | "æ§å¶æé®": "Control button", |
| | | "æç¤º": "prompt", |
| | | "确认": "confirm", |
| | | "ç¡®å®": "confirm", |
| | | "åæ¶": "cancel", |
| | | "æ°å¼è¾å
¥": "Numerical input", |
| | | "æ°å¼æ¾ç¤º": "Numerical display", |
| | | "è¯»åæ¡": "Read-write frame", |
| | | "跳转æé®": "Jump button", |
| | | "请è¾å
¥è´¦å·": "Please enter the account number.", |
| | | "请è¾å
¥å¯ç ": "Please enter password", |
| | | "ç»å½": "Log in", |
| | | "å¼¹çªæé®": "Popover button", |
| | | "ç»å½æ¥å¿": "Entry diary", |
| | | "è®¾å¤æ¥å¿": "Equipment diary", |
| | | "æ¨¡åæ¥å¿": "Module diary", |
| | | "æä½æ¶é´": "Operating time", |
| | | "请è¾å
¥å
³é®è¯": "Please enter keywords", |
| | | "æ¥è¯¢": "Search", |
| | | "æä½è
": "operator", |
| | | "æä½æè¿°": "Operation description", |
| | | "æä½è®¾å¤": "Operating equipment", |
| | | "è¯·éæ©æä½è®¾å¤": "Select the operating device", |
| | | "ä¸é": "unlimited", |
| | | "æä½åç»": "Operation grouping", |
| | | "æä½å¯¹è±¡": "Operating object", |
| | | "æ°æ®å·²å
¨é¨å è½½å®æ": "All data has been loaded", |
| | | "ç¨æ·æ²¡æè¯¥æéï¼": "The user does not have this permission!", |
| | | "ææ æ°æ®ï¼æ æ³å¯¼åº": "No data yet, cannot export", |
| | | "æä½æ¨¡å": "Operation module", |
| | | "è¯·éæ©æä½æ¨¡å": "Please select the operation module", |
| | | "æä½ç±»å": "Operating type", |
| | | "ç¨æ·ç®¡ç": "User management", |
| | | "è§è²ç®¡ç": "Role management", |
| | | "å§å": "name", |
| | | "å¯ç ": "password", |
| | | "ç¨æ·å": "User name", |
| | | "ç»ç»æ¶æ": "Organizational structure", |
| | | "ç¨æ·æé": "User authority", |
| | | "æä½": "operation", |
| | | "æéæ¥ç": "Permission view", |
| | | "å¯ç éç½®": "Password reset", |
| | | "ä¿®æ¹": "modify", |
| | | "å é¤": "delete", |
| | | "导å
¥æå": "Import successfully", |
| | | "ææ æ°æ®å¯¼åº": "No data has been exported yet", |
| | | "ä¿®æ¹ç¨æ·": "Modify user", |
| | | "æ¯å¦ç¡®è®¤å é¤ï¼": "Do you want to delete it?", |
| | | "å 餿åï¼": "Deleted successfully!", |
| | | "æ·»å ç¨æ·": "Add a user", |
| | | "ä¿®æ¹æå": "Modified successfully", |
| | | "è§è²åç§°": "Role name", |
| | | "夿³¨": "remarks", |
| | | "æé设置": "Permission setting", |
| | | "æ·»å è§è²": "Add a role", |
| | | "ä¿®æ¹è§è²": "Modify the role", |
| | | "æ·»å æå": "Add successfully", |
| | | "ä¿åæå": "Save successfully", |
| | | "请è¾å
¥å§å": "Please enter the name", |
| | | "请è¾å
¥ç¨æ·å": "Please enter the user name", |
| | | "è¯·éæ©ç»ç»æ¶æ": "Select an organization structure", |
| | | "è¯·éæ©ç¨æ·æé": "Please select user permissions", |
| | | "å§åä¸è½ä¸ºç©º": "The name cannot be empty", |
| | | "ç¨æ·åä¸è½ä¸ºç©º": "The user name cannot be empty", |
| | | "å¯ç ä¸è½ä¸ºç©º": "The password cannot be empty", |
| | | "请è¾å
¥è§è²åç§°": "Please enter a role name", |
| | | "请è¾å
¥å¤æ³¨": "Please enter remarks", |
| | | "è§è²åç§°ä¸è½ä¸ºç©º": "The role name cannot be empty", |
| | | "ä¿å": "save", |
| | | "è¿å": "return", |
| | | "ç»é¢åç§°": "Screen name", |
| | | "å¾éå
许访é®çç»é¢æäºçº§èåï¼æªå¾éçå
容éèä¸å±ç¤º": "Check the screen or secondary menu to allow access, and hide the unchecked content", |
| | | "æä½å
容": "Operation content", |
| | | "å¾éå
许æä½çæé®ï¼æªå¾éçå
容ç¦ç¨æä½äºä»¶": "Select the Allow action button and disable action events for unselected content", |
| | | "å
¨é": "select all", |
| | | "æ°å¯ç ": "New password", |
| | | "请è¾å
¥æ°å¯ç ": "Please enter a new password", |
| | | "确认å¯ç ": "Confirm password", |
| | | "è¯·åæ¬¡è¾å
¥æ°å¯ç ": "Please enter the new password again", |
| | | "两次å¯ç ä¸ä¸è´": "Two passwords do not match", |
| | | "è¯·éæ©": "Please select", |
| | | "导åº": "Export", |
| | | "æä»¶å¯¼åºä¸": "File export", |
| | | "åå°å è½½": "Background loading", |
| | | "请è¾å
¥ææ¬åå¼": "Please enter text and values", |
| | | "模ç³å¹é
": "Fuzzy matching", |
| | | "ç²¾åå¹é
": "Precise matching", |
| | | "åºå·": "No.", |
| | | "æ¡/页": "/page", |
| | | "å
±": "total", |
| | | "æ¡æ°æ®": " ", |
| | | "个人信æ¯": "Personal information", |
| | | "ä¿®æ¹å¯ç ": "Change password", |
| | | "éåºç»å½": "Log out", |
| | | "éåºç³»ç»": "Exit system", |
| | | "å
¨å±": "Full screen", |
| | | "éåºå
¨å±": "Exit full screen", |
| | | "åå¯ç ": "Original password", |
| | | "请è¾å
¥åå¯ç ": "Please enter the old password", |
| | | "åºå缩æ¾": "Zone scaling", |
| | | "åºå缩æ¾è¿å": "Zone scaling restore", |
| | | "导åºä¸ºExcel": "Export to Excel", |
| | | "导åºä¸ºå¾ç": "Export to picture", |
| | | "è´¦å·ä¸è½ä¸ºç©ºï¼": "The account cannot be empty!", |
| | | "å¯ç ä¸è½ä¸ºç©ºï¼": "The password cannot be empty!", |
| | | "ç»å½è´¦å·": "Login account", |
| | | "æ æéæ¥ç": "View without permission", |
| | | "å¯ç ä¿®æ¹æåï¼è¯·éæ°ç»å½": "The password is changed successfully. Please log in again", |
| | | "å¯ç ä¿®æ¹å¤±è´¥": "Password change failed", |
| | | "è·éç³»ç»": "Follow system", |
| | | "å¿«æ·é¡¹": "shortcut", |
| | | "ä»å¤©": "Today", |
| | | "æ¨å¤©": "Lastday", |
| | | "è¿3天": "Last 3 days", |
| | | "è¿7天": "Last week", |
| | | "è¿30天": "Last month", |
| | | "è¿90天": "Last 3 months", |
| | | "è¿180天": "Last 6 months", |
| | | "è¿360天": "Last year", |
| | | "ä¸å失败": "Delivery failure", |
| | | "ç»å½å·²å¤±æ": "The login has failed", |
| | | "ç¦æ¢è®¿é®": "Access denied", |
| | | "æ¯å¦éæ°ç»å½": "Whether to log back on", |
| | | "请æ±åºé": "An error occurred in the request", |
| | | "ææ æ°æ®": "No data", |
| | | "å½åç»é¢ä¸å¯å¯¼åº": "The current screen can not be exported as a", |
| | | "æå°åå¤ä¸": "Print Ready", |
| | | "å½åç»é¢ä¸å¯å¯¼åºå
³èå¾è¡¨": "The association diagram can not be exported from the current screen", |
| | | "宿¶æå¡": "Real-time service", |
| | | "åéæå¡": "Variable service", |
| | | "è¿æ¥å·²æå¼ï¼éæ°è¿æ¥ä¸": "disconnected, reconnectings", |
| | | "è¿æ¥æå": "Connection successful", |
| | | "è¿æ¥å¤±è´¥": "The connection failed", |
| | | "è¿æ¥å·²æå¼": "The connection has been disconnected", |
| | | "éæ°è¿æ¥æå": "Reconnection successful", |
| | | "såéè¯": "s try again", |
| | | "æ£æµå°äºä»¶æ§è¡å¡æ»ï¼è¯·æ£æ¥é»è¾éæ°é
ç½®": "Event execution jam detected. Check for logical reconfiguration", |
| | | "äºä»¶é
ç½®æè¯¯": "The event is misconfigured", |
| | | "å
³æº": " power off", |
| | | "æ¯å¦å
³é软件并å
³æºï¼": "Shut down the software and power down?", |
| | | "æ¯å¦å
³é软件ï¼": "Shut down the software?", |
| | | "èæé®ç": "virtual keyboard", |
| | | "èªå¨å¼å¯": "auto open", |
| | | "èªå¨å
³é": "auto close", |
| | | "å
³èåé": "Associative variable", |
| | | "设å¤": "Equipment", |
| | | "åéç»": "Variable Group", |
| | | "æ°æ®ç±»å": "Data Type", |
| | | "请è¾å
¥åéåæåéæè¿°å
³é®è¯": "enter variable name or variable description keyword", |
| | | "æ¥çéä¸": "View selected", |
| | | "æ¸
é¤": "Clear", |
| | | "åéå": "Variable name", |
| | | "åéæè¿°": "Variable description", |
| | | "å°å": "Address", |
| | | "确认并é
ç½®ä¸ä¸é¡¹": "Next", |
| | | "äºè¿å¶åé": "Binary variable", |
| | | "æç¬¦å·8使´å": "Signed 8-bit integer", |
| | | "æ 符å·8使´å": "unsigned 8-bit integer", |
| | | "æç¬¦å·16使´å": "signed 16-bit integer", |
| | | "æ 符å·16使´å": "unsigned 16-bit integer", |
| | | "æç¬¦å·32使´å": "signed 32-bit integer", |
| | | "æ 符å·32使´å": "unsigned 32-bit integer", |
| | | "æç¬¦å·64使´å": "Signed 64-bit integer", |
| | | "æ 符å·64使´å": "Unsigned 64-bit integer", |
| | | "F32使µ®ç¹æ°IEEE754": "F32-bit floating-point number IEEE 754", |
| | | "F64使µ®ç¹æ°IEEE754": "F64-bit floating-point number IEEE 754", |
| | | "æ¥æ": "Date", |
| | | "æ¶é´": "Time", |
| | | "æ¥ææ¶é´": "Date time", |
| | | "å符串": "String", |
| | | "宽å符串": "Wide String", |
| | | "ææ¬åé8ä½å符é": "Text variable 8-bit character set", |
| | | "ææ¬åé16ä½å符é": "Text variable 16-bit character set", |
| | | "宿¶å¨": "Timer", |
| | | "请å
å¾éæ°æ®": "please check the data first", |
| | | "å·²é
ç½®å°æå䏿¡æ°æ®": "configured to last piece of data", |
| | | "å
é¨åé": "Internal variables", |
| | | "ç³»ç»åé": "System variables", |
| | | "ç³»ç»å½åæ¥ææ¶é´": "System current date time", |
| | | "ç³»ç»å½åæ¥æ": "System current date", |
| | | "ç³»ç»å½åæ¶é´": "System current time", |
| | | "ç³»ç»å½åçæ¬¡": "System current shift", |
| | | "ç³»ç»å½åçæ¬¡æ¥æ": "System current shift date", |
| | | "åºé´": "Interval", |
| | | "ä¸ä¸ºç©º": "Non-null", |
| | | "为空": "Null", |
| | | "æ°å¼": "Numerical", |
| | | "çéæ¡ä»¶å·²è¢«éå®ï¼æ æ³ä¿®æ¹": "The filter is locked and cannot be modified", |
| | | "é¦é¡µ": "First page", |
| | | "ä¸ä¸é¡µ": "Previous page", |
| | | "ä¸ä¸é¡µ": "Next page", |
| | | "æ«é¡µ": "Last page", |
| | | "æäº¤": "Submit", |
| | | "æ°æ®æ ¡éª": "Data verification", |
| | | "æ´æ°æ°æ®": "Update data", |
| | | "æå
¥è®°å½": "Insert record", |
| | | "å é¤è®°å½": "Delete record", |
| | | "ä¿®æ¹è®°å½": "Modification record", |
| | | "åªå": "Cut", |
| | | "å¤å¶": "Copy", |
| | | "ç²è´´": "Paste", |
| | | "å
¨é¨": "All", |
| | | "æ ¼å¼": "Style", |
| | | "å
容": "Content", |
| | | "æ§ä»¶": "Control", |
| | | "å é¤è¡": "delete row", |
| | | "å é¤å": "delete column", |
| | | "å é¤åå
æ ¼ï¼å³ä¾§åå
æ ¼å·¦ç§»": "delete cell, the cell on the right moves left", |
| | | "å é¤åå
æ ¼ï¼ä¸ä¾§åå
æ ¼ä¸ç§»": "delete cell, the cell below moves up", |
| | | "éå°åå¹¶åå
æ ¼ï¼æä½ä¸æåï¼è¯·åæ¶åå¹¶åéè¯": "When encountering a merged cell, the operation is not successful. Please cancel the merge and try again" |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "theme":"back" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "theme":"white" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | :root{ |
| | | --module_background:#101010; |
| | | --elselect_time: #1F1F23; |
| | | --head_condition_word: #C5C4C4; |
| | | --head_condition_search_button:#5A84FF; |
| | | --elinput: #3D3D3D; |
| | | --elinput_border: #3D3D3D; |
| | | --elinput_word: #ffffff; |
| | | --eltable_head: #303640; |
| | | --eltable_body:#1F1F23; |
| | | --eltable_head_middle: #CACDD3; |
| | | --eltable_head_word: #FFFFFF; |
| | | --eltable_body_word: #DBDBDB; |
| | | --eltable_body_td_border:#2B2B2E; |
| | | --elbutton_usermanagement_table_button:#3D3D44; |
| | | --elbutton_usermanagement_table_button_word:#fff; |
| | | --query_button: #020203; |
| | | --query_button_word: #5A84FF; |
| | | --popup_head: #292A2E; |
| | | --popup_head_word: #ffffff; |
| | | --popup_body_word: #2E2F33; |
| | | --popup_body: #2E2F33; |
| | | --elselect_selected: #2F71EE; |
| | | --elselect_word: #ffffff; |
| | | --eltree_selected: #252D46; |
| | | --eltree_selected_border: #5A84FF; |
| | | --popup_cancel_button: #3E3F44; |
| | | --popup__button_determine: #3D6EFF; |
| | | --eltree_word: #fff; |
| | | --eltree: #252529; |
| | | --el-select__popper:#202124; |
| | | --elbutton_popup_cancel:#3E3F44; |
| | | --elbutton_popup_cancel_word:#fff; |
| | | --el-fill-color-light: #252D46 !important; |
| | | --el-text-color-regular:#fff !important; |
| | | --el-color-white: #252D46 !important; |
| | | --el-fill-color: #2D3858 !important; |
| | | --el-color-info: #2F71EE !important; |
| | | --usermanagement_m_dialog:#303640; |
| | | --usermanagement_m_dialog_header_word:#fff; |
| | | --usermanagement_m_dialog_wrap: #000; |
| | | --el-fill-color-light: #35353B !important; |
| | | --usermanagement_m_wrap_th:#38383E; |
| | | --usermanagement_m_wrap_border:#2B2B2E; |
| | | --usermanagement_m_wrap_body_odd:#1F1F23; |
| | | --usermanagement_m_wrap_body_even:#29292E; |
| | | --usermanagement_m_wrap_th_color:#fff; |
| | | --elpopper_word:#fff !important; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | ["/widgets/mock/index.js"] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | export default { |
| | | is: 'Test', |
| | | name: 'æµè¯', |
| | | category: 'test', |
| | | canvasView: function () { |
| | | return 'yes' |
| | | }, |
| | | settingsView: function () { |
| | | return 'ok' |
| | | }, |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | css卿åéåç¼å -- |
| | | --module_background è¿è¡æ¨¡åèæ¯é¢è² |
| | | --elselect_time:element uiçæ¶é´ä¸ææ¡é¢è² |
| | | --elselect_time_middleï¼ element uiçæ¶é´æ§ä»¶ä¸é´ç'-'é¢è² |
| | | --elinput:element uiçè¾å
¥æ¡é¢è² |
| | | --elinput_word:element uiçè¾å
¥æ¡æåçé¢è² |
| | | --eltable_head:element uiç表头çé¢è² |
| | | --head_condition_word:è¿è¡æ¨¡åæç´¢æ¡ä»¶æåçé¢è² |
| | | --eltable_head_word:element uiç表头æåçé¢è² |
| | | --eltable_body_word:element uiçè¡¨æ ¼æåçé¢è² |
| | | --query_button:æ¥è¯¢æé®çé¢è² |
| | | --query_button_word:æ¥è¯¢æé®æåçé¢è² |
| | | --popup_head:å¼¹çªæ é¢çé¢è² |
| | | --popup_head_word:å¼¹çªæ 颿åçé¢è² |
| | | --popup_body:å¼¹çªå
容çé¢è² |
| | | --popup_body_word:å¼¹çªå
容çæåé¢è² |
| | | --elselect_selected: element ui䏿æ¡éä¸çé¢è² |
| | | --elselect_word:element uiä¸ææ¡æåçé¢è² |
| | | --eltree_selectedï¼element uiæ éä¸çé¢è² |
| | | --eltree_selected_border:element uiæ éä¸è¾¹æ¡çé¢è² |
| | | --popup_cancel_button:å¼¹çªåæ¶æé®çé¢è² |
| | | --popup__button_determineå¼¹çªç¡®å®æé®çé¢è² |
| | | --eltree_word:element uiæ æåçé¢è² |
| | | --eltree:element ui treeçé¢è² |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const { glob } = require('glob') |
| | | const { readFileSync, writeFileSync, ensureDirSync } = require('fs-extra') |
| | | const { resolve } = require('path') |
| | | const regExp = /export default [\s\S]*?;/ |
| | | const regExpObj = /\{[\s\S]*?;/ |
| | | const babel = require('@babel/core') |
| | | const pkg = require('../package.json') |
| | | const isWin = process.platform === 'win32' |
| | | |
| | | /** |
| | | * æ ¹æ®widgetsä¸çç»ä»¶ï¼èªå¨çæèåæ°æ®ï¼ç¨äºå¯¹å¤å¼ç¨ |
| | | */ |
| | | async function start() { |
| | | const tsFiles = await glob(resolve(process.cwd(), 'src/widgets/*/index.ts'), { |
| | | ignore: 'node_modules/**', |
| | | windowsPathsNoEscape: true, |
| | | }) |
| | | |
| | | const menu = [] |
| | | const menuMap = {} |
| | | const errorKey = ' is not defined' |
| | | |
| | | tsFiles.forEach((filePath) => { |
| | | const spl = !isWin ? filePath.split('/') : filePath.split('\\') |
| | | |
| | | const patchName = spl[spl.length - 2] |
| | | const file = readFileSync(filePath, { encoding: 'utf8' }) |
| | | const { code } = babel.transformSync(file) |
| | | const exportDefaultRegion = code.match(regExp) |
| | | const exportDefaultContent = exportDefaultRegion[0] |
| | | if (exportDefaultContent) { |
| | | const v = exportDefaultContent.match(regExpObj) |
| | | const canvasView = exportDefaultContent.match(/canvasView: ([^,]+),/) |
| | | let canvasViewValue = canvasView ? canvasView[0] : '' |
| | | canvasViewValue = !canvasViewValue.includes(')') |
| | | ? canvasViewValue.replace(',', '),') |
| | | : canvasViewValue |
| | | |
| | | const c = v[0].replace(canvasViewValue, '') |
| | | let setViewMatch = c.match(/settingsView:\s*(.*?)(?=\s*[,}])/) |
| | | let newCode = '' |
| | | if (setViewMatch[0]) { |
| | | newCode = c.replace(setViewMatch[0], '').replace(';', '') |
| | | } |
| | | if (newCode.includes('canvasView')) { |
| | | newCode = newCode.replace( |
| | | /canvasView\s*:\s*.*?(\{.*?\}|\(.*?\)|[^\s,]+)\s*,?\s*(?=\n|$)/gs, |
| | | '' |
| | | ) |
| | | } |
| | | |
| | | const codeRun = (code) => { |
| | | const fn = new Function(`return ${code}`) |
| | | const widgetInfo = fn() |
| | | const row = { |
| | | name: widgetInfo.name, |
| | | path: `/${pkg.name}/` + patchName, |
| | | patchName: patchName, |
| | | |
| | | icon: widgetInfo.icon, |
| | | notPage: !!widgetInfo.notPage, |
| | | } |
| | | menu.push(row) |
| | | menuMap[patchName] = row |
| | | } |
| | | try { |
| | | codeRun(newCode) |
| | | } catch (error) { |
| | | if (error.message.includes(errorKey)) { |
| | | const iconKey = error.message.split(errorKey) |
| | | if (iconKey.length > 1) { |
| | | const iconName = iconKey[0] |
| | | const code = newCode.replaceAll(iconName, `"${iconName}"`) |
| | | codeRun(code) |
| | | } |
| | | } else { |
| | | console.error(error.message) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | const data = `export const menu: Record<string,any>[] = ${JSON.stringify( |
| | | menu, |
| | | null, |
| | | 2 |
| | | )};\nexport const menuMap: Record<string,any> = ${JSON.stringify( |
| | | menuMap, |
| | | null, |
| | | 2 |
| | | )};` |
| | | // çæmenu JSON å°build.prod |
| | | // const buildInfo = readFileSync(resolve(process.cwd(), '.build'), { |
| | | // encoding: 'utf-8', |
| | | // }) |
| | | // const recoveryWidget = buildInfo.split('\n') |
| | | ensureDirSync(resolve(process.cwd(), './src/config/')) |
| | | writeFileSync(resolve(process.cwd(), './src/config/menu.ts'), data, { |
| | | encoding: 'utf-8', |
| | | }) |
| | | |
| | | // const widgets = menu |
| | | // .map((item) => item.patchName) |
| | | // .filter((name) => !recoveryWidget.includes(name)) |
| | | // writeFileSync(resolve(process.cwd(), '.build.prod'), widgets.join('\n'), { |
| | | // encoding: 'utf-8', |
| | | // }) |
| | | } |
| | | const startTime = performance.now() |
| | | |
| | | start() |
| | | |
| | | console.log('æ§è¡æ¶é´: ', Math.ceil(performance.now() - startTime), 'ms') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const { writeFileSync, rmSync } = require('fs') |
| | | const { spawn } = require('node:child_process') |
| | | const { globSync } = require('glob') |
| | | const path = require('path') |
| | | |
| | | let isSingleBuild = false |
| | | const isWin = process.platform === 'win32' |
| | | const argvPath = './script/.argv' |
| | | const widgetName = process.argv[process.argv.length - 1] |
| | | const widgetsPath = globSync(`./src/widgets/*/index.ts`) |
| | | const getWidgetNames = widgetsPath.map((file) => { |
| | | const parts = isWin |
| | | ? path.resolve(file).split('\\') |
| | | : path.resolve(file).split('/') |
| | | return parts[parts.length - 2] |
| | | }) |
| | | |
| | | if (getWidgetNames.includes(widgetName)) { |
| | | isSingleBuild = true |
| | | writeFileSync(argvPath, widgetName) |
| | | } |
| | | |
| | | const run = spawn(process.platform === 'win32' ? 'npm.cmd' : 'npm', [ |
| | | 'run', |
| | | 'build-lib', |
| | | ]) |
| | | |
| | | run.stdout.on('data', (data) => console.info(data.toString('utf8'))) |
| | | |
| | | run.stderr.on('data', (data) => console.info(data.toString('utf8'))) |
| | | |
| | | run.on('close', (code) => { |
| | | if (code == 0 && isSingleBuild) rmSync(argvPath) |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import path from 'path' |
| | | const isWin = process.platform === 'win32' |
| | | const fileRegex = /\.(ts)$/ |
| | | const basePath = path.resolve(process.cwd(), './src/widgets') |
| | | // @ts-ignore |
| | | const filePath = isWin ? basePath.replaceAll('\\', '/') : basePath |
| | | const regex = new RegExp(`${filePath}/([^/]*)/index.ts`) |
| | | /** |
| | | * æåå
³é®å符 |
| | | * @param {*} code |
| | | * @returns |
| | | */ |
| | | const parseCode = (code) => { |
| | | const importRegion = code.match(/import[^]*?("|')(.*?)\1;/g) |
| | | const exportDefaultRegion = code.match(/export default [\s\S]*?;/) |
| | | const canvasView = code.match(/canvasView: ([^,]+),/) |
| | | const canvasViewValue = canvasView ? canvasView[1] : '' |
| | | |
| | | const imports = importRegion ? importRegion.join('\n') : '' |
| | | const exportDefault = exportDefaultRegion ? exportDefaultRegion[0] : '' |
| | | |
| | | return { imports, exportDefault, canvasView: canvasView[0], canvasViewValue } |
| | | } |
| | | |
| | | /** |
| | | * åå¹¶å¤ç代ç |
| | | * @param {*} param0 |
| | | * @param {*} originCode |
| | | */ |
| | | const mergeCodeString = ( |
| | | { imports, exportDefault, canvasView, canvasViewValue }, |
| | | originCode |
| | | ) => { |
| | | const code = `${imports}\n${exportDefault}` |
| | | if ( |
| | | canvasView.includes('provider(') && |
| | | originCode.includes('provider/index') |
| | | ) { |
| | | return code |
| | | } |
| | | |
| | | const providerCode = 'import { provider } from "@/provider/index";' |
| | | |
| | | const exportDefaultCode = exportDefault.replace( |
| | | canvasView, |
| | | `canvasView: provider(${canvasViewValue}),` |
| | | ) |
| | | return `${imports}\n${providerCode}\n${exportDefaultCode}` |
| | | } |
| | | |
| | | export default function VitePluginWidgetProvider(): any { |
| | | return { |
| | | name: 'vite-plugin-widget-provider', |
| | | apply: 'build', |
| | | |
| | | transform(code, id) { |
| | | if (fileRegex.test(id)) { |
| | | if (regex.test(id)) { |
| | | const codeData = parseCode(code) |
| | | const transformCode = mergeCodeString(codeData, code) |
| | | return { |
| | | code: transformCode, |
| | | map: null, // 妿å¯è¡å°æä¾ source map |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="cs-main"> |
| | | <div class="cs-menu-left" v-if="showMenu"> |
| | | <el-config-provider :namespace="namespace" :z-index="500" :locale="local"> |
| | | <Menu @change="onChangeMenu" /> |
| | | </el-config-provider> |
| | | </div> |
| | | <div |
| | | class="cs-tools-box" |
| | | @click="onClickToolBox" |
| | | :style="{ left: showMenu ? '' : '5px' }" |
| | | > |
| | | <Icon |
| | | :icon="showMenu ? 'left-arrow' : 'right-arrow'" |
| | | :width="18" |
| | | :height="18" |
| | | ></Icon> |
| | | </div> |
| | | <div class="cs-container" :style="!showMenu ? 'width: 100%' : ''"> |
| | | <provider :isApp="true"> |
| | | <router-view v-bind="currentWidgetProps" /> |
| | | </provider> |
| | | <el-config-provider :namespace="namespace" :z-index="500" :locale="local"> |
| | | <div class="project-config"> |
| | | <IconButton @click="onOpenProjectConfig" icon="lightsetting" |
| | | >项ç®é
ç½®</IconButton |
| | | > |
| | | </div> |
| | | <div class="language"> |
| | | <BaseConfigSelect /> |
| | | </div> |
| | | <ProjectConfigDialog v-model="projectConfig.show" /> |
| | | </el-config-provider> |
| | | </div> |
| | | <div |
| | | class="cs-bar-box" |
| | | @click="onClickBarBox" |
| | | :style="{ right: showBar ? '' : '5px' }" |
| | | v-if="showAction" |
| | | > |
| | | <Icon |
| | | :icon="showBar ? 'right-arrow' : 'left-arrow'" |
| | | :width="18" |
| | | :height="18" |
| | | ></Icon> |
| | | </div> |
| | | <div class="right-bar" v-if="showBar"> |
| | | <component |
| | | :is="currentWidgetSettings" |
| | | v-bind="state" |
| | | @update="onUpdate" |
| | | ></component> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { |
| | | computed, |
| | | onMounted, |
| | | ref, |
| | | watch, |
| | | provide, |
| | | markRaw, |
| | | reactive, |
| | | } from 'vue' |
| | | import provider from './provider/index.vue' |
| | | import Menu from '@/components/Menu/index.vue' |
| | | import sdk from 'sdk' |
| | | import Icon from '@/components/Icon/Icon' |
| | | import BaseConfigSelect from '@/components/BaseConfigSelect/BaseConfigSelect' |
| | | import { useRoute } from 'vue-router' |
| | | import { state } from '@/libs/Store/State' |
| | | import IconButton from '@/components/IconButton/IconButton' |
| | | import ProjectConfigDialog from '@/components/ProjectConfig/ProjectConfig' |
| | | |
| | | const { models } = sdk |
| | | const { Language } = models |
| | | const { local } = Language.useElementPlusI18n() |
| | | const route = useRoute() |
| | | const namespace = import.meta.env.VITE_APP_NAMESPACE |
| | | const v = localStorage.getItem('showMenu') || 'true' |
| | | const showMenu = ref(v === 'true') |
| | | const showBar = ref(false) |
| | | const showAction = ref(true) |
| | | const currentWidgetSettings = ref() |
| | | const projectConfig = reactive({ |
| | | show: false, |
| | | }) |
| | | provide('isLocal', true) |
| | | |
| | | const onOpenProjectConfig = () => { |
| | | projectConfig.show = true |
| | | } |
| | | /** |
| | | * å³ä¾§Baræ§å¶ |
| | | */ |
| | | const onClickBarBox = async () => { |
| | | if (!currentWidgetSettings.value) { |
| | | await getWidgetSettings() |
| | | showBar.value = !!currentWidgetSettings.value |
| | | } else { |
| | | showBar.value = !showBar.value |
| | | } |
| | | localStorage.setItem('showBar', String(showBar.value)) |
| | | } |
| | | /** |
| | | * 左侧Bar |
| | | */ |
| | | const onClickToolBox = () => { |
| | | showMenu.value = !showMenu.value |
| | | localStorage.setItem('showMenu', showMenu.value ? 'true' : 'false') |
| | | } |
| | | const getWidgetSettingsFile = async (widgetName: string) => { |
| | | const widgetPath = `./widgets/${widgetName}/Settings/${widgetName}.settings` |
| | | const fn = async (suffix: string) => { |
| | | const WidgetSettings = await import(/* @vite-ignore */ widgetPath + suffix) |
| | | currentWidgetSettings.value = markRaw(WidgetSettings.default) |
| | | showAction.value = true |
| | | return currentWidgetSettings.value |
| | | } |
| | | try { |
| | | await fn('.tsx') |
| | | } catch (error) { |
| | | console.log(error, 'error') |
| | | await fn('.vue') |
| | | } |
| | | } |
| | | /** |
| | | * è·åå½åç»ä»¶ |
| | | */ |
| | | const getWidgetSettings = async () => { |
| | | const widgetName = route.meta?.widgetName |
| | | if (!widgetName) { |
| | | showBar.value = false |
| | | return |
| | | } |
| | | |
| | | try { |
| | | // @ts-ignore |
| | | await getWidgetSettingsFile(widgetName) |
| | | } catch (error) { |
| | | console.info( |
| | | `%c è¯·æ£æ¥ ${widgetName}.settingæ¯å¦åå¨ï¼éè¯`, |
| | | 'color: #ec7259' |
| | | ) |
| | | // showAction.value = false |
| | | currentWidgetSettings.value = null |
| | | } |
| | | } |
| | | /** |
| | | * æ´æ°æ°æ®ç¶æ |
| | | * @param data |
| | | */ |
| | | const onUpdate = (data: Record<string, any>) => { |
| | | Object.assign(state.value, data) |
| | | } |
| | | /** |
| | | * èå忢 |
| | | */ |
| | | const onChangeMenu = () => { |
| | | state.value = {} |
| | | showBar.value = false |
| | | localStorage.setItem('showBar', 'false') |
| | | } |
| | | |
| | | /** |
| | | * å½åç»ä»¶å±æ§ç¶æ |
| | | */ |
| | | const currentWidgetProps = computed(() => { |
| | | return { |
| | | ...state.value, |
| | | node: { |
| | | props: { |
| | | ...state.value, |
| | | }, |
| | | }, |
| | | } |
| | | }) |
| | | watch( |
| | | () => route.meta, |
| | | (meta) => { |
| | | const vBar = localStorage.getItem('showBar') || 'true' |
| | | showBar.value = vBar === 'true' |
| | | currentWidgetSettings.value = null |
| | | if (showBar.value) { |
| | | getWidgetSettings() |
| | | } |
| | | } |
| | | ) |
| | | </script> |
| | | |
| | | <style> |
| | | body { |
| | | margin: 0; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | @import url('./assets/iconfont/iconfont.css'); |
| | | |
| | | .cs-tools-box { |
| | | width: 30px; |
| | | height: 30px; |
| | | position: absolute; |
| | | left: 205px; |
| | | bottom: 50px; |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | border: 1px solid #ccc; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | cursor: pointer; |
| | | z-index: 999; |
| | | box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08); |
| | | transition: all 0.3s ease; |
| | | opacity: 0.7; |
| | | &:hover { |
| | | background-color: #dae4ff; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | .cs-main { |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: flex-start; |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | position: relative; |
| | | .cs-bar-box { |
| | | width: 30px; |
| | | height: 30px; |
| | | position: absolute; |
| | | right: 280px; |
| | | bottom: 50px; |
| | | background-color: #fff; |
| | | border-radius: 5px; |
| | | border: 1px solid #ccc; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | cursor: pointer; |
| | | z-index: 999; |
| | | box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08); |
| | | transition: all 0.3s ease; |
| | | opacity: 0.7; |
| | | &:hover { |
| | | background-color: #dae4ff; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | .right-bar { |
| | | width: 280px; |
| | | height: 100%; |
| | | background-color: #252727; |
| | | flex-shrink: 0; |
| | | position: relative; |
| | | } |
| | | .cs-menu-left { |
| | | width: 200px; |
| | | height: 100%; |
| | | background-color: #545c64; |
| | | } |
| | | .cs-container { |
| | | width: calc(100% - 200px); |
| | | height: 100%; |
| | | overflow: auto; |
| | | position: relative; |
| | | .language { |
| | | width: fit-content; |
| | | height: fit-content; |
| | | position: absolute; |
| | | right: 30px; |
| | | top: 23px; |
| | | } |
| | | .project-config { |
| | | width: fit-content; |
| | | height: fit-content; |
| | | position: absolute; |
| | | right: 155px; |
| | | top: 23px; |
| | | } |
| | | > div { |
| | | width: 100%; |
| | | height: 1080px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import sdk from 'sdk' |
| | | const { utils } = sdk |
| | | const { request } = utils |
| | | /** |
| | | * 导å
¥æä»¶ |
| | | * @param filter çé |
| | | * @returns |
| | | */ |
| | | export const importFileToService = ( |
| | | url: string, |
| | | formData?: FormData |
| | | ): Promise<{ items: any[]; totalCount: number }> => { |
| | | return request.post(url, formData) |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åºæä»¶ |
| | | * @param filter çé |
| | | * @returns |
| | | */ |
| | | /** |
| | | * å¯¼åº |
| | | * @param data |
| | | * @returns |
| | | */ |
| | | export const exportFileToClient = ( |
| | | url: string, |
| | | params: Record<string, any> |
| | | ) => { |
| | | const str = new URLSearchParams( |
| | | params as unknown as URLSearchParams |
| | | ).toString() |
| | | const p = str ? `?${str}` : '' |
| | | return request.get(url + p, { |
| | | responseType: 'blob', |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import sdk from 'sdk' |
| | | import { ElMessage } from 'element-plus' |
| | | const { request } = sdk.utils |
| | | |
| | | function getProject(tree: any[]) { |
| | | // æ¹ä¾¿è°è¯ |
| | | const projectId = import.meta.env.VITE_APP_PROJECT_ID |
| | | const target = tree.find((e: any) => e.id === projectId) |
| | | if (target) return target |
| | | for (let i = 0; i < tree.length; i++) { |
| | | const item = tree[i] |
| | | if (item.type == 0) { |
| | | if (item.child && item.child.length) { |
| | | return getProject(item.child) |
| | | } |
| | | } else { |
| | | return item |
| | | } |
| | | } |
| | | } |
| | | export const getXProject = async () => { |
| | | const tree: any = await request.get('/api/v1/project/node/tree') |
| | | return tree |
| | | } |
| | | const projectInfo = async (id: string | number = 0) => { |
| | | const info: Record<string, any> = await request.get( |
| | | `/api/v1/project/${id}/info` |
| | | ) |
| | | sessionStorage.setItem('X-Project', info.identifier) |
| | | sessionStorage.setItem('X-Project-Name', info.name) |
| | | } |
| | | export const setXProject = async () => { |
| | | try { |
| | | const tree: any = await request.get('/api/v1/project/node/tree') |
| | | if (tree.length) { |
| | | const project = getProject(tree) |
| | | await projectInfo(project.id) |
| | | return Promise.resolve() |
| | | } else { |
| | | await projectInfo() |
| | | return Promise.resolve() |
| | | } |
| | | } catch (error) { |
| | | console.error(error) |
| | | } |
| | | } |
| | | |
| | | export const postImport = (file: FormData) => { |
| | | return request({ |
| | | url: `/api/v1/zc/productsop/uploadsop`, |
| | | method: 'post', |
| | | contentType: 'multipart/form-data', |
| | | headers: { accept: '*/*' }, |
| | | data: file, |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // @ts-ignore |
| | | import sdk from 'sdk' |
| | | const { utils } = sdk |
| | | const { request } = utils |
| | | |
| | | /** |
| | | * è·å项ç®é
ç½®æä»¶ |
| | | * @param name |
| | | * @returns |
| | | */ |
| | | export const getProjectConfig = (name: string) => { |
| | | return request.get(`/projectApi/env?name=${name}`) |
| | | } |
| | | |
| | | /** |
| | | * å建ç»ä»¶ |
| | | * @param data |
| | | * @returns |
| | | */ |
| | | export const createWidget = (data) => { |
| | | return request.post(`/projectApi/create`, data) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* Logo åä½ */ |
| | | @font-face { |
| | | font-family: "iconfont logo"; |
| | | src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834'); |
| | | src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'), |
| | | url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'), |
| | | url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'), |
| | | url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg'); |
| | | } |
| | | |
| | | .logo { |
| | | font-family: "iconfont logo"; |
| | | font-size: 160px; |
| | | font-style: normal; |
| | | -webkit-font-smoothing: antialiased; |
| | | -moz-osx-font-smoothing: grayscale; |
| | | } |
| | | |
| | | /* tabs */ |
| | | .nav-tabs { |
| | | position: relative; |
| | | } |
| | | |
| | | .nav-tabs .nav-more { |
| | | position: absolute; |
| | | right: 0; |
| | | bottom: 0; |
| | | height: 42px; |
| | | line-height: 42px; |
| | | color: #666; |
| | | } |
| | | |
| | | #tabs { |
| | | border-bottom: 1px solid #eee; |
| | | } |
| | | |
| | | #tabs li { |
| | | cursor: pointer; |
| | | width: 100px; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | text-align: center; |
| | | font-size: 16px; |
| | | border-bottom: 2px solid transparent; |
| | | position: relative; |
| | | z-index: 1; |
| | | margin-bottom: -1px; |
| | | color: #666; |
| | | } |
| | | |
| | | |
| | | #tabs .active { |
| | | border-bottom-color: #f00; |
| | | color: #222; |
| | | } |
| | | |
| | | .tab-container .content { |
| | | display: none; |
| | | } |
| | | |
| | | /* 页é¢å¸å± */ |
| | | .main { |
| | | padding: 30px 100px; |
| | | width: 960px; |
| | | margin: 0 auto; |
| | | } |
| | | |
| | | .main .logo { |
| | | color: #333; |
| | | text-align: left; |
| | | margin-bottom: 30px; |
| | | line-height: 1; |
| | | height: 110px; |
| | | margin-top: -50px; |
| | | overflow: hidden; |
| | | *zoom: 1; |
| | | } |
| | | |
| | | .main .logo a { |
| | | font-size: 160px; |
| | | color: #333; |
| | | } |
| | | |
| | | .helps { |
| | | margin-top: 40px; |
| | | } |
| | | |
| | | .helps pre { |
| | | padding: 20px; |
| | | margin: 10px 0; |
| | | border: solid 1px #e7e1cd; |
| | | background-color: #fffdef; |
| | | overflow: auto; |
| | | } |
| | | |
| | | .icon_lists { |
| | | width: 100% !important; |
| | | overflow: hidden; |
| | | *zoom: 1; |
| | | } |
| | | |
| | | .icon_lists li { |
| | | width: 100px; |
| | | margin-bottom: 10px; |
| | | margin-right: 20px; |
| | | text-align: center; |
| | | list-style: none !important; |
| | | cursor: default; |
| | | } |
| | | |
| | | .icon_lists li .code-name { |
| | | line-height: 1.2; |
| | | } |
| | | |
| | | .icon_lists .icon { |
| | | display: block; |
| | | height: 100px; |
| | | line-height: 100px; |
| | | font-size: 42px; |
| | | margin: 10px auto; |
| | | color: #333; |
| | | -webkit-transition: font-size 0.25s linear, width 0.25s linear; |
| | | -moz-transition: font-size 0.25s linear, width 0.25s linear; |
| | | transition: font-size 0.25s linear, width 0.25s linear; |
| | | } |
| | | |
| | | .icon_lists .icon:hover { |
| | | font-size: 100px; |
| | | } |
| | | |
| | | .icon_lists .svg-icon { |
| | | /* éè¿è®¾ç½® font-size æ¥æ¹å徿 å¤§å° */ |
| | | width: 1em; |
| | | /* 徿 åæåç¸é»æ¶ï¼åç´å¯¹é½ */ |
| | | vertical-align: -0.15em; |
| | | /* éè¿è®¾ç½® color æ¥æ¹å SVG çé¢è²/fill */ |
| | | fill: currentColor; |
| | | /* path å stroke æº¢åº viewBox é¨åå¨ IE ä¸ä¼æ¾ç¤º |
| | | normalize.css ä¸ä¹å
å«è¿è¡ */ |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .icon_lists li .name, |
| | | .icon_lists li .code-name { |
| | | color: #666; |
| | | } |
| | | |
| | | /* markdown æ ·å¼ */ |
| | | .markdown { |
| | | color: #666; |
| | | font-size: 14px; |
| | | line-height: 1.8; |
| | | } |
| | | |
| | | .highlight { |
| | | line-height: 1.5; |
| | | } |
| | | |
| | | .markdown img { |
| | | vertical-align: middle; |
| | | max-width: 100%; |
| | | } |
| | | |
| | | .markdown h1 { |
| | | color: #404040; |
| | | font-weight: 500; |
| | | line-height: 40px; |
| | | margin-bottom: 24px; |
| | | } |
| | | |
| | | .markdown h2, |
| | | .markdown h3, |
| | | .markdown h4, |
| | | .markdown h5, |
| | | .markdown h6 { |
| | | color: #404040; |
| | | margin: 1.6em 0 0.6em 0; |
| | | font-weight: 500; |
| | | clear: both; |
| | | } |
| | | |
| | | .markdown h1 { |
| | | font-size: 28px; |
| | | } |
| | | |
| | | .markdown h2 { |
| | | font-size: 22px; |
| | | } |
| | | |
| | | .markdown h3 { |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .markdown h4 { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .markdown h5 { |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .markdown h6 { |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .markdown hr { |
| | | height: 1px; |
| | | border: 0; |
| | | background: #e9e9e9; |
| | | margin: 16px 0; |
| | | clear: both; |
| | | } |
| | | |
| | | .markdown p { |
| | | margin: 1em 0; |
| | | } |
| | | |
| | | .markdown>p, |
| | | .markdown>blockquote, |
| | | .markdown>.highlight, |
| | | .markdown>ol, |
| | | .markdown>ul { |
| | | width: 80%; |
| | | } |
| | | |
| | | .markdown ul>li { |
| | | list-style: circle; |
| | | } |
| | | |
| | | .markdown>ul li, |
| | | .markdown blockquote ul>li { |
| | | margin-left: 20px; |
| | | padding-left: 4px; |
| | | } |
| | | |
| | | .markdown>ul li p, |
| | | .markdown>ol li p { |
| | | margin: 0.6em 0; |
| | | } |
| | | |
| | | .markdown ol>li { |
| | | list-style: decimal; |
| | | } |
| | | |
| | | .markdown>ol li, |
| | | .markdown blockquote ol>li { |
| | | margin-left: 20px; |
| | | padding-left: 4px; |
| | | } |
| | | |
| | | .markdown code { |
| | | margin: 0 3px; |
| | | padding: 0 5px; |
| | | background: #eee; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | .markdown strong, |
| | | .markdown b { |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .markdown>table { |
| | | border-collapse: collapse; |
| | | border-spacing: 0px; |
| | | empty-cells: show; |
| | | border: 1px solid #e9e9e9; |
| | | width: 95%; |
| | | margin-bottom: 24px; |
| | | } |
| | | |
| | | .markdown>table th { |
| | | white-space: nowrap; |
| | | color: #333; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .markdown>table th, |
| | | .markdown>table td { |
| | | border: 1px solid #e9e9e9; |
| | | padding: 8px 16px; |
| | | text-align: left; |
| | | } |
| | | |
| | | .markdown>table th { |
| | | background: #F7F7F7; |
| | | } |
| | | |
| | | .markdown blockquote { |
| | | font-size: 90%; |
| | | color: #999; |
| | | border-left: 4px solid #e9e9e9; |
| | | padding-left: 0.8em; |
| | | margin: 1em 0; |
| | | } |
| | | |
| | | .markdown blockquote p { |
| | | margin: 0; |
| | | } |
| | | |
| | | .markdown .anchor { |
| | | opacity: 0; |
| | | transition: opacity 0.3s ease; |
| | | margin-left: 8px; |
| | | } |
| | | |
| | | .markdown .waiting { |
| | | color: #ccc; |
| | | } |
| | | |
| | | .markdown h1:hover .anchor, |
| | | .markdown h2:hover .anchor, |
| | | .markdown h3:hover .anchor, |
| | | .markdown h4:hover .anchor, |
| | | .markdown h5:hover .anchor, |
| | | .markdown h6:hover .anchor { |
| | | opacity: 1; |
| | | display: inline-block; |
| | | } |
| | | |
| | | .markdown>br, |
| | | .markdown>p>br { |
| | | clear: both; |
| | | } |
| | | |
| | | |
| | | .hljs { |
| | | display: block; |
| | | background: white; |
| | | padding: 0.5em; |
| | | color: #333333; |
| | | overflow-x: auto; |
| | | } |
| | | |
| | | .hljs-comment, |
| | | .hljs-meta { |
| | | color: #969896; |
| | | } |
| | | |
| | | .hljs-string, |
| | | .hljs-variable, |
| | | .hljs-template-variable, |
| | | .hljs-strong, |
| | | .hljs-emphasis, |
| | | .hljs-quote { |
| | | color: #df5000; |
| | | } |
| | | |
| | | .hljs-keyword, |
| | | .hljs-selector-tag, |
| | | .hljs-type { |
| | | color: #a71d5d; |
| | | } |
| | | |
| | | .hljs-literal, |
| | | .hljs-symbol, |
| | | .hljs-bullet, |
| | | .hljs-attribute { |
| | | color: #0086b3; |
| | | } |
| | | |
| | | .hljs-section, |
| | | .hljs-name { |
| | | color: #63a35c; |
| | | } |
| | | |
| | | .hljs-tag { |
| | | color: #333333; |
| | | } |
| | | |
| | | .hljs-title, |
| | | .hljs-attr, |
| | | .hljs-selector-id, |
| | | .hljs-selector-class, |
| | | .hljs-selector-attr, |
| | | .hljs-selector-pseudo { |
| | | color: #795da3; |
| | | } |
| | | |
| | | .hljs-addition { |
| | | color: #55a532; |
| | | background-color: #eaffea; |
| | | } |
| | | |
| | | .hljs-deletion { |
| | | color: #bd2c00; |
| | | background-color: #ffecec; |
| | | } |
| | | |
| | | .hljs-link { |
| | | text-decoration: underline; |
| | | } |
| | | |
| | | /* 代ç é«äº® */ |
| | | /* PrismJS 1.15.0 |
| | | https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ |
| | | /** |
| | | * prism.js default theme for JavaScript, CSS and HTML |
| | | * Based on dabblet (http://dabblet.com) |
| | | * @author Lea Verou |
| | | */ |
| | | code[class*="language-"], |
| | | pre[class*="language-"] { |
| | | color: black; |
| | | background: none; |
| | | text-shadow: 0 1px white; |
| | | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; |
| | | text-align: left; |
| | | white-space: pre; |
| | | word-spacing: normal; |
| | | word-break: normal; |
| | | word-wrap: normal; |
| | | line-height: 1.5; |
| | | |
| | | -moz-tab-size: 4; |
| | | -o-tab-size: 4; |
| | | tab-size: 4; |
| | | |
| | | -webkit-hyphens: none; |
| | | -moz-hyphens: none; |
| | | -ms-hyphens: none; |
| | | hyphens: none; |
| | | } |
| | | |
| | | pre[class*="language-"]::-moz-selection, |
| | | pre[class*="language-"] ::-moz-selection, |
| | | code[class*="language-"]::-moz-selection, |
| | | code[class*="language-"] ::-moz-selection { |
| | | text-shadow: none; |
| | | background: #b3d4fc; |
| | | } |
| | | |
| | | pre[class*="language-"]::selection, |
| | | pre[class*="language-"] ::selection, |
| | | code[class*="language-"]::selection, |
| | | code[class*="language-"] ::selection { |
| | | text-shadow: none; |
| | | background: #b3d4fc; |
| | | } |
| | | |
| | | @media print { |
| | | |
| | | code[class*="language-"], |
| | | pre[class*="language-"] { |
| | | text-shadow: none; |
| | | } |
| | | } |
| | | |
| | | /* Code blocks */ |
| | | pre[class*="language-"] { |
| | | padding: 1em; |
| | | margin: .5em 0; |
| | | overflow: auto; |
| | | } |
| | | |
| | | :not(pre)>code[class*="language-"], |
| | | pre[class*="language-"] { |
| | | background: #f5f2f0; |
| | | } |
| | | |
| | | /* Inline code */ |
| | | :not(pre)>code[class*="language-"] { |
| | | padding: .1em; |
| | | border-radius: .3em; |
| | | white-space: normal; |
| | | } |
| | | |
| | | .token.comment, |
| | | .token.prolog, |
| | | .token.doctype, |
| | | .token.cdata { |
| | | color: slategray; |
| | | } |
| | | |
| | | .token.punctuation { |
| | | color: #999; |
| | | } |
| | | |
| | | .namespace { |
| | | opacity: .7; |
| | | } |
| | | |
| | | .token.property, |
| | | .token.tag, |
| | | .token.boolean, |
| | | .token.number, |
| | | .token.constant, |
| | | .token.symbol, |
| | | .token.deleted { |
| | | color: #905; |
| | | } |
| | | |
| | | .token.selector, |
| | | .token.attr-name, |
| | | .token.string, |
| | | .token.char, |
| | | .token.builtin, |
| | | .token.inserted { |
| | | color: #690; |
| | | } |
| | | |
| | | .token.operator, |
| | | .token.entity, |
| | | .token.url, |
| | | .language-css .token.string, |
| | | .style .token.string { |
| | | color: #9a6e3a; |
| | | background: hsla(0, 0%, 100%, .5); |
| | | } |
| | | |
| | | .token.atrule, |
| | | .token.attr-value, |
| | | .token.keyword { |
| | | color: #07a; |
| | | } |
| | | |
| | | .token.function, |
| | | .token.class-name { |
| | | color: #DD4A68; |
| | | } |
| | | |
| | | .token.regex, |
| | | .token.important, |
| | | .token.variable { |
| | | color: #e90; |
| | | } |
| | | |
| | | .token.important, |
| | | .token.bold { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .token.italic { |
| | | font-style: italic; |
| | | } |
| | | |
| | | .token.entity { |
| | | cursor: help; |
| | | } |
HIAWms/web/src/assets/iconfont/demo_index.html
HIAWms/web/src/assets/iconfont/iconfont.css
HIAWms/web/src/assets/iconfont/iconfont.eot
HIAWms/web/src/assets/iconfont/iconfont.js
HIAWms/web/src/assets/iconfont/iconfont.json
HIAWms/web/src/assets/iconfont/iconfont.svg
HIAWms/web/src/assets/iconfont/iconfont.ttf
HIAWms/web/src/assets/iconfont/iconfont.woff
HIAWms/web/src/assets/iconfont/iconfont.woff2
HIAWms/web/src/assets/images/+.png
HIAWms/web/src/assets/images/X.png
HIAWms/web/src/assets/images/add-annex.png
HIAWms/web/src/assets/images/add-p.png
HIAWms/web/src/assets/images/banben.png
HIAWms/web/src/assets/images/batch-b.png
HIAWms/web/src/assets/images/batch-list.png
HIAWms/web/src/assets/images/chart.png
HIAWms/web/src/assets/images/close.png
HIAWms/web/src/assets/images/closeDark.png
HIAWms/web/src/assets/images/close_x.png
HIAWms/web/src/assets/images/copy.png
HIAWms/web/src/assets/images/d.png
HIAWms/web/src/assets/images/del.png
HIAWms/web/src/assets/images/delete.png
HIAWms/web/src/assets/images/down.png
HIAWms/web/src/assets/images/drawer_bg.png
HIAWms/web/src/assets/images/edit.png
HIAWms/web/src/assets/images/export.png
HIAWms/web/src/assets/images/f.png
HIAWms/web/src/assets/images/fb.png
HIAWms/web/src/assets/images/fj.png
HIAWms/web/src/assets/images/fnV.png
HIAWms/web/src/assets/images/g.png
HIAWms/web/src/assets/images/gongyiduan.png
HIAWms/web/src/assets/images/icon-module.png
HIAWms/web/src/assets/images/icon.png
HIAWms/web/src/assets/images/icon_add.png
HIAWms/web/src/assets/images/icon_add2.png
HIAWms/web/src/assets/images/icon_del.png
HIAWms/web/src/assets/images/icon_exclamation.png
HIAWms/web/src/assets/images/icon_move.png
HIAWms/web/src/assets/images/icon_next.png
HIAWms/web/src/assets/images/icon_nodata.png
HIAWms/web/src/assets/images/icon_pre.png
HIAWms/web/src/assets/images/icon_process.png
HIAWms/web/src/assets/images/icon_search.png
HIAWms/web/src/assets/images/import.png
HIAWms/web/src/assets/images/in.png
HIAWms/web/src/assets/images/left-arrow.png
HIAWms/web/src/assets/images/lightsetting.png
HIAWms/web/src/assets/images/o.png
HIAWms/web/src/assets/images/out.png
HIAWms/web/src/assets/images/pdf.png
HIAWms/web/src/assets/images/pre_icon.png
HIAWms/web/src/assets/images/procedure-direction.png
HIAWms/web/src/assets/images/process.png
HIAWms/web/src/assets/images/processStep1.png
HIAWms/web/src/assets/images/processStep2.png
HIAWms/web/src/assets/images/processStep3.png
HIAWms/web/src/assets/images/processStep4.png
HIAWms/web/src/assets/images/refresh.png
HIAWms/web/src/assets/images/right-arrow.png
HIAWms/web/src/assets/images/s.png
HIAWms/web/src/assets/images/s_input.png
HIAWms/web/src/assets/images/scale-menu.png
HIAWms/web/src/assets/images/scale.png
HIAWms/web/src/assets/images/search.png
HIAWms/web/src/assets/images/setting.png
HIAWms/web/src/assets/images/settings.png
HIAWms/web/src/assets/images/sop.png
HIAWms/web/src/assets/images/sys.png
HIAWms/web/src/assets/images/tag_close.png
HIAWms/web/src/assets/images/tip.png
HIAWms/web/src/assets/images/up.png
HIAWms/web/src/assets/images/variable.png
HIAWms/web/src/assets/images/view.png
HIAWms/web/src/assets/images/white_search.png
HIAWms/web/src/assets/styles/common.scss
HIAWms/web/src/assets/styles/element.scss
HIAWms/web/src/assets/styles/index.scss
HIAWms/web/src/assets/svg/add.svg
HIAWms/web/src/assets/svg/add1.svg
HIAWms/web/src/assets/svg/barcode.svg
HIAWms/web/src/assets/svg/bianji.svg
HIAWms/web/src/assets/svg/bom.svg
HIAWms/web/src/assets/svg/del.svg
HIAWms/web/src/assets/svg/del1.svg
HIAWms/web/src/assets/svg/f.svg
HIAWms/web/src/assets/svg/field.svg
HIAWms/web/src/assets/svg/flow.svg
HIAWms/web/src/assets/svg/materialManagement.svg
HIAWms/web/src/assets/svg/more.svg
HIAWms/web/src/assets/svg/move.svg
HIAWms/web/src/assets/svg/order.svg
HIAWms/web/src/assets/svg/p.svg
HIAWms/web/src/assets/svg/peifangguanli.svg
HIAWms/web/src/assets/svg/processConfiguration.svg
HIAWms/web/src/assets/svg/prod.svg
HIAWms/web/src/assets/svg/q.svg
HIAWms/web/src/assets/svg/system.svg
HIAWms/web/src/assets/svg/t.svg
HIAWms/web/src/assets/svg/tip.svg
HIAWms/web/src/assets/svg/title.svg
HIAWms/web/src/cms/index.css
HIAWms/web/src/cms/sdk.es.js
HIAWms/web/src/cms/sdk.es.ssr.js
HIAWms/web/src/components/BaseConfigSelect/BaseConfigSelect.module.scss
HIAWms/web/src/components/BaseConfigSelect/BaseConfigSelect.tsx
HIAWms/web/src/components/BaseContent/BaseContent.module.scss
HIAWms/web/src/components/BaseContent/BaseContent.tsx
HIAWms/web/src/components/BaseDialog/BaseDialog.scss
HIAWms/web/src/components/BaseDialog/BaseDialog.tsx
HIAWms/web/src/components/BaseDialog/index.vue
HIAWms/web/src/components/BaseDrawer/BaseDrawer.module.scss
HIAWms/web/src/components/BaseDrawer/BaseDrawer.tsx
HIAWms/web/src/components/BaseInput/BaseInput.module.scss
HIAWms/web/src/components/BaseInput/BaseInput.tsx
HIAWms/web/src/components/ConfirmBox/ConfirmBox.module.scss
HIAWms/web/src/components/ConfirmBox/ConfirmBox.tsx
HIAWms/web/src/components/Container/Container.module.scss
HIAWms/web/src/components/Container/Container.tsx
HIAWms/web/src/components/Content/Content.module.scss
HIAWms/web/src/components/Content/Content.tsx
HIAWms/web/src/components/DatePicker/PrefixIcon.vue
HIAWms/web/src/components/DatePicker/index.vue
HIAWms/web/src/components/DateTimePickRange/DateTimePickRange.module.scss
HIAWms/web/src/components/DateTimePickRange/DateTimePickRange.tsx
HIAWms/web/src/components/Dialog/index.vue
HIAWms/web/src/components/DyForm/DyForm.d.ts
HIAWms/web/src/components/DyForm/DyForm.module.scss
HIAWms/web/src/components/DyForm/DyForm.tsx
HIAWms/web/src/components/ElSelect/ElOption.tsx
HIAWms/web/src/components/ElSelect/ElSelect.tsx
HIAWms/web/src/components/ElSelect/index.scss
HIAWms/web/src/components/Empty/Empty.module.scss
HIAWms/web/src/components/Empty/Empty.tsx
HIAWms/web/src/components/Flow/Flow.module.scss
HIAWms/web/src/components/Flow/Flow.tsx
HIAWms/web/src/components/Icon/Icon.tsx
HIAWms/web/src/components/IconButton/IconButton.module.scss
HIAWms/web/src/components/IconButton/IconButton.tsx
HIAWms/web/src/components/Menu/index.vue
HIAWms/web/src/components/MyPages/index.vue
HIAWms/web/src/components/Pdf/index.vue
HIAWms/web/src/components/PreviewDialog/index.vue
HIAWms/web/src/components/ProjectConfig/ProjectConfig.module.scss
HIAWms/web/src/components/ProjectConfig/ProjectConfig.tsx
HIAWms/web/src/components/Radio/Radio.module.scss
HIAWms/web/src/components/Radio/Radio.tsx
HIAWms/web/src/components/Search/Search.module.scss
HIAWms/web/src/components/Search/Search.tsx
HIAWms/web/src/components/SearchInput/SearchInput.module.scss
HIAWms/web/src/components/SearchInput/SearchInput.tsx
HIAWms/web/src/components/Select/Option.tsx
HIAWms/web/src/components/Select/Select.tsx
HIAWms/web/src/components/SelectInput/SelectInput.module.scss
HIAWms/web/src/components/SelectInput/SelectInput.tsx
HIAWms/web/src/components/Setting/Setting.tsx
HIAWms/web/src/components/SettingItem/SettingItem.vue
HIAWms/web/src/components/SettingItem/state.ts
HIAWms/web/src/components/Tab/Tab.module.scss
HIAWms/web/src/components/Tab/Tab.tsx
HIAWms/web/src/components/Tab/TabPane.tsx
HIAWms/web/src/components/Table/Readme.md
HIAWms/web/src/components/Table/Table.tsx
HIAWms/web/src/components/Table/api.ts
HIAWms/web/src/components/Table/components/custom-vxe-column.vue
HIAWms/web/src/components/Table/components/pagination.vue
HIAWms/web/src/components/Table/index.d.ts
HIAWms/web/src/components/Table/index.module.scss
HIAWms/web/src/components/Table/index.scss
HIAWms/web/src/components/Table/index.vue
HIAWms/web/src/components/Table/state.ts
HIAWms/web/src/components/TableFilter/TableFilter.module.scss
HIAWms/web/src/components/TableFilter/TableFilter.tsx
HIAWms/web/src/components/Tag/Tag.module.scss
HIAWms/web/src/components/Tag/Tag.tsx
HIAWms/web/src/components/TdButton/TdButton.module.scss
HIAWms/web/src/components/TdButton/TdButton.tsx
HIAWms/web/src/components/Text/Text.module.scss
HIAWms/web/src/components/Text/Text.tsx
HIAWms/web/src/components/Title/Title.module.scss
HIAWms/web/src/components/Title/Title.tsx
HIAWms/web/src/components/TouchScale/index.vue
HIAWms/web/src/components/Upload/index.vue
HIAWms/web/src/components/Variable/Variable.module.scss
HIAWms/web/src/components/Variable/Variable.tsx
HIAWms/web/src/components/vue3-context-menu/ContextMenu.scss
HIAWms/web/src/components/vue3-context-menu/ContextMenu.vue
HIAWms/web/src/components/vue3-context-menu/ContextMenuDefine.ts
HIAWms/web/src/components/vue3-context-menu/ContextMenuGroup.vue
HIAWms/web/src/components/vue3-context-menu/ContextMenuIconCheck.vue
HIAWms/web/src/components/vue3-context-menu/ContextMenuIconRight.vue
HIAWms/web/src/components/vue3-context-menu/ContextMenuInstance.ts
HIAWms/web/src/components/vue3-context-menu/ContextMenuItem.vue
HIAWms/web/src/components/vue3-context-menu/ContextMenuMutex.ts
HIAWms/web/src/components/vue3-context-menu/ContextMenuSeparator.vue
HIAWms/web/src/components/vue3-context-menu/ContextMenuUtils.ts
HIAWms/web/src/components/vue3-context-menu/ContextSubMenu.vue
HIAWms/web/src/components/vue3-context-menu/ContextSubMenuWrapper.vue
HIAWms/web/src/components/vue3-context-menu/MenuBar.scss
HIAWms/web/src/components/vue3-context-menu/MenuBar.ts
HIAWms/web/src/components/vue3-context-menu/MenuBar.vue
HIAWms/web/src/components/vue3-context-menu/MenuBarIconMenu.vue
HIAWms/web/src/components/vue3-context-menu/env.d.ts
HIAWms/web/src/components/vue3-context-menu/index.ts
HIAWms/web/src/components/vue3-context-menu/shims-vue.d.ts
HIAWms/web/src/components/vue3-context-menu/tsconfig.json
HIAWms/web/src/components/vue3-context-menu/vite.config.ts
HIAWms/web/src/config/menu.ts
HIAWms/web/src/env.d.ts
HIAWms/web/src/home.vue
HIAWms/web/src/hooks/hook.ts
HIAWms/web/src/index.d.ts
HIAWms/web/src/libs/Base/Base.ts
HIAWms/web/src/libs/Create/Create.ts
HIAWms/web/src/libs/Hook/Hook.ts
HIAWms/web/src/libs/Language/Language.ts
HIAWms/web/src/libs/Language/i18n/langEN.ts
HIAWms/web/src/libs/Language/i18n/langTH.ts
HIAWms/web/src/libs/Language/i18n/langZH.ts
HIAWms/web/src/libs/Permission/Permission.d.ts
HIAWms/web/src/libs/Permission/Permission.ts
HIAWms/web/src/libs/Provider/Provider.ts
HIAWms/web/src/libs/Provider/app.ts
HIAWms/web/src/libs/Store/State.ts
HIAWms/web/src/libs/Store/Store.d.ts
HIAWms/web/src/libs/Store/Store.ts
HIAWms/web/src/main.ts
HIAWms/web/src/plugins/vxe-table.ts
HIAWms/web/src/provider/index.ts
HIAWms/web/src/provider/index.vue
HIAWms/web/src/router.ts
HIAWms/web/src/utils/ElMessage.ts
HIAWms/web/src/utils/enum/index.ts
HIAWms/web/src/utils/index.ts
HIAWms/web/src/utils/permission.js
HIAWms/web/src/utils/request.ts
HIAWms/web/src/utils/storage.ts
HIAWms/web/src/widgets/HIAWms/Controllers/File.ts
HIAWms/web/src/widgets/HIAWms/Controllers/Sample.ts
HIAWms/web/src/widgets/HIAWms/Controllers/SampleDrawer.ts
HIAWms/web/src/widgets/HIAWms/Controllers/WmsArea.ts
HIAWms/web/src/widgets/HIAWms/Controllers/WmsAreaDrawer.ts
HIAWms/web/src/widgets/HIAWms/Controllers/WmsContainer.ts
HIAWms/web/src/widgets/HIAWms/Controllers/WmsContainerDrawer.ts
HIAWms/web/src/widgets/HIAWms/Controllers/WmsMaterial.ts
HIAWms/web/src/widgets/HIAWms/Controllers/WmsMaterialDrawer.ts
HIAWms/web/src/widgets/HIAWms/Controllers/WmsPlace.ts
HIAWms/web/src/widgets/HIAWms/Controllers/WmsPlaceDrawer.ts
HIAWms/web/src/widgets/HIAWms/Controllers/WmsStore.ts
HIAWms/web/src/widgets/HIAWms/Controllers/WmsStoreDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/Sample.ts
HIAWms/web/src/widgets/HIAWms/Models/SampleDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/Sample.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/SampleDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/WmsArea.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/WmsAreaDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/WmsContainer.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/WmsContainerDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/WmsMaterial.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/WmsMaterialDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/WmsPlace.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/WmsPlaceDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/WmsStore.ts
HIAWms/web/src/widgets/HIAWms/Models/Service/WmsStoreDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/WmsArea.ts
HIAWms/web/src/widgets/HIAWms/Models/WmsAreaDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/WmsContainer.ts
HIAWms/web/src/widgets/HIAWms/Models/WmsContainerDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/WmsMaterial.ts
HIAWms/web/src/widgets/HIAWms/Models/WmsMaterialDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/WmsPlace.ts
HIAWms/web/src/widgets/HIAWms/Models/WmsPlaceDrawer.ts
HIAWms/web/src/widgets/HIAWms/Models/WmsStore.ts
HIAWms/web/src/widgets/HIAWms/Models/WmsStoreDrawer.ts
HIAWms/web/src/widgets/HIAWms/Views/HIAWms.module.scss
HIAWms/web/src/widgets/HIAWms/Views/HIAWms.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/SampleDrawer/SampleDrawer.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/SampleDrawer/SampleDrawer.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/WmsAreaDrawer/WmsAreaDrawer.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/WmsAreaDrawer/WmsAreaDrawer.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/WmsContainerDrawer/WmsContainerDrawer.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/WmsContainerDrawer/WmsContainerDrawer.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/WmsMaterialDrawer/WmsMaterialDrawer.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/WmsMaterialDrawer/WmsMaterialDrawer.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/WmsPlaceDrawer/WmsPlaceDrawer.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/WmsPlaceDrawer/WmsPlaceDrawer.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/WmsStoreDrawer/WmsStoreDrawer.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/Dialog/WmsStoreDrawer/WmsStoreDrawer.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/Sample/Config.ts
HIAWms/web/src/widgets/HIAWms/Views/Pages/Sample/Sample.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/Sample/Sample.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsArea/Config.ts
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsArea/WmsArea.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsArea/WmsArea.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsContainer/Config.ts
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsContainer/WmsContainer.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsContainer/WmsContainer.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsMaterial/Config.ts
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsMaterial/WmsMaterial.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsMaterial/WmsMaterial.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsPlace/Config.ts
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsPlace/WmsPlace.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsPlace/WmsPlace.tsx
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsStore/Config.ts
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsStore/WmsStore.module.scss
HIAWms/web/src/widgets/HIAWms/Views/Pages/WmsStore/WmsStore.tsx
HIAWms/web/src/widgets/HIAWms/Views/config/Sample.json
HIAWms/web/src/widgets/HIAWms/Views/config/WmsArea.json
HIAWms/web/src/widgets/HIAWms/Views/config/WmsContainer.json
HIAWms/web/src/widgets/HIAWms/Views/config/WmsMaterial.json
HIAWms/web/src/widgets/HIAWms/Views/config/WmsPlace.json
HIAWms/web/src/widgets/HIAWms/Views/config/WmsStore.json
HIAWms/web/src/widgets/HIAWms/enum.ts
HIAWms/web/src/widgets/HIAWms/index.ts
HIAWms/web/src/widgets/HIAWms/type/Type.d.ts
HIAWms/web/src/widgets/hook.ts
HIAWms/web/src/widgets/index.ts
HIAWms/web/tsconfig.json
HIAWms/web/vite.config.ts
HIAWms/web/vite.lib.config.ts
HIAWms/web/yarn.lock |