You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
2.3 KiB
C#
104 lines
2.3 KiB
C#
using FluentValidation;
|
|
|
|
namespace DS.WMS.Core.WmsModule.Dtos;
|
|
|
|
public class WmsInPlanGoodsInput
|
|
{
|
|
public Guid? GID { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public Guid? WMSPLANID { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string GOODSCODE { get; set; } = "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string GOODSNAME { get; set; } = "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string GOODSMODEL { get; set; } = "";
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? KGS { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? CBM { get; set; }= 0;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? PKGS { get; set; }= 0;
|
|
|
|
/// <summary>
|
|
/// 成交单位/仓储计费单位 库存的收费标准单位
|
|
/// </summary>
|
|
public string STORAGEUNIT { get; set; } = "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? STORAGEUNITCOUNT { get; set; }
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string REMARK { get; set; } = "";
|
|
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? NETWEIGHT { get; set; }= 0;
|
|
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string TRUCKNO { get; set; } = "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string DRIVERNAME { get; set; } = "";
|
|
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string MBLNO { get; set; } = "";
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 验证
|
|
/// </summary>
|
|
public class WmsInPlanGoodsInputValidator : AbstractValidator<WmsInPlanGoodsInput>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public WmsInPlanGoodsInputValidator()
|
|
{
|
|
this.RuleFor(o => o.GOODSCODE)
|
|
.NotEmpty().WithName("商品编码");
|
|
this.RuleFor(o => o.GOODSNAME)
|
|
.NotEmpty().WithName("商品名称");
|
|
this.RuleFor(o => o.TRUCKNO)
|
|
.NotEmpty().WithName("承运车辆");
|
|
this.RuleFor(o => o.PKGS)
|
|
.GreaterThan(0).WithName("件数必须大于零");
|
|
this.RuleFor(o => o.STORAGEUNITCOUNT)
|
|
.GreaterThan(0).WithName("计费数量必须大于零");
|
|
}
|
|
} |