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.
200 lines
4.4 KiB
C#
200 lines
4.4 KiB
C#
using DS.Module.Core.Extensions;
|
|
using FluentValidation;
|
|
|
|
namespace DS.WMS.Core.WmsModule.Dtos;
|
|
|
|
public class WmsOutPlanDetailInput
|
|
{
|
|
public Guid? WMSOUTDETAILID { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public Guid? WMSPLANID { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public Guid? WMSID { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string MBLNO { get; set; }= "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string CNTRNO { get; set; }= "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string MATERIALNO { 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 GOODSHSCODE { get; set; } = "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? KGS { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? PKGS { get; set; }= 0;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? CBM { get; set; }= 0;
|
|
|
|
// /// <summary>
|
|
// ///
|
|
// /// </summary>
|
|
// public string KINDPKGS { get; set; }= "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string STORAGEUNIT { get; set; } = "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? STORAGEUNITCOUNT { get; set; }= 0;
|
|
|
|
// /// <summary>
|
|
// ///
|
|
// /// </summary>
|
|
// public string RULEUNIT { get; set; } = "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? RULEUNITCOUNT { get; set; }= 0;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public Guid? WMSPHYSICSID { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? NETWEIGHT { get; set; } = 0;
|
|
|
|
// /// <summary>
|
|
// ///
|
|
// /// </summary>
|
|
// public string CUSTOMNO { get; set; }= "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public Guid? PLAN_BEFORE_DETAIL_GID { get; set; }
|
|
|
|
// /// <summary>
|
|
// ///
|
|
// /// </summary>
|
|
// public string CUSTOMNO_OUT { get; set; }= "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string HZQDBH { get; set; }= "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public DateTime? SBRQ { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? RULEPRICE { get; set; }= 0;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? RULEAMOUNT { get; set; }= 0;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public Guid? OP { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string CUSTNO_OUT { get; set; }= "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? SMALLPKGS { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public decimal? MINPKGS { get; set; }= 0;
|
|
|
|
public string AREACODE{ get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string GOODSMODEL { get; set; }= "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string TRUCKNO { get; set; }= "";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string GOODSMODEL2 { get; set; }
|
|
|
|
/// <summary>
|
|
/// 托盘数
|
|
/// </summary>
|
|
public decimal Pallets { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 验证
|
|
/// </summary>
|
|
public class WmsOutPlanDetailInputValidator : AbstractValidator<WmsOutPlanDetailInput>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public WmsOutPlanDetailInputValidator()
|
|
{
|
|
this.RuleFor(o => o.PKGS)
|
|
.GreaterThan(0).WithName("件数必须大于零");
|
|
this.RuleFor(o => o.STORAGEUNITCOUNT)
|
|
.GreaterThan(0).WithMessage("计费数量必须大于0")
|
|
.Custom((weight, context) => {
|
|
if (weight.ToDecimal()<0)
|
|
{
|
|
context.AddFailure("计费数量必须为正数!");
|
|
}
|
|
});
|
|
}
|
|
} |