Add WmsLite monorepo with JWT auth, tenant context, and project READMEs.
Implement API security baseline (sys_user, JWT, audit fields, transactions, unique constraints) and Web real login with 401 handling. Document setup and development workflows in root, WmsLite.Api, and WmsLite.Web README files. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
fa1b286463
241 files changed
+31188
No files matched your search
@@ -0,0 +1,58 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using WmsLite.Api.Dtos.Common;
|
||||
using WmsLite.Api.Enums;
|
||||
|
||||
namespace WmsLite.Api.Dtos.Location;
|
||||
|
||||
public class LocationBatchCreateRequest : TenantOwnerRequest
|
||||
{
|
||||
[Required(ErrorMessage = "仓库编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string WarehouseCode { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "库区编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string AreaCode { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "分区编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string ZoneCode { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "伸位编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string AisleCode { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[EnumDataType(typeof(ShelfDepthKind), ErrorMessage = "伸位类型无效。")]
|
||||
public ShelfDepthKind ShelfDepthKind { get; set; }
|
||||
|
||||
[Range(1, int.MaxValue, ErrorMessage = "列起始须 ≥ 1。")]
|
||||
public int ColumnFrom { get; set; }
|
||||
|
||||
[Range(1, int.MaxValue, ErrorMessage = "列结束须 ≥ 1。")]
|
||||
public int ColumnTo { get; set; }
|
||||
|
||||
[Range(1, int.MaxValue, ErrorMessage = "层起始须 ≥ 1。")]
|
||||
public int LayerFrom { get; set; }
|
||||
|
||||
[Range(1, int.MaxValue, ErrorMessage = "层结束须 ≥ 1。")]
|
||||
public int LayerTo { get; set; }
|
||||
|
||||
public decimal? Height { get; set; }
|
||||
|
||||
[Required]
|
||||
[EnumDataType(typeof(LocationStatus), ErrorMessage = "LocationStatus 无效。")]
|
||||
public LocationStatus LocationStatus { get; set; } = LocationStatus.Empty;
|
||||
|
||||
/// <summary>占位符含 Warehouse Area Zone Aisle Row Col Layer(Zone 为分区编码),可加格式如 Row:D2。</summary>
|
||||
[Required(ErrorMessage = "库位编码模板不能为空。")]
|
||||
[StringLength(512)]
|
||||
public string CodeTemplate { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(512)]
|
||||
public string? NameTemplate { get; set; }
|
||||
|
||||
[Required]
|
||||
[EnumDataType(typeof(LocationBatchDuplicatePolicy), ErrorMessage = "重复策略无效。")]
|
||||
public LocationBatchDuplicatePolicy DuplicatePolicy { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace WmsLite.Api.Dtos.Location;
|
||||
|
||||
public class LocationBatchCreateResultDto
|
||||
{
|
||||
public int CreatedCount { get; set; }
|
||||
|
||||
/// <summary>跳过(已在库中存在)或整批中止时重复的编码。</summary>
|
||||
public List<string> SkippedCodes { get; set; } = new();
|
||||
|
||||
public string? FailedReason { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using WmsLite.Api.Dtos.Common;
|
||||
using WmsLite.Api.Enums;
|
||||
|
||||
namespace WmsLite.Api.Dtos.Location;
|
||||
|
||||
public class LocationPagedQuery : BasePagedQuery
|
||||
{
|
||||
[StringLength(64)]
|
||||
public string? WarehouseCode { get; set; }
|
||||
|
||||
[StringLength(64)]
|
||||
public string? AreaCode { get; set; }
|
||||
|
||||
/// <summary>分区编码筛选。</summary>
|
||||
[StringLength(64)]
|
||||
public string? ZoneCode { get; set; }
|
||||
|
||||
[StringLength(64)]
|
||||
public string? AisleCode { get; set; }
|
||||
|
||||
[StringLength(64)]
|
||||
public string? Code { get; set; }
|
||||
|
||||
[StringLength(256)]
|
||||
public string? Name { get; set; }
|
||||
|
||||
public LocationStatus? LocationStatus { get; set; }
|
||||
|
||||
public bool? IsOuter { get; set; }
|
||||
|
||||
[StringLength(64)]
|
||||
public string? ContainerCode { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using WmsLite.Api.Dtos.Common;
|
||||
using WmsLite.Api.Enums;
|
||||
|
||||
namespace WmsLite.Api.Dtos.Location;
|
||||
|
||||
public class LocationSaveRequest : TenantOwnerRequest
|
||||
{
|
||||
[Required(ErrorMessage = "仓库编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string WarehouseCode { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "库区编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string AreaCode { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "分区编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string ZoneCode { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(64)]
|
||||
public string? AisleCode { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "储位编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string Code { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(256)]
|
||||
public string? Name { get; set; }
|
||||
|
||||
public int? RowNo { get; set; }
|
||||
|
||||
public int? ColumnNo { get; set; }
|
||||
|
||||
public int? LayerNo { get; set; }
|
||||
|
||||
public decimal? Height { get; set; }
|
||||
|
||||
[Required]
|
||||
[EnumDataType(typeof(LocationStatus), ErrorMessage = "LocationStatus 无效。")]
|
||||
public LocationStatus LocationStatus { get; set; } = LocationStatus.Empty;
|
||||
|
||||
public bool IsOuter { get; set; }
|
||||
|
||||
[StringLength(64)]
|
||||
public string? ContainerCode { get; set; }
|
||||
|
||||
public Dictionary<string, object>? Attrs { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using WmsLite.Api.Dtos.Common;
|
||||
using WmsLite.Api.Enums;
|
||||
|
||||
namespace WmsLite.Api.Dtos.Location;
|
||||
|
||||
public class LocationUpdateRequest : TenantOwnerRequest
|
||||
{
|
||||
[Range(1, long.MaxValue, ErrorMessage = "Id 必须大于 0。")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "仓库编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string WarehouseCode { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "库区编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string AreaCode { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "分区编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string ZoneCode { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(64)]
|
||||
public string? AisleCode { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "储位编码不能为空。")]
|
||||
[StringLength(64)]
|
||||
public string Code { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(256)]
|
||||
public string? Name { get; set; }
|
||||
|
||||
public int? RowNo { get; set; }
|
||||
|
||||
public int? ColumnNo { get; set; }
|
||||
|
||||
public int? LayerNo { get; set; }
|
||||
|
||||
public decimal? Height { get; set; }
|
||||
|
||||
[Required]
|
||||
[EnumDataType(typeof(LocationStatus), ErrorMessage = "LocationStatus 无效。")]
|
||||
public LocationStatus LocationStatus { get; set; } = LocationStatus.Empty;
|
||||
|
||||
public bool IsOuter { get; set; }
|
||||
|
||||
[StringLength(64)]
|
||||
public string? ContainerCode { get; set; }
|
||||
|
||||
public Dictionary<string, object>? Attrs { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using System.Collections.Generic;
|
||||
using WmsLite.Api.Enums;
|
||||
|
||||
namespace WmsLite.Api.Dtos.Location;
|
||||
|
||||
public class LocationViewDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public string TenantId { get; set; } = string.Empty;
|
||||
|
||||
public string OwnerCode { get; set; } = string.Empty;
|
||||
|
||||
public string WarehouseCode { get; set; } = string.Empty;
|
||||
|
||||
public string AreaCode { get; set; } = string.Empty;
|
||||
|
||||
public string ZoneCode { get; set; } = string.Empty;
|
||||
|
||||
public string? AisleCode { get; set; }
|
||||
|
||||
public string Code { get; set; } = string.Empty;
|
||||
|
||||
public string? Name { get; set; }
|
||||
|
||||
public int? RowNo { get; set; }
|
||||
|
||||
public int? ColumnNo { get; set; }
|
||||
|
||||
public int? LayerNo { get; set; }
|
||||
|
||||
public decimal? Height { get; set; }
|
||||
|
||||
public LocationStatus LocationStatus { get; set; }
|
||||
|
||||
public bool IsOuter { get; set; }
|
||||
|
||||
public string? ContainerCode { get; set; }
|
||||
|
||||
public Dictionary<string, object>? Attrs { get; set; }
|
||||
}
|
||||
Reference in new issue
Block a user