盘点增加序列号
This commit is contained in:
@@ -28,12 +28,10 @@ namespace WMS.Web.Core.Dto.OutStock
|
||||
/// <summary>
|
||||
/// 物料Id
|
||||
///</summary>
|
||||
[Required(ErrorMessage = "物料不能为空")]
|
||||
public int MaterialId { get; set; }
|
||||
/// <summary>
|
||||
/// 出库数量
|
||||
///</summary>
|
||||
[Required(ErrorMessage = "出库数量不能为空")]
|
||||
public decimal Qty { get; set; }
|
||||
/// <summary>
|
||||
/// 箱Id
|
||||
@@ -43,7 +41,6 @@ namespace WMS.Web.Core.Dto.OutStock
|
||||
/// <summary>
|
||||
/// 箱对应仓位不能为空
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "仓位不能为空")]
|
||||
public int SubStockId { get; set; }
|
||||
/// <summary>
|
||||
/// 序列号集
|
||||
|
||||
@@ -40,6 +40,11 @@ namespace WMS.Web.Core.Dto.TakeStock
|
||||
[Required(ErrorMessage = "盘点数量数量不能为空")]
|
||||
public decimal AfterQty { get; set; }
|
||||
/// <summary>
|
||||
/// 序列号
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "序列号不能为空")]
|
||||
public List<string> SerialNumbers { get; set; } = new List<string>();
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
@@ -97,6 +97,11 @@ namespace WMS.Web.Domain.Entitys
|
||||
[Column("Remark")]
|
||||
public string Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 序列号
|
||||
/// </summary>
|
||||
[Column("SerialNumbers")]
|
||||
public List<string> SerialNumbers { get; set; } = new List<string>();
|
||||
/// <summary>
|
||||
/// 创建
|
||||
/// </summary>
|
||||
/// <param name="creatorId"></param>
|
||||
|
||||
@@ -72,6 +72,11 @@ namespace WMS.Web.Domain.Services
|
||||
if (ex.Count() > 0)
|
||||
return Result.ReFailure(ResultCodes.OutStockMaterialError);
|
||||
//1.需要验证物料对应箱和序列号是否存在库存
|
||||
//如果是按箱出库从库存拿取数据
|
||||
if(dto.Method==1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
var mIds = dto.Details.GroupBy(g => g.MaterialId).Select(s => s.Key).ToList();
|
||||
OutStock entity = new OutStock();
|
||||
|
||||
@@ -167,6 +167,10 @@ namespace WMS.Web.Repositories.Configuration
|
||||
// .WithOne()
|
||||
// .HasForeignKey(p => p.Fid)
|
||||
// .OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
ent.Property(f => f.SerialNumbers).HasConversion(
|
||||
v => JsonConvert.SerializeObject(v),
|
||||
v => JsonConvert.DeserializeObject<List<string>>(v));
|
||||
});
|
||||
builder.Entity<TakeStockDetails>(ent =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user