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.

121 lines
2.7 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; }
public string GoodsId { 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 string GOODSMODEL2 { 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 decimal? MINPKGS { get; set; } = 0;
/// <summary>
/// 托盘数
/// </summary>
public decimal Pallets { get; set; }
/// <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("计费数量必须大于零");
}
}