修改了所有的都更改箱号

This commit is contained in:
2025-05-06 09:13:25 +08:00
parent a93c088c98
commit 1f61d3ca50
4 changed files with 20 additions and 5 deletions

View File

@@ -894,12 +894,18 @@
下载
</summary>
</member>
<member name="M:BarCode.Web.Domain.Entitys.SerialNumbers.CompleteBox(System.Int32,System.String)">
<member name="P:BarCode.Web.Domain.Entitys.SerialNumbers.isNotCount">
<summary>
是否不参与计数0和空代表参与计数1代表不参与计数
</summary>
</member>
<member name="M:BarCode.Web.Domain.Entitys.SerialNumbers.CompleteBox(System.Int32,System.String,System.String)">
<summary>
装箱
</summary>
<param name="boxId"></param>
<param name="str"></param>
/// <param name="isNotCount">是否不参与计数</param>
</member>
<member name="M:BarCode.Web.Domain.Entitys.SerialNumbers.UnBox">
<summary>

View File

@@ -234,12 +234,20 @@ namespace BarCode.Web.Domain.Entitys
this.DownLoadNumber++;
this.DownLoadTime = DateTime.Now;
}
/// <summary>
/// 是否不参与计数0和空代表参与计数1代表不参与计数
/// </summary>
[Column("isNotCount")]
public string? isNotCount { get; set; } = string.Empty;
/// <summary>
/// 装箱
/// </summary>
/// <param name="boxId"></param>
/// <param name="str"></param>
public void CompleteBox(int boxId, string str)
/// /// <param name="isNotCount">是否不参与计数</param>
public void CompleteBox(int boxId, string str,string isNotCount)
{
//每个序列码延时1毫秒来装箱 这样到时候获取序列码时就可以来排序
Thread.Sleep(1);
@@ -247,6 +255,7 @@ namespace BarCode.Web.Domain.Entitys
this.CompleteCartonTime = DateTime.Now;
this.IsUse = true;
this.IsUseNumber = this.NumberCode.Equals(str) ? true : false;
this.isNotCount= isNotCount;
}
/// <summary>
/// 解绑箱

View File

@@ -166,11 +166,11 @@ namespace BarCode.Web.Domain.Services
{
if(serialList[i].SerialNumber.ToString() == d)
{
serialList[i].CompleteBox(box.Id, d);
serialList[i].CompleteBox(box.Id, d,"0");
}
else
{
serialList[i].CompleteBox(0, d);
serialList[i].CompleteBox(box.Id, d,"1");
}
}

View File

@@ -396,7 +396,7 @@ namespace BarCode.Web.Repositories
var query = _context.SerialNumbers.AsNoTracking()
.OrderByDescending(o => o.CompleteCartonTime)//以装箱时间先后排序
.Where(f => f.BoxId == dto.BoxId);
.Where(f => f.BoxId == dto.BoxId && f.isNotCount!="1");
int total = await query.CountAsync();
var list = await query.Select(s => new SerialNumbersResponse()