修复bug
This commit is contained in:
@@ -92,6 +92,11 @@ namespace WMS.Web.Domain.Entitys
|
||||
///</summary>
|
||||
[Column("CustomerId")]
|
||||
public int CustomerId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 是否出库
|
||||
///</summary>
|
||||
[Column("IsOutStock")]
|
||||
public bool? IsOutStock { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 操作(绑定箱信息)
|
||||
@@ -126,6 +131,8 @@ namespace WMS.Web.Domain.Entitys
|
||||
this.CustomerId = outStock.ReceiptCustomerId;
|
||||
this.OutStockTime = DateTime.Now;
|
||||
}
|
||||
//标识出库
|
||||
this.IsOutStock = true;
|
||||
}
|
||||
/// <summary>
|
||||
/// 入库
|
||||
|
||||
@@ -81,5 +81,10 @@ namespace WMS.Web.Domain.Entitys
|
||||
///</summary>
|
||||
[Column("CustomerId")]
|
||||
public int CustomerId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 是否出库
|
||||
///</summary>
|
||||
[Column("IsOutStock")]
|
||||
public bool? IsOutStock { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,7 +393,10 @@ namespace WMS.Web.Domain.Services
|
||||
//if (backRecord.Type == BackRecordType.InstockOff)
|
||||
// entity.UnBind();
|
||||
if (backRecord.Type == BackRecordType.OutstockOn)
|
||||
{
|
||||
entity.Bind(detail.BoxId, box.CompleteCartonTime);
|
||||
entity.IsOutStock = false;//标识出库状态
|
||||
}
|
||||
|
||||
|
||||
//记录序列号操作日志
|
||||
|
||||
@@ -248,7 +248,7 @@ namespace WMS.Web.Repositories
|
||||
.SelectMany(x => x.boxInventory.DefaultIfEmpty(), (p, boxInventory) => new { p.serial, boxInventory })
|
||||
.GroupJoin(_context.Box, s => s.serial.BoxId, box => box.Id, (s, box) => new { s.serial, s.boxInventory, box })
|
||||
.SelectMany(x => x.box.DefaultIfEmpty(), (p, box) => new { p.serial, p.boxInventory, box })
|
||||
.FirstOrDefaultAsync(w => serialNumber.Equals(w.serial.SerialNumber));
|
||||
.FirstOrDefaultAsync(w => serialNumber.Equals(w.serial.SerialNumber) && w.serial.IsOutStock != true);
|
||||
if (entity == null || entity.serial == null)
|
||||
{
|
||||
if (IsOps)
|
||||
@@ -289,13 +289,13 @@ namespace WMS.Web.Repositories
|
||||
//.SelectMany(x => x.boxInventory.DefaultIfEmpty(), (p, boxInventory) => new { p.serial, boxInventory })
|
||||
//.GroupJoin(_context.Box, s => s.serial.BoxId, box => box.Id, (s, box) => new { s.serial, s.boxInventory, box })
|
||||
//.SelectMany(x => x.box.DefaultIfEmpty(), (p, box) => new { p.serial, p.boxInventory, box })
|
||||
.FirstOrDefaultAsync(w => serialNumber.Equals(w.SerialNumber));
|
||||
.FirstOrDefaultAsync(w => serialNumber.Equals(w.SerialNumber) && w.IsOutStock != true);
|
||||
if (entity == null) return null;
|
||||
response.IsOldOps = true;
|
||||
response.IsBoxInventory = true;//如果是老ops序列号 默认有库存
|
||||
response.BoxId = 0;
|
||||
response.BoxBillNo = "";
|
||||
response.SubStockCode = "";
|
||||
response.BoxBillNo = "";
|
||||
response.SubStockCode = "";
|
||||
response.SerialNumber = entity.SerialNumber;
|
||||
response.MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, entity.MaterialNumber);
|
||||
response.MaterialNumber = entity.MaterialNumber;
|
||||
|
||||
Reference in New Issue
Block a user