commit ad8b9ea14383e38a3f1bd1f1ba91e68ddcb61ebb
Author: lvzb <35200379@qq.com>
Date: Fri Sep 22 10:41:43 2023 +0800
添加项目文件。
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..c941e52
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+**/wwwroot/libs/** linguist-vendored
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d166abf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,262 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# API
+src/API.Web/Logs/*
+src/API.Web.Host/Logs/*
+src/API.IdentityServer/Logs/*
+src/API.HttpApi.Host/Logs/*
+src/API.HttpApi.HostWithIds/Logs/*
+src/API.DbMigrator/Logs/*
+src/API.Blazor.Server/Logs/*
+src/API.Blazor.Server.Tiered/Logs/*
\ No newline at end of file
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..56af76b
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,5 @@
+{
+ "singleQuote": true,
+ "useTabs": false,
+ "tabWidth": 4
+}
diff --git a/API.sln b/API.sln
new file mode 100644
index 0000000..8f85730
--- /dev/null
+++ b/API.sln
@@ -0,0 +1,151 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29020.237
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.Domain", "src\API.Domain\API.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.Application", "src\API.Application\API.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.EntityFrameworkCore", "src\API.EntityFrameworkCore\API.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.Web", "src\API.Web\API.Web.csproj", "{068855E8-9240-4F1A-910B-CF825794513B}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.Application.Tests", "test\API.Application.Tests\API.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.Web.Tests", "test\API.Web.Tests\API.Web.Tests.csproj", "{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.Domain.Shared", "src\API.Domain.Shared\API.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.Application.Contracts", "src\API.Application.Contracts\API.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.HttpApi", "src\API.HttpApi\API.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.HttpApi.Client", "src\API.HttpApi.Client\API.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.EntityFrameworkCore.Tests", "test\API.EntityFrameworkCore.Tests\API.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.TestBase", "test\API.TestBase\API.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.Domain.Tests", "test\API.Domain.Tests\API.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.HttpApi.Client.ConsoleTestApp", "test\API.HttpApi.Client.ConsoleTestApp\API.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "API.DbMigrator", "src\API.DbMigrator\API.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinFormsApp", "WinFormsApp\WinFormsApp.csproj", "{38E8D5E4-CAB6-442A-B5EB-196083564058}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfApp1", "src\WpfApp1\WpfApp1.csproj", "{310B6403-04A2-42C8-87AB-22C5BF73AEAA}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AbpWindowsService", "src\AbpWindowsService\AbpWindowsService.csproj", "{DB081010-C3E1-4ECD-A39F-A8AA0A490F45}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.Build.0 = Release|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {38E8D5E4-CAB6-442A-B5EB-196083564058}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {38E8D5E4-CAB6-442A-B5EB-196083564058}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {38E8D5E4-CAB6-442A-B5EB-196083564058}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {38E8D5E4-CAB6-442A-B5EB-196083564058}.Release|Any CPU.Build.0 = Release|Any CPU
+ {310B6403-04A2-42C8-87AB-22C5BF73AEAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {310B6403-04A2-42C8-87AB-22C5BF73AEAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {310B6403-04A2-42C8-87AB-22C5BF73AEAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {310B6403-04A2-42C8-87AB-22C5BF73AEAA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DB081010-C3E1-4ECD-A39F-A8AA0A490F45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DB081010-C3E1-4ECD-A39F-A8AA0A490F45}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DB081010-C3E1-4ECD-A39F-A8AA0A490F45}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DB081010-C3E1-4ECD-A39F-A8AA0A490F45}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {068855E8-9240-4F1A-910B-CF825794513B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {38E8D5E4-CAB6-442A-B5EB-196083564058} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {310B6403-04A2-42C8-87AB-22C5BF73AEAA} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {DB081010-C3E1-4ECD-A39F-A8AA0A490F45} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
+ EndGlobalSection
+EndGlobal
diff --git a/API.sln.DotSettings b/API.sln.DotSettings
new file mode 100644
index 0000000..cb0b2c9
--- /dev/null
+++ b/API.sln.DotSettings
@@ -0,0 +1,23 @@
+
+ True
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ Required
+ Required
+ Required
+ Required
+ False
+ True
+ False
+ False
+ True
+ False
+ False
+ SQL
+
\ No newline at end of file
diff --git a/NuGet.Config b/NuGet.Config
new file mode 100644
index 0000000..be8a1ec
--- /dev/null
+++ b/NuGet.Config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WinForm/App.config b/WinForm/App.config
new file mode 100644
index 0000000..6e945cb
--- /dev/null
+++ b/WinForm/App.config
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WinForm/Form1.Designer.cs b/WinForm/Form1.Designer.cs
new file mode 100644
index 0000000..2a1d2e4
--- /dev/null
+++ b/WinForm/Form1.Designer.cs
@@ -0,0 +1,72 @@
+
+namespace WinForm
+{
+ partial class Form1
+ {
+ ///
+ /// 必需的设计器变量。
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// 清理所有正在使用的资源。
+ ///
+ /// 如果应释放托管资源,为 true;否则为 false。
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows 窗体设计器生成的代码
+
+ ///
+ /// 设计器支持所需的方法 - 不要修改
+ /// 使用代码编辑器修改此方法的内容。
+ ///
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(505, 443);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(215, 85);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "button1";
+ this.button1.UseVisualStyleBackColor = true;
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(499, 337);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(221, 35);
+ this.textBox1.TabIndex = 1;
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(2024, 1002);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.button1);
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.TextBox textBox1;
+ }
+}
+
diff --git a/WinForm/Form1.cs b/WinForm/Form1.cs
new file mode 100644
index 0000000..508c1af
--- /dev/null
+++ b/WinForm/Form1.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace WinForm
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/WinForm/Form1.resx b/WinForm/Form1.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/WinForm/Form1.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WinForm/Program.cs b/WinForm/Program.cs
new file mode 100644
index 0000000..990849a
--- /dev/null
+++ b/WinForm/Program.cs
@@ -0,0 +1,36 @@
+using Microsoft.Extensions.Hosting;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace WinForm
+{
+ public class Program
+ {
+ ///
+ /// 应用程序的主入口点。
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Form1());
+ }
+
+
+ private IHost CreateHostBuilder()
+ {
+ return Host
+ .CreateDefaultBuilder(null)
+ .UseAutofac()
+ .UseSerilog()
+ .ConfigureServices((hostContext, services) =>
+ {
+ services.AddApplication();
+ }).Build();
+ }
+ }
+}
diff --git a/WinForm/Properties/AssemblyInfo.cs b/WinForm/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..1fca18b
--- /dev/null
+++ b/WinForm/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("WinForm")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("WinForm")]
+[assembly: AssemblyCopyright("Copyright © 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("9fe4f100-99c0-4eb9-9baf-a75944476d15")]
+
+// 程序集的版本信息由下列四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/WinForm/Properties/Resources.Designer.cs b/WinForm/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..e07df28
--- /dev/null
+++ b/WinForm/Properties/Resources.Designer.cs
@@ -0,0 +1,70 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本: 4.0.30319.42000
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+//
+//------------------------------------------------------------------------------
+
+
+namespace WinForm.Properties
+{
+ ///
+ /// 强类型资源类,用于查找本地化字符串等。
+ ///
+ // 此类是由 StronglyTypedResourceBuilder
+ // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+ // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+ // (以 /str 作为命令选项),或重新生成 VS 项目。
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// 返回此类使用的缓存 ResourceManager 实例。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WinForm.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// 重写当前线程的 CurrentUICulture 属性,对
+ /// 使用此强类型资源类的所有资源查找执行重写。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/WinForm/Properties/Resources.resx b/WinForm/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/WinForm/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WinForm/Properties/Settings.Designer.cs b/WinForm/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..a85a843
--- /dev/null
+++ b/WinForm/Properties/Settings.Designer.cs
@@ -0,0 +1,29 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+namespace WinForm.Properties
+{
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/WinForm/Properties/Settings.settings b/WinForm/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/WinForm/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/WinForm/WinForm.csproj b/WinForm/WinForm.csproj
new file mode 100644
index 0000000..3a12690
--- /dev/null
+++ b/WinForm/WinForm.csproj
@@ -0,0 +1,233 @@
+
+
+
+
+
+ Debug
+ AnyCPU
+ {9FE4F100-99C0-4EB9-9BAF-A75944476D15}
+ WinExe
+ WinForm
+ WinForm
+ v4.7.2
+ 512
+ true
+ true
+
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.5.0.0\lib\net461\Microsoft.Extensions.Configuration.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.Configuration.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.Binder.5.0.0\lib\net461\Microsoft.Extensions.Configuration.Binder.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.CommandLine.5.0.0\lib\net461\Microsoft.Extensions.Configuration.CommandLine.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.5.0.0\lib\net461\Microsoft.Extensions.Configuration.EnvironmentVariables.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.FileExtensions.5.0.0\lib\net461\Microsoft.Extensions.Configuration.FileExtensions.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.Json.5.0.0\lib\net461\Microsoft.Extensions.Configuration.Json.dll
+
+
+ ..\packages\Microsoft.Extensions.Configuration.UserSecrets.5.0.0\lib\net461\Microsoft.Extensions.Configuration.UserSecrets.dll
+
+
+ ..\packages\Microsoft.Extensions.DependencyInjection.5.0.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll
+
+
+ ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.DependencyInjection.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.FileProviders.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.FileProviders.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.FileProviders.Physical.5.0.0\lib\net461\Microsoft.Extensions.FileProviders.Physical.dll
+
+
+ ..\packages\Microsoft.Extensions.FileSystemGlobbing.5.0.0\lib\net461\Microsoft.Extensions.FileSystemGlobbing.dll
+
+
+ ..\packages\Microsoft.Extensions.Hosting.5.0.0\lib\net461\Microsoft.Extensions.Hosting.dll
+
+
+ ..\packages\Microsoft.Extensions.Hosting.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.Hosting.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.5.0.0\lib\net461\Microsoft.Extensions.Logging.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.Abstractions.5.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.Configuration.5.0.0\lib\net461\Microsoft.Extensions.Logging.Configuration.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.Console.5.0.0\lib\net461\Microsoft.Extensions.Logging.Console.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.Debug.5.0.0\lib\net461\Microsoft.Extensions.Logging.Debug.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.EventLog.5.0.0\lib\net461\Microsoft.Extensions.Logging.EventLog.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.EventSource.5.0.0\lib\net461\Microsoft.Extensions.Logging.EventSource.dll
+
+
+ ..\packages\Microsoft.Extensions.Options.5.0.0\lib\net461\Microsoft.Extensions.Options.dll
+
+
+ ..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.5.0.0\lib\net461\Microsoft.Extensions.Options.ConfigurationExtensions.dll
+
+
+ ..\packages\Microsoft.Extensions.Primitives.6.0.0\lib\net461\Microsoft.Extensions.Primitives.dll
+
+
+
+ ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
+
+
+
+
+ ..\packages\System.Diagnostics.DiagnosticSource.5.0.0\lib\net46\System.Diagnostics.DiagnosticSource.dll
+
+
+ ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll
+ True
+ True
+
+
+ ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll
+
+
+
+ ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
+
+
+ ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll
+ True
+ True
+
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
+
+
+ ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll
+ True
+ True
+
+
+ ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
+ True
+ True
+
+
+ ..\packages\System.Text.Encodings.Web.5.0.0\lib\net461\System.Text.Encodings.Web.dll
+
+
+ ..\packages\System.Text.Json.5.0.0\lib\net461\System.Text.Json.dll
+
+
+ ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
+
+
+ ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+
+ Form1.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+
+ 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WinForm/WinFormModule.cs b/WinForm/WinFormModule.cs
new file mode 100644
index 0000000..2d2bbc1
--- /dev/null
+++ b/WinForm/WinFormModule.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WinForm
+{
+ [DependsOn(
+ typeof(AbpAutofacModule),
+ typeof(AbpAutoMapperModule),
+ typeof(AbpHttpClientModule),
+ typeof(FmpApplicationContractsModule),
+ typeof(AbpHttpClientIdentityModelModule),
+ typeof(AbpIdentityHttpApiClientModule)
+ )]
+ public class WinFormModule : AbpModule
+ {
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.AddHttpClientProxies(
+ typeof(FmpApplicationContractsModule).Assembly,
+ remoteServiceConfigurationName: "Default"
+ );
+
+ Configure(options =>
+ {
+ options.AddMaps();
+ });
+
+ //var configuration = context.Services.GetConfiguration();
+ //ConfigureIdentityClientOption(context, configuration);
+ //context.Services.AddSingleton();
+ context.Services.AddSingleton();
+ }
+
+ private static void ConfigureIdentityClientOption(ServiceConfigurationContext context, IConfiguration configuration)
+ {
+ var defaultClientConfiguration = new IdentityClientConfiguration(
+ configuration["IdentityClients:Default:Authority"],
+ configuration["IdentityClients:Default:Scope"],
+ configuration["IdentityClients:Default:ClientId"],
+ configuration["IdentityClients:Default:ClientSecret"],
+ configuration["IdentityClients:Default:GrantType"],
+ configuration["IdentityClients:Default:UserName"],
+ configuration["IdentityClients:Default:UserPassword"],
+ false,
+ 1800
+ );
+
+ context.Services.AddOptions().Configure(option =>
+ {
+ option.IdentityClients.Default = defaultClientConfiguration;
+ });
+ }
+ }
+}
diff --git a/WinForm/packages.config b/WinForm/packages.config
new file mode 100644
index 0000000..a87f317
--- /dev/null
+++ b/WinForm/packages.config
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WinFormsApp/Form1.Designer.cs b/WinFormsApp/Form1.Designer.cs
new file mode 100644
index 0000000..3295f65
--- /dev/null
+++ b/WinFormsApp/Form1.Designer.cs
@@ -0,0 +1,62 @@
+
+namespace WinFormsApp
+{
+ partial class Form1
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(96, 71);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(150, 46);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "button1";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(14F, 31F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(800, 450);
+ this.Controls.Add(this.button1);
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button button1;
+ }
+}
+
diff --git a/WinFormsApp/Form1.cs b/WinFormsApp/Form1.cs
new file mode 100644
index 0000000..20d2eeb
--- /dev/null
+++ b/WinFormsApp/Form1.cs
@@ -0,0 +1,75 @@
+using API;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Serilog;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Volo.Abp;
+using Volo.Abp.DependencyInjection;
+
+namespace WinFormsApp
+{
+ public partial class Form1 : Form,ITransientDependency
+ {
+ //private readonly IHost _host;
+ //private readonly IAbpApplicationWithExternalServiceProvider _application;
+ //private IBackgroundJobManagerApplication _service;
+ private IBackgroundJobManagerApplication _service;
+
+ public Form1(IBackgroundJobManagerApplication service)
+ {
+ //_host = CreateHostBuilder();
+
+ //_service = _host.Services.GetService();
+ _service= service;
+ InitializeComponent();
+
+
+ }
+ private IHost CreateHostBuilder()
+ {
+ return Host
+ .CreateDefaultBuilder(null)
+ .UseAutofac()
+ .UseSerilog()
+ .ConfigureServices((hostContext, services) =>
+ {
+ services.AddApplication();
+ }).Build();
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ ToDo();
+ }
+
+ private async void ToDo()
+ {
+ try
+ {
+ List dtos = new List();
+ RequestDto dto = new RequestDto();
+ dto.SheetCode = "TO_CWC14";
+ dto.SheetName = "TO_CWC14";
+ dto.Year = 2020;
+ dto.Month = 1;
+ dtos.Add(dto);
+ // var aa = await _service.AddBackgroundJob(dtos);
+ var str = _service.SayHello();
+ }
+ catch (Exception ex )
+ {
+
+ throw;
+ }
+
+ }
+ }
+}
diff --git a/WinFormsApp/Form1.resx b/WinFormsApp/Form1.resx
new file mode 100644
index 0000000..f298a7b
--- /dev/null
+++ b/WinFormsApp/Form1.resx
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WinFormsApp/Program.cs b/WinFormsApp/Program.cs
new file mode 100644
index 0000000..50b7bf0
--- /dev/null
+++ b/WinFormsApp/Program.cs
@@ -0,0 +1,73 @@
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Serilog;
+using Serilog.Events;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Volo.Abp;
+
+namespace WinFormsApp
+{
+ public class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ // [STAThread]
+ static async Task Main()
+ {
+ Log.Logger = new LoggerConfiguration()
+#if DEBUG
+ .MinimumLevel.Debug()
+#else
+ .MinimumLevel.Information()
+#endif
+ .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
+ .Enrich.FromLogContext()
+ .WriteTo.Async(c => c.File("Logs/logs.txt"))
+ .CreateLogger();
+ try
+ {
+ Log.Information("Starting web host.");
+
+ using (var host =Host
+ .CreateDefaultBuilder(null)
+ .UseAutofac()
+ .UseSerilog()
+ .ConfigureServices((hostContext, services) =>
+ {
+ services.AddApplication();
+ }).Build())
+ {
+
+ await host.StartAsync();
+
+
+ }
+ using (var application = AbpApplicationFactory.Create())
+ {
+ application.Initialize();
+
+ // Application.SetHighDpiMode(HighDpiMode.SystemAware);
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ var mainForm = application.ServiceProvider.GetService();
+ Application.Run(mainForm);
+ }
+ }
+ catch (Exception ex )
+ {
+ Log.Fatal(ex, "Host terminated unexpectedly!");
+ return;
+ }
+ finally
+ {
+ Log.CloseAndFlush();
+ }
+ }
+
+ }
+}
diff --git a/WinFormsApp/WinFormModule.cs b/WinFormsApp/WinFormModule.cs
new file mode 100644
index 0000000..9da5084
--- /dev/null
+++ b/WinFormsApp/WinFormModule.cs
@@ -0,0 +1,65 @@
+using API;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.Autofac;
+using Volo.Abp.AutoMapper;
+using Volo.Abp.Http.Client;
+using Volo.Abp.Http.Client.IdentityModel;
+using Volo.Abp.Identity;
+using Volo.Abp.IdentityModel;
+using Volo.Abp.Modularity;
+
+
+
+namespace WinFormsApp
+{
+ [DependsOn(
+ typeof(AbpAutofacModule),
+ typeof(AbpAutoMapperModule),
+ typeof(AbpHttpClientModule),
+ typeof(APIApplicationContractsModule),
+ typeof(AbpHttpClientIdentityModelModule),
+ typeof(AbpIdentityHttpApiClientModule)
+ )]
+ public class WinFormModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.AddHttpClientProxies(
+ typeof(APIApplicationContractsModule).Assembly,
+ remoteServiceConfigurationName: "Default"
+ );
+
+ Configure(options =>
+ {
+ options.AddMaps();
+ });
+
+ //var configuration = context.Services.GetConfiguration();
+ //ConfigureIdentityClientOption(context, configuration);
+ //context.Services.AddSingleton();
+ // context.Services.AddSingleton();
+ }
+
+ private static void ConfigureIdentityClientOption(ServiceConfigurationContext context, IConfiguration configuration)
+ {
+ var defaultClientConfiguration = new IdentityClientConfiguration(
+ configuration["IdentityClients:Default:Authority"],
+ configuration["IdentityClients:Default:Scope"],
+ configuration["IdentityClients:Default:ClientId"],
+ configuration["IdentityClients:Default:ClientSecret"],
+ configuration["IdentityClients:Default:GrantType"],
+ configuration["IdentityClients:Default:UserName"],
+ configuration["IdentityClients:Default:UserPassword"],
+ false,
+ 1800
+ );
+
+ context.Services.AddOptions().Configure(option =>
+ {
+ option.IdentityClients.Default = defaultClientConfiguration;
+ });
+ }
+
+ }
+}
diff --git a/WinFormsApp/WinFormsApp.csproj b/WinFormsApp/WinFormsApp.csproj
new file mode 100644
index 0000000..f2f2e4d
--- /dev/null
+++ b/WinFormsApp/WinFormsApp.csproj
@@ -0,0 +1,35 @@
+
+
+
+ WinExe
+ net5.0-windows
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+ PreserveNewest
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WinFormsApp/appsettings.json b/WinFormsApp/appsettings.json
new file mode 100644
index 0000000..e9dcd4b
--- /dev/null
+++ b/WinFormsApp/appsettings.json
@@ -0,0 +1,22 @@
+{
+ "RemoteServices": {
+ "Default": {
+ "BaseUrl": "http://localhost:44319/",
+ // "BaseUrl": "http://114.116.225.148:8010/",
+ "RequireHttpsMetadata": "false"
+ }
+ },
+ "IdentityClients": {
+ "Default": {
+ "GrantType": "password",
+ "ClientId": "API_App",
+ "ClientSecret": "1q2w3e*",
+ "UserName": "admin",
+ "UserPassword": "1q2w3E*",
+ "Authority": "http://localhost:44319/",
+ // "Authority": "http://114.116.225.148:8010/",
+ "RequireHttps": false,
+ "Scope": "API"
+ }
+ }
+}
\ No newline at end of file
diff --git a/WindowsFormsControlLibrary1/Properties/AssemblyInfo.cs b/WindowsFormsControlLibrary1/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..981315b
--- /dev/null
+++ b/WindowsFormsControlLibrary1/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("WindowsFormsControlLibrary1")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("WindowsFormsControlLibrary1")]
+[assembly: AssemblyCopyright("Copyright © 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("a26d4442-e48c-42eb-80be-6897e9c49292")]
+
+// 程序集的版本信息由下列四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/WindowsFormsControlLibrary1/UserControl1.Designer.cs b/WindowsFormsControlLibrary1/UserControl1.Designer.cs
new file mode 100644
index 0000000..59b5a0e
--- /dev/null
+++ b/WindowsFormsControlLibrary1/UserControl1.Designer.cs
@@ -0,0 +1,38 @@
+namespace WindowsFormsControlLibrary1
+{
+ partial class UserControl1
+ {
+ ///
+ /// 必需的设计器变量。
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// 清理所有正在使用的资源。
+ ///
+ /// 如果应释放托管资源,为 true;否则为 false。
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region 组件设计器生成的代码
+
+ ///
+ /// 设计器支持所需的方法 - 不要修改
+ /// 使用代码编辑器修改此方法的内容。
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(800, 450);
+ }
+
+ #endregion
+ }
+}
diff --git a/WindowsFormsControlLibrary1/UserControl1.cs b/WindowsFormsControlLibrary1/UserControl1.cs
new file mode 100644
index 0000000..3fe80a2
--- /dev/null
+++ b/WindowsFormsControlLibrary1/UserControl1.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace WindowsFormsControlLibrary1
+{
+ public partial class UserControl1: UserControl
+ {
+ public UserControl1()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/WindowsFormsControlLibrary1/WindowsFormsControlLibrary1.csproj b/WindowsFormsControlLibrary1/WindowsFormsControlLibrary1.csproj
new file mode 100644
index 0000000..19bc17c
--- /dev/null
+++ b/WindowsFormsControlLibrary1/WindowsFormsControlLibrary1.csproj
@@ -0,0 +1,62 @@
+
+
+
+
+ Debug
+ AnyCPU
+ a26d4442-e48c-42eb-80be-6897e9c49292
+ Library
+ WindowsFormsControlLibrary1
+ WindowsFormsControlLibrary1
+ v4.7.2
+ 512
+ true
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UserControl
+
+
+ UserControl1.cs
+
+
+
+
+
+
+
diff --git a/common.props b/common.props
new file mode 100644
index 0000000..6ef9bae
--- /dev/null
+++ b/common.props
@@ -0,0 +1,15 @@
+
+
+ latest
+ 1.0.0
+ $(NoWarn);CS1591
+ app
+
+
+
+
+ $(NoWarn);0436
+
+
+
+
\ No newline at end of file
diff --git a/install-service.bat b/install-service.bat
new file mode 100644
index 0000000..e90b126
--- /dev/null
+++ b/install-service.bat
@@ -0,0 +1,18 @@
+@echo off
+cls
+
+NET FILE 1>NUL 2>NUL
+if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
+
+:getPrivileges
+ echo You have no admin rights! You need to start your CMD in admin mode to install the windows service
+ goto end
+
+:gotPrivileges
+ set current=%~dp0
+ set bin="%current%src\AbpWindowsService\bin\Debug\net5.0\AbpWindowsService.exe"
+ echo Creating service with the name "AbpWindowsService"
+ sc create "AbpWindowsService" binPath=%bin%
+
+:end
+ pause
\ No newline at end of file
diff --git a/src/API.Application.Contracts/API.Application.Contracts.csproj b/src/API.Application.Contracts/API.Application.Contracts.csproj
new file mode 100644
index 0000000..688cc1d
--- /dev/null
+++ b/src/API.Application.Contracts/API.Application.Contracts.csproj
@@ -0,0 +1,24 @@
+
+
+
+
+
+ netstandard2.0
+ API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/API.Application.Contracts/APIApplicationContractsModule.cs b/src/API.Application.Contracts/APIApplicationContractsModule.cs
new file mode 100644
index 0000000..31fa5ae
--- /dev/null
+++ b/src/API.Application.Contracts/APIApplicationContractsModule.cs
@@ -0,0 +1,29 @@
+using Volo.Abp.Account;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.Modularity;
+using Volo.Abp.ObjectExtending;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+
+namespace API
+{
+ [DependsOn(
+ typeof(APIDomainSharedModule),
+ typeof(AbpAccountApplicationContractsModule),
+ typeof(AbpFeatureManagementApplicationContractsModule),
+ typeof(AbpIdentityApplicationContractsModule),
+ typeof(AbpPermissionManagementApplicationContractsModule),
+ typeof(AbpSettingManagementApplicationContractsModule),
+ typeof(AbpTenantManagementApplicationContractsModule),
+ typeof(AbpObjectExtendingModule)
+ )]
+ public class APIApplicationContractsModule : AbpModule
+ {
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ APIDtoExtensions.Configure();
+ }
+ }
+}
diff --git a/src/API.Application.Contracts/APIDtoExtensions.cs b/src/API.Application.Contracts/APIDtoExtensions.cs
new file mode 100644
index 0000000..fc0a396
--- /dev/null
+++ b/src/API.Application.Contracts/APIDtoExtensions.cs
@@ -0,0 +1,29 @@
+using Volo.Abp.Identity;
+using Volo.Abp.ObjectExtending;
+using Volo.Abp.Threading;
+
+namespace API
+{
+ public static class APIDtoExtensions
+ {
+ private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
+
+ public static void Configure()
+ {
+ OneTimeRunner.Run(() =>
+ {
+ /* You can add extension properties to DTOs
+ * defined in the depended modules.
+ *
+ * Example:
+ *
+ * ObjectExtensionManager.Instance
+ * .AddOrUpdateProperty("Title");
+ *
+ * See the documentation for more:
+ * https://docs.abp.io/en/abp/latest/Object-Extensions
+ */
+ });
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/API.Application.Contracts/IBackgroundJobManagerApplication.cs b/src/API.Application.Contracts/IBackgroundJobManagerApplication.cs
new file mode 100644
index 0000000..6812d15
--- /dev/null
+++ b/src/API.Application.Contracts/IBackgroundJobManagerApplication.cs
@@ -0,0 +1,12 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+
+namespace API
+{
+ public interface IBackgroundJobManagerApplication : IApplicationService
+ {
+ Task AddBackgroundJob(List dtos);
+ string SayHello();
+ }
+}
\ No newline at end of file
diff --git a/src/API.Application.Contracts/Permissions/APIPermissionDefinitionProvider.cs b/src/API.Application.Contracts/Permissions/APIPermissionDefinitionProvider.cs
new file mode 100644
index 0000000..9d09906
--- /dev/null
+++ b/src/API.Application.Contracts/Permissions/APIPermissionDefinitionProvider.cs
@@ -0,0 +1,21 @@
+using API.Localization;
+using Volo.Abp.Authorization.Permissions;
+using Volo.Abp.Localization;
+
+namespace API.Permissions
+{
+ public class APIPermissionDefinitionProvider : PermissionDefinitionProvider
+ {
+ public override void Define(IPermissionDefinitionContext context)
+ {
+ var myGroup = context.AddGroup(APIPermissions.GroupName);
+ //Define your own permissions here. Example:
+ //myGroup.AddPermission(APIPermissions.MyPermission1, L("Permission:MyPermission1"));
+ }
+
+ private static LocalizableString L(string name)
+ {
+ return LocalizableString.Create(name);
+ }
+ }
+}
diff --git a/src/API.Application.Contracts/Permissions/APIPermissions.cs b/src/API.Application.Contracts/Permissions/APIPermissions.cs
new file mode 100644
index 0000000..e675199
--- /dev/null
+++ b/src/API.Application.Contracts/Permissions/APIPermissions.cs
@@ -0,0 +1,10 @@
+namespace API.Permissions
+{
+ public static class APIPermissions
+ {
+ public const string GroupName = "API";
+
+ //Add your own permission names. Example:
+ //public const string MyPermission1 = GroupName + ".MyPermission1";
+ }
+}
\ No newline at end of file
diff --git a/src/API.Application.Contracts/RequestDto.cs b/src/API.Application.Contracts/RequestDto.cs
new file mode 100644
index 0000000..a7f898b
--- /dev/null
+++ b/src/API.Application.Contracts/RequestDto.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Volo.Abp.Application.Dtos;
+
+namespace API
+{
+ public class RequestDto : EntityDto
+ {
+ public string SheetCode { get; set; }
+ public string SheetName { get; set; }
+ public int Year { get; set; }
+ public int Month { get; set; }
+ }
+}
diff --git a/src/API.Application/API.Application.csproj b/src/API.Application/API.Application.csproj
new file mode 100644
index 0000000..fe96934
--- /dev/null
+++ b/src/API.Application/API.Application.csproj
@@ -0,0 +1,24 @@
+
+
+
+
+
+ net5.0
+ API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/API.Application/APIAppService.cs b/src/API.Application/APIAppService.cs
new file mode 100644
index 0000000..f2785e6
--- /dev/null
+++ b/src/API.Application/APIAppService.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using API.Localization;
+using Volo.Abp.Application.Services;
+
+namespace API
+{
+ /* Inherit your application services from this class.
+ */
+ public abstract class APIAppService : ApplicationService
+ {
+ protected APIAppService()
+ {
+ LocalizationResource = typeof(APIResource);
+ }
+ }
+}
diff --git a/src/API.Application/APIApplicationAutoMapperProfile.cs b/src/API.Application/APIApplicationAutoMapperProfile.cs
new file mode 100644
index 0000000..d4e418f
--- /dev/null
+++ b/src/API.Application/APIApplicationAutoMapperProfile.cs
@@ -0,0 +1,16 @@
+using API.BudgetDataSources;
+using API.DataSources;
+using AutoMapper;
+
+namespace API
+{
+ public class APIApplicationAutoMapperProfile : Profile
+ {
+ public APIApplicationAutoMapperProfile()
+ {
+ /* You can configure your AutoMapper mapping configuration here.
+ * Alternatively, you can split your mapping configurations
+ * into multiple profile classes for a better organization. */
+ }
+ }
+}
diff --git a/src/API.Application/APIApplicationModule.cs b/src/API.Application/APIApplicationModule.cs
new file mode 100644
index 0000000..086296f
--- /dev/null
+++ b/src/API.Application/APIApplicationModule.cs
@@ -0,0 +1,32 @@
+using Volo.Abp.Account;
+using Volo.Abp.AutoMapper;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.Modularity;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+
+namespace API
+{
+ [DependsOn(
+ typeof(APIDomainModule),
+ typeof(AbpAccountApplicationModule),
+ typeof(APIApplicationContractsModule),
+ typeof(AbpIdentityApplicationModule),
+ typeof(AbpPermissionManagementApplicationModule),
+ typeof(AbpTenantManagementApplicationModule),
+ typeof(AbpFeatureManagementApplicationModule),
+ typeof(AbpSettingManagementApplicationModule)
+ )]
+ public class APIApplicationModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.AddMaps();
+ });
+ }
+ }
+}
diff --git a/src/API.Application/BackgroundJobManagerApplication.cs b/src/API.Application/BackgroundJobManagerApplication.cs
new file mode 100644
index 0000000..ed7cf5b
--- /dev/null
+++ b/src/API.Application/BackgroundJobManagerApplication.cs
@@ -0,0 +1,46 @@
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+using Volo.Abp.BackgroundJobs;
+
+namespace API
+{
+ [Route("api/background")]
+ public class BackgroundJobManagerApplication : ApplicationService, IBackgroundJobManagerApplication
+ {
+ private readonly IBackgroundJobManager _backgroundJobManager;
+ public BackgroundJobManagerApplication(IBackgroundJobManager backgroundJobManager)
+ {
+ _backgroundJobManager = backgroundJobManager;
+ }
+
+ public string SayHello()
+ {
+ return "Hello";
+ }
+ [HttpPost]
+ [Route("addbackgroundjob")]
+ public async Task AddBackgroundJob(List dtos)
+ {
+ foreach (var dto in dtos)
+ {
+ Logger.LogInformation($"添加同步【{dto.SheetCode}-{dto.Year}年{dto.Month}月】数据任务!");
+ await _backgroundJobManager.EnqueueAsync(
+ new JobArgs
+ {
+ SheetCode = dto.SheetCode,
+ SheetName = dto.SheetName,
+ Year = dto.Year,
+ Month = dto.Month,
+ });
+ }
+ return true;
+ }
+
+ }
+}
diff --git a/src/API.Application/JobArgs.cs b/src/API.Application/JobArgs.cs
new file mode 100644
index 0000000..8fdcaa0
--- /dev/null
+++ b/src/API.Application/JobArgs.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace API
+{
+ public class JobArgs
+ {
+ public string SheetCode { get; set; }
+ public string SheetName { get; set; }
+ public int Year { get; set; }
+ public int Month { get; set; }
+ }
+}
diff --git a/src/API.Application/Properties/AssemblyInfo.cs b/src/API.Application/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..9d30e8e
--- /dev/null
+++ b/src/API.Application/Properties/AssemblyInfo.cs
@@ -0,0 +1,2 @@
+using System.Runtime.CompilerServices;
+[assembly:InternalsVisibleToAttribute("API.Application.Tests")]
diff --git a/src/API.DbMigrator/API.DbMigrator.csproj b/src/API.DbMigrator/API.DbMigrator.csproj
new file mode 100644
index 0000000..e11dbdf
--- /dev/null
+++ b/src/API.DbMigrator/API.DbMigrator.csproj
@@ -0,0 +1,43 @@
+
+
+
+
+
+ Exe
+ net5.0
+
+
+
+
+
+ PreserveNewest
+ Always
+
+
+
+ PreserveNewest
+ Always
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/API.DbMigrator/APIDbMigratorModule.cs b/src/API.DbMigrator/APIDbMigratorModule.cs
new file mode 100644
index 0000000..2917119
--- /dev/null
+++ b/src/API.DbMigrator/APIDbMigratorModule.cs
@@ -0,0 +1,20 @@
+using API.EntityFrameworkCore;
+using Volo.Abp.Autofac;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.Modularity;
+
+namespace API.DbMigrator
+{
+ [DependsOn(
+ typeof(AbpAutofacModule),
+ typeof(APIEntityFrameworkCoreModule),
+ typeof(APIApplicationContractsModule)
+ )]
+ public class APIDbMigratorModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options => options.IsJobExecutionEnabled = false);
+ }
+ }
+}
diff --git a/src/API.DbMigrator/DbMigratorHostedService.cs b/src/API.DbMigrator/DbMigratorHostedService.cs
new file mode 100644
index 0000000..4c76c76
--- /dev/null
+++ b/src/API.DbMigrator/DbMigratorHostedService.cs
@@ -0,0 +1,47 @@
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using API.Data;
+using Serilog;
+using Volo.Abp;
+
+namespace API.DbMigrator
+{
+ public class DbMigratorHostedService : IHostedService
+ {
+ private readonly IHostApplicationLifetime _hostApplicationLifetime;
+ private readonly IConfiguration _configuration;
+
+ public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, IConfiguration configuration)
+ {
+ _hostApplicationLifetime = hostApplicationLifetime;
+ _configuration = configuration;
+ }
+
+ public async Task StartAsync(CancellationToken cancellationToken)
+ {
+ using (var application = AbpApplicationFactory.Create(options =>
+ {
+ options.Services.ReplaceConfiguration(_configuration);
+ options.UseAutofac();
+ options.Services.AddLogging(c => c.AddSerilog());
+ }))
+ {
+ application.Initialize();
+
+ await application
+ .ServiceProvider
+ .GetRequiredService()
+ .MigrateAsync();
+
+ application.Shutdown();
+
+ _hostApplicationLifetime.StopApplication();
+ }
+ }
+
+ public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
+ }
+}
diff --git a/src/API.DbMigrator/Program.cs b/src/API.DbMigrator/Program.cs
new file mode 100644
index 0000000..c425b7e
--- /dev/null
+++ b/src/API.DbMigrator/Program.cs
@@ -0,0 +1,45 @@
+using System.IO;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using Serilog;
+using Serilog.Events;
+
+namespace API.DbMigrator
+{
+ class Program
+ {
+ static async Task Main(string[] args)
+ {
+ Log.Logger = new LoggerConfiguration()
+ .MinimumLevel.Information()
+ .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
+ .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning)
+#if DEBUG
+ .MinimumLevel.Override("API", LogEventLevel.Debug)
+#else
+ .MinimumLevel.Override("API", LogEventLevel.Information)
+#endif
+ .Enrich.FromLogContext()
+ .WriteTo.Async(c => c.File("Logs/logs.txt"))
+ .WriteTo.Async(c => c.Console())
+ .CreateLogger();
+
+ await CreateHostBuilder(args).RunConsoleAsync();
+ }
+
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureAppConfiguration(build =>
+ {
+ build.AddJsonFile("appsettings.secrets.json", optional: true);
+ })
+ .ConfigureLogging((context, logging) => logging.ClearProviders())
+ .ConfigureServices((hostContext, services) =>
+ {
+ services.AddHostedService();
+ });
+ }
+}
diff --git a/src/API.DbMigrator/appsettings.json b/src/API.DbMigrator/appsettings.json
new file mode 100644
index 0000000..cd41468
--- /dev/null
+++ b/src/API.DbMigrator/appsettings.json
@@ -0,0 +1,29 @@
+{
+ "ConnectionStrings": {
+ "Default": "Server=114.116.225.148,13314;Database=FMP_20210610;User ID=sa;Password=Microsoft2020;"
+ },
+ "IdentityServer": {
+ "Clients": {
+ "API_Web": {
+ "ClientId": "API_Web",
+ "ClientSecret": "1q2w3e*",
+ "RootUrl": "https://localhost:44319"
+ },
+ "API_App": {
+ "ClientId": "API_App",
+ "ClientSecret": "1q2w3e*",
+ "RootUrl": "http://localhost:4200"
+ },
+ "API_BlazorServerTiered": {
+ "ClientId": "API_BlazorServerTiered",
+ "ClientSecret": "1q2w3e*",
+ "RootUrl": "https://localhost:44314"
+ },
+ "API_Swagger": {
+ "ClientId": "API_Swagger",
+ "ClientSecret": "1q2w3e*",
+ "RootUrl": "https://localhost:44326"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/API.DbMigrator/appsettings.secrets.json b/src/API.DbMigrator/appsettings.secrets.json
new file mode 100644
index 0000000..7a73a41
--- /dev/null
+++ b/src/API.DbMigrator/appsettings.secrets.json
@@ -0,0 +1,2 @@
+{
+}
\ No newline at end of file
diff --git a/src/API.DbMigrator/tempkey.rsa b/src/API.DbMigrator/tempkey.rsa
new file mode 100644
index 0000000..494c201
--- /dev/null
+++ b/src/API.DbMigrator/tempkey.rsa
@@ -0,0 +1,13 @@
+{
+ "KeyId": "f788zGVUZh9H-HbWL1S-Mg",
+ "Parameters": {
+ "D": "F19hbC5PLO872DszGiJnVoU55ee7XGXmNf0KEKndJ/uGBv5lWklXA0QF80h1ytWXde0jV5isQPB1t7mPhRQlDoDTkywLi1CeOgBPbxzHEfLjZZ5c4olfeX0IJX9BDqgUntY0H1a/+Om/eDu4OZUz3EIJFFZBgz46YZSyTT6ZDvAEdpC/o66sNJmxvJIp+8zVoVDSqBUzxmc+oEamXLg7r2jdymxJMxau1kQFxEGLOrJnNxGsEe8UrYA3qSsm8m/Xg4uOh7RYgnuEEt88+KTvRq+CAMWhN3YNLtOJ3NmXowwE7e1Ma+jih9+UVfxZn14P5+SOJbQ2bYV2sCV+2vBiCQ==",
+ "DP": "oPiGO/qdOQfFEAS9fMInQnsrNylIZVpDYEVoDJ6/jQfE/IpuwxGcmsaGvCob3SKxZiJRLCWpwJYo1hCh/JOSVGWMkVyELky56nbbkkV5ymKLSGZ4JoetdQs+GchnPdR+k2P9Ij1Kjk13ylubN3htzNhcBASJpOfSEv5pPVzGKX0=",
+ "DQ": "z6imxLABHkyftbfUUtpeOlPanEHgpuIjmUdp3T1Ju1jziE63UEhuj0GPAXOF17uYxixwYE8JhOJ7+TyIK9oZeI3zH2OzJqQh8f5PCQ/E+0ULXZDeNV/ShDLCTufu3Fis9Rt64uTp/H/l21oMQ79jc0ysa8DTz1ReJLRc5qjL41U=",
+ "Exponent": "AQAB",
+ "InverseQ": "ieZcvSt5XYukKJKhXpv5Dm/1RD7iH88cZnhLSTEVTMoOUHoYWmApY5pNLGahbfjA9bxnkBWDYex/i7wE9uNNY5CsA6ovUaQLVJDt3kHvR9W+9QtN8D6jjG2TuRbbOdEg4RqhfjUaDfDIgTJX2Wxc8U98FOvOyGw1HzwUPFZKecM=",
+ "Modulus": "vk4z1Bmtmbo+gxITcY+FIlXzcO2wTOGlOXK5GMYj/6PUMFt7lbqkc72AkPsrAo5/JE8LYLhWj7fzSKbjvtowHCz5m2t+FlUYmuiKpvvnJsTqvQrckNlbZ1nm071q5PhP3Dar/OksfBhPtAX+c3+NjDnM/w53ccJJNaBDO/s9JYoN7vH5n6ed1pMSK71hmg4MPsxChcnc1f1PpnG2mqyJ253+GEUbj/kRyeBSmCCr9aadov2ZzxIKVaFNagJEHOzanQmorSLpP25GfOHCuy27Zkef94V/qU9elzjbH4uIKslVGx5T6H99TYh0sUGu11NytYJa5WNAZWow95CzurC2vw==",
+ "P": "4GMCQy+XTNzR5TsgFcdAZv2K6TcQR13fHVvPoxQp/b32V5YUJOBFEUAtqociy5ro4+KzpXP5WPSk1ZtznGKuNZyLq8gTnhpB3rwd0sdo4zxKnQ5nu+n1UhlhWNxg5A9V5TaciUAyPrHWJfLoYTQWygNTgJELQH5zZXi2ihC2uiU=",
+ "Q": "2R36pamnLAJggkPJxiW5qH6HizZ+bkQVg0BBftMLzkAM8Y9CwTW75GRUzGEJFpMckkw0GZSYb1Uwl3DVUpkcQ8LZ91IPYdPpDlYUshhIxl184M55pnO14besKxJtMZ64zhHKVAR2pBMO0n6W4/1iBXkkQqyPViJxdfvXPJMBbhM="
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/API.Domain.Shared.csproj b/src/API.Domain.Shared/API.Domain.Shared.csproj
new file mode 100644
index 0000000..e69eb45
--- /dev/null
+++ b/src/API.Domain.Shared/API.Domain.Shared.csproj
@@ -0,0 +1,32 @@
+
+
+
+
+
+ netstandard2.0
+ API
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/API.Domain.Shared/APIDomainErrorCodes.cs b/src/API.Domain.Shared/APIDomainErrorCodes.cs
new file mode 100644
index 0000000..3a3f5ec
--- /dev/null
+++ b/src/API.Domain.Shared/APIDomainErrorCodes.cs
@@ -0,0 +1,7 @@
+namespace API
+{
+ public static class APIDomainErrorCodes
+ {
+ /* You can add your business exception error codes here, as constants */
+ }
+}
diff --git a/src/API.Domain.Shared/APIDomainSharedModule.cs b/src/API.Domain.Shared/APIDomainSharedModule.cs
new file mode 100644
index 0000000..e4837e4
--- /dev/null
+++ b/src/API.Domain.Shared/APIDomainSharedModule.cs
@@ -0,0 +1,59 @@
+using API.Localization;
+using Volo.Abp.AuditLogging;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.IdentityServer;
+using Volo.Abp.Localization;
+using Volo.Abp.Localization.ExceptionHandling;
+using Volo.Abp.Modularity;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+using Volo.Abp.Validation.Localization;
+using Volo.Abp.VirtualFileSystem;
+
+namespace API
+{
+ [DependsOn(
+ typeof(AbpAuditLoggingDomainSharedModule),
+ typeof(AbpBackgroundJobsDomainSharedModule),
+ typeof(AbpFeatureManagementDomainSharedModule),
+ typeof(AbpIdentityDomainSharedModule),
+ typeof(AbpIdentityServerDomainSharedModule),
+ typeof(AbpPermissionManagementDomainSharedModule),
+ typeof(AbpSettingManagementDomainSharedModule),
+ typeof(AbpTenantManagementDomainSharedModule)
+ )]
+ public class APIDomainSharedModule : AbpModule
+ {
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ APIGlobalFeatureConfigurator.Configure();
+ APIModuleExtensionConfigurator.Configure();
+ }
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
+
+ Configure(options =>
+ {
+ options.Resources
+ .Add("en")
+ .AddBaseTypes(typeof(AbpValidationResource))
+ .AddVirtualJson("/Localization/API");
+
+ options.DefaultResourceType = typeof(APIResource);
+ });
+
+ Configure(options =>
+ {
+ options.MapCodeNamespace("API", typeof(APIResource));
+ });
+ }
+ }
+}
diff --git a/src/API.Domain.Shared/APIGlobalFeatureConfigurator.cs b/src/API.Domain.Shared/APIGlobalFeatureConfigurator.cs
new file mode 100644
index 0000000..63d992f
--- /dev/null
+++ b/src/API.Domain.Shared/APIGlobalFeatureConfigurator.cs
@@ -0,0 +1,23 @@
+using Volo.Abp.Threading;
+
+namespace API
+{
+ public static class APIGlobalFeatureConfigurator
+ {
+ private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
+
+ public static void Configure()
+ {
+ OneTimeRunner.Run(() =>
+ {
+ /* You can configure (enable/disable) global features of the used modules here.
+ *
+ * YOU CAN SAFELY DELETE THIS CLASS AND REMOVE ITS USAGES IF YOU DON'T NEED TO IT!
+ *
+ * Please refer to the documentation to lear more about the Global Features System:
+ * https://docs.abp.io/en/abp/latest/Global-Features
+ */
+ });
+ }
+ }
+}
diff --git a/src/API.Domain.Shared/APIModuleExtensionConfigurator.cs b/src/API.Domain.Shared/APIModuleExtensionConfigurator.cs
new file mode 100644
index 0000000..c5b5902
--- /dev/null
+++ b/src/API.Domain.Shared/APIModuleExtensionConfigurator.cs
@@ -0,0 +1,72 @@
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Identity;
+using Volo.Abp.ObjectExtending;
+using Volo.Abp.Threading;
+
+namespace API
+{
+ public static class APIModuleExtensionConfigurator
+ {
+ private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
+
+ public static void Configure()
+ {
+ OneTimeRunner.Run(() =>
+ {
+ ConfigureExistingProperties();
+ ConfigureExtraProperties();
+ });
+ }
+
+ 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.
+ */
+ }
+
+ 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( //property type: string
+ "SocialSecurityNumber", //property name
+ property =>
+ {
+ //validation rules
+ property.Attributes.Add(new RequiredAttribute());
+ property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4});
+
+ //...other configurations for this property
+ }
+ );
+ });
+ });
+
+ * See the documentation for more:
+ * https://docs.abp.io/en/abp/latest/Module-Entity-Extensions
+ */
+ }
+ }
+}
diff --git a/src/API.Domain.Shared/DataHelper.cs b/src/API.Domain.Shared/DataHelper.cs
new file mode 100644
index 0000000..9d71535
--- /dev/null
+++ b/src/API.Domain.Shared/DataHelper.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace API
+{
+ public class DataHelper
+ {
+ public static List GetDataList(IEnumerable dataStringList)
+ {
+ var dataList = new List();
+ foreach (var dataString in dataStringList)
+ {
+ var list = JsonHelper.JsonToList(dataString);
+ dataList.AddRange(list);
+ }
+ return dataList;
+ }
+
+ public static List GetDataList(string dataString)
+ {
+ if (string.IsNullOrEmpty(dataString))
+ {
+ return new List();
+ }
+ var dataList = JsonHelper.JsonToList(dataString);
+ return dataList;
+ }
+
+ public static string GetDataString(List dataList)
+ {
+ var jsonString = JsonHelper.ListToJson(dataList);
+ return jsonString;
+ }
+ }
+}
diff --git a/src/API.Domain.Shared/Enums/EnumCompanyType.cs b/src/API.Domain.Shared/Enums/EnumCompanyType.cs
new file mode 100644
index 0000000..4f24df3
--- /dev/null
+++ b/src/API.Domain.Shared/Enums/EnumCompanyType.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Text;
+
+namespace API.Enums
+{
+ public enum EnumCompanyType
+ {
+ [Description("全资")]
+ 全资 = 0,
+ [Description("控股")]
+ 控股 = 1,
+ [Description("合联营")]
+ 合联营 = 2,
+ [Description("其他")]
+ 其他 = 3,
+ }
+}
diff --git a/src/API.Domain.Shared/Filter/EnumFilterAction.cs b/src/API.Domain.Shared/Filter/EnumFilterAction.cs
new file mode 100644
index 0000000..6a2448f
--- /dev/null
+++ b/src/API.Domain.Shared/Filter/EnumFilterAction.cs
@@ -0,0 +1,63 @@
+using System.ComponentModel;
+
+namespace API.Filter
+{
+ ///
+ /// 过滤条件
+ ///
+ public enum EnumFilterAction
+ {
+ ///
+ /// equal
+ ///
+ [Description("等于")] Equal = 0,
+
+ ///
+ /// Not equal
+ ///
+ [Description("不等于")] NotEqual = 1,
+
+ ///
+ /// Bigger
+ ///
+ [Description("大于")] BiggerThan = 2,
+
+ ///
+ /// Smaller
+ ///
+ [Description("小于")] SmallThan = 3,
+
+ ///
+ /// Bigger or equal
+ ///
+ [Description("大于等于")] BiggerThanOrEqual = 4,
+
+ ///
+ /// Small or equal
+ ///
+ [Description("小于等于")] SmallThanOrEqual = 5,
+
+ ///
+ /// Like
+ ///
+ [Description("类似于")] Like = 6,
+
+ ///
+ /// Not like
+ ///
+ [Description("不类似于")] NotLike = 7,
+
+ ///
+ /// Contained in
+ /// List items = new List();
+ /// string value = JsonSerializer.Serialize(items);//转成Json字符串
+ ///FilterCondition filterCondition = new FilterCondition() { Column = "Name", Value = value, Action = EnumFilterAction.In, Logic = EnumFilterLogic.And };
+ ///
+ [Description("包含于")] In = 8,
+
+ ///
+ /// Not contained in
+ ///
+ [Description("不包含于")] NotIn = 9,
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Filter/EnumFilterLogic.cs b/src/API.Domain.Shared/Filter/EnumFilterLogic.cs
new file mode 100644
index 0000000..d70cd5b
--- /dev/null
+++ b/src/API.Domain.Shared/Filter/EnumFilterLogic.cs
@@ -0,0 +1,18 @@
+namespace API.Filter
+{
+ ///
+ /// 过滤逻辑
+ ///
+ public enum EnumFilterLogic
+ {
+ ///
+ /// 与
+ ///
+ And=0,
+
+ ///
+ /// 或
+ ///
+ Or=1
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Filter/FilterCondition.cs b/src/API.Domain.Shared/Filter/FilterCondition.cs
new file mode 100644
index 0000000..08d0248
--- /dev/null
+++ b/src/API.Domain.Shared/Filter/FilterCondition.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace API.Filter
+{
+ public class FilterCondition
+ {
+ public FilterCondition()
+ {
+ Logic = EnumFilterLogic.And;
+ }
+
+ public FilterCondition(string column, string value, EnumFilterAction action = EnumFilterAction.Equal,
+ EnumFilterLogic logic = EnumFilterLogic.And)
+ {
+ Column = column;
+ Action = action;
+ Value = value;
+ Logic = logic;
+ }
+
+ ///
+ /// 过滤条件之间的逻辑关系:AND和OR
+ ///
+ public EnumFilterLogic Logic { get; set; }
+
+ ///
+ /// 过滤条件中使用的数据列
+ ///
+ public string Column { get; set; }
+
+ ///
+ /// 过滤条件中的操作:Equal、NotEqual、BiggerThan、SmallThan、BiggerThanOrEqual、SmallThanOrEqual、In、NotIn
+ ///
+ public EnumFilterAction Action { get; set; }
+
+ ///
+ /// 过滤条件中的操作的值
+ ///
+ public string Value { get; set; }
+ }
+}
diff --git a/src/API.Domain.Shared/Filter/FilterExtensions.cs b/src/API.Domain.Shared/Filter/FilterExtensions.cs
new file mode 100644
index 0000000..ddb353e
--- /dev/null
+++ b/src/API.Domain.Shared/Filter/FilterExtensions.cs
@@ -0,0 +1,314 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Text.Json;
+
+namespace API.Filter
+{
+ public static class FilterExtensions
+ {
+ public static Expression> ToLambda(this string jsonFilter)
+ {
+ if (string.IsNullOrWhiteSpace(jsonFilter))
+ {
+ return p => true;
+ }
+
+ var filterConditions = JsonSerializer.Deserialize>(jsonFilter);
+ return filterConditions.ToLambda();
+ }
+
+ public static Expression> ToLambda(this FilterCondition filterCondition)
+ {
+ var filterConditions = new List { filterCondition };
+ return filterConditions.ToLambda();
+ }
+
+ public static Expression> ToLambda(this List filterConditionList)
+ {
+ Expression> condition = null;
+ try
+ {
+ if (!filterConditionList.Any())
+ {
+ //创建默认表达式
+ return p => true;
+ }
+
+ foreach (var filterCondition in filterConditionList)
+ {
+ var tempCondition = CreateLambda(filterCondition);
+ if (condition == null)
+ {
+ condition = tempCondition;
+ }
+ else
+ {
+ condition = filterCondition.Logic switch
+ {
+ EnumFilterLogic.And => condition.And(tempCondition),
+ EnumFilterLogic.Or => condition.Or(tempCondition),
+ _ => condition
+ };
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ throw new Exception($"获取筛选条件异常:{ex.Message}");
+ }
+
+ return condition;
+ }
+
+ private static Expression> CreateLambda(FilterCondition filterCondition)
+ {
+ Expression> expression = p => false;
+ try
+ {
+ var parameter = Expression.Parameter(typeof(T), "p"); //创建参数p
+ var member = Expression.PropertyOrField(parameter, filterCondition.Column); //创建表达式中的属性或字段
+ // var propertyType = member.Type; //取属性类型,常量constant按此类型进行转换
+ //var constant = Expression.Constant(filterCondition.Value);//创建常数
+
+ ConstantExpression constant = null;
+ if (filterCondition.Action != EnumFilterAction.In && filterCondition.Action != EnumFilterAction.NotIn)
+ {
+ constant = CreateConstantExpression(member.Type, filterCondition.Value);
+ }
+
+ switch (filterCondition.Action)
+ {
+ case EnumFilterAction.Equal:
+ expression = Expression.Lambda>(Expression.Equal(member, constant), parameter);
+ break;
+ case EnumFilterAction.NotEqual:
+ expression = Expression.Lambda>(Expression.NotEqual(member, constant), parameter);
+ break;
+ case EnumFilterAction.BiggerThan:
+ expression = Expression.Lambda>(Expression.GreaterThan(member, constant), parameter);
+ break;
+ case EnumFilterAction.SmallThan:
+ expression = Expression.Lambda>(Expression.LessThan(member, constant), parameter);
+ break;
+ case EnumFilterAction.BiggerThanOrEqual:
+ expression = Expression.Lambda>(Expression.GreaterThanOrEqual(member, constant), parameter);
+ break;
+ case EnumFilterAction.SmallThanOrEqual:
+ expression = Expression.Lambda>(Expression.LessThanOrEqual(member, constant), parameter);
+ break;
+ case EnumFilterAction.Like:
+ expression = GetExpressionLikeMethod("Contains", filterCondition);
+ break;
+ case EnumFilterAction.NotLike:
+ expression = GetExpressionNotLikeMethod("Contains", filterCondition);
+ break;
+ case EnumFilterAction.In:
+ expression = GetExpressionInMethod("Contains", member.Type, filterCondition);
+ break;
+ case EnumFilterAction.NotIn:
+ expression = GetExpressionNotInMethod("Contains", member.Type, filterCondition);
+ break;
+ default:
+ break;
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex);
+ }
+
+ return expression;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ private static ConstantExpression CreateConstantExpression(Type propertyType, string value)
+ {
+ ConstantExpression constant = null;
+ try
+ {
+ if (propertyType.IsGenericType &&
+ propertyType.GetGenericTypeDefinition() == typeof(Nullable<>))
+ {
+ var objValue = Convert.ChangeType(value, propertyType.GetGenericArguments()[0]);
+ constant = Expression.Constant(objValue);
+ }
+ else if (propertyType.IsEnum)
+ {
+ var enumValue = (Enum)Enum.Parse(propertyType, value, true);
+ constant = Expression.Constant(enumValue);
+ }
+
+ else
+ {
+ constant = propertyType.Name switch
+ {
+ "Guid" => Expression.Constant(Guid.Parse(value)),
+ _ => Expression.Constant(Convert.ChangeType(value, propertyType))
+ };
+ }
+ }
+ catch (Exception ex)
+ {
+ throw new Exception($"获取ConstantExpression异常:{ex.Message}");
+ }
+
+ return constant;
+ }
+
+ private static Expression> GetExpressionLikeMethod(string methodName,
+ FilterCondition filterCondition)
+ {
+ var parameterExpression = Expression.Parameter(typeof(T), "p");
+ // MethodCallExpression methodExpression = GetMethodExpression(methodName, filterCondition.Column, filterCondition.Value, parameterExpression);
+ var methodExpression = GetMethodExpression(methodName, filterCondition.Column, filterCondition.Value,
+ parameterExpression);
+ return Expression.Lambda>(methodExpression, parameterExpression);
+ }
+
+ private static Expression> GetExpressionNotLikeMethod(string methodName,
+ FilterCondition filterCondition)
+ {
+ var parameterExpression = Expression.Parameter(typeof(T), "p");
+ var methodExpression = GetMethodExpression(methodName, filterCondition.Column, filterCondition.Value,
+ parameterExpression);
+ var notMethodExpression = Expression.Not(methodExpression);
+ return Expression.Lambda>(notMethodExpression, parameterExpression);
+ }
+
+
+ private static object GetPropertyValue(Type propertyType, string value)
+ {
+ Type lstType = typeof(List<>).MakeGenericType(propertyType);
+ return JsonSerializer.Deserialize(value, lstType);
+ }
+
+ ///
+ /// 生成guidList.Contains(p=>p.GUId);
+ /// 除String类型,其他类型涉及到类型转换.如GUID
+ ///
+ ///
+ /// Contains
+ /// PropertyType/typeof(GUId)
+ /// PropertyName/PropertyValue
+ ///
+ private static Expression> GetExpressionInMethod(string methodName, Type propertyType, FilterCondition filterCondition)
+ {
+ var parameterExpression = Expression.Parameter(typeof(T), "p");
+ Type lstType = typeof(List<>).MakeGenericType(propertyType);
+ object propertyValue = JsonSerializer.Deserialize(filterCondition.Value, lstType);
+ if (propertyValue != null)
+ {
+ var methodExpression = GetListMethodExpression(methodName, propertyType, filterCondition.Column, propertyValue, parameterExpression);
+ var expression = Expression.Lambda>(methodExpression, parameterExpression);
+ return expression;
+ }
+ else
+ {
+ return p=>false;
+ }
+ }
+
+ private static Expression> GetExpressionNotInMethod(string methodName, Type propertyType, FilterCondition filterCondition)
+ {
+ var parameterExpression = Expression.Parameter(typeof(T), "p");
+ Type lstType = typeof(List<>).MakeGenericType(propertyType);
+ object propertyValue = JsonSerializer.Deserialize(filterCondition.Value, lstType);
+ if (propertyValue != null)
+ {
+ var methodExpression = GetListMethodExpression(methodName, propertyType, filterCondition.Column, propertyValue, parameterExpression);
+ var notMethodExpression = Expression.Not(methodExpression);
+ return Expression.Lambda>(notMethodExpression, parameterExpression);
+ }
+ else
+ {
+ return p => false;
+ }
+ }
+
+
+ private static MethodCallExpression GetListMethodExpression(string methodName, Type propertyType, string propertyName, object propertyValue, ParameterExpression parameterExpression)
+ {
+ var propertyExpression = Expression.Property(parameterExpression, propertyName); //p.GUID
+ Type type = typeof(List<>).MakeGenericType(propertyType);
+ var method = type.GetMethod(methodName);//获取 List.Contains()
+ var someValue = Expression.Constant(propertyValue);//Value
+ return Expression.Call(someValue, method, propertyExpression);
+ }
+
+
+ ///
+ /// 生成类似于p=>p.Code.Contains("xxx");的lambda表达式
+ /// parameterExpression标识p,propertyName表示values,propertyValue表示"Code",methodName表示Contains
+ /// 仅处理p的属性类型为string这种情况
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ private static MethodCallExpression GetMethodExpression(string methodName, string propertyName,
+ string propertyValue, ParameterExpression parameterExpression)
+ {
+ var propertyExpression = Expression.Property(parameterExpression, propertyName);
+ var method = typeof(string).GetMethod(methodName, new[] { typeof(string) });
+ var someValue = Expression.Constant(propertyValue, typeof(string));
+ return Expression.Call(propertyExpression, method, someValue);
+ }
+
+ ///
+ /// 默认True条件
+ ///
+ ///
+ ///
+ public static Expression> True()
+ {
+ return f => true;
+ }
+
+ ///
+ /// 默认False条件
+ ///
+ ///
+ ///
+ public static Expression> False()
+ {
+ return f => false;
+ }
+
+ ///
+ /// 拼接 OR 条件
+ ///
+ ///
+ ///
+ ///
+ ///
+ private static Expression> Or(this Expression> exp,
+ Expression> condition)
+ {
+ var inv = Expression.Invoke(condition, exp.Parameters);
+ return Expression.Lambda>(Expression.Or(exp.Body, inv), exp.Parameters);
+ }
+
+ ///
+ /// 拼接And条件
+ ///
+ ///
+ ///
+ ///
+ ///
+ private static Expression> And(this Expression> exp,
+ Expression> condition)
+ {
+ var inv = Expression.Invoke(condition, exp.Parameters);
+ return Expression.Lambda>(Expression.And(exp.Body, inv), exp.Parameters);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/JsonHelper.cs b/src/API.Domain.Shared/JsonHelper.cs
new file mode 100644
index 0000000..b9d2dd7
--- /dev/null
+++ b/src/API.Domain.Shared/JsonHelper.cs
@@ -0,0 +1,40 @@
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace API
+{
+ public class JsonHelper
+ {
+ private const string Format = "yyyy-MM-dd HH:mm:ss";
+
+
+ public static List JsonToList(string strJson)
+ {
+ if (string.IsNullOrEmpty(strJson))
+ {
+ return new List();
+ }
+
+ try
+ {
+ var list = JsonConvert.DeserializeObject>(strJson);
+ return list;
+ }
+ catch (Exception)
+ {
+ var str = strJson.Length > 100 ? strJson.Substring(0, 100) : strJson;
+ throw new Exception($"Json数据错误,解析失败{Environment.NewLine}{str}");
+ }
+ }
+
+ public static string ListToJson(List list)
+ {
+ var timeFormat = new IsoDateTimeConverter { DateTimeFormat = Format };
+ var strJson = JsonConvert.SerializeObject(list, Formatting.None, timeFormat);
+ return strJson;
+ }
+ }
+}
diff --git a/src/API.Domain.Shared/Localization/API/ar.json b/src/API.Domain.Shared/Localization/API/ar.json
new file mode 100644
index 0000000..05cb96a
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/ar.json
@@ -0,0 +1,8 @@
+{
+ "culture": "ar",
+ "texts": {
+ "Menu:Home": "الرئيسية",
+ "Welcome": "مرحبا",
+ "LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء تشغيل يعتمد على إطار عمل ABP. لمزيد من المعلومات ، يرجى زيارة abp.io."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/cs.json b/src/API.Domain.Shared/Localization/API/cs.json
new file mode 100644
index 0000000..5a0bbf6
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/cs.json
@@ -0,0 +1,8 @@
+{
+ "culture": "cs",
+ "texts": {
+ "Menu:Home": "Úvod",
+ "Welcome": "Vítejte",
+ "LongWelcomeMessage": "Vítejte v aplikaci. Toto je startovací projekt založený na ABP frameworku. Pro více informací, navštivte abp.io."
+ }
+}
diff --git a/src/API.Domain.Shared/Localization/API/de-DE.json b/src/API.Domain.Shared/Localization/API/de-DE.json
new file mode 100644
index 0000000..aca4528
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/de-DE.json
@@ -0,0 +1,8 @@
+{
+ "culture": "de-DE",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Willkommen",
+ "LongWelcomeMessage": "Willkommen bei der Anwendung. Dies ist ein Startup-Projekt, das auf dem ABP-Framework basiert. Weitere Informationen finden Sie unter abp.io."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/en-GB.json b/src/API.Domain.Shared/Localization/API/en-GB.json
new file mode 100644
index 0000000..d2ca079
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/en-GB.json
@@ -0,0 +1,8 @@
+{
+ "culture": "en-GB",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Welcome",
+ "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/en.json b/src/API.Domain.Shared/Localization/API/en.json
new file mode 100644
index 0000000..d2a6a98
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/en.json
@@ -0,0 +1,8 @@
+{
+ "culture": "en",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Welcome",
+ "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
+ }
+}
diff --git a/src/API.Domain.Shared/Localization/API/es.json b/src/API.Domain.Shared/Localization/API/es.json
new file mode 100644
index 0000000..31b4b59
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/es.json
@@ -0,0 +1,8 @@
+{
+ "culture": "es",
+ "texts": {
+ "Menu:Home": "Inicio",
+ "Welcome": "Bienvenido",
+ "LongWelcomeMessage": "Bienvenido a la aplicación, este es un proyecto base basado en el framework ABP. Para más información, visita abp.io."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/fi.json b/src/API.Domain.Shared/Localization/API/fi.json
new file mode 100644
index 0000000..a318859
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/fi.json
@@ -0,0 +1,8 @@
+{
+ "culture": "fi",
+ "texts": {
+ "Menu:Home": "Koti",
+ "Welcome": "Tervetuloa",
+ "LongWelcomeMessage": "Tervetuloa sovellukseen. Tämä on ABP-kehykseen perustuva käynnistysprojekti. Lisätietoja on osoitteessa abp.io."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/fr.json b/src/API.Domain.Shared/Localization/API/fr.json
new file mode 100644
index 0000000..e76eac0
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/fr.json
@@ -0,0 +1,8 @@
+{
+ "culture": "fr",
+ "texts": {
+ "Menu:Home": "Accueil",
+ "Welcome": "Bienvenue",
+ "LongWelcomeMessage": "Bienvenue dans l'application. Il s'agit d'un projet de démarrage basé sur le framework ABP. Pour plus d'informations, visitez abp.io."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/hi.json b/src/API.Domain.Shared/Localization/API/hi.json
new file mode 100644
index 0000000..a1676bf
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/hi.json
@@ -0,0 +1,8 @@
+{
+ "culture": "hi",
+ "texts": {
+ "Menu:Home": "घर",
+ "Welcome": "स्वागत हे",
+ "LongWelcomeMessage": "आवेदन करने के लिए आपका स्वागत है। यह एबीपी ढांचे पर आधारित एक स्टार्टअप परियोजना है। अधिक जानकारी के लिए, abp.io पर जाएं।"
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/hu.json b/src/API.Domain.Shared/Localization/API/hu.json
new file mode 100644
index 0000000..c7b6a33
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/hu.json
@@ -0,0 +1,8 @@
+{
+ "culture": "hu",
+ "texts": {
+ "Menu:Home": "Kezdőlap",
+ "Welcome": "Üdvözlöm",
+ "LongWelcomeMessage": "Üdvözöljük az alkalmazásban. Ez egy ABP keretrendszeren alapuló startup projekt. További információkért látogasson el az abp.io oldalra."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/it.json b/src/API.Domain.Shared/Localization/API/it.json
new file mode 100644
index 0000000..82ce42b
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/it.json
@@ -0,0 +1,8 @@
+{
+ "culture": "it",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Benvenuto",
+ "LongWelcomeMessage": "Benvenuto nell'applicazione. Questo è un progetto di avvio basato sul framework ABP. Per ulteriori informazioni, visita abp.io."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/nl.json b/src/API.Domain.Shared/Localization/API/nl.json
new file mode 100644
index 0000000..9ba8da4
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/nl.json
@@ -0,0 +1,8 @@
+{
+ "culture": "nl",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Welkom",
+ "LongWelcomeMessage": "Welkom bij de applicatie. Dit is een startup-project gebaseerd op het ABP-framework. Bezoek abp.io voor meer informatie."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/pl-PL.json b/src/API.Domain.Shared/Localization/API/pl-PL.json
new file mode 100644
index 0000000..33412f3
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/pl-PL.json
@@ -0,0 +1,8 @@
+{
+ "culture": "pl-PL",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Witaj",
+ "LongWelcomeMessage": "Witaj w aplikacji. To jest inicjalny projekt bazujący na ABP framework. Po więcej informacji odwiedź stronę abp.io."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/pt-BR.json b/src/API.Domain.Shared/Localization/API/pt-BR.json
new file mode 100644
index 0000000..8c818a0
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/pt-BR.json
@@ -0,0 +1,8 @@
+{
+ "culture": "pt-BR",
+ "texts": {
+ "Menu:Home": "Principal",
+ "Welcome": "Seja bem-vindo!",
+ "LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite abp.io."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/ru.json b/src/API.Domain.Shared/Localization/API/ru.json
new file mode 100644
index 0000000..8464e44
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/ru.json
@@ -0,0 +1,8 @@
+{
+ "culture": "ru",
+ "texts": {
+ "Menu:Home": "Главная",
+ "Welcome": "Добро пожаловать",
+ "LongWelcomeMessage": "Добро пожаловать в приложение. Этот запущенный проект основан на фреймворке ABP. Для получения дополнительной информации посетите сайт abp.io."
+ }
+}
diff --git a/src/API.Domain.Shared/Localization/API/sk.json b/src/API.Domain.Shared/Localization/API/sk.json
new file mode 100644
index 0000000..4f35aaf
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/sk.json
@@ -0,0 +1,8 @@
+{
+ "culture": "sk",
+ "texts": {
+ "Menu:Home": "Domov",
+ "Welcome": "Vitajte",
+ "LongWelcomeMessage": "Vitajte v aplikácii. Toto je štartovací projekt založený na ABP frameworku. Viac informácií nájdete na stránke abp.io."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/sl.json b/src/API.Domain.Shared/Localization/API/sl.json
new file mode 100644
index 0000000..a066ef2
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/sl.json
@@ -0,0 +1,8 @@
+{
+ "culture": "sl",
+ "texts": {
+ "Menu:Home": "Domov",
+ "Welcome": "Dobrodošli",
+ "LongWelcomeMessage": "Dobrodošli v aplikaciji. To je začetni projekt na osnovi okolja ABP. Za več informacij obiščite abp.io."
+ }
+}
diff --git a/src/API.Domain.Shared/Localization/API/tr.json b/src/API.Domain.Shared/Localization/API/tr.json
new file mode 100644
index 0000000..5bf83ee
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/tr.json
@@ -0,0 +1,8 @@
+{
+ "culture": "tr",
+ "texts": {
+ "Menu:Home": "Ana sayfa",
+ "Welcome": "Hoşgeldiniz",
+ "LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz."
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/vi.json b/src/API.Domain.Shared/Localization/API/vi.json
new file mode 100644
index 0000000..c115a35
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/vi.json
@@ -0,0 +1,8 @@
+{
+ "culture": "vi",
+ "texts": {
+ "Menu:Home": "Trang chủ",
+ "Welcome": "Chào mừng bạn",
+ "LongWelcomeMessage": "Chào mừng bạn đến ứng dụng. Đây là một dự án khởi nghiệp dựa trên khung ABP. Để biết thêm thông tin, hãy truy cập abp.io."
+ }
+}
diff --git a/src/API.Domain.Shared/Localization/API/zh-Hans.json b/src/API.Domain.Shared/Localization/API/zh-Hans.json
new file mode 100644
index 0000000..23790bd
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/zh-Hans.json
@@ -0,0 +1,8 @@
+{
+ "culture": "zh-Hans",
+ "texts": {
+ "Menu:Home": "首页",
+ "Welcome": "欢迎",
+ "LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io."
+ }
+ }
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/API/zh-Hant.json b/src/API.Domain.Shared/Localization/API/zh-Hant.json
new file mode 100644
index 0000000..31e0ab5
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/API/zh-Hant.json
@@ -0,0 +1,8 @@
+{
+ "culture": "zh-Hant",
+ "texts": {
+ "Menu:Home": "首頁",
+ "Welcome": "歡迎",
+ "LongWelcomeMessage": "歡迎來到此應用程式. 這是一個基於ABP框架的起始專案. 有關更多訊息, 請瀏覽 abp.io."
+ }
+ }
\ No newline at end of file
diff --git a/src/API.Domain.Shared/Localization/APIResource.cs b/src/API.Domain.Shared/Localization/APIResource.cs
new file mode 100644
index 0000000..abaad57
--- /dev/null
+++ b/src/API.Domain.Shared/Localization/APIResource.cs
@@ -0,0 +1,10 @@
+using Volo.Abp.Localization;
+
+namespace API.Localization
+{
+ [LocalizationResourceName("API")]
+ public class APIResource
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs b/src/API.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
new file mode 100644
index 0000000..fde040c
--- /dev/null
+++ b/src/API.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
@@ -0,0 +1,11 @@
+namespace API.MultiTenancy
+{
+ public static class MultiTenancyConsts
+ {
+ /* Enable/disable multi-tenancy easily in a single point.
+ * If you will never need to multi-tenancy, you can remove
+ * related modules and code parts, including this file.
+ */
+ public const bool IsEnabled = true;
+ }
+}
diff --git a/src/API.Domain.Shared/TD_DATA.cs b/src/API.Domain.Shared/TD_DATA.cs
new file mode 100644
index 0000000..96a5dd5
--- /dev/null
+++ b/src/API.Domain.Shared/TD_DATA.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace API
+{
+ public class TD_DATA
+ {
+ public string C { get; set; }
+
+ public decimal V
+ {
+ get => decimal.Round(Vs[0], 6);
+ // set
+ // {
+ // if (Vs.Count > 0)
+ //
+ // {
+ // Vs[0] = value;
+ // }
+ // else
+ // {
+ // Vs = new List { value };
+ // }
+ // }
+ }
+
+ public IList Ns { get; set; } = new List();
+ public IList Vs { get; set; } = new List();
+
+ public TD_DATA()
+ {
+ }
+
+ public TD_DATA(string c, decimal v0)
+ {
+ C = c;
+ Vs = new List { v0 };
+ }
+
+ public TD_DATA(string c, IList ns, IList vs)
+ {
+ C = c;
+ Ns = ns;
+ Vs = vs;
+ }
+ }
+}
diff --git a/src/API.Domain/API.Domain.csproj b/src/API.Domain/API.Domain.csproj
new file mode 100644
index 0000000..574b255
--- /dev/null
+++ b/src/API.Domain/API.Domain.csproj
@@ -0,0 +1,29 @@
+
+
+
+
+
+ net5.0
+ API
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/API.Domain/APIConsts.cs b/src/API.Domain/APIConsts.cs
new file mode 100644
index 0000000..a0871c0
--- /dev/null
+++ b/src/API.Domain/APIConsts.cs
@@ -0,0 +1,9 @@
+namespace API
+{
+ public static class APIConsts
+ {
+ public const string DbTablePrefix = "App";
+
+ public const string DbSchema = null;
+ }
+}
diff --git a/src/API.Domain/APIDbProperties.cs b/src/API.Domain/APIDbProperties.cs
new file mode 100644
index 0000000..6892753
--- /dev/null
+++ b/src/API.Domain/APIDbProperties.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Data;
+
+namespace API
+{
+ public static class APIDbProperties
+ {
+ public static string DbTablePrefix { get; internal set; } = "fmp";
+
+ public static string DbSchema { get; internal set; } = AbpCommonDbProperties.DbSchema;
+
+ public const string ConnectionStringName = "APIService";
+ }
+}
diff --git a/src/API.Domain/APIDomainModule.cs b/src/API.Domain/APIDomainModule.cs
new file mode 100644
index 0000000..fd340c4
--- /dev/null
+++ b/src/API.Domain/APIDomainModule.cs
@@ -0,0 +1,46 @@
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection.Extensions;
+using API.MultiTenancy;
+using Volo.Abp.AuditLogging;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.Emailing;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.IdentityServer;
+using Volo.Abp.Modularity;
+using Volo.Abp.MultiTenancy;
+using Volo.Abp.PermissionManagement.Identity;
+using Volo.Abp.PermissionManagement.IdentityServer;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+
+namespace API
+{
+ [DependsOn(
+ typeof(APIDomainSharedModule),
+ typeof(AbpAuditLoggingDomainModule),
+ typeof(AbpBackgroundJobsDomainModule),
+ typeof(AbpFeatureManagementDomainModule),
+ typeof(AbpIdentityDomainModule),
+ typeof(AbpPermissionManagementDomainIdentityModule),
+ typeof(AbpIdentityServerDomainModule),
+ typeof(AbpPermissionManagementDomainIdentityServerModule),
+ typeof(AbpSettingManagementDomainModule),
+ typeof(AbpTenantManagementDomainModule),
+ typeof(AbpEmailingModule)
+ )]
+ public class APIDomainModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.IsEnabled = MultiTenancyConsts.IsEnabled;
+ });
+
+#if DEBUG
+ context.Services.Replace(ServiceDescriptor.Singleton());
+#endif
+ }
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/JQ_LRB.cs b/src/API.Domain/BudgetDataSources/JQ_LRB.cs
new file mode 100644
index 0000000..53bc60a
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/JQ_LRB.cs
@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("JQLRB久其利润表")]
+ public class JQ_LRB : Entity
+ {
+ public JQ_LRB()
+ {
+
+ }
+
+ public JQ_LRB(Guid id,string companyCode, string iTEM, string rowNum, decimal nUM_MONTH, decimal aDD_UP_NUM_YEAR, DateTime cREATE_TIME, string dATA_TIME, decimal lAST_YEAR_SAME_PERIOD, string sHEET_NAME, string tABLENUM, int year, int month)
+ {
+ GUID = id;
+ CompanyCode = companyCode;
+ ITEM = iTEM;
+ RowNum = rowNum;
+ NUM_MONTH = nUM_MONTH;
+ ADD_UP_NUM_YEAR = aDD_UP_NUM_YEAR;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ LAST_YEAR_SAME_PERIOD = lAST_YEAR_SAME_PERIOD;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ Year = year;
+ Month = month;
+ }
+
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("本月数")]
+ public decimal NUM_MONTH { get; set; }
+ [DisplayName("本年累计数")]
+ public decimal ADD_UP_NUM_YEAR { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+ [DisplayName("上年同期累计数")]
+ public decimal LAST_YEAR_SAME_PERIOD { get; set; }
+ [DisplayName("表名")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; } = "JQ";
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; } = 1;
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/JQ_QJFYB.cs b/src/API.Domain/BudgetDataSources/JQ_QJFYB.cs
new file mode 100644
index 0000000..c5fcbc4
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/JQ_QJFYB.cs
@@ -0,0 +1,93 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("JQQJFYB久其期间费用表")]
+ public class JQ_QJFYB : Entity
+ {
+ public JQ_QJFYB()
+ {
+
+ }
+
+ public JQ_QJFYB(Guid id, string companyCode, string iTEM, string rowNum, decimal nUM_MONTH, decimal aDD_UP_NUM_YEAR, DateTime cREATE_TIME, string dATA_TIME, decimal lAST_YEAR_ADD_UP, string sHEET_NAME, string tABLENUM, int year, int month)
+ {
+ GUID = id;
+ CompanyCode = companyCode;
+ ITEM = iTEM;
+ RowNum = rowNum;
+ NUM_MONTH = nUM_MONTH;
+ ADD_UP_NUM_YEAR = aDD_UP_NUM_YEAR;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ LAST_YEAR_ADD_UP = lAST_YEAR_ADD_UP;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ Year = year;
+ Month = month;
+ }
+
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("本月数")]
+ public decimal NUM_MONTH { get; set; }
+ [DisplayName("本年累计数")]
+ public decimal ADD_UP_NUM_YEAR { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+ [DisplayName("上年同期累计数")]
+ public decimal LAST_YEAR_ADD_UP { get; set; }
+ [DisplayName("表名")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; } = "JQ";
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; } = 1;
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/JQ_SCCBB.cs b/src/API.Domain/BudgetDataSources/JQ_SCCBB.cs
new file mode 100644
index 0000000..823b1f1
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/JQ_SCCBB.cs
@@ -0,0 +1,101 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("JQSCCBB久其生产成本表")]
+ public class JQ_SCCBB : Entity
+ {
+ public JQ_SCCBB()
+ {
+
+ }
+
+ public JQ_SCCBB(Guid id ,string companyCode, string iTEM, string rowNum, decimal mONTH_BEGINNING, decimal tR_MONTH, decimal wG_MONTH, decimal wG_ADD_UP, decimal mONTH_CLOSING, decimal tR_ADD_UP, DateTime cREATE_TIME, string dATA_TIME, int year, int month, string sHEET_NAME, string tABLENUM)
+ {
+ GUID = id;
+ CompanyCode = companyCode;
+ ITEM = iTEM;
+ RowNum = rowNum;
+ MONTH_BEGINNING = mONTH_BEGINNING;
+ TR_MONTH = tR_MONTH;
+ WG_MONTH = wG_MONTH;
+ WG_ADD_UP = wG_ADD_UP;
+ MONTH_CLOSING = mONTH_CLOSING;
+ TR_ADD_UP = tR_ADD_UP;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ Year = year;
+ Month = month;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ }
+
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("月初余额")]
+ public decimal MONTH_BEGINNING { get; set; }
+ [DisplayName("投入本月")]
+ public decimal TR_MONTH { get; set; }
+ [DisplayName("完工本月")]
+ public decimal WG_MONTH { get; set; }
+ [DisplayName("完工累计")]
+ public decimal WG_ADD_UP { get; set; }
+ [DisplayName("月末余额")]
+ public decimal MONTH_CLOSING { get; set; }
+ [DisplayName("投入累计")]
+ public decimal TR_ADD_UP { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+ [DisplayName("表名")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; } = "JQ";
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; } = 1;
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/JQ_XJLLB.cs b/src/API.Domain/BudgetDataSources/JQ_XJLLB.cs
new file mode 100644
index 0000000..c68796e
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/JQ_XJLLB.cs
@@ -0,0 +1,106 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("JQXJLLB久其现金流量表")]
+ public class JQ_XJLLB : Entity
+ {
+ public JQ_XJLLB()
+ {
+
+ }
+
+ public JQ_XJLLB(Guid id, string companyCode, string iTEM, string rowNum, decimal aLL_TOTAL, decimal hBZJ_TOTAL, decimal hBZJ_JTWB,
+ decimal hBZJ_JTNB, decimal ySPJ_TOTAL, decimal yPJ_JTWB, decimal ySPJ_JTNB,
+ DateTime cREATE_TIME, string dATA_TIME, string sHEET_NAME, string tABLENUM, int year, int month)
+ {
+ GUID = id;
+ CompanyCode = companyCode;
+ ITEM = iTEM;
+ RowNum = rowNum;
+ ALL_TOTAL = aLL_TOTAL;
+ HBZJ_TOTAL = hBZJ_TOTAL;
+ HBZJ_JTWB = hBZJ_JTWB;
+ HBZJ_JTNB = hBZJ_JTNB;
+ YSPJ_TOTAL = ySPJ_TOTAL;
+ YSPJ_JTWB = yPJ_JTWB;
+ YSPJ_JTNB = ySPJ_JTNB;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ Year = year;
+ Month = month;
+ }
+
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("总计")]
+ public decimal ALL_TOTAL { get; set; }
+ [DisplayName("货币资金合计")]
+ public decimal HBZJ_TOTAL { get; set; }
+ [DisplayName("货币资金集团外部")]
+ public decimal HBZJ_JTWB { get; set; }
+ [DisplayName("货币资金集团内部")]
+ public decimal HBZJ_JTNB { get; set; }
+ [DisplayName("应收票据合计")]
+ public decimal YSPJ_TOTAL { get; set; }
+ [DisplayName("应收票据集团外部")]
+ public decimal YSPJ_JTWB { get; set; }
+ [DisplayName("应收票据集团内部")]
+ public decimal YSPJ_JTNB { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+ [DisplayName("表名")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; } = "JQ";
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; } = 1;
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/JQ_ZCFZB.cs b/src/API.Domain/BudgetDataSources/JQ_ZCFZB.cs
new file mode 100644
index 0000000..04ef833
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/JQ_ZCFZB.cs
@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("JQZCFZB久其资产负债表")]
+ public class JQ_ZCFZB : Entity
+ {
+ public JQ_ZCFZB()
+ {
+
+ }
+
+ public JQ_ZCFZB(Guid id, string companyCode, string iTEM, string rowNum, decimal cLOSING_BALANCE, decimal bEGINNING_BALANCE, DateTime cREATE_TIME, string dATA_TIME,string sHEET_NAME, string tABLENUM, int year, int month)
+ {
+ GUID = id;
+ CompanyCode = companyCode;
+ ITEM = iTEM;
+ RowNum = rowNum;
+ CLOSING_BALANCE = cLOSING_BALANCE;
+ BEGINNING_BALANCE = bEGINNING_BALANCE;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ Year = year;
+ Month = month;
+ }
+
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("期末余额")]
+ public decimal CLOSING_BALANCE { get; set; }
+ [DisplayName("年初余额")]
+ public decimal BEGINNING_BALANCE { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+
+ [DisplayName("资产类别")]
+ public string ITEM_TYP { get; set; }
+ [DisplayName("表单名称")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; } = "JQ";
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; } = 1;
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/JQ_ZZFYB.cs b/src/API.Domain/BudgetDataSources/JQ_ZZFYB.cs
new file mode 100644
index 0000000..2565b1f
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/JQ_ZZFYB.cs
@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("JQZZFYB久其制造费用表")]
+ public class JQ_ZZFYB : Entity
+ {
+ public JQ_ZZFYB()
+ {
+
+ }
+
+ public JQ_ZZFYB(Guid id, string companyCode, string iTEM, string rowNum, decimal nUM_MONTH, decimal aDD_UP_NUM_YEAR, DateTime cREATE_TIME, string dATA_TIME, decimal lAST_YEAR_ADD_UP, string sHEET_NAME, string tABLENUM, int year, int month)
+ {
+ GUID = id;
+ CompanyCode = companyCode;
+ ITEM = iTEM;
+ RowNum = rowNum;
+ NUM_MONTH = nUM_MONTH;
+ ADD_UP_NUM_YEAR = aDD_UP_NUM_YEAR;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ LAST_YEAR_ADD_UP = lAST_YEAR_ADD_UP;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ Year = year;
+ Month = month;
+ }
+
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("本月数")]
+ public decimal NUM_MONTH { get; set; }
+ [DisplayName("本年累计数")]
+ public decimal ADD_UP_NUM_YEAR { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+ [DisplayName("上年累计数")]
+ public decimal LAST_YEAR_ADD_UP { get; set; }
+ [DisplayName("表名")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; } = "JQ";
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; } = 1;
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TI_CBB04_BUDGET.cs b/src/API.Domain/BudgetDataSources/TI_CBB04_BUDGET.cs
new file mode 100644
index 0000000..73e5108
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TI_CBB04_BUDGET.cs
@@ -0,0 +1,72 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("CBB04降成本输入表")]
+ public class TI_CBB04_BUDGET : Entity
+ {
+ public TI_CBB04_BUDGET()
+ {
+
+ }
+
+ [DisplayName("公司代码")]
+
+ public string CompanyCode { get; set; }
+
+
+ [DisplayName("行号")]
+ public string RowNum { get; set; }
+
+ [DisplayName("项目")]
+ public string ProjectName { get; set; }
+
+
+
+ #region IBudgetTable
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #endregion
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; } = 1;
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+
+
+}
diff --git a/src/API.Domain/BudgetDataSources/TI_CWB16_BUDGET.cs b/src/API.Domain/BudgetDataSources/TI_CWB16_BUDGET.cs
new file mode 100644
index 0000000..1dabdb9
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TI_CWB16_BUDGET.cs
@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("CWB16损益表汇总调整输入表")]
+ public class TI_CWB16_BUDGET : Entity
+ {
+
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+
+ [DisplayName("行号")]
+ public string RowNum { get; set; }
+
+ [DisplayName("项目")]
+
+ public string Project { get; set; }
+
+ [DisplayName("账户代码")]
+ public string AccountCode { get; set; }
+
+ [DisplayName("账户名称")]
+ public string AccountName { get; set; }
+
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+
+ #endregion
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TI_CWB17_BUDGET.cs b/src/API.Domain/BudgetDataSources/TI_CWB17_BUDGET.cs
new file mode 100644
index 0000000..4daf0e9
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TI_CWB17_BUDGET.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("CWB17资产负债表汇总调整输入表")]
+ public class TI_CWB17_BUDGET : Entity
+ {
+
+ public TI_CWB17_BUDGET()
+ {
+
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+
+
+ [DisplayName("行号")]
+
+ public string RowNum { get; set; }
+
+ [DisplayName("项目")]
+
+ public string Project { get; set; }
+
+ [DisplayName("账户代码")]
+
+ public string AccountCode { get; set; }
+
+ [DisplayName("账户名称")]
+
+ public string AccountName { get; set; }
+
+ [DisplayName("本年实际数年初")]
+ public decimal ActualValueBegin { get; set; }
+
+ [DisplayName("本年实际数期末")]
+ public decimal ActualValueEnd { get; set; }
+
+ #region IDataString
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #endregion
+
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+
+ #endregion
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TI_CWB18_BUDGET.cs b/src/API.Domain/BudgetDataSources/TI_CWB18_BUDGET.cs
new file mode 100644
index 0000000..e2136cc
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TI_CWB18_BUDGET.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("CWB18现金流量表货币资金汇总调整输入表")]
+ public class TI_CWB18_BUDGET : Entity
+ {
+ public TI_CWB18_BUDGET()
+ {
+
+ }
+
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+
+
+
+
+ [DisplayName("行号")]
+
+ public string RowNum { get; set; }
+
+
+ [DisplayName("项目")]
+
+ public string Project { get; set; }
+
+ #region IDataString
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #endregion
+
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [DisplayName("修改人")]
+
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+
+ public string Remark { get; set; }
+
+
+ public int UID { get; set; }
+
+
+ public Guid GUID { get; set; }
+
+ #endregion
+
+public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TI_CWB19_BUDGET.cs b/src/API.Domain/BudgetDataSources/TI_CWB19_BUDGET.cs
new file mode 100644
index 0000000..ad34ba0
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TI_CWB19_BUDGET.cs
@@ -0,0 +1,70 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("CWB19现金流量表应收票据汇总调整输入表")]
+ public class TI_CWB19_BUDGET : Entity
+ {
+ public TI_CWB19_BUDGET()
+ {
+
+ }
+ [DisplayName("公司代码")]
+
+ public string CompanyCode { get; set; }
+
+
+
+ [DisplayName("行号")]
+
+ public string RowNum { get; set; }
+
+
+ [DisplayName("项目")]
+ public string Project { get; set; }
+
+ #region IDataString
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #endregion
+
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+
+ #endregion
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TI_HRB04_BUDGET.cs b/src/API.Domain/BudgetDataSources/TI_HRB04_BUDGET.cs
new file mode 100644
index 0000000..a7c9148
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TI_HRB04_BUDGET.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("HRB04职工薪酬输入表")]
+ public class TI_HRB04_BUDGET : Entity
+ {
+ public TI_HRB04_BUDGET()
+ {
+
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+
+ [DisplayName("行号")]
+ public string RowNum { get; set; }
+
+ [DisplayName("项目")]
+
+ public string SalaryType { get; set; }
+
+ #region IDataString
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #endregion
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [DisplayName("修改人")]
+
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+ #endregion
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TO_CWC14_BUDGET.cs b/src/API.Domain/BudgetDataSources/TO_CWC14_BUDGET.cs
new file mode 100644
index 0000000..7725e3b
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TO_CWC14_BUDGET.cs
@@ -0,0 +1,85 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+using Volo.Abp.Domain.Entities.Auditing;
+
+namespace API.BudgetDataSources
+{
+
+
+ [DisplayName("CWC14损益表明细输出表调整后")]
+ public class TO_CWC14_BUDGET : Entity
+ {
+ public TO_CWC14_BUDGET()
+ {
+
+ }
+ [DisplayName("公司代码")]
+
+ public string CompanyCode { get; set; }
+
+ [DisplayName("行号")]
+ public string RowNum { get; set; }
+
+ [DisplayName("项目")]
+
+ public string Project { get; set; }
+
+ [DisplayName("账户代码")]
+
+ public string AccountCode { get; set; }
+
+ [DisplayName("账户名称")]
+
+ public string AccountName { get; set; }
+
+
+
+ #region IDataString
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #endregion
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [DisplayName("修改人")]
+
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+
+ public Guid GUID { get; set; }
+
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+
+
+ #endregion
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TO_CWC19_BUDGET.cs b/src/API.Domain/BudgetDataSources/TO_CWC19_BUDGET.cs
new file mode 100644
index 0000000..9b0ad63
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TO_CWC19_BUDGET.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+using Volo.Abp.Domain.Entities.Auditing;
+namespace API.BudgetDataSources
+{
+ [DisplayName("CWC14损益表明细输出表调整后")]
+ public class TO_CWC19_BUDGET : Entity
+ {
+ public TO_CWC19_BUDGET()
+ {
+
+ }
+ [DisplayName("公司代码")]
+
+ public string CompanyCode { get; set; }
+
+ [DisplayName("行号")]
+ public string RowNum { get; set; }
+
+ [DisplayName("项目")]
+
+ public string Project { get; set; }
+
+ [DisplayName("账户代码")]
+
+ public string AccountCode { get; set; }
+
+ [DisplayName("账户名称")]
+
+ public string AccountName { get; set; }
+
+ [DisplayName("本年实际数年初")]
+ public decimal BeginOfActualCount { get; set; }
+
+
+ #region IDataString
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #endregion
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [DisplayName("修改人")]
+
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+
+ public Guid GUID { get; set; }
+
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TO_CWC21_BUDGET.cs b/src/API.Domain/BudgetDataSources/TO_CWC21_BUDGET.cs
new file mode 100644
index 0000000..65a0507
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TO_CWC21_BUDGET.cs
@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("CWC21现金流量表输出表调整后")]
+ public class TO_CWC21_BUDGET : Entity
+ {
+
+ public TO_CWC21_BUDGET()
+ {
+
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+
+
+
+
+ [DisplayName("行号")]
+
+ public string RowNum { get; set; }
+
+ [DisplayName("项目")]
+
+ public string Project { get; set; }
+
+
+ #region IDataString
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #endregion
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; } = Guid.NewGuid();
+
+ #endregion
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TO_GGC01_BUDGET.cs b/src/API.Domain/BudgetDataSources/TO_GGC01_BUDGET.cs
new file mode 100644
index 0000000..c89ecc2
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TO_GGC01_BUDGET.cs
@@ -0,0 +1,141 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("GGC01更新改造投资项目输出表 ")]
+ public class TO_GGC01_BUDGET : Entity
+ {
+ public TO_GGC01_BUDGET()
+ {
+
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+
+ [DisplayName("填报公司代码")]
+ public string FillInCompanyCode { get; set; }
+
+
+
+ [DisplayName("投资属性")]
+ public string InveAttributes { get; set; }
+
+ ///
+ /// 资产代码
+ ///
+ [DisplayName("资产代码")]
+ public string AssetsCode { get; set; }
+
+ ///
+ /// 资产名称
+ ///
+ [DisplayName("资产名称")]
+
+ public string AssetsName { get; set; }
+
+
+ ///
+ /// 项目类别
+ ///
+ [DisplayName("项目类型")]
+
+ public string ProjectType { get; set; }
+
+
+ ///
+ /// 费用支出类别
+ ///
+ [DisplayName("费用支出类别")]
+
+ public string ExpenseType { get; set; }
+
+ ///
+ /// 资产类型
+ ///
+ [DisplayName("资产类别")]
+
+ public string AssetsType { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [DisplayName("数量")]
+ public decimal Qty { get; set; }
+
+ ///
+ /// 投资必要性
+ ///
+ [DisplayName("投资必要性")]
+
+ public string Must { get; set; }
+
+ ///
+ /// 智能化改造
+ ///
+ [DisplayName("智能化改造")]
+
+ public string FlagAI { get; set; }
+
+ ///
+ /// 转固金额
+ ///
+ [DisplayName("转固金额")]
+ public decimal FixedQty { get; set; }
+
+ ///
+ /// 转固时间
+ ///
+ [DisplayName("转固日期")]
+
+ public string FixedDate { get; set; }
+
+ #region IDataString
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #endregion
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [DisplayName("修改人")]
+
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+
+ public string Remark { get; set; }
+ public int UID { get; set; }
+
+
+ public Guid GUID { get; set; }
+
+ #endregion
+
+ [DisplayName("行号")]
+ public string RowNum { get; set; }
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TO_HRC01_BUDGET.cs b/src/API.Domain/BudgetDataSources/TO_HRC01_BUDGET.cs
new file mode 100644
index 0000000..95a16ff
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TO_HRC01_BUDGET.cs
@@ -0,0 +1,70 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("HRC01人事费用率KPI及工资总额预算输出表")]
+ public class TO_HRC01_BUDGET : Entity
+ {
+ public TO_HRC01_BUDGET()
+ {
+
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+
+ [DisplayName("行号")]
+ public string RowNum { get; set; }
+
+ [DisplayName("项目")]
+
+ public string Project { get; set; }
+
+ [DisplayName("计量单位")]
+
+ public string TrainPeopleQty { get; set; }
+
+ #region IDataString
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #endregion
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [DisplayName("修改人")]
+
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+ #endregion
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TO_JGC01_BUDGET.cs b/src/API.Domain/BudgetDataSources/TO_JGC01_BUDGET.cs
new file mode 100644
index 0000000..14bccce
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TO_JGC01_BUDGET.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("TO_JGC01技术改造投资项目输出表")]
+ public class TO_JGC01_BUDGET : Entity
+ {
+ public TO_JGC01_BUDGET()
+ {
+
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+
+ [DisplayName("填报公司代码")]
+ public string FillInCompanyCode { get; set; }
+
+ [DisplayName("项目编号")]
+ public string ProjectCode { get; set; }
+
+ [DisplayName("项目名称")]
+ public string ProjectName { get; set; }
+
+ [DisplayName("其他分类")]
+ public string OtherType { get; set; }
+
+ [DisplayName("投资构成")]
+ public string InvComposition { get; set; }
+
+ [DisplayName("费用支出类别")]
+ public string ExpenseType { get; set; }
+
+ [DisplayName("资产类别")]
+ public string AssetsType { get; set; }
+
+ [DisplayName("资产名称")]
+ public string AssetsName { get; set; }
+
+ [DisplayName("资产代码")]
+ public string AssetsCode { get; set; }
+
+ [DisplayName("投资总体概算")]
+ public decimal InvQtyTotal { get; set; }
+
+ [DisplayName("投资完成金额")]
+ public decimal InvQtyOver { get; set; }
+
+ [DisplayName("已付款金额")]
+ public decimal InvQtyOut { get; set; }
+
+ [DisplayName("转固金额")]
+ public decimal FixedQty { get; set; }
+
+ [DisplayName("转固日期")]
+ public string FixedDate { get; set; }
+
+ #region IDataString
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #endregion
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+ public Guid GUID { get; set; }
+
+ #endregion
+
+ [DisplayName("行号")]
+ public string RowNum { get; set; }
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/src/API.Domain/BudgetDataSources/TS_XSA04_BUDGET.cs b/src/API.Domain/BudgetDataSources/TS_XSA04_BUDGET.cs
new file mode 100644
index 0000000..be012e9
--- /dev/null
+++ b/src/API.Domain/BudgetDataSources/TS_XSA04_BUDGET.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace API.BudgetDataSources
+{
+ [DisplayName("XSA04整车销量设置表")]
+ public class TS_XSA04_BUDGET : Entity
+ {
+ public TS_XSA04_BUDGET()
+ {
+
+ }
+ [DisplayName("客户代码")]
+ public string CustomerCode { get; set; }
+
+ [DisplayName("客户名称")]
+ public string CustomerName { get; set; }
+
+ [DisplayName("车型代码")]
+ public string VehicleTypeCode { get; set; }
+
+ [DisplayName("车型名称")]
+ public string VehicleTypeName { get; set; }
+
+ [DisplayName("生产地点")]
+ public string ProducLocation { get; set; }
+
+ [DisplayName("整车销量")]
+ public decimal TotalSales { get; set; }
+
+ [DisplayName("关联数据")]
+ public string DataString { get; set; }
+
+ #region 公共字段
+
+ [DisplayName("创建人")]
+ public string CreateUser { get; set; }
+
+ [DisplayName("创建时间")]
+ public DateTime CreateTime { get; set; }
+
+
+ [DisplayName("修改人")]
+ public string UpdateUser { get; set; }
+
+ [DisplayName("修改时间")]
+ public DateTime? UpdateTime { get; set; }
+
+ [DisplayName("状态")]
+ public int State { get; set; }
+
+ [DisplayName("备注")]
+ public string Remark { get; set; }
+
+ public int UID { get; set; }
+
+
+ public Guid GUID { get; set; }
+
+ #endregion
+
+ [DisplayName("行号")]
+ public string RowNum { get; set; }
+ public override object[] GetKeys()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/src/API.Domain/BudgetDbProperties.cs b/src/API.Domain/BudgetDbProperties.cs
new file mode 100644
index 0000000..5c8efc8
--- /dev/null
+++ b/src/API.Domain/BudgetDbProperties.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Data;
+
+namespace API
+{
+
+ public static class BudgetDbProperties
+ {
+ public static string DbTablePrefix { get; internal set; } = "budget";
+
+ public static string DbSchema { get; internal set; } = AbpCommonDbProperties.DbSchema;
+
+ public const string ConnectionStringName = "Budget";
+ }
+}
diff --git a/src/API.Domain/Data/APIDbMigrationService.cs b/src/API.Domain/Data/APIDbMigrationService.cs
new file mode 100644
index 0000000..4f6f885
--- /dev/null
+++ b/src/API.Domain/Data/APIDbMigrationService.cs
@@ -0,0 +1,220 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Logging.Abstractions;
+using Volo.Abp.Data;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Identity;
+using Volo.Abp.MultiTenancy;
+using Volo.Abp.TenantManagement;
+
+namespace API.Data
+{
+ public class APIDbMigrationService : ITransientDependency
+ {
+ public ILogger Logger { get; set; }
+
+ private readonly IDataSeeder _dataSeeder;
+ private readonly IEnumerable _dbSchemaMigrators;
+ private readonly ITenantRepository _tenantRepository;
+ private readonly ICurrentTenant _currentTenant;
+
+ public APIDbMigrationService(
+ IDataSeeder dataSeeder,
+ IEnumerable dbSchemaMigrators,
+ ITenantRepository tenantRepository,
+ ICurrentTenant currentTenant)
+ {
+ _dataSeeder = dataSeeder;
+ _dbSchemaMigrators = dbSchemaMigrators;
+ _tenantRepository = tenantRepository;
+ _currentTenant = currentTenant;
+
+ Logger = NullLogger.Instance;
+ }
+
+ public async Task MigrateAsync()
+ {
+ var initialMigrationAdded = AddInitialMigrationIfNotExist();
+
+ if (initialMigrationAdded)
+ {
+ return;
+ }
+
+ Logger.LogInformation("Started database migrations...");
+
+ await MigrateDatabaseSchemaAsync();
+ await SeedDataAsync();
+
+ Logger.LogInformation($"Successfully completed host database migrations.");
+
+ var tenants = await _tenantRepository.GetListAsync(includeDetails: true);
+
+ var migratedDatabaseSchemas = new HashSet();
+ foreach (var tenant in tenants)
+ {
+ using (_currentTenant.Change(tenant.Id))
+ {
+ if (tenant.ConnectionStrings.Any())
+ {
+ var tenantConnectionStrings = tenant.ConnectionStrings
+ .Select(x => x.Value)
+ .ToList();
+
+ if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings))
+ {
+ await MigrateDatabaseSchemaAsync(tenant);
+
+ migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings);
+ }
+ }
+
+ await SeedDataAsync(tenant);
+ }
+
+ Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations.");
+ }
+
+ Logger.LogInformation("Successfully completed all database migrations.");
+ Logger.LogInformation("You can safely end this process...");
+ }
+
+ private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null)
+ {
+ Logger.LogInformation(
+ $"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
+
+ foreach (var migrator in _dbSchemaMigrators)
+ {
+ await migrator.MigrateAsync();
+ }
+ }
+
+ private async Task SeedDataAsync(Tenant tenant = null)
+ {
+ Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
+
+ await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id)
+ .WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue)
+ .WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue)
+ );
+ }
+
+ 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;
+ }
+ }
+
+ private bool DbMigrationsProjectExists()
+ {
+ var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
+
+ return dbMigrationsProjectFolder != null;
+ }
+
+ private bool MigrationsFolderExists()
+ {
+ var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
+
+ return Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "Migrations"));
+ }
+
+ private void AddInitialMigration()
+ {
+ Logger.LogInformation("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...");
+ }
+ }
+
+ 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"));
+ }
+
+ 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;
+ }
+ }
+}
diff --git a/src/API.Domain/Data/IAPIDbSchemaMigrator.cs b/src/API.Domain/Data/IAPIDbSchemaMigrator.cs
new file mode 100644
index 0000000..12060e7
--- /dev/null
+++ b/src/API.Domain/Data/IAPIDbSchemaMigrator.cs
@@ -0,0 +1,9 @@
+using System.Threading.Tasks;
+
+namespace API.Data
+{
+ public interface IAPIDbSchemaMigrator
+ {
+ Task MigrateAsync();
+ }
+}
diff --git a/src/API.Domain/Data/NullAPIDbSchemaMigrator.cs b/src/API.Domain/Data/NullAPIDbSchemaMigrator.cs
new file mode 100644
index 0000000..d0eb8eb
--- /dev/null
+++ b/src/API.Domain/Data/NullAPIDbSchemaMigrator.cs
@@ -0,0 +1,16 @@
+using System.Threading.Tasks;
+using Volo.Abp.DependencyInjection;
+
+namespace API.Data
+{
+ /* This is used if database provider does't define
+ * IAPIDbSchemaMigrator implementation.
+ */
+ public class NullAPIDbSchemaMigrator : IAPIDbSchemaMigrator, ITransientDependency
+ {
+ public Task MigrateAsync()
+ {
+ return Task.CompletedTask;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/API.Domain/DataSources/JQ_COMPARE.cs b/src/API.Domain/DataSources/JQ_COMPARE.cs
new file mode 100644
index 0000000..a276a6f
--- /dev/null
+++ b/src/API.Domain/DataSources/JQ_COMPARE.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+
+namespace API.DataSources
+{
+ [DisplayName("久其-对照表")]
+ public class JQ_COMPARE : AuditedAggregateRoot
+ {
+ public JQ_COMPARE()
+ {
+
+ }
+
+ public JQ_COMPARE(Guid id, string newItem, string newNum, string oldItem, string oldNum, string rowNum, string type) : base(id)
+ {
+ NewItem = newItem;
+ NewNum = newNum;
+ OldItem = oldItem;
+ OldNum = oldNum;
+ RowNum = rowNum;
+ Type = type;
+ }
+
+ [DisplayName("新久其项目")]
+ public string NewItem { get; set; }
+ [DisplayName("新久其行次")]
+ public string NewNum { get; set; }
+ [DisplayName("旧久其项目")]
+ public string OldItem { get; set; }
+ [DisplayName("旧久其行次")]
+ public string OldNum { get; set; }
+ [DisplayName("系统久其行次")]
+ public string RowNum { get; set; }
+ [DisplayName("对照表类型")]
+ public string Type { get; set; }
+
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_LRB.cs b/src/API.Domain/DataSources/ODS_JQ_LRB.cs
new file mode 100644
index 0000000..33a1024
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_LRB.cs
@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+
+namespace API.DataSources
+{
+ [DisplayName("久其-利润表")]
+ public class ODS_JQ_LRB : AuditedAggregateRoot
+ {
+ public ODS_JQ_LRB()
+ {
+
+ }
+
+ public ODS_JQ_LRB(Guid id , string cOMPANYCode, string iTEM, string rOW_NUM, decimal nUM_MONTH, decimal aDD_UP_NUM_YEAR, DateTime cREATE_TIME, string dATA_TIME, decimal lAST_YEAR_SAME_PERIOD, string sHEET_NAME, string tABLENUM, int year, int month):base(id)
+ {
+ CompanyCode = cOMPANYCode;
+ ITEM = iTEM;
+ RowNum = rOW_NUM;
+ NUM_MONTH = nUM_MONTH;
+ ADD_UP_NUM_YEAR = aDD_UP_NUM_YEAR;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ LAST_YEAR_SAME_PERIOD = lAST_YEAR_SAME_PERIOD;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ Year = year;
+ Month = month;
+ }
+ public void SetCompanyCode(string companycode)
+ {
+ CompanyCode = companycode;
+ }
+ public void SetId(Guid id)
+ {
+ Id = id;
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("本月数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal NUM_MONTH { get; set; }
+ [DisplayName("本年累计数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal ADD_UP_NUM_YEAR { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+ [DisplayName("上年同期累计数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal LAST_YEAR_SAME_PERIOD { get; set; }
+ [DisplayName("表名")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_LRBManager.cs b/src/API.Domain/DataSources/ODS_JQ_LRBManager.cs
new file mode 100644
index 0000000..a8d040a
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_LRBManager.cs
@@ -0,0 +1,129 @@
+using API.BudgetDataSources;
+using API.JQDataSources;
+using API.ManageBase;
+using EFCore.BulkExtensions;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Domain.Services;
+using Volo.Abp.ObjectMapping;
+using Volo.Abp.Uow;
+
+namespace API.DataSources
+{
+
+
+ public class ODS_JQ_LRBManager : DomainService
+ {
+ private readonly IRepository _repository;
+ private readonly IRepository _jqrepository;
+ private readonly IRepository _budgetRepository;
+ private readonly IRepository _lrbCompareRepository;
+ private readonly IRepository _companyrepository;
+ private readonly IObjectMapper _objectMapper;
+
+ public ODS_JQ_LRBManager( IRepository repository, IRepository jqrepository, IRepository budgetRepository, IRepository lrbCompareRepository, IObjectMapper objectMapper, IRepository companyrepository)
+ {
+ _repository = repository;
+ _jqrepository = jqrepository;
+ _budgetRepository = budgetRepository;
+ _lrbCompareRepository = lrbCompareRepository;
+ _objectMapper = objectMapper;
+ _companyrepository = companyrepository;
+ }
+ [UnitOfWork]
+ public async virtual Task InsterLRB(int year, int month)
+ {
+ Logger.LogInformation($"LRB开始同步【{year}年{month}月】数据!");
+
+ var Comapnys = await _companyrepository.GetListAsync(r => !string.IsNullOrEmpty(r.BudgetCompanyCode));
+ var dicComapny = Comapnys.ToDictionary(r => r.CompanyCode);
+ try
+ {
+ //获取对照表行号
+ var lrbcomp = await _lrbCompareRepository.GetListAsync(r => r.Type == "JQ_COMPARE_LRB" && !string.IsNullOrEmpty(r.NewNum));
+ var numDic = lrbcomp.ToDictionary(r => r.NewNum);
+
+ var datetimestr = year.ToString() + "-" + (month > 9 ? month.ToString() : "0" + month.ToString());
+ var lrbitems = await _jqrepository.GetListAsync(r => r.DATA_TIME == datetimestr);
+ List entitys = new List();
+ List budget_entitys = new List();
+ foreach (var item in lrbitems)
+ {
+ string rownum = item.ROW_NUM;
+ if (!string.IsNullOrEmpty(item.ROW_NUM))
+ {
+ rownum = numDic.ContainsKey(rownum) ? numDic[rownum].RowNum : rownum;
+ }
+
+ decimal nUM_MONTH = 0;
+ decimal.TryParse(item.NUM_MONTH, out nUM_MONTH);
+ decimal aDD_UP_NUM_YEAR = 0;
+ decimal.TryParse(item.ADD_UP_NUM_YEAR, out aDD_UP_NUM_YEAR);
+ decimal lAST_YEAR_SAME_PERIOD = 0;
+ decimal.TryParse(item.LAST_YEAR_SAME_PERIOD, out lAST_YEAR_SAME_PERIOD);
+
+ ODS_JQ_LRB entity = new ODS_JQ_LRB(
+ GuidGenerator.Create(),
+ item.COMPANY,
+ item.ITEM,
+ rownum,
+ nUM_MONTH,
+ aDD_UP_NUM_YEAR,
+ item.CREATE_TIME,
+ item.DATA_TIME,
+ lAST_YEAR_SAME_PERIOD,
+ item.SHEET_NAME,
+ item.TABLENUM,
+ year,
+ month);
+ entitys.Add(entity);
+
+ var budget_entity = _objectMapper.Map(entity);
+ budget_entity.CompanyCode = dicComapny.ContainsKey(budget_entity.CompanyCode) ? dicComapny[budget_entity.CompanyCode].BudgetCompanyCode : budget_entity.CompanyCode;
+ budget_entitys.Add(budget_entity);
+ }
+ var db = await _repository.GetDbContextAsync();
+ await db.BulkInsertAsync(entitys);
+ var db_budget = await _budgetRepository.GetDbContextAsync();
+ await db_budget.BulkInsertAsync(budget_entitys);
+ //await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+ //await _repository.InsertManyAsync(entitys);
+ Logger.LogInformation($"LRB完成【{year}年{month}月】数据同步!");
+ return true;
+
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"LRB同步【{year}年{month}月】数据失败!" + ex.Message+ ex?.InnerException?.Message);
+ return false;
+
+ }
+ }
+
+ [UnitOfWork]
+ public async virtual Task DeletecLRB(int year, int month)
+ {
+ Logger.LogInformation($"LRB开始删除【{year}年{month}月】数据!");
+ try
+ {
+ // await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+
+ int aa = await _repository.Where(r => r.Year == year && r.Month == month).BatchDeleteAsync();
+ int bb = await _budgetRepository.Where(r => r.Year == year && r.Month == month).BatchDeleteAsync();
+ Logger.LogInformation($"LRB完成删除【{year}年{month}月】数据!");
+ return true;
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"LRB删除【{year}年{month}月】数据失败!" + ex.Message + ex.InnerException.Message);
+ return false;
+ }
+
+ }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_LRMXB.cs b/src/API.Domain/DataSources/ODS_JQ_LRMXB.cs
new file mode 100644
index 0000000..0afa5f8
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_LRMXB.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+
+namespace API.DataSources
+{
+ public class ODS_JQ_LRMXB : AuditedAggregateRoot
+ {
+ public ODS_JQ_LRMXB()
+ {
+
+ }
+
+ public ODS_JQ_LRMXB(Guid id,string companyCode, string iTEM, string rowNum, decimal sALE_MONTH, decimal sALE_YEAR, decimal iN_MONTH, decimal iN_YEAT, decimal cOST_MONTH, decimal cOST_YEAR, decimal tAX_YEAR, decimal tAX_MONTH, decimal pROFIT_MONTH, decimal pROFIT_YEAR, DateTime cREATE_TIME, string sHEET_NAME, string dATA_TIME, int year, int month):base(id)
+ {
+ CompanyCode = companyCode;
+ ITEM = iTEM;
+ RowNum = rowNum;
+ SALE_MONTH = sALE_MONTH;
+ SALE_YEAR = sALE_YEAR;
+ IN_MONTH = iN_MONTH;
+ IN_YEAT = iN_YEAT;
+ COST_MONTH = cOST_MONTH;
+ COST_YEAR = cOST_YEAR;
+ TAX_YEAR = tAX_YEAR;
+ TAX_MONTH = tAX_MONTH;
+ PROFIT_MONTH = pROFIT_MONTH;
+ PROFIT_YEAR = pROFIT_YEAR;
+ CREATE_TIME = cREATE_TIME;
+ SHEET_NAME = sHEET_NAME;
+ DATA_TIME = dATA_TIME;
+ Year = year;
+ Month = month;
+ }
+
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("销售数量本月数")]
+ public decimal SALE_MONTH { get; set; }
+ [DisplayName("销售数量本年累计数")]
+ public decimal SALE_YEAR { get; set; }
+ [DisplayName("业务收入本月数")]
+ public decimal IN_MONTH { get; set; }
+ [DisplayName("业务收入本年累计数")]
+ public decimal IN_YEAT { get; set; }
+ [DisplayName("业务成本本月数")]
+ public decimal COST_MONTH { get; set; }
+ [DisplayName("业务成本本年累计数")]
+ public decimal COST_YEAR { get; set; }
+ [DisplayName("税金及附加本月数")]
+ public decimal TAX_YEAR { get; set; }
+ [DisplayName("税金及附加本年累计数")]
+ public decimal TAX_MONTH { get; set; }
+ [DisplayName("业务利润本月数")]
+ public decimal PROFIT_MONTH { get; set; }
+ [DisplayName("业务利润本年累计数")]
+ public decimal PROFIT_YEAR { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("表单名称")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("数据时间")]
+ public string DATA_TIME { get; set; }
+
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_LRMXBManager.cs b/src/API.Domain/DataSources/ODS_JQ_LRMXBManager.cs
new file mode 100644
index 0000000..d65a159
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_LRMXBManager.cs
@@ -0,0 +1,136 @@
+using API.BudgetDataSources;
+using API.JQDataSources;
+using EFCore.BulkExtensions;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Domain.Services;
+using Volo.Abp.Uow;
+
+namespace API.DataSources
+{
+
+ public class ODS_JQ_LRMXBManager : DomainService
+ {
+ private readonly IRepository _repository;
+ private readonly IRepository _jqrepository;
+ private readonly IRepository _lrbCompareRepository;
+ public ODS_JQ_LRMXBManager(IRepository repository, IRepository jqrepository, IRepository lrbCompareRepository)
+ {
+ _repository = repository;
+ _jqrepository = jqrepository;
+ _lrbCompareRepository = lrbCompareRepository;
+ }
+ [UnitOfWork]
+ public async virtual Task InsterLRMXB(int year, int month)
+ {
+ Logger.LogInformation($"LRMXB开始同步【{year}年{month}月】数据!");
+ try
+ {
+ //获取对照表行号
+ var lrbcomp = await _lrbCompareRepository.GetListAsync(r => r.Type == "JQ_COMPARE_LRMX" && !string.IsNullOrEmpty(r.NewNum));
+ var numDic = lrbcomp.ToDictionary(r => r.NewNum);
+
+ var datetimestr = year.ToString()+"-" + (month > 9 ? month.ToString():"0"+ month.ToString());
+ var lrbitems = await _jqrepository.GetListAsync(r=>r.DATA_TIME== datetimestr);
+ List entitys = new List();
+ foreach (var item in lrbitems)
+ {
+ string rownum = item.ROW_NUM;
+ if (!string.IsNullOrEmpty(item.ROW_NUM))
+ {
+ rownum = numDic.ContainsKey(rownum) ? numDic[rownum].RowNum : rownum;
+ }
+
+ decimal sALE_MONTH = 0;
+ decimal.TryParse(item.SALE_MONTH, out sALE_MONTH);
+ decimal sALE_YEAR = 0;
+ decimal.TryParse(item.SALE_YEAR, out sALE_YEAR);
+
+ decimal iN_MONTH = 0;
+ decimal.TryParse(item.IN_MONTH, out iN_MONTH);
+ decimal iN_YEAT = 0;
+ decimal.TryParse(item.IN_YEAR, out iN_YEAT);
+
+
+ decimal cOST_MONTH = 0;
+ decimal.TryParse(item.COST_MONTH, out cOST_MONTH);
+ decimal cOST_YEAR = 0;
+ decimal.TryParse(item.COST_YEAR, out cOST_YEAR);
+
+ decimal tAX_YEAR = 0;
+ decimal.TryParse(item.TAX_YEAR, out tAX_YEAR);
+ decimal tAX_MONTH = 0;
+ decimal.TryParse(item.TAX_MONTH, out tAX_MONTH);
+
+
+ decimal pROFIT_MONTH = 0;
+ decimal.TryParse(item.PROFIT_MONTH, out pROFIT_MONTH);
+ decimal pROFIT_YEAR = 0;
+ decimal.TryParse(item.PROFIT_YEAR, out pROFIT_YEAR);
+
+
+ ODS_JQ_LRMXB entity = new ODS_JQ_LRMXB(
+ GuidGenerator.Create(),
+ item.COMPANY,
+ item.ITEM,
+ rownum,
+ sALE_MONTH,
+ sALE_YEAR,
+ iN_MONTH,
+ iN_YEAT,
+ cOST_MONTH,
+ cOST_YEAR,
+ tAX_YEAR,
+ tAX_MONTH,
+ pROFIT_MONTH,
+ pROFIT_YEAR,
+ DateTime.Now,
+ item.SHEET_NAME,
+ item.DATA_TIME,
+ year,
+ month
+);
+ entitys.Add(entity);
+ }
+ var db = await _repository.GetDbContextAsync();
+ await db.BulkInsertAsync(entitys);
+ //await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+ //await _repository.InsertManyAsync(entitys);
+ Logger.LogInformation($"LRMXB完成【{year}年{month}月】数据同步!");
+ return true;
+
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"LRMXB同步【{year}年{month}月】数据失败!" + ex.Message + ex?.InnerException?.Message);
+ return false;
+
+ }
+ }
+
+ [UnitOfWork]
+ public async virtual Task DeletecLRMXB(int year, int month)
+ {
+ Logger.LogInformation($"LRMXB开始删除【{year}年{month}月】数据!");
+ try
+ {
+ // await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+
+ int aa = await _repository.Where(r => r.Year == year && r.Month == month).BatchDeleteAsync();
+ Logger.LogInformation($"LRMXB完成删除【{year}年{month}月】数据!");
+ return true;
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"LRMXB删除【{year}年{month}月】数据失败!" + ex.Message + ex.InnerException.Message);
+ return false;
+ }
+
+ }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_QJFYB.cs b/src/API.Domain/DataSources/ODS_JQ_QJFYB.cs
new file mode 100644
index 0000000..32231d2
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_QJFYB.cs
@@ -0,0 +1,73 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace API.DataSources
+{
+ [DisplayName("久其-期间费用表")]
+ public class ODS_JQ_QJFYB : AuditedAggregateRoot
+ {
+ public ODS_JQ_QJFYB()
+ {
+
+ }
+
+ public ODS_JQ_QJFYB(Guid id,string cOMPANYCode, string iTEM, string rOW_NUM, decimal nUM_MONTH, decimal aDD_UP_NUM_YEAR, DateTime cREATE_TIME, string dATA_TIME, decimal lAST_YEAR_ADD_UP, string sHEET_NAME, string tABLENUM, int year, int month) : base(id)
+ {
+ CompanyCode = cOMPANYCode;
+ ITEM = iTEM;
+ RowNum = rOW_NUM;
+ NUM_MONTH = nUM_MONTH;
+ ADD_UP_NUM_YEAR = aDD_UP_NUM_YEAR;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ LAST_YEAR_ADD_UP = lAST_YEAR_ADD_UP;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ Year = year;
+ Month = month;
+ }
+ public void SetId(Guid id)
+ {
+ Id = id;
+ }
+ public void SetCompanyCode(string companycode)
+ {
+ CompanyCode = companycode;
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("本月数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal NUM_MONTH { get; set; }
+ [DisplayName("本年累计数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal ADD_UP_NUM_YEAR { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+ [DisplayName("上年同期累计数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal LAST_YEAR_ADD_UP { get; set; }
+ [DisplayName("表名")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_QJFYBManager.cs b/src/API.Domain/DataSources/ODS_JQ_QJFYBManager.cs
new file mode 100644
index 0000000..c604e61
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_QJFYBManager.cs
@@ -0,0 +1,120 @@
+using API.BudgetDataSources;
+using API.JQDataSources;
+using API.ManageBase;
+using EFCore.BulkExtensions;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Domain.Services;
+using Volo.Abp.ObjectMapping;
+using Volo.Abp.Uow;
+
+namespace API.DataSources
+{
+
+
+ public class ODS_JQ_QJFYBManager : DomainService
+ {
+ private readonly IRepository _repository;
+ private readonly IRepository _jqrepository;
+ private readonly IRepository _lrbCompareRepository;
+ private readonly IRepository _budgetRepository;
+ private readonly IRepository _companyrepository;
+ private readonly IObjectMapper _objectMapper;
+ public ODS_JQ_QJFYBManager(IRepository repository, IRepository budgetRepository, IRepository jqrepository, IRepository lrbCompareRepository, IObjectMapper objectMapper, IRepository companyrepository)
+ {
+ _repository = repository;
+ _jqrepository = jqrepository;
+ _budgetRepository = budgetRepository;
+ _lrbCompareRepository = lrbCompareRepository;
+ _objectMapper = objectMapper;
+ _companyrepository = companyrepository;
+ }
+ [UnitOfWork]
+ public async virtual Task InsterQJFYB(int year, int month)
+ {
+ Logger.LogInformation($"QJFYB开始同步【{year}年{month}月】数据!");
+
+ var Comapnys = await _companyrepository.GetListAsync(r => !string.IsNullOrEmpty(r.BudgetCompanyCode));
+ var dicComapny = Comapnys.ToDictionary(r => r.CompanyCode);
+ try
+ {
+ //获取对照表行号
+ var lrbcomp = await _lrbCompareRepository.GetListAsync(r => r.Type == "JQ_COMPARE_QJFYB" && !string.IsNullOrEmpty(r.NewNum));
+ var numDic = lrbcomp.ToDictionary(r => r.NewNum);
+
+ var datetimestr = year.ToString() + "-" + (month > 9 ? month.ToString() : "0" + month.ToString());
+ var lrbitems = await _jqrepository.GetListAsync(r => r.DATA_TIME == datetimestr);
+ List entitys = new List();
+ List budget_entitys = new List();
+ foreach (var item in lrbitems)
+ {
+ string rownum = item.ROW_NUM;
+ if (!string.IsNullOrEmpty(item.ROW_NUM))
+ {
+ rownum = numDic.ContainsKey(rownum) ? numDic[rownum].RowNum : rownum;
+ }
+
+ ODS_JQ_QJFYB entity = new ODS_JQ_QJFYB(
+ GuidGenerator.Create(),
+ item.COMPANY,
+ item.ITEM,
+ rownum,
+ decimal.TryParse(item.NUM_MONTH, out decimal num_month)? num_month : 0,
+ decimal.TryParse(item.ADD_UP_NUM_YEAR, out decimal add_up_num_year)? add_up_num_year:0,
+ item.CREATE_TIME,
+ item.DATA_TIME,
+ decimal.TryParse(item.LAST_YEAR_ADD_UP, out decimal last_year_add_up)? last_year_add_up:0,
+ item.SHEET_NAME,
+ item.TABLENUM,
+ year,
+ month);
+ entitys.Add(entity);
+ //预算表
+ var budget_entity = _objectMapper.Map(entity);
+ budget_entity.CompanyCode = dicComapny.ContainsKey(budget_entity.CompanyCode) ? dicComapny[budget_entity.CompanyCode].BudgetCompanyCode : budget_entity.CompanyCode;
+ budget_entitys.Add(budget_entity);
+ }
+ var db = await _repository.GetDbContextAsync();
+ await db.BulkInsertAsync(entitys);
+ var db_budget = await _budgetRepository.GetDbContextAsync();
+ await db_budget.BulkInsertAsync(budget_entitys);
+ //await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+ //await _repository.InsertManyAsync(entitys);
+ Logger.LogInformation($"QJFYB完成【{year}年{month}月】数据同步!");
+ return true;
+
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"QJFYB同步【{year}年{month}月】数据失败!" + ex.Message + ex?.InnerException?.Message);
+ return false;
+
+ }
+ }
+ [UnitOfWork]
+ public async virtual Task DeletecQJFYB(int year, int month)
+ {
+ Logger.LogInformation($"QJFYB开始删除【{year}年{month}月】数据!");
+ try
+ {
+ // await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+
+ int aa = await _repository.Where(r => r.Year == year && r.Month == month).BatchDeleteAsync();
+ int bb = await _budgetRepository.Where(r => r.Year == year && r.Month == month).BatchDeleteAsync();
+ Logger.LogInformation($"QJFYB完成删除【{year}年{month}月】数据!");
+ return true;
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"QJFYB删除【{year}年{month}月】数据失败!" + ex.Message + ex.InnerException.Message);
+ return false;
+ }
+
+ }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_SCCBB.cs b/src/API.Domain/DataSources/ODS_JQ_SCCBB.cs
new file mode 100644
index 0000000..87d6ee7
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_SCCBB.cs
@@ -0,0 +1,85 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace API.DataSources
+{
+ [DisplayName("久其-生产成本表")]
+ public class ODS_JQ_SCCBB : AuditedAggregateRoot
+ {
+ public ODS_JQ_SCCBB()
+ {
+
+ }
+
+ public ODS_JQ_SCCBB(Guid id ,string companyCode, string iTEM, string rowNum, decimal mONTH_BEGINNING, decimal tR_MONTH, decimal wG_MONTH, decimal wG_ADD_UP, decimal mONTH_CLOSING, decimal tR_ADD_UP, DateTime cREATE_TIME, string dATA_TIME, int year, int month, string sHEET_NAME, string tABLENUM):base(id)
+ {
+ CompanyCode = companyCode;
+ ITEM = iTEM;
+ RowNum = rowNum;
+ MONTH_BEGINNING = mONTH_BEGINNING;
+ TR_MONTH = tR_MONTH;
+ WG_MONTH = wG_MONTH;
+ WG_ADD_UP = wG_ADD_UP;
+ MONTH_CLOSING = mONTH_CLOSING;
+ TR_ADD_UP = tR_ADD_UP;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ Year = year;
+ Month = month;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ }
+
+ public void SetCompanyCode(string companycode)
+ {
+ CompanyCode = companycode;
+ }
+ public void SetId(Guid id)
+ {
+ Id = id;
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("月初余额")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal MONTH_BEGINNING { get; set; }
+ [DisplayName("投入本月")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal TR_MONTH { get; set; }
+ [DisplayName("完工本月")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal WG_MONTH { get; set; }
+ [DisplayName("完工累计")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal WG_ADD_UP { get; set; }
+ [DisplayName("月末余额")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal MONTH_CLOSING { get; set; }
+ [DisplayName("投入累计")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal TR_ADD_UP { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+ [DisplayName("表名")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_SCCBBManager.cs b/src/API.Domain/DataSources/ODS_JQ_SCCBBManager.cs
new file mode 100644
index 0000000..e80bfb3
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_SCCBBManager.cs
@@ -0,0 +1,123 @@
+using API.JQDataSources;
+using EFCore.BulkExtensions;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Domain.Services;
+using Volo.Abp.Uow;
+using Volo.Abp.ObjectMapping;
+using API.BudgetDataSources;
+using API.ManageBase;
+
+namespace API.DataSources
+{
+
+ public class ODS_JQ_SCCBBManager : DomainService
+ {
+ private readonly IRepository _repository;
+ private readonly IRepository _jqrepository;
+ private readonly IRepository _budgetRepository;
+ private readonly IRepository _lrbCompareRepository;
+ private readonly IRepository _companyrepository;
+ private readonly IObjectMapper _objectMapper;
+ public ODS_JQ_SCCBBManager(IRepository repository, IRepository jqrepository, IRepository budgetRepository, IRepository lrbCompareRepository, IObjectMapper objectMapper, IRepository companyrepository)
+ {
+ _repository = repository;
+ _jqrepository = jqrepository;
+ _budgetRepository = budgetRepository;
+ _lrbCompareRepository = lrbCompareRepository;
+ _objectMapper = objectMapper;
+ _companyrepository = companyrepository;
+ }
+ [UnitOfWork]
+ public async virtual Task InsterSCCBB(int year, int month)
+ {
+ Logger.LogInformation($"SCCBB开始同步【{year}年{month}月】数据!");
+
+ var Comapnys = await _companyrepository.GetListAsync(r => !string.IsNullOrEmpty(r.BudgetCompanyCode));
+ var dicComapny = Comapnys.ToDictionary(r => r.CompanyCode);
+ try
+ {
+ //获取对照表行号
+ var lrbcomp = await _lrbCompareRepository.GetListAsync(r => r.Type == "JQ_COMPARE_SCCBB" && !string.IsNullOrEmpty(r.NewNum));
+ var numDic = lrbcomp.ToDictionary(r => r.NewNum);
+
+ var datetimestr = year.ToString() + "-" + (month > 9 ? month.ToString() : "0" + month.ToString());
+ var lrbitems = await _jqrepository.GetListAsync(r => r.DATA_TIME == datetimestr);
+ List entitys = new List();
+ List budget_entitys = new List();
+ foreach (var item in lrbitems)
+ {
+ string rownum = item.ROW_NUM;
+ if (!string.IsNullOrEmpty(item.ROW_NUM))
+ {
+ rownum = numDic.ContainsKey(rownum) ? numDic[rownum].RowNum : rownum;
+ }
+
+ ODS_JQ_SCCBB entity = new ODS_JQ_SCCBB(
+ GuidGenerator.Create(),
+ item.COMPANY,
+ item.ITEM,
+ rownum,
+ decimal.TryParse(item.MONTH_BEGINNING, out decimal month_beginning)? month_beginning:0,
+ decimal.TryParse(item.TR_MONTH, out decimal tr_month)? tr_month:0,
+ decimal.TryParse(item.WG_MONTH, out decimal wg_month) ? wg_month:0,
+ decimal.TryParse(item.WG_ADD_UP, out decimal wg_add_up) ? wg_add_up : 0,
+ decimal.TryParse(item.MONTH_CLOSING, out decimal month_closing)? month_closing:0,
+ decimal.TryParse(item.TR_ADD_UP, out decimal tr_add_up) ? tr_add_up:0,
+ item.CREATE_TIME,
+ item.DATA_TIME,
+ year,
+ month ,
+ item.SHEET_NAME,
+ item.TABLENUM
+ );
+ entitys.Add(entity);
+ //预算表
+ var budget_entity = _objectMapper.Map(entity);
+ budget_entity.CompanyCode = dicComapny.ContainsKey(budget_entity.CompanyCode) ? dicComapny[budget_entity.CompanyCode].BudgetCompanyCode : budget_entity.CompanyCode;
+ budget_entitys.Add(budget_entity);
+ }
+ var db = await _repository.GetDbContextAsync();
+ await db.BulkInsertAsync(entitys);
+ var db_budget = await _budgetRepository.GetDbContextAsync();
+ await db_budget.BulkInsertAsync(budget_entitys);
+ //await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+ //await _repository.InsertManyAsync(entitys);
+ Logger.LogInformation($"SCCBB完成【{year}年{month}月】数据同步!");
+ return true;
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"SCCBB同步【{year}年{month}月】数据失败!" + ex.Message + ex?.InnerException?.Message);
+ return false;
+
+ }
+ }
+
+ [UnitOfWork]
+ public async virtual Task DeletecSCCBB(int year, int month)
+ {
+ Logger.LogInformation($"SCCBB开始删除【{year}年{month}月】数据!");
+ try
+ {
+ // await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+
+ int aa = await _repository.Where(r => r.Year == year && r.Month == month).BatchDeleteAsync();
+ int bb = await _budgetRepository.Where(r => r.Year == year && r.Month == month).BatchDeleteAsync();
+ Logger.LogInformation($"SCCBB完成删除【{year}年{month}月】数据!");
+ return true;
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"SCCBB删除【{year}年{month}月】数据失败!" + ex.Message + ex.InnerException.Message);
+ return false;
+ }
+
+ }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_XJLLB_INNER_YEAR.cs b/src/API.Domain/DataSources/ODS_JQ_XJLLB_INNER_YEAR.cs
new file mode 100644
index 0000000..2c53923
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_XJLLB_INNER_YEAR.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace API.DataSources
+{
+ [DisplayName("久其-现金流量表(内部)")]
+ public class ODS_JQ_XJLLB_INNER_YEAR : AuditedAggregateRoot
+ {
+ public ODS_JQ_XJLLB_INNER_YEAR()
+ {
+
+ }
+
+ public ODS_JQ_XJLLB_INNER_YEAR(Guid id ,string companyCode, string iTEM, string rowNum, decimal aLL_TOTAL, decimal hBZJ_TOTAL, decimal hBZJ_JTWB, decimal hBZJ_JTNB, decimal ySPJ_TOTAL, decimal ySPJ_JTWB, decimal ySPJ_JTNB, DateTime cREATE_TIME, string dATA_TIME, int year, int month, string sHEET_NAME, string tABLENUM):base(id)
+ {
+ CompanyCode = companyCode;
+ ITEM = iTEM;
+ RowNum = rowNum;
+ ALL_TOTAL = aLL_TOTAL;
+ HBZJ_TOTAL = hBZJ_TOTAL;
+ HBZJ_JTWB = hBZJ_JTWB;
+ HBZJ_JTNB = hBZJ_JTNB;
+ YSPJ_TOTAL = ySPJ_TOTAL;
+ YSPJ_JTWB = ySPJ_JTWB;
+ YSPJ_JTNB = ySPJ_JTNB;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ Year = year;
+ Month = month;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ }
+
+ public void SetCompanyCode(string companycode)
+ {
+ CompanyCode = companycode;
+ }
+ public void SetId(Guid id)
+ {
+ Id = id;
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("总计")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal ALL_TOTAL { get; set; }
+ [DisplayName("货币资金合计")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal HBZJ_TOTAL { get; set; }
+ [DisplayName("货币资金集团外部")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal HBZJ_JTWB { get; set; }
+ [DisplayName("货币资金集团内部")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal HBZJ_JTNB { get; set; }
+ [DisplayName("应收票据合计")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal YSPJ_TOTAL { get; set; }
+ [DisplayName("应收票据集团外部")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal YSPJ_JTWB { get; set; }
+ [DisplayName("应收票据集团内部")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal YSPJ_JTNB { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+ [DisplayName("表名")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_XJLLB_INNER_YEARManager.cs b/src/API.Domain/DataSources/ODS_JQ_XJLLB_INNER_YEARManager.cs
new file mode 100644
index 0000000..9fe65b7
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_XJLLB_INNER_YEARManager.cs
@@ -0,0 +1,125 @@
+using API.BudgetDataSources;
+using API.JQDataSources;
+using API.ManageBase;
+using EFCore.BulkExtensions;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Domain.Services;
+using Volo.Abp.ObjectMapping;
+using Volo.Abp.Uow;
+
+namespace API.DataSources
+{
+ public class ODS_JQ_XJLLB_INNER_YEARManager : DomainService
+ {
+ private readonly IRepository _repository;
+ private readonly IRepository _jqrepository;
+ private readonly IRepository _lrbCompareRepository;
+ private readonly IRepository _budgetRepository;
+ private readonly IRepository _companyrepository;
+ private readonly IObjectMapper _objectMapper;
+ public ODS_JQ_XJLLB_INNER_YEARManager(IRepository repository, IRepository budgetRepository, IRepository jqrepository, IRepository lrbCompareRepository, IObjectMapper objectMapper, IRepository companyrepository)
+ {
+ _repository = repository;
+ _jqrepository = jqrepository;
+ _budgetRepository = budgetRepository;
+ _lrbCompareRepository = lrbCompareRepository;
+ _objectMapper = objectMapper;
+ _companyrepository = companyrepository;
+ }
+ [UnitOfWork]
+ public async virtual Task InsterXJLLBINNER(int year, int month)
+ {
+ Logger.LogInformation($"XJLLBINNER开始同步【{year}年{month}月】数据!");
+
+ var Comapnys = await _companyrepository.GetListAsync(r => !string.IsNullOrEmpty(r.BudgetCompanyCode));
+ var dicComapny = Comapnys.ToDictionary(r => r.CompanyCode);
+
+ try
+ {
+ //获取对照表行号
+ var lrbcomp = await _lrbCompareRepository.GetListAsync(r => r.Type == "JQ_COMPARE_XJLLB" && !string.IsNullOrEmpty(r.NewNum));
+ var numDic = lrbcomp.ToDictionary(r => r.NewNum);
+
+ var datetimestr = year.ToString() + "-" + (month > 9 ? month.ToString() : "0" + month.ToString());
+ var lrbitems = await _jqrepository.GetListAsync(r => r.DATA_TIME == datetimestr);
+ List entitys = new List();
+ List budget_entitys = new List();;
+ foreach (var item in lrbitems)
+ {
+ string rownum = item.ROW_NUM;
+ if (!string.IsNullOrEmpty(item.ROW_NUM))
+ {
+ rownum = numDic.ContainsKey(rownum) ? numDic[rownum].RowNum : rownum;
+ }
+
+ ODS_JQ_XJLLB_INNER_YEAR entity = new ODS_JQ_XJLLB_INNER_YEAR(
+ GuidGenerator.Create(),
+ item.COMPANY,
+ item.ITEM,
+ rownum,
+ decimal.TryParse(item.ALL_TOTAL, out decimal all_total) ? all_total : 0,
+ decimal.TryParse(item.HBZJ_TOTAL, out decimal hbzj_total) ? hbzj_total : 0,
+ decimal.TryParse(item.HBZJ_JTWB, out decimal hbzj_jtwb) ? hbzj_jtwb : 0,
+ decimal.TryParse(item.HBZJ_JTNB, out decimal hbzj_jtnb) ? hbzj_jtnb : 0,
+ decimal.TryParse(item.YSPJ_TOTAL, out decimal yspj_total) ? yspj_total : 0,
+ decimal.TryParse(item.YSPJ_JTWB, out decimal yspj_jtwb) ? yspj_jtwb : 0,
+ decimal.TryParse(item.YSPJ_JTNB, out decimal yspj_jtnb) ? yspj_jtnb : 0,
+ item.CREATE_TIME,
+ item.DATA_TIME,
+ year,
+ month,
+ item.SHEET_NAME,
+ item.TABLENUM
+ );
+ entitys.Add(entity);
+ //预算表
+ var budget_entity = _objectMapper.Map(entity);
+ budget_entity.GUID = entity.Id;
+ budget_entity.CompanyCode = dicComapny.ContainsKey(budget_entity.CompanyCode) ? dicComapny[budget_entity.CompanyCode].BudgetCompanyCode : budget_entity.CompanyCode;
+ budget_entitys.Add(budget_entity);
+ }
+ var db = await _repository.GetDbContextAsync();
+ await db.BulkInsertAsync(entitys);
+ var db_budget = await _budgetRepository.GetDbContextAsync();
+ await db_budget.BulkInsertAsync(budget_entitys);
+ //await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+ //await _repository.InsertManyAsync(entitys);
+ Logger.LogInformation($"XJLLBINNER完成【{year}年{month}月】数据同步!");
+ return true;
+
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"XJLLBINNER同步【{year}年{month}月】数据失败!" +ex.Message + ex?.InnerException?.Message);
+ return false;
+
+ }
+ }
+ [UnitOfWork]
+ public async virtual Task DeletecXJLLBINNER(int year, int month)
+ {
+ Logger.LogInformation($"XJLLBINNER开始删除【{year}年{month}月】数据!");
+ try
+ {
+ // await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+
+ int aa = await _repository.Where(r => r.Year == year && r.Month == month).BatchDeleteAsync();
+ int bb = await _budgetRepository.Where(r => r.Year == year && r.Month == month).BatchDeleteAsync();
+ Logger.LogInformation($"XJLLBINNER完成删除【{year}年{month}月】数据!");
+ return true;
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"XJLLBINNER删除【{year}年{month}月】数据失败!" + ex.Message + ex.InnerException.Message);
+ return false;
+ }
+
+ }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_ZCFZB.cs b/src/API.Domain/DataSources/ODS_JQ_ZCFZB.cs
new file mode 100644
index 0000000..9bdfd4b
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_ZCFZB.cs
@@ -0,0 +1,72 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace API.DataSources
+{
+ [DisplayName("久其-资产负债表")]
+ public class ODS_JQ_ZCFZB : AuditedAggregateRoot
+ {
+ public ODS_JQ_ZCFZB()
+ {
+
+ }
+
+ public ODS_JQ_ZCFZB(Guid id ,string cOMPANYCODE, string iTEM, string rOW_NUM, decimal cLOSING_BALANCE, decimal bEGINNING_BALANCE, DateTime cREATE_TIME, string dATA_TIME, string iTEM_TYP, string sHEET_NAME, string tABLENUM, int year, int month):base(id)
+ {
+ CompanyCode = cOMPANYCODE;
+ ITEM = iTEM;
+ RowNum = rOW_NUM;
+ CLOSING_BALANCE = cLOSING_BALANCE;
+ BEGINNING_BALANCE = bEGINNING_BALANCE;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ ITEM_TYP = iTEM_TYP;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ Year = year;
+ Month = month;
+ }
+
+ public void SetCompanyCode(string companycode)
+ {
+ CompanyCode = companycode;
+ }
+ public void SetId(Guid id)
+ {
+ Id = id;
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("期末余额")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal CLOSING_BALANCE { get; set; }
+ [DisplayName("年初余额")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal BEGINNING_BALANCE { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+
+ [DisplayName("资产类别")]
+ public string ITEM_TYP { get; set; }
+ [DisplayName("表单名称")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_ZCFZBManager.cs b/src/API.Domain/DataSources/ODS_JQ_ZCFZBManager.cs
new file mode 100644
index 0000000..09f103e
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_ZCFZBManager.cs
@@ -0,0 +1,123 @@
+using API.BudgetDataSources;
+using API.JQDataSources;
+using API.ManageBase;
+using EFCore.BulkExtensions;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Domain.Services;
+using Volo.Abp.ObjectMapping;
+using Volo.Abp.Uow;
+
+namespace API.DataSources
+{
+ public class ODS_JQ_ZCFZBManager : DomainService
+ {
+ private readonly IRepository _repository;
+ private readonly IRepository _jqrepository;
+ private readonly IRepository _lrbCompareRepository;
+ private readonly IRepository _budgetRepository;
+ private readonly IRepository _companyrepository;
+ private readonly IObjectMapper _objectMapper;
+ public ODS_JQ_ZCFZBManager(IRepository repository, IRepository jqrepository, IRepository budgetRepository, IRepository lrbCompareRepository, IObjectMapper objectMapper, IRepository companyrepository)
+ {
+ _repository = repository;
+ _jqrepository = jqrepository;
+ _budgetRepository = budgetRepository;
+ _lrbCompareRepository = lrbCompareRepository;
+ _objectMapper = objectMapper;
+ _companyrepository = companyrepository;
+ }
+ [UnitOfWork]
+ public async virtual Task InsterZCFZB(int year, int month)
+ {
+ Logger.LogInformation($"ZCFZB开始同步【{year}年{month}月】数据!");
+
+ var Comapnys = await _companyrepository.GetListAsync(r => !string.IsNullOrEmpty(r.BudgetCompanyCode));
+ var dicComapny = Comapnys.ToDictionary(r => r.CompanyCode);
+ try
+ {
+ //获取对照表行号
+ var lrbcomp = await _lrbCompareRepository.GetListAsync(r => r.Type == "JQ_COMPARE_ZCFZB" && !string.IsNullOrEmpty(r.NewNum));
+ var numDic = lrbcomp.ToDictionary(r => r.NewNum);
+
+ var datetimestr = year.ToString() + "-" + (month > 9 ? month.ToString() : "0" + month.ToString());
+ var lastYear = (year - 1).ToString() + "-12";
+ var lrbitems = await _jqrepository.GetListAsync(r => r.DATA_TIME == datetimestr);
+ var lastYearLrbitems = await _jqrepository.GetListAsync(r => r.DATA_TIME == lastYear);
+ List entitys = new List();
+ List budget_entitys = new List();
+ foreach (var item in lrbitems)
+ {
+ string rownum = item.ROW_NUM;
+ if (!string.IsNullOrEmpty(item.ROW_NUM))
+ {
+ rownum = numDic.ContainsKey(rownum) ? numDic[rownum].RowNum : rownum;
+ }
+ var lastbeginning_balance = lastYearLrbitems.FirstOrDefault(r => r.COMPANY == item.COMPANY && r.ROW_NUM == item.ROW_NUM)?.CLOSING_BALANCE;//年初余额取上一年12月的期末数
+ ODS_JQ_ZCFZB entity = new ODS_JQ_ZCFZB(
+ GuidGenerator.Create(),
+ item.COMPANY,
+ item.ITEM,
+ rownum,
+ decimal.TryParse(item.CLOSING_BALANCE, out decimal closing_balance) ? closing_balance : 0,
+ decimal.TryParse(lastbeginning_balance, out decimal beginning_balance) ? beginning_balance : 0,
+ item.CREATE_TIME,
+ item.DATA_TIME,
+ item.ITEM_TYPE,
+ item.SHEET_NAME ,
+ item.TABLENUM ,
+ year,
+ month
+ );
+ entitys.Add(entity);
+ //预算表
+ var budget_entity = _objectMapper.Map(entity);
+ budget_entity.CompanyCode = dicComapny.ContainsKey(budget_entity.CompanyCode) ? dicComapny[budget_entity.CompanyCode].BudgetCompanyCode : budget_entity.CompanyCode;
+ budget_entitys.Add(budget_entity);
+ }
+ var db = await _repository.GetDbContextAsync();
+ await db.BulkInsertAsync(entitys);
+ var db_budget = await _budgetRepository.GetDbContextAsync();
+ await db_budget.BulkInsertAsync(budget_entitys);
+ // await _repository.InsertManyAsync(entitys);
+
+
+ Logger.LogInformation($"ZCFZB完成【{year}年{month}月】数据同步!");
+ return true;
+
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"ZCFZB同步【{year}年{month}月】数据失败!" + ex.Message + ex?.InnerException?.Message);
+ return false;
+
+ }
+ }
+ [UnitOfWork]
+ public async virtual Task DeletecZCFZB(int year, int month)
+ {
+ Logger.LogInformation($"ZCFZB开始删除【{year}年{month}月】数据!");
+ try
+ {
+ // await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+
+ int aa = await _repository.Where(r => r.Year == year && r.Month == month).BatchDeleteAsync();
+ int bb = await _budgetRepository.Where(r => r.Year == year && r.Month == month).BatchDeleteAsync();
+ Logger.LogInformation($"ZCFZB完成删除【{year}年{month}月】数据!");
+ return true;
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"ZCFZB删除【{year}年{month}月】数据失败!" + ex.Message + ex.InnerException.Message);
+ return false;
+ }
+
+
+ }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_ZGXCB.cs b/src/API.Domain/DataSources/ODS_JQ_ZGXCB.cs
new file mode 100644
index 0000000..de1fc1f
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_ZGXCB.cs
@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace API.DataSources
+{
+ [DisplayName("久其-职工薪酬表")]
+ public class ODS_JQ_ZGXCB : AuditedAggregateRoot
+ {
+
+ public ODS_JQ_ZGXCB()
+ {
+
+ }
+
+ public ODS_JQ_ZGXCB(Guid id , string cOMPANYCode, string iTEM, string rOW_NUM, decimal yEAR_BEGINNING, decimal jTS_MONTH, decimal jTS_YEAR, decimal jTS_LAST_YEAR, decimal zFS_MONTH, decimal zFS_YEAR, decimal zFS_LAST_YEAR, decimal yEAR_CLOSING, DateTime cREATE_TIME, string dATA_TIME, string sHEET_NAME, string tABLENUM, int year, int month):base(id)
+ {
+ CompanyCode = cOMPANYCode;
+ ITEM = iTEM;
+ RowNum = rOW_NUM;
+ YEAR_BEGINNING = yEAR_BEGINNING;
+ JTS_MONTH = jTS_MONTH;
+ JTS_YEAR = jTS_YEAR;
+ JTS_LAST_YEAR = jTS_LAST_YEAR;
+ ZFS_MONTH = zFS_MONTH;
+ ZFS_YEAR = zFS_YEAR;
+ ZFS_LAST_YEAR = zFS_LAST_YEAR;
+ YEAR_CLOSING = yEAR_CLOSING;
+ CREATE_TIME = cREATE_TIME;
+ DATA_TIME = dATA_TIME;
+ SHEET_NAME = sHEET_NAME;
+ TABLENUM = tABLENUM;
+ Year = year;
+ Month = month;
+ }
+ public void SetCompanyCode(string companycode)
+ {
+ CompanyCode = companycode;
+ }
+ public void SetId(Guid id)
+ {
+ Id = id;
+ }
+ [DisplayName("公司代码")]
+ public string CompanyCode { get; set; }
+ [DisplayName("项目")]
+ public string ITEM { get; set; }
+ [DisplayName("行次")]
+ public string RowNum { get; set; }
+ [DisplayName("年初账面余额")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal YEAR_BEGINNING { get; set; }
+ [DisplayName("计提数本月数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal JTS_MONTH { get; set; }
+ [DisplayName("计提数本年累计数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal JTS_YEAR { get; set; }
+ [DisplayName("计提数上年同期累计数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal JTS_LAST_YEAR { get; set; }
+ [DisplayName("支付数本月数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal ZFS_MONTH { get; set; }
+ [DisplayName("支付数本年累计数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal ZFS_YEAR { get; set; }
+ [DisplayName("支付数上年同期累计数")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal ZFS_LAST_YEAR { get; set; }
+ [DisplayName("期末账面余额")]
+ [Column(TypeName = "decimal(18,6)")]
+ public decimal YEAR_CLOSING { get; set; }
+ [DisplayName("创建时间")]
+ public DateTime CREATE_TIME { get; set; }
+ [DisplayName("时间")]
+ public string DATA_TIME { get; set; }
+ [DisplayName("表名")]
+ public string SHEET_NAME { get; set; }
+ [DisplayName("报表编号")]
+ public string TABLENUM { get; set; }
+ [DisplayName("年")]
+ public int Year { get; set; }
+ [DisplayName("月")]
+ public int Month { get; set; }
+ }
+}
diff --git a/src/API.Domain/DataSources/ODS_JQ_ZGXCBManager.cs b/src/API.Domain/DataSources/ODS_JQ_ZGXCBManager.cs
new file mode 100644
index 0000000..d8a1174
--- /dev/null
+++ b/src/API.Domain/DataSources/ODS_JQ_ZGXCBManager.cs
@@ -0,0 +1,108 @@
+using API.JQDataSources;
+using EFCore.BulkExtensions;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Domain.Services;
+using Volo.Abp.Uow;
+
+namespace API.DataSources
+{
+ public class ODS_JQ_ZGXCBManager : DomainService
+ {
+ private readonly IRepository _repository;
+ private readonly IRepository _jqrepository;
+ private readonly IRepository _lrbCompareRepository;
+ public ODS_JQ_ZGXCBManager(IRepository repository, IRepository jqrepository, IRepository lrbCompareRepository)
+ {
+ _repository = repository;
+ _jqrepository = jqrepository;
+ _lrbCompareRepository = lrbCompareRepository;
+ }
+ [UnitOfWork]
+ public async virtual Task InsterZGXCB(int year, int month)
+ {
+ Logger.LogInformation($"ZGXCB开始同步【{year}年{month}月】数据!");
+ try
+ {
+ //获取对照表行号
+ var lrbcomp = await _lrbCompareRepository.GetListAsync(r => r.Type == "JQ_COMPARE_ZGXCB" && !string.IsNullOrEmpty(r.NewNum));
+ var numDic = lrbcomp.ToDictionary(r => r.NewNum);
+
+ var datetimestr = year.ToString() + "-" + (month > 9 ? month.ToString() : "0" + month.ToString());
+ var lrbitems = await _jqrepository.GetListAsync(r => r.DATA_TIME == datetimestr);
+ List entitys = new List();
+
+ foreach (var item in lrbitems)
+ {
+ string rownum = item.ROW_NUM;
+ if (!string.IsNullOrEmpty(item.ROW_NUM))
+ {
+ rownum = numDic.ContainsKey(rownum) ? numDic[rownum].RowNum : rownum;
+ }
+
+ ODS_JQ_ZGXCB entity = new ODS_JQ_ZGXCB(
+ GuidGenerator.Create(),
+ item.COMPANY,
+
+ item.ITEM ,
+ rownum,
+ decimal.TryParse(item.YEAR_BEGINNING,out decimal year_beginning) ? year_beginning:0,
+ decimal.TryParse(item.JTS_MONTH, out decimal jts_month) ? jts_month : 0,
+
+ decimal.TryParse(item.JTS_YEAR, out decimal jts_year) ? jts_year : 0,
+ decimal.TryParse(item.JTS_LAST_YEAR, out decimal jts_last_year) ? jts_last_year : 0,
+ decimal.TryParse(item.ZFS_MONTH, out decimal zfs_month) ? zfs_month : 0,
+ decimal.TryParse(item.ZFS_YEAR, out decimal zfs_year) ? zfs_year : 0,
+ decimal.TryParse(item.ZFS_LAST_YEAR, out decimal zfs_last_year) ? zfs_last_year : 0,
+ decimal.TryParse(item.YEAR_CLOSING, out decimal year_closing) ? year_closing : 0,
+ item.CREATE_TIME ,
+ item.DATA_TIME ,
+ item.SHEET_NAME,
+ item.TABLENUM ,
+ year,
+ month
+ );
+ entitys.Add(entity);
+ }
+ var db = await _repository.GetDbContextAsync();
+ await db.BulkInsertAsync(entitys);
+ //await _repository.DeleteAsync(r => r.Year == year && r.Month == month);
+ //await _repository.InsertManyAsync(entitys);
+ Logger.LogInformation($"ZGXCB完成【{year}年{month}月】数据同步!");
+ return true;
+
+ }
+ catch (Exception ex)
+ {
+ Logger.LogError($"ZGXCB同步【{year}年{month}月】数据失败!" + ex.Message + ex?.InnerException?.Message);
+ return false;
+
+ }
+ }
+
+ [UnitOfWork]
+ public async virtual Task