Browse Source

修改命名空间

集成Redis
Zheng 1 year ago
parent
commit
640a7ed885
  1. 8
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/CreateUpdateBaseDto/CreateUpdateBaseDto.cs
  2. 8
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/Filters/Condition.cs
  3. 62
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/Filters/EnumFilterAction.cs
  4. 17
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/Filters/EnumFilterLogic.cs
  5. 40
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/Filters/Filter.cs
  6. 371
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/Filters/FilterExtensions.cs
  7. 12
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/ISfsRequest.cs
  8. 24
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/IZbxBase.cs
  9. 12
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/SfsRequestInputBase.cs
  10. 22
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/TableColumnTypeDto/AllTableColumnTypeDto.cs
  11. 31
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/TableColumnTypeDto/ColumnType.cs
  12. 33
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBaseBusiness/ExportCustomUserSetting/Dtos/CreateUpdateExportCustomUserSettingDto.cs
  13. 38
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBaseBusiness/ExportCustomUserSetting/Dtos/ExportCustomUserSettingDto.cs
  14. 36
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBaseBusiness/ExportCustomUserSetting/Dtos/ExportCustomUserSettingGetListInput.cs
  15. 26
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBaseBusiness/ExportCustomUserSetting/IExportCustomUserSettingAppService.cs
  16. 31
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/Permissions/WmsPermissionDefinitionProvider.cs
  17. 33
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/Permissions/WmsPermissions.cs
  18. 1
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/WinIn.FasterZ.Wms.Application.Contracts.csproj
  19. 31
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/WmsApplicationContractsModule.cs
  20. 17
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/WmsDtoExtensions.cs
  21. 21
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/Z_Business/AuthDepartment/Dtos/AuthDepartmentGetListInput.cs
  22. 21
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/Z_Business/AuthDepartment/Dtos/CreateUpdateAuthDepartmentDto.cs
  23. 20
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/Z_Business/AuthDepartment/IAuthDepartmentAppService.cs
  24. 27
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBase/Extensions/ExpressionExtensions.cs
  25. 54
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBase/Extensions/ObjectExpressionExtensions.cs
  26. 119
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBase/Extensions/ObjectMapperExtensions.cs
  27. 17
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBase/Extensions/StringExtensions.cs
  28. 711
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBase/ZbxBase.cs
  29. 63
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBaseBusiness/ExportCustomUserSetting/ExportCustomUserSettingAppService.cs
  30. 2
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/WinIn.FasterZ.Wms.Application.csproj
  31. 15
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/WmsAppService.cs
  32. 19
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/WmsApplicationAutoMapperProfile.cs
  33. 35
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/WmsApplicationModule.cs
  34. 6
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/Z_Business/AuthDepartment/AuthDepartmentAppService.cs
  35. 37
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.AuthServer/Pages/Index.cshtml.cs
  36. 71
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.AuthServer/Program.cs
  37. 253
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.AuthServer/WmsAuthServerModule.cs
  38. 11
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.AuthServer/WmsBrandingProvider.cs
  39. 65
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.DbMigrator/DbMigratorHostedService.cs
  40. 43
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.DbMigrator/Program.cs
  41. 23
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.DbMigrator/WmsDbMigratorModule.cs
  42. 14
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/Enums/Enum_ExportCustomUserSetting.cs
  43. 9
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/Localization/WmsResource.cs
  44. 17
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
  45. 9
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/WmsDomainErrorCodes.cs
  46. 69
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/WmsDomainSharedModule.cs
  47. 107
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/WmsModuleExtensionConfigurator.cs
  48. 43
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/AppBaseBusiness/ExportCustomUserSetting/ExportCustomUserSetting.cs
  49. 12
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/AppBaseBusiness/ExportCustomUserSetting/IExportCustomUserSettingRepository.cs
  50. 9
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Data/IWmsDbSchemaMigrator.cs
  51. 17
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Data/NullWmsDbSchemaMigrator.cs
  52. 289
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Data/WmsDbMigrationService.cs
  53. 647
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/OpenIddict/OpenIddictDataSeedContributor.cs
  54. 13
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Settings/WmsSettingDefinitionProvider.cs
  55. 11
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/WmsConsts.cs
  56. 85
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/WmsDomainModule.cs
  57. 23
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/AuthDepartment/AuthDepartment.cs
  58. 13
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/AuthDepartment/IAuthDepartmentRepository.cs
  59. 43
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/AuthMenu/AuthMenu.cs
  60. 19
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/AuthUserMenu/AuthUserMenu.cs
  61. 17
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/AuthUserWorkGroup/AuthUserWorkGroup.cs
  62. 31
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataAql/BasedataAql.cs
  63. 27
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataArea/BasedataArea.cs
  64. 39
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataBom/BasedataBom.cs
  65. 23
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCalendar/BasedataCalendar.cs
  66. 21
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCategory/BasedataCategory.cs
  67. 23
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCurrency/BasedataCurrency.cs
  68. 25
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCurrencyExchange/BasedataCurrencyExchange.cs
  69. 41
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCustomer/BasedataCustomer.cs
  70. 33
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCustomerAddress/BasedataCustomerAddress.cs
  71. 31
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCustomerItem/BasedataCustomerItem.cs
  72. 27
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataDict/BasedataDict.cs
  73. 31
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataDictItem/BasedataDictItem.cs
  74. 25
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataDock/BasedataDock.cs
  75. 31
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataDocumentSetting/BasedataDocumentSetting.cs
  76. 25
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataErpLocation/BasedataErpLocation.cs
  77. 31
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataInterfaceCalendar/BasedataInterfaceCalendar.cs
  78. 21
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemCategory/BasedataItemCategory.cs
  79. 27
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemGuideBook/BasedataItemGuideBook.cs
  80. 27
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemPack/BasedataItemPack.cs
  81. 25
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemQuality/BasedataItemQuality.cs
  82. 35
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemSafetyStock/BasedataItemSafetyStock.cs
  83. 39
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemStoreRelation/BasedataItemStoreRelation.cs
  84. 77
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataLocation/BasedataLocation.cs
  85. 65
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataLocationGroup/BasedataLocationGroup.cs
  86. 27
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataMachine/BasedataMachine.cs
  87. 31
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataProductionLine/BasedataProductionLine.cs
  88. 19
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataProductionLineItem/BasedataProductionLineItem.cs
  89. 27
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataProject/BasedataProject.cs
  90. 25
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataPurchasePriceSheet/BasedataPurchasePriceSheet.cs
  91. 25
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataSalePriceSheet/BasedataSalePriceSheet.cs
  92. 27
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataShift/BasedataShift.cs
  93. 25
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataStdCostPriceSheet/BasedataStdCostPriceSheet.cs
  94. 45
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataSupplier/BasedataSupplier.cs
  95. 33
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataSupplierItem/BasedataSupplierItem.cs
  96. 23
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataSupplierTimeWindow/BasedataSupplierTimeWindow.cs
  97. 23
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataTeam/BasedataTeam.cs
  98. 49
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataTransactionType/BasedataTransactionType.cs
  99. 23
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataUom/BasedataUom.cs
  100. 21
      WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataWarehouse/BasedataWarehouse.cs

8
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/CreateUpdateBaseDto/CreateUpdateBaseDto.cs

@ -0,0 +1,8 @@
using System;
using Volo.Abp.Application.Dtos;
namespace WinIn.FasterZ.Wms.AppBase.CreateUpdateBaseDto;
public class CreateUpdateBaseDto : EntityDto<Guid>
{
}

8
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/Filters/Condition.cs

@ -0,0 +1,8 @@
using System.Collections.Generic;
namespace WinIn.FasterZ.Store.AppBase.Filters;
public class Condition
{
public ICollection<Filter> Filters { get; set; } = new List<Filter>();
}

62
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/Filters/EnumFilterAction.cs

@ -0,0 +1,62 @@
using System.ComponentModel;
namespace WinIn.FasterZ.Wms.AppBase.Filters;
/// <summary>
/// 过滤条件
/// </summary>
public enum EnumFilterAction
{
/// <summary>
/// equal
/// </summary>
[Description("等于")] Equal = 0,
/// <summary>
/// Not equal
/// </summary>
[Description("不等于")] NotEqual = 1,
/// <summary>
/// Bigger
/// </summary>
[Description("大于")] BiggerThan = 2,
/// <summary>
/// Smaller
/// </summary>
[Description("小于")] SmallThan = 3,
/// <summary>
/// Bigger or equal
/// </summary>
[Description("大于等于")] BiggerThanOrEqual = 4,
/// <summary>
/// Small or equal
/// </summary>
[Description("小于等于")] SmallThanOrEqual = 5,
/// <summary>
/// Like
/// </summary>
[Description("类似于")] Like = 6,
/// <summary>
/// Not like
/// </summary>
[Description("不类似于")] NotLike = 7,
/// <summary>
/// Contained in
/// List<string > items = new List<string>();
/// string value = JsonSerializer.Serialize(items);//转成Json字符串
/// FilterCondition filterCondition = new FilterCondition() { Column = "Name", Value = value, Action = EnumFilterAction.In, Logic = EnumFilterLogic.And };
/// </summary>
[Description("包含于")] In = 8,
/// <summary>
/// Not contained in
/// </summary>
[Description("不包含于")] NotIn = 9,
}

17
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/Filters/EnumFilterLogic.cs

@ -0,0 +1,17 @@
namespace WinIn.FasterZ.Wms.AppBase.Filters;
/// <summary>
/// 过滤逻辑
/// </summary>
public enum EnumFilterLogic
{
/// <summary>
/// 与
/// </summary>
And = 0,
/// <summary>
/// 或
/// </summary>
Or = 1
}

40
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/Filters/Filter.cs

@ -0,0 +1,40 @@
namespace WinIn.FasterZ.Wms.AppBase.Filters;
public class Filter
{
public Filter()
{
Logic = "And";
}
public Filter(string column, string value,
string action = "==",
string logic = "And")
{
Column = column;
Action = action;
Value = value;
Logic = logic;
}
/// <summary>
/// 过滤条件之间的逻辑关系:AND和OR
/// </summary>
public string? Logic { get; set; } = "And";
/// <summary>
/// 过滤条件中使用的数据列
/// </summary>
public string? Column { get; set; }
/// <summary>
/// 过滤条件中的操作:==,!=,>,<,>=,<=,In,NotIn,Like,NotLike
/// Equal、NotEqual、BiggerThan、SmallThan、BiggerThanOrEqual、SmallThanOrEqual、In、NotIn
/// </summary>
public string? Action { get; set; } = "==";
/// <summary>
/// 过滤条件中的操作的值
/// </summary>
public string? Value { get; set; }
}

371
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/Filters/FilterExtensions.cs

@ -0,0 +1,371 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using System.Text.Json;
using Volo.Abp;
using WinIn.FasterZ.Wms.AppBase.Filters;
namespace WinIn.FasterZ.Store.AppBase.Filters;
public static class FilterExtensions
{
public static Expression<Func<T, bool>> ToLambda<T>(this string jsonFilter)
{
if (string.IsNullOrWhiteSpace(jsonFilter))
{
return p => true;
}
var filterConditions = JsonSerializer.Deserialize<List<Filter>>(jsonFilter);
return filterConditions.ToLambda<T>();
}
public static Expression<Func<T, bool>> ToLambda<T>(this Filter filter)
{
var filterConditions = new List<Filter> { filter };
return filterConditions.ToLambda<T>();
}
public static Expression<Func<T, bool>> ToLambda<T>(this ICollection<Filter> filterConditionList)
{
Expression<Func<T, bool>> condition = null;
try
{
if (!filterConditionList.Any())
{
//创建默认表达式
return p => true;
}
foreach (var filterCondition in filterConditionList)
{
var tempCondition = CreateLambda<T>(filterCondition);
if (condition == null)
{
condition = tempCondition;
}
else
{
condition = filterCondition.Logic switch
{
"And" => condition.And(tempCondition),
"Or" => condition.Or(tempCondition),
_ => condition
};
}
}
}
catch (Exception ex)
{
throw new Exception($"获取筛选条件异常:{ex.Message}");
}
return condition;
}
private static Expression<Func<T, bool>> CreateLambda<T>(Filter filter)
{
Expression<Func<T, bool>> expression = p => false;
try
{
var parameter = Expression.Parameter(typeof(T), "p"); //创建参数p
var member = Expression.PropertyOrField(parameter, filter.Column); //创建表达式中的属性或字段
ConstantExpression constant = null;
//var propertyType = member.Type; //取属性类型,常量constant按此类型进行转换
//constant = Expression.Constant(filterCondition.Value);//创建常数
if (filter.Action != "In" && filter.Action != "NotIn")
{
constant = CreateConstantExpression(member.Type, filter.Value);
}
switch (filter.Action.ToLower())
{
case "==":
expression = Expression.Lambda<Func<T, bool>>(Expression.Equal(member, constant), parameter);
break;
case "!=":
expression = Expression.Lambda<Func<T, bool>>(Expression.NotEqual(member, constant), parameter);
break;
case ">":
expression = Expression.Lambda<Func<T, bool>>(Expression.GreaterThan(member, constant), parameter);
break;
case "<":
expression = Expression.Lambda<Func<T, bool>>(Expression.LessThan(member, constant), parameter);
break;
case ">=":
expression =
Expression.Lambda<Func<T, bool>>(Expression.GreaterThanOrEqual(member, constant), parameter);
break;
case "<=":
expression =
Expression.Lambda<Func<T, bool>>(Expression.LessThanOrEqual(member, constant), parameter);
break;
case "like":
expression = GetExpressionLikeMethod<T>("Contains", filter);
break;
case "notlike":
expression = GetExpressionNotLikeMethod<T>("Contains", filter);
break;
case "in":
expression = GetExpressionInMethod<T>("Contains", member.Type, filter);
break;
case "notin":
expression = GetExpressionNotInMethod<T>("Contains", member.Type, filter);
break;
}
}
catch (Exception ex)
{
throw new UserFriendlyException(ex.Message);
}
return expression;
}
/// <summary>
/// </summary>
/// <param name="propertyType"></param>
/// <param name="value"></param>
/// <returns></returns>
private static ConstantExpression CreateConstantExpression(Type propertyType, string value)
{
ConstantExpression constant = null;
try
{
if (propertyType.IsGenericType &&
propertyType.GetGenericTypeDefinition() == typeof(Nullable<>))
{
var objValue = Convert.ChangeType(ChangeTypeReturnValue(value, propertyType.GetGenericArguments()[0]),
propertyType.GetGenericArguments()[0],
CultureInfo.InvariantCulture);
constant = Expression.Constant(objValue, propertyType);
}
else if (propertyType.IsEnum)
{
var enumValue = (Enum)Enum.Parse(propertyType, value, true);
constant = Expression.Constant(enumValue, propertyType);
}
else
{
constant = propertyType.Name switch
{
"Guid" => Expression.Constant(Guid.Parse(value)),
_ => Expression.Constant(Convert.ChangeType(value, propertyType, CultureInfo.InvariantCulture))
};
}
}
catch (Exception ex)
{
throw new Exception($"获取ConstantExpression异常:{ex.Message}");
}
return constant;
}
private static Expression<Func<T, bool>> GetExpressionLikeMethod<T>(string methodName, Filter filter)
{
var parameterExpression = Expression.Parameter(typeof(T), "p");
// MethodCallExpression methodExpression = GetMethodExpression(methodName, filterCondition.Column, filterCondition.Value, parameterExpression);
var methodExpression = GetMethodExpression(methodName, filter.Column, filter.Value,
parameterExpression);
return Expression.Lambda<Func<T, bool>>(methodExpression, parameterExpression);
}
private static Expression<Func<T, bool>> GetExpressionNotLikeMethod<T>(string methodName, Filter filter)
{
var parameterExpression = Expression.Parameter(typeof(T), "p");
var methodExpression = GetMethodExpression(methodName, filter.Column, filter.Value,
parameterExpression);
var notMethodExpression = Expression.Not(methodExpression);
return Expression.Lambda<Func<T, bool>>(notMethodExpression, parameterExpression);
}
/// <summary>
/// 生成guidList.Contains(p=>p.GUId);
/// 除String类型,其他类型涉及到类型转换.如GUID
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="methodName">Contains</param>
/// <param name="propertyType">PropertyType/typeof(GUId)</param>
/// <param name="filter">PropertyName/PropertyValue</param>
/// <returns></returns>
private static Expression<Func<T, bool>> GetExpressionInMethod<T>(string methodName, Type propertyType,
Filter filter)
{
var parameterExpression = Expression.Parameter(typeof(T), "p");
var lstType = typeof(List<>).MakeGenericType(propertyType);
//转换枚举
//if (propertyType.IsEnum)
//{
// var valueArrayStrings = JsonSerializer.Deserialize<List<string>>(filter.Value);
// List<object> newValues = new List<object>();
// var enumValues = propertyType.GetEnumValues();
// foreach (var valueArray in valueArrayStrings)
// {
// foreach (var enumValue in enumValues)
// {
// if (enumValue.ToString() == valueArray)
// {
// newValues.Add(enumValue);
// break;
// }
// }
// }
// var newValue = JsonSerializer.Serialize(newValues);
// filter.Value = newValue;
//}
var propertyValue = JsonSerializer.Deserialize($"{filter.Value}", lstType);
if (propertyValue != null)
{
var methodExpression = GetListMethodExpression(methodName, propertyType, filter.Column, propertyValue,
parameterExpression);
var expression = Expression.Lambda<Func<T, bool>>(methodExpression, parameterExpression);
return expression;
}
return p => false;
}
private static Expression<Func<T, bool>> GetExpressionNotInMethod<T>(string methodName, Type propertyType,
Filter filter)
{
var parameterExpression = Expression.Parameter(typeof(T), "p");
var lstType = typeof(List<>).MakeGenericType(propertyType);
var propertyValue = JsonSerializer.Deserialize(filter.Value, lstType);
if (propertyValue != null)
{
var methodExpression = GetListMethodExpression(methodName, propertyType, filter.Column, propertyValue,
parameterExpression);
var notMethodExpression = Expression.Not(methodExpression);
return Expression.Lambda<Func<T, bool>>(notMethodExpression, parameterExpression);
}
return p => false;
}
private static MethodCallExpression GetListMethodExpression(string methodName, Type propertyType,
string propertyName, object propertyValue, ParameterExpression parameterExpression)
{
var propertyExpression = Expression.Property(parameterExpression, propertyName); //p.GUID
var type = typeof(List<>).MakeGenericType(propertyType);
var method = type.GetMethod(methodName); //获取 List.Contains()
var someValue = Expression.Constant(propertyValue); //Value
return Expression.Call(someValue, method, propertyExpression);
}
/// <summary>
/// 生成类似于p=>p.Code.Contains("xxx");的lambda表达式
/// parameterExpression标识p,propertyName表示values,propertyValue表示"Code",methodName表示Contains
/// 仅处理p的属性类型为string这种情况
/// </summary>
/// <param name="methodName"></param>
/// <param name="propertyName"></param>
/// <param name="propertyValue"></param>
/// <param name="parameterExpression"></param>
/// <returns></returns>
private static MethodCallExpression GetMethodExpression(string methodName, string propertyName,
string propertyValue, ParameterExpression parameterExpression)
{
var propertyExpression = Expression.Property(parameterExpression, propertyName);
var method = typeof(string).GetMethod(methodName, new[] { typeof(string) });
var someValue = Expression.Constant(propertyValue, typeof(string));
return Expression.Call(propertyExpression, method, someValue);
}
/// <summary>
/// 默认True条件
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
public static Expression<Func<T, bool>> True<T>()
{
return f => true;
}
/// <summary>
/// 默认False条件
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
public static Expression<Func<T, bool>> False<T>()
{
return f => false;
}
/// <summary>
/// 拼接 OR 条件
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="exp"></param>
/// <param name="condition"></param>
/// <returns></returns>
private static Expression<Func<T, bool>> Or<T>(this Expression<Func<T, bool>> exp,
Expression<Func<T, bool>> condition)
{
var inv = Expression.Invoke(condition, exp.Parameters);
return Expression.Lambda<Func<T, bool>>(Expression.Or(exp.Body, inv), exp.Parameters);
}
/// <summary>
/// 拼接And条件
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="exp"></param>
/// <param name="condition"></param>
/// <returns></returns>
private static Expression<Func<T, bool>> And<T>(this Expression<Func<T, bool>> exp,
Expression<Func<T, bool>> condition)
{
var inv = Expression.Invoke(condition, exp.Parameters);
return Expression.Lambda<Func<T, bool>>(Expression.And(exp.Body, inv), exp.Parameters);
}
/// <summary>
/// 转换传入的值,并将正确的值传出(解决 enum,guid)
/// </summary>
/// <param name="value"></param>
/// <param name="type"></param>
/// <returns></returns>
public static object ChangeTypeReturnValue(object value, Type type)
{
if (value == null && type.IsGenericType) return Activator.CreateInstance(type);
if (value == null) return null;
if (type == value.GetType()) return value;
if (type.IsEnum)
{
if (value is string)
return Enum.Parse(type, value as string);
else
return Enum.ToObject(type, value);
}
if (!type.IsInterface && type.IsGenericType)
{
Type innerType = type.GetGenericArguments()[0];
object innerValue = ChangeTypeReturnValue(value, innerType);
return Activator.CreateInstance(type, new object[] { innerValue });
}
if (value is string && type == typeof(Guid)) return new Guid(value as string);
if (value is string && type == typeof(Version)) return new Version(value as string);
if (!(value is IConvertible)) return value;
return Convert.ChangeType(value, type);
}
}

12
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/ISfsRequest.cs

@ -0,0 +1,12 @@
using Volo.Abp.Application.Dtos;
using WinIn.FasterZ.Store.AppBase.Filters;
namespace WinIn.FasterZ.Store.AppBase;
public interface ISfsRequest : IPagedAndSortedResultRequest
{
/// <summary>
/// 条件
/// </summary>
public Condition Condition { get; set; }
}

24
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/IZbxBase.cs

@ -0,0 +1,24 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
namespace WinIn.FasterZ.Store.AppBase
{
public interface IZbxBase<TEntity, TEntityDto, TPagedAndSortedResultRequestDto, TKey, TCreateInput, TUpdateInput>
{
Task<PagedResultDto<TEntityDto>> GetPageListByFilterAsync(SfsRequestInputBase sfsRequestInputBase,
bool includeDetails = false, CancellationToken cancellationToken = default);
/// <summary>
/// 【基础】-【导出Excel】【有筛选条件】
/// </summary>
/// <param name="sfsRequestInputBase">查询条件</param>
/// <param name="isRedundance">是否冗余主表数据</param>
/// <param name="isDetailExport">是否导出子表</param>
/// <param name="userId">用户ID</param>
/// <returns></returns>
Task<IActionResult> ExportToExcelAsync(SfsRequestInputBase sfsRequestInputBase,bool isRedundance, Guid userId,bool isDetailExport = true);
}
}

12
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/SfsRequestInputBase.cs

@ -0,0 +1,12 @@
using Volo.Abp.Application.Dtos;
using WinIn.FasterZ.Store.AppBase.Filters;
namespace WinIn.FasterZ.Store.AppBase;
public class SfsRequestInputBase : PagedAndSortedResultRequestDto, ISfsRequest
{
/// <summary>
/// 条件
/// </summary>
public Condition Condition { get; set; } = new();
}

22
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/TableColumnTypeDto/AllTableColumnTypeDto.cs

@ -0,0 +1,22 @@
using System.Collections.Generic;
namespace WinIn.FasterZ.Store.AppBase.TableColumnTypeDto
{
public class AllTableColumnTypeDto
{
/// <summary>
/// 列属性类别
/// </summary>
public List<ColumnType> ColumnsTypes { get; set; }
/// <summary>
/// C R U S G
/// </summary>
public string DtoType { get; set; }
/// <summary>
/// Dto名称
/// </summary>
public string? DtoName { get; set; }
}
}

31
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBase/TableColumnTypeDto/ColumnType.cs

@ -0,0 +1,31 @@
using System.ComponentModel.DataAnnotations;
namespace WinIn.FasterZ.Store.AppBase.TableColumnTypeDto
{
public class ColumnType
{
/// <summary>
/// 列名
/// </summary>
[Display(Name = "列名")]
public string Z_ColumnName { get; set; }
/// <summary>
/// 后端类型
/// </summary>
[Display(Name = "后端类型")]
public string Z_ColumnType { get; set; }
/// <summary>
/// 基础类型
/// </summary>
[Display(Name = "基础类型")]
public string Z_ColumnBaseType { get; set; }
/// <summary>
/// 是否是枚举
/// </summary>
[Display(Name = "是否是枚举")]
public bool IsEnum { get; set; }
}
}

33
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBaseBusiness/ExportCustomUserSetting/Dtos/CreateUpdateExportCustomUserSettingDto.cs

@ -0,0 +1,33 @@
using System;
using WinIn.FasterZ.Store.Enums;
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting.Dtos;
[Serializable]
public class CreateUpdateExportCustomUserSettingDto
{
/// <summary>
/// 用户ID
/// </summary>
public Guid? ExportUserId { get; set; }
/// <summary>
/// 用户姓名
/// </summary>
public string? ExportUserName { get; set; }
/// <summary>
/// 列名
/// </summary>
public string? ExportColumnName { get; set; }
/// <summary>
/// 表名
/// </summary>
public string? ExportTableName { get; set; }
/// <summary>
/// 导出设置项
/// </summary>
public Enum_ExportCustomUserSetting CustomUserSetting { get; set; }
}

38
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBaseBusiness/ExportCustomUserSetting/Dtos/ExportCustomUserSettingDto.cs

@ -0,0 +1,38 @@
using System;
using Volo.Abp.Application.Dtos;
using WinIn.FasterZ.Store.Enums;
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting.Dtos
{
/// <summary>
/// 用户个型导出配置
/// </summary>
[Serializable]
public class ExportCustomUserSettingDto : AuditedEntityDto<Guid>
{
/// <summary>
/// 用户ID
/// </summary>
public Guid? ExportUserId { get; set; }
/// <summary>
/// 用户姓名
/// </summary>
public string? ExportUserName { get; set; }
/// <summary>
/// 列名
/// </summary>
public string? ExportColumnName { get; set; }
/// <summary>
/// 表名
/// </summary>
public string? ExportTableName { get; set; }
/// <summary>
/// 导出设置项
/// </summary>
public Enum_ExportCustomUserSetting CustomUserSetting { get; set; }
}
}

36
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBaseBusiness/ExportCustomUserSetting/Dtos/ExportCustomUserSettingGetListInput.cs

@ -0,0 +1,36 @@
using System;
using System.ComponentModel;
using Volo.Abp.Application.Dtos;
using WinIn.FasterZ.Store.Enums;
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting.Dtos
{
[Serializable]
public class ExportCustomUserSettingGetListInput : PagedAndSortedResultRequestDto
{
/// <summary>
/// 用户ID
/// </summary>
public Guid? ExportUserId { get; set; }
/// <summary>
/// 用户姓名
/// </summary>
public string? ExportUserName { get; set; }
/// <summary>
/// 列名
/// </summary>
public string? ExportColumnName { get; set; }
/// <summary>
/// 表名
/// </summary>
public string? ExportTableName { get; set; }
/// <summary>
/// 导出设置项
/// </summary>
public Enum_ExportCustomUserSetting? CustomUserSetting { get; set; }
}
}

26
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/AppBaseBusiness/ExportCustomUserSetting/IExportCustomUserSettingAppService.cs

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting.Dtos;
using Volo.Abp.Application.Services;
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting
{
/// <summary>
/// 用户个型导出配置
/// </summary>
public interface IExportCustomUserSettingAppService :
ICrudAppService<
ExportCustomUserSettingDto,
Guid,
ExportCustomUserSettingGetListInput,
CreateUpdateExportCustomUserSettingDto,
CreateUpdateExportCustomUserSettingDto>
{
/// <summary>
/// 根据用户和表名获取个性化导出
/// </summary>
/// <returns></returns>
Task<List<ExportCustomUserSettingDto>> GetByUserIdAndExportTableNameAsync(Guid userId, string exportTableName);
}
}

31
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/Permissions/WmsPermissionDefinitionProvider.cs

@ -2,24 +2,25 @@ using WinIn.FasterZ.Wms.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
namespace WinIn.FasterZ.Wms.Permissions;
public class WmsPermissionDefinitionProvider : PermissionDefinitionProvider
namespace WinIn.FasterZ.Wms.Permissions
{
public override void Define(IPermissionDefinitionContext context)
public class WmsPermissionDefinitionProvider : PermissionDefinitionProvider
{
var myGroup = context.AddGroup(WmsPermissions.GroupName);
//Define your own permissions here. Example:
//myGroup.AddPermission(WmsPermissions.MyPermission1, L("Permission:MyPermission1"));
public override void Define(IPermissionDefinitionContext context)
{
var myGroup = context.AddGroup(WmsPermissions.GroupName);
//Define your own permissions here. Example:
//myGroup.AddPermission(WmsPermissions.MyPermission1, L("Permission:MyPermission1"));
var authDepartmentPermission = myGroup.AddPermission(WmsPermissions.AuthDepartment.Default, L("Permission:AuthDepartment"));
authDepartmentPermission.AddChild(WmsPermissions.AuthDepartment.Create, L("Permission:Create"));
authDepartmentPermission.AddChild(WmsPermissions.AuthDepartment.Update, L("Permission:Update"));
authDepartmentPermission.AddChild(WmsPermissions.AuthDepartment.Delete, L("Permission:Delete"));
}
var authDepartmentPermission = myGroup.AddPermission(WmsPermissions.AuthDepartment.Default, L("Permission:AuthDepartment"));
authDepartmentPermission.AddChild(WmsPermissions.AuthDepartment.Create, L("Permission:Create"));
authDepartmentPermission.AddChild(WmsPermissions.AuthDepartment.Update, L("Permission:Update"));
authDepartmentPermission.AddChild(WmsPermissions.AuthDepartment.Delete, L("Permission:Delete"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<WmsResource>(name);
private static LocalizableString L(string name)
{
return LocalizableString.Create<WmsResource>(name);
}
}
}

33
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/Permissions/WmsPermissions.cs

@ -1,16 +1,25 @@
namespace WinIn.FasterZ.Wms.Permissions;
public static class WmsPermissions
namespace WinIn.FasterZ.Wms.Permissions
{
public const string GroupName = "Wms";
//Add your own permission names. Example:
//public const string MyPermission1 = GroupName + ".MyPermission1";
public class AuthDepartment
public static class WmsPermissions
{
public const string Default = GroupName + ".AuthDepartment";
public const string Update = Default + ".Update";
public const string Create = Default + ".Create";
public const string Delete = Default + ".Delete";
public const string GroupName = "Wms";
//Add your own permission names. Example:
//public const string MyPermission1 = GroupName + ".MyPermission1";
public class AuthDepartment
{
public const string Default = GroupName + ".AuthDepartment";
public const string Update = Default + ".Update";
public const string Create = Default + ".Create";
public const string Delete = Default + ".Delete";
}
public class ExportCustomUserSetting
{
public const string Default = GroupName + ".ExportCustomUserSetting";
public const string Update = Default + ".Update";
public const string Create = Default + ".Create";
public const string Delete = Default + ".Delete";
}
}
}

1
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/WinIn.FasterZ.Wms.Application.Contracts.csproj

@ -13,6 +13,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Volo.Abp.ObjectExtending" Version="7.3.2" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="7.3.2" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="7.3.2" />

31
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/WmsApplicationContractsModule.cs

@ -7,22 +7,23 @@ using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
namespace WinIn.FasterZ.Wms;
[DependsOn(
typeof(WmsDomainSharedModule),
typeof(AbpAccountApplicationContractsModule),
typeof(AbpFeatureManagementApplicationContractsModule),
typeof(AbpIdentityApplicationContractsModule),
typeof(AbpPermissionManagementApplicationContractsModule),
typeof(AbpSettingManagementApplicationContractsModule),
typeof(AbpTenantManagementApplicationContractsModule),
typeof(AbpObjectExtendingModule)
)]
public class WmsApplicationContractsModule : AbpModule
namespace WinIn.FasterZ.Wms
{
public override void PreConfigureServices(ServiceConfigurationContext context)
[DependsOn(
typeof(WmsDomainSharedModule),
typeof(AbpAccountApplicationContractsModule),
typeof(AbpFeatureManagementApplicationContractsModule),
typeof(AbpIdentityApplicationContractsModule),
typeof(AbpPermissionManagementApplicationContractsModule),
typeof(AbpSettingManagementApplicationContractsModule),
typeof(AbpTenantManagementApplicationContractsModule),
typeof(AbpObjectExtendingModule)
)]
public class WmsApplicationContractsModule : AbpModule
{
WmsDtoExtensions.Configure();
public override void PreConfigureServices(ServiceConfigurationContext context)
{
WmsDtoExtensions.Configure();
}
}
}

17
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/WmsDtoExtensions.cs

@ -2,16 +2,16 @@
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace WinIn.FasterZ.Wms;
public static class WmsDtoExtensions
namespace WinIn.FasterZ.Wms
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
public static class WmsDtoExtensions
{
OneTimeRunner.Run(() =>
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
/* You can add extension properties to DTOs
* defined in the depended modules.
*
@ -23,6 +23,7 @@ public static class WmsDtoExtensions
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Object-Extensions
*/
});
});
}
}
}

21
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/Z_Business/AuthDepartment/Dtos/AuthDepartmentGetListInput.cs

@ -2,20 +2,21 @@ using System;
using System.ComponentModel;
using Volo.Abp.Application.Dtos;
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos;
[Serializable]
public class AuthDepartmentGetListInput : PagedAndSortedResultRequestDto
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos
{
public string? Code { get; set; }
[Serializable]
public class AuthDepartmentGetListInput : PagedAndSortedResultRequestDto
{
public string? Code { get; set; }
public string? Description { get; set; }
public string? Description { get; set; }
public Guid? Id { get; set; }
public Guid? Id { get; set; }
public bool? IsActive { get; set; }
public bool? IsActive { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

21
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/Z_Business/AuthDepartment/Dtos/CreateUpdateAuthDepartmentDto.cs

@ -1,19 +1,20 @@
using System;
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos;
[Serializable]
public class CreateUpdateAuthDepartmentDto
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos
{
public string Code { get; set; }
[Serializable]
public class CreateUpdateAuthDepartmentDto
{
public string Code { get; set; }
public string? Description { get; set; }
public string? Description { get; set; }
public Guid Id { get; set; }
public Guid Id { get; set; }
public bool? IsActive { get; set; }
public bool? IsActive { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

20
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application.Contracts/Z_Business/AuthDepartment/IAuthDepartmentAppService.cs

@ -2,16 +2,16 @@ using System;
using WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos;
using Volo.Abp.Application.Services;
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment;
public interface IAuthDepartmentAppService :
ICrudAppService<
AuthDepartmentDto,
Guid,
AuthDepartmentGetListInput,
CreateUpdateAuthDepartmentDto,
CreateUpdateAuthDepartmentDto>
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment
{
public interface IAuthDepartmentAppService :
ICrudAppService<
AuthDepartmentDto,
Guid,
AuthDepartmentGetListInput,
CreateUpdateAuthDepartmentDto,
CreateUpdateAuthDepartmentDto>
{
}
}

27
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBase/Extensions/ExpressionExtensions.cs

@ -0,0 +1,27 @@
using System.Linq.Expressions;
namespace WinIn.FasterZ.Wms.AppBase.Extensions
{
public static class ExpressionExtensions
{
public static string GetMemberName(Expression expression)
{
if (expression is MemberExpression member)
{
return member.Member.Name;
}
if (expression is MethodCallExpression method)
{
return method.Method.Name;
}
if (expression is UnaryExpression unary)
{
return GetMemberName(unary);
}
return null;
}
}
}

54
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBase/Extensions/ObjectExpressionExtensions.cs

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Linq.Expressions;
using System.Reflection;
namespace WinIn.FasterZ.Wms.AppBase.Extensions
{
public static class ObjectExpressionExtensions
{
public static IQueryable<TEntity> WhereByKey<TEntity, TModel>(this IQueryable<TEntity> source, TModel model)
{
if (model == null)
{
return null;
}
var modelType = model.GetType();
var properties = modelType.GetProperties().Where(o => o.GetCustomAttribute<KeyAttribute>() != null).ToList();
if (properties.Any())
{
foreach (var property in properties)
{
var propertyName = property.Name;
var propertyValue = property.GetValue(model, null);
source = source.Where($"{propertyName} == @0", propertyValue);
}
return source;
}
return null;
}
public static List<IGrouping<object, T>> GroupByKey<T>(this IQueryable<T> source)
{
var properties = typeof(T).GetProperties().Where(o => o.GetCustomAttribute<KeyAttribute>() != null).ToList();
var names = string.Join(",", properties.Select(o => o.Name));
return source.AsQueryable().GroupBy($"new ({names})").ToDynamicList<IGrouping<object, T>>();
}
public static Expression<Func<TEntity, bool>> GetExpressionByProperty<TEntity>(this Type type, string propertyName,
string propertyValue)
{
var o = Expression.Parameter(type, "p");
var memberExpression = Expression.Property(o, propertyName);
var body = Expression.Call(typeof(string).GetMethod("Contains", new[] { typeof(string) }), memberExpression);
var predicate = Expression.Lambda<Func<TEntity, bool>>(body, o);
return predicate;
}
}
}

119
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBase/Extensions/ObjectMapperExtensions.cs

@ -0,0 +1,119 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using Omu.ValueInjecter;
using Omu.ValueInjecter.Injections;
using Volo.Abp;
namespace WinIn.FasterZ.Wms.AppBase.Extensions
{
/// <summary>
/// 对象映射
/// </summary>
public static class ObjectMapperExtensions
{
/// <summary>
/// 从模型更新实体
/// </summary>
public static T FromObject<T>(this T to, object from)
{
try
{
to.InjectFrom<DeepInjectionForUpdate>(from);
return to;
}
catch (Exception ex)
{
throw new UserFriendlyException($"{from.GetType().FullName}映射到${typeof(T).FullName}时失败:{ex.Message},{ex}");
}
}
/// <summary>
/// 从实体创建模型
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="from"></param>
/// <returns></returns>
public static T ToObject<T>(this object from)
{
try
{
if (typeof(T).IsGenericType && typeof(T).IsAssignableTo(typeof(IList)) && from is IList list)
{
var toListType = typeof(T);
var elementType = typeof(T).GetGenericArguments()[0];
var toList = (IList)Activator.CreateInstance(typeof(T))!;
var fromList = list;
foreach (var item in fromList)
{
toList.Add(Activator.CreateInstance(elementType).InjectFrom<DeepInjection>(item));
}
return (T)toList;
}
return (T)Activator.CreateInstance<T>().InjectFrom<DeepInjection>(from);
}
catch (Exception ex)
{
throw new UserFriendlyException($"{from.GetType().FullName}映射到${typeof(T).FullName}时失败:{ex.Message},{ex}");
}
}
private class DeepInjection : LoopInjection
{
protected override bool MatchTypes(Type sourceType, Type targetType)
{
if (sourceType != typeof(string) &&
targetType != typeof(string) &&
sourceType.IsGenericType &&
targetType.IsGenericType &&
sourceType.IsAssignableTo(typeof(IEnumerable)) &&
sourceType.IsAssignableTo(typeof(IEnumerable))
)
{
return true;
}
return base.MatchTypes(sourceType, targetType);
}
protected override void SetValue(object source, object target, PropertyInfo sp, PropertyInfo tp)
{
if (sp.PropertyType != typeof(string) &&
sp.PropertyType != typeof(string) &&
sp.PropertyType.IsAssignableTo(typeof(IList)) &&
tp.PropertyType.IsAssignableTo(typeof(IList)))
{
var targetGenericType = tp.PropertyType.GetGenericArguments()[0];
var listType = typeof(List<>).MakeGenericType(targetGenericType);
var addMethod = listType.GetMethod("Add");
var list = Activator.CreateInstance(listType);
var sourceList = (IList)sp.GetValue(source);
foreach (var item in sourceList)
{
addMethod.Invoke(list, new[] { Activator.CreateInstance(targetGenericType).FromObject(item) });
}
tp.SetValue(target, list);
return;
}
base.SetValue(source, target, sp, tp);
}
}
private class DeepInjectionForUpdate : DeepInjection
{
protected override void SetValue(object source, object target, PropertyInfo sp, PropertyInfo tp)
{
//if (tp.GetCustomAttribute<IgnoreUpdateAttribute>() != null)
//{
// return;
//}
base.SetValue(source, target, sp, tp);
}
}
}
}

17
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBase/Extensions/StringExtensions.cs

@ -0,0 +1,17 @@
using System;
using System.Security.Cryptography;
using System.Text;
namespace WinIn.FasterZ.Wms.AppBase.Extensions
{
public static class StringExtensions
{
public static string Md5(this string input)
{
using (var md5 = MD5.Create())
{
return BitConverter.ToString(md5.ComputeHash(Encoding.ASCII.GetBytes(input))).Replace("-", "");
}
}
}
}

711
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBase/ZbxBase.cs

@ -0,0 +1,711 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Localization;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using WinIn.FasterZ.Store.AppBase.Filters;
using WinIn.FasterZ.Store.AppBase.TableColumnTypeDto;
using WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting;
using WinIn.FasterZ.Store.Enums;
using WinIn.FasterZ.Wms.AppBase.Extensions;
using WinIn.FasterZ.Wms.AppBaseBusiness.ExportCustomUserSetting;
namespace WinIn.FasterZ.Store.AppBase;
using WinIn.FasterZ.Wms.Localization;
public class ZbxBase<TEntity, TEntityDto, TKey, TPagedAndSortedResultRequestDto, TCreateInput, TUpdateInput> :
CrudAppService<TEntity, TEntityDto, TKey,
TPagedAndSortedResultRequestDto, TCreateInput, TUpdateInput>,
IZbxBase<TEntity, TEntityDto, TKey, TPagedAndSortedResultRequestDto, TCreateInput, TUpdateInput>
where TEntity : class, IEntity<TKey>
where TEntityDto : IEntityDto<TKey>
{
private readonly IRepository<TEntity, TKey> _repository;
public ZbxBase(IRepository<TEntity, TKey> repository) : base(repository)
{
_repository = repository;
}
protected IStringLocalizer<WmsResource> Localizer =>
LazyServiceProvider.LazyGetRequiredService<IStringLocalizer<WmsResource>>();
protected ExportCustomUserSettingAppService ExportCustomUserSettingAppService =>
LazyServiceProvider.LazyGetRequiredService<ExportCustomUserSettingAppService>();
#region 公开接口
/// <summary>
/// 【基础】-【分页查询】【有筛选条件】
/// </summary>
/// <param name="sfsRequestInputBase"></param>
/// <param name="includeDetails"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
[HttpPost("api/[controller]/base/get-list-page-by-filter")]
[Authorize]
public async Task<PagedResultDto<TEntityDto>> GetPageListByFilterAsync(SfsRequestInputBase sfsRequestInputBase,
bool includeDetails = false, CancellationToken cancellationToken = default)
{
await CheckGetListPolicyAsync();
var expression = sfsRequestInputBase.Condition.Filters?.Count > 0
? sfsRequestInputBase.Condition.Filters.ToLambda<TEntity>()
: p => true;
var resultEntities = await GetQueryListAsync(expression, sfsRequestInputBase.SkipCount,
sfsRequestInputBase.MaxResultCount,
sfsRequestInputBase.Sorting, includeDetails, cancellationToken);
var resultDtos = ObjectMapper.Map<List<TEntity>, List<TEntityDto>>(resultEntities);
//获取总数
var totalCount = await GetCountAsync(expression, cancellationToken);
return new PagedResultDto<TEntityDto>(totalCount, resultDtos);
}
/// <summary>
/// 【基础】-【新增】
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/[controller]/base/create")]
public override async Task<TEntityDto> CreateAsync(TCreateInput input)
{
await CheckCreatePolicyAsync();
var entity = input!.ToObject<TEntity>();
//判断id是否是00000-0000 如果是则赋值
var mainId = (Guid)entity.GetType().GetProperty("Id")?.GetValue(entity)!;
if (mainId == Guid.Empty)
{
mainId = Guid.NewGuid();
entity.GetType().GetProperty("Id")?.SetValue(entity, mainId);
}
#region 给所有字表的 Id和MasterId赋值 否则默认的会是000000-000-....的id 插入时会报错
var propertyInfos = entity.GetType().GetProperties();
foreach (var propertyInfo in propertyInfos)
{
//判断是否是List集合
if (propertyInfo.Name == "Details"
&& propertyInfo.PropertyType.IsGenericType
&& propertyInfo.PropertyType.GetGenericTypeDefinition() == typeof(List<>))
{
var listProperty = typeof(TEntity).GetProperty("Details");
// 获取 List 的元素类型
if (listProperty != null)
{
var listItemType = listProperty.PropertyType.GetGenericArguments()[0];
// 获取元素类型的 ID 属性
var detailIdProperty = listItemType.GetProperty("Id");
var masterIdProperty = listItemType.GetProperty("MasterId");
if (detailIdProperty != null)
{
// 获取 List 属性的值
var list = (IList)listProperty.GetValue(entity);
// 遍历 List 集合中的每个元素,给 ID 属性赋值
if (list != null)
{
foreach (var item in list)
{
if ((Guid)detailIdProperty.GetValue(item)! == Guid.Empty)
{
detailIdProperty.SetValue(item, Guid.NewGuid());
}
}
}
}
if (masterIdProperty != null)
{
// 获取 List 属性的值
var list = (IList)listProperty.GetValue(entity);
// 遍历 List 集合中的每个元素,给 ID 属性赋值
if (list != null)
{
foreach (var item in list)
{
masterIdProperty.SetValue(item, mainId);
}
}
}
}
}
}
#endregion
TryToSetTenantId(entity);
await Repository.InsertAsync(entity, true);
return await MapToGetOutputDtoAsync(entity);
}
/// <summary>
/// 【基础】-【删除】
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpDelete("api/[controller]/base/delete-by-id")]
public override async Task DeleteAsync(TKey id)
{
await base.DeleteAsync(id);
}
/// <summary>
/// 【基础】-【修改】
/// </summary>
/// <param name="id"></param>
/// <param name="input"></param>
/// <returns></returns>
[HttpPut("api/[controller]/base/update-by-id")]
public override async Task<TEntityDto> UpdateAsync(TKey id, TUpdateInput input)
{
//return base.UpdateAsync(id, input);
await CheckUpdatePolicyAsync().ConfigureAwait(false);
var entity = await GetEntityByIdAsync(id).ConfigureAwait(false);
entity.FromObject(input!);
#region 给所有字表的 Id和MasterId赋值 否则默认的会是000000-000-....的id 插入时会报错
var propertyInfos = entity.GetType().GetProperties();
foreach (var propertyInfo in propertyInfos)
{
//判断是否是List集合
if (propertyInfo.Name == "Details"
&& propertyInfo.PropertyType.IsGenericType
&& propertyInfo.PropertyType.GetGenericTypeDefinition() == typeof(List<>))
{
var listProperty = typeof(TEntity).GetProperty("Details");
// 获取 List 的元素类型
if (listProperty != null)
{
var listItemType = listProperty.PropertyType.GetGenericArguments()[0];
// 获取元素类型的 ID 属性
var detailIdProperty = listItemType.GetProperty("Id");
var masterIdProperty = listItemType.GetProperty("MasterId");
if (detailIdProperty != null)
{
// 获取 List 属性的值
var list = (IList)listProperty.GetValue(entity);
// 遍历 List 集合中的每个元素,给 ID 属性赋值
if (list != null)
{
foreach (var item in list)
{
if ((Guid)detailIdProperty.GetValue(item)! == Guid.Empty)
{
detailIdProperty.SetValue(item, Guid.NewGuid());
}
}
}
}
if (masterIdProperty != null)
{
// 获取 List 属性的值
var list = (IList)listProperty.GetValue(entity);
// 遍历 List 集合中的每个元素,给 ID 属性赋值
if (list != null)
{
foreach (var item in list)
{
masterIdProperty.SetValue(item, id);
}
}
}
}
}
}
#endregion
await Repository.UpdateAsync(entity, true);
return await MapToGetOutputDtoAsync(entity);
}
/// <summary>
/// 【基础】-【导出Excel】【有筛选条件】
/// </summary>
/// <param name="sfsRequestInputBase">查询条件</param>
/// <param name="isRedundance">是否冗余主表数据</param>
/// <param name="isDetailExport">是否导出子表</param>
/// <param name="userId">用户ID</param>
/// <returns></returns>
[HttpPost("api/[controller]/base/export-to-excel")]
public virtual async Task<IActionResult> ExportToExcelAsync(SfsRequestInputBase sfsRequestInputBase,
bool isRedundance, Guid userId, bool isDetailExport = true)
{
var isHasDetail = false; //是否包含从表
var data = (await GetPageListByFilterAsync(sfsRequestInputBase, true)).Items;
var fileStream = new MemoryStream(); //文件流
IWorkbook workbook = new XSSFWorkbook();
var sheet = workbook.CreateSheet(Localizer[typeof(TEntity).Name]);
var splitDetailsColumnNumber = 1; //分割主表和从表的列数量
var excelDetailsCellStyle = SetExcelDetailsCellStyle(workbook); //子表单元格样式
var excelSplitCellStyle = SetSplitCellStyle(workbook); //分割单元格样式
var excelOnlyMainCellStyle = SetExcelOnlyMainCellStyle(workbook);
var excelHeadCellStyle = SetExcelHeadCellStyle(workbook);
// 获取主表的属性 创建主表 表头
var mainAllProperties = typeof(TEntityDto).GetProperties();
var mainProperties = mainAllProperties.Where(p => p.Name != "Details").ToArray(); //去除details属性否则导出时会带出来
#region 用户个性导出 主表
//获取个性导出的字段
var mainUserColumn =
await ExportCustomUserSettingAppService.GetByUserIdAndExportTableNameAsync(userId, typeof(TEntity).Name);
if (mainUserColumn.Any(p => p.CustomUserSetting == Enum_ExportCustomUserSetting.Yes))
{
var showUserColumn = mainUserColumn.Where(p => p.CustomUserSetting == Enum_ExportCustomUserSetting.Yes)
.Select(p => p.ExportColumnName?.ToLower()).Aggregate((a, b) => a + " " + b)?.Split(' ').ToList();
mainProperties = mainProperties.Where(p => showUserColumn.Contains(p.Name.ToLower())).ToArray();
}
#endregion
var headerRow = sheet.CreateRow(0); //标头列
for (var i = 0; i < mainProperties.Length; i++)
{
var englishName = mainProperties[i].Name;
//本地化
var localizerName = Localizer[typeof(TEntity).Name + englishName];
var headCell = headerRow.CreateCell(i);
headCell.SetCellValue(localizerName);
headCell.CellStyle = excelHeadCellStyle;
}
// 获取从表的属性 创建从表 表头
var detailProperties = typeof(TEntityDto).GetProperty("Details")?.PropertyType.GetGenericArguments()[0]
.GetProperties();
if (detailProperties != null)
{
isHasDetail = true;
if (!isDetailExport) //是否要导出子表
{
isHasDetail = false;
}
if (isHasDetail)
{
headerRow.CreateCell(mainProperties.Length).SetCellValue("---【分割】---");
#region 用户个性导出 从表
//获取个性导出的字段
var detailDtoName = mainAllProperties.First(p => p.Name == "Details");
var detailUserColumn = await ExportCustomUserSettingAppService.GetByUserIdAndExportTableNameAsync(
userId, detailDtoName.PropertyType.GenericTypeArguments.First().Name.Replace("Dto", ""));
var detailNotShowUserColumn = detailUserColumn
.Where(p => p.CustomUserSetting == Enum_ExportCustomUserSetting.No).Select(p => p.ExportColumnName)
.ToList();
if (detailUserColumn.Any())
{
detailProperties = detailProperties.Where(p => !detailNotShowUserColumn.Contains(p.Name)).ToArray();
}
#endregion
for (var i = 0; i < detailProperties.Length; i++)
{
headerRow.CreateCell(mainProperties.Length + splitDetailsColumnNumber + i)
.SetCellValue(detailProperties[i].Name);
var headCell = headerRow.GetCell(mainProperties.Length + splitDetailsColumnNumber + i);
headCell.CellStyle = excelHeadCellStyle;
}
}
}
// 填充数据行
var rowIndex = 1;
foreach (var mainDto in data)
{
if (isHasDetail)
{
// 获取从表数据
var detailsIndex = mainAllProperties.FindIndex(p => p.Name == "Details");
// 子表
var detailList = (IEnumerable<object>)mainAllProperties[detailsIndex].GetValue(mainDto);
var startMainRowIndex = rowIndex;
for (var datailCount = 0; datailCount < detailList.Count(); datailCount++)
{
var dataRow = sheet.CreateRow(rowIndex);
if (isRedundance)
{
// 填充主表数据
for (var i = 0; i < mainProperties.Length; i++)
{
var value = mainProperties[i].GetValue(mainDto);
dataRow.CreateCell(i).SetCellValue(value?.ToString());
}
}
else
{
if (datailCount == 0)
{
// 填充主表数据
for (var i = 0; i < mainProperties.Length; i++)
{
var value = mainProperties[i].GetValue(mainDto);
dataRow.CreateCell(i).SetCellValue(value?.ToString());
}
}
}
rowIndex++;
}
var overMainRowIndex = rowIndex;
foreach (var detail in detailList)
{
if (startMainRowIndex <= overMainRowIndex)
{
//填充子表数据
var detailRow = sheet.GetRow(startMainRowIndex);
var splitCell = detailRow.CreateCell(mainProperties.Length);
splitCell.CellStyle = excelSplitCellStyle;
for (var i = 0; i < detailProperties.Length; i++)
{
var value = detailProperties[i].GetValue(detail);
detailRow.CreateCell(mainProperties.Length + splitDetailsColumnNumber + i)
.SetCellValue(value?.ToString());
var detailCell = detailRow.GetCell(mainProperties.Length + splitDetailsColumnNumber + i);
detailCell.CellStyle = excelDetailsCellStyle;
}
}
startMainRowIndex++;
}
}
else
{
var dataRow = sheet.CreateRow(rowIndex);
// 填充主表数据
for (var i = 0; i < mainProperties.Length; i++)
{
var value = mainProperties[i].GetValue(mainDto);
dataRow.CreateCell(i).SetCellValue(value?.ToString());
}
if (rowIndex % 2 == 0)
{
dataRow.RowStyle = excelOnlyMainCellStyle;
}
}
//添加1个空行将2条数据分割开
rowIndex++;
}
#region 自动调整列宽
// 自动调整列宽 注意:这个影响性能 会遍历所有行 并且找出宽度最大值
//sheet.AutoSizeColumn(i);
if (isHasDetail)
{
for (var i = 0; i < mainProperties.Length + splitDetailsColumnNumber + detailProperties.Length; i++)
{
var colWidth = Math.Max(sheet.GetColumnWidth(i) + 150, 265 * 15);
if (colWidth > 255 * 256)//excel列有最大宽度限制
{
colWidth = 6000;
}
sheet.SetColumnWidth(i, colWidth);
sheet.SetColumnWidth(mainProperties.Length, 3600);
}
}
else
{
for (var i = 0; i < mainProperties.Length; i++)
{
var colWidth = Math.Max(sheet.GetColumnWidth(i) + 150, 265 * 15);
if (colWidth > 255 * 256)//excel列有最大宽度限制
{
colWidth = 6000;
}
sheet.SetColumnWidth(i, colWidth);
}
}
#endregion
// 保存Excel文件到MemoryStream
workbook.Write(fileStream, true);
fileStream.Position = 0;
// 创建FileContentResult返回Excel文件
var fileContentResult = new FileContentResult(fileStream.ToArray(),
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
{
FileDownloadName = Localizer[typeof(TEntity).Name] + ".xlsx"
};
await Task.CompletedTask;
return fileContentResult;
}
/// <summary>
/// 【基础】-【获取 增 改 查基础的Dto数据类型】
/// </summary>
/// <returns></returns>
[HttpPost("api/[controller]/base/get-dto-column-type")]
public virtual async Task<List<AllTableColumnTypeDto>> GetDtoColumnTypeAsync()
{
var tableColumnTypeDtos = new List<AllTableColumnTypeDto>
{
GetTableColumnTypeByTable(typeof(TEntity), "S"),
GetTableColumnTypeByTable(typeof(TCreateInput), "C"),
GetTableColumnTypeByTable(typeof(TUpdateInput), "U"),
GetTableColumnTypeByTable(typeof(TEntity), "G")
};
await Task.CompletedTask;
return tableColumnTypeDtos;
}
#endregion
#region 私有处理
/// <summary>
/// 按表达式条件获取分页列表
/// </summary>
/// <param name="expression"></param>
/// <param name="skipCount"></param>
/// <param name="maxResultCount"></param>
/// <param name="sorting"></param>
/// <param name="includeDetails"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
private async Task<List<TEntity>> GetQueryListAsync(Expression<Func<TEntity, bool>> expression,
int skipCount, int maxResultCount, string sorting,
bool includeDetails = false, CancellationToken cancellationToken = default)
{
var query = await Repository.WithDetailsAsync();
//var query = await Repository.GetQueryableAsync();
var entities = query.Where(expression);
entities = GetSortingQueryable(entities, sorting);
var str = entities.ToQueryString();
Console.WriteLine("---------查询开始---------");
Console.WriteLine();
Console.WriteLine(str);
Console.WriteLine();
Console.WriteLine("---------查询结束---------");
var result = await entities.PageBy(skipCount, maxResultCount).ToListAsync(cancellationToken)
.ConfigureAwait(false);
return result;
}
/// <summary>
/// 设置排序
/// </summary>
/// <param name="entities"></param>
/// <param name="sorting"></param>
/// <returns></returns>
private IQueryable<TEntity> GetSortingQueryable(IQueryable<TEntity> entities, string sorting)
{
if (string.IsNullOrEmpty(sorting))
{
var createTimePropertyInfo = typeof(TEntity).GetProperty("CreationTime");
if (createTimePropertyInfo != null)
{
entities = entities.OrderBy("CreationTime DESC");
}
else
{
entities = entities.OrderBy("Id");
}
}
else
{
var sortParams = sorting?.Split(' ');
var sortName = sortParams[0];
var ascOrDesc = string.Empty;
if (sortParams.Length > 1)
{
var sortDirection = sortParams[1];
if (sortDirection.Equals("DESC", StringComparison.OrdinalIgnoreCase))
{
ascOrDesc = " DESC ";
}
}
else
{
ascOrDesc = " DESC ";
}
entities = entities.OrderBy(sortName + ascOrDesc);
}
return entities;
}
/// <summary>
/// 获取Dto的属性名字和数据类型
/// </summary>
/// <param name="dtoType"></param>
/// <param name="strDtoType"></param>
/// <returns></returns>
private AllTableColumnTypeDto GetTableColumnTypeByTable(Type dtoType, string strDtoType)
{
var gDto = new AllTableColumnTypeDto
{
DtoType = strDtoType,
DtoName = dtoType.FullName,
ColumnsTypes = new List<ColumnType>()
};
var propertyInfos = dtoType.GetProperties();
foreach (var propertyInfo in propertyInfos)
{
var columnType = new ColumnType();
columnType.IsEnum = false;
if (propertyInfo.PropertyType.GenericTypeArguments.Length > 0)
{
if (propertyInfo.PropertyType.GenericTypeArguments[0].IsEnum)
{
columnType.IsEnum = true;
}
columnType.Z_ColumnBaseType = propertyInfo.PropertyType.GenericTypeArguments[0].FullName!;
}
else
{
columnType.Z_ColumnBaseType = propertyInfo.PropertyType.FullName!;
}
columnType.Z_ColumnName = propertyInfo.Name;
columnType.Z_ColumnType = propertyInfo.PropertyType.Name;
gDto.ColumnsTypes.Add(columnType);
}
return gDto;
}
/// <summary>
/// 【记录数量查询】【有筛选条件】
/// </summary>
/// <param name="expression"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
private async Task<long> GetCountAsync(Expression<Func<TEntity, bool>> expression,
CancellationToken cancellationToken = default)
{
var count = await _repository.LongCountAsync(expression, cancellationToken);
return count;
}
#region Excel导出的样式设置
/// <summary>
/// 导出设置子表单元格样式
/// </summary>
/// <param name="workbook"></param>
/// <returns></returns>
private static ICellStyle SetExcelDetailsCellStyle(IWorkbook workbook)
{
var cellStyle = workbook.CreateCellStyle();
cellStyle.FillBackgroundColor = IndexedColors.Grey25Percent.Index;
cellStyle.FillForegroundColor = IndexedColors.Grey25Percent.Index;
cellStyle.FillPattern = FillPattern.SolidForeground;
return cellStyle;
}
/// <summary>
/// 导出设置只有主表时的交替行 单元格样式
/// </summary>
/// <param name="workbook"></param>
/// <returns></returns>
private static ICellStyle SetExcelOnlyMainCellStyle(IWorkbook workbook)
{
var cellStyle = workbook.CreateCellStyle();
cellStyle.FillBackgroundColor = IndexedColors.Grey25Percent.Index;
cellStyle.FillForegroundColor = IndexedColors.Grey25Percent.Index;
cellStyle.FillPattern = FillPattern.SolidForeground;
return cellStyle;
}
/// <summary>
/// 设置分割单元格的样式
/// </summary>
/// <param name="workbook"></param>
/// <returns></returns>
private static ICellStyle SetSplitCellStyle(IWorkbook workbook)
{
var cellStyle = workbook.CreateCellStyle();
cellStyle.BorderLeft = BorderStyle.MediumDashed;
cellStyle.BorderRight = BorderStyle.MediumDashed;
cellStyle.LeftBorderColor = IndexedColors.BrightGreen.Index;
cellStyle.RightBorderColor = IndexedColors.Grey25Percent.Index;
cellStyle.FillBackgroundColor = IndexedColors.White.Index;
cellStyle.FillForegroundColor = IndexedColors.White.Index;
cellStyle.FillPattern = FillPattern.ThickVerticalBands;
return cellStyle;
}
/// <summary>
/// 导出设置表头单元格样式
/// </summary>
/// <param name="workbook"></param>
/// <returns></returns>
private static ICellStyle SetExcelHeadCellStyle(IWorkbook workbook)
{
var cellStyle = workbook.CreateCellStyle();
cellStyle.FillBackgroundColor = IndexedColors.LightOrange.Index;
cellStyle.FillForegroundColor = IndexedColors.LightOrange.Index;
cellStyle.FillPattern = FillPattern.SolidForeground;
return cellStyle;
}
#endregion
#endregion
}

63
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/AppBaseBusiness/ExportCustomUserSetting/ExportCustomUserSettingAppService.cs

@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using WinIn.FasterZ.Store.AppBase;
using WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting;
using WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting.Dtos;
using WinIn.FasterZ.Wms.Permissions;
namespace WinIn.FasterZ.Wms.AppBaseBusiness.ExportCustomUserSetting
{
/// <summary>
/// 用户个型导出配置
/// </summary>
public class ExportCustomUserSettingAppService : ZbxBase<Store.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting, ExportCustomUserSettingDto, Guid,
ExportCustomUserSettingGetListInput, CreateUpdateExportCustomUserSettingDto,
CreateUpdateExportCustomUserSettingDto>,
IExportCustomUserSettingAppService
{
private readonly IExportCustomUserSettingRepository _repository;
public ExportCustomUserSettingAppService(IExportCustomUserSettingRepository repository) : base(repository)
{
_repository = repository;
}
protected override string GetPolicyName { get; set; } =WmsPermissions.ExportCustomUserSetting.Default;
protected override string GetListPolicyName { get; set; } = WmsPermissions.ExportCustomUserSetting.Default;
protected override string CreatePolicyName { get; set; } = WmsPermissions.ExportCustomUserSetting.Create;
protected override string UpdatePolicyName { get; set; } = WmsPermissions.ExportCustomUserSetting.Update;
protected override string DeletePolicyName { get; set; } = WmsPermissions.ExportCustomUserSetting.Delete;
/// <summary>
/// 根据用户和表名获取个性化导出
/// </summary>
/// <returns></returns>
[HttpPost("get-by-user-and-table-name")]
public virtual async Task<List<ExportCustomUserSettingDto>> GetByUserIdAndExportTableNameAsync(Guid userId,
string exportTableName)
{
var entitys =
await _repository.GetListAsync(p => p.ExportUserId == userId && p.ExportTableName == exportTableName);
return ObjectMapper.Map<List<Store.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting>, List<ExportCustomUserSettingDto>>(entitys);
}
protected override async Task<IQueryable<Store.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting>> CreateFilteredQueryAsync(
ExportCustomUserSettingGetListInput input)
{
// TODO: AbpHelper generated
return (await base.CreateFilteredQueryAsync(input))
.WhereIf(input.ExportUserId != null, x => x.ExportUserId == input.ExportUserId)
.WhereIf(!input.ExportUserName.IsNullOrWhiteSpace(), x => x.ExportUserName.Contains(input.ExportUserName))
.WhereIf(!input.ExportColumnName.IsNullOrWhiteSpace(),
x => x.ExportColumnName.Contains(input.ExportColumnName))
.WhereIf(!input.ExportTableName.IsNullOrWhiteSpace(),
x => x.ExportTableName.Contains(input.ExportTableName))
.WhereIf(input.CustomUserSetting != null, x => x.CustomUserSetting == input.CustomUserSetting)
;
}
}
}

2
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/WinIn.FasterZ.Wms.Application.csproj

@ -14,6 +14,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="NPOI" Version="2.6.2" />
<PackageReference Include="ValueInjecter" Version="3.2.0" />
<PackageReference Include="Volo.Abp.Account.Application" Version="7.3.2" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="7.3.2" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="7.3.2" />

15
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/WmsAppService.cs

@ -4,14 +4,15 @@ using System.Text;
using WinIn.FasterZ.Wms.Localization;
using Volo.Abp.Application.Services;
namespace WinIn.FasterZ.Wms;
/* Inherit your application services from this class.
*/
public abstract class WmsAppService : ApplicationService
namespace WinIn.FasterZ.Wms
{
protected WmsAppService()
/* Inherit your application services from this class.
*/
public abstract class WmsAppService : ApplicationService
{
LocalizationResource = typeof(WmsResource);
protected WmsAppService()
{
LocalizationResource = typeof(WmsResource);
}
}
}

19
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/WmsApplicationAutoMapperProfile.cs

@ -2,16 +2,17 @@ using WinIn.FasterZ.Wms.Z_Business.AuthDepartment;
using WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos;
using AutoMapper;
namespace WinIn.FasterZ.Wms;
public class WmsApplicationAutoMapperProfile : Profile
namespace WinIn.FasterZ.Wms
{
public WmsApplicationAutoMapperProfile()
public class WmsApplicationAutoMapperProfile : Profile
{
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
CreateMap<AuthDepartment, AuthDepartmentDto>();
CreateMap<CreateUpdateAuthDepartmentDto, AuthDepartment>(MemberList.Source);
public WmsApplicationAutoMapperProfile()
{
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
CreateMap<AuthDepartment, AuthDepartmentDto>();
CreateMap<CreateUpdateAuthDepartmentDto, AuthDepartment>(MemberList.Source);
}
}
}

35
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/WmsApplicationModule.cs

@ -7,25 +7,26 @@ using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
namespace WinIn.FasterZ.Wms;
[DependsOn(
typeof(WmsDomainModule),
typeof(AbpAccountApplicationModule),
typeof(WmsApplicationContractsModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpTenantManagementApplicationModule),
typeof(AbpFeatureManagementApplicationModule),
typeof(AbpSettingManagementApplicationModule)
)]
public class WmsApplicationModule : AbpModule
namespace WinIn.FasterZ.Wms
{
public override void ConfigureServices(ServiceConfigurationContext context)
[DependsOn(
typeof(WmsDomainModule),
typeof(AbpAccountApplicationModule),
typeof(WmsApplicationContractsModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpTenantManagementApplicationModule),
typeof(AbpFeatureManagementApplicationModule),
typeof(AbpSettingManagementApplicationModule)
)]
public class WmsApplicationModule : AbpModule
{
Configure<AbpAutoMapperOptions>(options =>
public override void ConfigureServices(ServiceConfigurationContext context)
{
options.AddMaps<WmsApplicationModule>();
});
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<WmsApplicationModule>();
});
}
}
}

6
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Application/Z_Business/AuthDepartment/AuthDepartmentAppService.cs

@ -1,14 +1,14 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using WinIn.FasterZ.Wms.Permissions;
using WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos;
using Volo.Abp.Application.Services;
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment;
public class AuthDepartmentAppService : CrudAppService<AuthDepartment, AuthDepartmentDto, Guid, AuthDepartmentGetListInput, CreateUpdateAuthDepartmentDto, CreateUpdateAuthDepartmentDto>,
public class AuthDepartmentAppService : CrudAppService<AuthDepartment, AuthDepartmentDto, Guid,
AuthDepartmentGetListInput, CreateUpdateAuthDepartmentDto, CreateUpdateAuthDepartmentDto>,
IAuthDepartmentAppService
{
protected override string GetPolicyName { get; set; } = WmsPermissions.AuthDepartment.Default;

37
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.AuthServer/Pages/Index.cshtml.cs

@ -5,31 +5,32 @@ using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
using Volo.Abp.Localization;
using Volo.Abp.OpenIddict.Applications;
namespace WinIn.FasterZ.Wms.Pages;
public class IndexModel : AbpPageModel
namespace WinIn.FasterZ.Wms.Pages
{
public List<OpenIddictApplication>? Applications { get; protected set; }
public class IndexModel : AbpPageModel
{
public List<OpenIddictApplication>? Applications { get; protected set; }
public IReadOnlyList<LanguageInfo>? Languages { get; protected set; }
public IReadOnlyList<LanguageInfo>? Languages { get; protected set; }
public string? CurrentLanguage { get; protected set; }
public string? CurrentLanguage { get; protected set; }
protected IOpenIddictApplicationRepository OpenIdApplicationRepository { get; }
protected IOpenIddictApplicationRepository OpenIdApplicationRepository { get; }
protected ILanguageProvider LanguageProvider { get; }
protected ILanguageProvider LanguageProvider { get; }
public IndexModel(IOpenIddictApplicationRepository openIdApplicationRepository, ILanguageProvider languageProvider)
{
OpenIdApplicationRepository = openIdApplicationRepository;
LanguageProvider = languageProvider;
}
public IndexModel(IOpenIddictApplicationRepository openIdApplicationRepository, ILanguageProvider languageProvider)
{
OpenIdApplicationRepository = openIdApplicationRepository;
LanguageProvider = languageProvider;
}
public async Task OnGetAsync()
{
Applications = await OpenIdApplicationRepository.GetListAsync();
public async Task OnGetAsync()
{
Applications = await OpenIdApplicationRepository.GetListAsync();
Languages = await LanguageProvider.GetLanguagesAsync();
CurrentLanguage = CultureInfo.CurrentCulture.DisplayName;
Languages = await LanguageProvider.GetLanguagesAsync();
CurrentLanguage = CultureInfo.CurrentCulture.DisplayName;
}
}
}

71
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.AuthServer/Program.cs

@ -6,51 +6,52 @@ using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
namespace WinIn.FasterZ.Wms;
public class Program
namespace WinIn.FasterZ.Wms
{
public async static Task<int> Main(string[] args)
public class Program
{
Log.Logger = new LoggerConfiguration()
public async static Task<int> Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
#if DEBUG
.MinimumLevel.Debug()
.MinimumLevel.Debug()
#else
.MinimumLevel.Information()
#endif
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Async(c => c.Console())
.CreateLogger();
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Async(c => c.Console())
.CreateLogger();
try
{
Log.Information("Starting WinIn.FasterZ.Wms.AuthServer.");
var builder = WebApplication.CreateBuilder(args);
builder.Host.AddAppSettingsSecretsJson()
.UseAutofac()
.UseSerilog();
await builder.AddApplicationAsync<WmsAuthServerModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();
await app.RunAsync();
return 0;
}
catch (Exception ex)
{
if (ex is HostAbortedException)
try
{
throw;
Log.Information("Starting WinIn.FasterZ.Wms.AuthServer.");
var builder = WebApplication.CreateBuilder(args);
builder.Host.AddAppSettingsSecretsJson()
.UseAutofac()
.UseSerilog();
await builder.AddApplicationAsync<WmsAuthServerModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();
await app.RunAsync();
return 0;
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "WinIn.FasterZ.Wms.AuthServer terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
Log.Fatal(ex, "WinIn.FasterZ.Wms.AuthServer terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
}
}

253
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.AuthServer/WmsAuthServerModule.cs

@ -35,160 +35,161 @@ using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.UI;
using Volo.Abp.VirtualFileSystem;
namespace WinIn.FasterZ.Wms;
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpDistributedLockingModule),
typeof(AbpAccountWebOpenIddictModule),
typeof(AbpAccountApplicationModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule),
typeof(WmsEntityFrameworkCoreModule),
typeof(AbpAspNetCoreSerilogModule)
)]
public class WmsAuthServerModule : AbpModule
namespace WinIn.FasterZ.Wms
{
public override void PreConfigureServices(ServiceConfigurationContext context)
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpDistributedLockingModule),
typeof(AbpAccountWebOpenIddictModule),
typeof(AbpAccountApplicationModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule),
typeof(WmsEntityFrameworkCoreModule),
typeof(AbpAspNetCoreSerilogModule)
)]
public class WmsAuthServerModule : AbpModule
{
PreConfigure<OpenIddictBuilder>(builder =>
public override void PreConfigureServices(ServiceConfigurationContext context)
{
builder.AddValidation(options =>
PreConfigure<OpenIddictBuilder>(builder =>
{
options.AddAudiences("Wms");
options.UseLocalServer();
options.UseAspNetCore();
builder.AddValidation(options =>
{
options.AddAudiences("Wms");
options.UseLocalServer();
options.UseAspNetCore();
});
});
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
}
Configure<AbpLocalizationOptions>(options =>
public override void ConfigureServices(ServiceConfigurationContext context)
{
options.Resources
.Get<WmsResource>()
.AddBaseTypes(
typeof(AbpUiResource)
);
});
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
Configure<AbpBundlingOptions>(options =>
{
options.StyleBundles.Configure(
LeptonXLiteThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/global-styles.css");
}
);
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<WmsResource>()
.AddBaseTypes(
typeof(AbpUiResource)
);
});
Configure<AbpAuditingOptions>(options =>
{
//options.IsEnabledForGetRequests = true;
options.ApplicationName = "AuthServer";
});
Configure<AbpBundlingOptions>(options =>
{
options.StyleBundles.Configure(
LeptonXLiteThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/global-styles.css");
}
);
});
if (hostingEnvironment.IsDevelopment())
{
Configure<AbpVirtualFileSystemOptions>(options =>
Configure<AbpAuditingOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<WmsDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}WinIn.FasterZ.Wms.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<WmsDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}WinIn.FasterZ.Wms.Domain"));
//options.IsEnabledForGetRequests = true;
options.ApplicationName = "AuthServer";
});
}
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"]?.Split(',') ?? Array.Empty<string>());
if (hostingEnvironment.IsDevelopment())
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<WmsDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}WinIn.FasterZ.Wms.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<WmsDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}WinIn.FasterZ.Wms.Domain"));
});
}
options.Applications["Angular"].RootUrl = configuration["App:ClientUrl"];
options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password";
});
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"]?.Split(',') ?? Array.Empty<string>());
Configure<AbpBackgroundJobOptions>(options =>
{
options.IsJobExecutionEnabled = false;
});
options.Applications["Angular"].RootUrl = configuration["App:ClientUrl"];
options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password";
});
Configure<AbpDistributedCacheOptions>(options =>
{
options.KeyPrefix = "Wms:";
});
Configure<AbpBackgroundJobOptions>(options =>
{
options.IsJobExecutionEnabled = false;
});
var dataProtectionBuilder = context.Services.AddDataProtection().SetApplicationName("Wms");
if (!hostingEnvironment.IsDevelopment())
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
dataProtectionBuilder.PersistKeysToStackExchangeRedis(redis, "Wms-Protection-Keys");
}
Configure<AbpDistributedCacheOptions>(options =>
{
options.KeyPrefix = "Wms:";
});
context.Services.AddSingleton<IDistributedLockProvider>(sp =>
{
var connection = ConnectionMultiplexer
.Connect(configuration["Redis:Configuration"]);
return new RedisDistributedSynchronizationProvider(connection.GetDatabase());
});
var dataProtectionBuilder = context.Services.AddDataProtection().SetApplicationName("Wms");
if (!hostingEnvironment.IsDevelopment())
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
dataProtectionBuilder.PersistKeysToStackExchangeRedis(redis, "Wms-Protection-Keys");
}
context.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
context.Services.AddSingleton<IDistributedLockProvider>(sp =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]?
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToArray() ?? Array.Empty<string>()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
var connection = ConnectionMultiplexer
.Connect(configuration["Redis:Configuration"]);
return new RedisDistributedSynchronizationProvider(connection.GetDatabase());
});
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
context.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]?
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToArray() ?? Array.Empty<string>()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
}
if (env.IsDevelopment())
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
app.UseDeveloperExceptionPage();
}
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
app.UseAbpRequestLocalization();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
if (!env.IsDevelopment())
{
app.UseErrorPage();
}
app.UseAbpRequestLocalization();
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
app.UseCors();
app.UseAuthentication();
app.UseAbpOpenIddictValidation();
if (!env.IsDevelopment())
{
app.UseErrorPage();
}
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
app.UseCors();
app.UseAuthentication();
app.UseAbpOpenIddictValidation();
app.UseUnitOfWork();
app.UseAuthorization();
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseUnitOfWork();
app.UseAuthorization();
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
}
}

11
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.AuthServer/WmsBrandingProvider.cs

@ -1,10 +1,11 @@
using Volo.Abp.Ui.Branding;
using Volo.Abp.DependencyInjection;
namespace WinIn.FasterZ.Wms;
[Dependency(ReplaceServices = true)]
public class WmsBrandingProvider : DefaultBrandingProvider
namespace WinIn.FasterZ.Wms
{
public override string AppName => "Wms";
[Dependency(ReplaceServices = true)]
public class WmsBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "Wms";
}
}

65
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.DbMigrator/DbMigratorHostedService.cs

@ -8,44 +8,45 @@ using Serilog;
using Volo.Abp;
using Volo.Abp.Data;
namespace WinIn.FasterZ.Wms.DbMigrator;
public class DbMigratorHostedService : IHostedService
namespace WinIn.FasterZ.Wms.DbMigrator
{
private readonly IHostApplicationLifetime _hostApplicationLifetime;
private readonly IConfiguration _configuration;
public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, IConfiguration configuration)
public class DbMigratorHostedService : IHostedService
{
_hostApplicationLifetime = hostApplicationLifetime;
_configuration = configuration;
}
private readonly IHostApplicationLifetime _hostApplicationLifetime;
private readonly IConfiguration _configuration;
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = await AbpApplicationFactory.CreateAsync<WmsDbMigratorModule>(options =>
public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, IConfiguration configuration)
{
options.Services.ReplaceConfiguration(_configuration);
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
options.AddDataMigrationEnvironment();
}))
{
await application.InitializeAsync();
await application
.ServiceProvider
.GetRequiredService<WmsDbMigrationService>()
.MigrateAsync();
await application.ShutdownAsync();
_hostApplicationLifetime = hostApplicationLifetime;
_configuration = configuration;
}
_hostApplicationLifetime.StopApplication();
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = await AbpApplicationFactory.CreateAsync<WmsDbMigratorModule>(options =>
{
options.Services.ReplaceConfiguration(_configuration);
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
options.AddDataMigrationEnvironment();
}))
{
await application.InitializeAsync();
await application
.ServiceProvider
.GetRequiredService<WmsDbMigrationService>()
.MigrateAsync();
await application.ShutdownAsync();
_hostApplicationLifetime.StopApplication();
}
}
}
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
}

43
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.DbMigrator/Program.cs

@ -7,35 +7,36 @@ using Microsoft.Extensions.Logging;
using Serilog;
using Serilog.Events;
namespace WinIn.FasterZ.Wms.DbMigrator;
class Program
namespace WinIn.FasterZ.Wms.DbMigrator
{
static async Task Main(string[] args)
class Program
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
.MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning)
static async Task Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
.MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning)
#if DEBUG
.MinimumLevel.Override("WinIn.FasterZ.Wms", LogEventLevel.Debug)
#else
.MinimumLevel.Override("WinIn.FasterZ.Wms", LogEventLevel.Information)
#endif
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Async(c => c.Console())
.CreateLogger();
.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Async(c => c.Console())
.CreateLogger();
await CreateHostBuilder(args).RunConsoleAsync();
}
await CreateHostBuilder(args).RunConsoleAsync();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.AddAppSettingsSecretsJson()
.ConfigureLogging((context, logging) => logging.ClearProviders())
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<DbMigratorHostedService>();
});
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.AddAppSettingsSecretsJson()
.ConfigureLogging((context, logging) => logging.ClearProviders())
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<DbMigratorHostedService>();
});
}
}

23
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.DbMigrator/WmsDbMigratorModule.cs

@ -4,18 +4,19 @@ using Volo.Abp.Caching;
using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.Modularity;
namespace WinIn.FasterZ.Wms.DbMigrator;
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(WmsEntityFrameworkCoreModule),
typeof(WmsApplicationContractsModule)
)]
public class WmsDbMigratorModule : AbpModule
namespace WinIn.FasterZ.Wms.DbMigrator
{
public override void ConfigureServices(ServiceConfigurationContext context)
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(WmsEntityFrameworkCoreModule),
typeof(WmsApplicationContractsModule)
)]
public class WmsDbMigratorModule : AbpModule
{
Configure<AbpDistributedCacheOptions>(options => { options.KeyPrefix = "Wms:"; });
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpDistributedCacheOptions>(options => { options.KeyPrefix = "Wms:"; });
}
}
}

14
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/Enums/Enum_ExportCustomUserSetting.cs

@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace WinIn.FasterZ.Store.Enums
{
public enum Enum_ExportCustomUserSetting
{
[Display(Name = "未定义")]
None=0,
[Display(Name = "导出")]
Yes=1,
[Display(Name = "不导出")]
No = 2
}
}

9
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/Localization/WmsResource.cs

@ -1,9 +1,10 @@
using Volo.Abp.Localization;
namespace WinIn.FasterZ.Wms.Localization;
[LocalizationResourceName("Wms")]
public class WmsResource
namespace WinIn.FasterZ.Wms.Localization
{
[LocalizationResourceName("Wms")]
public class WmsResource
{
}
}

17
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs

@ -1,10 +1,11 @@
namespace WinIn.FasterZ.Wms.MultiTenancy;
public static class MultiTenancyConsts
namespace WinIn.FasterZ.Wms.MultiTenancy
{
/* Enable/disable multi-tenancy easily in a single point.
* If you will never need to multi-tenancy, you can remove
* related modules and code parts, including this file.
*/
public const bool IsEnabled = true;
public static class MultiTenancyConsts
{
/* Enable/disable multi-tenancy easily in a single point.
* If you will never need to multi-tenancy, you can remove
* related modules and code parts, including this file.
*/
public const bool IsEnabled = true;
}
}

9
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/WmsDomainErrorCodes.cs

@ -1,6 +1,7 @@
namespace WinIn.FasterZ.Wms;
public static class WmsDomainErrorCodes
namespace WinIn.FasterZ.Wms
{
/* You can add your business exception error codes here, as constants */
public static class WmsDomainErrorCodes
{
/* You can add your business exception error codes here, as constants */
}
}

69
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/WmsDomainSharedModule.cs

@ -13,46 +13,47 @@ using Volo.Abp.TenantManagement;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem;
namespace WinIn.FasterZ.Wms;
[DependsOn(
typeof(AbpAuditLoggingDomainSharedModule),
typeof(AbpBackgroundJobsDomainSharedModule),
typeof(AbpFeatureManagementDomainSharedModule),
typeof(AbpIdentityDomainSharedModule),
typeof(AbpOpenIddictDomainSharedModule),
typeof(AbpPermissionManagementDomainSharedModule),
typeof(AbpSettingManagementDomainSharedModule),
typeof(AbpTenantManagementDomainSharedModule)
)]
public class WmsDomainSharedModule : AbpModule
namespace WinIn.FasterZ.Wms
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
WmsGlobalFeatureConfigurator.Configure();
WmsModuleExtensionConfigurator.Configure();
}
public override void ConfigureServices(ServiceConfigurationContext context)
[DependsOn(
typeof(AbpAuditLoggingDomainSharedModule),
typeof(AbpBackgroundJobsDomainSharedModule),
typeof(AbpFeatureManagementDomainSharedModule),
typeof(AbpIdentityDomainSharedModule),
typeof(AbpOpenIddictDomainSharedModule),
typeof(AbpPermissionManagementDomainSharedModule),
typeof(AbpSettingManagementDomainSharedModule),
typeof(AbpTenantManagementDomainSharedModule)
)]
public class WmsDomainSharedModule : AbpModule
{
Configure<AbpVirtualFileSystemOptions>(options =>
public override void PreConfigureServices(ServiceConfigurationContext context)
{
options.FileSets.AddEmbedded<WmsDomainSharedModule>();
});
WmsGlobalFeatureConfigurator.Configure();
WmsModuleExtensionConfigurator.Configure();
}
Configure<AbpLocalizationOptions>(options =>
public override void ConfigureServices(ServiceConfigurationContext context)
{
options.Resources
.Add<WmsResource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/Wms");
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<WmsDomainSharedModule>();
});
options.DefaultResourceType = typeof(WmsResource);
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<WmsResource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/Wms");
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("Wms", typeof(WmsResource));
});
options.DefaultResourceType = typeof(WmsResource);
});
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("Wms", typeof(WmsResource));
});
}
}
}

107
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain.Shared/WmsModuleExtensionConfigurator.cs

@ -3,71 +3,72 @@ using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace WinIn.FasterZ.Wms;
public static class WmsModuleExtensionConfigurator
namespace WinIn.FasterZ.Wms
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
public static class WmsModuleExtensionConfigurator
{
OneTimeRunner.Run(() =>
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
ConfigureExistingProperties();
ConfigureExtraProperties();
});
}
OneTimeRunner.Run(() =>
{
ConfigureExistingProperties();
ConfigureExtraProperties();
});
}
private static void ConfigureExistingProperties()
{
/* You can change max lengths for properties of the
* entities defined in the modules used by your application.
*
* Example: Change user and role name max lengths
private static void ConfigureExistingProperties()
{
/* You can change max lengths for properties of the
* entities defined in the modules used by your application.
*
* Example: Change user and role name max lengths
IdentityUserConsts.MaxNameLength = 99;
IdentityRoleConsts.MaxNameLength = 99;
IdentityUserConsts.MaxNameLength = 99;
IdentityRoleConsts.MaxNameLength = 99;
* Notice: It is not suggested to change property lengths
* unless you really need it. Go with the standard values wherever possible.
*
* If you are using EF Core, you will need to run the add-migration command after your changes.
*/
}
* Notice: It is not suggested to change property lengths
* unless you really need it. Go with the standard values wherever possible.
*
* If you are using EF Core, you will need to run the add-migration command after your changes.
*/
}
private static void ConfigureExtraProperties()
{
/* You can configure extra properties for the
* entities defined in the modules used by your application.
*
* This class can be used to define these extra properties
* with a high level, easy to use API.
*
* Example: Add a new property to the user entity of the identity module
private static void ConfigureExtraProperties()
{
/* You can configure extra properties for the
* entities defined in the modules used by your application.
*
* This class can be used to define these extra properties
* with a high level, easy to use API.
*
* Example: Add a new property to the user entity of the identity module
ObjectExtensionManager.Instance.Modules()
.ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
ObjectExtensionManager.Instance.Modules()
.ConfigureIdentity(identity =>
{
user.AddOrUpdateProperty<string>( //property type: string
"SocialSecurityNumber", //property name
property =>
{
//validation rules
property.Attributes.Add(new RequiredAttribute());
property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4});
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<string>( //property type: string
"SocialSecurityNumber", //property name
property =>
{
//validation rules
property.Attributes.Add(new RequiredAttribute());
property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4});
property.Configuration[IdentityModuleExtensionConsts.ConfigurationNames.AllowUserToEdit] = true;
property.Configuration[IdentityModuleExtensionConsts.ConfigurationNames.AllowUserToEdit] = true;
//...other configurations for this property
}
);
//...other configurations for this property
}
);
});
});
});
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Module-Entity-Extensions
*/
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Module-Entity-Extensions
*/
}
}
}

43
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/AppBaseBusiness/ExportCustomUserSetting/ExportCustomUserSetting.cs

@ -0,0 +1,43 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
using WinIn.FasterZ.Store.Enums;
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting
{
/// <summary>
/// 用户个型导出配置
/// </summary>
public class ExportCustomUserSetting : AuditedAggregateRoot<Guid>
{
/// <summary>
/// 用户ID
/// </summary>
[Display(Name = "用户ID")]
public Guid? ExportUserId { get; set; }
/// <summary>
/// 用户姓名
/// </summary>
[Display(Name = "用户姓名")]
public string? ExportUserName { get; set; }
/// <summary>
/// 列名
/// </summary>
[Display(Name = "列名")]
public string? ExportColumnName { get; set; }
/// <summary>
/// 表名
/// </summary>
[Display(Name = "表名")]
public string? ExportTableName { get; set; }
/// <summary>
/// 导出设置项
/// </summary>
[Display(Name = "导出设置项")]
public Enum_ExportCustomUserSetting CustomUserSetting { get; set; }
}
}

12
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/AppBaseBusiness/ExportCustomUserSetting/IExportCustomUserSettingRepository.cs

@ -0,0 +1,12 @@
using System;
using Volo.Abp.Domain.Repositories;
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting
{
/// <summary>
/// 用户个型导出配置
/// </summary>
public interface IExportCustomUserSettingRepository : IRepository<ExportCustomUserSetting, Guid>
{
}
}

9
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Data/IWmsDbSchemaMigrator.cs

@ -1,8 +1,9 @@
using System.Threading.Tasks;
namespace WinIn.FasterZ.Wms.Data;
public interface IWmsDbSchemaMigrator
namespace WinIn.FasterZ.Wms.Data
{
Task MigrateAsync();
public interface IWmsDbSchemaMigrator
{
Task MigrateAsync();
}
}

17
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Data/NullWmsDbSchemaMigrator.cs

@ -1,15 +1,16 @@
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace WinIn.FasterZ.Wms.Data;
/* This is used if database provider does't define
* IWmsDbSchemaMigrator implementation.
*/
public class NullWmsDbSchemaMigrator : IWmsDbSchemaMigrator, ITransientDependency
namespace WinIn.FasterZ.Wms.Data
{
public Task MigrateAsync()
/* This is used if database provider does't define
* IWmsDbSchemaMigrator implementation.
*/
public class NullWmsDbSchemaMigrator : IWmsDbSchemaMigrator, ITransientDependency
{
return Task.CompletedTask;
public Task MigrateAsync()
{
return Task.CompletedTask;
}
}
}

289
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Data/WmsDbMigrationService.cs

@ -13,206 +13,207 @@ using Volo.Abp.Identity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.TenantManagement;
namespace WinIn.FasterZ.Wms.Data;
public class WmsDbMigrationService : ITransientDependency
namespace WinIn.FasterZ.Wms.Data
{
public ILogger<WmsDbMigrationService> Logger { get; set; }
private readonly IDataSeeder _dataSeeder;
private readonly IEnumerable<IWmsDbSchemaMigrator> _dbSchemaMigrators;
private readonly ITenantRepository _tenantRepository;
private readonly ICurrentTenant _currentTenant;
public WmsDbMigrationService(
IDataSeeder dataSeeder,
IEnumerable<IWmsDbSchemaMigrator> dbSchemaMigrators,
ITenantRepository tenantRepository,
ICurrentTenant currentTenant)
public class WmsDbMigrationService : ITransientDependency
{
_dataSeeder = dataSeeder;
_dbSchemaMigrators = dbSchemaMigrators;
_tenantRepository = tenantRepository;
_currentTenant = currentTenant;
Logger = NullLogger<WmsDbMigrationService>.Instance;
}
public ILogger<WmsDbMigrationService> Logger { get; set; }
private readonly IDataSeeder _dataSeeder;
private readonly IEnumerable<IWmsDbSchemaMigrator> _dbSchemaMigrators;
private readonly ITenantRepository _tenantRepository;
private readonly ICurrentTenant _currentTenant;
public WmsDbMigrationService(
IDataSeeder dataSeeder,
IEnumerable<IWmsDbSchemaMigrator> dbSchemaMigrators,
ITenantRepository tenantRepository,
ICurrentTenant currentTenant)
{
_dataSeeder = dataSeeder;
_dbSchemaMigrators = dbSchemaMigrators;
_tenantRepository = tenantRepository;
_currentTenant = currentTenant;
public async Task MigrateAsync()
{
var initialMigrationAdded = AddInitialMigrationIfNotExist();
Logger = NullLogger<WmsDbMigrationService>.Instance;
}
if (initialMigrationAdded)
public async Task MigrateAsync()
{
return;
}
var initialMigrationAdded = AddInitialMigrationIfNotExist();
Logger.LogInformation("Started database migrations...");
if (initialMigrationAdded)
{
return;
}
await MigrateDatabaseSchemaAsync();
await SeedDataAsync();
Logger.LogInformation("Started database migrations...");
Logger.LogInformation($"Successfully completed host database migrations.");
await MigrateDatabaseSchemaAsync();
await SeedDataAsync();
var tenants = await _tenantRepository.GetListAsync(includeDetails: true);
Logger.LogInformation($"Successfully completed host database migrations.");
var migratedDatabaseSchemas = new HashSet<string>();
foreach (var tenant in tenants)
{
using (_currentTenant.Change(tenant.Id))
var tenants = await _tenantRepository.GetListAsync(includeDetails: true);
var migratedDatabaseSchemas = new HashSet<string>();
foreach (var tenant in tenants)
{
if (tenant.ConnectionStrings.Any())
using (_currentTenant.Change(tenant.Id))
{
var tenantConnectionStrings = tenant.ConnectionStrings
.Select(x => x.Value)
.ToList();
if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings))
if (tenant.ConnectionStrings.Any())
{
await MigrateDatabaseSchemaAsync(tenant);
var tenantConnectionStrings = tenant.ConnectionStrings
.Select(x => x.Value)
.ToList();
if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings))
{
await MigrateDatabaseSchemaAsync(tenant);
migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings);
migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings);
}
}
await SeedDataAsync(tenant);
}
await SeedDataAsync(tenant);
Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations.");
}
Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations.");
Logger.LogInformation("Successfully completed all database migrations.");
Logger.LogInformation("You can safely end this process...");
}
Logger.LogInformation("Successfully completed all database migrations.");
Logger.LogInformation("You can safely end this process...");
}
private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null)
{
Logger.LogInformation(
$"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
foreach (var migrator in _dbSchemaMigrators)
private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null)
{
await migrator.MigrateAsync();
Logger.LogInformation(
$"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
foreach (var migrator in _dbSchemaMigrators)
{
await migrator.MigrateAsync();
}
}
}
private async Task SeedDataAsync(Tenant? tenant = null)
{
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
private async Task SeedDataAsync(Tenant? tenant = null)
{
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id)
.WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue)
.WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue)
);
}
await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id)
.WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue)
.WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue)
);
}
private bool AddInitialMigrationIfNotExist()
{
try
private bool AddInitialMigrationIfNotExist()
{
if (!DbMigrationsProjectExists())
try
{
if (!DbMigrationsProjectExists())
{
return false;
}
}
catch (Exception)
{
return false;
}
}
catch (Exception)
{
return false;
}
try
{
if (!MigrationsFolderExists())
try
{
AddInitialMigration();
return true;
if (!MigrationsFolderExists())
{
AddInitialMigration();
return true;
}
else
{
return false;
}
}
else
catch (Exception e)
{
Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message);
return false;
}
}
catch (Exception e)
{
Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message);
return false;
}
}
private bool DbMigrationsProjectExists()
{
var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
return dbMigrationsProjectFolder != null;
}
private bool MigrationsFolderExists()
{
var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
return dbMigrationsProjectFolder != null && Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "Migrations"));
}
private void AddInitialMigration()
{
Logger.LogInformation("Creating initial migration...");
private bool DbMigrationsProjectExists()
{
var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
string argumentPrefix;
string fileName;
return dbMigrationsProjectFolder != null;
}
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
private bool MigrationsFolderExists()
{
argumentPrefix = "-c";
fileName = "/bin/bash";
var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
return dbMigrationsProjectFolder != null && Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "Migrations"));
}
else
private void AddInitialMigration()
{
argumentPrefix = "/C";
fileName = "cmd.exe";
}
Logger.LogInformation("Creating initial migration...");
var procStartInfo = new ProcessStartInfo(fileName,
$"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetEntityFrameworkCoreProjectFolderPath()}\"\""
);
string argumentPrefix;
string fileName;
try
{
Process.Start(procStartInfo);
}
catch (Exception)
{
throw new Exception("Couldn't run ABP CLI...");
}
}
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
argumentPrefix = "-c";
fileName = "/bin/bash";
}
else
{
argumentPrefix = "/C";
fileName = "cmd.exe";
}
private string? GetEntityFrameworkCoreProjectFolderPath()
{
var slnDirectoryPath = GetSolutionDirectoryPath();
var procStartInfo = new ProcessStartInfo(fileName,
$"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetEntityFrameworkCoreProjectFolderPath()}\"\""
);
if (slnDirectoryPath == null)
{
throw new Exception("Solution folder not found!");
try
{
Process.Start(procStartInfo);
}
catch (Exception)
{
throw new Exception("Couldn't run ABP CLI...");
}
}
var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src");
private string? GetEntityFrameworkCoreProjectFolderPath()
{
var slnDirectoryPath = GetSolutionDirectoryPath();
return Directory.GetDirectories(srcDirectoryPath)
.FirstOrDefault(d => d.EndsWith(".EntityFrameworkCore"));
}
if (slnDirectoryPath == null)
{
throw new Exception("Solution folder not found!");
}
private string? GetSolutionDirectoryPath()
{
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());
var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src");
return Directory.GetDirectories(srcDirectoryPath)
.FirstOrDefault(d => d.EndsWith(".EntityFrameworkCore"));
}
while (currentDirectory != null && Directory.GetParent(currentDirectory.FullName) != null)
private string? GetSolutionDirectoryPath()
{
currentDirectory = Directory.GetParent(currentDirectory.FullName);
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());
if (currentDirectory != null && Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null)
while (currentDirectory != null && Directory.GetParent(currentDirectory.FullName) != null)
{
return currentDirectory.FullName;
currentDirectory = Directory.GetParent(currentDirectory.FullName);
if (currentDirectory != null && Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null)
{
return currentDirectory.FullName;
}
}
}
return null;
return null;
}
}
}

647
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/OpenIddict/OpenIddictDataSeedContributor.cs

@ -16,400 +16,401 @@ using Volo.Abp.OpenIddict.Scopes;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow;
namespace WinIn.FasterZ.Wms.OpenIddict;
/* Creates initial data that is needed to property run the application
* and make client-to-server communication possible.
*/
public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDependency
namespace WinIn.FasterZ.Wms.OpenIddict
{
private readonly IConfiguration _configuration;
private readonly IOpenIddictApplicationRepository _openIddictApplicationRepository;
private readonly IAbpApplicationManager _applicationManager;
private readonly IOpenIddictScopeRepository _openIddictScopeRepository;
private readonly IOpenIddictScopeManager _scopeManager;
private readonly IPermissionDataSeeder _permissionDataSeeder;
private readonly IStringLocalizer<OpenIddictResponse> L;
public OpenIddictDataSeedContributor(
IConfiguration configuration,
IOpenIddictApplicationRepository openIddictApplicationRepository,
IAbpApplicationManager applicationManager,
IOpenIddictScopeRepository openIddictScopeRepository,
IOpenIddictScopeManager scopeManager,
IPermissionDataSeeder permissionDataSeeder,
IStringLocalizer<OpenIddictResponse> l )
{
_configuration = configuration;
_openIddictApplicationRepository = openIddictApplicationRepository;
_applicationManager = applicationManager;
_openIddictScopeRepository = openIddictScopeRepository;
_scopeManager = scopeManager;
_permissionDataSeeder = permissionDataSeeder;
L = l;
}
[UnitOfWork]
public virtual async Task SeedAsync(DataSeedContext context)
{
await CreateScopesAsync();
await CreateApplicationsAsync();
}
private async Task CreateScopesAsync()
/* Creates initial data that is needed to property run the application
* and make client-to-server communication possible.
*/
public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDependency
{
if (await _openIddictScopeRepository.FindByNameAsync("Wms") == null)
{
await _scopeManager.CreateAsync(new OpenIddictScopeDescriptor {
Name = "Wms", DisplayName = "Wms API", Resources = { "Wms" }
});
}
}
private async Task CreateApplicationsAsync()
{
var commonScopes = new List<string> {
OpenIddictConstants.Permissions.Scopes.Address,
OpenIddictConstants.Permissions.Scopes.Email,
OpenIddictConstants.Permissions.Scopes.Phone,
OpenIddictConstants.Permissions.Scopes.Profile,
OpenIddictConstants.Permissions.Scopes.Roles,
"Wms"
};
var configurationSection = _configuration.GetSection("OpenIddict:Applications");
//Web Client
var webClientId = configurationSection["Wms_Web:ClientId"];
if (!webClientId.IsNullOrWhiteSpace())
{
var webClientRootUrl = configurationSection["Wms_Web:RootUrl"].EnsureEndsWith('/');
/* Wms_Web client is only needed if you created a tiered
* solution. Otherwise, you can delete this client. */
await CreateApplicationAsync(
name: webClientId!,
type: OpenIddictConstants.ClientTypes.Confidential,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Web Application",
secret: configurationSection["Wms_Web:ClientSecret"] ?? "1q2w3e*",
grantTypes: new List<string> //Hybrid flow
{
OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.Implicit
},
scopes: commonScopes,
redirectUri: $"{webClientRootUrl}signin-oidc",
clientUri: webClientRootUrl,
postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc"
);
}
//Console Test / Angular Client
var consoleAndAngularClientId = configurationSection["Wms_App:ClientId"];
if (!consoleAndAngularClientId.IsNullOrWhiteSpace())
{
var consoleAndAngularClientRootUrl = configurationSection["Wms_App:RootUrl"]?.TrimEnd('/');
await CreateApplicationAsync(
name: consoleAndAngularClientId!,
type: OpenIddictConstants.ClientTypes.Public,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Console Test / Angular Application",
secret: null,
grantTypes: new List<string> {
OpenIddictConstants.GrantTypes.AuthorizationCode,
OpenIddictConstants.GrantTypes.Password,
OpenIddictConstants.GrantTypes.ClientCredentials,
OpenIddictConstants.GrantTypes.RefreshToken
},
scopes: commonScopes,
redirectUri: consoleAndAngularClientRootUrl,
clientUri: consoleAndAngularClientRootUrl,
postLogoutRedirectUri: consoleAndAngularClientRootUrl
);
}
// Blazor Client
var blazorClientId = configurationSection["Wms_Blazor:ClientId"];
if (!blazorClientId.IsNullOrWhiteSpace())
{
var blazorRootUrl = configurationSection["Wms_Blazor:RootUrl"]?.TrimEnd('/');
await CreateApplicationAsync(
name: blazorClientId!,
type: OpenIddictConstants.ClientTypes.Public,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Blazor Application",
secret: null,
grantTypes: new List<string> { OpenIddictConstants.GrantTypes.AuthorizationCode, },
scopes: commonScopes,
redirectUri: $"{blazorRootUrl}/authentication/login-callback",
clientUri: blazorRootUrl,
postLogoutRedirectUri: $"{blazorRootUrl}/authentication/logout-callback"
);
}
// Blazor Server Tiered Client
var blazorServerTieredClientId = configurationSection["Wms_BlazorServerTiered:ClientId"];
if (!blazorServerTieredClientId.IsNullOrWhiteSpace())
private readonly IConfiguration _configuration;
private readonly IOpenIddictApplicationRepository _openIddictApplicationRepository;
private readonly IAbpApplicationManager _applicationManager;
private readonly IOpenIddictScopeRepository _openIddictScopeRepository;
private readonly IOpenIddictScopeManager _scopeManager;
private readonly IPermissionDataSeeder _permissionDataSeeder;
private readonly IStringLocalizer<OpenIddictResponse> L;
public OpenIddictDataSeedContributor(
IConfiguration configuration,
IOpenIddictApplicationRepository openIddictApplicationRepository,
IAbpApplicationManager applicationManager,
IOpenIddictScopeRepository openIddictScopeRepository,
IOpenIddictScopeManager scopeManager,
IPermissionDataSeeder permissionDataSeeder,
IStringLocalizer<OpenIddictResponse> l )
{
var blazorServerTieredRootUrl =
configurationSection["Wms_BlazorServerTiered:RootUrl"].EnsureEndsWith('/');
await CreateApplicationAsync(
name: blazorServerTieredClientId!,
type: OpenIddictConstants.ClientTypes.Confidential,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Blazor Server Application",
secret: configurationSection["Wms_BlazorServerTiered:ClientSecret"] ?? "1q2w3e*",
grantTypes: new List<string> //Hybrid flow
{
OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.Implicit
},
scopes: commonScopes,
redirectUri: $"{blazorServerTieredRootUrl}signin-oidc",
clientUri: blazorServerTieredRootUrl,
postLogoutRedirectUri: $"{blazorServerTieredRootUrl}signout-callback-oidc"
);
_configuration = configuration;
_openIddictApplicationRepository = openIddictApplicationRepository;
_applicationManager = applicationManager;
_openIddictScopeRepository = openIddictScopeRepository;
_scopeManager = scopeManager;
_permissionDataSeeder = permissionDataSeeder;
L = l;
}
// Swagger Client
var swaggerClientId = configurationSection["Wms_Swagger:ClientId"];
if (!swaggerClientId.IsNullOrWhiteSpace())
{
var swaggerRootUrl = configurationSection["Wms_Swagger:RootUrl"]?.TrimEnd('/');
await CreateApplicationAsync(
name: swaggerClientId!,
type: OpenIddictConstants.ClientTypes.Public,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Swagger Application",
secret: null,
grantTypes: new List<string> { OpenIddictConstants.GrantTypes.AuthorizationCode, },
scopes: commonScopes,
redirectUri: $"{swaggerRootUrl}/swagger/oauth2-redirect.html",
clientUri: swaggerRootUrl
);
}
}
private async Task CreateApplicationAsync(
[NotNull] string name,
[NotNull] string type,
[NotNull] string consentType,
string displayName,
string? secret,
List<string> grantTypes,
List<string> scopes,
string? clientUri = null,
string? redirectUri = null,
string? postLogoutRedirectUri = null,
List<string>? permissions = null)
{
if (!string.IsNullOrEmpty(secret) && string.Equals(type, OpenIddictConstants.ClientTypes.Public,
StringComparison.OrdinalIgnoreCase))
[UnitOfWork]
public virtual async Task SeedAsync(DataSeedContext context)
{
throw new BusinessException(L["NoClientSecretCanBeSetForPublicApplications"]);
await CreateScopesAsync();
await CreateApplicationsAsync();
}
if (string.IsNullOrEmpty(secret) && string.Equals(type, OpenIddictConstants.ClientTypes.Confidential,
StringComparison.OrdinalIgnoreCase))
private async Task CreateScopesAsync()
{
throw new BusinessException(L["TheClientSecretIsRequiredForConfidentialApplications"]);
}
var client = await _openIddictApplicationRepository.FindByClientIdAsync(name);
var application = new AbpApplicationDescriptor {
ClientId = name,
Type = type,
ClientSecret = secret,
ConsentType = consentType,
DisplayName = displayName,
ClientUri = clientUri,
};
Check.NotNullOrEmpty(grantTypes, nameof(grantTypes));
Check.NotNullOrEmpty(scopes, nameof(scopes));
if (new[] { OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.Implicit }.All(
grantTypes.Contains))
{
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeIdToken);
if (string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase))
if (await _openIddictScopeRepository.FindByNameAsync("Wms") == null)
{
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeIdTokenToken);
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeToken);
await _scopeManager.CreateAsync(new OpenIddictScopeDescriptor {
Name = "Wms", DisplayName = "Wms API", Resources = { "Wms" }
});
}
}
if (!redirectUri.IsNullOrWhiteSpace() || !postLogoutRedirectUri.IsNullOrWhiteSpace())
private async Task CreateApplicationsAsync()
{
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Logout);
}
var buildInGrantTypes = new[] {
OpenIddictConstants.GrantTypes.Implicit, OpenIddictConstants.GrantTypes.Password,
OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.ClientCredentials,
OpenIddictConstants.GrantTypes.DeviceCode, OpenIddictConstants.GrantTypes.RefreshToken
};
foreach (var grantType in grantTypes)
{
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode)
var commonScopes = new List<string> {
OpenIddictConstants.Permissions.Scopes.Address,
OpenIddictConstants.Permissions.Scopes.Email,
OpenIddictConstants.Permissions.Scopes.Phone,
OpenIddictConstants.Permissions.Scopes.Profile,
OpenIddictConstants.Permissions.Scopes.Roles,
"Wms"
};
var configurationSection = _configuration.GetSection("OpenIddict:Applications");
//Web Client
var webClientId = configurationSection["Wms_Web:ClientId"];
if (!webClientId.IsNullOrWhiteSpace())
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.AuthorizationCode);
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.Code);
var webClientRootUrl = configurationSection["Wms_Web:RootUrl"].EnsureEndsWith('/');
/* Wms_Web client is only needed if you created a tiered
* solution. Otherwise, you can delete this client. */
await CreateApplicationAsync(
name: webClientId!,
type: OpenIddictConstants.ClientTypes.Confidential,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Web Application",
secret: configurationSection["Wms_Web:ClientSecret"] ?? "1q2w3e*",
grantTypes: new List<string> //Hybrid flow
{
OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.Implicit
},
scopes: commonScopes,
redirectUri: $"{webClientRootUrl}signin-oidc",
clientUri: webClientRootUrl,
postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc"
);
}
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode ||
grantType == OpenIddictConstants.GrantTypes.Implicit)
//Console Test / Angular Client
var consoleAndAngularClientId = configurationSection["Wms_App:ClientId"];
if (!consoleAndAngularClientId.IsNullOrWhiteSpace())
{
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Authorization);
var consoleAndAngularClientRootUrl = configurationSection["Wms_App:RootUrl"]?.TrimEnd('/');
await CreateApplicationAsync(
name: consoleAndAngularClientId!,
type: OpenIddictConstants.ClientTypes.Public,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Console Test / Angular Application",
secret: null,
grantTypes: new List<string> {
OpenIddictConstants.GrantTypes.AuthorizationCode,
OpenIddictConstants.GrantTypes.Password,
OpenIddictConstants.GrantTypes.ClientCredentials,
OpenIddictConstants.GrantTypes.RefreshToken
},
scopes: commonScopes,
redirectUri: consoleAndAngularClientRootUrl,
clientUri: consoleAndAngularClientRootUrl,
postLogoutRedirectUri: consoleAndAngularClientRootUrl
);
}
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode ||
grantType == OpenIddictConstants.GrantTypes.ClientCredentials ||
grantType == OpenIddictConstants.GrantTypes.Password ||
grantType == OpenIddictConstants.GrantTypes.RefreshToken ||
grantType == OpenIddictConstants.GrantTypes.DeviceCode)
// Blazor Client
var blazorClientId = configurationSection["Wms_Blazor:ClientId"];
if (!blazorClientId.IsNullOrWhiteSpace())
{
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Token);
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Revocation);
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Introspection);
var blazorRootUrl = configurationSection["Wms_Blazor:RootUrl"]?.TrimEnd('/');
await CreateApplicationAsync(
name: blazorClientId!,
type: OpenIddictConstants.ClientTypes.Public,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Blazor Application",
secret: null,
grantTypes: new List<string> { OpenIddictConstants.GrantTypes.AuthorizationCode, },
scopes: commonScopes,
redirectUri: $"{blazorRootUrl}/authentication/login-callback",
clientUri: blazorRootUrl,
postLogoutRedirectUri: $"{blazorRootUrl}/authentication/logout-callback"
);
}
if (grantType == OpenIddictConstants.GrantTypes.ClientCredentials)
// Blazor Server Tiered Client
var blazorServerTieredClientId = configurationSection["Wms_BlazorServerTiered:ClientId"];
if (!blazorServerTieredClientId.IsNullOrWhiteSpace())
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.ClientCredentials);
var blazorServerTieredRootUrl =
configurationSection["Wms_BlazorServerTiered:RootUrl"].EnsureEndsWith('/');
await CreateApplicationAsync(
name: blazorServerTieredClientId!,
type: OpenIddictConstants.ClientTypes.Confidential,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Blazor Server Application",
secret: configurationSection["Wms_BlazorServerTiered:ClientSecret"] ?? "1q2w3e*",
grantTypes: new List<string> //Hybrid flow
{
OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.Implicit
},
scopes: commonScopes,
redirectUri: $"{blazorServerTieredRootUrl}signin-oidc",
clientUri: blazorServerTieredRootUrl,
postLogoutRedirectUri: $"{blazorServerTieredRootUrl}signout-callback-oidc"
);
}
if (grantType == OpenIddictConstants.GrantTypes.Implicit)
// Swagger Client
var swaggerClientId = configurationSection["Wms_Swagger:ClientId"];
if (!swaggerClientId.IsNullOrWhiteSpace())
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.Implicit);
var swaggerRootUrl = configurationSection["Wms_Swagger:RootUrl"]?.TrimEnd('/');
await CreateApplicationAsync(
name: swaggerClientId!,
type: OpenIddictConstants.ClientTypes.Public,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Swagger Application",
secret: null,
grantTypes: new List<string> { OpenIddictConstants.GrantTypes.AuthorizationCode, },
scopes: commonScopes,
redirectUri: $"{swaggerRootUrl}/swagger/oauth2-redirect.html",
clientUri: swaggerRootUrl
);
}
}
if (grantType == OpenIddictConstants.GrantTypes.Password)
private async Task CreateApplicationAsync(
[NotNull] string name,
[NotNull] string type,
[NotNull] string consentType,
string displayName,
string? secret,
List<string> grantTypes,
List<string> scopes,
string? clientUri = null,
string? redirectUri = null,
string? postLogoutRedirectUri = null,
List<string>? permissions = null)
{
if (!string.IsNullOrEmpty(secret) && string.Equals(type, OpenIddictConstants.ClientTypes.Public,
StringComparison.OrdinalIgnoreCase))
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.Password);
throw new BusinessException(L["NoClientSecretCanBeSetForPublicApplications"]);
}
if (grantType == OpenIddictConstants.GrantTypes.RefreshToken)
if (string.IsNullOrEmpty(secret) && string.Equals(type, OpenIddictConstants.ClientTypes.Confidential,
StringComparison.OrdinalIgnoreCase))
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.RefreshToken);
throw new BusinessException(L["TheClientSecretIsRequiredForConfidentialApplications"]);
}
if (grantType == OpenIddictConstants.GrantTypes.DeviceCode)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.DeviceCode);
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Device);
}
var client = await _openIddictApplicationRepository.FindByClientIdAsync(name);
var application = new AbpApplicationDescriptor {
ClientId = name,
Type = type,
ClientSecret = secret,
ConsentType = consentType,
DisplayName = displayName,
ClientUri = clientUri,
};
if (grantType == OpenIddictConstants.GrantTypes.Implicit)
Check.NotNullOrEmpty(grantTypes, nameof(grantTypes));
Check.NotNullOrEmpty(scopes, nameof(scopes));
if (new[] { OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.Implicit }.All(
grantTypes.Contains))
{
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.IdToken);
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeIdToken);
if (string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase))
{
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.IdTokenToken);
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.Token);
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeIdTokenToken);
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeToken);
}
}
if (!buildInGrantTypes.Contains(grantType))
if (!redirectUri.IsNullOrWhiteSpace() || !postLogoutRedirectUri.IsNullOrWhiteSpace())
{
application.Permissions.Add(OpenIddictConstants.Permissions.Prefixes.GrantType + grantType);
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Logout);
}
}
var buildInScopes = new[] {
OpenIddictConstants.Permissions.Scopes.Address, OpenIddictConstants.Permissions.Scopes.Email,
OpenIddictConstants.Permissions.Scopes.Phone, OpenIddictConstants.Permissions.Scopes.Profile,
OpenIddictConstants.Permissions.Scopes.Roles
};
var buildInGrantTypes = new[] {
OpenIddictConstants.GrantTypes.Implicit, OpenIddictConstants.GrantTypes.Password,
OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.ClientCredentials,
OpenIddictConstants.GrantTypes.DeviceCode, OpenIddictConstants.GrantTypes.RefreshToken
};
foreach (var scope in scopes)
{
if (buildInScopes.Contains(scope))
foreach (var grantType in grantTypes)
{
application.Permissions.Add(scope);
}
else
{
application.Permissions.Add(OpenIddictConstants.Permissions.Prefixes.Scope + scope);
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.AuthorizationCode);
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.Code);
}
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode ||
grantType == OpenIddictConstants.GrantTypes.Implicit)
{
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Authorization);
}
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode ||
grantType == OpenIddictConstants.GrantTypes.ClientCredentials ||
grantType == OpenIddictConstants.GrantTypes.Password ||
grantType == OpenIddictConstants.GrantTypes.RefreshToken ||
grantType == OpenIddictConstants.GrantTypes.DeviceCode)
{
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Token);
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Revocation);
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Introspection);
}
if (grantType == OpenIddictConstants.GrantTypes.ClientCredentials)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.ClientCredentials);
}
if (grantType == OpenIddictConstants.GrantTypes.Implicit)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.Implicit);
}
if (grantType == OpenIddictConstants.GrantTypes.Password)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.Password);
}
if (grantType == OpenIddictConstants.GrantTypes.RefreshToken)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.RefreshToken);
}
if (grantType == OpenIddictConstants.GrantTypes.DeviceCode)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.DeviceCode);
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Device);
}
if (grantType == OpenIddictConstants.GrantTypes.Implicit)
{
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.IdToken);
if (string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase))
{
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.IdTokenToken);
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.Token);
}
}
if (!buildInGrantTypes.Contains(grantType))
{
application.Permissions.Add(OpenIddictConstants.Permissions.Prefixes.GrantType + grantType);
}
}
}
if (redirectUri != null)
{
if (!redirectUri.IsNullOrEmpty())
var buildInScopes = new[] {
OpenIddictConstants.Permissions.Scopes.Address, OpenIddictConstants.Permissions.Scopes.Email,
OpenIddictConstants.Permissions.Scopes.Phone, OpenIddictConstants.Permissions.Scopes.Profile,
OpenIddictConstants.Permissions.Scopes.Roles
};
foreach (var scope in scopes)
{
if (!Uri.TryCreate(redirectUri, UriKind.Absolute, out var uri) || !uri.IsWellFormedOriginalString())
if (buildInScopes.Contains(scope))
{
throw new BusinessException(L["InvalidRedirectUri", redirectUri]);
application.Permissions.Add(scope);
}
if (application.RedirectUris.All(x => x != uri))
else
{
application.RedirectUris.Add(uri);
application.Permissions.Add(OpenIddictConstants.Permissions.Prefixes.Scope + scope);
}
}
}
if (postLogoutRedirectUri != null)
{
if (!postLogoutRedirectUri.IsNullOrEmpty())
if (redirectUri != null)
{
if (!Uri.TryCreate(postLogoutRedirectUri, UriKind.Absolute, out var uri) ||
!uri.IsWellFormedOriginalString())
if (!redirectUri.IsNullOrEmpty())
{
throw new BusinessException(L["InvalidPostLogoutRedirectUri", postLogoutRedirectUri]);
if (!Uri.TryCreate(redirectUri, UriKind.Absolute, out var uri) || !uri.IsWellFormedOriginalString())
{
throw new BusinessException(L["InvalidRedirectUri", redirectUri]);
}
if (application.RedirectUris.All(x => x != uri))
{
application.RedirectUris.Add(uri);
}
}
}
if (application.PostLogoutRedirectUris.All(x => x != uri))
if (postLogoutRedirectUri != null)
{
if (!postLogoutRedirectUri.IsNullOrEmpty())
{
application.PostLogoutRedirectUris.Add(uri);
if (!Uri.TryCreate(postLogoutRedirectUri, UriKind.Absolute, out var uri) ||
!uri.IsWellFormedOriginalString())
{
throw new BusinessException(L["InvalidPostLogoutRedirectUri", postLogoutRedirectUri]);
}
if (application.PostLogoutRedirectUris.All(x => x != uri))
{
application.PostLogoutRedirectUris.Add(uri);
}
}
}
}
if (permissions != null)
{
await _permissionDataSeeder.SeedAsync(
ClientPermissionValueProvider.ProviderName,
name,
permissions,
null
);
}
if (permissions != null)
{
await _permissionDataSeeder.SeedAsync(
ClientPermissionValueProvider.ProviderName,
name,
permissions,
null
);
}
if (client == null)
{
await _applicationManager.CreateAsync(application);
return;
}
if (client == null)
{
await _applicationManager.CreateAsync(application);
return;
}
if (!HasSameRedirectUris(client, application))
{
client.RedirectUris = JsonSerializer.Serialize(application.RedirectUris.Select(q => q.ToString().TrimEnd('/')));
client.PostLogoutRedirectUris = JsonSerializer.Serialize(application.PostLogoutRedirectUris.Select(q => q.ToString().TrimEnd('/')));
if (!HasSameRedirectUris(client, application))
{
client.RedirectUris = JsonSerializer.Serialize(application.RedirectUris.Select(q => q.ToString().TrimEnd('/')));
client.PostLogoutRedirectUris = JsonSerializer.Serialize(application.PostLogoutRedirectUris.Select(q => q.ToString().TrimEnd('/')));
await _applicationManager.UpdateAsync(client.ToModel());
}
await _applicationManager.UpdateAsync(client.ToModel());
if (!HasSameScopes(client, application))
{
client.Permissions = JsonSerializer.Serialize(application.Permissions.Select(q => q.ToString()));
await _applicationManager.UpdateAsync(client.ToModel());
}
}
if (!HasSameScopes(client, application))
private bool HasSameRedirectUris(OpenIddictApplication existingClient, AbpApplicationDescriptor application)
{
client.Permissions = JsonSerializer.Serialize(application.Permissions.Select(q => q.ToString()));
await _applicationManager.UpdateAsync(client.ToModel());
return existingClient.RedirectUris == JsonSerializer.Serialize(application.RedirectUris.Select(q => q.ToString().TrimEnd('/')));
}
}
private bool HasSameRedirectUris(OpenIddictApplication existingClient, AbpApplicationDescriptor application)
{
return existingClient.RedirectUris == JsonSerializer.Serialize(application.RedirectUris.Select(q => q.ToString().TrimEnd('/')));
}
private bool HasSameScopes(OpenIddictApplication existingClient, AbpApplicationDescriptor application)
{
return existingClient.Permissions == JsonSerializer.Serialize(application.Permissions.Select(q => q.ToString().TrimEnd('/')));
private bool HasSameScopes(OpenIddictApplication existingClient, AbpApplicationDescriptor application)
{
return existingClient.Permissions == JsonSerializer.Serialize(application.Permissions.Select(q => q.ToString().TrimEnd('/')));
}
}
}

13
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Settings/WmsSettingDefinitionProvider.cs

@ -1,12 +1,13 @@
using Volo.Abp.Settings;
namespace WinIn.FasterZ.Wms.Settings;
public class WmsSettingDefinitionProvider : SettingDefinitionProvider
namespace WinIn.FasterZ.Wms.Settings
{
public override void Define(ISettingDefinitionContext context)
public class WmsSettingDefinitionProvider : SettingDefinitionProvider
{
//Define your own settings here. Example:
//context.Add(new SettingDefinition(WmsSettings.MySetting1));
public override void Define(ISettingDefinitionContext context)
{
//Define your own settings here. Example:
//context.Add(new SettingDefinition(WmsSettings.MySetting1));
}
}
}

11
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/WmsConsts.cs

@ -1,8 +1,9 @@
namespace WinIn.FasterZ.Wms;
public static class WmsConsts
namespace WinIn.FasterZ.Wms
{
public const string DbTablePrefix = null;
public static class WmsConsts
{
public const string DbTablePrefix = null;
public const string DbSchema = null;
public const string DbSchema = null;
}
}

85
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/WmsDomainModule.cs

@ -15,54 +15,55 @@ using Volo.Abp.PermissionManagement.OpenIddict;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
namespace WinIn.FasterZ.Wms;
[DependsOn(
typeof(WmsDomainSharedModule),
typeof(AbpAuditLoggingDomainModule),
typeof(AbpBackgroundJobsDomainModule),
typeof(AbpFeatureManagementDomainModule),
typeof(AbpIdentityDomainModule),
typeof(AbpOpenIddictDomainModule),
typeof(AbpPermissionManagementDomainOpenIddictModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpSettingManagementDomainModule),
typeof(AbpTenantManagementDomainModule),
typeof(AbpEmailingModule)
)]
public class WmsDomainModule : AbpModule
namespace WinIn.FasterZ.Wms
{
public override void ConfigureServices(ServiceConfigurationContext context)
[DependsOn(
typeof(WmsDomainSharedModule),
typeof(AbpAuditLoggingDomainModule),
typeof(AbpBackgroundJobsDomainModule),
typeof(AbpFeatureManagementDomainModule),
typeof(AbpIdentityDomainModule),
typeof(AbpOpenIddictDomainModule),
typeof(AbpPermissionManagementDomainOpenIddictModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpSettingManagementDomainModule),
typeof(AbpTenantManagementDomainModule),
typeof(AbpEmailingModule)
)]
public class WmsDomainModule : AbpModule
{
Configure<AbpLocalizationOptions>(options =>
public override void ConfigureServices(ServiceConfigurationContext context)
{
options.Languages.Add(new LanguageInfo("ar", "ar", "العربية", "ae"));
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
options.Languages.Add(new LanguageInfo("en", "en", "English", "gb"));
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
options.Languages.Add(new LanguageInfo("hr", "hr", "Croatian"));
options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish", "fi"));
options.Languages.Add(new LanguageInfo("fr", "fr", "Français", "fr"));
options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi", "in"));
options.Languages.Add(new LanguageInfo("it", "it", "Italiano", "it"));
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
options.Languages.Add(new LanguageInfo("ru", "ru", "Русский", "ru"));
options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak", "sk"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe", "tr"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch", "de"));
options.Languages.Add(new LanguageInfo("es", "es", "Español"));
});
Configure<AbpLocalizationOptions>(options =>
{
options.Languages.Add(new LanguageInfo("ar", "ar", "العربية", "ae"));
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
options.Languages.Add(new LanguageInfo("en", "en", "English", "gb"));
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
options.Languages.Add(new LanguageInfo("hr", "hr", "Croatian"));
options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish", "fi"));
options.Languages.Add(new LanguageInfo("fr", "fr", "Français", "fr"));
options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi", "in"));
options.Languages.Add(new LanguageInfo("it", "it", "Italiano", "it"));
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
options.Languages.Add(new LanguageInfo("ru", "ru", "Русский", "ru"));
options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak", "sk"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe", "tr"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch", "de"));
options.Languages.Add(new LanguageInfo("es", "es", "Español"));
});
Configure<AbpMultiTenancyOptions>(options =>
{
options.IsEnabled = MultiTenancyConsts.IsEnabled;
});
Configure<AbpMultiTenancyOptions>(options =>
{
options.IsEnabled = MultiTenancyConsts.IsEnabled;
});
#if DEBUG
context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>());
context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>());
#endif
}
}
}

23
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/AuthDepartment/AuthDepartment.cs

@ -1,18 +1,19 @@
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class AuthDepartment : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class AuthDepartment : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public bool? IsActive { get; set; }
public bool? IsActive { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

13
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/AuthDepartment/IAuthDepartmentRepository.cs

@ -1,9 +1,10 @@
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment
{
using System;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Repositories;
public interface IAuthDepartmentRepository : IRepository<AuthDepartment, Guid>
{
public interface IAuthDepartmentRepository : IRepository<AuthDepartment, Guid>
{
}
}

43
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/AuthMenu/AuthMenu.cs

@ -1,38 +1,39 @@
namespace WinIn.FasterZ.Wms.Z_Business.AuthMenu;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.AuthMenu
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class AuthMenu : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class AuthMenu : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Component { get; set; }
public string? Component { get; set; }
public string? CountUrl { get; set; }
public string? CountUrl { get; set; }
public string? Description { get; set; }
public string? Description { get; set; }
public string? GroupName { get; set; }
public string? GroupName { get; set; }
public int GroupSort { get; set; }
public int GroupSort { get; set; }
public string? Icon { get; set; }
public string? Icon { get; set; }
public string Name { get; set; } = null!;
public string Name { get; set; } = null!;
public string? ParentCode { get; set; }
public string? ParentCode { get; set; }
public string? Permission { get; set; }
public string? Permission { get; set; }
public string Portal { get; set; } = null!;
public string Portal { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
public string? Route { get; set; }
public string? Route { get; set; }
public int Sort { get; set; }
public int Sort { get; set; }
public string Status { get; set; } = null!;
public string Status { get; set; } = null!;
}
}

19
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/AuthUserMenu/AuthUserMenu.cs

@ -1,14 +1,15 @@
namespace WinIn.FasterZ.Wms.Z_Business.AuthUserMenu;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.AuthUserMenu
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class AuthUserMenu : AuditedAggregateRoot<Guid>
{
public string MenuCode { get; set; } = null!;
public class AuthUserMenu : AuditedAggregateRoot<Guid>
{
public string MenuCode { get; set; } = null!;
public string Portal { get; set; } = null!;
public string Portal { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

17
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/AuthUserWorkGroup/AuthUserWorkGroup.cs

@ -1,12 +1,13 @@
namespace WinIn.FasterZ.Wms.Z_Business.AuthUserWorkGroup;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.AuthUserWorkGroup
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class AuthUserWorkGroup : AuditedAggregateRoot<Guid>
{
public string? Remark { get; set; }
public class AuthUserWorkGroup : AuditedAggregateRoot<Guid>
{
public string? Remark { get; set; }
public string WorkGroupCode { get; set; } = null!;
public string WorkGroupCode { get; set; } = null!;
}
}

31
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataAql/BasedataAql.cs

@ -1,26 +1,27 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataAql;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataAql
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataAql : AuditedAggregateRoot<Guid>
{
public string? AbcClass { get; set; }
public class BasedataAql : AuditedAggregateRoot<Guid>
{
public string? AbcClass { get; set; }
public decimal CeilingQty { get; set; }
public decimal CeilingQty { get; set; }
public decimal FloorQty { get; set; }
public decimal FloorQty { get; set; }
public bool IsUsePercent { get; set; }
public bool IsUsePercent { get; set; }
public string ItemCode { get; set; } = null!;
public string ItemCode { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
public decimal SamplePercent { get; set; }
public decimal SamplePercent { get; set; }
public decimal SampleQty { get; set; }
public decimal SampleQty { get; set; }
public string SupplierCode { get; set; } = null!;
public string SupplierCode { get; set; } = null!;
}
}

27
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataArea/BasedataArea.cs

@ -1,22 +1,23 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataArea;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataArea
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataArea : AuditedAggregateRoot<Guid>
{
public string AreaType { get; set; } = null!;
public class BasedataArea : AuditedAggregateRoot<Guid>
{
public string AreaType { get; set; } = null!;
public string Code { get; set; } = null!;
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public bool IsFunctional { get; set; }
public bool IsFunctional { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string WarehouseCode { get; set; } = null!;
public string WarehouseCode { get; set; } = null!;
}
}

39
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataBom/BasedataBom.cs

@ -1,34 +1,35 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataBom;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataBom
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataBom : AuditedAggregateRoot<Guid>
{
public DateTime? BeginTime { get; set; }
public class BasedataBom : AuditedAggregateRoot<Guid>
{
public DateTime? BeginTime { get; set; }
public string Component { get; set; } = null!;
public string Component { get; set; } = null!;
public decimal ComponentQty { get; set; }
public decimal ComponentQty { get; set; }
public string? ComponentUom { get; set; }
public string? ComponentUom { get; set; }
public string DistributionType { get; set; } = null!;
public string DistributionType { get; set; } = null!;
public DateTime? EndTime { get; set; }
public DateTime? EndTime { get; set; }
public string? Erpop { get; set; }
public string? Erpop { get; set; }
public int Layer { get; set; }
public int Layer { get; set; }
public string? Mfgop { get; set; }
public string? Mfgop { get; set; }
public string PlannedSplitRule { get; set; } = null!;
public string PlannedSplitRule { get; set; } = null!;
public string Product { get; set; } = null!;
public string Product { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
public string TruncType { get; set; } = null!;
public string TruncType { get; set; } = null!;
}
}

23
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCalendar/BasedataCalendar.cs

@ -1,18 +1,19 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCalendar;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCalendar
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataCalendar : AuditedAggregateRoot<Guid>
{
public DateTime? BeginTime { get; set; }
public class BasedataCalendar : AuditedAggregateRoot<Guid>
{
public DateTime? BeginTime { get; set; }
public DateTime? EndTime { get; set; }
public DateTime? EndTime { get; set; }
public string? Module { get; set; }
public string? Module { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string Status { get; set; } = null!;
public string Status { get; set; } = null!;
}
}

21
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCategory/BasedataCategory.cs

@ -1,16 +1,17 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCategory;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCategory
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataCategory : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataCategory : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

23
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCurrency/BasedataCurrency.cs

@ -1,18 +1,19 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCurrency;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCurrency
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataCurrency : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataCurrency : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public bool IsBasicCurrency { get; set; }
public bool IsBasicCurrency { get; set; }
public string Name { get; set; } = null!;
public string Name { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

25
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCurrencyExchange/BasedataCurrencyExchange.cs

@ -1,20 +1,21 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCurrencyExchange;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCurrencyExchange
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataCurrencyExchange : AuditedAggregateRoot<Guid>
{
public Guid BasicCurrencyId { get; set; }
public class BasedataCurrencyExchange : AuditedAggregateRoot<Guid>
{
public Guid BasicCurrencyId { get; set; }
public Guid CurrencyId { get; set; }
public Guid CurrencyId { get; set; }
public DateTime EfficetiveTime { get; set; }
public DateTime EfficetiveTime { get; set; }
public DateTime ExpireTime { get; set; }
public DateTime ExpireTime { get; set; }
public decimal Rate { get; set; }
public decimal Rate { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

41
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCustomer/BasedataCustomer.cs

@ -1,36 +1,37 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomer;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomer
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataCustomer : AuditedAggregateRoot<Guid>
{
public string? Address { get; set; }
public class BasedataCustomer : AuditedAggregateRoot<Guid>
{
public string? Address { get; set; }
public string? City { get; set; }
public string? City { get; set; }
public string Code { get; set; } = null!;
public string Code { get; set; } = null!;
public string? Contacts { get; set; }
public string? Contacts { get; set; }
public string? Country { get; set; }
public string? Country { get; set; }
public string? Currency { get; set; }
public string? Currency { get; set; }
public string? Fax { get; set; }
public string? Fax { get; set; }
public bool IsActive { get; set; }
public bool IsActive { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Phone { get; set; }
public string? Phone { get; set; }
public string? PostId { get; set; }
public string? PostId { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string? ShortName { get; set; }
public string? ShortName { get; set; }
public string Type { get; set; } = null!;
public string Type { get; set; } = null!;
}
}

33
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCustomerAddress/BasedataCustomerAddress.cs

@ -1,28 +1,29 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomerAddress;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomerAddress
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataCustomerAddress : AuditedAggregateRoot<Guid>
{
public string? Address { get; set; }
public class BasedataCustomerAddress : AuditedAggregateRoot<Guid>
{
public string? Address { get; set; }
public string? City { get; set; }
public string? City { get; set; }
public string Code { get; set; } = null!;
public string Code { get; set; } = null!;
public string? Contact { get; set; }
public string? Contact { get; set; }
public string CustomerCode { get; set; } = null!;
public string CustomerCode { get; set; } = null!;
public string? Desc { get; set; }
public string? Desc { get; set; }
public string LocationCode { get; set; } = null!;
public string LocationCode { get; set; } = null!;
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string WarehouseCode { get; set; } = null!;
public string WarehouseCode { get; set; } = null!;
}
}

31
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataCustomerItem/BasedataCustomerItem.cs

@ -1,26 +1,27 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomerItem;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomerItem
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataCustomerItem : AuditedAggregateRoot<Guid>
{
public DateTime? BeginTime { get; set; }
public class BasedataCustomerItem : AuditedAggregateRoot<Guid>
{
public DateTime? BeginTime { get; set; }
public string CustomerCode { get; set; } = null!;
public string CustomerCode { get; set; } = null!;
public string CustomerItemCode { get; set; } = null!;
public string CustomerItemCode { get; set; } = null!;
public decimal CustomerPackQty { get; set; }
public decimal CustomerPackQty { get; set; }
public string? CustomerPackUom { get; set; }
public string? CustomerPackUom { get; set; }
public DateTime? EndTime { get; set; }
public DateTime? EndTime { get; set; }
public string ItemCode { get; set; } = null!;
public string ItemCode { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
public string? Version { get; set; }
public string? Version { get; set; }
}
}

27
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataDict/BasedataDict.cs

@ -1,21 +1,22 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDict;
using System;
using System.Collections.Generic;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDict
{
using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
using WinIn.FasterZ.Wms.Z_Business.BasedataDictItem;
using WinIn.FasterZ.Wms.Z_Business.BasedataDictItem;
public class BasedataDict : AuditedAggregateRoot<Guid>
{
public virtual ICollection<BasedataDictItem> BasedataDictItems { get; set; } = new List<BasedataDictItem>();
public class BasedataDict : AuditedAggregateRoot<Guid>
{
public virtual ICollection<BasedataDictItem> BasedataDictItems { get; set; } = new List<BasedataDictItem>();
public string Code { get; set; } = null!;
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

31
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataDictItem/BasedataDictItem.cs

@ -1,26 +1,27 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDictItem;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDictItem
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
using WinIn.FasterZ.Wms.Z_Business.BasedataDict;
using WinIn.FasterZ.Wms.Z_Business.BasedataDict;
public class BasedataDictItem : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataDictItem : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public bool Enabled { get; set; }
public bool Enabled { get; set; }
public virtual BasedataDict Master { get; set; } = null!;
public virtual BasedataDict Master { get; set; } = null!;
public Guid MasterId { get; set; }
public Guid MasterId { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string? Value { get; set; }
public string? Value { get; set; }
}
}

25
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataDock/BasedataDock.cs

@ -1,20 +1,21 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDock;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDock
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataDock : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataDock : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? DefaultLocationCode { get; set; }
public string? DefaultLocationCode { get; set; }
public string? Description { get; set; }
public string? Description { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string? WarehouseCode { get; set; }
public string? WarehouseCode { get; set; }
}
}

31
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataDocumentSetting/BasedataDocumentSetting.cs

@ -1,26 +1,27 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDocumentSetting;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDocumentSetting
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataDocumentSetting : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataDocumentSetting : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? NumberFormat { get; set; }
public string? NumberFormat { get; set; }
public string? NumberPrefix { get; set; }
public string? NumberPrefix { get; set; }
public string? NumberSeparator { get; set; }
public string? NumberSeparator { get; set; }
public int NumberSerialLength { get; set; }
public int NumberSerialLength { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string? TransactionType { get; set; }
public string? TransactionType { get; set; }
}
}

25
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataErpLocation/BasedataErpLocation.cs

@ -1,20 +1,21 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataErpLocation;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataErpLocation
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataErpLocation : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataErpLocation : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string? Type { get; set; }
public string? Type { get; set; }
public string WarehouseCode { get; set; } = null!;
public string WarehouseCode { get; set; } = null!;
}
}

31
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataInterfaceCalendar/BasedataInterfaceCalendar.cs

@ -1,26 +1,27 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataInterfaceCalendar;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataInterfaceCalendar
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataInterfaceCalendar : AuditedAggregateRoot<Guid>
{
public DateTime BeginTime { get; set; }
public class BasedataInterfaceCalendar : AuditedAggregateRoot<Guid>
{
public DateTime BeginTime { get; set; }
public string Code { get; set; } = null!;
public string Code { get; set; } = null!;
public DateTime ConvertToTime { get; set; }
public DateTime ConvertToTime { get; set; }
public string? Description { get; set; }
public string? Description { get; set; }
public DateTime EndTime { get; set; }
public DateTime EndTime { get; set; }
public string Month { get; set; } = null!;
public string Month { get; set; } = null!;
public string Name { get; set; } = null!;
public string Name { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
public string Year { get; set; } = null!;
public string Year { get; set; } = null!;
}
}

21
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemCategory/BasedataItemCategory.cs

@ -1,16 +1,17 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemCategory;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemCategory
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataItemCategory : AuditedAggregateRoot<Guid>
{
public string CategoryCode { get; set; } = null!;
public class BasedataItemCategory : AuditedAggregateRoot<Guid>
{
public string CategoryCode { get; set; } = null!;
public string ItemCode { get; set; } = null!;
public string ItemCode { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
public string Value { get; set; } = null!;
public string Value { get; set; } = null!;
}
}

27
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemGuideBook/BasedataItemGuideBook.cs

@ -1,22 +1,23 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemGuideBook;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemGuideBook
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataItemGuideBook : AuditedAggregateRoot<Guid>
{
public string? Desc1 { get; set; }
public class BasedataItemGuideBook : AuditedAggregateRoot<Guid>
{
public string? Desc1 { get; set; }
public string? Desc2 { get; set; }
public string? Desc2 { get; set; }
public string ItemCode { get; set; } = null!;
public string ItemCode { get; set; } = null!;
public string? Name { get; set; }
public string? Name { get; set; }
public string? PictureBlobName { get; set; }
public string? PictureBlobName { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string? Step { get; set; }
public string? Step { get; set; }
}
}

27
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemPack/BasedataItemPack.cs

@ -1,22 +1,23 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemPack;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemPack
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataItemPack : AuditedAggregateRoot<Guid>
{
public string? BasicUom { get; set; }
public class BasedataItemPack : AuditedAggregateRoot<Guid>
{
public string? BasicUom { get; set; }
public string ItemCode { get; set; } = null!;
public string ItemCode { get; set; } = null!;
public string PackCode { get; set; } = null!;
public string PackCode { get; set; } = null!;
public string? PackName { get; set; }
public string? PackName { get; set; }
public string? PackType { get; set; }
public string? PackType { get; set; }
public decimal Qty { get; set; }
public decimal Qty { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

25
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemQuality/BasedataItemQuality.cs

@ -1,20 +1,21 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemQuality;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemQuality
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataItemQuality : AuditedAggregateRoot<Guid>
{
public string? Description { get; set; }
public class BasedataItemQuality : AuditedAggregateRoot<Guid>
{
public string? Description { get; set; }
public string InspectType { get; set; } = null!;
public string InspectType { get; set; } = null!;
public string ItemCode { get; set; } = null!;
public string ItemCode { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
public string Status { get; set; } = null!;
public string Status { get; set; } = null!;
public string SupplierCode { get; set; } = null!;
public string SupplierCode { get; set; } = null!;
}
}

35
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemSafetyStock/BasedataItemSafetyStock.cs

@ -1,30 +1,31 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemSafetyStock;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemSafetyStock
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataItemSafetyStock : AuditedAggregateRoot<Guid>
{
public decimal FeedLine { get; set; }
public class BasedataItemSafetyStock : AuditedAggregateRoot<Guid>
{
public decimal FeedLine { get; set; }
public decimal FeedQty { get; set; }
public decimal FeedQty { get; set; }
public string? FeedUm { get; set; }
public string? FeedUm { get; set; }
public string ItemCode { get; set; } = null!;
public string ItemCode { get; set; } = null!;
public decimal MaxStock { get; set; }
public decimal MaxStock { get; set; }
public decimal MinStock { get; set; }
public decimal MinStock { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public decimal SafetyStock { get; set; }
public decimal SafetyStock { get; set; }
public string StoreRelationType { get; set; } = null!;
public string StoreRelationType { get; set; } = null!;
public string? StoreValue { get; set; }
public string? StoreValue { get; set; }
public string WarehouseCode { get; set; } = null!;
public string WarehouseCode { get; set; } = null!;
}
}

39
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataItemStoreRelation/BasedataItemStoreRelation.cs

@ -1,34 +1,35 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemStoreRelation;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemStoreRelation
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataItemStoreRelation : AuditedAggregateRoot<Guid>
{
public string? AltUm { get; set; }
public class BasedataItemStoreRelation : AuditedAggregateRoot<Guid>
{
public string? AltUm { get; set; }
public decimal AltUmQty { get; set; }
public decimal AltUmQty { get; set; }
public bool Enabled { get; set; }
public bool Enabled { get; set; }
public bool IsFixed { get; set; }
public bool IsFixed { get; set; }
public string ItemCode { get; set; } = null!;
public string ItemCode { get; set; } = null!;
public int MultiLoc { get; set; }
public int MultiLoc { get; set; }
public string PramaryUm { get; set; } = null!;
public string PramaryUm { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
public string StoreRelationType { get; set; } = null!;
public string StoreRelationType { get; set; } = null!;
public string? StoreUm { get; set; }
public string? StoreUm { get; set; }
public string? StoreValue { get; set; }
public string? StoreValue { get; set; }
public decimal UmQty { get; set; }
public decimal UmQty { get; set; }
public string WarehouseCode { get; set; } = null!;
public string WarehouseCode { get; set; } = null!;
}
}

77
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataLocation/BasedataLocation.cs

@ -1,72 +1,73 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataLocation;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataLocation
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataLocation : AuditedAggregateRoot<Guid>
{
public string AreaCode { get; set; } = null!;
public class BasedataLocation : AuditedAggregateRoot<Guid>
{
public string AreaCode { get; set; } = null!;
public string Code { get; set; } = null!;
public string Code { get; set; } = null!;
public int ColumnCode { get; set; }
public int ColumnCode { get; set; }
public string DefaultInventoryStatus { get; set; } = null!;
public string DefaultInventoryStatus { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public bool? EnableBreakStore { get; set; }
public bool? EnableBreakStore { get; set; }
public bool? EnableKeepZero { get; set; }
public bool? EnableKeepZero { get; set; }
public bool? EnableMixItem { get; set; }
public bool? EnableMixItem { get; set; }
public bool? EnableMixLot { get; set; }
public bool? EnableMixLot { get; set; }
public bool? EnableMixStatus { get; set; }
public bool? EnableMixStatus { get; set; }
public bool? EnableNegative { get; set; }
public bool? EnableNegative { get; set; }
public bool? EnableOpportunityCount { get; set; }
public bool? EnableOpportunityCount { get; set; }
public bool? EnableOverPick { get; set; }
public bool? EnableOverPick { get; set; }
public bool? EnablePick { get; set; }
public bool? EnablePick { get; set; }
public bool? EnableReceive { get; set; }
public bool? EnableReceive { get; set; }
public bool? EnableReturnFromCustomer { get; set; }
public bool? EnableReturnFromCustomer { get; set; }
public bool? EnableReturnToSupplier { get; set; }
public bool? EnableReturnToSupplier { get; set; }
public bool? EnableShip { get; set; }
public bool? EnableShip { get; set; }
public bool? EnableSplitBox { get; set; }
public bool? EnableSplitBox { get; set; }
public bool? EnableSplitPallet { get; set; }
public bool? EnableSplitPallet { get; set; }
public bool? EnableWholeStore { get; set; }
public bool? EnableWholeStore { get; set; }
public string ErpLocationCode { get; set; } = null!;
public string ErpLocationCode { get; set; } = null!;
public string LocationGroupCode { get; set; } = null!;
public string LocationGroupCode { get; set; } = null!;
public string? Name { get; set; }
public string? Name { get; set; }
public int PickOrder { get; set; }
public int PickOrder { get; set; }
public int PickPriority { get; set; }
public int PickPriority { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public int RowCode { get; set; }
public int RowCode { get; set; }
public string? ShelfCode { get; set; }
public string? ShelfCode { get; set; }
public string Type { get; set; } = null!;
public string Type { get; set; } = null!;
public string WarehouseCode { get; set; } = null!;
public string WarehouseCode { get; set; } = null!;
public string WorkGroupCode { get; set; } = null!;
public string WorkGroupCode { get; set; } = null!;
}
}

65
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataLocationGroup/BasedataLocationGroup.cs

@ -1,60 +1,61 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataLocationGroup;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataLocationGroup
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataLocationGroup : AuditedAggregateRoot<Guid>
{
public string AreaCode { get; set; } = null!;
public class BasedataLocationGroup : AuditedAggregateRoot<Guid>
{
public string AreaCode { get; set; } = null!;
public string Code { get; set; } = null!;
public string Code { get; set; } = null!;
public string DefaultInventoryStatus { get; set; } = null!;
public string DefaultInventoryStatus { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public bool? EnableBreakStore { get; set; }
public bool? EnableBreakStore { get; set; }
public bool? EnableKeepZero { get; set; }
public bool? EnableKeepZero { get; set; }
public bool? EnableMixItem { get; set; }
public bool? EnableMixItem { get; set; }
public bool? EnableMixLot { get; set; }
public bool? EnableMixLot { get; set; }
public bool? EnableMixStatus { get; set; }
public bool? EnableMixStatus { get; set; }
public bool? EnableNegative { get; set; }
public bool? EnableNegative { get; set; }
public bool? EnableOpportunityCount { get; set; }
public bool? EnableOpportunityCount { get; set; }
public bool? EnableOverPick { get; set; }
public bool? EnableOverPick { get; set; }
public bool? EnablePick { get; set; }
public bool? EnablePick { get; set; }
public bool? EnableReceive { get; set; }
public bool? EnableReceive { get; set; }
public bool? EnableReturnFromCustomer { get; set; }
public bool? EnableReturnFromCustomer { get; set; }
public bool? EnableReturnToSupplier { get; set; }
public bool? EnableReturnToSupplier { get; set; }
public bool? EnableShip { get; set; }
public bool? EnableShip { get; set; }
public bool? EnableSplitBox { get; set; }
public bool? EnableSplitBox { get; set; }
public bool? EnableSplitPallet { get; set; }
public bool? EnableSplitPallet { get; set; }
public bool? EnableWholeStore { get; set; }
public bool? EnableWholeStore { get; set; }
public string GroupType { get; set; } = null!;
public string GroupType { get; set; } = null!;
public string? Name { get; set; }
public string? Name { get; set; }
public string? OverflowLocationGroup { get; set; }
public string? OverflowLocationGroup { get; set; }
public int PickPriority { get; set; }
public int PickPriority { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string WarehouseCode { get; set; } = null!;
public string WarehouseCode { get; set; } = null!;
}
}

27
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataMachine/BasedataMachine.cs

@ -1,22 +1,23 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataMachine;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataMachine
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataMachine : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataMachine : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public string Name { get; set; } = null!;
public string Name { get; set; } = null!;
public Guid ProdLineId { get; set; }
public Guid ProdLineId { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string Type { get; set; } = null!;
public string Type { get; set; } = null!;
public Guid WorkStationId { get; set; }
public Guid WorkStationId { get; set; }
}
}

31
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataProductionLine/BasedataProductionLine.cs

@ -1,26 +1,27 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProductionLine;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProductionLine
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataProductionLine : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataProductionLine : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? ProductLocationCode { get; set; }
public string? ProductLocationCode { get; set; }
public string? RawLocationCode { get; set; }
public string? RawLocationCode { get; set; }
public string? RawLocationGroupCode { get; set; }
public string? RawLocationGroupCode { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string Type { get; set; } = null!;
public string Type { get; set; } = null!;
public string? WorkshopCode { get; set; }
public string? WorkshopCode { get; set; }
}
}

19
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataProductionLineItem/BasedataProductionLineItem.cs

@ -1,14 +1,15 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProductionLineItem;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProductionLineItem
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataProductionLineItem : AuditedAggregateRoot<Guid>
{
public string ItemCode { get; set; } = null!;
public class BasedataProductionLineItem : AuditedAggregateRoot<Guid>
{
public string ItemCode { get; set; } = null!;
public string ProdLineCode { get; set; } = null!;
public string ProdLineCode { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

27
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataProject/BasedataProject.cs

@ -1,22 +1,23 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProject;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProject
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataProject : AuditedAggregateRoot<Guid>
{
public DateTime? BeginTime { get; set; }
public class BasedataProject : AuditedAggregateRoot<Guid>
{
public DateTime? BeginTime { get; set; }
public string Code { get; set; } = null!;
public string Code { get; set; } = null!;
public string? CustomerCode { get; set; }
public string? CustomerCode { get; set; }
public string? Description { get; set; }
public string? Description { get; set; }
public DateTime? EndTime { get; set; }
public DateTime? EndTime { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

25
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataPurchasePriceSheet/BasedataPurchasePriceSheet.cs

@ -1,20 +1,21 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataPurchasePriceSheet;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataPurchasePriceSheet
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataPurchasePriceSheet : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataPurchasePriceSheet : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public Guid CurrencyId { get; set; }
public Guid CurrencyId { get; set; }
public string? Description { get; set; }
public string? Description { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public Guid SupplierId { get; set; }
public Guid SupplierId { get; set; }
}
}

25
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataSalePriceSheet/BasedataSalePriceSheet.cs

@ -1,20 +1,21 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSalePriceSheet;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSalePriceSheet
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataSalePriceSheet : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataSalePriceSheet : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public Guid CurrencyId { get; set; }
public Guid CurrencyId { get; set; }
public Guid CustomerId { get; set; }
public Guid CustomerId { get; set; }
public string? Description { get; set; }
public string? Description { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

27
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataShift/BasedataShift.cs

@ -1,22 +1,23 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataShift;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataShift
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataShift : AuditedAggregateRoot<Guid>
{
public DateTime? BeginTime { get; set; }
public class BasedataShift : AuditedAggregateRoot<Guid>
{
public DateTime? BeginTime { get; set; }
public string Code { get; set; } = null!;
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public bool EndAtNextDay { get; set; }
public bool EndAtNextDay { get; set; }
public DateTime? EndTime { get; set; }
public DateTime? EndTime { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

25
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataStdCostPriceSheet/BasedataStdCostPriceSheet.cs

@ -1,20 +1,21 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataStdCostPriceSheet;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataStdCostPriceSheet
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataStdCostPriceSheet : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataStdCostPriceSheet : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public Guid CurrencyId { get; set; }
public Guid CurrencyId { get; set; }
public string? Description { get; set; }
public string? Description { get; set; }
public string Name { get; set; } = null!;
public string Name { get; set; } = null!;
public string? Remark { get; set; }
public string? Remark { get; set; }
public Guid SupplierId { get; set; }
public Guid SupplierId { get; set; }
}
}

45
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataSupplier/BasedataSupplier.cs

@ -1,40 +1,41 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplier;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplier
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataSupplier : AuditedAggregateRoot<Guid>
{
public string? Address { get; set; }
public class BasedataSupplier : AuditedAggregateRoot<Guid>
{
public string? Address { get; set; }
public string? Bank { get; set; }
public string? Bank { get; set; }
public string? City { get; set; }
public string? City { get; set; }
public string Code { get; set; } = null!;
public string Code { get; set; } = null!;
public string? Contacts { get; set; }
public string? Contacts { get; set; }
public string? Country { get; set; }
public string? Country { get; set; }
public string? Currency { get; set; }
public string? Currency { get; set; }
public string? Fax { get; set; }
public string? Fax { get; set; }
public bool? IsActive { get; set; }
public bool? IsActive { get; set; }
public string Name { get; set; } = null!;
public string Name { get; set; } = null!;
public string? Phone { get; set; }
public string? Phone { get; set; }
public string? PostId { get; set; }
public string? PostId { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string? ShortName { get; set; }
public string? ShortName { get; set; }
public decimal TaxRate { get; set; }
public decimal TaxRate { get; set; }
public string Type { get; set; } = null!;
public string Type { get; set; } = null!;
}
}

33
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataSupplierItem/BasedataSupplierItem.cs

@ -1,28 +1,29 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplierItem;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplierItem
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataSupplierItem : AuditedAggregateRoot<Guid>
{
public string ItemCode { get; set; } = null!;
public class BasedataSupplierItem : AuditedAggregateRoot<Guid>
{
public string ItemCode { get; set; } = null!;
public string? ItemName { get; set; }
public string? ItemName { get; set; }
public decimal QtyPerPallet { get; set; }
public decimal QtyPerPallet { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string SupplierCode { get; set; } = null!;
public string SupplierCode { get; set; } = null!;
public string SupplierItemCode { get; set; } = null!;
public string SupplierItemCode { get; set; } = null!;
public decimal SupplierPackQty { get; set; }
public decimal SupplierPackQty { get; set; }
public string? SupplierPackUom { get; set; }
public string? SupplierPackUom { get; set; }
public string? SupplierSimpleName { get; set; }
public string? SupplierSimpleName { get; set; }
public string? Version { get; set; }
public string? Version { get; set; }
}
}

23
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataSupplierTimeWindow/BasedataSupplierTimeWindow.cs

@ -1,18 +1,19 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplierTimeWindow;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplierTimeWindow
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataSupplierTimeWindow : AuditedAggregateRoot<Guid>
{
public string? Remark { get; set; }
public class BasedataSupplierTimeWindow : AuditedAggregateRoot<Guid>
{
public string? Remark { get; set; }
public string SupplierCode { get; set; } = null!;
public string SupplierCode { get; set; } = null!;
public string SupplierName { get; set; } = null!;
public string SupplierName { get; set; } = null!;
public string TimeSlot { get; set; } = null!;
public string TimeSlot { get; set; } = null!;
public string Week { get; set; } = null!;
public string Week { get; set; } = null!;
}
}

23
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataTeam/BasedataTeam.cs

@ -1,18 +1,19 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataTeam;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataTeam
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataTeam : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataTeam : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public string? Members { get; set; }
public string? Members { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

49
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataTransactionType/BasedataTransactionType.cs

@ -1,44 +1,45 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataTransactionType;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataTransactionType
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataTransactionType : AuditedAggregateRoot<Guid>
{
public bool AutoAgreeRequest { get; set; }
public class BasedataTransactionType : AuditedAggregateRoot<Guid>
{
public bool AutoAgreeRequest { get; set; }
public bool AutoCompleteJob { get; set; }
public bool AutoCompleteJob { get; set; }
public bool AutoHandleRequest { get; set; }
public bool AutoHandleRequest { get; set; }
public bool AutoSubmitRequest { get; set; }
public bool AutoSubmitRequest { get; set; }
public string Description { get; set; } = null!;
public string Description { get; set; } = null!;
public bool DirectCreateNote { get; set; }
public bool DirectCreateNote { get; set; }
public bool Enabled { get; set; }
public bool Enabled { get; set; }
public string? InInventoryStatuses { get; set; }
public string? InInventoryStatuses { get; set; }
public string? InLocationAreas { get; set; }
public string? InLocationAreas { get; set; }
public string? InLocationTypes { get; set; }
public string? InLocationTypes { get; set; }
public string? ItemStatuses { get; set; }
public string? ItemStatuses { get; set; }
public string? ItemTypes { get; set; }
public string? ItemTypes { get; set; }
public string? OutInventoryStatuses { get; set; }
public string? OutInventoryStatuses { get; set; }
public string? OutLocationAreas { get; set; }
public string? OutLocationAreas { get; set; }
public string? OutLocationTypes { get; set; }
public string? OutLocationTypes { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string TransSubType { get; set; } = null!;
public string TransSubType { get; set; } = null!;
public string TransType { get; set; } = null!;
public string TransType { get; set; } = null!;
}
}

23
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataUom/BasedataUom.cs

@ -1,18 +1,19 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataUom;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataUom
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataUom : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataUom : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
public string Type { get; set; } = null!;
public string Type { get; set; } = null!;
}
}

21
WinIn.FasterZ.Wms.Be/WinIn.FasterZ.Wms/WinIn.FasterZ.Wms/src/WinIn.FasterZ.Wms.Domain/Z_Business/BasedataWarehouse/BasedataWarehouse.cs

@ -1,16 +1,17 @@
namespace WinIn.FasterZ.Wms.Z_Business.BasedataWarehouse;
using System;
namespace WinIn.FasterZ.Wms.Z_Business.BasedataWarehouse
{
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
public class BasedataWarehouse : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public class BasedataWarehouse : AuditedAggregateRoot<Guid>
{
public string Code { get; set; } = null!;
public string? Description { get; set; }
public string? Description { get; set; }
public string? Name { get; set; }
public string? Name { get; set; }
public string? Remark { get; set; }
public string? Remark { get; set; }
}
}

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

Loading…
Cancel
Save