This commit is contained in:
tongfei
2024-04-11 16:57:37 +08:00
3 changed files with 17 additions and 1 deletions

View File

@@ -2190,6 +2190,11 @@
<param name="type"></param> <param name="type"></param>
<param name="boxId"></param> <param name="boxId"></param>
</member> </member>
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.ChangeBox(System.Boolean)">
<summary>
改箱
</summary>
</member>
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.TakeStock(System.Int32)"> <member name="M:WMS.Web.Domain.Entitys.SerialNumbers.TakeStock(System.Int32)">
<summary> <summary>
盘点 盘点

View File

@@ -183,6 +183,15 @@ namespace WMS.Web.Domain.Entitys
this.IsDelete = true; this.IsDelete = true;
} }
/// <summary> /// <summary>
/// 改箱
/// </summary>
public void ChangeBox(bool IsDestBoxInventory)
{
//(状态为非冻结且激活)改到未上架的箱子内,对应序列号需要修改状态为冻结且激活
if (IsActivate == true && IsDelete != true && IsDestBoxInventory == false)
this.IsDelete = true;
}
/// <summary>
/// 盘点 /// 盘点
/// </summary> /// </summary>
public void TakeStock(int boxId) public void TakeStock(int boxId)

View File

@@ -54,6 +54,7 @@ namespace WMS.Web.Domain.Services
var entityList = await _serialNumbersRepositories.GetEntityList(serialNumbers); var entityList = await _serialNumbersRepositories.GetEntityList(serialNumbers);
var boxIds = changeBoxRecords.Select(s => s.DestBoxId).ToList(); var boxIds = changeBoxRecords.Select(s => s.DestBoxId).ToList();
var boxList = await _boxRepositories.GetEntityList(boxIds); var boxList = await _boxRepositories.GetEntityList(boxIds);
var boxInventorys = await _boxInventoryRepositories.GetList(boxIds);
var userName = _singleDataService.GetSingleData(SingleAction.Staffs, loginInfo.UserInfo.CompanyId, loginInfo.UserInfo.StaffId); var userName = _singleDataService.GetSingleData(SingleAction.Staffs, loginInfo.UserInfo.CompanyId, loginInfo.UserInfo.StaffId);
IDbContextTransaction _transaction = null; IDbContextTransaction _transaction = null;
if (isTransaction) if (isTransaction)
@@ -67,7 +68,8 @@ namespace WMS.Web.Domain.Services
var box = boxList.FirstOrDefault(f => f.Id == destBox.DestBoxId); var box = boxList.FirstOrDefault(f => f.Id == destBox.DestBoxId);
//修改序列号和箱绑定关系 //修改序列号和箱绑定关系
entity.Bind(destBox.DestBoxId, box.CompleteCartonTime); entity.Bind(destBox.DestBoxId, box.CompleteCartonTime);
var boxInventory = boxInventorys.FirstOrDefault(f => f.BoxId == destBox.DestBoxId);
entity.ChangeBox(boxInventory == null ? false : true);
//记录序列号操作日志 //记录序列号操作日志
SerialNumberOperate op = new SerialNumberOperate() SerialNumberOperate op = new SerialNumberOperate()