增加箱子完成装箱时间
This commit is contained in:
@@ -1566,6 +1566,11 @@
|
||||
创建时间(老ops过来)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Domain.Entitys.SerialNumbers.CompleteCartonTime">
|
||||
<summary>
|
||||
完成装箱时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Domain.Entitys.SerialNumbers.SalBillNo">
|
||||
<summary>
|
||||
出库单对应销售订单号
|
||||
@@ -1591,7 +1596,7 @@
|
||||
收货客户
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.Bind(System.Int32)">
|
||||
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.Bind(System.Int32,System.DateTime)">
|
||||
<summary>
|
||||
操作(绑定箱信息)
|
||||
</summary>
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace WMS.Web.Domain.Entitys
|
||||
public class SerialNumbers : EntityBase
|
||||
{
|
||||
public SerialNumbers() { }
|
||||
public SerialNumbers(string serialNumber, int materialId, int boxId, int opsBoxId, string creator, DateTime? createTime)
|
||||
public SerialNumbers(string serialNumber, int materialId, int boxId, int opsBoxId, string creator, DateTime? createTime,DateTime? completeCartonTime)
|
||||
{
|
||||
this.SerialNumber = serialNumber;
|
||||
this.MaterialId = materialId;
|
||||
@@ -23,6 +23,7 @@ namespace WMS.Web.Domain.Entitys
|
||||
this.OpsBoxId = opsBoxId;
|
||||
this.Creator = creator;
|
||||
this.CreateTime = createTime == null ? DateTime.Now : (DateTime)createTime;
|
||||
this.CompleteCartonTime = completeCartonTime;
|
||||
}
|
||||
/// <summary>
|
||||
/// 主键 订单编号
|
||||
@@ -60,6 +61,11 @@ namespace WMS.Web.Domain.Entitys
|
||||
[Column("CreateTime")]
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
/// <summary>
|
||||
/// 完成装箱时间
|
||||
/// </summary>
|
||||
[Column("CompleteCartonTime")]
|
||||
public DateTime? CompleteCartonTime { get; set; }
|
||||
/// <summary>
|
||||
/// 出库单对应销售订单号
|
||||
/// </summary>
|
||||
[Column("SalBillNo")]
|
||||
@@ -89,9 +95,10 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// 操作(绑定箱信息)
|
||||
/// </summary>
|
||||
/// <param name="destBoxId">目标箱号</param>
|
||||
public void Bind(int destBoxId)
|
||||
public void Bind(int destBoxId,DateTime completeCartonTime)
|
||||
{
|
||||
this.BoxId = destBoxId;
|
||||
this.CompleteCartonTime = completeCartonTime;
|
||||
}
|
||||
/// <summary>
|
||||
/// 解绑
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace WMS.Web.Domain.Services
|
||||
.SelectMany(s => s.SerialNumbers)
|
||||
.FirstOrDefault(s => s.SerialNumber.Equals(sn.SerialNumber));
|
||||
//序列号
|
||||
SerialNumbers s = new SerialNumbers(sn.SerialNumber, detail.MaterialId, b.Id, b.OpsBoxId, opsSerial.BarCereateUser, opsSerial.BarCreateTime);
|
||||
SerialNumbers s = new SerialNumbers(sn.SerialNumber, detail.MaterialId, b.Id, b.OpsBoxId, opsSerial.BarCereateUser, opsSerial.BarCreateTime, b.CompleteCartonTime);
|
||||
sList.Add(s);
|
||||
//序列号记录(序列号生成)
|
||||
SerialNumberOperate so = new SerialNumberOperate(sn.SerialNumber, SerialNumberOperateType.Generate, detail.MaterialId, opsSerial.BarCereateUser, "", b.SupplierId, b.OrgId, null, opsSerial.BarCreateTime);
|
||||
|
||||
@@ -60,10 +60,11 @@ namespace WMS.Web.Domain.Services
|
||||
foreach (var entity in entityList)
|
||||
{
|
||||
var destBox = changeBoxRecords.FirstOrDefault(f => f.SerialNumbers.Contains(entity.SerialNumber));
|
||||
//修改序列号和箱绑定关系
|
||||
entity.Bind(destBox.DestBoxId);
|
||||
|
||||
var box = boxList.FirstOrDefault(f => f.Id == destBox.DestBoxId);
|
||||
//修改序列号和箱绑定关系
|
||||
entity.Bind(destBox.DestBoxId, box.CompleteCartonTime);
|
||||
|
||||
|
||||
//记录序列号操作日志
|
||||
SerialNumberOperate op = new SerialNumberOperate()
|
||||
{
|
||||
@@ -386,7 +387,7 @@ namespace WMS.Web.Domain.Services
|
||||
//if (backRecord.Type == BackRecordType.InstockOff)
|
||||
// entity.UnBind();
|
||||
if (backRecord.Type == BackRecordType.OutstockOn)
|
||||
entity.Bind(detail.BoxId);
|
||||
entity.Bind(detail.BoxId,box.CompleteCartonTime);
|
||||
|
||||
|
||||
//记录序列号操作日志
|
||||
|
||||
Reference in New Issue
Block a user