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,244 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using WmsLite.Api.Dtos.Common;
|
||||
using WmsLite.Api.Enums;
|
||||
|
||||
namespace WmsLite.Api.Dtos.Orders;
|
||||
|
||||
public abstract class OrderSaveRequestBase : TenantOwnerRequest
|
||||
{
|
||||
[Required]
|
||||
[StringLength(128)]
|
||||
public string OrderNo { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(64)]
|
||||
public string? BizType { get; set; }
|
||||
|
||||
[StringLength(512)]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public Dictionary<string, object>? Attrs { get; set; }
|
||||
}
|
||||
|
||||
public abstract class OrderPagedQueryBase : BasePagedQuery
|
||||
{
|
||||
[StringLength(128)]
|
||||
public string? OrderNo { get; set; }
|
||||
|
||||
[StringLength(64)]
|
||||
public string? BizType { get; set; }
|
||||
|
||||
public OrderStatus? OrderStatus { get; set; }
|
||||
}
|
||||
|
||||
public class OrderActionRequest : TenantOwnerRequest
|
||||
{
|
||||
[Range(1, long.MaxValue)]
|
||||
public long Id { get; set; }
|
||||
}
|
||||
|
||||
public class InventoryOrderLineRequest
|
||||
{
|
||||
[Required]
|
||||
[EnumDataType(typeof(InventoryKind))]
|
||||
public InventoryKind InventoryKind { get; set; } = InventoryKind.Material;
|
||||
|
||||
[StringLength(64)]
|
||||
public string? MaterialCode { get; set; }
|
||||
|
||||
[StringLength(64)]
|
||||
public string? ContainerCode { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string WarehouseCode { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string AreaCode { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string LocationCode { get; set; } = string.Empty;
|
||||
|
||||
[Range(typeof(decimal), "0.000001", "9999999999999999")]
|
||||
public decimal Qty { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(32)]
|
||||
public string Unit { get; set; } = string.Empty;
|
||||
|
||||
public Dictionary<string, object>? Attrs { get; set; }
|
||||
}
|
||||
|
||||
public class TransferOrderLineRequest
|
||||
{
|
||||
[Required]
|
||||
[EnumDataType(typeof(InventoryKind))]
|
||||
public InventoryKind InventoryKind { get; set; } = InventoryKind.Material;
|
||||
|
||||
[StringLength(64)]
|
||||
public string? MaterialCode { get; set; }
|
||||
|
||||
[StringLength(64)]
|
||||
public string? ContainerCode { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string FromWarehouseCode { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string FromAreaCode { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string FromLocationCode { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string ToWarehouseCode { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string ToAreaCode { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string ToLocationCode { get; set; } = string.Empty;
|
||||
|
||||
[Range(typeof(decimal), "0.000001", "9999999999999999")]
|
||||
public decimal Qty { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(32)]
|
||||
public string Unit { get; set; } = string.Empty;
|
||||
|
||||
public Dictionary<string, object>? Attrs { get; set; }
|
||||
}
|
||||
|
||||
public class StocktakeOrderLineRequest : InventoryOrderLineRequest
|
||||
{
|
||||
[Range(typeof(decimal), "0", "9999999999999999")]
|
||||
public decimal CountedQty { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>入库单新建:单号后端生成,无单头扩展 JSON。</summary>
|
||||
public class InboundOrderCreateRequest : TenantOwnerRequest
|
||||
{
|
||||
[StringLength(64)]
|
||||
public string? BizType { get; set; }
|
||||
|
||||
[StringLength(512)]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
[MinLength(1)]
|
||||
public List<InboundOrderLineSaveRequest> Lines { get; set; } = new();
|
||||
}
|
||||
|
||||
public class InboundOrderLineSaveRequest
|
||||
{
|
||||
[Required]
|
||||
[EnumDataType(typeof(InventoryKind))]
|
||||
public InventoryKind InventoryKind { get; set; } = InventoryKind.Material;
|
||||
|
||||
[StringLength(64)]
|
||||
public string? MaterialCode { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string WarehouseCode { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string AreaCode { get; set; } = string.Empty;
|
||||
|
||||
[Range(typeof(decimal), "0.000001", "9999999999999999")]
|
||||
public decimal Qty { get; set; }
|
||||
|
||||
public Dictionary<string, object>? Attrs { get; set; }
|
||||
}
|
||||
|
||||
public class InboundOrderLineConfirmRequest : TenantOwnerRequest
|
||||
{
|
||||
[Required]
|
||||
public string LineId { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(64)]
|
||||
public string LocationCode { get; set; } = string.Empty;
|
||||
|
||||
[Range(typeof(decimal), "0.000001", "9999999999999999")]
|
||||
public decimal Qty { get; set; }
|
||||
|
||||
/// <summary>空容器行必填;物料行可选(绑定容器)。</summary>
|
||||
[StringLength(64)]
|
||||
public string? ContainerCode { get; set; }
|
||||
|
||||
/// <summary>物料行可省略,以物料主数据单位写入库存;空容器行必填。</summary>
|
||||
[StringLength(32)]
|
||||
public string? Unit { get; set; }
|
||||
}
|
||||
|
||||
public class InboundConfirmLineResultDto
|
||||
{
|
||||
public OrderViewDto Order { get; set; } = null!;
|
||||
|
||||
public InventoryOrderLineViewDto Line { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class OutboundOrderSaveRequest : OrderSaveRequestBase
|
||||
{
|
||||
[MinLength(1)]
|
||||
public List<InventoryOrderLineRequest> Lines { get; set; } = new();
|
||||
}
|
||||
|
||||
public class TransferOrderSaveRequest : OrderSaveRequestBase
|
||||
{
|
||||
[MinLength(1)]
|
||||
public List<TransferOrderLineRequest> Lines { get; set; } = new();
|
||||
}
|
||||
|
||||
public class StocktakeOrderSaveRequest : OrderSaveRequestBase
|
||||
{
|
||||
[MinLength(1)]
|
||||
public List<StocktakeOrderLineRequest> Lines { get; set; } = new();
|
||||
}
|
||||
|
||||
public class InboundOrderPagedQuery : OrderPagedQueryBase
|
||||
{
|
||||
}
|
||||
|
||||
public class OutboundOrderPagedQuery : OrderPagedQueryBase
|
||||
{
|
||||
}
|
||||
|
||||
public class TransferOrderPagedQuery : OrderPagedQueryBase
|
||||
{
|
||||
}
|
||||
|
||||
public class StocktakeOrderPagedQuery : OrderPagedQueryBase
|
||||
{
|
||||
}
|
||||
|
||||
public class OrderViewDto
|
||||
{
|
||||
/// <summary>雪花主键,用字符串避免 JSON number + 前端精度丢失。</summary>
|
||||
public string Id { get; set; } = string.Empty;
|
||||
|
||||
public string TenantId { get; set; } = string.Empty;
|
||||
|
||||
public string OwnerCode { get; set; } = string.Empty;
|
||||
|
||||
public string OrderNo { get; set; } = string.Empty;
|
||||
|
||||
public string? BizType { get; set; }
|
||||
|
||||
public OrderStatus OrderStatus { get; set; }
|
||||
|
||||
public string? Remark { get; set; }
|
||||
|
||||
public Dictionary<string, object>? Attrs { get; set; }
|
||||
|
||||
public DateTime? CreateTime { get; set; }
|
||||
}
|
||||
Reference in new issue
Block a user