Compare commits

..

2 Commits

Author SHA1 Message Date
1f61d3ca50 修改了所有的都更改箱号 2025-05-06 09:13:25 +08:00
a93c088c98 修改了所有的都更改箱号 2025-05-06 09:13:12 +08:00
6 changed files with 95 additions and 5 deletions

49
BarCode.Web.sln Normal file
View File

@@ -0,0 +1,49 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BarCode.Web.Api", "src\BarCode.Web.Api\BarCode.Web.Api.csproj", "{53BADF7D-2F3F-4FC5-A591-270FDCF99035}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BarCode.Web.Core", "src\BarCode.Web.Core\BarCode.Web.Core.csproj", "{2ABC89C4-F801-4AB6-8273-F6BF3D445A81}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BarCode.Web.Domain", "src\BarCode.Web.Domain\BarCode.Web.Domain.csproj", "{05F3BD41-E7A5-46DE-A862-D23F55AAB506}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BarCode.Web.Repositories", "src\BarCode.Web.Repositories\BarCode.Web.Repositories.csproj", "{03176632-4AF8-45C6-974A-CC867634A5EB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DockerFolder", "DockerFolder", "{15EBD6C2-C3D6-4880-A398-8587513EB0F3}"
ProjectSection(SolutionItems) = preProject
.dockerignore = .dockerignore
Dockerfile = Dockerfile
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{53BADF7D-2F3F-4FC5-A591-270FDCF99035}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53BADF7D-2F3F-4FC5-A591-270FDCF99035}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53BADF7D-2F3F-4FC5-A591-270FDCF99035}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53BADF7D-2F3F-4FC5-A591-270FDCF99035}.Release|Any CPU.Build.0 = Release|Any CPU
{2ABC89C4-F801-4AB6-8273-F6BF3D445A81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2ABC89C4-F801-4AB6-8273-F6BF3D445A81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2ABC89C4-F801-4AB6-8273-F6BF3D445A81}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2ABC89C4-F801-4AB6-8273-F6BF3D445A81}.Release|Any CPU.Build.0 = Release|Any CPU
{05F3BD41-E7A5-46DE-A862-D23F55AAB506}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05F3BD41-E7A5-46DE-A862-D23F55AAB506}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05F3BD41-E7A5-46DE-A862-D23F55AAB506}.Release|Any CPU.ActiveCfg = Release|Any CPU
{05F3BD41-E7A5-46DE-A862-D23F55AAB506}.Release|Any CPU.Build.0 = Release|Any CPU
{03176632-4AF8-45C6-974A-CC867634A5EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03176632-4AF8-45C6-974A-CC867634A5EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03176632-4AF8-45C6-974A-CC867634A5EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03176632-4AF8-45C6-974A-CC867634A5EB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9C67B08F-3E95-437E-98A9-1DE73753100D}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DocumentationFile>wwwroot/BarCode.Web.Api.xml</DocumentationFile>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..</DockerfileContext>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\BarCode.Web.Repositories\BarCode.Web.Repositories.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
</ItemGroup>
</Project>

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()