wanggang 2 years ago
parent
commit
f12599aaad
  1. 1
      .gitignore
  2. 50
      README.md
  3. 3
      be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/EntityDtoBase.cs
  4. 7
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/TokenService.cs
  5. 26
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/UserMenus/UserMenuAppService.cs
  6. 39
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/Users/SfsUserAppService.cs
  7. 17
      be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/Properties/PublishProfiles/FolderProfile1.pubxml
  8. 6
      be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/BasedataHttpApiHostModule.cs
  9. 63
      be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Properties/Resources.Designer.cs
  10. 101
      be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Properties/Resources.resx
  11. 14
      be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Win_in.Sfs.Basedata.HttpApi.Host.csproj
  12. 4
      be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Win_in.Sfs.Core.HttpApi.Host.csproj
  13. 4
      be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Win_in.Sfs.Wms.Store.HttpApi.Host.csproj
  14. 15
      be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql
  15. 2
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Accounts/AccountController.cs
  16. 58
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/TestController.cs
  17. 48
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/PdaHttpApiHostModule.cs
  18. 4
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Win_in.Sfs.Wms.Pda.Host.csproj
  19. 30
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/appsettings.Development.json
  20. 13
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/appsettings.Production.json
  21. 45
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/appsettings.json
  22. 12
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/AQLs/Inputs/AQLImportInput.cs
  23. 9
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Areas/Inputs/AreaImportInput.cs
  24. 3
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/Inputs/BomImportInput.cs
  25. 2
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Calendars/Inputs/CalendarImportInput.cs
  26. 4
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerAddresses/Inputs/CustomerAddressImportInput.cs
  27. 4
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemImportInput.cs
  28. 2
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Customers/Inputs/CustomerImportInput.cs
  29. 10
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Dicts/Inputs/DictImportInput.cs
  30. 13
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Docks/Inputs/DockImportInput.cs
  31. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/DocumentSettings/Inputs/DocumentSettingImportInput.cs
  32. 38
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemBasics/Inputs/ItemBasicImportInput.cs
  33. 6
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemCategories/Inputs/ItemCategoryImportInput.cs
  34. 11
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemPacks/Inputs/ItemPackImportInput.cs
  35. 4
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemQualities/Inputs/ItemQualityImportInput.cs
  36. 9
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemSafetyStocks/Inputs/ItemSafetyStockImportInput.cs
  37. 16
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemStoreRelations/Inputs/ItemStoreRelationImportInput.cs
  38. 125
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/LocationGroups/Inputs/LocationGroupImportInput.cs
  39. 122
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Locations/Inputs/LocationImportInput.cs
  40. 19
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs
  41. 3
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Projects/Inputs/ProjectImportInput.cs
  42. 13
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Shifts/Inputs/ShiftImportInput.cs
  43. 22
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SupplierItems/Inputs/SupplierItemImportInput.cs
  44. 6
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SupplierTimeWindows/Inputs/SupplierTimeWindowImportInput.cs
  45. 3
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Suppliers/Inputs/SupplierImportInput.cs
  46. 8
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Teams/Inputs/TeamImportInput.cs
  47. 5
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/TransactionTypes/Inputs/TransactionTypeImportInput.cs
  48. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Uoms/Inputs/UomImportInput.cs
  49. 18
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/WorkCenters/Inputs/WorkStationImportInput.cs
  50. 11
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/WorkGroups/Inputs/WorkGroupImportInput.cs
  51. 8
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/WorkShops/Inputs/WorkShopImportInput.cs
  52. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/AQLs/AQLAutoMapperProfile.cs
  53. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Areas/AreaAutoMapperProfile.cs
  54. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAutoMapperProfile.cs
  55. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Calendars/CalendarAutoMapperProfile.cs
  56. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Categories/CategoryAutoMapperProfile.cs
  57. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Currencies/CurrencyAutoMapperProfile.cs
  58. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Currencies/CurrencyExchangeAutoMapperProfile.cs
  59. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerAddresses/CustomerAddressAutoMapperProfile.cs
  60. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAutoMapperProfile.cs
  61. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Customers/CustomerAutoMapperProfile.cs
  62. 2
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAutoMapperProfile.cs
  63. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Docks/DockAutoMapperProfile.cs
  64. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ErpLocations/ErpLocationAutoMapperProfile.cs
  65. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemCategories/ItemCategoryAutoMapperProfile.cs
  66. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemGuideBooks/ItemGuideBookAutoMapperProfile.cs
  67. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs
  68. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemQualities/ItemQualityAutoMapperProfile.cs
  69. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemSafetyStocks/ItemSafetyStockAutoMapperProfile.cs
  70. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAutoMapperProfile.cs
  71. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAutoMapperProfile.cs
  72. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/LocationGroups/LocationGroupAutoMapperProfile.cs
  73. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Locations/LocationAutoMapperProfile.cs
  74. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Machines/MachineAutoMapperProfile.cs
  75. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs
  76. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs
  77. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Projects/ProjectAutoMapperProfile.cs
  78. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PurchasePrices/PurchasePriceSheetAutoMapperProfile.cs
  79. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAutoMapperProfile.cs
  80. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Shifts/ShiftAutoMapperProfile.cs
  81. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/StdCostPrices/StdCostPriceSheetAutoMapperProfile.cs
  82. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierItems/SupplierItemAutoMapperProfile.cs
  83. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierTimeWindows/SupplierTimeWindowAutoMapperProfile.cs
  84. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Suppliers/SupplierAutoMapperProfile.cs
  85. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Teams/TeamAutoMapperProfile.cs
  86. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/TransactionTypes/TransactionTypeAutoMapperProfile.cs
  87. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Uoms/UomAutoMapperProfile.cs
  88. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Warehouses/WarehouseAutoMapperProfile.cs
  89. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkCenters/WorkCenterAutoMapperProfile.cs
  90. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkGroups/WorkGroupAutoMapperProfile.cs
  91. 1
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkShops/WorkShopAutoMapperProfile.cs
  92. 3
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Enum/EnumCustomerType.cs
  93. 2
      be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/WorkCenters/WorkCenter.cs
  94. 1
      be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Containers/Inputs/ContainerImportInput.cs
  95. 4
      be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/LocationCapacitys/Inputs/LocationCapacityImportInput.cs
  96. 30
      be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Event/appsettings.json
  97. 2
      be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelEditInput.cs
  98. 1
      be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/LabelDefinitions/Inputs/LabelDefinitionImportInput.cs
  99. 15
      be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs
  100. 10
      be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAutoMapperProfile.cs

1
.gitignore

@ -0,0 +1 @@
**/node_modules/

50
README.md

@ -0,0 +1,50 @@
# 开发和部署方式
## windows x64 下本地开发
当前项目基于 .net 6 sdk,安装 visual studio 2022 时通常会自带
### supervisor 方式开发
1. 根据项目需求,安装 SQL Server 或 MySQL
2. 使用 build/src/win-x64/publish/ 目录下的 dev.start.cmd 和 dev.stop.cmd 管理非数据库依赖
配置文件:
1. supervisor: `build\src\win-x64\publish\supervisord\supervisor.dev.conf`
1. nginx: `build\src\win-x64\publish\nginx\conf\nginx.conf`
1. gateway: `build\src\win-x64\publish\gateway\appsettings.json`
1. config: `build\src\win-x64\publish\gateway\wwwroot\settings\appsettings.json`
1. config: `build\src\win-x64\publish\gateway\wwwroot\settings\appsettings.Development.json`
```mermaid
flowchart LR
nginx --localhost:21093--> gateway--localhost:59092--> api:59092
api:59092 --localhost:6379--> redis:6379
api:59092 --localhost:13319--> database:13319
gateway --localhost:8086--> influxdb:8086
```
### Docker Desktop 方式开发
1. 无需按照数据库
2. 使用 build/src/docker/publish/ 目录下的 dev.start.cmd 和 dev.stop.cmd 管理依赖
## 部署
### windows x64 supervisor 方式部署
1. 执行: `build\src\win-x64\build.cmd`
2. 上传: `build\dist\win-x64\publish` 目录到服务器
3. 修改配置,执行 publish 目录下的 start.cmd
### docker compose 方式部署
1. 还行: `build\src\docker\build.cmd`
2. 上传: `build\dist\win-x64\publish` 目录到服务器
3. 修改配置,执行 publish 目录下的 start.sh 或 start.cmd
构建时的处理:
1. 复制并重命名 build\src\win-x64\publish\nginx\conf 到 build\dist\docker\publish\conf\nginx,保持nginx的配置文件统一在 build\src\win-x64\publish\nginx\conf 目录维护
1. 复制 build\src\win-x64\publish\gateway 到 build\dist\docker\publish\gateway,保持网关的配置和应用的配置统一在 build\src\win-x64\publish\gateway 目录维护

3
be/DataExchange/src/Win_in.Sfs.Wms.DataExchange.Application.Contracts/EntityDtoBase.cs

@ -11,8 +11,7 @@ public class EntityDtoBase : IEntityDto<Guid>, ICanTrace, IHasErrorMessage
[DataMember] [DataMember]
public Guid Id { get; set; } public Guid Id { get; set; }
[DataMember] [DataMember] public DateTime CreationTime { get; set; }
public DateTime CreationTime { get; set; }
[DataMember] [DataMember]
public Guid? CreatorId { get; set; } public Guid? CreatorId { get; set; }

7
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/TokenService.cs

@ -3,9 +3,11 @@ using System.ComponentModel.DataAnnotations;
using System.Net.Http; using System.Net.Http;
using System.Threading.Tasks; using System.Threading.Tasks;
using IdentityModel.Client; using IdentityModel.Client;
using IdentityServer4.Models;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Volo.Abp;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
namespace Win_in.Sfs.Auth.Tokens; namespace Win_in.Sfs.Auth.Tokens;
@ -46,6 +48,11 @@ public class TokenService : ApplicationService
Password = model.Password Password = model.Password
}).ConfigureAwait(false); }).ConfigureAwait(false);
Console.WriteLine($"Result:${(result.IsError ? result.ErrorDescription : result.AccessToken)}"); Console.WriteLine($"Result:${(result.IsError ? result.ErrorDescription : result.AccessToken)}");
if (result.RefreshToken == null)
{
throw new UserFriendlyException("用户名或密码错误");
}
return new JsonResult(new { return new JsonResult(new {
result.TokenType, result.TokenType,
result.AccessToken, result.AccessToken,

26
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/UserMenus/UserMenuAppService.cs

@ -2,17 +2,22 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using DocumentFormat.OpenXml.Office2010.Excel;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Identity; using Volo.Abp.Identity;
using Volo.Abp.ObjectMapping;
using Volo.Abp.PermissionManagement; using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow;
using Volo.Abp.Users;
using Win_in.Sfs.Auth.Application.Contracts; using Win_in.Sfs.Auth.Application.Contracts;
using Win_in.Sfs.Auth.Domain; using Win_in.Sfs.Auth.Domain;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
namespace Win_in.Sfs.Auth.Application; namespace Win_in.Sfs.Auth.Application;
[Authorize] [AllowAnonymous]
[Route($"{AuthConsts.RootPath}user-menu")] [Route($"{AuthConsts.RootPath}user-menu")]
public class UserMenuAppService : public class UserMenuAppService :
SfsAuthCrudAppServiceBase<UserMenu, UserMenuDto, SfsAuthRequestInputBase, UserMenuCreateInput>, SfsAuthCrudAppServiceBase<UserMenu, UserMenuDto, SfsAuthRequestInputBase, UserMenuCreateInput>,
@ -25,12 +30,12 @@ public class UserMenuAppService :
private readonly IMenuRepository _menuRepository; private readonly IMenuRepository _menuRepository;
private readonly IPermissionAppService _permissionAppService; private readonly IPermissionAppService _permissionAppService;
private readonly IIdentityUserAppService _identityUserAppService; private readonly IIdentityUserAppService _identityUserAppService;
private readonly IIdentityUserRepository _identityUserRepository;
public UserMenuAppService( public UserMenuAppService(
IUserMenuRepository repository, IMenuRepository menuRepository IUserMenuRepository repository, IMenuRepository menuRepository
, IPermissionAppService permissionAppService , IPermissionAppService permissionAppService
, IIdentityUserAppService identityUserAppService , IIdentityUserAppService identityUserAppService
) : base(repository) , IIdentityUserRepository identityUserRepository) : base(repository)
{ {
base.CreatePolicyName = UserMenuPermissions.Create; base.CreatePolicyName = UserMenuPermissions.Create;
base.UpdatePolicyName = UserMenuPermissions.Update; base.UpdatePolicyName = UserMenuPermissions.Update;
@ -38,6 +43,7 @@ public class UserMenuAppService :
_menuRepository = menuRepository; _menuRepository = menuRepository;
_permissionAppService = permissionAppService; _permissionAppService = permissionAppService;
_identityUserAppService = identityUserAppService; _identityUserAppService = identityUserAppService;
_identityUserRepository = identityUserRepository;
} }
/// <summary> /// <summary>
@ -46,6 +52,8 @@ public class UserMenuAppService :
/// <param name="userId"></param> /// <param name="userId"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("pda-menu/{userId}")] [HttpGet("pda-menu/{userId}")]
[AllowAnonymous]
[UnitOfWork]
public virtual async Task<List<MenuDto>> GetPdaMenusOfUserAsync(Guid? userId) public virtual async Task<List<MenuDto>> GetPdaMenusOfUserAsync(Guid? userId)
{ {
var userMenus = await _repository var userMenus = await _repository
@ -64,6 +72,8 @@ public class UserMenuAppService :
/// <param name="userId"></param> /// <param name="userId"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet("web-menu/{userId}")] [HttpGet("web-menu/{userId}")]
[AllowAnonymous]
[UnitOfWork]
public virtual async Task<List<MenuDto>> GetWebMenusOfUserAsync(Guid? userId) public virtual async Task<List<MenuDto>> GetWebMenusOfUserAsync(Guid? userId)
{ {
var permissions = await GetPermissionsAsync(userId.Value).ConfigureAwait(false); var permissions = await GetPermissionsAsync(userId.Value).ConfigureAwait(false);
@ -86,11 +96,17 @@ public class UserMenuAppService :
return result; return result;
} }
[AllowAnonymous]
[UnitOfWork]
[NonAction]
private async Task<List<string>> GetPermissionsAsync(Guid userId) private async Task<List<string>> GetPermissionsAsync(Guid userId)
{ {
var roles = await _identityUserAppService.GetRolesAsync(userId).ConfigureAwait(false); //var roles = await _identityUserAppService.GetRolesAsync(userId).ConfigureAwait(false);
var roles = await _identityUserRepository.GetRolesAsync(userId);
var rolesDto=ObjectMapper.Map<List<IdentityRole>, List<IdentityRoleDto>>(roles);
var permissionNames = new List<string>(); var permissionNames = new List<string>();
foreach (var role in roles.Items) foreach (var role in rolesDto)
{ {
var result = await _permissionAppService.GetAsync("R", role.Name).ConfigureAwait(false); var result = await _permissionAppService.GetAsync("R", role.Name).ConfigureAwait(false);
permissionNames.AddRange(from permissionGroup in result.Groups permissionNames.AddRange(from permissionGroup in result.Groups

39
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Application/Users/SfsUserAppService.cs

@ -1,8 +1,11 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using IdentityModel;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Identity; using Volo.Abp.Identity;
using Win_in.Sfs.Auth.Domain; using Win_in.Sfs.Auth.Domain;
@ -15,13 +18,15 @@ namespace Win_in.Sfs.Auth.Users;
public class SfsUserAppService : ApplicationService, ISfsUserAppService public class SfsUserAppService : ApplicationService, ISfsUserAppService
{ {
private readonly IIdentityUserRepository _userRepository; private readonly IIdentityUserRepository _userRepository;
private readonly IProfileAppService _profileAppService;
protected readonly IdentityUserManager _userManager; protected readonly IdentityUserManager _userManager;
public SfsUserAppService( public SfsUserAppService(
IIdentityUserRepository userRepository, IIdentityUserRepository userRepository,
IdentityUserManager userManager IdentityUserManager userManager,
) IProfileAppService profileAppService)
{ {
_userManager = userManager; _userManager = userManager;
_profileAppService = profileAppService;
_userRepository = userRepository; _userRepository = userRepository;
} }
@ -77,4 +82,34 @@ public class SfsUserAppService : ApplicationService, ISfsUserAppService
return userresult; return userresult;
} }
/// <summary>
/// 修改密码
/// </summary>
/// <param name="userId"></param>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("change-password/{userId}")]
public virtual async Task ChangePasswordAsync(Guid userId, ChangePasswordInput input)
{
var user = await _userManager.GetByIdAsync(userId).ConfigureAwait(false);
_userManager.PasswordValidators.Clear();
var t=await _userManager.ChangePasswordAsync(user, input.CurrentPassword, input.NewPassword);
}
/// <summary>
/// 重置密码
/// </summary>
/// <param name="userId"></param>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("reset-password/{userId}")]
[AllowAnonymous]
public virtual async Task ReSetPasswordAsync(Guid userId)
{
var user =await _userManager.GetByIdAsync(userId).ConfigureAwait(false);
await _userManager.RemovePasswordAsync(user);
_userManager.PasswordValidators.Clear();
await _userManager.AddPasswordAsync(user, "000000");
}
} }

17
be/Hosts/Auth.Host/src/Win_in.Sfs.Auth.Web/Properties/PublishProfiles/FolderProfile1.pubxml

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
</PropertyGroup>
</Project>

6
be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/BasedataHttpApiHostModule.cs

@ -1,3 +1,4 @@
using System;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp; using Volo.Abp;
@ -19,6 +20,7 @@ using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.Swashbuckle; using Volo.Abp.Swashbuckle;
using Volo.Abp.Timing;
using Volo.Abp.Users; using Volo.Abp.Users;
using Win_in.Sfs.Basedata.Application; using Win_in.Sfs.Basedata.Application;
using Win_in.Sfs.Basedata.Domain; using Win_in.Sfs.Basedata.Domain;
@ -69,6 +71,10 @@ public class BasedataHttpApiHostModule : ModuleBase<BasedataHttpApiHostModule>
ConfigureAuditing(); ConfigureAuditing();
// //
ConfigureBlobStoring(); ConfigureBlobStoring();
Configure<AbpClockOptions>(options =>
{
options.Kind = DateTimeKind.Local;
});
} }
public override void PostConfigureServices(ServiceConfigurationContext context) public override void PostConfigureServices(ServiceConfigurationContext context)

63
be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Properties/Resources.Designer.cs

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Win_in.Sfs.Basedata.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Win_in.Sfs.Basedata.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

101
be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Properties/Resources.resx

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

14
be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Win_in.Sfs.Basedata.HttpApi.Host.csproj

@ -36,4 +36,18 @@
<ProjectReference Include="..\..\..\Modules\Shared\src\Win_in.Sfs.Shared.Host\Win_in.Sfs.Shared.Host.csproj" /> <ProjectReference Include="..\..\..\Modules\Shared\src\Win_in.Sfs.Shared.Host\Win_in.Sfs.Shared.Host.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project> </Project>

4
be/Hosts/Core.Host/Win_in.Sfs.Core.Host/Win_in.Sfs.Core.HttpApi.Host.csproj

@ -81,8 +81,8 @@
<Folder Include="scripts\" /> <Folder Include="scripts\" />
</ItemGroup> </ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> <!--<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(ConfigurationName) == Release (powershell Compress-Archive -Path '$(TargetDir)Win_in*.dll','$(TargetDir)Win_in*.pdb' -DestinationPath '$(SolutionDir)Output\CoreHost.zip' -Force)" /> <Exec Command="if $(ConfigurationName) == Release (powershell Compress-Archive -Path '$(TargetDir)Win_in*.dll','$(TargetDir)Win_in*.pdb' -DestinationPath '$(SolutionDir)Output\CoreHost.zip' -Force)" />
</Target> </Target>-->
</Project> </Project>

4
be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/Win_in.Sfs.Wms.Store.HttpApi.Host.csproj

@ -87,8 +87,8 @@
</ItemGroup> </ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> <!--<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(ConfigurationName) == Release (powershell Compress-Archive -Path '$(TargetDir)Win_in*.dll','$(TargetDir)Win_in*.pdb' -DestinationPath '$(SolutionDir)Output\StoreHost.zip' -Force)" /> <Exec Command="if $(ConfigurationName) == Release (powershell Compress-Archive -Path '$(TargetDir)Win_in*.dll','$(TargetDir)Win_in*.pdb' -DestinationPath '$(SolutionDir)Output\StoreHost.zip' -Force)" />
</Target> </Target>-->
</Project> </Project>

15
be/Hosts/Wms.Host/Win_in.Sfs.Wms.Store.HttpApi.Host/scripts/db.Microsoft.EntityFrameworkCore.SqlServer.StoreDbContext.sql

@ -293,6 +293,7 @@ CREATE TABLE [Job_PurchaseReceiptJob] (
[PoNumber] nvarchar(64) NULL, [PoNumber] nvarchar(64) NULL,
[SupplierCode] nvarchar(64) NOT NULL, [SupplierCode] nvarchar(64) NOT NULL,
[SupplierName] nvarchar(64) NULL, [SupplierName] nvarchar(64) NULL,
[SupplierAddress] nvarchar(max) NULL,
[Type] nvarchar(64) NOT NULL, [Type] nvarchar(64) NOT NULL,
[TimeWindow] nvarchar(64) NULL, [TimeWindow] nvarchar(64) NULL,
[PlanArriveDate] datetime2 NOT NULL, [PlanArriveDate] datetime2 NOT NULL,
@ -1349,6 +1350,8 @@ CREATE TABLE [Store_ProductRecycleRequest] (
CREATE TABLE [Store_PurchaseOrder] ( CREATE TABLE [Store_PurchaseOrder] (
[Id] uniqueidentifier NOT NULL, [Id] uniqueidentifier NOT NULL,
[SupplierCode] nvarchar(64) NULL, [SupplierCode] nvarchar(64) NULL,
[SupplierName] nvarchar(max) NULL,
[SupplierAddress] nvarchar(max) NULL,
[PoType] nvarchar(64) NULL, [PoType] nvarchar(64) NULL,
[OrderStatus] nvarchar(64) NOT NULL, [OrderStatus] nvarchar(64) NOT NULL,
[IsConsignment] bit NOT NULL DEFAULT CAST(0 AS bit), [IsConsignment] bit NOT NULL DEFAULT CAST(0 AS bit),
@ -1381,6 +1384,8 @@ CREATE TABLE [Store_PurchaseReceiptNote] (
[RpNumber] nvarchar(64) NULL, [RpNumber] nvarchar(64) NULL,
[PoNumber] nvarchar(64) NULL, [PoNumber] nvarchar(64) NULL,
[SupplierCode] nvarchar(64) NOT NULL, [SupplierCode] nvarchar(64) NOT NULL,
[SupplierName] nvarchar(max) NULL,
[SupplierAddress] nvarchar(max) NULL,
[ReceiveTime] datetime2 NOT NULL, [ReceiveTime] datetime2 NOT NULL,
[JobNumber] nvarchar(64) NULL, [JobNumber] nvarchar(64) NULL,
[Type] nvarchar(64) NOT NULL, [Type] nvarchar(64) NOT NULL,
@ -1407,6 +1412,7 @@ CREATE TABLE [Store_PurchaseReceiptRequest] (
[PoNumber] nvarchar(64) NULL, [PoNumber] nvarchar(64) NULL,
[SupplierCode] nvarchar(64) NOT NULL, [SupplierCode] nvarchar(64) NOT NULL,
[SupplierName] nvarchar(64) NULL, [SupplierName] nvarchar(64) NULL,
[SupplierAddress] nvarchar(max) NULL,
[TruckNumber] nvarchar(64) NULL, [TruckNumber] nvarchar(64) NULL,
[DockCode] nvarchar(64) NOT NULL, [DockCode] nvarchar(64) NOT NULL,
[TimeWindow] nvarchar(64) NOT NULL, [TimeWindow] nvarchar(64) NOT NULL,
@ -1661,6 +1667,8 @@ CREATE TABLE [Store_SupplierAsn] (
[RpNumber] nvarchar(64) NOT NULL, [RpNumber] nvarchar(64) NOT NULL,
[PoNumber] nvarchar(64) NULL, [PoNumber] nvarchar(64) NULL,
[SupplierCode] nvarchar(64) NOT NULL, [SupplierCode] nvarchar(64) NOT NULL,
[SupplierName] nvarchar(max) NULL,
[SupplierAddress] nvarchar(max) NULL,
[Status] nvarchar(64) NOT NULL, [Status] nvarchar(64) NOT NULL,
[ContactName] nvarchar(64) NULL, [ContactName] nvarchar(64) NULL,
[ContactPhone] nvarchar(64) NULL, [ContactPhone] nvarchar(64) NULL,
@ -4159,6 +4167,13 @@ CREATE TABLE [Store_PurchaseOrderDetail] (
[ReceivedQty] decimal(18,6) NOT NULL, [ReceivedQty] decimal(18,6) NOT NULL,
[ReturnedQty] decimal(18,6) NOT NULL, [ReturnedQty] decimal(18,6) NOT NULL,
[PutAwayQty] decimal(18,6) NOT NULL, [PutAwayQty] decimal(18,6) NOT NULL,
[PlanUserCode] nvarchar(max) NULL,
[Lot] nvarchar(max) NULL,
[PlanArriveDate] datetime2 NOT NULL,
[Ctype] nvarchar(max) NULL,
[ProduceDate] datetime2 NOT NULL,
[ExpireDate] datetime2 NOT NULL,
[OrderRemark] nvarchar(max) NULL,
[CreationTime] datetime2 NOT NULL, [CreationTime] datetime2 NOT NULL,
[CreatorId] uniqueidentifier NULL, [CreatorId] uniqueidentifier NULL,
[LastModificationTime] datetime2 NULL, [LastModificationTime] datetime2 NULL,

2
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Accounts/AccountController.cs

@ -1,6 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Account; using Volo.Abp.Account;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
@ -15,6 +16,7 @@ namespace Win_in.Sfs.Wms.Pda.Controllers.Accounts;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
[AllowAnonymous]
[ApiController] [ApiController]
[Route($"{PdaHostConst.ROOT_ROUTE}account")] [Route($"{PdaHostConst.ROOT_ROUTE}account")]

58
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/TestController.cs

@ -0,0 +1,58 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Account;
using Volo.Abp.Application.Services;
using Volo.Abp.AspNetCore.Mvc;
using Win_in.Sfs.Auth.Application.Contracts;
using Win_in.Sfs.Wms.Pda.Authenticaitons;
using Win_in.Sfs.Wms.Pda.Models;
using PdaMenuDto = Win_in.Sfs.Wms.Pda.Models.PdaMenuDto;
using PdaMenuGroupDto = Win_in.Sfs.Wms.Pda.Models.PdaMenuGroupDto;
namespace Win_in.Sfs.Wms.Pda.Controllers.Accounts;
/// <summary>
///
/// </summary>
[AllowAnonymous]
[ApiController]
[Route($"{PdaHostConst.ROOT_ROUTE}asfasf")]
public class TestController: AbpController
{
//private readonly IProfileAppService _profileAppService;
//private readonly ITokenService _tokenService;
private readonly IUserMenuAppService _userMenuAppService;
//private readonly IUserWorkGroupAppService _userWorkGroupAppService;
/// <summary>
///
/// </summary>
/// <param name="profileAppService"></param>
/// <param name="tokenService"></param>
/// <param name="userMenuAppService"></param>
/// <param name="userWorkGroupAppService"></param>
public TestController(
IUserMenuAppService userMenuAppService
, IUserWorkGroupAppService userWorkGroupAppService
)
{
//_profileAppService = profileAppService;
//_tokenService = tokenService;
_userMenuAppService = userMenuAppService;
//_userWorkGroupAppService = userWorkGroupAppService;
}
/// <summary>
/// Test
/// </summary>
/// <returns></returns>
[HttpGet("Test")]
public virtual async Task<List<string>> Test()
{
return new List<string>() { "sdfsdf'" };
}
}

48
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/PdaHttpApiHostModule.cs

@ -8,8 +8,10 @@ using Microsoft.AspNetCore.Cors;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.OpenApi.Models;
using Polly; using Polly;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.AspNetCore.Mvc.AntiForgery; using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.AspNetCore.Mvc.Client; using Volo.Abp.AspNetCore.Mvc.Client;
using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
@ -149,6 +151,10 @@ public class PdaHttpApiHostModule : AbpModule
typeof(AuthApplicationContractsModule).Assembly, typeof(AuthApplicationContractsModule).Assembly,
"Auth" "Auth"
); );
context.Services.AddHttpClientProxies(
typeof(AbpAccountApplicationContractsModule).Assembly,
"Auth"
);
context.Services.AddHttpClientProxies( context.Services.AddHttpClientProxies(
typeof(MessageApplicationContractsModule).Assembly, typeof(MessageApplicationContractsModule).Assembly,
"Message" "Message"
@ -274,22 +280,32 @@ public class PdaHttpApiHostModule : AbpModule
private void ConfigureSwaggerServices(ServiceConfigurationContext context, IConfiguration configuration) private void ConfigureSwaggerServices(ServiceConfigurationContext context, IConfiguration configuration)
{ {
//context.Services.AddAbpSwaggerGenWithOAuth( context.Services.AddAbpSwaggerGenWithOAuth(
// configuration["IdentityClients:Default:Authority"], configuration["IdentityClients:Default:Authority"],
// new Dictionary<string, string> new Dictionary<string, string>
// { {
// {"Pda", "Pda API"} {"Pda", "Pda API"}
// }, },
// options => options =>
// { {
// options.SwaggerDoc("v1", new OpenApiInfo { Title = "Pda API", Version = "v1" }); options.SwaggerDoc("v1", new OpenApiInfo { Title = "Pda API", Version = "v1" });
// options.DocInclusionPredicate((docName, description) => true); options.DocInclusionPredicate((docName, description) => true);
// options.CustomSchemaIds(type => type.FullName); options.CustomSchemaIds(type => type.FullName);
// GetXmlFiles().ForEach(file => GetXmlFiles().ForEach(file =>
// { {
// options.IncludeXmlComments(file); options.IncludeXmlComments(file);
// }); });
// }); });
}
/// <summary>
/// 获取当前目录下的xml文档
/// </summary>
/// <returns></returns>
private List<string> GetXmlFiles()
{
var basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
var docXmlFiles = Directory.GetFiles(basePath, "*.xml");
return docXmlFiles.ToList();
} }
} }

4
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Win_in.Sfs.Wms.Pda.Host.csproj

@ -55,8 +55,8 @@
</None> </None>
</ItemGroup> </ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> <!--<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(ConfigurationName) == Release (powershell Compress-Archive -Path '$(TargetDir)Win_in*.dll','$(TargetDir)Win_in*.pdb' -DestinationPath '$(SolutionDir)Output\PdaHost.zip' -Force)" /> <Exec Command="if $(ConfigurationName) == Release (powershell Compress-Archive -Path '$(TargetDir)Win_in*.dll','$(TargetDir)Win_in*.pdb' -DestinationPath '$(SolutionDir)Output\PdaHost.zip' -Force)" />
</Target> </Target>-->
</Project> </Project>

30
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/appsettings.Development.json

@ -1,10 +1,10 @@
{ {
"AgileConfig": { //"AgileConfig": {
"appId": "sfs", // "appId": "sfs",
"secret": "sfs", // "secret": "sfs",
"nodes": "http://localhost:21092", // "nodes": "http://localhost:21092",
"env": "dev" // "env": "dev"
}, //},
"Urls": "http://localhost:59096", "Urls": "http://localhost:59096",
//"IdentityClients": { //"IdentityClients": {
// "Default": { // "Default": {
@ -32,14 +32,14 @@
// //"Auth": { "BaseUrl": "http://dev.ccwin-in.com:59093/" } // //"Auth": { "BaseUrl": "http://dev.ccwin-in.com:59093/" }
//} //}
"RemoteServices": { "RemoteServices": {
"Default": { "BaseUrl": "http://dev.ccwin-in.com:59093" }, "Default": { "BaseUrl": "http://dev.ccwin-in.com:21293/" },
"BaseData": { "BaseUrl": "http://localhost:59094/" }, "BaseData": { "BaseUrl": "http://dev.ccwin-in.com:21294/" },
"Store": { "BaseUrl": "http://localhost:59096/" }, "Store": { "BaseUrl": "http://dev.ccwin-in.com:21295/" },
"Job": { "BaseUrl": "http://localhost:59096/" }, "Job": { "BaseUrl": "http://dev.ccwin-in.com:21295/" },
"Inventory": { "BaseUrl": "http://localhost:59096/" }, "Inventory": { "BaseUrl": "http://dev.ccwin-in.com:21295/" },
"FileStorage": { "BaseUrl": "http://dev.ccwin-in.com:59092/" }, "FileStorage": { "BaseUrl": "http://dev.ccwin-in.com:21292/" },
"Message": { "BaseUrl": "http://dev.ccwin-in.com:59092/" }, "Message": { "BaseUrl": "http://dev.ccwin-in.com:21292/" },
"Label": { "BaseUrl": "http://dev.ccwin-in.com:59092/" }, "Label": { "BaseUrl": "http://dev.ccwin-in.com:21292/" },
"Auth": { "BaseUrl": "http://dev.ccwin-in.com:59093/" } "Auth": { "BaseUrl": "http://dev.ccwin-in.com:21293/" }
} }
} }

13
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/appsettings.Production.json

@ -1,13 +0,0 @@
//{} -----
{
"IdentityClients": {
"Default": {
"GrantType": "client_credentials",
"ClientId": "Auth_App",
"ClientSecret": "1q2w3e*",
"RequireHttps": "false",
"Authority": "http://{发布域名}:59093",
"Scope": "Auth"
}
}
}

45
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/appsettings.json

@ -1,4 +1,45 @@
{ {
"ConfigServer": "http://localhost:21093", //"AgileConfig": {
"ConfigServer.Docker": "http://gateway:21093" // "appId": "sfs",
// "secret": "sfs",
// "nodes": "http://localhost:21092",
// "env": "dev"
//},
"Urls": "http://localhost:59096",
//"IdentityClients": {
// "Default": {
// "GrantType": "client_credentials",
// "ClientId": "Auth_App",
// "ClientSecret": "1q2w3e*",
// "RequireHttps": "false",
// "Authority": "http://dev.ccwin-in.com:59093",
// "Scope": "Auth"
// }
//},
//"RemoteServices": {
// "Default": { "BaseUrl": "http://localhost:59093" },
// "Auth": { "BaseUrl": "http://localhost:59093/" }
//}
//"RemoteServices": {
// //"Default": { "BaseUrl": "http://dev.ccwin-in.com:59093" },
// //"BaseData": { "BaseUrl": "http://localhost:59094/" },
// "Store": { "BaseUrl": "http://localhost:59096/" },
// "Job": { "BaseUrl": "http://localhost:59096/" },
// "Inventory": { "BaseUrl": "http://localhost:59096/" }
// //"FileStorage": { "BaseUrl": "http://dev.ccwin-in.com:59092/" },
// //"Message": { "BaseUrl": "http://dev.ccwin-in.com:59092/" },
// // "Label": { "BaseUrl": "http://dev.ccwin-in.com:59092/" },
// //"Auth": { "BaseUrl": "http://dev.ccwin-in.com:59093/" }
//}
"RemoteServices": {
"Default": { "BaseUrl": "http://dev.ccwin-in.com:21293/" },
"BaseData": { "BaseUrl": "http://dev.ccwin-in.com:21294/" },
"Store": { "BaseUrl": "http://dev.ccwin-in.com:21295/" },
"Job": { "BaseUrl": "http://dev.ccwin-in.com:21295/" },
"Inventory": { "BaseUrl": "http://dev.ccwin-in.com:21295/" },
"FileStorage": { "BaseUrl": "http://dev.ccwin-in.com:21292/" },
"Message": { "BaseUrl": "http://dev.ccwin-in.com:21292/" },
"Label": { "BaseUrl": "http://dev.ccwin-in.com:21292/" },
"Auth": { "BaseUrl": "http://dev.ccwin-in.com:21293/" }
}
} }

12
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/AQLs/Inputs/AQLImportInput.cs

@ -7,20 +7,20 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class AQLImportInput : SfsBaseDataImportInputBase public class AQLImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// 物品编号 /// 物品代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "物品编号")] [Display(Name = "物品代码")]
[Required(ErrorMessage = "物品编号是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ItemCode { get; set; } public string ItemCode { get; set; }
/// <summary> /// <summary>
/// 供应商编号 /// 供应商代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "供应商编号")] [Display(Name = "供应商代码")]
[Required(ErrorMessage = "供应商编号是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string SupplierCode { get; set; } public string SupplierCode { get; set; }

9
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Areas/Inputs/AreaImportInput.cs

@ -8,18 +8,18 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class AreaImportInput : SfsBaseDataImportInputBase public class AreaImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// /// 区域代
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "代码")] [Display(Name = "区域代码")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
/// 名称 /// 区域名称
/// </summary> /// </summary>
[Display(Name = "名称")] [Display(Name = "区域名称")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Name { get; set; } public string Name { get; set; }
@ -43,6 +43,7 @@ public class AreaImportInput : SfsBaseDataImportInputBase
/// 是否功能区 /// 是否功能区
/// </summary> /// </summary>
[Display(Name = "是否功能区")] [Display(Name = "是否功能区")]
[Required(ErrorMessage = "{0}是必填项")]
public bool IsFunctional { get; set; } public bool IsFunctional { get; set; }
/// <summary> /// <summary>

3
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/Inputs/BomImportInput.cs

@ -79,18 +79,21 @@ public class BomImportInput : SfsBaseDataImportInputBase
/// 配送方式 /// 配送方式
/// </summary> /// </summary>
[Display(Name = "配送方式")] [Display(Name = "配送方式")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumDistributionType DistributionType { get; set; } public EnumDistributionType DistributionType { get; set; }
/// <summary> /// <summary>
/// 取整方式 /// 取整方式
/// </summary> /// </summary>
[Display(Name = "取整方式")] [Display(Name = "取整方式")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumTruncType TruncType { get; set; } public EnumTruncType TruncType { get; set; }
/// <summary> /// <summary>
/// 计划拆分规则 /// 计划拆分规则
/// </summary> /// </summary>
[Display(Name = "计划拆分规则")] [Display(Name = "计划拆分规则")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumPlannedSplitRule PlannedSplitRule { get; set; } public EnumPlannedSplitRule PlannedSplitRule { get; set; }
/// <summary> /// <summary>

2
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Calendars/Inputs/CalendarImportInput.cs

@ -22,6 +22,7 @@ public class CalendarImportInput : SfsBaseDataImportInputBase
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "开始时间")] [Display(Name = "开始时间")]
[Required(ErrorMessage = "{0}是必填项")]
public DateTime? BeginTime { get; set; } public DateTime? BeginTime { get; set; }
/// <summary> /// <summary>
@ -29,6 +30,7 @@ public class CalendarImportInput : SfsBaseDataImportInputBase
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "结束时间")] [Display(Name = "结束时间")]
[Required(ErrorMessage = "{0}是必填项")]
public DateTime? EndTime { get; set; } public DateTime? EndTime { get; set; }
/// <summary> /// <summary>

4
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerAddresses/Inputs/CustomerAddressImportInput.cs

@ -7,7 +7,7 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class CustomerAddressImportInput : SfsBaseDataImportInputBase public class CustomerAddressImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// 客户编号 /// 客户代码
/// </summary> /// </summary>
[Display(Name = "客户代码")] [Display(Name = "客户代码")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
@ -15,7 +15,7 @@ public class CustomerAddressImportInput : SfsBaseDataImportInputBase
public string CustomerCode { get; set; } public string CustomerCode { get; set; }
/// <summary> /// <summary>
/// 库位编号 /// 仓库代码
/// </summary> /// </summary>
[Display(Name = "仓库代码")] [Display(Name = "仓库代码")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]

4
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/CustomerItems/Inputs/CustomerItemImportInput.cs

@ -9,7 +9,7 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class CustomerItemImportInput : SfsBaseDataImportInputBase public class CustomerItemImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// 物品编号 /// 物品代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "物品代码")] [Display(Name = "物品代码")]
@ -27,7 +27,7 @@ public class CustomerItemImportInput : SfsBaseDataImportInputBase
public string CustomerCode { get; set; } public string CustomerCode { get; set; }
/// <summary> /// <summary>
/// 客户物品编号 /// 客户物品代码
/// </summary> /// </summary>
[Display(Name = "客户物品代码")] [Display(Name = "客户物品代码")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]

2
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Customers/Inputs/CustomerImportInput.cs

@ -35,12 +35,14 @@ public class CustomerImportInput : SfsBaseDataImportInputBase
/// 类型 /// 类型
/// </summary> /// </summary>
[Display(Name = "类型")] [Display(Name = "类型")]
[Required(ErrorMessage = "类型是必填项")]
public EnumCustomerType Type { get; set; } public EnumCustomerType Type { get; set; }
/// <summary> /// <summary>
/// 状态 /// 状态
/// </summary> /// </summary>
[Display(Name = "状态")] [Display(Name = "状态")]
[Required(ErrorMessage = "状态是必填项")]
public bool IsActive { get; set; } public bool IsActive { get; set; }
/// <summary> /// <summary>

10
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Dicts/Inputs/DictImportInput.cs

@ -13,13 +13,13 @@ public class DictImportInput : SfsBaseDataImportInputBase
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "字典代码")] [Display(Name = "字典代码")]
[Required] [Required(ErrorMessage = "{0}是必填项")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
/// 字典名称 /// 字典名称
/// </summary> /// </summary>
[Display(Name = "字典名称")] [Display(Name = "字典名称")]
[Required] [Required(ErrorMessage = "{0}是必填项")]
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
/// 字典描述 /// 字典描述
@ -31,21 +31,21 @@ public class DictImportInput : SfsBaseDataImportInputBase
/// 子代码 /// 子代码
/// </summary> /// </summary>
[Display(Name = "字典子代码")] [Display(Name = "字典子代码")]
[Required] [Required(ErrorMessage = "{0}是必填项")]
public string Item_Code { get; set; } public string Item_Code { get; set; }
/// <summary> /// <summary>
/// 子名称 /// 子名称
/// </summary> /// </summary>
[Display(Name = "字典子名称")] [Display(Name = "字典子名称")]
[Required] [Required(ErrorMessage = "{0}是必填项")]
public string Item_Name { get; set; } public string Item_Name { get; set; }
/// <summary> /// <summary>
/// 值 /// 值
/// </summary> /// </summary>
[Display(Name = "字典值")] [Display(Name = "字典值")]
[Required] [Required(ErrorMessage = "{0}是必填项")]
public string Item_Value { get; set; } public string Item_Value { get; set; }
/// <summary> /// <summary>

13
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Docks/Inputs/DockImportInput.cs

@ -7,16 +7,16 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class DockImportInput : SfsBaseDataImportInputBase public class DockImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// 代码 /// 收货口代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "代码")] [Display(Name = "收货口代码")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
/// 名称 /// 收货口名称
/// </summary> /// </summary>
[Display(Name = "名称")] [Display(Name = "收货口名称")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
@ -26,9 +26,9 @@ public class DockImportInput : SfsBaseDataImportInputBase
[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Description { get; set; } public string Description { get; set; }
/// <summary> /// <summary>
/// 仓库 /// 仓库代码
/// </summary> /// </summary>
[Display(Name = "仓库")] [Display(Name = "仓库代码")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string WarehouseCode { get; set; } public string WarehouseCode { get; set; }
@ -36,6 +36,7 @@ public class DockImportInput : SfsBaseDataImportInputBase
/// 默认库位代码 /// 默认库位代码
/// </summary> /// </summary>
[Display(Name = "默认库位代码")] [Display(Name = "默认库位代码")]
[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string DefaultLocationCode { get; set; } public string DefaultLocationCode { get; set; }

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/DocumentSettings/Inputs/DocumentSettingImportInput.cs

@ -38,6 +38,7 @@ public class DocumentSettingImportInput : SfsBaseDataImportInputBase
/// 单号流水长度 /// 单号流水长度
/// </summary> /// </summary>
[Display(Name = "单号流水长度")] [Display(Name = "单号流水长度")]
[Required(ErrorMessage = "{0}是必填项")]
public int NumberSerialLength { get; set; } public int NumberSerialLength { get; set; }
/// <summary> /// <summary>

38
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemBasics/Inputs/ItemBasicImportInput.cs

@ -1,4 +1,6 @@
using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Shared.Domain.Shared;
@ -8,33 +10,33 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class ItemBasicImportInput : SfsBaseDataImportInputBase public class ItemBasicImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// 代码 /// 物品代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "代码")] [Display(Name = "物品代码")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
/// 名称 /// 物品名称
/// </summary> /// </summary>
[Display(Name = "名称")] [Display(Name = "物品名称")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
/// 描述1 /// 物品描述1
/// </summary> /// </summary>
[Display(Name = "描述1")] [Display(Name = "物品描述1")]
[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Desc1 { get; set; } public string Desc1 { get; set; }
/// <summary> /// <summary>
/// 描述2 /// 物品描述2
/// </summary> /// </summary>
[Display(Name = "描述2")] [Display(Name = "物品描述2")]
[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Desc2 { get; set; } public string Desc2 { get; set; }
@ -42,34 +44,45 @@ public class ItemBasicImportInput : SfsBaseDataImportInputBase
/// 状态 /// 状态
/// </summary> /// </summary>
[Display(Name = "状态")] [Display(Name = "状态")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumItemStatus Status { get; set; } public EnumItemStatus Status { get; set; }
/// <summary> /// <summary>
/// 制造件 /// 制造件
/// </summary> /// </summary>
[Display(Name = "制造件")] [Display(Name = "制造件")]
[Required(ErrorMessage = "{0}是必填项")]
public bool CanMake { get; set; } public bool CanMake { get; set; }
/// <summary> /// <summary>
/// 采购件 /// 采购件
/// </summary> /// </summary>
[Display(Name = "采购件")] [Display(Name = "采购件")]
[Required(ErrorMessage = "{0}是必填项")]
public bool CanBuy { get; set; } public bool CanBuy { get; set; }
/// <summary> /// <summary>
/// 外包件 /// 外包件
/// </summary> /// </summary>
[Display(Name = "外包件")] [Display(Name = "外包件")]
[Required(ErrorMessage = "{0}是必填项")]
public bool CanOutsourcing { get; set; } public bool CanOutsourcing { get; set; }
/// <summary> /// <summary>
/// 回收件 /// 回收件
/// </summary> /// </summary>
[Display(Name = "回收件")] [Display(Name = "回收件")]
[Required(ErrorMessage = "{0}是必填项")]
public bool IsRecycled { get; set; } public bool IsRecycled { get; set; }
/// <summary> /// <summary>
/// 类型 /// 类型
/// </summary> /// </summary>
[Display(Name = "类型")] [Display(Name = "类型")]
[ValueMapping("成品", "成品")]
[ValueMapping("原料", "原料")]
[ValueMapping("物料", "物料")]
[ValueMapping("半成品", "半成品")]
public string Type { get; set; } public string Type { get; set; }
/// <summary> /// <summary>
@ -113,6 +126,10 @@ public class ItemBasicImportInput : SfsBaseDataImportInputBase
[Display(Name = "ABC类")] [Display(Name = "ABC类")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
[ValueMapping("A类", "A类")]
[ValueMapping("B类", "B类")]
[ValueMapping("C类", "C类")]
[ValueMapping("其他", "其他")]
public string AbcClass { get; set; } public string AbcClass { get; set; }
/// <summary> /// <summary>
@ -140,17 +157,21 @@ public class ItemBasicImportInput : SfsBaseDataImportInputBase
/// 有效期 /// 有效期
/// </summary> /// </summary>
[Display(Name = "有效期")] [Display(Name = "有效期")]
[Required(ErrorMessage = "{0}是必填项")]
public int Validity { get; set; } public int Validity { get; set; }
/// <summary> /// <summary>
/// 有效期单位 /// 有效期单位
/// </summary> /// </summary>
[Display(Name = "有效期单位")] [Display(Name = "有效期单位")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumValidityUnit ValidityUnit { get; set; } public EnumValidityUnit ValidityUnit { get; set; }
/// <summary> /// <summary>
/// 管理类型 /// 管理类型
/// </summary> /// </summary>
[Display(Name = "管理类型")] [Display(Name = "管理类型")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumItemManageType ManageType { get; set; } public EnumItemManageType ManageType { get; set; }
/// <summary> /// <summary>
@ -163,6 +184,7 @@ public class ItemBasicImportInput : SfsBaseDataImportInputBase
/// 虚零件 /// 虚零件
/// </summary> /// </summary>
[Display(Name = "虚零件(Is phantom)")] [Display(Name = "虚零件(Is phantom)")]
[Required(ErrorMessage = "{0}是必填项")]
public virtual bool IsPhantom { get; set; } public virtual bool IsPhantom { get; set; }
} }

6
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemCategories/Inputs/ItemCategoryImportInput.cs

@ -11,7 +11,7 @@ public class ItemCategoryImportInput : SfsBaseDataImportInputBase
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "物品代码")] [Display(Name = "物品代码")]
[Required(ErrorMessage = "物品代码是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ItemCode { get; set; } public string ItemCode { get; set; }
@ -20,7 +20,7 @@ public class ItemCategoryImportInput : SfsBaseDataImportInputBase
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "分类代码")] [Display(Name = "分类代码")]
[Required(ErrorMessage = "分类代码是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string CategoryCode { get; set; } public string CategoryCode { get; set; }
@ -28,7 +28,7 @@ public class ItemCategoryImportInput : SfsBaseDataImportInputBase
/// 分类值 /// 分类值
/// </summary> /// </summary>
[Display(Name = "分类值")] [Display(Name = "分类值")]
[Required(ErrorMessage = "分类值是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Value { get; set; } public string Value { get; set; }
} }

11
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemPacks/Inputs/ItemPackImportInput.cs

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Basedata.Application.Contracts; namespace Win_in.Sfs.Basedata.Application.Contracts;
@ -7,11 +8,11 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class ItemPackImportInput : SfsBaseDataImportInputBase public class ItemPackImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// 包装编号 /// 包装代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "包装编号")] [Display(Name = "包装代码")]
[Required(ErrorMessage = "包装编号不能为空")] [Required(ErrorMessage = "{0}不能为空")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string PackCode { get; set; } public string PackCode { get; set; }
@ -27,6 +28,9 @@ public class ItemPackImportInput : SfsBaseDataImportInputBase
/// </summary> /// </summary>
[Display(Name = "包装类型")] [Display(Name = "包装类型")]
[StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.DescLength, ErrorMessage = "{0}最多输入{1}个字符")]
[ValueMapping("EA", "EA")]
[ValueMapping("Box", "Box")]
[ValueMapping("Pallet", "Pallet")]
public string PackType { get; set; } public string PackType { get; set; }
/// <summary> /// <summary>
@ -48,6 +52,7 @@ public class ItemPackImportInput : SfsBaseDataImportInputBase
/// 包装数量 /// 包装数量
/// </summary> /// </summary>
[Display(Name = "包装数量")] [Display(Name = "包装数量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal Qty { get; set; } public decimal Qty { get; set; }
/// <summary> /// <summary>

4
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemQualities/Inputs/ItemQualityImportInput.cs

@ -24,11 +24,11 @@ public class ItemQualityImportInput : SfsBaseDataImportInputBase
// public string Name { get; set; } // public string Name { get; set; }
/// <summary> /// <summary>
/// 供应商编号 /// 供应商代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "供应商代码")] [Display(Name = "供应商代码")]
[Required(ErrorMessage = "供应商编号是必填项")] [Required(ErrorMessage = "{0}是必填项")]
public string SupplierCode { get; set; } public string SupplierCode { get; set; }
/// <summary> /// <summary>

9
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemSafetyStocks/Inputs/ItemSafetyStockImportInput.cs

@ -44,6 +44,7 @@ public class ItemSafetyStockImportInput : SfsBaseDataImportInputBase
/// </summary> /// </summary>
[ImporterHeader(Name = "最大库存", Format = "#,##0")] [ImporterHeader(Name = "最大库存", Format = "#,##0")]
[Display(Name = "最大库存")] [Display(Name = "最大库存")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal MaxStock { get; set; } public decimal MaxStock { get; set; }
/// <summary> /// <summary>
@ -51,6 +52,7 @@ public class ItemSafetyStockImportInput : SfsBaseDataImportInputBase
/// </summary> /// </summary>
[ImporterHeader(Name = "最小库存", Format = "#,##0")] [ImporterHeader(Name = "最小库存", Format = "#,##0")]
[Display(Name = "最小库存")] [Display(Name = "最小库存")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal MinStock { get; set; } public decimal MinStock { get; set; }
/// <summary> /// <summary>
@ -58,20 +60,23 @@ public class ItemSafetyStockImportInput : SfsBaseDataImportInputBase
/// </summary> /// </summary>
[ImporterHeader(Name = "安全库存", Format = "#,##0")] [ImporterHeader(Name = "安全库存", Format = "#,##0")]
[Display(Name = "安全库存")] [Display(Name = "安全库存")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal SafetyStock { get; set; } public decimal SafetyStock { get; set; }
/// <summary> /// <summary>
/// 补料点 /// 补料点
/// </summary> /// </summary>
[ImporterHeader(Name = "安全库存", Format = "#,##0")] [ImporterHeader(Name = "补料点", Format = "#,##0")]
[Display(Name = "补料点")] [Display(Name = "补料点")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal FeedLine { get; set; } public decimal FeedLine { get; set; }
/// <summary> /// <summary>
/// 补料数量 /// 补料数量
/// </summary> /// </summary>
[ImporterHeader(Name = "安全库存", Format = "#,##0")] [ImporterHeader(Name = "补料数量", Format = "#,##0")]
[Display(Name = "补料数量")] [Display(Name = "补料数量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal FeedQty { get; set; } public decimal FeedQty { get; set; }
/// <summary> /// <summary>

16
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ItemStoreRelations/Inputs/ItemStoreRelationImportInput.cs

@ -13,6 +13,7 @@ public class ItemStoreRelationImportInput : SfsBaseDataImportInputBase
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "物品代码")] [Display(Name = "物品代码")]
[Required(ErrorMessage = "{0}是必填项")]
public string ItemCode { get; set; } public string ItemCode { get; set; }
/// <summary> /// <summary>
@ -26,6 +27,7 @@ public class ItemStoreRelationImportInput : SfsBaseDataImportInputBase
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "存储关系类型")] [Display(Name = "存储关系类型")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumStoreRelationType StoreRelationType { get; set; } public EnumStoreRelationType StoreRelationType { get; set; }
/// <summary> /// <summary>
@ -39,26 +41,28 @@ public class ItemStoreRelationImportInput : SfsBaseDataImportInputBase
/// 是否可用 /// 是否可用
/// </summary> /// </summary>
[Display(Name = "是否可用")] [Display(Name = "是否可用")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool Enabled { get; set; } = true; public bool Enabled { get; set; } = true;
/// <summary> /// <summary>
/// 主存储容量 /// 主存储容量
/// </summary> /// </summary>
[Display(Name = "主存储容量")] [Display(Name = "主存储容量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal UmQty { get; set; } public decimal UmQty { get; set; }
/// <summary> /// <summary>
/// 主存储单位 /// 主存储单位
/// </summary> /// </summary>
[Display(Name = "主存储单位")] [Display(Name = "主存储单位")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumStoreType PramaryUM { get; set; } public EnumStoreType PramaryUM { get; set; }
/// <summary> /// <summary>
/// 次要储存容量 /// 次要储存容量
/// </summary> /// </summary>
[Display(Name = "次要储存容量")] [Display(Name = "次要储存容量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal AltUmQty { get; set; } public decimal AltUmQty { get; set; }
/// <summary> /// <summary>
@ -68,23 +72,23 @@ public class ItemStoreRelationImportInput : SfsBaseDataImportInputBase
public string AltUm { get; set; } public string AltUm { get; set; }
/// <summary> /// <summary>
/// 存单位 /// 存单位
/// </summary> /// </summary>
[Display(Name = "存单位")] [Display(Name = "存单位")]
public string StoreUM { get; set; } public string StoreUM { get; set; }
/// <summary> /// <summary>
/// 是否定制位置 /// 是否定制位置
/// </summary> /// </summary>
[Display(Name = "是否定制位置")] [Display(Name = "是否定制位置")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool IsFixed { get; set; } public bool IsFixed { get; set; }
/// <summary> /// <summary>
/// 占用多库位 /// 占用多库位
/// </summary> /// </summary>
[Display(Name = "占用多库位")] [Display(Name = "占用多库位")]
[Required(ErrorMessage = "{0}是必填项")]
public int MultiLoc { get; set; } public int MultiLoc { get; set; }
/// <summary> /// <summary>

125
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/LocationGroups/Inputs/LocationGroupImportInput.cs

@ -10,18 +10,19 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class LocationGroupImportInput : SfsBaseDataImportInputBase, IHasLocationSwitch public class LocationGroupImportInput : SfsBaseDataImportInputBase, IHasLocationSwitch
{ {
/// <summary> /// <summary>
/// /// 库位组代
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "代码")] [Display(Name = "库位组代码")]
[Required(ErrorMessage = "代码是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
/// 名称 /// 库位组名称
/// </summary> /// </summary>
[Display(Name = "名称")] [Display(Name = "库位组名称")]
[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Name { get; set; } public string Name { get; set; }
@ -59,6 +60,7 @@ public class LocationGroupImportInput : SfsBaseDataImportInputBase, IHasLocation
/// 拣料优先级 /// 拣料优先级
/// </summary> /// </summary>
[Display(Name = "拣料优先级")] [Display(Name = "拣料优先级")]
[Required(ErrorMessage = "{0}是必填项")]
public int PickPriority { get; set; } public int PickPriority { get; set; }
/// <summary> /// <summary>
@ -69,130 +71,115 @@ public class LocationGroupImportInput : SfsBaseDataImportInputBase, IHasLocation
public string OverflowLocationGroup { get; set; } public string OverflowLocationGroup { get; set; }
/// <summary> /// <summary>
/// 可以混物品 /// 是否混物品
/// </summary> /// </summary>
[Display(Name = "可以混物品")] [Display(Name = "是否混物品")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableMixItem { get; set; } = true; public bool EnableMixItem { get; set; } = true;
/// <summary> /// <summary>
/// 可以混批次 /// 是否混批次
/// </summary> /// </summary>
[Display(Name = "可以混批次")] [Display(Name = "是否混批次")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableMixLot { get; set; } = true; public bool EnableMixLot { get; set; } = true;
/// <summary> /// <summary>
/// 可以混状态 /// 是否混状态
/// </summary> /// </summary>
[Display(Name = "可以混状态")] [Display(Name = "是否混状态")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableMixStatus { get; set; } = true; public bool EnableMixStatus { get; set; } = true;
/// <summary> /// <summary>
/// 可以负库存 /// 是否负库存
/// </summary> /// </summary>
[Display(Name = "可以负库存")] [Display(Name = "是否负库存")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableNegative { get; set; } = true; public bool EnableNegative { get; set; } = true;
/// <summary> /// <summary>
/// 可以保留零库存 /// 是否保留零库存
/// </summary> /// </summary>
[Display(Name = "可以保留零库存")] [Display(Name = "是否保留零库存")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableKeepZero { get; set; } = true; public bool EnableKeepZero { get; set; } = true;
/// <summary> /// <summary>
/// 可以机会盘点 /// 是否动态盘点
/// </summary> /// </summary>
[Display(Name = "可以机会盘点")] [Display(Name = "是否动态盘点")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableOpportunityCount { get; set; } = true; public bool EnableOpportunityCount { get; set; } = true;
/// <summary> /// <summary>
/// 可以领料 /// 是否领料
/// </summary> /// </summary>
[Display(Name = "可以领料")] [Display(Name = "是否领料")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnablePick { get; set; } = true; public bool EnablePick { get; set; } = true;
/// <summary> /// <summary>
/// 可以过量领料 /// 是否过量领料
/// </summary> /// </summary>
[Display(Name = "可以过量领料")] [Display(Name = "是否过量领料")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableOverPick { get; set; } = true; public bool EnableOverPick { get; set; } = true;
/// <summary> /// <summary>
/// 可以整包存储 /// 是否整包存储
/// </summary> /// </summary>
[Display(Name = "可以整包存储")] [Display(Name = "是否整包存储")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableWholeStore { get; set; } = true; public bool EnableWholeStore { get; set; } = true;
/// <summary> /// <summary>
/// 可以散件存储 /// 是否散件存储
/// </summary> /// </summary>
[Display(Name = "可以散件存储")] [Display(Name = "是否散件存储")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableBreakStore { get; set; } = true; public bool EnableBreakStore { get; set; } = true;
/// <summary> /// <summary>
/// 可以发出 /// 是否发出
/// </summary> /// </summary>
[Display(Name = "可以发出")] [Display(Name = "是否发出")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableShip { get; set; } = true; public bool EnableShip { get; set; } = true;
/// <summary> /// <summary>
/// 可以接收 /// 是否接收
/// </summary> /// </summary>
[Display(Name = "可以接收")] [Display(Name = "是否接收")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableReceive { get; set; } = true; public bool EnableReceive { get; set; } = true;
/// <summary> /// <summary>
/// 可以退货给供应商 /// 是否退货给供应商
/// </summary> /// </summary>
[Display(Name = "可以退货给供应商")] [Display(Name = "是否退货给供应商")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableReturnToSupplier { get; set; } = true; public bool EnableReturnToSupplier { get; set; } = true;
/// <summary> /// <summary>
/// 可以接收客户退货 /// 是否接收客户退货
/// </summary> /// </summary>
[Display(Name = "可以接收客户退货")] [Display(Name = "是否接收客户退货")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableReturnFromCustomer { get; set; } = true; public bool EnableReturnFromCustomer { get; set; } = true;
/// <summary> /// <summary>
/// 是否可以拆箱 /// 是否拆箱
/// </summary> /// </summary>
[Display(Name = "是否可以拆箱")] [Display(Name = "是否拆箱")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableSplitBox { get; set; } = true; public bool EnableSplitBox { get; set; } = true;
/// <summary> /// <summary>
/// 是否可以拆托 /// 是否拆托
/// </summary> /// </summary>
[Display(Name = "是否可以拆托")] [Display(Name = "是否拆托")]
[ValueMapping("是", true)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("否", false)]
public bool EnableSplitPallet { get; set; } = true; public bool EnableSplitPallet { get; set; } = true;
/// <summary> /// <summary>

122
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Locations/Inputs/LocationImportInput.cs

@ -9,11 +9,11 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class LocationImportInput : SfsBaseDataImportInputBase, IHasLocationSwitch public class LocationImportInput : SfsBaseDataImportInputBase, IHasLocationSwitch
{ {
/// <summary> /// <summary>
/// 代码 /// 库位代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "代码")] [Display(Name = "库位代码")]
[Required(ErrorMessage = "代码是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Code { get; set; } public string Code { get; set; }
@ -82,12 +82,14 @@ public class LocationImportInput : SfsBaseDataImportInputBase, IHasLocationSwitc
/// 行号 /// 行号
/// </summary> /// </summary>
[Display(Name = "行号")] [Display(Name = "行号")]
[Required(ErrorMessage = "{0}是必填项")]
public int RowCode { get; set; } public int RowCode { get; set; }
/// <summary> /// <summary>
/// 列号 /// 列号
/// </summary> /// </summary>
[Display(Name = "列号")] [Display(Name = "列号")]
[Required(ErrorMessage = "{0}是必填项")]
public int ColumnCode { get; set; } public int ColumnCode { get; set; }
/// <summary> /// <summary>
@ -101,125 +103,111 @@ public class LocationImportInput : SfsBaseDataImportInputBase, IHasLocationSwitc
/// 拣料优先级 /// 拣料优先级
/// </summary> /// </summary>
[Display(Name = "拣料优先级")] [Display(Name = "拣料优先级")]
[Required(ErrorMessage = "{0}是必填项")]
public int PickPriority { get; set; } public int PickPriority { get; set; }
/// <summary> /// <summary>
/// 拣料顺序 /// 拣料顺序
/// </summary> /// </summary>
[Display(Name = "拣料顺序")] [Display(Name = "拣料顺序")]
[Required(ErrorMessage = "{0}是必填项")]
public int PickOrder { get; set; } public int PickOrder { get; set; }
/// <summary> /// <summary>
/// 可以混物品 /// 是否混物品
/// </summary> /// </summary>
[Display(Name = "可以混物品")] [Display(Name = "是否混物品")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableMixItem { get; set; } = true; public bool EnableMixItem { get; set; } = true;
/// <summary> /// <summary>
/// 可以混批次 /// 是否混批次
/// </summary> /// </summary>
[Display(Name = "可以混批次")] [Display(Name = "是否混批次")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableMixLot { get; set; } = true; public bool EnableMixLot { get; set; } = true;
/// <summary> /// <summary>
/// 可以混状态 /// 是否混状态
/// </summary> /// </summary>
[Display(Name = "可以混状态")] [Display(Name = "是否混状态")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableMixStatus { get; set; } = true; public bool EnableMixStatus { get; set; } = true;
/// <summary> /// <summary>
/// 可以负库存 /// 是否负库存
/// </summary> /// </summary>
[Display(Name = "可以负库存")] [Display(Name = "是否负库存")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableNegative { get; set; } = true; public bool EnableNegative { get; set; } = true;
/// <summary> /// <summary>
/// 可以保留零库存 /// 是否保留零库存
/// </summary> /// </summary>
[Display(Name = "可以保留零库存")] [Display(Name = "是否保留零库存")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableKeepZero { get; set; } = true; public bool EnableKeepZero { get; set; } = true;
/// <summary> /// <summary>
/// 可以机会盘点 /// 是否盘点
/// </summary> /// </summary>
[Display(Name = "可以机会盘点")] [Display(Name = "是否盘点")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableOpportunityCount { get; set; } = true; public bool EnableOpportunityCount { get; set; } = true;
/// <summary> /// <summary>
/// 可以领料 /// 是否领料
/// </summary> /// </summary>
[Display(Name = "可以领料")] [Display(Name = "是否领料")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnablePick { get; set; } = true; public bool EnablePick { get; set; } = true;
/// <summary> /// <summary>
/// 可以过量领料 /// 是否过量领料
/// </summary> /// </summary>
[Display(Name = "可以过量领料")] [Display(Name = "是否过量领料")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableOverPick { get; set; } = true; public bool EnableOverPick { get; set; } = true;
/// <summary> /// <summary>
/// 可以整包存储 /// 是否整包存储
/// </summary> /// </summary>
[Display(Name = "可以整包存储")] [Display(Name = "是否整包存储")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableWholeStore { get; set; } = true; public bool EnableWholeStore { get; set; } = true;
/// <summary> /// <summary>
/// 可以散件存储 /// 是否散件存储
/// </summary> /// </summary>
[Display(Name = "可以散件存储")] [Display(Name = "是否散件存储")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableBreakStore { get; set; } = true; public bool EnableBreakStore { get; set; } = true;
/// <summary> /// <summary>
/// 可以发出 /// 是否发出
/// </summary> /// </summary>
[Display(Name = "可以发出")] [Display(Name = "是否发出")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableShip { get; set; } = true; public bool EnableShip { get; set; } = true;
/// <summary> /// <summary>
/// 可以接收 /// 是否接收
/// </summary> /// </summary>
[Display(Name = "可以接收")] [Display(Name = "是否接收")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableReceive { get; set; } = true; public bool EnableReceive { get; set; } = true;
/// <summary> /// <summary>
/// 可以退货给供应商 /// 是否退货给供应商
/// </summary> /// </summary>
[Display(Name = "可以退货给供应商")] [Display(Name = "是否退货给供应商")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableReturnToSupplier { get; set; } = true; public bool EnableReturnToSupplier { get; set; } = true;
/// <summary> /// <summary>
/// 可以接收客户退货 /// 是否接收客户退货
/// </summary> /// </summary>
[Display(Name = "可以接收客户退货")] [Display(Name = "是否接收客户退货")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableReturnFromCustomer { get; set; } = true; public bool EnableReturnFromCustomer { get; set; } = true;
/// <summary> /// <summary>
/// 是否可以拆箱 /// 是否拆箱
/// </summary> /// </summary>
[Display(Name = "是否可以拆箱")] [Display(Name = "是否拆箱")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableSplitBox { get; set; } = true; public bool EnableSplitBox { get; set; } = true;
/// <summary> /// <summary>
/// 是否可以拆托 /// 是否拆托
/// </summary> /// </summary>
[Display(Name = "是否可以拆托")] [Display(Name = "是否拆托")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EnableSplitPallet { get; set; } = true; public bool EnableSplitPallet { get; set; } = true;
/// <summary> /// <summary>

19
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/ProductionLines/Inputs/ProductionLineImportInput.cs

@ -11,18 +11,18 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class ProductionLineImportInput : SfsBaseDataImportInputBase public class ProductionLineImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// /// 生产线代
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "物品代码")] [Display(Name = "生产线代码")]
[Required(ErrorMessage = "物品代码是必填项")] [Required(ErrorMessage = "物品代码是必填项")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
/// 名称 /// 生产线名称
/// </summary> /// </summary>
[Display(Name = "名称")] [Display(Name = "生产线名称")]
[Required(ErrorMessage = "名称是必填项")] [Required(ErrorMessage = "{生产线名称}是必填项")]
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
@ -35,25 +35,28 @@ public class ProductionLineImportInput : SfsBaseDataImportInputBase
/// 类型 /// 类型
/// </summary> /// </summary>
[Display(Name = "类型")] [Display(Name = "类型")]
[Required(ErrorMessage = "类型是必填项")] [Required(ErrorMessage = "{0}是必填项")]
public EnumProductionLineType Type { get; set; } public EnumProductionLineType Type { get; set; }
/// <summary> /// <summary>
/// 车间 /// 车间代码
/// </summary> /// </summary>
[Display(Name = "车间")] [Display(Name = "车间代码")]
[Required(ErrorMessage = "{0}是必填项")]
public string WorkshopCode { get; set; } public string WorkshopCode { get; set; }
/// <summary> /// <summary>
/// 原料库位 /// 原料库位
/// </summary> /// </summary>
[Display(Name = "原料库位")] [Display(Name = "原料库位")]
[Required(ErrorMessage = "{0}是必填项")]
public string RawLocationCode { get; set; } public string RawLocationCode { get; set; }
/// <summary> /// <summary>
/// 成品库位 /// 成品库位
/// </summary> /// </summary>
[Display(Name = "成品库位")] [Display(Name = "成品库位")]
[Required(ErrorMessage = "{0}是必填项")]
public string ProductLocationCode { get; set; } public string ProductLocationCode { get; set; }
/// <summary> /// <summary>

3
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Projects/Inputs/ProjectImportInput.cs

@ -29,6 +29,7 @@ public class ProjectImportInput : SfsBaseDataImportInputBase
/// 项目名称 /// 项目名称
/// </summary> /// </summary>
[Display(Name = "项目名称")] [Display(Name = "项目名称")]
[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Name { get; set; } public string Name { get; set; }
@ -36,6 +37,7 @@ public class ProjectImportInput : SfsBaseDataImportInputBase
/// 开始时间 /// 开始时间
/// </summary> /// </summary>
[Display(Name = "开始时间")] [Display(Name = "开始时间")]
[Required(ErrorMessage = "{0}是必填项")]
[ImporterHeader(Name = "开始时间", Format = "yyyy-MM-dd")] [ImporterHeader(Name = "开始时间", Format = "yyyy-MM-dd")]
[ExporterHeader(DisplayName = "开始时间", Format = "yyyy-MM-dd")] [ExporterHeader(DisplayName = "开始时间", Format = "yyyy-MM-dd")]
public DateTime? BeginTime { get; set; } public DateTime? BeginTime { get; set; }
@ -44,6 +46,7 @@ public class ProjectImportInput : SfsBaseDataImportInputBase
/// 结束时间 /// 结束时间
/// </summary> /// </summary>
[Display(Name = "结束时间")] [Display(Name = "结束时间")]
[Required(ErrorMessage = "{0}是必填项")]
[ImporterHeader(Name = "结束时间", Format = "yyyy-MM-dd")] [ImporterHeader(Name = "结束时间", Format = "yyyy-MM-dd")]
[ExporterHeader(DisplayName = "结束时间", Format = "yyyy-MM-dd")] [ExporterHeader(DisplayName = "结束时间", Format = "yyyy-MM-dd")]
public DateTime? EndTime { get; set; } public DateTime? EndTime { get; set; }

13
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Shifts/Inputs/ShiftImportInput.cs

@ -9,18 +9,18 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class ShiftImportInput : SfsBaseDataImportInputBase public class ShiftImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// 代码 /// 班次代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "代码")] [Display(Name = "班次代码")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
/// 名称 /// 班次名称
/// </summary> /// </summary>
[Display(Name = "名称")] [Display(Name = "班次名称")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Name { get; set; } public string Name { get; set; }
@ -30,6 +30,7 @@ public class ShiftImportInput : SfsBaseDataImportInputBase
[Display(Name = "开始时间")] [Display(Name = "开始时间")]
[ImporterHeader(Name = "开始时间", Format = "yyyy-MM-dd HH:mm")] [ImporterHeader(Name = "开始时间", Format = "yyyy-MM-dd HH:mm")]
[ExporterHeader(DisplayName = "开始时间", Format = "yyyy-MM-dd HH:mm")] [ExporterHeader(DisplayName = "开始时间", Format = "yyyy-MM-dd HH:mm")]
[Required(ErrorMessage = "{0}是必填项")]
public DateTime? BeginTime { get; set; } public DateTime? BeginTime { get; set; }
/// <summary> /// <summary>
@ -38,14 +39,14 @@ public class ShiftImportInput : SfsBaseDataImportInputBase
[Display(Name = "结束时间")] [Display(Name = "结束时间")]
[ImporterHeader(Name = "结束时间", Format = "yyyy-MM-dd HH:mm")] [ImporterHeader(Name = "结束时间", Format = "yyyy-MM-dd HH:mm")]
[ExporterHeader(DisplayName = "结束时间", Format = "yyyy-MM-dd HH:mm")] [ExporterHeader(DisplayName = "结束时间", Format = "yyyy-MM-dd HH:mm")]
[Required(ErrorMessage = "{0}是必填项")]
public DateTime? EndTime { get; set; } public DateTime? EndTime { get; set; }
/// <summary> /// <summary>
/// 结束到下一天 /// 结束到下一天
/// </summary> /// </summary>
[Display(Name = "结束到下一天")] [Display(Name = "结束到下一天")]
[ValueMapping("否", false)] [Required(ErrorMessage = "{0}是必填项")]
[ValueMapping("是", true)]
public bool EndAtNextDay { get; set; } public bool EndAtNextDay { get; set; }
/// <summary> /// <summary>

22
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SupplierItems/Inputs/SupplierItemImportInput.cs

@ -10,11 +10,11 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class SupplierItemImportInput : SfsBaseDataImportInputBase public class SupplierItemImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// 供应商编号 /// 供应商代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "供应商编号")] [Display(Name = "供应商代码")]
[Required(ErrorMessage = "供应商编号是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string SupplierCode { get; set; } public string SupplierCode { get; set; }
@ -26,19 +26,19 @@ public class SupplierItemImportInput : SfsBaseDataImportInputBase
public string SupplierSimpleName { get; set; } public string SupplierSimpleName { get; set; }
/// <summary> /// <summary>
/// 物品编号 /// 物品代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "物品编号")] [Display(Name = "物品代码")]
[Required(ErrorMessage = "物品编号是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string ItemCode { get; set; } public string ItemCode { get; set; }
/// <summary> /// <summary>
/// 供应商物品编号 /// 供应商物品代码
/// </summary> /// </summary>
[Display(Name = "供应商物品编号")] [Display(Name = "供应商物品代码")]
[Required(ErrorMessage = "供应商物品编号是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string SupplierItemCode { get; set; } public string SupplierItemCode { get; set; }
@ -53,16 +53,18 @@ public class SupplierItemImportInput : SfsBaseDataImportInputBase
/// 每托盘数量 /// 每托盘数量
/// </summary> /// </summary>
[Display(Name = "每托盘数量")] [Display(Name = "每托盘数量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal QtyPerPallet { get; set; } public decimal QtyPerPallet { get; set; }
/// <summary> /// <summary>
/// 供应商包装数量 /// 供应商包装数量
/// </summary> /// </summary>
[Display(Name = "供应商包装数量")] [Display(Name = "供应商包装数量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal SupplierPackQty { get; set; } public decimal SupplierPackQty { get; set; }
/// <summary> /// <summary>
/// 供应商包装量 /// 供应商包装单位
/// </summary> /// </summary>
[Display(Name = "供应商包装数量单位")] [Display(Name = "供应商包装数量单位")]
public string SupplierPackUom { get; set; } public string SupplierPackUom { get; set; }

6
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SupplierTimeWindows/Inputs/SupplierTimeWindowImportInput.cs

@ -34,11 +34,11 @@ public class SupplierTimeWindowImportInput : SfsBaseDataImportInputBase
public string TimeSlot { get; set; } public string TimeSlot { get; set; }
/// <summary> /// <summary>
/// /// 当前星
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "期")] [Display(Name = "当前星期")]
[Required(ErrorMessage = "日期是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Week { get; set; } public string Week { get; set; }

3
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Suppliers/Inputs/SupplierImportInput.cs

@ -38,12 +38,14 @@ public class SupplierImportInput : SfsBaseDataImportInputBase
/// 状态 /// 状态
/// </summary> /// </summary>
[Display(Name = "状态")] [Display(Name = "状态")]
[Required(ErrorMessage = "{0}是必填项")]
public bool IsActive { get; set; } public bool IsActive { get; set; }
/// <summary> /// <summary>
/// 类型 /// 类型
/// </summary> /// </summary>
[Display(Name = "类型")] [Display(Name = "类型")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumSupplierType Type { get; set; } = EnumSupplierType.None; public EnumSupplierType Type { get; set; } = EnumSupplierType.None;
/// <summary> /// <summary>
@ -113,6 +115,7 @@ public class SupplierImportInput : SfsBaseDataImportInputBase
/// 税率 /// 税率
/// </summary> /// </summary>
[Display(Name = "税率")] [Display(Name = "税率")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal TaxRate { get; set; } public decimal TaxRate { get; set; }
/// <summary> /// <summary>

8
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Teams/Inputs/TeamImportInput.cs

@ -10,18 +10,18 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class TeamImportInput : SfsBaseDataImportInputBase public class TeamImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// 代码 /// 班组代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "代码")] [Display(Name = "班组代码")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
/// 名称 /// 班组名称
/// </summary> /// </summary>
[Display(Name = "名称")] [Display(Name = "班组名称")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Name { get; set; } public string Name { get; set; }

5
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/TransactionTypes/Inputs/TransactionTypeImportInput.cs

@ -88,30 +88,35 @@ public class TransactionTypeImportInput : SfsBaseDataImportInputBase
/// 自动提交审批 /// 自动提交审批
/// </summary> /// </summary>
[Display(Name = "自动提交审批")] [Display(Name = "自动提交审批")]
[Required(ErrorMessage = "{0}是必填项")]
public bool AutoSubmitRequest { get; set; } = true; public bool AutoSubmitRequest { get; set; } = true;
/// <summary> /// <summary>
/// 自动审批通过 /// 自动审批通过
/// </summary> /// </summary>
[Display(Name = "自动审批通过")] [Display(Name = "自动审批通过")]
[Required(ErrorMessage = "{0}是必填项")]
public bool AutoAgreeRequest { get; set; } = true; public bool AutoAgreeRequest { get; set; } = true;
/// <summary> /// <summary>
/// 自动执行 /// 自动执行
/// </summary> /// </summary>
[Display(Name = "自动执行")] [Display(Name = "自动执行")]
[Required(ErrorMessage = "{0}是必填项")]
public bool AutoHandleRequest { get; set; } = false; public bool AutoHandleRequest { get; set; } = false;
/// <summary> /// <summary>
/// 自动完成任务 /// 自动完成任务
/// </summary> /// </summary>
[Display(Name = "自动完成任务")] [Display(Name = "自动完成任务")]
[Required(ErrorMessage = "{0}是必填项")]
public bool AutoCompleteJob { get; set; } = false; public bool AutoCompleteJob { get; set; } = false;
/// <summary> /// <summary>
/// 直接创建记录 /// 直接创建记录
/// </summary> /// </summary>
[Display(Name = "直接创建记录")] [Display(Name = "直接创建记录")]
[Required(ErrorMessage = "{0}是必填项")]
public bool DirectCreateNote { get; set; } = false; public bool DirectCreateNote { get; set; } = false;
/// <summary> /// <summary>

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Uoms/Inputs/UomImportInput.cs

@ -26,6 +26,7 @@ public class UomImportInput : SfsBaseDataImportInputBase
/// 类型 /// 类型
/// </summary> /// </summary>
[Display(Name = "类型")] [Display(Name = "类型")]
[Required(ErrorMessage = "{0}是必填项")]
public UomType Type { get; set; } public UomType Type { get; set; }
/// <summary> /// <summary>

18
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/WorkCenters/Inputs/WorkStationImportInput.cs

@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Basedata.Domain.Shared;
using Win_in.Sfs.Shared.Domain;
namespace Win_in.Sfs.Basedata.Application.Contracts; namespace Win_in.Sfs.Basedata.Application.Contracts;
@ -9,9 +10,10 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class WorkStationImportInput : SfsBaseDataImportInputBase public class WorkStationImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// /// 工作中心代
/// </summary> /// </summary>
[Display(Name = "编码")] [Display(Name = "工作中心代码")]
[Required(ErrorMessage = "{0}是必填项")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
@ -27,9 +29,9 @@ public class WorkStationImportInput : SfsBaseDataImportInputBase
public string Description { get; set; } public string Description { get; set; }
/// <summary> /// <summary>
/// 生产线 /// 生产线代码
/// </summary> /// </summary>
[Display(Name = "生产线")] [Display(Name = "生产线代码")]
public string ProductionLineCode { get; set; } public string ProductionLineCode { get; set; }
/// <summary> /// <summary>
@ -48,6 +50,14 @@ public class WorkStationImportInput : SfsBaseDataImportInputBase
/// 工作中心类型 /// 工作中心类型
/// </summary> /// </summary>
[Display(Name = "工作中心类型")] [Display(Name = "工作中心类型")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumWorkStationType? Type { get; set; } public EnumWorkStationType? Type { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
[StringLength(SfsEfCorePropertyConst.RemarkLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Remark { get; set; }
} }

11
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/WorkGroups/Inputs/WorkGroupImportInput.cs

@ -7,17 +7,18 @@ namespace Win_in.Sfs.Basedata.Application.Contracts;
public class WorkGroupImportInput : SfsBaseDataImportInputBase public class WorkGroupImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// 代码 /// 工作组代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "代码")] [Display(Name = "工作组代码")]
[Required(ErrorMessage = "代码是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
/// 名称 /// 工作组名称
/// </summary> /// </summary>
[Display(Name = "名称")] [Display(Name = "工作组名称")]
[Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.NameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Name { get; set; } public string Name { get; set; }

8
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/WorkShops/Inputs/WorkShopImportInput.cs

@ -11,18 +11,18 @@ public class WorkShopImportInput : SfsBaseDataImportInputBase
{ {
/// <summary> /// <summary>
/// 代码 /// 车间代码
/// </summary> /// </summary>
[Key] [Key]
[Display(Name = "代码")] [Display(Name = "车间代码")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
/// 名称 /// 车间名称
/// </summary> /// </summary>
[Display(Name = "名称")] [Display(Name = "车间名称")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string Name { get; set; } public string Name { get; set; }

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/AQLs/AQLAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void AQLAutoMapperProfile() private void AQLAutoMapperProfile()
{ {
CreateMap<AQL, AQLDTO>() CreateMap<AQL, AQLDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<AQLImportInput, AQL>() CreateMap<AQLImportInput, AQL>()
.IgnoreAuditedObjectProperties() .IgnoreAuditedObjectProperties()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Areas/AreaAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void AreaAutoMapperProfile() private void AreaAutoMapperProfile()
{ {
CreateMap<Area, AreaDTO>() CreateMap<Area, AreaDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<AreaImportInput, Area>() CreateMap<AreaImportInput, Area>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void BomAutoMapperProfile() private void BomAutoMapperProfile()
{ {
CreateMap<Bom, BomDTO>() CreateMap<Bom, BomDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(t => t.ComponentDTOs) .Ignore(t => t.ComponentDTOs)
.ForMember(x => x.ComponentQty, y => y.MapFrom(d => d.ComponentQty)) .ForMember(x => x.ComponentQty, y => y.MapFrom(d => d.ComponentQty))
.ForMember(x => x.ComponentUom, y => y.MapFrom(d => d.ComponentUom)) .ForMember(x => x.ComponentUom, y => y.MapFrom(d => d.ComponentUom))

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Calendars/CalendarAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CalendarAutoMapperProfile() private void CalendarAutoMapperProfile()
{ {
CreateMap<Calendar, CalendarDTO>() CreateMap<Calendar, CalendarDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<CalendarImportInput, Calendar>() CreateMap<CalendarImportInput, Calendar>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Categories/CategoryAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CategoryAutoMapperProfile() private void CategoryAutoMapperProfile()
{ {
CreateMap<Category, CategoryDTO>() CreateMap<Category, CategoryDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<CategoryImportInput, Category>() CreateMap<CategoryImportInput, Category>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Currencies/CurrencyAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CurrencyAutoMapperProfile() private void CurrencyAutoMapperProfile()
{ {
CreateMap<Currency, CurrencyDTO>() CreateMap<Currency, CurrencyDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.Enabled) .Ignore(x => x.Enabled)
.ReverseMap(); .ReverseMap();
} }

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Currencies/CurrencyExchangeAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CurrencyExchangeAutoMapperProfile() private void CurrencyExchangeAutoMapperProfile()
{ {
CreateMap<CurrencyExchange, CurrencyExchangeDTO>() CreateMap<CurrencyExchange, CurrencyExchangeDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.CurrencyName) .Ignore(x => x.CurrencyName)
.Ignore(x => x.BasicCurrencyName) .Ignore(x => x.BasicCurrencyName)
.Ignore(x => x.Enabled) .Ignore(x => x.Enabled)

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerAddresses/CustomerAddressAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CustomerAddressAutoMapperProfile() private void CustomerAddressAutoMapperProfile()
{ {
CreateMap<CustomerAddress, CustomerAddressDTO>() CreateMap<CustomerAddress, CustomerAddressDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<CustomerAddressImportInput, CustomerAddress>() CreateMap<CustomerAddressImportInput, CustomerAddress>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/CustomerItems/CustomerItemAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CustomerItemAutoMapperProfile() private void CustomerItemAutoMapperProfile()
{ {
CreateMap<CustomerItem, CustomerItemDTO>() CreateMap<CustomerItem, CustomerItemDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<CustomerItemImportInput, CustomerItem>() CreateMap<CustomerItemImportInput, CustomerItem>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Customers/CustomerAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void CustomerAutoMapperProfile() private void CustomerAutoMapperProfile()
{ {
CreateMap<Customer, CustomerDTO>() CreateMap<Customer, CustomerDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<CustomerImportInput, Customer>() CreateMap<CustomerImportInput, Customer>()

2
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Dicts/DictAutoMapperProfile.cs

@ -10,7 +10,7 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void DictAutoMapperProfile() private void DictAutoMapperProfile()
{ {
CreateMap<Dict, DictDTO>() CreateMap<Dict, DictDTO>()
.IgnoreAuditedObjectProperties(); ;
CreateMap<DictItem, DictItemDTO>() CreateMap<DictItem, DictItemDTO>()
.IgnoreAuditedObjectProperties(); .IgnoreAuditedObjectProperties();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Docks/DockAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void DockAutoMapperProfile() private void DockAutoMapperProfile()
{ {
CreateMap<Dock, DockDTO>() CreateMap<Dock, DockDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<DockImportInput, Dock>() CreateMap<DockImportInput, Dock>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ErpLocations/ErpLocationAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ErpLocationAutoMapperProfile() private void ErpLocationAutoMapperProfile()
{ {
CreateMap<ErpLocation, ErpLocationDTO>() CreateMap<ErpLocation, ErpLocationDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<ErpLocationImportInput, ErpLocation>() CreateMap<ErpLocationImportInput, ErpLocation>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemCategories/ItemCategoryAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemCategoryAutoMapperProfile() private void ItemCategoryAutoMapperProfile()
{ {
CreateMap<ItemCategory, ItemCategoryDTO>() CreateMap<ItemCategory, ItemCategoryDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<ItemCategoryImportInput, ItemCategory>() CreateMap<ItemCategoryImportInput, ItemCategory>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemGuideBooks/ItemGuideBookAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemGuideBookAutoMapperProfile() private void ItemGuideBookAutoMapperProfile()
{ {
CreateMap<ItemGuideBook, ItemGuideBookDTO>() CreateMap<ItemGuideBook, ItemGuideBookDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.ItemName).Ignore(x => x.ItemDesc1).Ignore(x => x.ItemDesc2) .Ignore(x => x.ItemName).Ignore(x => x.ItemDesc1).Ignore(x => x.ItemDesc2)
.ReverseMap(); .ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemPacks/ItemPackAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemPackAutoMapperProfile() private void ItemPackAutoMapperProfile()
{ {
CreateMap<ItemPack, ItemPackDTO>() CreateMap<ItemPack, ItemPackDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<ItemPackImportInput, ItemPack>() CreateMap<ItemPackImportInput, ItemPack>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemQualities/ItemQualityAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemQualityAutoMapperProfile() private void ItemQualityAutoMapperProfile()
{ {
CreateMap<ItemQuality, ItemQualityDTO>() CreateMap<ItemQuality, ItemQualityDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<ItemQualityImportInput, ItemQuality>() CreateMap<ItemQualityImportInput, ItemQuality>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemSafetyStocks/ItemSafetyStockAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemSafetyStockAutoMapperProfile() private void ItemSafetyStockAutoMapperProfile()
{ {
CreateMap<ItemSafetyStock, ItemSafetyStockDTO>() CreateMap<ItemSafetyStock, ItemSafetyStockDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<ItemSafetyStockImportInput, ItemSafetyStock>() CreateMap<ItemSafetyStockImportInput, ItemSafetyStock>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ItemStoreRelations/ItemStoreRelationAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ItemStoreRelationAutoMapperProfile() private void ItemStoreRelationAutoMapperProfile()
{ {
CreateMap<ItemStoreRelation, ItemStoreRelationDTO>() CreateMap<ItemStoreRelation, ItemStoreRelationDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.LocationCode) .Ignore(x => x.LocationCode)
.ReverseMap(); .ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Items/ItemBasicAutoMapperProfile.cs

@ -11,7 +11,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
{ {
CreateMap<ItemBasic, ItemBasicDTO>() CreateMap<ItemBasic, ItemBasicDTO>()
.Ignore(x => x.ItemCategoryDictionary) .Ignore(x => x.ItemCategoryDictionary)
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<ItemBasicImportInput, ItemBasic>() CreateMap<ItemBasicImportInput, ItemBasic>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/LocationGroups/LocationGroupAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void LocationGroupAutoMapperProfile() private void LocationGroupAutoMapperProfile()
{ {
CreateMap<LocationGroup, LocationGroupDTO>() CreateMap<LocationGroup, LocationGroupDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<LocationGroupImportInput, LocationGroup>() CreateMap<LocationGroupImportInput, LocationGroup>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Locations/LocationAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void LocationAutoMapperProfile() private void LocationAutoMapperProfile()
{ {
CreateMap<Location, LocationDTO>() CreateMap<Location, LocationDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<LocationImportInput, Location>() CreateMap<LocationImportInput, Location>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Machines/MachineAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void MachineAutoMapperProfile() private void MachineAutoMapperProfile()
{ {
CreateMap<Machine, MachineDTO>() CreateMap<Machine, MachineDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.ProdLineName) .Ignore(x => x.ProdLineName)
.Ignore(x => x.WorkStationName) .Ignore(x => x.WorkStationName)
.ReverseMap(); .ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLineItems/ProductionLineItemAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ProductionLineItemAutoMapperProfile() private void ProductionLineItemAutoMapperProfile()
{ {
CreateMap<ProductionLineItem, ProductionLineItemDTO>() CreateMap<ProductionLineItem, ProductionLineItemDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<ProductionLineItemImportInput, ProductionLineItem>() CreateMap<ProductionLineItemImportInput, ProductionLineItem>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/ProductionLines/ProductionLineAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ProductionLineAutoMapperProfile() private void ProductionLineAutoMapperProfile()
{ {
CreateMap<ProductionLine, ProductionLineDTO>() CreateMap<ProductionLine, ProductionLineDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<ProductionLineImportInput, ProductionLine>() CreateMap<ProductionLineImportInput, ProductionLine>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Projects/ProjectAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ProjectAutoMapperProfile() private void ProjectAutoMapperProfile()
{ {
CreateMap<Project, ProjectDTO>() CreateMap<Project, ProjectDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<ProjectImportInput, Project>() CreateMap<ProjectImportInput, Project>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PurchasePrices/PurchasePriceSheetAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void PurchasePriceSheetAutoMapperProfile() private void PurchasePriceSheetAutoMapperProfile()
{ {
CreateMap<PurchasePriceSheet, PurchasePriceSheetDTO>() CreateMap<PurchasePriceSheet, PurchasePriceSheetDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.SupplierName) .Ignore(x => x.SupplierName)
.Ignore(x => x.CurrencyName) .Ignore(x => x.CurrencyName)
.ReverseMap(); .ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SalePrices/SalePriceSheetAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void SalePriceSheetAutoMapperProfile() private void SalePriceSheetAutoMapperProfile()
{ {
CreateMap<SalePriceSheet, SalePriceSheetDTO>() CreateMap<SalePriceSheet, SalePriceSheetDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.CustomerName) .Ignore(x => x.CustomerName)
.Ignore(x => x.CurrencyName) .Ignore(x => x.CurrencyName)
.ReverseMap(); .ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Shifts/ShiftAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void ShiftAutoMapperProfile() private void ShiftAutoMapperProfile()
{ {
CreateMap<Shift, ShiftDTO>() CreateMap<Shift, ShiftDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<ShiftImportInput, Shift>() CreateMap<ShiftImportInput, Shift>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/StdCostPrices/StdCostPriceSheetAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void StdCostPriceSheetAutoMapperProfile() private void StdCostPriceSheetAutoMapperProfile()
{ {
CreateMap<StdCostPriceSheet, StdCostPriceSheetDTO>() CreateMap<StdCostPriceSheet, StdCostPriceSheetDTO>()
.IgnoreAuditedObjectProperties()
.Ignore(x => x.SupplierName) .Ignore(x => x.SupplierName)
.Ignore(x => x.CurrencyName) .Ignore(x => x.CurrencyName)
.ReverseMap(); .ReverseMap();

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierItems/SupplierItemAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void SupplierItemAutoMapperProfile() private void SupplierItemAutoMapperProfile()
{ {
CreateMap<SupplierItem, SupplierItemDTO>() CreateMap<SupplierItem, SupplierItemDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<SupplierItemImportInput, SupplierItem>() CreateMap<SupplierItemImportInput, SupplierItem>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SupplierTimeWindows/SupplierTimeWindowAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void SupplierTimeWindowAutoMapperProfile() private void SupplierTimeWindowAutoMapperProfile()
{ {
CreateMap<SupplierTimeWindow, SupplierTimeWindowDTO>() CreateMap<SupplierTimeWindow, SupplierTimeWindowDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<SupplierTimeWindowImportInput, SupplierTimeWindow>() CreateMap<SupplierTimeWindowImportInput, SupplierTimeWindow>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Suppliers/SupplierAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void SupplierAutoMapperProfile() private void SupplierAutoMapperProfile()
{ {
CreateMap<Supplier, SupplierDTO>() CreateMap<Supplier, SupplierDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<SupplierImportInput, Supplier>() CreateMap<SupplierImportInput, Supplier>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Teams/TeamAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void TeamAutoMapperProfile() private void TeamAutoMapperProfile()
{ {
CreateMap<Team, TeamDTO>() CreateMap<Team, TeamDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<TeamImportInput, Team>() CreateMap<TeamImportInput, Team>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/TransactionTypes/TransactionTypeAutoMapperProfile.cs

@ -13,7 +13,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void TransactionTypeAutoMapperProfile() private void TransactionTypeAutoMapperProfile()
{ {
CreateMap<TransactionType, TransactionTypeDTO>() CreateMap<TransactionType, TransactionTypeDTO>()
.IgnoreAuditedObjectProperties()
.ForMember(x => x.InLocationTypes, y => y.MapFrom(d => d.InLocationTypes.GetEnumList<EnumLocationType>(","))) .ForMember(x => x.InLocationTypes, y => y.MapFrom(d => d.InLocationTypes.GetEnumList<EnumLocationType>(",")))
.ForMember(x => x.OutLocationTypes, y => y.MapFrom(d => d.OutLocationTypes.GetEnumList<EnumLocationType>(","))) .ForMember(x => x.OutLocationTypes, y => y.MapFrom(d => d.OutLocationTypes.GetEnumList<EnumLocationType>(",")))
.ForMember(x => x.InLocationAreas, y => y.MapFrom(d => d.InLocationAreas.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList())) .ForMember(x => x.InLocationAreas, y => y.MapFrom(d => d.InLocationAreas.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList()))

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Uoms/UomAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void UomAutoMapperProfile() private void UomAutoMapperProfile()
{ {
CreateMap<Uom, UomDTO>() CreateMap<Uom, UomDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<UomImportInput, Uom>() CreateMap<UomImportInput, Uom>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Warehouses/WarehouseAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void WarehouseAutoMapperProfile() private void WarehouseAutoMapperProfile()
{ {
CreateMap<Warehouse, WarehouseDTO>() CreateMap<Warehouse, WarehouseDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
} }
} }

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkCenters/WorkCenterAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void WorkStationAutoMapperProfile() private void WorkStationAutoMapperProfile()
{ {
CreateMap<WorkStation, WorkStationDTO>() CreateMap<WorkStation, WorkStationDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
} }
} }

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkGroups/WorkGroupAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void WorkGroupAutoMapperProfile() private void WorkGroupAutoMapperProfile()
{ {
CreateMap<WorkGroup, WorkGroupDTO>() CreateMap<WorkGroup, WorkGroupDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<WorkGroupImportInput, WorkGroup>() CreateMap<WorkGroupImportInput, WorkGroup>()

1
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/WorkShops/WorkShopAutoMapperProfile.cs

@ -10,7 +10,6 @@ public partial class BasedataApplicationAutoMapperProfile : Profile
private void WorkShopAutoMapperProfile() private void WorkShopAutoMapperProfile()
{ {
CreateMap<WorkShop, WorkShopDTO>() CreateMap<WorkShop, WorkShopDTO>()
.IgnoreAuditedObjectProperties()
.ReverseMap(); .ReverseMap();
CreateMap<WorkShopImportInput, WorkShop>() CreateMap<WorkShopImportInput, WorkShop>()

3
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Enum/EnumCustomerType.cs

@ -10,4 +10,7 @@ public enum EnumCustomerType
[Display(Name = "空")] [Display(Name = "空")]
None = 0, None = 0,
[Display(Name = "普通用户")]
Normal = 1,
} }

2
be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/WorkCenters/WorkCenter.cs

@ -10,7 +10,7 @@ namespace Win_in.Sfs.Basedata.Domain;
/// </summary> /// </summary>
public class WorkStation : SfsBaseDataAggregateRootBase, IHasCode, IHasName public class WorkStation : SfsBaseDataAggregateRootBase, IHasCode, IHasName
{ {
[Display(Name = "码")] [Display(Name = "工作中心代码")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")]
[IgnoreUpdate] [IgnoreUpdate]

1
be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/Containers/Inputs/ContainerImportInput.cs

@ -28,6 +28,7 @@ public class ContainerImportInput : SfsImportInputBase
/// 状态 /// 状态
/// </summary> /// </summary>
[Display(Name = "状态")] [Display(Name = "状态")]
[Required(ErrorMessage = "{0}是必填项")]
public EnumContainerStatus Status { get; set; } public EnumContainerStatus Status { get; set; }
/// <summary> /// <summary>

4
be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application.Contracts/LocationCapacitys/Inputs/LocationCapacityImportInput.cs

@ -21,23 +21,27 @@ public class LocationCapacityImportInput : SfsImportInputBase
/// 已用容量 /// 已用容量
/// </summary> /// </summary>
[Display(Name = "已用容量")] [Display(Name = "已用容量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal UsedCapacity { get; set; } public decimal UsedCapacity { get; set; }
/// <summary> /// <summary>
/// 可用容量 /// 可用容量
/// </summary> /// </summary>
[Display(Name = "可用容量")] [Display(Name = "可用容量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal AvailableCapacity { get; set; } public decimal AvailableCapacity { get; set; }
/// <summary> /// <summary>
/// 可承受过载容量 /// 可承受过载容量
/// </summary> /// </summary>
[Display(Name = "可承受过载容量")] [Display(Name = "可承受过载容量")]
[Required(ErrorMessage = "{0}是必填项")]
public decimal BearableOverloadCapacity { get; set; } public decimal BearableOverloadCapacity { get; set; }
/// <summary> /// <summary>
/// 是否无穷大 /// 是否无穷大
/// </summary> /// </summary>
[Display(Name = "是否无穷大")] [Display(Name = "是否无穷大")]
[Required(ErrorMessage = "{0}是必填项")]
public bool IsInfinity { get; set; } public bool IsInfinity { get; set; }
} }

30
be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Event/appsettings.json

@ -1,17 +1,17 @@
{ {
"RabbitMQ": { //"RabbitMQ": {
"Connections": { // "Connections": {
"Default": { // "Default": {
"HostName": "127.0.0.1", // "HostName": "127.0.0.1",
"Port": 5672, // "Port": 5672,
"UserName": "admin", // "UserName": "admin",
"Password": "admin", // "Password": "admin",
"VirtualHost": "my_vhost" // "VirtualHost": "my_vhost"
} // }
}, // },
"EventBus": { // "EventBus": {
"ClientName": "Inventory", // "ClientName": "Inventory",
"ExchangeName": "InventoryMessages" // "ExchangeName": "InventoryMessages"
} // }
} //}
} }

2
be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/InventoryLabelEditInput.cs

@ -203,6 +203,7 @@ public class InventoryLabelEditInput : SfsLabelCreateOrUpdateInputBase
/// </summary> /// </summary>
[Display(Name = "供应商零件名")] [Display(Name = "供应商零件名")]
public string SupplierItemName { get; set; } public string SupplierItemName { get; set; }
#endregion #endregion
#region Create #region Create
@ -219,5 +220,6 @@ public class InventoryLabelEditInput : SfsLabelCreateOrUpdateInputBase
[Display(Name = "标签类型")] [Display(Name = "标签类型")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
public EnumLabelType LabelType { get; set; } public EnumLabelType LabelType { get; set; }
#endregion #endregion
} }

1
be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/LabelDefinitions/Inputs/LabelDefinitionImportInput.cs

@ -39,6 +39,7 @@ public class LabelDefinitionImportInput : SfsImportInputBase
/// 流水长度 /// 流水长度
/// </summary> /// </summary>
[Display(Name = "流水长度")] [Display(Name = "流水长度")]
[Required(ErrorMessage = "{0}是必填项")]
public int SerialLength { get; set; } public int SerialLength { get; set; }
/// <summary> /// <summary>

15
be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs

@ -60,17 +60,14 @@ public class InventoryLabelAppService
[HttpPost("many")] [HttpPost("many")]
public virtual async Task<List<InventoryLabelDto>> CreateManyAsync(List<InventoryLabelEditInput> inputs) public virtual async Task<List<InventoryLabelDto>> CreateManyAsync(List<InventoryLabelEditInput> inputs)
{ {
var codes = inputs.Select(p => p.Code).ToList(); List<InventoryLabelDto> inventoryLabelDtos = new List<InventoryLabelDto>();
var existEntities = await GetByCodesAsync(codes).ConfigureAwait(false);
if (existEntities.Any()) foreach (var input in inputs)
{ {
var existCodes = existEntities.Select(p => p.Code).ToList(); inventoryLabelDtos.Add(await CreateAsync(input));
throw new UserFriendlyException($"{existCodes.JoinAsString(",")} 已存在");
} }
var entities = ObjectMapper.Map<List<InventoryLabelEditInput>, List<InventoryLabel>>(inputs);
await Repository.InsertManyAsync(entities).ConfigureAwait(false); return inventoryLabelDtos;
var dtos = ObjectMapper.Map<List<InventoryLabel>, List<InventoryLabelDto>>(entities);
return dtos;
} }
[HttpPost("generate-and-create")] [HttpPost("generate-and-create")]

10
be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAutoMapperProfile.cs

@ -22,6 +22,16 @@ public class InventoryLabelAutoMapperProfile : Profile
.Ignore(x => x.Remark) .Ignore(x => x.Remark)
.Ignore(x => x.ExtraProperties); .Ignore(x => x.ExtraProperties);
CreateMap<InventoryLabelEditInput, InventoryLabel>()
.IgnoreAuditedObjectProperties()
.MapQualityInfoDto()
.MapPurchaseInfoDto()
.MapProductionInfoDto()
.Ignore(x=>x.Id)
.Ignore(x => x.ConcurrencyStamp)
;
CreateMap<InventoryLabelImportInput, InventoryLabel>() CreateMap<InventoryLabelImportInput, InventoryLabel>()
.IgnoreAuditedObjectProperties() .IgnoreAuditedObjectProperties()
.MapPurchaseInfoDto() .MapPurchaseInfoDto()

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

Loading…
Cancel
Save