增加箱子完成装箱时间

This commit is contained in:
18942506660
2023-12-06 11:51:50 +08:00
parent 8389f6d809
commit f43106a784
4 changed files with 21 additions and 8 deletions

View File

@@ -1566,6 +1566,11 @@
创建时间(老ops过来) 创建时间(老ops过来)
</summary> </summary>
</member> </member>
<member name="P:WMS.Web.Domain.Entitys.SerialNumbers.CompleteCartonTime">
<summary>
完成装箱时间
</summary>
</member>
<member name="P:WMS.Web.Domain.Entitys.SerialNumbers.SalBillNo"> <member name="P:WMS.Web.Domain.Entitys.SerialNumbers.SalBillNo">
<summary> <summary>
出库单对应销售订单号 出库单对应销售订单号
@@ -1591,7 +1596,7 @@
收货客户 收货客户
</summary> </summary>
</member> </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>
操作(绑定箱信息) 操作(绑定箱信息)
</summary> </summary>

View File

@@ -15,7 +15,7 @@ namespace WMS.Web.Domain.Entitys
public class SerialNumbers : EntityBase public class SerialNumbers : EntityBase
{ {
public SerialNumbers() { } 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.SerialNumber = serialNumber;
this.MaterialId = materialId; this.MaterialId = materialId;
@@ -23,6 +23,7 @@ namespace WMS.Web.Domain.Entitys
this.OpsBoxId = opsBoxId; this.OpsBoxId = opsBoxId;
this.Creator = creator; this.Creator = creator;
this.CreateTime = createTime == null ? DateTime.Now : (DateTime)createTime; this.CreateTime = createTime == null ? DateTime.Now : (DateTime)createTime;
this.CompleteCartonTime = completeCartonTime;
} }
/// <summary> /// <summary>
/// 主键 订单编号 /// 主键 订单编号
@@ -60,6 +61,11 @@ namespace WMS.Web.Domain.Entitys
[Column("CreateTime")] [Column("CreateTime")]
public DateTime CreateTime { get; set; } = DateTime.Now; public DateTime CreateTime { get; set; } = DateTime.Now;
/// <summary> /// <summary>
/// 完成装箱时间
/// </summary>
[Column("CompleteCartonTime")]
public DateTime? CompleteCartonTime { get; set; }
/// <summary>
/// 出库单对应销售订单号 /// 出库单对应销售订单号
/// </summary> /// </summary>
[Column("SalBillNo")] [Column("SalBillNo")]
@@ -89,9 +95,10 @@ namespace WMS.Web.Domain.Entitys
/// 操作(绑定箱信息) /// 操作(绑定箱信息)
/// </summary> /// </summary>
/// <param name="destBoxId">目标箱号</param> /// <param name="destBoxId">目标箱号</param>
public void Bind(int destBoxId) public void Bind(int destBoxId,DateTime completeCartonTime)
{ {
this.BoxId = destBoxId; this.BoxId = destBoxId;
this.CompleteCartonTime = completeCartonTime;
} }
/// <summary> /// <summary>
/// 解绑 /// 解绑

View File

@@ -87,7 +87,7 @@ namespace WMS.Web.Domain.Services
.SelectMany(s => s.SerialNumbers) .SelectMany(s => s.SerialNumbers)
.FirstOrDefault(s => s.SerialNumber.Equals(sn.SerialNumber)); .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); sList.Add(s);
//序列号记录(序列号生成) //序列号记录(序列号生成)
SerialNumberOperate so = new SerialNumberOperate(sn.SerialNumber, SerialNumberOperateType.Generate, detail.MaterialId, opsSerial.BarCereateUser, "", b.SupplierId, b.OrgId, null, opsSerial.BarCreateTime); SerialNumberOperate so = new SerialNumberOperate(sn.SerialNumber, SerialNumberOperateType.Generate, detail.MaterialId, opsSerial.BarCereateUser, "", b.SupplierId, b.OrgId, null, opsSerial.BarCreateTime);

View File

@@ -60,10 +60,11 @@ namespace WMS.Web.Domain.Services
foreach (var entity in entityList) foreach (var entity in entityList)
{ {
var destBox = changeBoxRecords.FirstOrDefault(f => f.SerialNumbers.Contains(entity.SerialNumber)); var destBox = changeBoxRecords.FirstOrDefault(f => f.SerialNumbers.Contains(entity.SerialNumber));
//修改序列号和箱绑定关系
entity.Bind(destBox.DestBoxId);
var box = boxList.FirstOrDefault(f => f.Id == destBox.DestBoxId); var box = boxList.FirstOrDefault(f => f.Id == destBox.DestBoxId);
//修改序列号和箱绑定关系
entity.Bind(destBox.DestBoxId, box.CompleteCartonTime);
//记录序列号操作日志 //记录序列号操作日志
SerialNumberOperate op = new SerialNumberOperate() SerialNumberOperate op = new SerialNumberOperate()
{ {
@@ -386,7 +387,7 @@ namespace WMS.Web.Domain.Services
//if (backRecord.Type == BackRecordType.InstockOff) //if (backRecord.Type == BackRecordType.InstockOff)
// entity.UnBind(); // entity.UnBind();
if (backRecord.Type == BackRecordType.OutstockOn) if (backRecord.Type == BackRecordType.OutstockOn)
entity.Bind(detail.BoxId); entity.Bind(detail.BoxId,box.CompleteCartonTime);
//记录序列号操作日志 //记录序列号操作日志