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.
99 lines
2.1 KiB
C#
99 lines
2.1 KiB
C#
using DS.Module.Core.Extensions;
|
|
using FluentValidation;
|
|
|
|
namespace DS.WMS.Core.WmsModule.Dtos;
|
|
|
|
public class WmsClearanceDetailInput
|
|
{
|
|
public Guid? WMSCLEARANCEDETAILID { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public Guid? WMSPLANID { get; set; }
|
|
|
|
public string MATERIALNO { get; set; } = "";
|
|
|
|
public string GoodsId { get; set; }
|
|
|
|
public string GOODSCODE { get; set; } = "";
|
|
|
|
public string GOODSNAME { get; set; } = "";
|
|
|
|
|
|
public string GOODSHSCODE { get; set; } = "";
|
|
|
|
public string GOODSMODEL { get; set; } = "";
|
|
|
|
public string MBLNO { get; set; } = "";
|
|
|
|
|
|
public string CNTRNO { get; set; } = "";
|
|
|
|
|
|
public string STOREHOUSE { get; set; } = "";
|
|
|
|
|
|
public string AREACODE { get; set; } = "";
|
|
|
|
|
|
public decimal? KGS { get; set; } = 0;
|
|
|
|
|
|
public decimal? CBM { get; set; } = 0;
|
|
|
|
|
|
public decimal? PKGS { get; set; } = 0;
|
|
|
|
|
|
public string KINDPKGS { get; set; } = "";
|
|
|
|
public string STORAGEUNIT { get; set; } = "";
|
|
|
|
public decimal? STORAGEUNITCOUNT { get; set; }
|
|
|
|
public string RULEUNIT { get; set; } = "";
|
|
|
|
public decimal? RULEUNITCOUNT { get; set; } = 0;
|
|
|
|
|
|
public Guid? WMSID { get; set; }
|
|
|
|
public Guid? WMSPHYSICSID { get; set; }
|
|
|
|
public decimal? NETWEIGHT { get; set; } = 0;
|
|
|
|
public string CUSTOMNO { get; set; } = "";
|
|
|
|
public string TRUCKNO { get; set; } = "";
|
|
|
|
public DateTime? DETAILDODATE { get; set; }
|
|
|
|
public bool? CLEARWMS { get; set; }
|
|
|
|
|
|
public decimal? SMALLPKGS { get; set; } = 0;
|
|
|
|
public decimal? MINPKGS { get; set; } = 0;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 验证
|
|
/// </summary>
|
|
public class WmsClearanceDetailInputValidator : AbstractValidator<WmsClearanceDetailInput>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public WmsClearanceDetailInputValidator()
|
|
{
|
|
this.RuleFor(o => o.STORAGEUNITCOUNT)
|
|
.GreaterThan(0).WithMessage("数量必须大于0")
|
|
.Custom((weight, context) => {
|
|
if (weight.ToDecimal()<0)
|
|
{
|
|
context.AddFailure("数量必须为正数!");
|
|
}
|
|
});
|
|
}
|
|
} |