Browse Source

Merge branch 'master' of http://dev.ccwin-in.com:3000/BoXu.Zheng/BeiJinSettleAccount

# Conflicts:
#	code/src/Modules/BaseService/BaseService.Host/appsettings.json
#	code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj
#	code/src/Shared/Win.Abp.Snowflakes/bin/Release/netcoreapp5/Win.Abp.Snowflakes.dll
#	code/src/Shared/Win.Abp.Snowflakes/bin/Release/netcoreapp5/Win.Abp.Snowflakes.pdb
#	code/src/Shared/Win.Abp.Snowflakes/obj/Release/netcoreapp5/Win.Abp.Snowflakes.GeneratedMSBuildEditorConfig.editorconfig
#	code/src/Shared/Win.Abp.Snowflakes/obj/Release/netcoreapp5/Win.Abp.Snowflakes.assets.cache
#	code/src/Shared/Win.Abp.Snowflakes/obj/Release/netcoreapp5/Win.Abp.Snowflakes.csproj.AssemblyReference.cache
#	code/src/Shared/Win.Abp.Snowflakes/obj/Release/netcoreapp5/Win.Abp.Snowflakes.csproj.CoreCompileInputs.cache
#	code/src/Shared/Win.Abp.Snowflakes/obj/Release/netcoreapp5/Win.Abp.Snowflakes.csproj.FileListAbsolute.txt
#	code/src/Shared/Win.Abp.Snowflakes/obj/Release/netcoreapp5/Win.Abp.Snowflakes.dll
#	code/src/Shared/Win.Abp.Snowflakes/obj/Release/netcoreapp5/Win.Abp.Snowflakes.pdb
#	code/src/Shared/Win.Abp.Snowflakes/obj/Release/netcoreapp5/ref/Win.Abp.Snowflakes.dll
#	code/src/Shared/Win.Abp.Snowflakes/obj/project.nuget.cache
#	code/src/Shared/Win.Sfs.Shared/bin/Debug/Win.Sfs.Shared.2.0.0.nupkg
#	code/src/Shared/Win.Sfs.Shared/bin/Release/Win.Sfs.Shared.2.0.0.nupkg
#	code/src/Shared/Win.Sfs.Shared/bin/Release/netcoreapp5/Win.Sfs.Shared.dll
#	code/src/Shared/Win.Sfs.Shared/bin/Release/netcoreapp5/Win.Sfs.Shared.pdb
#	code/src/Shared/Win.Sfs.Shared/bin/Release/netcoreapp5/Win.Utils.dll
#	code/src/Shared/Win.Sfs.Shared/bin/Release/netcoreapp5/Win.Utils.pdb
#	code/src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache
#	code/src/Shared/Win.Sfs.Shared/obj/Release/Win.Sfs.Shared.2.0.0.nuspec
#	code/src/Shared/Win.Sfs.Shared/obj/Release/netcoreapp5/Win.Sfs.Shared.GeneratedMSBuildEditorConfig.editorconfig
#	code/src/Shared/Win.Sfs.Shared/obj/Release/netcoreapp5/Win.Sfs.Shared.assets.cache
#	code/src/Shared/Win.Sfs.Shared/obj/Release/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache
#	code/src/Shared/Win.Sfs.Shared/obj/Release/netcoreapp5/Win.Sfs.Shared.csproj.CoreCompileInputs.cache
#	code/src/Shared/Win.Sfs.Shared/obj/Release/netcoreapp5/Win.Sfs.Shared.csproj.FileListAbsolute.txt
#	code/src/Shared/Win.Sfs.Shared/obj/Release/netcoreapp5/Win.Sfs.Shared.dll
#	code/src/Shared/Win.Sfs.Shared/obj/Release/netcoreapp5/Win.Sfs.Shared.pdb
#	code/src/Shared/Win.Sfs.Shared/obj/Release/netcoreapp5/ref/Win.Sfs.Shared.dll
#	code/src/Shared/Win.Sfs.Shared/obj/project.nuget.cache
#	code/src/Shared/Win.Utils/bin/Debug/Win.Utils.2.0.0.nupkg
#	code/src/Shared/Win.Utils/bin/Release/Win.Utils.2.0.0.nupkg
#	code/src/Shared/Win.Utils/bin/Release/netcoreapp5/Win.Utils.dll
#	code/src/Shared/Win.Utils/bin/Release/netcoreapp5/Win.Utils.pdb
#	code/src/Shared/Win.Utils/obj/Release/Win.Utils.2.0.0.nuspec
#	code/src/Shared/Win.Utils/obj/Release/netcoreapp5/Win.Utils.GeneratedMSBuildEditorConfig.editorconfig
#	code/src/Shared/Win.Utils/obj/Release/netcoreapp5/Win.Utils.assets.cache
#	code/src/Shared/Win.Utils/obj/Release/netcoreapp5/Win.Utils.csproj.AssemblyReference.cache
#	code/src/Shared/Win.Utils/obj/Release/netcoreapp5/Win.Utils.csproj.CoreCompileInputs.cache
#	code/src/Shared/Win.Utils/obj/Release/netcoreapp5/Win.Utils.csproj.FileListAbsolute.txt
#	code/src/Shared/Win.Utils/obj/Release/netcoreapp5/Win.Utils.dll
#	code/src/Shared/Win.Utils/obj/Release/netcoreapp5/Win.Utils.pdb
#	code/src/Shared/Win.Utils/obj/Release/netcoreapp5/ref/Win.Utils.dll
#	code/src/Shared/Win.Utils/obj/project.nuget.cache
#	code/src/SmartFactorySuite.sln
pull/1/head
fangdawei 1 year ago
parent
commit
a74dd1a3c1
  1. 1
      .gitignore
  2. 16
      code/src/AuthServer/AuthServer.Host/appsettings.json
  3. 15
      code/src/Modules/BaseService/BaseService.Host/appsettings.json
  4. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj
  5. 45
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
  6. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Boms/IBomAppService.cs
  7. 17
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailCreateDto.cs
  8. 120
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailDto.cs
  9. 118
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailDtoBase.cs
  10. 151
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailExportDto.cs
  11. 169
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailImportDto.cs
  12. 107
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailRequestDto.cs
  13. 21
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailUpdateDto.cs
  14. 103
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryVersionDtoBase.cs
  15. 138
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/IEstimatedInventoryDetailAppService.cs
  16. 356
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedSums/EsimatedSumDtoBase.cs
  17. 122
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedSums/EsimatedSumVersionDtoBase.cs
  18. 123
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedSums/IEstimatedSumAppService.cs
  19. 273
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQExtend/HQKBExtendDto.cs
  20. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformCreateDto.cs
  21. 93
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDto.cs
  22. 93
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDtoBase.cs
  23. 109
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs
  24. 109
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs
  25. 101
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformRequestDto.cs
  26. 100
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformVersionDtoBase.cs
  27. 91
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/IHQ_H_PlatformAppService.cs
  28. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Inventories/IInventoryDetailAppService.cs
  29. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/ItemInvoicePrices/IItemInvoicePriceAppService.cs
  30. 137
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/ISecondaryAdjustmentAppService.cs
  31. 137
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/ISecondaryDiscountAppService.cs
  32. 135
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/ISecondaryPriceRatioAppService.cs
  33. 360
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryAdjustmentDtoBase.cs
  34. 124
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryAdjustmentVersionDtoBase.cs
  35. 319
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryDiscountDtoBase.cs
  36. 124
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryDiscountVersionDtoBase.cs
  37. 388
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryPriceRatioDtoBase.cs
  38. 126
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryPriceRatioVersionDtoBase.cs
  39. 110
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/ISettlementCrossReferenceAppService.cs
  40. 85
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/ImportSettlementCrossReferenceDto.cs
  41. 75
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceCreateDto.cs
  42. 75
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceDto.cs
  43. 73
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceExportDto.cs
  44. 85
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceRequestDto.cs
  45. 75
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceUpdateDto.cs
  46. 28
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceVersionDto.cs
  47. 28
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceVersionRequestDto.cs
  48. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementPakAndSparePartss/ISettlementPakAndSparePartsAppService.cs
  49. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementParts/ISettlementPartAppService.cs
  50. 131
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/ISettleAccountAppService.cs
  51. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountCreateDto.cs
  52. 83
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountDto.cs
  53. 73
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountDtoBase.cs
  54. 88
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountExportDto.cs
  55. 82
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountImportDto.cs
  56. 81
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountRequestDto.cs
  57. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountUpdateDto.cs
  58. 103
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountVersionDtoBase.cs
  59. 94
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/IScrapClaimsAppService.cs
  60. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsCreateDto.cs
  61. 59
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDto.cs
  62. 58
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDtoBase.cs
  63. 57
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsExportDto.cs
  64. 55
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsImportDto.cs
  65. 64
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsRequestDto.cs
  66. 100
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsVersionDtoBase.cs
  67. 94
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs
  68. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartCreateDto.cs
  69. 125
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDto.cs
  70. 124
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDtoBase.cs
  71. 143
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartExportDto.cs
  72. 129
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartImportDto.cs
  73. 129
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartRequestDto.cs
  74. 100
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartVersionDtoBase.cs
  75. 96
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/IWMSVWKanBanAppService.cs
  76. 14
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanCreateDto.cs
  77. 113
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanDto.cs
  78. 85
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanDtoBase.cs
  79. 92
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanExportDto.cs
  80. 93
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanImportDto.cs
  81. 93
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanRequestDto.cs
  82. 100
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanVersionDtoBase.cs
  83. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBantUpdateDto.cs
  84. 91
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/IWMSSparePartAppService.cs
  85. 14
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartCreateDto.cs
  86. 137
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartDto.cs
  87. 124
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartDtoBase.cs
  88. 143
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartExportDto.cs
  89. 129
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartImportDto.cs
  90. 129
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartRequestDto.cs
  91. 100
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartVersionDtoBase.cs
  92. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/ErrorListBill/ErrorBillAppService.cs
  93. 347
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQExtend/HQKBExtendAppService.cs
  94. 346
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQExtend/HQKBSettleExtendAppService.cs
  95. 344
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs
  96. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Materials/MaterialAppService.cs
  97. 14
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
  98. 468
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettlementCrossReference/SettlementCrossReferenceAppService.cs
  99. 229
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettlementPakAndSparePart/SettlementPakAndSparePartsAppService.cs
  100. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs

1
.gitignore

@ -8,6 +8,7 @@ dist/
.vs/
bin/
obj/
[Ll]ogs/
*.suo
*.user
*.db

16
code/src/AuthServer/AuthServer.Host/appsettings.json

@ -1,15 +1,25 @@
{
"ConnectionStrings": {
// "Default": "Server=114.116.225.148,13314;Database=ABP;User ID=sa;Password=Microsoft2020;",
"Default": "Server=192.168.0.203;Database=ABP;User ID=sa;Password=Microsoft@2021;"
"Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True"
},
"CorsOrigins": "http://localhost:9527,http://dev.ccwin-in.com:10588,http://localhost:44307",
"ElasticSearch": {
"Url": "http://localhost:9200"
},
"CorsOrigins": "http://localhost:9528",
"Redis": {
"Configuration": "127.0.0.1"
},
"RabbitMQ": {
"Connections": {
"Default": {
"HostName": "localhost"
}
},
"EventBus": {
"ClientName": "MsDemo_AuthServer",
"ExchangeName": "MsDemo"
}
},
"Logging": {
"LogLevel": {
"Default": "Warning"

15
code/src/Modules/BaseService/BaseService.Host/appsettings.json

@ -1,15 +1,12 @@
{
"AuthServer": {
"Authority": "http://localhost:10100",
"ApiName": "IdentityService"
"Authority": "http://dev.ccwin-in.com:10580"
},
"App": {
"CorsOrigins": "http://localhost:9527,http://localhost:9528"
"CorsOrigins": "http://localhost:9527,http://dev.ccwin-in.com:10588,http://localhost:44307"
},
"ConnectionStrings": {
"Default": "Server=192.168.0.140;Database=ABP;user id=sa;Password=Microsoft2008"
// "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;User ID=sa;Password=1q2w!@#;"
//"Default": "Server=114.116.225.148,13314;Database=ABP;User ID=sa;Password=Microsoft2020;"
"Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True"
},
"ElasticSearch": {
"Url": "http://localhost:9200"
@ -22,6 +19,7 @@
"Default": "Warning"
}
},
<<<<<<< HEAD
//"Settings": {
// "Abp.Localization.DefaultLanguage": "zh-Hans",
// "Abp.Identity.Password.RequireNonAlphanumeric": "false", //ȥĸ
@ -34,4 +32,9 @@
// "Abp.Identity.Lockout.MaxFailedAccessAttempts": "3"
//},
"AllowedHosts": "*"
=======
"AllowedHosts": "*",
"RePassword": "111111"
>>>>>>> 1c2946500765850db29fa7d216f5e55e2e4de888
}

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj

@ -12,7 +12,11 @@
<DockerfileContext>..\..\..\..</DockerfileContext>
<TargetFramework>net5.0</TargetFramework>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<<<<<<< HEAD
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
=======
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
>>>>>>> 1c2946500765850db29fa7d216f5e55e2e4de888
</PropertyGroup>
<ItemGroup>

45
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json

@ -2,26 +2,10 @@
"App": {
"CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088"
},
//"ConnectionStrings": {
// "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#",
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService1;user id=sa;Password=1q2w!@#;",
// "Wms": "Server=192.168.0.140;Database=CPAT_WMS_TEST;user id=sa;password=Microsoft2008;"
//},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=ABP;User ID=sa;Password=asdasd1977;",
"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;password=asdasd1977;",
"Wms": "Server=127.0.0.1;Database=CPAT_WMS_TEST;user id=sa;password=asdasd1977;"
"Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True",
"SettleAccountService": "Server=dev.ccwin-in.com,13319;Database=SettleAccountService;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Serilog": {
"Using": [],
@ -84,14 +68,8 @@
},
"AuthServer": {
"Authority": "http://149.223.116.5:8066",
"Authority": "http://dev.ccwin-in.com:10580",
"AlwaysAllowAuthorization": false
},
@ -104,24 +82,7 @@
"ElasticSearch": {
"Url": "http://localhost:9200"
},
"RemoteServices": {
"Default": {
"BaseUrl": "http://149.223.116.5:8091/",
"UseCurrentAccessToken": "true"
}
},
"IdentityClients": {
"Default": {
"GrantType": "client_credentials",
"ClientId": "business-app",
"ClientSecret": "1q2w3e*",
"Authority": "http://149.223.116.5:8066",
"Scope": "InternalGateway IdentityService SettleAccount"
}
}
}

1
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Boms/IBomAppService.cs

@ -8,7 +8,6 @@ using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.Boms;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.Shared.ApplicationBase;
namespace Win.Sfs.SettleAccount.Boms
{

17
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailCreateDto.cs

@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
using Win.Sfs.Shared.Enums;
namespace Win.Sfs.SettleAccount.EstimatedInventories
{
public class EstimatedInventoryDetailCreateDto : EstimatedInventoryDetailDtoBase, IBranch<Guid>
{
public virtual Guid BranchId { get ; set ; }
}
}

120
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailDto.cs

@ -1,120 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
using Win.Sfs.Shared.Enums;
namespace Win.Sfs.SettleAccount.EstimatedInventories
{
public class EstimatedInventoryDetailDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Version { set; get; }
/// <summary>
///年度
/// </summary>
public string Year { get;set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 物料凭证号
/// </summary>
public virtual string MaterialDocument { get; set;}
public virtual string MaterialDocumentLine { get; set; }
/// <summary>
/// 外部单号
/// </summary>
public virtual string BillNumber { get; set;}
/// <summary>
/// 记账日期
/// </summary>
public virtual DateTime PostingDate { get; set;}
public virtual string Factory { set; get; }
/// <summary>
/// 物料编号
/// </summary>
public virtual string MaterialCode { get; set;}
/// <summary>
/// 物料描述
/// </summary>
public virtual string MaterialDesc { get; set;}
/// <summary>
/// 存储位置
/// </summary>
public virtual string Storagelocation { get; set;}
/// <summary>
/// 收货数量
/// </summary>
public virtual decimal ReceiveQty { get;set;}
/// <summary>
/// 发票数量
/// </summary>
public virtual decimal InvoiceQty { get; set;}
/// <summary>
/// 供应商编号
/// </summary>
public virtual string SupplierCode { get; set;}
/// <summary>
/// 供应商描述
/// </summary>
public virtual string SupplierDesc { get; set;}
/// <summary>
/// 采购凭证
/// </summary>
public virtual string PurchaseDocument { get; set;}
/// <summary>
/// 采购行项
/// </summary>
public virtual string PurchaseLine { get; set;}
/// <summary>
/// 来源
/// </summary>
public virtual string Source { get; set;}
/// <summary>
/// 存储扩展字段
/// </summary>
public virtual string Extend1 { get; set;}
public virtual Guid BranchId { get; set; }
}
}

118
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailDtoBase.cs

@ -1,118 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
using Win.Sfs.Shared.Enums;
namespace Win.Sfs.SettleAccount.EstimatedInventories
{
public class EstimatedInventoryDetailDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
///年度
/// </summary>
public string Year { get; protected set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 物料凭证号
/// </summary>
public virtual string MaterialDocument { get; set; }
public virtual string MaterialDocumentLine { get; set; }
/// <summary>
/// 外部单号
/// </summary>
public virtual string BillNumber { get; set; }
/// <summary>
/// 记账日期
/// </summary>
public virtual DateTime PostingDate { get; set; }
/// <summary>
/// 物料编号
/// </summary>
public virtual string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public virtual string MaterialDesc { get; set; }
/// <summary>
/// 存储位置
/// </summary>
public virtual string Storagelocation { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public virtual decimal ReceiveQty { get;set; }
/// <summary>
/// 发票数量
/// </summary>
public virtual decimal InvoiceQty { get; set; }
/// <summary>
/// 供应商编号
/// </summary>
public virtual string SupplierCode { get; set; }
/// <summary>
/// 供应商描述
/// </summary>
public virtual string SupplierDesc { get; set; }
/// <summary>
/// 采购凭证
/// </summary>
public virtual string PurchaseDocument { get; set; }
/// <summary>
/// 采购行项
/// </summary>
public virtual string PurchaseLine { get; set; }
/// <summary>
/// 来源
/// </summary>
public virtual string Source { get; set; }
/// <summary>
/// 存储扩展字段
/// </summary>
public virtual string Extend1 { get; set; }
}
}

151
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailExportDto.cs

@ -1,151 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
using Win.Sfs.Shared.Enums;
namespace Win.Sfs.SettleAccount.EstimatedInventories
{
/// <summary>
/// 应付暂估收获明细
/// </summary>
public class EstimatedInventoryDetailExportDto
{
[ExporterHeader(DisplayName = "工厂")]
public virtual string Factory { get; set; }
[ExporterHeader(DisplayName = "期间")]
public string Version { set; get; }
/// <summary>
/// 物料凭证号(收获单号)
/// </summary>
[ExporterHeader(DisplayName = "物料凭证号")]
public virtual string MaterialDocument { get; set; }
/// <summary>
/// 物料凭证号(收获单号)
/// </summary>
[ExporterHeader(DisplayName = "物料凭证行项号")]
public virtual string MaterialDocumentLine { get; set; }
/// <summary>
/// 外部单号
/// </summary>
[ExporterHeader(DisplayName = "外部单号")]
public virtual string BillNumber { get; set; }
/// <summary>
/// 记账日期(收货日期)
/// </summary>
[ExporterHeader(DisplayName = "记账日期")]
public virtual DateTime PostingDate { get; set; }
/// <summary>
/// 物料编号
/// </summary>
[ExporterHeader(DisplayName = "物料号")]
public virtual string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[ExporterHeader(DisplayName = "物料描述")]
public virtual string MaterialDesc { get; set; }
/// <summary>
/// 存储地点
/// </summary>
[ExporterHeader(DisplayName = "存储地点")]
public virtual string Storagelocation { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[ExporterHeader(DisplayName = "收货数量")]
public virtual decimal ReceiveQty { get;set; }
/// <summary>
/// 发票数量
/// </summary>
/// [ExporterHeader(Name = "描述")]
[ExporterHeader(DisplayName = "发票数量")]
public virtual decimal InvoiceQty { get; set; }
/// <summary>
/// 供应商
/// </summary>
[ExporterHeader(DisplayName = "供应商")]
public virtual string SupplierCode { get; set; }
/// <summary>
/// 供应商描述
/// </summary>
[ExporterHeader(DisplayName = "供应商描述")]
public virtual string SupplierDesc { get; set; }
/// <summary>
/// 采购凭证号
/// </summary>
[ExporterHeader(DisplayName = "采购凭证号")]
public virtual string PurchaseDocument { get; set; }
/// <summary>
/// 采购凭证行
/// </summary>
[ExporterHeader(DisplayName = "采购凭证行")]
public virtual string PurchaseLine { get; set; }
/// <summary>
/// 来源
/// </summary>
///
[ExporterHeader(DisplayName = "来源")]
public virtual string Source { get; set; }
///// <summary>
///// 存储扩展字段
///// </summary>
//public virtual string Extend1 { get; set; }
//public virtual Guid BranchId { get; set; }
}
}

169
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailImportDto.cs

@ -1,169 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
using Win.Sfs.Shared.Enums;
namespace Win.Sfs.SettleAccount.EstimatedInventories
{
/// <summary>
/// 应付暂估收获明细
/// </summary>
public class EstimatedInventoryDetailImportDto
{
[ImporterHeader(Name = "年度")]
[Required(ErrorMessage = "{0}是必填项")]
/// <summary>
///年度
/// </summary>
public string Year { get; set; }
[ImporterHeader(Name = "期间")]
[Required(ErrorMessage = "{0}是必填项")]
public string Period { set; get; }
/// <summary>
/// 物料凭证号(收获单号)
/// </summary>
[ImporterHeader(Name = "物料凭证号")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string MaterialDocument { get; set; }
/// <summary>
/// 物料凭证号(收获单号)
/// </summary>
[ImporterHeader(Name = "物料凭证行项号")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string MaterialDocumentLine { get; set; }
/// <summary>
/// 外部单号
/// </summary>
[ImporterHeader(Name = "外部单号")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string BillNumber { get; set; }
/// <summary>
/// 记账日期(收货日期)
/// </summary>
[ImporterHeader(Name = "记账日期")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual DateTime PostingDate { get; set; }
/// <summary>
/// 物料编号
/// </summary>
[ImporterHeader(Name = "物料号")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[ImporterHeader(Name = "物料描述")]
public virtual string MaterialDesc { get; set; }
/// <summary>
/// 存储地点
/// </summary>
[ImporterHeader(Name = "存储地点")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string Storagelocation { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[ImporterHeader(Name = "收货数量")]
[Required(ErrorMessage = "{0}是必填项")]
public virtual decimal ReceiveQty { get;set; }
/// <summary>
/// 发票数量
/// </summary>
/// [ImporterHeader(Name = "描述")]
[ImporterHeader(Name = "发票数量")]
[Required(ErrorMessage = "{0}是必填项")]
public virtual decimal InvoiceQty { get; set; }
/// <summary>
/// 供应商
/// </summary>
[ImporterHeader(Name = "供应商")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string SupplierCode { get; set; }
/// <summary>
/// 供应商描述
/// </summary>
[ImporterHeader(Name = "供应商描述")]
public virtual string SupplierDesc { get; set; }
/// <summary>
/// 采购凭证号
/// </summary>
[ImporterHeader(Name = "采购凭证号")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string PurchaseDocument { get; set; }
/// <summary>
/// 采购凭证行
/// </summary>
[ImporterHeader(Name = "采购凭证行")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string PurchaseLine { get; set; }
/// <summary>
/// 来源
/// </summary>
///
[ImporterHeader(Name = "来源")]
public virtual string Source { get; set; }
/// <summary>
/// 存储扩展字段
/// </summary>
public virtual string Extend1 { get; set; }
public virtual Guid BranchId { get; set; }
}
}

107
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailRequestDto.cs

@ -1,107 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
using Win.Sfs.Shared.Enums;
namespace Win.Sfs.SettleAccount.EstimatedInventories
{
public class EstimatedInventoryDetailRequestDto : RequestDtoBase, IBranch<Guid>
{
/// <summary>
/// 物料凭证号
/// </summary>
public virtual string MaterialDocument { get; set; }
/// <summary>
/// 外部单号
/// </summary>
public virtual string BillNumber { get; set; }
/// <summary>
/// 记账日期
/// </summary>
public virtual DateTime PostingDate { get; set; }
/// <summary>
/// 物料编号
/// </summary>
public virtual string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public virtual string MaterialDesc { get; set; }
/// <summary>
/// 存储位置
/// </summary>
public virtual string Storagelocation { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public virtual decimal ReceiveQty { get;set; }
/// <summary>
/// 发票数量
/// </summary>
public virtual decimal InvoiceQty { get; set; }
/// <summary>
/// 供应商编号
/// </summary>
public virtual string SupplierCode { get; set; }
/// <summary>
/// 供应商描述
/// </summary>
public virtual string SupplierDesc { get; set; }
/// <summary>
/// 采购凭证
/// </summary>
public virtual string PurchaseDocument { get; set; }
/// <summary>
/// 采购行项
/// </summary>
public virtual string PurchaseLine { get; set; }
/// <summary>
/// 来源
/// </summary>
public virtual string Source { get; set; }
/// <summary>
/// 存储扩展字段
/// </summary>
public virtual string Extend1 { get; set; }
public virtual Guid BranchId { get ; set ; }
public virtual Guid ParentId { get; set; }
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
}
}

21
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryDetailUpdateDto.cs

@ -1,21 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
using Win.Sfs.Shared.Enums;
namespace Win.Sfs.SettleAccount.EstimatedInventories
{
public class EstimatedInventoryDetailUpdateDto : EstimatedInventoryDetailDtoBase
{
}
}

103
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/EstimatedInventoryVersionDtoBase.cs

@ -1,103 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.EstimatedInventories
{
/// <summary>
/// EstimatedInventoryVersion
/// </summary>
public class EstimatedInventoryVersionDtoBase :CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
public class EstimatedInventoryVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get ; set; }
}
public class EstimatedInventoryVersionCreateDto : EstimatedInventoryVersionDtoBase
{ }
public class EstimatedInventoryVersionUpdateDto : EstimatedInventoryVersionDtoBase
{ }
public class EstimatedInventoryVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get ; set ; }
}
public class EstimatedInventoryVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
}

138
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedInventories/IEstimatedInventoryDetailAppService.cs

@ -1,138 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.Shared.ApplicationBase;
namespace Win.Sfs.SettleAccount.Entities.EstimatedInventories
{
public interface IEstimatedInventoryDetailAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> EstimatedInventoryDetailUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode,string factory);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<EstimatedInventoryDetailDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<EstimatedInventoryDetailDto>> GetListAsync(Guid parentId, EstimatedInventoryDetailRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<EstimatedInventoryVersionDto>> GetVersionListAsync(EstimatedInventoryVersionRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
Task<ListResultDto<EstimatedInventoryDetailDto>> GetAllAsync(Guid branchId);
///// <summary>
///// 新增实体
///// </summary>
///// <param name="input">新增实体DTO</param>
///// <returns>实体DTO</returns>
//Task<EstimatedInventoryDetailDto> CreateAsync(EstimatedInventoryDetailCreateDto input);
///// <summary>
///// 修改实体
///// </summary>
///// <param name="id">ID</param>
///// <param name="input">修改实体DTO</param>
///// <returns>实体DTO</returns>
//Task<EstimatedInventoryDetailDto> UpdateAsync(Guid id, EstimatedInventoryDetailUpdateDto input);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
//Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

356
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedSums/EsimatedSumDtoBase.cs

@ -1,356 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.EstimatedSums
{
/// <summary>
/// 应付暂估汇总
/// </summary>
public class EstimatedSumDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
/// 会计年度
/// </summary
[Required(ErrorMessage = "{0}是必填项")]
public virtual string Year { set; get; }
/// <summary>
/// 记账期间
/// </summary>
[Required(ErrorMessage = "{0}是必填项")]
public virtual string Postingperiod { set; get; }
/// <summary>
/// 物料代码(物料号)
/// </summary>
[Required(ErrorMessage = "{0}是必填项")]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 物料描述
/// </summary>
[Required(ErrorMessage = "{0}是必填项")]
public virtual string MaterialDesc { set; get; }
/// <summary>
/// 数量
/// </summary>
[Required(ErrorMessage = "{0}是必填项")]
public virtual Decimal Qty { set; get; }
/// <summary>
/// 供应商
/// </summary>
[Required(ErrorMessage = "{0}是必填项")]
public virtual string SupplierCode{set;get;}
/// <summary>
///采购订单号
/// </summary>
public string PurchaseDocument { get; set; }
/// <summary>
/// 采购订单行号
/// </summary>
public string PurchaseLine { get; set; }
/// <summary>
/// 供应商描述
/// </summary>
//[ImporterHeader(Name = "值")]
//[Required(ErrorMessage = "{0}是必填项")]
//[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string SupplierDesc { set; get; }
}
public class EstimatedSumCreateDto : EstimatedSumDtoBase
{
public virtual Guid BranchId { get; set; }
}
public class EstimatedSumUpdateDto : EstimatedSumDtoBase
{
}
public class EstimatedSumRequestDto : RequestDtoBase, IBranch<Guid>
{
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
/// <summary>
/// 会计年度
/// </summary
public virtual string Year { set; get; }
/// <summary>
/// 记账期间
/// </summary>
public virtual string Postingperiod { set; get; }
/// <summary>
/// 物料代码
/// </summary>
public virtual string MaterialCode { set; get; }
/// <summary>
/// 物料描述
/// </summary>
public virtual string MaterialDesc { set; get; }
/// <summary>
///采购订单号
/// </summary>
public string PurchaseDocument { get; set; }
/// <summary>
/// 采购订单行号
/// </summary>
public string PurchaseLine { get; set; }
/// <summary>
/// 供应商编码
/// </summary>
public virtual string SupplierCode { set; get; }
/// <summary>
/// 供应商描述
/// </summary>
public virtual string SupplierDesc { set; get; }
public virtual Guid ParentId { get; set; }
public Guid BranchId { get ; set; }
}
public class EstimatedSumDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Version { set; get; }
/// <summary>
/// 会计年度
/// </summary
public virtual string Year { set; get; }
/// <summary>
/// 记账期间
/// </summary>
public virtual string Postingperiod { set; get; }
/// <summary>
/// 物料代码
/// </summary>
public virtual string MaterialCode { set; get; }
/// <summary>
/// 物料描述
/// </summary>
public virtual string MaterialDesc { set; get; }
/// <summary>
/// 数量
/// </summary>
public virtual Decimal Qty { set; get; }
/// <summary>
/// 供应商编码
/// </summary>
public virtual string SupplierCode { set; get; }
/// <summary>
/// 供应商描述
/// </summary>
public virtual string SupplierDesc { set; get; }
/// <summary>
///采购订单号
/// </summary>
public string PurchaseDocument { get; set; }
/// <summary>
/// 采购订单行号
/// </summary>
public string PurchaseLine { get; set; }
public Guid BranchId { get ; set ; }
}
public class EstimatedSumImportDto
{
/// <summary>
/// 会计年度
/// </summary
[ImporterHeader(Name = "会计年度")]
[Required(ErrorMessage = "{0}是必填项")]
public virtual string Year { set; get; }
/// <summary>
/// 记账期间
/// </summary>
[ImporterHeader(Name = "记账期间")]
[Required(ErrorMessage = "{0}是必填项")]
public virtual string Postingperiod { set; get; }
/// <summary>
/// 物料代码(物料号)
/// </summary>
[ImporterHeader(Name = "物料号")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 物料描述
/// </summary>
[ImporterHeader(Name = "物料描述")]
[Required(ErrorMessage = "{0}是必填项")]
public virtual string MaterialDesc { set; get; }
/// <summary>
/// 数量
/// </summary>
[ImporterHeader(Name = "数量")]
[Required(ErrorMessage = "{0}是必填项")]
public virtual Decimal Qty { set; get; }
/// <summary>
/// 供应商
/// </summary>
[ImporterHeader(Name = "供应商")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string SupplierCode { set; get; }
/// <summary>
///采购订单号
/// </summary>
[ImporterHeader(Name = "采购订单号")]
[Required(ErrorMessage = "{0}是必填项")]
public string PurchaseDocument { get; set; }
/// <summary>
/// 采购订单行号
/// </summary>
[ImporterHeader(Name = "采购订单行号")]
[Required(ErrorMessage = "{0}是必填项")]
public string PurchaseLine { get; set; }
}
public class EstimatedSumExportDto
{
/// <summary>
/// 会计年度
/// </summary
[ExporterHeader(DisplayName = "会计年度")]
public virtual string Year { set; get; }
/// <summary>
/// 记账期间
/// </summary>
[ExporterHeader(DisplayName = "记账期间")]
public virtual string Postingperiod { set; get; }
/// <summary>
///采购订单号
/// </summary>
[ExporterHeader(DisplayName = "采购订单号")]
public string PurchaseDocument { get; set; }
/// <summary>
/// 采购订单行号
/// </summary>
[ExporterHeader(DisplayName = "采购订单行号")]
public string PurchaseLine { get; set; }
/// <summary>
/// 物料代码(物料号)
/// </summary>
[ExporterHeader(DisplayName = "物料号")]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 物料描述
/// </summary>
[ExporterHeader(DisplayName = "物料描述")]
public virtual string MaterialDesc { set; get; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public virtual Decimal Qty { set; get; }
/// <summary>
/// 供应商
/// </summary>
[ExporterHeader(DisplayName = "供应商")]
public virtual string SupplierCode {
set;
get;
}
/// <summary>
/// 供应商描述
/// </summary>
[ExporterHeader(DisplayName = "供应商描述")]
public virtual string SupplierDesc { set; get; }
}
}

122
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedSums/EsimatedSumVersionDtoBase.cs

@ -1,122 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.EstimatedSums
{
/// <summary>
/// EstimatedSumVersion
/// </summary>
public class EstimatedSumVersionDtoBase :CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
public class EstimatedSumVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get ; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
public class EstimatedSumVersionCreateDto : EstimatedSumVersionDtoBase
{ }
public class EstimatedSumVersionUpdateDto : EstimatedSumVersionDtoBase
{ }
public class EstimatedSumVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get ; set ; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
public class EstimatedSumVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
}

123
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/EstimatedSums/IEstimatedSumAppService.cs

@ -1,123 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.Shared.ApplicationBase;
namespace Win.Sfs.SettleAccount.Entities.EstimatedSums
{
public interface IEstimatedSumAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> EstimatedSumUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode,string factory);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<EstimatedSumDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<EstimatedSumDto>> GetListAsync(Guid parentId, EstimatedSumRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<EstimatedSumVersionDto>> GetVersionListAsync(EstimatedSumVersionRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
///// <summary>
///// 获取全部实体列表
///// </summary>
///// <returns>实体DTO列表</returns>
//Task<ListResultDto<EstimatedSumDto>> GetAllAsync(Guid branchId);
///// <summary>
///// 新增实体
///// </summary>
///// <param name="input">新增实体DTO</param>
///// <returns>实体DTO</returns>
//Task<EstimatedSumDto> CreateAsync(EstimatedSumCreateDto input);
///// <summary>
///// 修改实体
///// </summary>
///// <param name="id">ID</param>
///// <param name="input">修改实体DTO</param>
///// <returns>实体DTO</returns>
//Task<EstimatedSumDto> UpdateAsync(Guid id, EstimatedSumUpdateDto input);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
//Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

273
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQExtend/HQKBExtendDto.cs

@ -1,273 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.HQExtend
{
public class HQKBExtendDto
{
[ImporterHeader(Name = "试制任务单编号")]
public string TaskBillNum { get; set; }
[ImporterHeader(Name = "采购申请单号")]
public string BillNum { get; set; }
[ImporterHeader(Name = "零件名称")]
public string MaterialDesc { get; set; }
[ImporterHeader(Name = "零件号")]
public string MaterialCode { get; set; }
[ImporterHeader(Name = "数量")]
public decimal Qty { get; set; }
[ImporterHeader(Name = "无税单价")]
public decimal Price { get; set; }
[ImporterHeader(Name = "无税金额")]
public decimal Amt { get; set; }
[ImporterHeader(Name = "税率")]
public decimal Tax { get; set; }
[ImporterHeader(Name = "税额合计")]
public decimal TaxAmt { get; set; }
[ImporterHeader(Name = "价税合计")]
public decimal TotalAmt { get; set; }
[ImporterHeader(Name = "版本号", IsIgnore = false)]
public string Version { get; set; }
}
public class HQKBExtendRequestDto : RequestDtoBase, IBranch<Guid>
{
[ImporterHeader(Name = "试制任务单编号")]
public string TaskBillNum { get; set; }
[ImporterHeader(Name = "采购申请单号")]
public string BillNum { get; set; }
[ImporterHeader(Name = "零件名称")]
public string MaterialDesc { get; set; }
[ImporterHeader(Name = "零件号")]
public string MaterialCode { get; set; }
[ImporterHeader(Name = "数量")]
public decimal Qty { get; set; }
[ImporterHeader(Name = "无税单价")]
public decimal Price { get; set; }
[ImporterHeader(Name = "无税金额")]
public decimal Amt { get; set; }
[ImporterHeader(Name = "税率")]
public decimal Tax { get; set; }
[ImporterHeader(Name = "税额合计")]
public decimal TaxAmt { get; set; }
[ImporterHeader(Name = "价税合计")]
public decimal TotalAmt { get; set; }
[ImporterHeader(Name = "版本号", IsIgnore = false)]
public string Version { get; set; }
public Guid BranchId { get; set; }
}
public class HQKBExtendExportDto
{
[ExporterHeader(DisplayName = "试制任务单编号")]
public string TaskBillNum { get; set; }
[ExporterHeader(DisplayName = "采购申请单号")]
public string BillNum { get; set; }
[ExporterHeader(DisplayName = "零件名称")]
public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "零件号")]
public string MaterialCode { get; set; }
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { get; set; }
[ExporterHeader(DisplayName = "无税单价")]
public decimal Price { get; set; }
[ExporterHeader(DisplayName = "无税金额")]
public decimal Amt { get; set; }
[ExporterHeader(DisplayName = "税率")]
public decimal Tax { get; set; }
[ExporterHeader(DisplayName = "税额合计")]
public decimal TaxAmt { get; set; }
[ExporterHeader(DisplayName = "价税合计")]
public decimal TotalAmt { get; set; }
[ExporterHeader(DisplayName = "版本号")]
public string Version { get; set; }
}
public class HQKBExtendVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
}
public class HQKBExtendVersionDto
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public string Factory { set; get; }
}
public class HQKBSettleExtendDto
{
[ImporterHeader(Name = "试制任务单编号")]
public string TaskBillNum { get; set; }
[ImporterHeader(Name = "采购申请单号")]
public string BillNum { get; set; }
[ImporterHeader(Name = "零件名称")]
public string MaterialDesc { get; set; }
[ImporterHeader(Name = "零件号")]
public string MaterialCode { get; set; }
[ImporterHeader(Name = "数量")]
public decimal Qty { get; set; }
[ImporterHeader(Name = "无税单价")]
public decimal Price { get; set; }
[ImporterHeader(Name = "无税金额")]
public decimal Amt { get; set; }
[ImporterHeader(Name = "税率")]
public decimal Tax { get; set; }
[ImporterHeader(Name = "税额合计")]
public decimal TaxAmt { get; set; }
[ImporterHeader(Name = "价税合计")]
public decimal TotalAmt { get; set; }
[ImporterHeader(Name = "版本号", IsIgnore = false)]
public string Version { get; set; }
}
public class HQKBSettleExtendRequestDto : RequestDtoBase, IBranch<Guid>
{
[ImporterHeader(Name = "试制任务单编号")]
public string TaskBillNum { get; set; }
[ImporterHeader(Name = "采购申请单号")]
public string BillNum { get; set; }
[ImporterHeader(Name = "零件名称")]
public string MaterialDesc { get; set; }
[ImporterHeader(Name = "零件号")]
public string MaterialCode { get; set; }
[ImporterHeader(Name = "数量")]
public decimal Qty { get; set; }
[ImporterHeader(Name = "无税单价")]
public decimal Price { get; set; }
[ImporterHeader(Name = "无税金额")]
public decimal Amt { get; set; }
[ImporterHeader(Name = "税率")]
public decimal Tax { get; set; }
[ImporterHeader(Name = "税额合计")]
public decimal TaxAmt { get; set; }
[ImporterHeader(Name = "价税合计")]
public decimal TotalAmt { get; set; }
[ImporterHeader(Name = "版本号", IsIgnore = false)]
public string Version { get; set; }
public Guid BranchId { get; set; }
}
public class HQKBSettleExtendExportDto
{
[ExporterHeader(DisplayName = "试制任务单编号")]
public string TaskBillNum { get; set; }
[ExporterHeader(DisplayName = "采购申请单号")]
public string BillNum { get; set; }
[ExporterHeader(DisplayName = "零件名称")]
public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "零件号")]
public string MaterialCode { get; set; }
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { get; set; }
[ExporterHeader(DisplayName = "无税单价")]
public decimal Price { get; set; }
[ExporterHeader(DisplayName = "无税金额")]
public decimal Amt { get; set; }
[ExporterHeader(DisplayName = "税率")]
public decimal Tax { get; set; }
[ExporterHeader(DisplayName = "税额合计")]
public decimal TaxAmt { get; set; }
[ExporterHeader(DisplayName = "价税合计")]
public decimal TotalAmt { get; set; }
[ExporterHeader(DisplayName = "版本号")]
public string Version { get; set; }
}
public class HQKBSettleExtendVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
}
public class HQKBSettleExtendVersionDto
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public string Factory { set; get; }
}
}

15
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformCreateDto.cs

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.SettleAccount.Entities.VWScrapClaims;
using Win.Sfs.Shared;
namespace Win.Sfs.SettleAccount.Entities.HQ_H
{
public class HQ_H_PlatformCreateDto : HQ_H_PlatformDtoBase, IBranch<Guid>
{
public virtual Guid BranchId { get; set; }
}
}

93
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDto.cs

@ -1,93 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.HQ_H
{
public class HQ_H_PlatformDto : AuditedEntityDtoBase<Guid>
{
/// <summary>
///工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
///外部单号
/// </summary>
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号
/// </summary>
public string KanbanNumber { get; set; }
/// <summary>
///物料凭证号
/// </summary>
public string MaterialVoucherNo { get; set; }
/// <summary>
///会计年度
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 看板号
/// </summary>
public string HQHKanBan { set; get; }
/// <summary>
/// 物料号
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 验收单日期
/// </summary>
public DateTime AcceptanceDate { get; set; }
/// <summary>
/// 供应商
/// </summary>
public string Supplier { get; set; }
/// <summary>
/// 存储地点
/// </summary>
public string StorageLocation { get; set; }
/// <summary>
/// 存储地点描述
/// </summary>
public string StorageLocationDesc { get; set; }
/// <summary>
///验收单号
/// </summary>
public string AcceptanceNo { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
}
}

93
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformDtoBase.cs

@ -1,93 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.HQ_H
{
public class HQ_H_PlatformDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
///工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
///外部单号
/// </summary>
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号
/// </summary>
public string KanbanNumber { get; set; }
/// <summary>
///物料凭证号
/// </summary>
public string MaterialVoucherNo { get; set; }
/// <summary>
///会计年度
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 类型:CP7报废和索赔两种
/// </summary>
public string HQHKanBan { set; get; }
/// <summary>
/// 物料号
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 验收单日期
/// </summary>
public DateTime AcceptanceDate { get; set; }
/// <summary>
/// 供应商
/// </summary>
public string Supplier { get; set; }
/// <summary>
/// 存储地点描述
/// </summary>
public string StorageLocation { get; set; }
/// <summary>
/// 存储地点描述
/// </summary>
public string StorageLocationDesc { get; set; }
/// <summary>
///验收单号
/// </summary>
public string AcceptanceNo { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
}
}

109
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs

@ -1,109 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.HQ_H
{
public class HQ_H_PlatformExportDto
{
/// <summary>
///工厂
/// </summary>
[ExporterHeader(DisplayName = "工厂")]
public string Factory { get; set; }
/// <summary>
///外部单号
/// </summary>
[ExporterHeader(DisplayName = "外部单号")]
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号
/// </summary>
[ExporterHeader(DisplayName = "看板编号")]
public string KanbanNumber { get; set; }
/// <summary>
///物料凭证号
/// </summary>
[ExporterHeader(DisplayName = "物料凭证号")]
public string MaterialVoucherNo { get; set; }
/// <summary>
///会计年度
/// </summary>
[ExporterHeader(DisplayName = "会计年度")]
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
[ExporterHeader(DisplayName = "版本号")]
public string Version { set; get; }
/// <summary>
/// 看板号
/// </summary>
[ExporterHeader(DisplayName = "看板号")]
public string HQHKanBan { set; get; }
/// <summary>
/// 物料号
/// </summary>
[ExporterHeader(DisplayName = "物料号")]
public string MaterialCode { get; set; }
/// <summary>
/// 验收单日期
/// </summary>
[ExporterHeader(DisplayName = "验收单日期")]
public DateTime AcceptanceDate { get; set; }
/// <summary>
/// 供应商
/// </summary>
[ExporterHeader(DisplayName = "供应商")]
public string Supplier { get; set; }
/// <summary>
/// 存储地点
/// </summary>
[ExporterHeader(DisplayName = "存储地点")]
public string StorageLocation { get; set; }
/// <summary>
/// 存储地点描述
/// </summary>
[ExporterHeader(DisplayName = "存储地点描述")]
public string StorageLocationDesc { get; set; }
/// <summary>
///验收单号
/// </summary>
[ExporterHeader(DisplayName = "验收单号")]
public string AcceptanceNo { get; set; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { set; get; }
/// <summary>
/// 单价
/// </summary>
[ExporterHeader(DisplayName = "单价")]
public decimal Price { set; get; }
/// <summary>
/// 金额
/// </summary>
[ExporterHeader(DisplayName = "金额")]
public decimal Amt { set; get; }
}
}

109
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs

@ -1,109 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.HQ_H
{
public class HQ_H_PlatformImportDto
{
/// <summary>
///工厂
/// </summary>
[ImporterHeader(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
///外部单号
/// </summary>
[ImporterHeader(Name = "外部单号")]
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号
/// </summary>
[ImporterHeader(Name = "看板编号")]
public string KanbanNumber { get; set; }
/// <summary>
///物料凭证号
/// </summary>
[ImporterHeader(Name = "物料凭证号")]
public string MaterialVoucherNo { get; set; }
/// <summary>
///会计年度
/// </summary>
[ImporterHeader(Name = "会计年度")]
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
//[ImporterHeader(Name = "期间")]
//public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
//[ImporterHeader(Name = "版本号")]
//public string Version { set; get; }
/// <summary>
/// 看板号
/// </summary>
[ImporterHeader(Name = "看板号")]
public string HQHKanBan { set; get; }
/// <summary>
/// 物料号
/// </summary>
[ImporterHeader(Name = "物料号")]
public string MaterialCode { get; set; }
/// <summary>
/// 验收单日期
/// </summary>
[ImporterHeader(Name = "验收单日期")]
public DateTime AcceptanceDate { get; set; }
/// <summary>
/// 供应商
/// </summary>
[ImporterHeader(Name = "供应商")]
public string Supplier { get; set; }
/// <summary>
/// 存储地点
/// </summary>
[ImporterHeader(Name = "存储地点")]
public string StorageLocation { get; set; }
/// <summary>
/// 存储地点描述
/// </summary>
[ImporterHeader(Name = "存储地点描述")]
public string StorageLocationDesc { get; set; }
/// <summary>
///验收单号
/// </summary>
[ImporterHeader(Name = "验收单号")]
public string AcceptanceNo { get; set; }
/// <summary>
/// 数量
/// </summary>
[ImporterHeader(Name = "数量")]
public decimal Qty { set; get; }
/// <summary>
/// 单价
/// </summary>
[ImporterHeader(Name = "单价")]
public decimal Price { set; get; }
/// <summary>
/// 金额
/// </summary>
[ImporterHeader(Name = "金额")]
public decimal Amt { set; get; }
}
}

101
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformRequestDto.cs

@ -1,101 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.HQ_H
{
public class HQ_H_PlatformRequestDto : RequestDtoBase
{
/// <summary>
///工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
///外部单号
/// </summary>
public string ExternalKanbanNumber { get; set; }
/// <summary>
///看板编号
/// </summary>
public string KanbanNumber { get; set; }
/// <summary>
///物料凭证号
/// </summary>
public string MaterialVoucherNo { get; set; }
/// <summary>
///会计年度
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 看板号
/// </summary>
public string HQHKanBan { set; get; }
/// <summary>
/// 物料号
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 验收单日期
/// </summary>
public DateTime AcceptanceDate { get; set; }
/// <summary>
/// 供应商
/// </summary>
public string Supplier { get; set; }
/// <summary>
/// 存储地点
/// </summary>
public string StorageLocation { get; set; }
/// <summary>
///验收单号
/// </summary>
public string AcceptanceNo { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 单价
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 存储地点描述
/// </summary>
public string StorageLocationDesc { get; set; }
public virtual Guid ParentId { get; set; }
public virtual Guid BranchId { get; set; }
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
}
}

100
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformVersionDtoBase.cs

@ -1,100 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.HQ_H
{
/// <summary>
/// SettleAccountVersion
/// </summary>
public class HQ_H_PlatformVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
public class HQ_H_PlatformVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public Guid BranchId { get; set; }
}
public class HQ_H_PlatformVersionCreateDto : HQ_H_PlatformVersionDtoBase
{ }
public class HQ_H_PlatformVersionUpdateDto : HQ_H_PlatformVersionDtoBase
{ }
public class HQ_H_PlatformVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
}
public class HQ_H_PlatformVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
}

91
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/IHQ_H_PlatformAppService.cs

@ -1,91 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace Win.Sfs.SettleAccount.Entities.HQ_H
{
public interface IHQ_H_PlatformAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> HQ_H_PlatformUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId,
string year, string period, string version, string customerCode);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<HQ_H_PlatformDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<HQ_H_PlatformDto>> GetListAsync(HQ_H_PlatformRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<HQ_H_PlatformVersionDto>> GetVersionListAsync(HQ_H_PlatformVersionRequestDto input);
Task<string> ExportAsync(HQ_H_PlatformRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

1
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Inventories/IInventoryDetailAppService.cs

@ -8,7 +8,6 @@ using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.InventoryDetialVersion;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.SettleAccount.Inventories;
using Win.Sfs.Shared.ApplicationBase;

1
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/ItemInvoicePrices/IItemInvoicePriceAppService.cs

@ -8,7 +8,6 @@ using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.ItemInvoicePrices;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.Shared.ApplicationBase;
namespace Win.Sfs.SettleAccount.ItemInvoicePrices
{

137
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/ISecondaryAdjustmentAppService.cs

@ -1,137 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.Shared.ApplicationBase;
namespace Win.Sfs.SettleAccount.Entities.SecondaryMatching
{
public interface ISecondaryAdjustmentAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> SecondaryAdjustmentUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<SecondaryAdjustmentDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<SecondaryAdjustmentDto>> GetListAsync(Guid parentId, SecondaryAdjustmentRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<SecondaryAdjustmentVersionDto>> GetVersionListAsync(SecondaryAdjustmentVersionRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
///Task<ListResultDto<SecondaryAdjustmentDto>> GetAllAsync(Guid branchId);
///// <summary>
///// 新增实体
///// </summary>
///// <param name="input">新增实体DTO</param>
///// <returns>实体DTO</returns>
//Task<SecondaryAdjustmentDto> CreateAsync(SecondaryAdjustmentCreateDto input);
///// <summary>
///// 修改实体
///// </summary>
///// <param name="id">ID</param>
///// <param name="input">修改实体DTO</param>
///// <returns>实体DTO</returns>
//Task<SecondaryAdjustmentDto> UpdateAsync(Guid id, SecondaryAdjustmentUpdateDto input);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
//Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

137
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/ISecondaryDiscountAppService.cs

@ -1,137 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.Shared.ApplicationBase;
namespace Win.Sfs.SettleAccount.Entities.SecondaryMatching
{
public interface ISecondaryDiscountAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<bool> SecondaryDiscountUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<SecondaryDiscountDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<SecondaryDiscountDto>> GetListAsync(Guid parentId, SecondaryDiscountRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<SecondaryDiscountVersionDto>> GetVersionListAsync(SecondaryDiscountVersionRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
///Task<ListResultDto<SecondaryDiscountDto>> GetAllAsync(Guid branchId);
///// <summary>
///// 新增实体
///// </summary>
///// <param name="input">新增实体DTO</param>
///// <returns>实体DTO</returns>
//Task<SecondaryDiscountDto> CreateAsync(SecondaryDiscountCreateDto input);
///// <summary>
///// 修改实体
///// </summary>
///// <param name="id">ID</param>
///// <param name="input">修改实体DTO</param>
///// <returns>实体DTO</returns>
//Task<SecondaryDiscountDto> UpdateAsync(Guid id, SecondaryDiscountUpdateDto input);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
//Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

135
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/ISecondaryPriceRatioAppService.cs

@ -1,135 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.Shared.ApplicationBase;
namespace Win.Sfs.SettleAccount.Entities.SecondaryMatching
{
public interface ISecondaryPriceRatioAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> SecondaryPriceRatioUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<SecondaryPriceRatioDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<SecondaryPriceRatioDto>> GetListAsync(Guid parentId, SecondaryPriceRatioRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<SecondaryPriceRatioVersionDto>> GetVersionListAsync(SecondaryPriceRatioVersionRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
/// <summary>
///// 获取全部实体列表
///// </summary>
///// <returns>实体DTO列表</returns>
//Task<ListResultDto<SecondaryPriceRatioDto>> GetAllAsync(Guid branchId);
///// <summary>
///// 新增实体
///// </summary>
///// <param name="input">新增实体DTO</param>
///// <returns>实体DTO</returns>
//Task<SecondaryPriceRatioDto> CreateAsync(SecondaryPriceRatioCreateDto input);
///// <summary>
///// 修改实体
///// </summary>
///// <param name="id">ID</param>
///// <param name="input">修改实体DTO</param>
///// <returns>实体DTO</returns>
//Task<SecondaryPriceRatioDto> UpdateAsync(Guid id, SecondaryPriceRatioUpdateDto input);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
//Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

360
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryAdjustmentDtoBase.cs

@ -1,360 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SecondaryMatching
{
/// <summary>
/// SecondaryAdjustment
/// </summary>
public class SecondaryAdjustmentDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
///年度
/// </summary>
public string Year { get; protected set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
public string Version { set; get; }
/// <summary>
/// 客户总成物料号
/// </summary>
public string CustomerMaterialCode { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
public string CustomerComponentCode { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { set; get; }
/// <summary>
/// 零件数量(回款)
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额(不含税)
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 金额(含税)
/// </summary>
public decimal Total { set; get; }
/// <summary>
/// 价格或零件号变动情况
/// </summary>
//[Display(Name = "价格或零件号变动情况")]
public string HasChanged { get; set; } = "否";
/// <summary>
/// 二配采购员
/// </summary>
//[Display(Name = "二配采购员")]
public string Buyer { get; set; }
public string Remark { set; get; }
}
public class SecondaryAdjustmentDto : AuditedEntityDtoBase<Guid>
{
/// <summary>
///年度
/// </summary>
public string Year { get; protected set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
public string Version { set; get; }
/// <summary>
/// 客户总成物料号
/// </summary>
public string CustomerMaterialCode { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
public string CustomerComponentCode { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { set; get; }
/// <summary>
/// 零件数量(回款)
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额(不含税)
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 金额(含税)
/// </summary>
public decimal Total { set; get; }
/// <summary>
/// 价格或零件号变动情况
/// </summary>
//[Display(Name = "价格或零件号变动情况")]
public string HasChanged { get; set; } = "否";
/// <summary>
/// 二配采购员
/// </summary>
//[Display(Name = "二配采购员")]
public string Buyer { get; set; }
}
public class SecondaryAdjustmentCreateDto : SecondaryAdjustmentDtoBase
{ }
public class SecondaryAdjustmentUpdateDto : SecondaryAdjustmentDtoBase
{ }
public class SecondaryAdjustmentRequestDto : RequestDtoBase, IBranch<Guid>
{
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
/// <summary>
///年度
/// </summary>
public string Year { get; protected set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
public string Version { set; get; }
/// <summary>
/// 客户总成物料号
/// </summary>
public string CustomerMaterialCode { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
public string CustomerComponentCode { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { set; get; }
/// <summary>
/// 零件数量(回款)
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额(不含税)
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 金额(含税)
/// </summary>
public decimal Total { set; get; }
public Guid ParentId { set; get; }
public Guid BranchId { get ; set ; }
}
public class SecondaryAdjustmentImportDto
{
/// <summary>
/// 客户总成物料号
/// </summary>
[ImporterHeader(Name = "客户总成物料号")]
[Required(ErrorMessage = "{0}是必填项")]
public string CustomerMaterialCode { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
[ImporterHeader(Name = "客户组件物料号")]
[Required(ErrorMessage = "{0}是必填项")]
public string CustomerComponentCode { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
[ImporterHeader(Name = "供应商代码")]
[Required(ErrorMessage = "{0}是必填项")]
public string SupplierCode { set; get; }
/// <summary>
/// 零件数量(回款)
/// </summary>
[ImporterHeader(Name = "回款零件数量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal Qty { set; get; }
/// <summary>
/// 价格或零件号变动情况
/// </summary>
[ImporterHeader(Name = "价格或零件号变动情况")]
public string HasChanged { get; set; } = "否";
/// <summary>
/// 二配采购员
/// </summary>
[ImporterHeader(Name = "二配采购员")]
//[Display(Name = "二配采购员")]
public string Buyer { get; set; }
}
public class SecondaryAdjustmentExportDto
{
[ExporterHeader(DisplayName = "期间")]
public string Version { set; get; }
/// <summary>
/// 客户总成物料号
/// </summary>
[ExporterHeader(DisplayName = "客户总成物料号")]
public string CustomerMaterialCode { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
[ExporterHeader(DisplayName = "客户组件物料号")]
public string CustomerComponentCode { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
[ExporterHeader(DisplayName = "供应商代码")]
public string SupplierCode { set; get; }
/// <summary>
/// 零件数量(回款)
/// </summary>
[ExporterHeader(DisplayName = "零件数量(回款)")]
public decimal Qty { set; get; }
/// <summary>
/// 价格或零件号变动情况
/// </summary>
[ExporterHeader(DisplayName = "价格或零件号变动情况")]
public string HasChanged { get; set; } = "否";
/// <summary>
/// 二配采购员
/// </summary>
[ExporterHeader(DisplayName = "二配采购员")]
//[Display(Name = "二配采购员")]
public string Buyer { get; set; }
[ExporterHeader(DisplayName = "备注")]
//[Display(Name = "二配采购员")]
public string Remark { get; set; }
}
}

124
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryAdjustmentVersionDtoBase.cs

@ -1,124 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SecondaryMatching
{
/// <summary>
/// SecondaryAdjustmentVersion
/// </summary>
public class SecondaryAdjustmentVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
public class SecondaryAdjustmentVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
public class SecondaryAdjustmentVersionCreateDto : SecondaryAdjustmentVersionDtoBase
{ }
public class SecondaryAdjustmentVersionUpdateDto : SecondaryAdjustmentVersionDtoBase
{ }
public class SecondaryAdjustmentVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
public class SecondaryAdjustmentVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
}

319
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryDiscountDtoBase.cs

@ -1,319 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SecondaryMatching
{
/// <summary>
/// SecondaryDiscount
/// </summary>
public class SecondaryDiscountDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
///年度
/// </summary>
public string Year { get; protected set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
public string Version { set; get; }
/// <summary>
/// 客户总成物料号
/// </summary>
public string CustomerMaterialCode { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
public string CustomerComponentCode { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { set; get; }
/// <summary>
/// 零件数量(回款)
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额(不含税)
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 金额(含税)
/// </summary>
public decimal Total { set; get; }
/// <summary>
/// 价格或零件号变动情况
/// </summary>
//[Display(Name = "价格或零件号变动情况")]
public string HasChanged { get; set; } = "否";
/// <summary>
/// 二配采购员
/// </summary>
//[Display(Name = "二配采购员")]
public string Buyer { get; set; }
public string Remark { set; get; }
}
public class SecondaryDiscountDto : AuditedEntityDtoBase<Guid>
{
/// <summary>
///年度
/// </summary>
public string Year { get; protected set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
public string Version { set; get; }
/// <summary>
/// 客户总成物料号
/// </summary>
public string CustomerMaterialCode { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
public string CustomerComponentCode { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { set; get; }
/// <summary>
/// 零件数量(回款)
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额(不含税)
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 金额(含税)
/// </summary>
public decimal Total { set; get; }
/// <summary>
/// 价格或零件号变动情况
/// </summary>
//[Display(Name = "价格或零件号变动情况")]
public string HasChanged { get; set; } = "否";
/// <summary>
/// 二配采购员
/// </summary>
//[Display(Name = "二配采购员")]
public string Buyer { get; set; }
}
public class SecondaryDiscountCreateDto : SecondaryDiscountDtoBase
{ }
public class SecondaryDiscountUpdateDto : SecondaryDiscountDtoBase
{ }
public class SecondaryDiscountRequestDto : RequestDtoBase, IBranch<Guid>
{
/// <summary>
///年度
/// </summary>
public string Year { get; protected set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
public string Version { set; get; }
/// <summary>
/// 客户总成物料号
/// </summary>
public string CustomerMaterialCode { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
public string CustomerComponentCode { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { set; get; }
/// <summary>
/// 零件数量(回款)
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额(不含税)
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 金额(含税)
/// </summary>
public decimal Total { set; get; }
public Guid ParentId { set; get; }
public Guid BranchId { get ; set ; }
}
public class SecondaryDiscountImportDto
{
/// <summary>
/// 供应商代码
/// </summary>
[ImporterHeader(Name = "供应商代码")]
[Required(ErrorMessage = "{0}是必填项")]
public string SupplierCode { set; get; }
/// <summary>
/// 价格或零件号变动情况
/// </summary>
[ImporterHeader(Name = "价格或零件号变动情况")]
public string HasChanged { get; set; } = "否";
/// <summary>
/// 二配采购员
/// </summary>
[ImporterHeader(Name = "二配采购员")]
//[Display(Name = "二配采购员")]
public string Buyer { get; set; }
/// <summary>
/// 金额(不含税)
/// </summary>
[ImporterHeader(Name = "不含税金额")]
public decimal Amt { set; get; }
}
public class SecondaryDiscountExportDto
{
/// <summary>
/// 供应商代码
/// </summary>
[ExporterHeader(DisplayName ="供应商代码")]
[Required(ErrorMessage = "{0}是必填项")]
public string SupplierCode { set; get; }
/// <summary>
/// 零件数量(回款)
/// </summary>
[ExporterHeader(DisplayName ="回款零件数量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal Qty { set; get; }
/// <summary>
/// 价格或零件号变动情况
/// </summary>
[ExporterHeader(DisplayName ="价格或零件号变动情况")]
public string HasChanged { get; set; } = "否";
/// <summary>
/// 二配采购员
/// </summary>
[ExporterHeader(DisplayName ="二配采购员")]
//[Display(Name = "二配采购员")]
public string Buyer { get; set; }
/// <summary>
/// 金额(不含税)
/// </summary>
[ExporterHeader(DisplayName ="不含税金额")]
public decimal Amt { set; get; }
/// <summary>
/// 金额(含税)
/// </summary>
[ExporterHeader(DisplayName ="含税金额")]
public decimal Total { set; get; }
}
}

124
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryDiscountVersionDtoBase.cs

@ -1,124 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SecondaryMatching
{
/// <summary>
/// SecondaryDiscountVersion
/// </summary>
public class SecondaryDiscountVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
public class SecondaryDiscountVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
public class SecondaryDiscountVersionCreateDto : SecondaryDiscountVersionDtoBase
{ }
public class SecondaryDiscountVersionUpdateDto : SecondaryDiscountVersionDtoBase
{ }
public class SecondaryDiscountVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
public class SecondaryDiscountVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
}

388
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryPriceRatioDtoBase.cs

@ -1,388 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SecondaryMatching
{
/// <summary>
/// SecondaryPriceRatio
/// </summary>
public class SecondaryPriceRatioDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
public string Version { set; get; }
/// <summary>
/// 客户代码
/// </summary>
public string CustomerCode { set; get; }
/// <summary>
/// 客户总成物料号
/// </summary>
public string CustomItemCode { set; get; }
/// <summary>
/// 客户物料号结算价格
/// </summary>
public decimal CustomItemPrice { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
public string CustomSubItemCode { get; set; }
/// <summary>
/// 客户物料号结算价格
/// </summary>
public decimal CustomSubItemPrice { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; }
/// <summary>
/// 供应商描述
/// </summary>
public string SupplierDesc { get; set; }
/// <summary>
/// 供货比例
/// </summary>
public string SupplyProportion { set; get; }
/// <summary>
/// 比例供货价格
/// </summary>
public decimal SupplyProportionPrice { get; set; }
public Guid ParentId { set; get; }
}
public class SecondaryPriceRatioDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
public string Version { set; get; }
/// <summary>
/// 客户代码
/// </summary>
public string CustomerCode { set; get; }
/// <summary>
/// 客户总成物料号
/// </summary>
public string CustomItemCode { set; get; }
/// <summary>
/// 客户物料号结算价格
/// </summary>
public decimal CustomItemPrice { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
public string CustomSubItemCode { get; set; }
/// <summary>
/// 客户物料号结算价格
/// </summary>
public decimal CustomSubItemPrice { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; }
/// <summary>
/// 供应商描述
/// </summary>
public string SupplierDesc { get; set; }
/// <summary>
/// 供货比例
/// </summary>
public string SupplyProportion { set; get; }
/// <summary>
/// 比例供货价格
/// </summary>
public decimal SupplyProportionPrice { get; set; }
public Guid ParentId { set; get; }
public Guid BranchId { get ; set; }
}
public class SecondaryPriceRatioCreateDto : SecondaryPriceRatioDtoBase
{ }
public class SecondaryPriceRatioUpdateDto : SecondaryPriceRatioDtoBase
{ }
public class SecondaryPriceRatioRequestDto : RequestDtoBase, IBranch<Guid>
{
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
public string Version { set; get; }
/// <summary>
/// 客户代码
/// </summary>
public string CustomerCode { set; get; }
/// <summary>
/// 客户总成物料号
/// </summary>
public string CustomItemCode { set; get; }
/// <summary>
/// 客户物料号结算价格
/// </summary>
public decimal CustomItemPrice { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
public string CustomSubItemCode { get; set; }
/// <summary>
/// 客户物料号结算价格
/// </summary>
public decimal CustomSubItemPrice { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
public string SupplierCode { get; set; }
/// <summary>
/// 供应商描述
/// </summary>
public string SupplierDesc { get; set; }
/// <summary>
/// 供货比例
/// </summary>
public string SupplyProportion { set; get; }
/// <summary>
/// 比例供货价格
/// </summary>
public decimal SupplyProportionPrice { get; set; }
public Guid ParentId { set; get; }
public Guid BranchId { get ; set ; }
}
public class SecondaryPriceRatioImportDto
{
/// <summary>
/// 客户代码
/// </summary>
[ImporterHeader(Name = "客户代码")]
[Required(ErrorMessage = "{0}是必填项")]
public string CustomerCode { set; get; }
/// <summary>
/// 客户物料号
/// </summary>
[ImporterHeader(Name = "客户总成物料号")]
[Required(ErrorMessage = "{0}是必填项")]
public string CustomItemCode { set; get; }
/// <summary>
/// 客户物料号结算价格
/// </summary>
[ImporterHeader(Name = "客户物料号结算价格")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal CustomItemPrice { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
[ImporterHeader(Name = "客户组件")]
[Required(ErrorMessage = "{0}是必填项")]
public string CustomSubItemCode { get; set; }
/// <summary>
/// 客户物料号结算价格
/// </summary>
[ImporterHeader(Name = "客户组件结算价格")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal CustomSubItemPrice { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
[ImporterHeader(Name = "供应商代码")]
[Required(ErrorMessage = "{0}是必填项")]
public string SupplierCode { get; set; }
/// <summary>
/// 供应商描述
/// </summary>
[ImporterHeader(Name = "供应商描述")]
public string SupplierDesc { get; set; }
/// <summary>
/// 供货比例
/// </summary>
[ImporterHeader(Name = "供货比例")]
[Required(ErrorMessage = "{0}是必填项")]
public string SupplyProportion { set; get; }
}
public class SecondaryPriceRatioExportDto
{
[ExporterHeader(DisplayName = "期间")]
public string Version { set; get; }
/// <summary>
/// 客户代码
/// </summary>
[ExporterHeader(DisplayName ="客户代码")]
public string CustomerCode { set; get; }
/// <summary>
/// 客户物料号
/// </summary>
[ExporterHeader(DisplayName ="客户总成物料号")]
public string CustomItemCode { set; get; }
/// <summary>
/// 客户物料号结算价格
/// </summary>
[ExporterHeader(DisplayName ="客户物料号结算价格")]
public decimal CustomItemPrice { set; get; }
/// <summary>
/// 客户组件物料号
/// </summary>
[ExporterHeader(DisplayName ="客户组件")]
public string CustomSubItemCode { get; set; }
/// <summary>
/// 客户物料号结算价格
/// </summary>
[ExporterHeader(DisplayName ="客户组件结算价格")]
public decimal CustomSubItemPrice { set; get; }
/// <summary>
/// 供应商代码
/// </summary>
[ExporterHeader(DisplayName ="供应商代码")]
public string SupplierCode { get; set; }
/// <summary>
/// 供应商描述
/// </summary>
[ExporterHeader(DisplayName ="供应商描述")]
public string SupplierDesc { get; set; }
/// <summary>
/// 供货比例
/// </summary>
[ExporterHeader(DisplayName ="供货比例")]
public string SupplyProportion { set; get; }
/// <summary>
/// 比例供货价格
/// </summary>
[ExporterHeader(DisplayName = "供货比例价格")]
public decimal SupplyProportionPrice { get; set; }
}
}

126
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SecondaryMatching/SecondaryPriceRatioVersionDtoBase.cs

@ -1,126 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SecondaryMatching
{
/// <summary>
/// SecondaryPriceRatioVersion
/// </summary>
public class SecondaryPriceRatioVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
public class SecondaryPriceRatioVersionDto : AuditedEntityDtoBase<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { set; get; }
}
public class SecondaryPriceRatioVersionCreateDto : SecondaryPriceRatioVersionDtoBase
{ }
public class SecondaryPriceRatioVersionUpdateDto : SecondaryPriceRatioVersionDtoBase
{ }
public class SecondaryPriceRatioVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public Guid BranchId { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { private set; get; }
}
public class SecondaryPriceRatioVersionImportDto
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { set; get; }
}
}

110
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/ISettlementCrossReferenceAppService.cs

@ -1,110 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.ItemInvoicePrices;
using Win.Sfs.SettleAccount.Entities.SettlementCrossReferences;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.Shared.ApplicationBase;
namespace Win.Sfs.SettleAccount.SettlementCrossReferences
{
public interface ISettlementCrossReferenceAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> SettlementCrossReferenceUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<SettlementCrossReferenceDto>> GetListAsync(SettlementCrossReferenceRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
//Task<ListResultDto<SettlementCrossReferenceDto>> GetAllAsync(Guid branchId);
/// <summary>
/// 新增实体
/// </summary>
/// <param name="input">新增实体DTO</param>
/// <returns>实体DTO</returns>
Task<SettlementCrossReferenceDto> CreateAsync(SettlementCrossReferenceCreateDto input);
/// <summary>
/// 修改实体
/// </summary>
/// <param name="id">ID</param>
/// <param name="input">修改实体DTO</param>
/// <returns>实体DTO</returns>
Task<SettlementCrossReferenceDto> UpdateAsync(Guid id, SettlementCrossReferenceUpdateDto input);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
//Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

85
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/ImportSettlementCrossReferenceDto.cs

@ -1,85 +0,0 @@
// 闻荫智慧工厂管理套件
// Copyright (c) 闻荫科技 www.ccwin-in.com
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettlementCrossReferences
{
/// <summary>
/// 导入ImportSettlementCrossReferenceDto
/// IsLabelingError:是否标注数据错误
/// </summary>
[ImportProject(Name = SettleAccountModuleName.SettlementCrossReference)]
[ExcelImporter(IsLabelingError = true, MaxCount = int.MaxValue)]
public class ImportSettlementCrossReferenceDto
{
/// <summary>
/// 车型
/// </summary>
[ImporterHeader(Name = "车型")]
[Display(Name = "车型")]
public string Model { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[ImporterHeader(Name = "零件类型")]
[Display(Name = "零件类型")]
public string PartType { get; set; }
/// <summary>
/// 总成结算号
/// </summary>
[ImporterHeader(Name = "总成结算号")]
[Display(Name = "总成结算号")]
public string SettlementMaterialCode { get; set; }
/// <summary>
/// BOM清单零件号
/// </summary>
[ImporterHeader(Name = "BOM清单零件号")]
[Display(Name = "BOM清单零件号")]
public string BomMaterialCode { get; set; }
///// <summary>
///// 零件名称
///// </summary>
//[Display(Name = "零件名称")]
//public string MaterialDesc { get; set; }
/// <summary>
/// 供应商代码
/// </summary>
[ImporterHeader(Name = "供应商代码")]
[Display(Name = "供应商代码")]
public string SupplierCode { set; get; }
///// <summary>
///// 供应商名称
///// </summary>
//[Display(Name = "供应商名称")]
//public string SupplierDesc { set; get; }
/// <summary>
/// 采购员
/// </summary>
[ImporterHeader(Name = "采购员")]
[Display(Name = "采购员")]
public string Buyer { set; get; }
}
}

75
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceCreateDto.cs

@ -1,75 +0,0 @@
// 闻荫智慧工厂管理套件
// Copyright (c) 闻荫科技 www.ccwin-in.com
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettlementCrossReferences
{
public class SettlementCrossReferenceCreateDto : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public string Period { set; get; }
/// <summary>
/// 车型
/// </summary>
[Display(Name = "车型")]
public string Model { set; get; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[Display(Name = "零件类型")]
public string PartType { get; set; }
/// <summary>
/// 总成结算号
/// </summary>
[Display(Name = "总成结算号")]
public string SettlementMaterialCode { get; set; }
/// <summary>
/// BOM清单零件号
/// </summary>
[Display(Name = "BOM清单零件号")]
public string BomMaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
[Display(Name = "零件名称")]
public string MaterialDesc { get; set; }
/// <summary>
/// 供应商代码
/// </summary>
[Display(Name = "供应商代码")]
public string SupplierCode { set; get; }
/// <summary>
/// 供应商名称
/// </summary>
[Display(Name = "供应商名称")]
public string SupplierDesc { set; get; }
/// <summary>
/// 采购员
/// </summary>
[Display(Name = "采购员")]
public string Buyer { set; get; }
}
}

75
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceDto.cs

@ -1,75 +0,0 @@
// 闻荫智慧工厂管理套件
// Copyright (c) 闻荫科技 www.ccwin-in.com
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettlementCrossReferences
{
public class SettlementCrossReferenceDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public string Period { set; get; }
/// <summary>
/// 车型
/// </summary>
[Display(Name = "车型")]
public string Model { set; get; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[Display(Name = "零件类型")]
public string PartType { get; set; }
/// <summary>
/// 总成结算号
/// </summary>
[Display(Name = "总成结算号")]
public string SettlementMaterialCode { get; set; }
/// <summary>
/// BOM清单零件号
/// </summary>
[Display(Name = "BOM清单零件号")]
public string BomMaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
[Display(Name = "零件名称")]
public string MaterialDesc { get; set; }
/// <summary>
/// 供应商代码
/// </summary>
[Display(Name = "供应商代码")]
public string SupplierCode { set; get; }
/// <summary>
/// 供应商名称
/// </summary>
[Display(Name = "供应商名称")]
public string SupplierDesc { set; get; }
/// <summary>
/// 采购员
/// </summary>
[Display(Name = "采购员")]
public string Buyer { set; get; }
public string Version { get; set; }
public string CustomerCode { get; set; }
public Guid BranchId { get ; set; }
}
}

73
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceExportDto.cs

@ -1,73 +0,0 @@
// 闻荫智慧工厂管理套件
// Copyright (c) 闻荫科技 www.ccwin-in.com
using Magicodes.ExporterAndImporter.Core;
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettlementCrossReferences
{
public class SettlementCrossReferenceExportDto
{
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public string Period { set; get; }
/// <summary>
/// 车型
/// </summary>
[ExporterHeader(DisplayName = "车型")]
public string Model { set; get; }
/// <summary>
/// 工厂
/// </summary>
[ExporterHeader(DisplayName = "工厂")]
public string Factory { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[ExporterHeader(DisplayName = "零件类型")]
public string PartType { get; set; }
/// <summary>
/// 总成结算号
/// </summary>
[ExporterHeader(DisplayName = "总成结算号")]
public string SettlementMaterialCode { get; set; }
/// <summary>
/// BOM清单零件号
/// </summary>
[ExporterHeader(DisplayName = "BOM清单零件号")]
public string BomMaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
[ExporterHeader(DisplayName = "零件名称")]
public string MaterialDesc { get; set; }
/// <summary>
/// 供应商代码
/// </summary>
[ExporterHeader(DisplayName = "供应商代码")]
public string SupplierCode { set; get; }
/// <summary>
/// 供应商名称
/// </summary>
[ExporterHeader(DisplayName = "供应商名称")]
public string SupplierDesc { set; get; }
/// <summary>
/// 采购员
/// </summary>
[ExporterHeader(DisplayName = "采购员")]
public string Buyer { set; get; }
}
}

85
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceRequestDto.cs

@ -1,85 +0,0 @@
// 闻荫智慧工厂管理套件
// Copyright (c) 闻荫科技 www.ccwin-in.com
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettlementCrossReferences
{
public class SettlementCrossReferenceRequestDto : RequestDtoBase, IBranch<Guid>
{
/// <summary>
/// 版本
/// </summary>
[Display(Name = "版本")]
public string Version { set; get; }
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public string Period { set; get; }
/// <summary>
/// 车型
/// </summary>
[Display(Name = "车型")]
public string Model { set; get; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[Display(Name = "零件类型")]
public string PartType { get; set; }
/// <summary>
/// 总成结算号
/// </summary>
[Display(Name = "总成结算号")]
public string SettlementMaterialCode { get; set; }
/// <summary>
/// BOM清单零件号
/// </summary>
[Display(Name = "BOM清单零件号")]
public string BomMaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
[Display(Name = "零件名称")]
public string MaterialDesc { get; set; }
/// <summary>
/// 供应商代码
/// </summary>
[Display(Name = "供应商代码")]
public string SupplierCode { set; get; }
/// <summary>
/// 供应商名称
/// </summary>
[Display(Name = "供应商名称")]
public string SupplierDesc { set; get; }
/// <summary>
/// 采购员
/// </summary>
[Display(Name = "采购员")]
public string Buyer { set; get; }
public virtual Guid ParentId { get; set; }
public virtual Guid BranchId { get; set; }
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
}
}

75
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceUpdateDto.cs

@ -1,75 +0,0 @@
// 闻荫智慧工厂管理套件
// Copyright (c) 闻荫科技 www.ccwin-in.com
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettlementCrossReferences
{
public class SettlementCrossReferenceUpdateDto : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public string Period { set; get; }
/// <summary>
/// 车型
/// </summary>
[Display(Name = "车型")]
public string Model { set; get; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[Display(Name = "零件类型")]
public string PartType { get; set; }
/// <summary>
/// 总成结算号
/// </summary>
[Display(Name = "总成结算号")]
public string SettlementMaterialCode { get; set; }
/// <summary>
/// BOM清单零件号
/// </summary>
[Display(Name = "BOM清单零件号")]
public string BomMaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
[Display(Name = "零件名称")]
public string MaterialDesc { get; set; }
/// <summary>
/// 供应商代码
/// </summary>
[Display(Name = "供应商代码")]
public string SupplierCode { set; get; }
/// <summary>
/// 供应商名称
/// </summary>
[Display(Name = "供应商名称")]
public string SupplierDesc { set; get; }
/// <summary>
/// 采购员
/// </summary>
[Display(Name = "采购员")]
public string Buyer { set; get; }
}
}

28
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceVersionDto.cs

@ -1,28 +0,0 @@
// 闻荫智慧工厂管理套件
// Copyright (c) 闻荫科技 www.ccwin-in.com
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettlementCrossReferences
{
public class SettlementCrossReferenceVersionDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
public Guid BranchId { get; set; }
}
}

28
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementCrossReferences/SettlementCrossReferenceVersionRequestDto.cs

@ -1,28 +0,0 @@
// 闻荫智慧工厂管理套件
// Copyright (c) 闻荫科技 www.ccwin-in.com
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.Shared;
using Win.Sfs.Shared.Constant;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettlementCrossReferences
{
public class SettlementCrossReferenceVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
public Guid BranchId { get; set; }
}
}

1
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementPakAndSparePartss/ISettlementPakAndSparePartsAppService.cs

@ -10,7 +10,6 @@ using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.InventoryDetialVersion;
using Win.Sfs.SettleAccount.Entities.SettlementParts;
using Win.Sfs.SettleAccount.Entities.SettlementPartss;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.SettleAccount.Inventories;
using Win.Sfs.Shared.ApplicationBase;

1
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/SettlementParts/ISettlementPartAppService.cs

@ -8,7 +8,6 @@ using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.InventoryDetialVersion;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.SettleAccount.Inventories;
using Win.Sfs.Shared.ApplicationBase;

131
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/ISettleAccountAppService.cs

@ -1,131 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
using Win.Sfs.Shared.ApplicationBase;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
public interface IUnSettleAccountAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> UnSettleAccountUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode,string factory);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<UnSettleAccountDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<UnSettleAccountDto>> GetListAsync(Guid parentId, UnSettleAccountRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<UnSettleAccountVersionDto>> GetVersionListAsync(UnSettleAccountVersionRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
///// <summary>
///// 获取全部实体列表
///// </summary>
///// <returns>实体DTO列表</returns>
//Task<ListResultDto<SettleAccountDto>> GetAllAsync(Guid branchId);
///// <summary>
///// 新增实体
///// </summary>
///// <param name="input">新增实体DTO</param>
///// <returns>实体DTO</returns>
//Task<SettleAccountDto> CreateAsync(SettleAccountCreateDto input);
///// <summary>
///// 修改实体
///// </summary>
///// <param name="id">ID</param>
///// <param name="input">修改实体DTO</param>
///// <returns>实体DTO</returns>
//Task<SettleAccountDto> UpdateAsync(Guid id, SettleAccountUpdateDto input);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
//Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

15
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountCreateDto.cs

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
public class UnSettleAccountCreateDto : SettleAccountDtoBase, IBranch<Guid>
{
public virtual Guid BranchId { get ; set ; }
}
}

83
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountDto.cs

@ -1,83 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
public class UnSettleAccountDto: AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 年份
/// </summary>
public string SettleYear { set; get; }
/// <summary>
/// 年份
/// </summary>
public virtual string Year { set; get; }
/// <summary>
/// KENEN号
/// </summary>
public virtual string KENNCode { set; get; }
/// <summary>
/// 底盘号
/// </summary>
public virtual string ChassisNumber { set; get; }
/// <summary>
/// 车型
/// </summary>
public virtual string Model { set; get; }
/// <summary>
/// CP5A日期
/// </summary>
public virtual DateTime CP5A { set; get; }
/// <summary>
/// CP7
/// </summary>
public virtual DateTime CP7 { set; get; }
/// <summary>
/// 零件号
/// </summary>
public virtual string MaterialCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public virtual decimal Qty { get; set; }
/// <summary>
/// 结算标识
/// </summary>
public virtual string SettlementID { get; set; }
/// <summary>
/// 结算供应商
/// </summary>
public virtual string SettlementSupplier { get; set; }
public virtual string State { get; set; }
public virtual Guid BranchId { get ; set ; }
public virtual string Version { get; set; }
public string UnsettledReason { get; set; }
}
}

73
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountDtoBase.cs

@ -1,73 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
public class UnSettleAccountDtoBase: CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 年份
/// </summary>
public string SettleYear { set; get; }
/// <summary>
/// 年份
/// </summary>
public virtual string Year { set; get; }
/// <summary>
/// KENEN号
/// </summary>
public virtual string KENNCode { set; get; }
/// <summary>
/// 底盘号
/// </summary>
public virtual string ChassisNumber { set; get; }
/// <summary>
/// 车型
/// </summary>
public virtual string Model { set; get; }
/// <summary>
/// CP5A日期
/// </summary>
public virtual DateTime CP5A { set; get; }
/// <summary>
/// CP7
/// </summary>
public virtual DateTime CP7 { set; get; }
/// <summary>
/// 零件号
/// </summary>
public virtual string MaterialCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public virtual decimal Qty { get; set; }
/// <summary>
/// 结算标识
/// </summary>
public virtual string SettlementID { get; set; }
/// <summary>
/// 结算供应商
/// </summary>
public virtual string SettlementSupplier { get; set; }
public string UnsettledReason { get; set; }
}
}

88
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountExportDto.cs

@ -1,88 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
public class UnSettleAccountExportDto
{
[ExporterHeader(DisplayName = "版本")]
public string Version { set; get; }
/// <summary>
/// 期间
/// </summary>
//[ExporterHeader(DisplayName = "期间")]
//public string Period { set; get; }
///// <summary>
///// 年份
///// </summary>
//[ExporterHeader(DisplayName = "年份")]
//public string SettleYear { set; get; }
/// <summary>
/// KENEN号
/// </summary>
[ExporterHeader(DisplayName = "KENN号")]
public virtual string KENNCode { set; get; }
/// <summary>
/// 底盘号
/// </summary>
[ExporterHeader(DisplayName = "底盘号")]
public virtual string ChassisNumber { set; get; }
/// <summary>
/// 车型
/// </summary>
[ExporterHeader(DisplayName = "车型")]
public virtual string Model { set; get; }
/// <summary>
/// CP5A日期
/// </summary>
[ExporterHeader(DisplayName = "CP5日期")]
public virtual DateTime CP5A { set; get; }
/// <summary>
/// CP7
/// </summary>
[ExporterHeader(DisplayName = "CP7日期")]
public virtual DateTime CP7 { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ExporterHeader(DisplayName = "零件号")]
public virtual string MaterialCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public virtual decimal Qty { get; set; }
/// <summary>
/// 结算标识
/// </summary>
[ExporterHeader(DisplayName = "结算标识")]
public virtual string SettlementID { get; set; }
/// <summary>
/// 结算供应商
/// </summary>
[ExporterHeader(DisplayName = "结算供应商")]
public virtual string SettlementSupplier { get; set; }
[ExporterHeader(DisplayName = "未结算原因")]
public string UnsettledReason { get; set; }
}
}

82
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountImportDto.cs

@ -1,82 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
public class UnSettleAccountImportDto
{
/// <summary>
/// 期间
/// </summary>
// public string Period { set; get; }
/// <summary>
/// 年份
/// </summary>
[ImporterHeader(Name = "年份")]
public string SettleYear { set; get; }
/// <summary>
/// 年份
/// </summary>
//public virtual string Year { set; get; }
/// <summary>
/// KENEN号
/// </summary>
[ImporterHeader(Name = "KENN号")]
public virtual string KENNCode { set; get; }
/// <summary>
/// 底盘号
/// </summary>
[ImporterHeader(Name = "底盘号")]
public virtual string ChassisNumber { set; get; }
/// <summary>
/// 车型
/// </summary>
[ImporterHeader(Name = "车型")]
public virtual string Model { set; get; }
/// <summary>
/// CP5A日期
/// </summary>
[ImporterHeader(Name = "CP5A日期")]
public virtual DateTime CP5A { set; get; }
/// <summary>
/// CP7
/// </summary>
[ImporterHeader(Name = "CP7日期")]
public virtual DateTime? CP7 { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ImporterHeader(Name = "零件号",FixAllSpace =true)]
public virtual string MaterialCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[ImporterHeader(Name = "数量")]
public virtual decimal Qty { get; set; }
/// <summary>
/// 结算标识
/// </summary>
[ImporterHeader(Name = "结算标识")]
public virtual string SettlementID { get; set; }
/// <summary>
/// 结算供应商
/// </summary>
[ImporterHeader(Name = "结算供应商")]
public virtual string SettlementSupplier { get; set; }
/// <summary>
/// 未结算原因
/// </summary>
[ImporterHeader(Name = "未结算原因")]
public string UnsettledReason { get; set; }
}
}

81
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountRequestDto.cs

@ -1,81 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
public class UnSettleAccountRequestDto: RequestDtoBase, IBranch<Guid>
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 年份
/// </summary>
public string SettleYear { set; get; }
/// <summary>
/// 年份
/// </summary>
public virtual string Year { set; get; }
/// <summary>
/// KENEN号
/// </summary>
public virtual string KENNCode { set; get; }
/// <summary>
/// 底盘号
/// </summary>
public virtual string ChassisNumber { set; get; }
/// <summary>
/// 车型
/// </summary>
public virtual string Model { set; get; }
/// <summary>
/// CP5A日期
/// </summary>
public virtual DateTime CP5A { set; get; }
/// <summary>
/// CP7
/// </summary>
public virtual DateTime CP7 { set; get; }
/// <summary>
/// 零件号
/// </summary>
public virtual string MaterialCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public virtual decimal Qty { get; set; }
/// <summary>
/// 结算标识
/// </summary>
public virtual string SettlementID { get; set; }
/// <summary>
/// 结算供应商
/// </summary>
public virtual string SettlementSupplier { get; set; }
public string UnsettledReason { get; set; }
public virtual Guid ParentId { get; set; }
public virtual Guid BranchId { get; set ; }
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
public virtual string Version { get; set; }
}
}

16
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountUpdateDto.cs

@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
public class UnSettleAccountUpdateDto: SettleAccountDtoBase
{
}
}

103
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountVersionDtoBase.cs

@ -1,103 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.SettleAccountVersion
{
/// <summary>
/// SettleAccountVersion
/// </summary>
public class UnSettleAccountVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
public class UnSettleAccountVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public Guid BranchId { get ; set; }
}
public class UnSettleAccountVersionCreateDto : SettleAccountVersionDtoBase
{ }
public class UnSettleAccountVersionUpdateDto : SettleAccountVersionDtoBase
{ }
public class UnSettleAccountVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get ; set ; }
}
public class UnSettleAccountVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
}

94
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/IScrapClaimsAppService.cs

@ -1,94 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
{
/// <summary>
/// 报废与索赔
/// </summary>
public interface IScrapClaimsAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> ScrapClaimsUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId,
string year, string period, string version, string customerCode);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<ScrapClaimsDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<ScrapClaimsDto>> GetListAsync(ScrapClaimsRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<ScrapClaimsVersionDto>> GetVersionListAsync(ScrapClaimsVersionRequestDto input);
Task<string> ExportAsync(ScrapClaimsRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

15
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsCreateDto.cs

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
{
public class ScrapClaimsCreateDto : ScrapClaimsDtoBase, IBranch<Guid>
{
public virtual Guid BranchId { get; set; }
}
}

59
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDto.cs

@ -1,59 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
{
/// <summary>
/// CP7报废和索赔
/// </summary>
public class ScrapClaimsDto : AuditedEntityDtoBase<Guid>
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
public virtual string Version { get; set; }
/// <summary>
/// 类型:CP7报废和索赔两种
/// </summary>
public string Type { set; get; }
/// <summary>
/// 零件号
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
}
}

58
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDtoBase.cs

@ -1,58 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
{
public class ScrapClaimsDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
public virtual string Version { get; set; }
/// <summary>
/// 类型:CP7报废和索赔两种
/// </summary>
public string Type { set; get; }
/// <summary>
/// 零件号
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
}
}

57
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsExportDto.cs

@ -1,57 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
{
public class ScrapClaimsExportDto
{
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "版本")]
public virtual string Version { get; set; }
/// <summary>
/// 类型
/// </summary>
[ExporterHeader(DisplayName = "类型")]
public virtual string Type { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ExporterHeader(DisplayName = "零件号")]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[ExporterHeader(DisplayName = "零件名称")]
public virtual string MaterialDesc { set; get; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public virtual decimal Qty { get; set; }
/// <summary>
/// 金额
/// </summary>
[ExporterHeader(DisplayName = "金额")]
public virtual decimal Amt { get; set; }
}
}

55
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsImportDto.cs

@ -1,55 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
{
public class ScrapClaimsImportDto
{
///// <summary>
///// 期间
///// </summary>
//[ImporterHeader(Name = "期间")]
//public string Period { set; get; }
///// <summary>
///// 版本
///// </summary>
//[ImporterHeader(Name = "版本")]
//public virtual string Version { get; set; }
/// <summary>
///类型
/// </summary>
[ImporterHeader(Name = "类型")]
public string Type { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ImporterHeader(Name = "零件号", FixAllSpace = true)]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[ImporterHeader(Name = "零件名称")]
public virtual string MaterialDesc { set; get; }
/// <summary>
/// 数量
/// </summary>
[ImporterHeader(Name = "数量")]
public virtual decimal Qty { get; set; }
/// <summary>
/// 金额
/// </summary>
[ImporterHeader(Name = "金额")]
public virtual decimal Amt { get; set; }
}
}

64
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsRequestDto.cs

@ -1,64 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
{
public class ScrapClaimsRequestDto : RequestDtoBase
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
public virtual string Version { get; set; }
/// <summary>
/// 类型:CP7报废和索赔两种
/// </summary>
public string Type { set; get; }
/// <summary>
/// 零件号
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
public virtual Guid ParentId { get; set; }
public virtual Guid BranchId { get; set; }
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
}
}

100
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsVersionDtoBase.cs

@ -1,100 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims
{
/// <summary>
/// SettleAccountVersion
/// </summary>
public class ScrapClaimsVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
public class ScrapClaimsVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public Guid BranchId { get; set; }
}
public class ScrapClaimsVersionCreateDto : ScrapClaimsVersionDtoBase
{ }
public class ScrapClaimsVersionUpdateDto : ScrapClaimsVersionDtoBase
{ }
public class ScrapClaimsVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
}
public class ScrapClaimsVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
}

94
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs

@ -1,94 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace Win.Sfs.SettleAccount.Entities.VWSparePart
{
/// <summary>
/// /大众备件导入功能
/// </summary>
public interface ISparePartAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> SparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId,
string year, string period, string version, string customerCode);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<SparePartDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<SparePartDto>> GetListAsync( SparePartRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<SparePartVersionDto>> GetVersionListAsync(SparePartVersionRequestDto input);
Task<string> ExportAsync(SparePartRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

15
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartCreateDto.cs

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
namespace Win.Sfs.SettleAccount.Entities.VWSparePart
{
public class SparePartCreateDto : SparePartDtoBase, IBranch<Guid>
{
public virtual Guid BranchId { get; set; }
}
}

125
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDto.cs

@ -1,125 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.VWSparePart
{
/// <summary>
/// 大众备件结算明细DTO
/// </summary>
public class SparePartDto : AuditedEntityDtoBase<Guid>
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
}
}

124
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDtoBase.cs

@ -1,124 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.VWSparePart
{
public class SparePartDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
}
}

143
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartExportDto.cs

@ -1,143 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.VWSparePart
{
public class SparePartExportDto
{
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "版本")]
public virtual string Version { get; set; }
/// <summary>
/// 行号
/// </summary>
[ExporterHeader(DisplayName = "行号")]
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
[ExporterHeader(DisplayName = "采购类型")]
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
[ExporterHeader(DisplayName = "采购订单号")]
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
[ExporterHeader(DisplayName = "采购订单行项目")]
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
[ExporterHeader(DisplayName = "采购订单文本")]
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[ExporterHeader(DisplayName = "收货数量")]
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
[ExporterHeader(DisplayName = "开票数量")]
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
[ExporterHeader(DisplayName = "不含税金额")]
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
[ExporterHeader(DisplayName = "采购价格不含税")]
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
[ExporterHeader(DisplayName = "科目号")]
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[ExporterHeader(DisplayName = "物料代码")]
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
[ExporterHeader(DisplayName = "日期")]
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[ExporterHeader(DisplayName = "交货单号")]
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
[ExporterHeader(DisplayName = "交货行号")]
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
[ExporterHeader(DisplayName = "批次号")]
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
[ExporterHeader(DisplayName = "单位")]
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
[ExporterHeader(DisplayName = "税率")]
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
[ExporterHeader(DisplayName = "税码")]
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
[ExporterHeader(DisplayName = "德国发票号")]
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
[ExporterHeader(DisplayName = "工厂")]
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
[ExporterHeader(DisplayName = "工厂名称")]
public string FactoryName { get; set; }
}
}

129
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartImportDto.cs

@ -1,129 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.VWSparePart
{
public class SparePartImportDto
{
/// <summary>
/// 行号
/// </summary>
[ImporterHeader(Name = "行号")]
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
[ImporterHeader(Name = "采购类型")]
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
[ImporterHeader(Name = "采购订单号", FixAllSpace = true)]
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
[ImporterHeader(Name = "采购订单行项目")]
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
[ImporterHeader(Name = "采购订单文本")]
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[ImporterHeader(Name = "收货数量")]
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
[ImporterHeader(Name = "开票数量")]
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
[ImporterHeader(Name = "不含税金额")]
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
[ImporterHeader(Name = "采购价格不含税")]
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
[ImporterHeader(Name = "科目号", FixAllSpace = true)]
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[ImporterHeader(Name = "物料代码", FixAllSpace = true)]
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[ImporterHeader(Name = "物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
[ImporterHeader(Name = "日期")]
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[ImporterHeader(Name = "交货单号", FixAllSpace = true)]
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
[ImporterHeader(Name = "交货行号")]
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
[ImporterHeader(Name = "批次号")]
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
[ImporterHeader(Name = "单位")]
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
[ImporterHeader(Name = "税率")]
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
[ImporterHeader(Name = "税码")]
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
[ImporterHeader(Name = "德国发票号")]
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
[ImporterHeader(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
[ImporterHeader(Name = "工厂名称")]
public string FactoryName { get; set; }
}
}

129
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartRequestDto.cs

@ -1,129 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.VWSparePart
{
public class SparePartRequestDto : RequestDtoBase
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
public virtual Guid ParentId { get; set; }
public virtual Guid BranchId { get; set; }
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
}
}

100
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartVersionDtoBase.cs

@ -1,100 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.VWSparePart
{
/// <summary>
/// SettleAccountVersion
/// </summary>
public class SparePartVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
public class SparePartVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public Guid BranchId { get; set; }
}
public class SparePartVersionCreateDto : SparePartVersionDtoBase
{ }
public class SparePartVersionUpdateDto : SparePartVersionDtoBase
{ }
public class SparePartVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
}
public class SparePartVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
}

96
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/IWMSVWKanBanAppService.cs

@ -1,96 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public interface IWMSVWKanBanAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
// Task<string> WMSVWKanBanUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<WMSVWKanBanDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<WMSVWKanBanDto>> GetListAsync(WMSVWKanBanRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<WMSVWKanBanVersionDto>> GetVersionListAsync(WMSVWKanBanVersionRequestDto input);
Task<string> ExportAsync(WMSVWKanBanRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

14
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanCreateDto.cs

@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanCreateDto : WMSVWKanBanDtoBase, IBranch<Guid>
{
public virtual Guid BranchId { get; set; }
}
}

113
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanDto.cs

@ -1,113 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanDto : AuditedEntityDtoBase<Guid>
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
public virtual string Version { get; set; }
/// <summary>
///看板条码号
/// </summary>
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
public virtual string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
public virtual string PartType { set; get; }
/// <summary>
/// R3入库时间
/// </summary>
public virtual DateTime SettleInputDate { set; get; }
/// <summary>
///供应商编码
/// </summary>
public virtual string SupplierCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public virtual decimal Qty { get; set; }
/// <summary>
/// 批次
/// </summary>
public virtual string Batch { get; set; }
/// <summary>
/// 入库结算标识
/// </summary>
public virtual string Flag { get; set; }
/// <summary>
/// 结算日期
/// </summary>
public virtual DateTime SettleDate { get; set; }
/// <summary>
/// WMS交货单
/// </summary>
public string WMSDeliveryNote { set; get; }
/// <summary>
/// WMS实际发货日期
/// </summary>
public string WMSActualGoodsDate { set; get; }
/// <summary>
/// WMS交货数量
/// </summary>
public decimal WMSDeliveryQty { set; get; }
/// <summary>
/// WMS发货状态
/// </summary>
public string WMSDeliverGoodsState { set; get; }
/// <summary>
/// 看板结算状态
/// </summary>
public string WMSKanBanState { set; get; }
/// <summary>
/// 结算状态
/// </summary>
public virtual string State { get; set; }
/// <summary>
/// 出库单号
/// </summary>
public string DeliveryOrderNo { set; get; }
}
}

85
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanDtoBase.cs

@ -1,85 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
///看板条码号
/// </summary>
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
public virtual string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
public virtual string PartType { set; get; }
/// <summary>
/// R3入库时间
/// </summary>
public virtual DateTime SettleInputDate { set; get; }
/// <summary>
///供应商编码
/// </summary>
public virtual string SupplierCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public virtual decimal Qty { get; set; }
/// <summary>
/// 批次
/// </summary>
public virtual string Batch { get; set; }
/// <summary>
/// 入库结算标识
/// </summary>
public virtual string Flag { get; set; }
/// <summary>
/// 结算日期
/// </summary>
public virtual DateTime SettleDate { get; set; }
/// <summary>
/// 结算状态
/// </summary>
public virtual int State { get; set; }
public virtual string Version { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
}
}

92
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanExportDto.cs

@ -1,92 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanExportDto
{
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "版本")]
public virtual string Version { get; set; }
/// <summary>
///看板条码号
/// </summary>
[ExporterHeader(DisplayName = "看板条码号")]
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
[ExporterHeader(DisplayName = "入库关联号")]
public virtual string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
[ExporterHeader(DisplayName = "工厂")]
public virtual string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ExporterHeader(DisplayName = "零件号")]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[ExporterHeader(DisplayName = "零件类型")]
public virtual string PartType { set; get; }
/// <summary>
/// R3入库日期
/// </summary>
[ExporterHeader(DisplayName = "R3入库日期")]
public virtual DateTime SettleInputDate { set; get; }
/// <summary>
///供应商编码
/// </summary>
[ExporterHeader(DisplayName = "供应商")]
public virtual string SupplierCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public virtual decimal Qty { get; set; }
/// <summary>
/// 批次
/// </summary>
[ExporterHeader(DisplayName = "批次")]
public virtual string Batch { get; set; }
/// <summary>
/// 入库结算标识
/// </summary>
[ExporterHeader(DisplayName = "入库结算标识")]
public virtual string Flag { get; set; }
/// <summary>
/// 结算日期
/// </summary>
[ExporterHeader(DisplayName = "R3结算时间")]
public virtual DateTime SettleDate { get; set; }
/// <summary>
/// 结算状态
/// </summary>
[ExporterHeader(DisplayName = "结算状态")]
public virtual string State { get; set; }
}
}

93
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanImportDto.cs

@ -1,93 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanImportDto
{
///// <summary>
///// 期间
///// </summary>
//[ImporterHeader(Name = "期间")]
//public string Period { set; get; }
///// <summary>
///// 版本
///// </summary>
//[ImporterHeader(Name = "版本")]
//public virtual string Version { get; set; }
/// <summary>
///看板条码号
/// </summary>
[ImporterHeader(Name = "看板条码号", FixAllSpace = true)]
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
[ImporterHeader(Name = "入库关联号")]
public virtual string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
[ImporterHeader(Name = "工厂")]
public virtual string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ImporterHeader(Name = "零件号", FixAllSpace = true)]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[ImporterHeader(Name = "零件类型")]
public virtual string PartType { set; get; }
/// <summary>
/// R3入库日期
/// </summary>
[ImporterHeader(Name = "R3入库日期")]
public virtual string SettleInputDate { set; get; }
/// <summary>
///供应商编码
/// </summary>
[ImporterHeader(Name = "供应商")]
public virtual string SupplierCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[ImporterHeader(Name = "数量")]
public virtual decimal Qty { get; set; }
/// <summary>
/// 批次
/// </summary>
[ImporterHeader(Name = "批次")]
public virtual string Batch { get; set; }
/// <summary>
/// 入库结算标识
/// </summary>
[ImporterHeader(Name = "入库结算标识")]
public virtual string Flag { get; set; }
/// <summary>
/// 结算日期
/// </summary>
[ImporterHeader(Name = "R3结算时间")]
public virtual string SettleDate { get; set; }
/// <summary>
/// 结算状态
/// </summary>
[ImporterHeader(Name = "结算状态")]
public virtual string State { get; set; }
}
}

93
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanRequestDto.cs

@ -1,93 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBanRequestDto : RequestDtoBase
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
public virtual string Version { get; set; }
/// <summary>
///看板条码号
/// </summary>
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
public virtual string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
public virtual string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
public virtual string PartType { set; get; }
/// <summary>
/// R3入库时间
/// </summary>
public virtual DateTime SettleInputDate { set; get; }
/// <summary>
///供应商编码
/// </summary>
public virtual string SupplierCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public virtual decimal Qty { get; set; }
/// <summary>
/// 批次
/// </summary>
public virtual string Batch { get; set; }
/// <summary>
/// 入库结算标识
/// </summary>
public virtual string Flag { get; set; }
/// <summary>
/// 结算日期
/// </summary>
public virtual DateTime SettleDate { get; set; }
/// <summary>
/// 结算状态
/// </summary>
public virtual string State { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
public virtual Guid ParentId { get; set; }
public virtual Guid BranchId { get; set; }
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
}
}

100
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBanVersionDtoBase.cs

@ -1,100 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
/// <summary>
/// SettleAccountVersion
/// </summary>
public class WMSVWKanBanVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
public class WMSVWKanBanVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public Guid BranchId { get; set; }
}
public class WMSVWKanBanVersionCreateDto : WMSVWKanBanVersionDtoBase
{ }
public class WMSVWKanBanVersionUpdateDto : WMSVWKanBanVersionDtoBase
{ }
public class WMSVWKanBanVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
}
public class WMSVWKanBanVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
}

16
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSKanBan/WMSVWKanBantUpdateDto.cs

@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.SettleAccount.Entities.VWKanBan;
namespace Win.Sfs.SettleAccount.Entities.WMSKanBan
{
public class WMSVWKanBantUpdateDto : VWKanBanDtoBase
{
}
}

91
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/IWMSSparePartAppService.cs

@ -1,91 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public interface IWMSSparePartAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
//Task<string> WMSSparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId,
// string year, string period, string version, string customerCode);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<WMSSparePartDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<WMSSparePartDto>> GetListAsync(WMSSparePartRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<WMSSparePartVersionDto>> GetVersionListAsync(WMSSparePartVersionRequestDto input);
Task<string> ExportAsync(WMSSparePartRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

14
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartCreateDto.cs

@ -1,14 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartCreateDto : WMSSparePartDtoBase, IBranch<Guid>
{
public virtual Guid BranchId { get; set; }
}
}

137
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartDto.cs

@ -1,137 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartDto : AuditedEntityDtoBase<Guid>
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
/// <summary>
/// WMS交货单
/// </summary>
public string WMSDeliveryNote { set; get; }
/// <summary>
/// WMS发货状态
/// </summary>
public string WMSDeliverGoodsState { set; get; }
/// <summary>
/// 看板结算状态
/// </summary>
public string WMSSparePartState { set; get; }
}
}

124
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartDtoBase.cs

@ -1,124 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
}
}

143
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartExportDto.cs

@ -1,143 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartExportDto
{
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "版本")]
public virtual string Version { get; set; }
/// <summary>
/// 行号
/// </summary>
[ExporterHeader(DisplayName = "行号")]
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
[ExporterHeader(DisplayName = "采购类型")]
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
[ExporterHeader(DisplayName = "采购订单号")]
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
[ExporterHeader(DisplayName = "采购订单行项目")]
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
[ExporterHeader(DisplayName = "采购订单文本")]
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[ExporterHeader(DisplayName = "收货数量")]
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
[ExporterHeader(DisplayName = "开票数量")]
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
[ExporterHeader(DisplayName = "不含税金额")]
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
[ExporterHeader(DisplayName = "采购价格不含税")]
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
[ExporterHeader(DisplayName = "科目号")]
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[ExporterHeader(DisplayName = "物料代码")]
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
[ExporterHeader(DisplayName = "日期")]
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[ExporterHeader(DisplayName = "交货单号")]
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
[ExporterHeader(DisplayName = "交货行号")]
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
[ExporterHeader(DisplayName = "批次号")]
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
[ExporterHeader(DisplayName = "单位")]
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
[ExporterHeader(DisplayName = "税率")]
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
[ExporterHeader(DisplayName = "税码")]
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
[ExporterHeader(DisplayName = "德国发票号")]
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
[ExporterHeader(DisplayName = "工厂")]
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
[ExporterHeader(DisplayName = "工厂名称")]
public string FactoryName { get; set; }
}
}

129
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartImportDto.cs

@ -1,129 +0,0 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartImportDto
{
/// <summary>
/// 行号
/// </summary>
[ImporterHeader(Name = "行号")]
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
[ImporterHeader(Name = "采购类型")]
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
[ImporterHeader(Name = "采购订单号", FixAllSpace = true)]
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
[ImporterHeader(Name = "采购订单行项目")]
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
[ImporterHeader(Name = "采购订单文本")]
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[ImporterHeader(Name = "收货数量")]
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
[ImporterHeader(Name = "开票数量")]
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
[ImporterHeader(Name = "不含税金额")]
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
[ImporterHeader(Name = "采购价格不含税")]
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
[ImporterHeader(Name = "科目号", FixAllSpace = true)]
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[ImporterHeader(Name = "物料代码", FixAllSpace = true)]
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[ImporterHeader(Name = "物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
[ImporterHeader(Name = "日期")]
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[ImporterHeader(Name = "交货单号", FixAllSpace = true)]
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
[ImporterHeader(Name = "交货行号")]
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
[ImporterHeader(Name = "批次号")]
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
[ImporterHeader(Name = "单位")]
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
[ImporterHeader(Name = "税率")]
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
[ImporterHeader(Name = "税码")]
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
[ImporterHeader(Name = "德国发票号")]
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
[ImporterHeader(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
[ImporterHeader(Name = "工厂名称")]
public string FactoryName { get; set; }
}
}

129
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartRequestDto.cs

@ -1,129 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
public class WMSSparePartRequestDto : RequestDtoBase
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
public virtual Guid ParentId { get; set; }
public virtual Guid BranchId { get; set; }
public virtual Guid UserId { get; set; }
public virtual int FileType { get; set; }
}
}

100
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/WMSSparePart/WMSSparePartVersionDtoBase.cs

@ -1,100 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.WMSSparePart
{
/// <summary>
/// SettleAccountVersion
/// </summary>
public class WMSSparePartVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
public class WMSSparePartVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public Guid BranchId { get; set; }
}
public class WMSSparePartVersionCreateDto : WMSSparePartVersionDtoBase
{ }
public class WMSSparePartVersionUpdateDto : WMSSparePartVersionDtoBase
{ }
public class WMSSparePartVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
}
public class WMSSparePartVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/ErrorListBill/ErrorBillAppService.cs

@ -27,12 +27,10 @@ using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.Boms;
using Win.Sfs.SettleAccount.Entities.Errors;
using Win.Sfs.SettleAccount.Entities.EstimatedInventories;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Win.Sfs.SettleAccount.Errors;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Reports;

347
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQExtend/HQKBExtendAppService.cs

@ -1,347 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Distributed;
using Shouldly;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.ERPShipping;
using Win.Sfs.SettleAccount.Entities.ERPShpping;
using Win.Sfs.SettleAccount.Entities.HQExtend;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.Materials;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.CacheBase;
using Win.Sfs.Shared.Filter;
using Win.Utils;
namespace Win.Sfs.SettleAccount.HQKBExtends
{
/// <summary>
/// 区域相关应用服务
/// </summary>
[Authorize(SettleAccountPermissions.Boms.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/ErpShipping")]
public class HQKBExtendAppService : SettleAccountApplicationBase<HQKBExtend>
{
private readonly IGuidGenerator _guidGenerator;
private readonly IObjectMapper _objectMapper;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository<HQKBExtend, Guid> _repository;
private readonly ISettleAccountBranchEfCoreRepository<Material, Guid> _materialRepository;
private readonly ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> _importColumnMapRepository;
private readonly ISettleAccountBranchEfCoreRepository<HQKBExtendVersion, Guid> _versionRepository;
/// <summary>
/// 构建方法
/// </summary>
/// <param name="guidGenerator">构建UID</param>
/// <param name="objectMapper">自动map</param>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public HQKBExtendAppService(IGuidGenerator guidGenerator,
IObjectMapper objectMapper,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
ISettleAccountBranchEfCoreRepository<HQKBExtend, Guid> repository,
ISettleAccountBranchEfCoreRepository<HQKBExtendVersion, Guid> versionRepository,
ISettleAccountBranchEfCoreRepository<Material, Guid> materialRepository,
ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> importColumnMapRepository,
IDistributedCache<HQKBExtend> cache
) : base(cache,excelImportService,snowflakeIdGenerator,commonManager)
{
_guidGenerator = guidGenerator;
_objectMapper = objectMapper;
_repository = repository;
_excelImportService = excelImportService;
_versionRepository = versionRepository;
_materialRepository = materialRepository;
_importColumnMapRepository = importColumnMapRepository;
}
#region 导入导出功能
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
public async Task<string> HQKBExtendUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode,string factory)
{
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<HQKBExtendDto>(files, _excelImportService);
var entityList = ObjectMapper.Map<List<HQKBExtendDto>, List<HQKBExtend>>(result);
var _versionQuery = _versionRepository.Where(p => p.Version == version );
await _versionQuery.BatchDeleteAsync();
var _query = _repository.Where(p => p.Version == version );
await _query.BatchDeleteAsync();
//var checkList = new List<ErrorExportDto>();
//var _matList =await _materialRepository.GetAllAsync(GuidGenerator.Create());
// var _group = entityList.GroupBy(x => new { x.ParentItemCode, x.ChildItemCode, x.Version }).Select(p => new { Count = p.Count(),ParentItmeCode=p.Key.ParentItemCode, ChildItemCode=p.Key.ChildItemCode });
//foreach (var itm in _group)
//{
// if (itm.Count > 1)
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("不能导入父编码{0},子编码{1}有重复数据", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// }
//}
//var _id = GuidGenerator.Create();
//var _HQKBExtendList = new List<HQKBExtendVersion>();
//_HQKBExtendList.Add(new HQKBExtendVersion(_id, branchId, year, period, version, customerCode,factory));
//foreach (var itm in entityList)
//{
// if (!_matList.Any(p => p.MaterialCode == itm.ParentItemCode))
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("物料主数据不存在物料号{0}!", itm.ParentItemCode), string.Empty));
// continue;
// }
// itm.SetValue(GuidGenerator.Create(),branchId,year,period,version,_id,factory);
//}
//if (checkList.Count > 0)
//{
// return await ExportErrorReportAsync(checkList);
//}
await _repository.GetDbContext().BulkInsertAsync<HQKBExtend>(entityList);
await _versionRepository.GetDbContext().BulkInsertAsync(new List<HQKBExtendVersion> { new HQKBExtendVersion(Guid.NewGuid(), branchId, year, period, version, customerCode, factory) });
//st.Stop();
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 导出文件
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("Export")]
virtual public async Task<string> ExportAsync(HQKBExtendRequestDto input)
{
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
//导出加上版本过滤条件,不能全导出
if (!string.IsNullOrEmpty(input.Version ))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version.ToString() });
}
//else
//{
// return new PagedResultDto<HQKBExtendDto>(0, new List<HQKBExtendDto>());
//}
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
0, true);
var dtoDetails = ObjectMapper.Map<List<HQKBExtend>, List<HQKBExtendExportDto>>(entities);
string _fileName = string.Empty;
//声明导出容器
byte[] result = null;
_fileName = string.Format("ERP调拨_{0}.xlsx", Guid.NewGuid().ToString("N"));
result = await _excel.ExportAsByteArray(dtoDetails);
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result
}
);
return _fileName;
}
#endregion
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
[HttpGet]
[Route("{id}")]
virtual public async Task<HQKBExtendDto> GetAsync(Guid id)
{
var result = await _repository.GetAsync(id);
var dto = _objectMapper.Map<HQKBExtend, HQKBExtendDto>(result);
return dto;
}
private async Task<HQKBExtend> GetFromCacheAsync(Guid id)
{
var result = await _repository.GetAsync(id);
return result;
}
private async Task<long> GetCountAsync(HQKBExtendRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
private async Task<long> GetCountAsync(HQKBExtendVersionRequestDto input)
{
return await _versionRepository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
[HttpGet]
[Route("count")]
virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{
return await _repository.GetCountAsync(branchId);
}
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">ID</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
virtual public async Task DeleteAsync(Guid id)
{
//var entity = await GetFromCacheAsync(id);
//await Cache.DeleteAsync<HQKBExtend>(id.ToString());
await _repository.DeleteAsync(id);
}
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
[HttpPost]
[Route("delete")]
virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
{
//foreach (var id in ids)
//{
// var entity = await GetFromCacheAsync(id);
//}
return await _repository.DeleteListAsync(ids);
}
///// <summary>
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("list")]
public async Task<PagedResultDto<HQKBExtendDto>> GetListAsync(Guid parentId, HQKBExtendRequestDto input)
{
if (!string.IsNullOrEmpty(input.Version) )
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
else
{
return new PagedResultDto<HQKBExtendDto>(0,new List<HQKBExtendDto>());
}
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = _objectMapper.Map<List<HQKBExtend>, List<HQKBExtendDto>>(entities);
return new PagedResultDto<HQKBExtendDto>(totalCount, dtos);
}
///// <summary>
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("listVersion")]
public async Task<PagedResultDto<HQKBExtendVersionDto>> GetVersionListAsync(HQKBExtendVersionRequestDto input)
{
var entities = await _versionRepository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = _objectMapper.Map<List<HQKBExtendVersion>, List<HQKBExtendVersionDto>>(entities);
//foreach (var itm in dtos)
//{
// itm.Version = itm.Version + string.Format("({0})", itm.Factory);
//}
return new PagedResultDto<HQKBExtendVersionDto>(totalCount, dtos);
}
}
}

346
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQExtend/HQKBSettleExtendAppService.cs

@ -1,346 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Distributed;
using Shouldly;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.ERPShipping;
using Win.Sfs.SettleAccount.Entities.ERPShpping;
using Win.Sfs.SettleAccount.Entities.HQExtend;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.Materials;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.CacheBase;
using Win.Sfs.Shared.Filter;
using Win.Utils;
namespace Win.Sfs.SettleAccount.HQKBExtends
{
/// <summary>
/// 区域相关应用服务
/// </summary>
[Authorize(SettleAccountPermissions.Boms.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/ErpShipping")]
public class HQKBSettleExtendAppService : SettleAccountApplicationBase<HQKBSettleExtend>
{
private readonly IGuidGenerator _guidGenerator;
private readonly IObjectMapper _objectMapper;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository<HQKBSettleExtend, Guid> _repository;
private readonly ISettleAccountBranchEfCoreRepository<Material, Guid> _materialRepository;
private readonly ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> _importColumnMapRepository;
private readonly ISettleAccountBranchEfCoreRepository<HQKBSettleExtendVersion, Guid> _versionRepository;
/// <summary>
/// 构建方法
/// </summary>
/// <param name="guidGenerator">构建UID</param>
/// <param name="objectMapper">自动map</param>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public HQKBSettleExtendAppService(IGuidGenerator guidGenerator,
IObjectMapper objectMapper,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
ISettleAccountBranchEfCoreRepository<HQKBSettleExtend, Guid> repository,
ISettleAccountBranchEfCoreRepository<HQKBSettleExtendVersion, Guid> versionRepository,
ISettleAccountBranchEfCoreRepository<Material, Guid> materialRepository,
ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> importColumnMapRepository,
IDistributedCache<HQKBSettleExtend> cache
) : base(cache,excelImportService,snowflakeIdGenerator,commonManager)
{
_guidGenerator = guidGenerator;
_objectMapper = objectMapper;
_repository = repository;
_excelImportService = excelImportService;
_versionRepository = versionRepository;
_materialRepository = materialRepository;
_importColumnMapRepository = importColumnMapRepository;
}
#region 导入导出功能
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
public async Task<string> HQKBSettleExtendUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode,string factory)
{
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<HQKBSettleExtendDto>(files, _excelImportService);
var entityList = ObjectMapper.Map<List<HQKBSettleExtendDto>, List<HQKBSettleExtend>>(result);
var _versionQuery = _versionRepository.Where(p => p.Version == version );
await _versionQuery.BatchDeleteAsync();
var _query = _repository.Where(p => p.Version == version );
await _query.BatchDeleteAsync();
//var checkList = new List<ErrorExportDto>();
//var _matList =await _materialRepository.GetAllAsync(GuidGenerator.Create());
// var _group = entityList.GroupBy(x => new { x.ParentItemCode, x.ChildItemCode, x.Version }).Select(p => new { Count = p.Count(),ParentItmeCode=p.Key.ParentItemCode, ChildItemCode=p.Key.ChildItemCode });
//foreach (var itm in _group)
//{
// if (itm.Count > 1)
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("不能导入父编码{0},子编码{1}有重复数据", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// }
//}
//var _id = GuidGenerator.Create();
//var _HQKBSettleExtendList = new List<HQKBSettleExtendVersion>();
//_HQKBSettleExtendList.Add(new HQKBSettleExtendVersion(_id, branchId, year, period, version, customerCode,factory));
//foreach (var itm in entityList)
//{
// if (!_matList.Any(p => p.MaterialCode == itm.ParentItemCode))
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("物料主数据不存在物料号{0}!", itm.ParentItemCode), string.Empty));
// continue;
// }
// itm.SetValue(GuidGenerator.Create(),branchId,year,period,version,_id,factory);
//}
//if (checkList.Count > 0)
//{
// return await ExportErrorReportAsync(checkList);
//}
await _repository.GetDbContext().BulkInsertAsync<HQKBSettleExtend>(entityList);
await _versionRepository.GetDbContext().BulkInsertAsync(new List<HQKBSettleExtendVersion> { new HQKBSettleExtendVersion(Guid.NewGuid(), branchId, year, period, version, customerCode, factory) });
//st.Stop();
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 导出文件
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("Export")]
virtual public async Task<string> ExportAsync(HQKBSettleExtendRequestDto input)
{
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
//导出加上版本过滤条件,不能全导出
if (!string.IsNullOrEmpty(input.Version ))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version.ToString() });
}
//else
//{
// return new PagedResultDto<HQKBSettleExtendDto>(0, new List<HQKBSettleExtendDto>());
//}
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
0, true);
var dtoDetails = ObjectMapper.Map<List<HQKBSettleExtend>, List<HQKBSettleExtendExportDto>>(entities);
string _fileName = string.Empty;
//声明导出容器
byte[] result = null;
_fileName = string.Format("ERP调拨_{0}.xlsx", Guid.NewGuid().ToString("N"));
result = await _excel.ExportAsByteArray(dtoDetails);
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result
}
);
return _fileName;
}
#endregion
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
[HttpGet]
[Route("{id}")]
virtual public async Task<HQKBSettleExtendDto> GetAsync(Guid id)
{
var result = await _repository.GetAsync(id);
var dto = _objectMapper.Map<HQKBSettleExtend, HQKBSettleExtendDto>(result);
return dto;
}
private async Task<HQKBSettleExtend> GetFromCacheAsync(Guid id)
{
var result = await _repository.GetAsync(id);
return result;
}
private async Task<long> GetCountAsync(HQKBSettleExtendRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
private async Task<long> GetCountAsync(HQKBSettleExtendVersionRequestDto input)
{
return await _versionRepository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
[HttpGet]
[Route("count")]
virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{
return await _repository.GetCountAsync(branchId);
}
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">ID</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
virtual public async Task DeleteAsync(Guid id)
{
//var entity = await GetFromCacheAsync(id);
//await Cache.DeleteAsync<HQKBSettleExtend>(id.ToString());
await _repository.DeleteAsync(id);
}
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
[HttpPost]
[Route("delete")]
virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
{
//foreach (var id in ids)
//{
// var entity = await GetFromCacheAsync(id);
//}
return await _repository.DeleteListAsync(ids);
}
///// <summary>
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("list")]
public async Task<PagedResultDto<HQKBSettleExtendDto>> GetListAsync(Guid parentId, HQKBSettleExtendRequestDto input)
{
if (!string.IsNullOrEmpty(input.Version) )
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
else
{
return new PagedResultDto<HQKBSettleExtendDto>(0,new List<HQKBSettleExtendDto>());
}
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = _objectMapper.Map<List<HQKBSettleExtend>, List<HQKBSettleExtendDto>>(entities);
return new PagedResultDto<HQKBSettleExtendDto>(totalCount, dtos);
}
///// <summary>
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("listVersion")]
public async Task<PagedResultDto<HQKBSettleExtendVersionDto>> GetVersionListAsync(HQKBSettleExtendVersionRequestDto input)
{
var entities = await _versionRepository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = _objectMapper.Map<List<HQKBSettleExtendVersion>, List<HQKBSettleExtendVersionDto>>(entities);
//foreach (var itm in dtos)
//{
// itm.Version = itm.Version + string.Format("({0})", itm.Factory);
//}
return new PagedResultDto<HQKBSettleExtendVersionDto>(totalCount, dtos);
}
}
}

344
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/HQ_H/HQ_H_PlatformAppService.cs

@ -1,344 +0,0 @@
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
using Win.Sfs.Shared.Filter;
namespace Win.Sfs.SettleAccount.Entities.HQ_H
{
/// <summary>
/// 红旗H平台导入
/// </summary>
[Authorize(SettleAccountPermissions.HQ_HPlatform.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/HQHPlatform")]
public class HQ_H_PlatformAppService : SettleAccountApplicationBase<HQ_H_Platform>, IHQ_H_PlatformAppService
{
private readonly IGuidGenerator _guidGenerator;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository<HQ_H_PlatformVersion, Guid> _versionRepository;
private readonly ISettleAccountBranchEfCoreRepository<HQ_H_Platform, Guid> _repository;
private readonly ErpPartDapperRepository _erpdapperRepository;
/// <summary>
/// 构建方法
/// </summary>
/// <param name="guidGenerator">构建UID</param>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public HQ_H_PlatformAppService(IGuidGenerator guidGenerator,
ISettleAccountBranchEfCoreRepository<HQ_H_PlatformVersion, Guid> versionRepository,
ISettleAccountBranchEfCoreRepository<HQ_H_Platform, Guid> repository,
IDistributedCache<HQ_H_Platform> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ErpPartDapperRepository erpdapperRepository,
ICommonManager commonManager
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_versionRepository = versionRepository;
_guidGenerator = guidGenerator;
_excelImportService = excelImportService;
_repository = repository;
_erpdapperRepository = erpdapperRepository;
}
/// <summary>
/// 统一导入红旗平台数据,包括H、M、F平台
/// </summary>
/// <param name="files"></param>
/// <param name="branchId"></param>
/// <param name="year"></param>
/// <param name="period"></param>
/// <param name="version"></param>
/// <param name="customerCode"></param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
[UnitOfWork(false)]
[Authorize(SettleAccountPermissions.HQ_HPlatform.Create)]
public async Task<string> HQ_H_PlatformUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode)
{
ExportImporter _exportImporter = new ExportImporter();
var checkList = new List<ErrorExportDto>();
var result = await _exportImporter.UploadExcelImport<HQ_H_PlatformImportDto>(files, _excelImportService);
if (result == null || result.Count == 0)
{
throw new BusinessException("导入模板数据不能为空!");
}
var entityList = ObjectMapper.Map<List<HQ_H_PlatformImportDto>, List<HQ_H_Platform>>(result);
//和物料主数据中SAP物料号检验是否存在
foreach (var itm in entityList)
{
if (!_erpdapperRepository.GetMaterialList().Any(p => p.CustomerPartCode == itm.MaterialCode))
{
checkList.Add(new ErrorExportDto(version, "红旗结算导入", string.Empty, string.Empty, itm.MaterialCode, string.Empty, string.Format("物料主数据不存在当前导入的物料号{0}!", itm.MaterialCode), string.Empty));
}
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
//删除版本
var _versionQuery = _versionRepository.Where(p => p.Version == version);
await _versionQuery.BatchDeleteAsync();
//删除明细
var _query = _repository.Where(p => p.Version == version);
await _query.BatchDeleteAsync();
var _id = GuidGenerator.Create();
var _bomList = new List<HQ_H_PlatformVersion>();
_bomList.Add(new HQ_H_PlatformVersion(_id, branchId, year, period, version, customerCode));
foreach (var itm in entityList)
{
if (string.IsNullOrEmpty(itm.HQHKanBan) && itm.StorageLocationDesc.Contains("备品"))
{
//赋值上主键ID
itm.SetValue(GuidGenerator.Create(), branchId, year, period, version, "BJ");//备品库没有看板号,需要特殊标识一下BJ,已经和客户确认
}
else
{
itm.SetValue(GuidGenerator.Create(), branchId, year, period, version);
}
}
await _repository.GetDbContext().BulkInsertAsync<HQ_H_Platform>(entityList);
await _versionRepository.GetDbContext().BulkInsertAsync(_bomList);
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
[HttpGet]
[Route("{id}")]
virtual public async Task<HQ_H_PlatformDto> GetAsync(Guid id)
{
var result = await GetFromCacheAsync(id);
var dto = ObjectMapper.Map<HQ_H_Platform, HQ_H_PlatformDto>(result);
return dto;
}
private async Task<HQ_H_Platform> GetFromCacheAsync(Guid id)
{
var result = await _repository.GetAsync(id);
return result;
}
private async Task<long> GetCountAsync(HQ_H_PlatformRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
private async Task<long> GetCountAsync(HQ_H_PlatformVersionRequestDto input)
{
return await _versionRepository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
/// <summary>
/// 导出文件
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("Export")]
virtual public async Task<string> ExportAsync(HQ_H_PlatformRequestDto input)
{
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
if (!string.IsNullOrEmpty(input.Version))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
0, true);
var dtoDetails = ObjectMapper.Map<List<HQ_H_Platform>, List<HQ_H_PlatformExportDto>>(entities);
string _fileName = string.Empty;
//声明导出容器
byte[] result = null;
switch (input.FileType)
{
case 0:
_fileName = string.Format("红旗工厂结算明细_{0}.csv", input.UserId.ToString());
result = await _csv.ExportAsByteArray(dtoDetails);
break;
case 1:
_fileName = string.Format("红旗工厂结算明细_{0}.xlsx", input.UserId.ToString());
result = await _excel.ExportAsByteArray(dtoDetails);
break;
}
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result
}
);
return _fileName;
}
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("list")]
virtual public async Task<PagedResultDto<HQ_H_PlatformDto>> GetListAsync(HQ_H_PlatformRequestDto input)
{
if (!string.IsNullOrEmpty(input.Version))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
else
{
return new PagedResultDto<HQ_H_PlatformDto>(0, new List<HQ_H_PlatformDto>());
}
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<HQ_H_Platform>, List<HQ_H_PlatformDto>>(entities);
return new PagedResultDto<HQ_H_PlatformDto>(totalCount, dtos);
}
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
[HttpGet]
[Route("count")]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{
return await _repository.GetCountAsync(branchId);
}
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
[HttpGet]
[Route("all")]
virtual public async Task<ListResultDto<HQ_H_PlatformDto>> GetAllAsync(Guid branchId)
{
var entities = await _repository.GetAllAsync(branchId, true);
var dtos = ObjectMapper.Map<List<HQ_H_Platform>, List<HQ_H_PlatformDto>>(entities);
return new ListResultDto<HQ_H_PlatformDto>(dtos);
}
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">ID</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
/// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task DeleteAsync(Guid id)
{
await _repository.DeleteAsync(id);
}
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
[HttpPost]
[Route("delete")]
// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
{
foreach (var id in ids)
{
var entity = await GetFromCacheAsync(id);
//await Cache.DeleteAsync<SettleAccount>(id.ToString());
}
return await _repository.DeleteListAsync(ids);
}
/// <summary>
/// 版本列表查询
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("listversion")]
public async Task<PagedResultDto<HQ_H_PlatformVersionDto>> GetVersionListAsync(HQ_H_PlatformVersionRequestDto input)
{
var entities = await _versionRepository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<HQ_H_PlatformVersion>, List<HQ_H_PlatformVersionDto>>(entities);
return new PagedResultDto<HQ_H_PlatformVersionDto>(totalCount, dtos);
}
}
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Materials/MaterialAppService.cs

@ -26,11 +26,9 @@ using Win.Sfs.SettleAccount.Boms;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.Boms;
using Win.Sfs.SettleAccount.Entities.EstimatedInventories;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;

14
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs

@ -43,7 +43,6 @@ using Magicodes.ExporterAndImporter.Core.Models;
using TaskJob.Services;
using TaskJob.EventArgs;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Repository;
@ -62,14 +61,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository<Prebatches.Prebatch, Guid> _preBatchRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsJitOutPutDetial, Guid> _wmsRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsJitOutPut, Guid> _wmsVersionRepository;
private readonly ISettleAccountBranchEfCoreRepository<SettleAccount, Guid> _repository;
private readonly ISettleAccountBranchEfCoreRepository<SettleAccountVersion, Guid> _versionRepository;
private readonly ISettleAccountBranchEfCoreRepository<FIS, Guid> _fisRepository;
private readonly ISettleAccountBranchEfCoreRepository<MaterialRelationship, Guid> _relrepository;
private readonly WMSEfCoreRepository<WmsJitOutPutDetial> _wmsefRespository;
private readonly TaskJobService _service;
/// <summary>
/// 构建方法
@ -88,10 +84,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
TaskJobService service,
ISettleAccountBranchEfCoreRepository<FIS, Guid> fisRepository,
ISettleAccountBranchEfCoreRepository<Prebatches.Prebatch, Guid> preBatchRepository,
ISettleAccountBranchEfCoreRepository<MaterialRelationship, Guid> relrepository,
ISettleAccountBranchEfCoreRepository<WmsJitOutPutDetial, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<WmsJitOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsJitOutPutDetial> wmsefRespository
ISettleAccountBranchEfCoreRepository<MaterialRelationship, Guid> relrepository
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_service = service;
@ -102,9 +95,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
_repository = repository;
_preBatchRepository = preBatchRepository;
_relrepository = relrepository;
_wmsRepository = wmsRepository;
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
}

468
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettlementCrossReference/SettlementCrossReferenceAppService.cs

@ -1,468 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Distributed;
using Shouldly;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.ItemInvoicePrices;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.Materials;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.CacheBase;
using Win.Sfs.Shared.Filter;
using Win.Utils;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.SettlementParts;
using Win.Sfs.SettleAccount.Entities.SettlementCrossReferences;
using Win.Sfs.SettleAccount.Entities.SettlementCrossReference;
using System.IO;
namespace Win.Sfs.SettleAccount.SettlementCrossReferences
{
/// <summary>
/// 结算件对照关系服务
/// </summary>
//[AllowAnonymous]
[Route("api/settleaccount/SettlementCrossReference")]
[Authorize(SettleAccountPermissions.Boms.Default)]
public class SettlementCrossReferenceAppService : SettleAccountApplicationBase<SettlementCrossReference>, ISettlementCrossReferenceAppService
{
private readonly IObjectMapper _objectMapper;
private readonly ISettleAccountBranchEfCoreRepository<SettlementCrossReference, Guid> _repository;
private readonly ISettleAccountBranchEfCoreRepository<SettlementCrossReferenceVersion, Guid> _versionRepository;
private readonly ISettleAccountBranchEfCoreRepository<Prebatches.Prebatch, Guid> _preBatchRepository;
private readonly ISettleAccountBranchEfCoreRepository<MaterialRelationship, Guid> _relrepository;
/// <summary>
/// 构建方法
/// </summary>
/// <param name="guidGenerator">构建UID</param>
/// <param name="objectMapper">自动map</param>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public SettlementCrossReferenceAppService(IGuidGenerator guidGenerator,
IObjectMapper objectMapper,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
ISettleAccountBranchEfCoreRepository<SettlementCrossReference, Guid> repository,
ISettleAccountBranchEfCoreRepository<SettlementCrossReferenceVersion, Guid> versionRepository,
ISettleAccountBranchEfCoreRepository<Material, Guid> materialRepository,
ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> importColumnMapRepository,
ISettleAccountBranchEfCoreRepository<MaterialRelationshipDetail, Guid> relationRepository,
ISettleAccountBranchEfCoreRepository<SettlementPart, Guid> priceRepository,
ISettleAccountBranchEfCoreRepository<Prebatches.Prebatch, Guid> preBatchRepository,
ISettleAccountBranchEfCoreRepository<MaterialRelationship, Guid> relrepository,
IDistributedCache<SettlementCrossReference> cache
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
//_guidGenerator = guidGenerator;
_objectMapper = objectMapper;
_repository = repository;
//_excelImportService = excelImportService;
_versionRepository = versionRepository;
_relrepository = relrepository;
_preBatchRepository = preBatchRepository;
//_materialRepository = materialRepository;
//_importColumnMapRepository = importColumnMapRepository;
//_relationRepository = relationRepository;
//_priceRepository = priceRepository;
}
///// <summary>
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("list")]
//[Authorize(SettleAccountPermissions.SettlementCrossReference.Default)]
public async Task<PagedResultDto<SettlementCrossReferenceDto>> GetListAsync(SettlementCrossReferenceRequestDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = _objectMapper.Map<List<SettlementCrossReference>, List<SettlementCrossReferenceDto>>(entities);
// var dtos = _objectMapper.Map<SettlementCrossReference, SettlementCrossReferenceDto>(entities);
return new PagedResultDto<SettlementCrossReferenceDto>(totalCount, dtos);
}
private async Task<long> GetCountAsync(SettlementCrossReferenceRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
private async Task<long> GetCountAsync(SettlementCrossReferenceVersionRequestDto input)
{
return await _versionRepository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
///// <summary>
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("versionlist")]
//[Authorize(SettleAccountPermissions.SettlementCrossReference.Default)]
public async Task<PagedResultDto<SettlementCrossReferenceVersionDto>> GetVersionListAsync(SettlementCrossReferenceVersionRequestDto input)
{
var entities = await _versionRepository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = _objectMapper.Map<List<SettlementCrossReferenceVersion>, List<SettlementCrossReferenceVersionDto>>(entities);
//foreach (var itm in dtos)
//{
// itm.Version = itm.Version + string.Format("({0})", itm.Factory);
//}
return new PagedResultDto<SettlementCrossReferenceVersionDto>(totalCount, dtos);
}
/////// <summary>
///// <summary>
///// 导入
///// </summary>
///// <returns></returns>
//[HttpPost]
//[Route("ExcelImport")]
//[DisableRequestSizeLimit]
////[Authorize(SettleAccountPermissions.SettlementCrossReference.Default)]
//public async Task<string> SettlementCrossReferenceUploadCSVImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory)
//{
// List<SettlementCrossReference> _setls = new List<SettlementCrossReference>();
// List<string> _errorList = new List<string>();
// var _id = GuidGenerator.Create();
// var checkList = new List<ErrorExportDto>();
// //var _chList = await _relrepository.GetAllAsync(GuidGenerator.Create(), true);
// //var _chls = _chList.Select(p => p.SettleMaterialCode).Distinct();
// var _VersionList = new List<SettlementCrossReferenceVersion>();
// _VersionList.Add(new SettlementCrossReferenceVersion(_id, branchId, year, period, version, customerCode, factory));
// List<string> _precodeList = new List<string>();//
// using (TextReader textReader = new StreamReader(files[0].OpenReadStream()))
// {
// //var _preList = _preBatchRepository.Where(p => p.State == 3).ToList();
// var _versionQuery = _versionRepository.Where(p => p.Version == version);
// await _versionQuery.BatchDeleteAsync();
// var _query = _repository.Where(p => p.Version == version);
// await _query.BatchDeleteAsync();
// int i = 0;
// //var _userId = CurrentUser.Id.Value;
// while (true)
// {
// string str = await textReader.ReadLineAsync();
// if (string.IsNullOrEmpty(str))
// {
// break;
// }
// else
// {
// //if (i > headerNumber)
// //{
// try
// {
// var _lst = str.Split(new char[] { ',' }).ToList();
// //string _period = _lst[1].Trim();
// string _factory = "";
// //_lst[0].Trim();
// string _model = _lst[0].Trim();
// string _partType = _lst[1].Trim();
// string _settlementMaterialCode = _lst[2].Trim();
// if (string.IsNullOrEmpty(_settlementMaterialCode))
// {
// continue;
// }
// string _bomMaterialCode = _lst[3].Trim();
// string _materialDesc = _lst[3].Trim();
// string _supplierCode = _lst[4].Trim();
// string _supplierDesc = _lst[4].Trim();
// string _buyer = _lst[5].Trim();
// //string _customerCode = _lst[10].Trim();
// //if (_preList.Any(p => p.KENNCode == _kENNCode))
// //{
// // _precodeList.Add(_kENNCode);
// //}
// _setls.Add(new SettlementCrossReference(
// GuidGenerator.Create(),
// year,
// period,
// _factory,
// _model,
// _partType,
// _settlementMaterialCode,
// _bomMaterialCode,
// _materialDesc,
// _supplierCode,
// _supplierDesc,
// _buyer,
// customerCode,
// version
// ));
// }
// catch
// {
// }
// //}
// }
// i++;
// }
// textReader.Close();
// }
// var _ls = _setls;
// var query = from arc in _ls
// group arc by new { arc.Version, arc.SettlementMaterialCode, arc.BomMaterialCode }
// into g
// where g.Count() > 1
// select g;
// var _l = _setls.Select(p => p.SettlementMaterialCode).Distinct();
// //var _notls = _l.Where(p => !_chls.Contains(p)).ToList();
// //foreach (var itm in _notls)
// //{
// // checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm, string.Empty, string.Format("关系表中不存在结算物料号{0}!", itm), string.Empty));
// //}
// foreach (var itm in query)
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("期间{0} 总成结算号 {1} Bom清单零件号{2} 有重复", itm.Key.SettlementMaterialCode, itm.Key.BomMaterialCode, itm.Key.Version), string.Empty));
// }
// if (checkList.Count > 0)
// {
// return await ExportErrorReportAsync(checkList);
// }
// //var _existls = _preBatchRepository.Where(p => _precodeList.Contains(p.KENNCode)).ToList();
// //if (_existls.Count > 0)
// //{
// // foreach (var itm in _existls)
// // {
// // itm.Update(string.Format("结算修改预批量{0}", DateTime.Now.ToString("yyyyMMdd")), 0, string.Empty, string.Empty, string.Empty);
// // }
// //}
// //await _preBatchRepository.GetDbContext().BulkUpdateAsync(_existls);
// await _repository.GetDbContext().BulkInsertAsync(_setls);
// await _versionRepository.GetDbContext().BulkInsertAsync(_VersionList);
// //await _versionRepository.InsertAsync(new SettlementCrossReferenceVersion(_id, branchId, year, period, version, customerCode, factory));
// return ApplicationConsts.SuccessStr;
//}
/// <summary>
/// <summary>
/// 导入
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
public async Task<string> SettlementCrossReferenceUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory)
{
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<ImportSettlementCrossReferenceDto>(files, _excelImportService);
var entityList = ObjectMapper.Map<List<ImportSettlementCrossReferenceDto>, List<SettlementCrossReference>>(result);
var _versionQuery = _versionRepository.Where(p => p.Version == version && p.CustomerCode == customerCode);
await _versionQuery.BatchDeleteAsync();
var _query = _repository.Where(p => p.Version == version && p.CustomerCode == customerCode);
await _query.BatchDeleteAsync();
List<string> _errorList = new List<string>();
var _id = GuidGenerator.Create();
var checkList = new List<ErrorExportDto>();
var _VersionList = new List<SettlementCrossReferenceVersion>();
_VersionList.Add(new SettlementCrossReferenceVersion(_id, branchId, year, period, version, customerCode, factory));
foreach (var itm in entityList)
{
if (itm.SettlementMaterialCode.StartsWith("preser"))
{
}
itm.SetValue(GuidGenerator.Create(), branchId, year, period, version, customerCode, factory);
}
//foreach (var itm in entityList)
//{
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("期间{0} 总成结算号 {1} Bom清单零件号{2} 有重复", itm.Key.SettlementMaterialCode, itm.Key.BomMaterialCode, itm.Key.Version), string.Empty));
//}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
await _repository.GetDbContext().BulkInsertAsync<SettlementCrossReference>(entityList);
await _versionRepository.GetDbContext().BulkInsertAsync(_VersionList);
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 导出文件
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("Export")]
virtual public async Task<string> ExportAsync(SettlementCrossReferenceRequestDto input)
{
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
if (input.ParentId != Guid.Empty)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() });
}
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
0, true);
var dtoDetails = ObjectMapper.Map<List<SettlementCrossReference>, List<SettlementCrossReferenceExportDto>>(entities);
string _fileName = string.Empty;
//声明导出容器
byte[] result = null;
switch (input.FileType)
{
case 0:
_fileName = string.Format("结算件对照关系_{0}.csv", input.UserId.ToString());
result = await _csv.ExportAsByteArray(dtoDetails);
break;
case 1:
_fileName = string.Format("结算件对照关系__{0}.xlsx", input.UserId.ToString());
result = await _excel.ExportAsByteArray(dtoDetails);
break;
}
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result
}
);
return _fileName;
}
[HttpGet]
[Route("Create")]
public Task<SettlementCrossReferenceDto> CreateAsync(SettlementCrossReferenceCreateDto input)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("DeleteList")]
public Task<bool> DeleteListAsync(List<Guid> ids)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("{id}")]
public Task<SettlementCrossReferenceDto> GetAsync(Guid id)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("GetTotalCountAsync")]
public Task<long> GetTotalCountAsync(Guid branchId)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("Update")]
public Task<SettlementCrossReferenceDto> UpdateAsync(Guid id, SettlementCrossReferenceUpdateDto input)
{
throw new NotImplementedException();
}
}
}

229
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettlementPakAndSparePart/SettlementPakAndSparePartsAppService.cs

@ -1,229 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using Shouldly;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.ObjectMapping;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.Inventories;
using Win.Sfs.SettleAccount.Entities.InventoryDetialVersion;
using Win.Sfs.SettleAccount.Entities.Materials;
using Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePartsRef;
using Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePartss;
using Win.Sfs.SettleAccount.Entities.SettlementParts;
using Win.Sfs.SettleAccount.Entities.SettlementPartss;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Inventories;
using Win.Sfs.Shared.CacheBase;
using Win.Sfs.Shared.Filter;
using Win.Utils;
namespace Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePart
{
/// <summary>
/// 结算包与散件对应关系服务
/// </summary>
[Authorize(SettleAccountPermissions.Boms.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/SettlementPakAndSpareParts")]
public class SettlementPakAndSparePartsAppService : SettleAccountApplicationBase<SettlementPakAndSpareParts>, ISettlementPakAndSparePartsAppService
{
private readonly IObjectMapper _objectMapper;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository<SettlementPakAndSpareParts, Guid> _repository;
private readonly ISettleAccountBranchEfCoreRepository<SettlementPakAndSparePartsVersion, Guid> _versionRepository;
/// <summary>
/// 构建方法
/// </summary>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public SettlementPakAndSparePartsAppService(
ISettleAccountBranchEfCoreRepository<SettlementPakAndSpareParts, Guid> repository,
ISettleAccountBranchEfCoreRepository<SettlementPakAndSparePartsVersion, Guid> versionRepository,
IDistributedCache<SettlementPakAndSpareParts> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_versionRepository = versionRepository;
_excelImportService = excelImportService;
_repository = repository;
}
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
//[HttpGet]
//[Route("{id}")]
//[Authorize(SettleAccountPermissions.SettlementPakAndSpareParts.Default)]
//virtual public async Task<SettlementPakAndSparePartsDto> GetAsync(Guid id)
//{
// var result = await GetFromCacheAsync(id);
// var dto = ObjectMapper.Map<SettlementPakAndSpareParts, SettlementPakAndSparePartsDto>(result);
// return dto;
//}
//private async Task<SettlementPart> GetFromCacheAsync(Guid id)
//{
// var result = await _repository.GetAsync(id);
// return result;
//}
private async Task<long> GetCountAsync(SettlementPakAndSparePartsRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
private async Task<long> GetCountAsync(SettlementPakAndSparePartsVersionRequestDto input)
{
return await _versionRepository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
///// <summary>
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("list")]
//[Authorize(SettleAccountPermissions.SettlementPakAndSpareParts.Default)]
public async Task<PagedResultDto<SettlementPakAndSparePartsDto>> GetListAsync(SettlementPakAndSparePartsRequestDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
if (!string.IsNullOrEmpty(input.CustomerCode))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "CustomerCode", Logic = EnumFilterLogic.And, Value = input.CustomerCode });
}
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<SettlementPakAndSpareParts>, List<SettlementPakAndSparePartsDto>>(entities);
// var dtos = _objectMapper.Map<SettlementCrossReference, SettlementCrossReferenceDto>(entities);
return new PagedResultDto<SettlementPakAndSparePartsDto>(totalCount, dtos);
}
[HttpPost]
[Route("versionList")]
//[Authorize(SettleAccountPermissions.SettlementPakAndSpareParts.Default)]
public async Task<PagedResultDto<SettlementPakAndSparePartsVersionDto>> GetVersionListAsync(SettlementPakAndSparePartsVersionRequestDto input)
{
var entities = await _versionRepository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<SettlementPakAndSparePartsVersion>, List<SettlementPakAndSparePartsVersionDto>>(entities);
//foreach (var itm in dtos)
//{
// itm.Version = itm.Version + string.Format("({0})", itm.Factory);
//}
return new PagedResultDto<SettlementPakAndSparePartsVersionDto>(totalCount, dtos);
}
[HttpGet]
[Route("delete")]
//[Authorize(SettleAccountPermissions.SettlementPakAndSpareParts.Default)]
public Task<bool> DeleteListAsync(List<Guid> ids)
{
throw new NotImplementedException();
}
[HttpGet]
[Route("GetBy")]
//[Authorize(SettleAccountPermissions.SettlementPakAndSpareParts.Default)]
public Task<SettlementPakAndSparePartsDto> GetAsync(Guid id)
{
throw new NotImplementedException();
}
/// <summary>
/// 导出文件
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("Export")]
//[Authorize(SettleAccountPermissions.SettlementParts.Default)]
virtual public async Task<string> ExportAsync(SettlementPakAndSparePartsDto input)
{
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
//带上过滤条件导出-20210927
if (!string.IsNullOrEmpty(input.Version))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
if (!string.IsNullOrEmpty(input.CustomerCode))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "CustomerCode", Logic = EnumFilterLogic.And, Value = input.CustomerCode });
}
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
0, true);
var dtoDetails = ObjectMapper.Map<List<SettlementPakAndSpareParts>, List<SettlementPakAndSparePartsDto>>(entities);
string _fileName = string.Empty;
//声明导出容器
byte[] result = null;
switch (input.FileType)
{
case 0:
_fileName = string.Format("结算包与散件对应关系_{0}.csv", _snowflakeIdGenerator.Create().ToString());
result = await _csv.ExportAsByteArray(dtoDetails);
break;
case 1:
_fileName = string.Format("结算包与散件对应关系_{0}.xlsx", _snowflakeIdGenerator.Create().ToString());
result = await _excel.ExportAsByteArray(dtoDetails);
break;
}
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result
}
);
return _fileName;
}
}
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs

@ -27,9 +27,7 @@ using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.EstimatedInventories;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Win.Sfs.SettleAccount.EstimatedInventories;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save