增加序列号结构表

This commit is contained in:
18942506660
2023-11-11 10:23:59 +08:00
parent 7707c1615d
commit 27dac5680d
12 changed files with 259 additions and 37 deletions

View File

@@ -65,7 +65,7 @@ namespace WMS.Web.Domain.Entitys
if (d == null) return Result.ReFailure(ResultCodes.BoxMateriaNoData);
d.Qty = d.Qty - l.Qty;
if (d.Qty <= 0) this.Details.Remove(d);
foreach (var s in l.SerialNumbers) d.SerialNumbers.Remove(s);
//foreach (var s in l.SerialNumbers) d.SerialNumbers.Remove(s);
}
return Result.ReSuccess();
}
@@ -82,12 +82,12 @@ namespace WMS.Web.Domain.Entitys
{
MaterialId = l.MaterialId,
Qty=l.Qty,
SerialNumbers=l.SerialNumbers
//SerialNumbers=l.SerialNumbers
});
continue;
}
d.Qty = d.Qty + l.Qty;
d.SerialNumbers.AddRange(l.SerialNumbers);
//d.SerialNumbers.AddRange(l.SerialNumbers);
}
return Result.ReSuccess();
}

View File

@@ -31,9 +31,5 @@ namespace WMS.Web.Domain.Entitys
/// 数量(装箱数量)
/// </summary>
public decimal Qty { get; set; }
/// <summary>
/// 序列号集
/// </summary>
public List<string> SerialNumbers { get; set; } = new List<string>();
}
}

View File

@@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using WMS.Web.Core;
namespace WMS.Web.Domain.Entitys
{
/// <summary>
/// 序列号
/// </summary>
[Serializable]
[Table("t_wms_serialnumbers")]
public class SerialNumbers : EntityBase
{
public SerialNumbers() { }
public SerialNumbers(string serialNumber,int materialId,int boxId,int opsBoxId,string creator,DateTime? createTime)
{
this.SerialNumber = serialNumber;
this.MaterialId = materialId;
this.BoxId = boxId;
this.OpsBoxId = opsBoxId;
this.Creator = creator;
this.CreateTime = createTime == null ? DateTime.Now : (DateTime)createTime;
}
/// <summary>
/// 主键 订单编号
/// </summary>
[Column("Id")]
public override int Id { get; set; }
/// <summary>
/// 序列号
/// </summary>
[Column("SerialNumber")]
public string SerialNumber { get; set; }
/// <summary>
/// 物料ID
/// </summary>
[Column("MaterialId")]
public int MaterialId { get; set; }
/// <summary>
/// wms箱ID
/// </summary>
[Column("BoxId")]
public int BoxId { get; set; }
/// <summary>
/// 对应老OPS的箱ID
/// </summary>
[Column("OpsBoxId")]
public int OpsBoxId { get; set; }
/// <summary>
/// 创建人(老ops过来)
/// </summary>
[Column("Creator")]
public string Creator { get; set; }
/// <summary>
/// 创建时间(老ops过来)
/// </summary>
[Column("CreateTime")]
public DateTime CreateTime { get; set; } = DateTime.Now;
}
}