1.单品和纸箱的增删改查接口

This commit is contained in:
syc_zhaoqianyan 2025-06-23 14:22:59 +08:00
parent 6a8eccd884
commit c8c0dc4613
34 changed files with 1298 additions and 32 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,6 +1,43 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Seyounth.Auto.Hs.Runtime", "Seyounth.Auto.Hs.Runtime\Seyounth.Auto.Hs.Runtime.csproj", "{6966BCFD-A22C-4C83-8171-96BB005F38D4}" # Visual Studio Version 17
VisualStudioVersion = 17.9.34616.47
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Share", "Share", "{156E45DF-D59B-4EA0-9BC0-77692BD91E1E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Service", "Service", "{685CBDEC-BE8B-4B23-8EDA-42C0B312322F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "apps", "apps", "{EB48C776-7740-4A71-8E82-B7AE9CFEB7C3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Basic.Web.WMS.HttpApi.Host", "apps\Syc.Basic.Web.WMS.HttpApi.Host\Syc.Basic.Web.WMS.HttpApi.Host.csproj", "{E3F72AF0-2B74-46B9-837A-A5C1417CFBF8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Basic.Web.WMS.Application", "services\Syc.Basic.Web.WMS.Application\Syc.Basic.Web.WMS.Application.csproj", "{3137A5F4-375A-4FB0-AA4B-7C0380A48BB2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Basic.Web.WMS.Application.Contracts", "services\Syc.Basic.Web.WMS.Application.Contracts\Syc.Basic.Web.WMS.Application.Contracts.csproj", "{A454C322-58E6-4FEB-B709-5E277C7E71B7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Basic.Web.WMS.Domain", "services\Syc.Basic.Web.WMS.Domain\Syc.Basic.Web.WMS.Domain.csproj", "{B1BFBB4E-0213-4D41-A05B-43C276F9CDAB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Basic.Web.WMS.Domain.Shared", "services\Syc.Basic.Web.WMS.Domain.Shared\Syc.Basic.Web.WMS.Domain.Shared.csproj", "{7A014245-A193-435C-B1BA-2666EBD86CCA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Basic.Web.WMS.EntityFrameworkCore", "services\Syc.Basic.Web.WMS.EntityFrameworkCore\Syc.Basic.Web.WMS.EntityFrameworkCore.csproj", "{3B487959-6744-4784-B5F8-F91012F37C70}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Basic.Web.WMS.HttpApi", "services\Syc.Basic.Web.WMS.HttpApi\Syc.Basic.Web.WMS.HttpApi.csproj", "{68ECAB75-580B-425E-9D84-832E6F6F8BCD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Basic.Web.WMS.HttpApi.Client", "services\Syc.Basic.Web.WMS.HttpApi.Client\Syc.Basic.Web.WMS.HttpApi.Client.csproj", "{A12CE372-B83A-43A1-86CB-CEAF4B2C4154}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Seyounth.Auto.Hs.Runtime", "share\Seyounth.Auto.Hs.Runtime\Seyounth.Auto.Hs.Runtime.csproj", "{0AA64147-2900-4336-B8B7-B2F385DAD4A2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Seyounth.Auto.Plc", "share\Seyounth.Auto.Plc\Seyounth.Auto.Plc.csproj", "{ECA65280-9549-40C5-9876-21D111D7C811}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Abp.Application.Contracts", "share\Syc.Abp.Application.Contracts\Syc.Abp.Application.Contracts.csproj", "{3881133B-BE58-46FA-978F-558A53004984}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Abp.Caching", "share\Syc.Abp.Caching\Syc.Abp.Caching.csproj", "{EB8E5222-4E85-4EBD-9894-33238CE89662}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Abp.Domain", "share\Syc.Abp.Domain\Syc.Abp.Domain.csproj", "{E0ACC792-32CF-4698-A2DF-5697BD4395F0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Abp.HttpApi.Client", "share\Syc.Abp.HttpApi.Client\Syc.Abp.HttpApi.Client.csproj", "{68D70001-A1DA-4D99-A828-98346F42C435}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Syc.Authorize.JwtBearer", "share\Syc.Authorize.JwtBearer\Syc.Authorize.JwtBearer.csproj", "{D5714C79-0651-4BAB-80D2-65D73B82E2F1}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -8,9 +45,88 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6966BCFD-A22C-4C83-8171-96BB005F38D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E3F72AF0-2B74-46B9-837A-A5C1417CFBF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6966BCFD-A22C-4C83-8171-96BB005F38D4}.Debug|Any CPU.Build.0 = Debug|Any CPU {E3F72AF0-2B74-46B9-837A-A5C1417CFBF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6966BCFD-A22C-4C83-8171-96BB005F38D4}.Release|Any CPU.ActiveCfg = Release|Any CPU {E3F72AF0-2B74-46B9-837A-A5C1417CFBF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6966BCFD-A22C-4C83-8171-96BB005F38D4}.Release|Any CPU.Build.0 = Release|Any CPU {E3F72AF0-2B74-46B9-837A-A5C1417CFBF8}.Release|Any CPU.Build.0 = Release|Any CPU
{3137A5F4-375A-4FB0-AA4B-7C0380A48BB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3137A5F4-375A-4FB0-AA4B-7C0380A48BB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3137A5F4-375A-4FB0-AA4B-7C0380A48BB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3137A5F4-375A-4FB0-AA4B-7C0380A48BB2}.Release|Any CPU.Build.0 = Release|Any CPU
{A454C322-58E6-4FEB-B709-5E277C7E71B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A454C322-58E6-4FEB-B709-5E277C7E71B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A454C322-58E6-4FEB-B709-5E277C7E71B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A454C322-58E6-4FEB-B709-5E277C7E71B7}.Release|Any CPU.Build.0 = Release|Any CPU
{B1BFBB4E-0213-4D41-A05B-43C276F9CDAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B1BFBB4E-0213-4D41-A05B-43C276F9CDAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B1BFBB4E-0213-4D41-A05B-43C276F9CDAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B1BFBB4E-0213-4D41-A05B-43C276F9CDAB}.Release|Any CPU.Build.0 = Release|Any CPU
{7A014245-A193-435C-B1BA-2666EBD86CCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A014245-A193-435C-B1BA-2666EBD86CCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A014245-A193-435C-B1BA-2666EBD86CCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A014245-A193-435C-B1BA-2666EBD86CCA}.Release|Any CPU.Build.0 = Release|Any CPU
{3B487959-6744-4784-B5F8-F91012F37C70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B487959-6744-4784-B5F8-F91012F37C70}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B487959-6744-4784-B5F8-F91012F37C70}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B487959-6744-4784-B5F8-F91012F37C70}.Release|Any CPU.Build.0 = Release|Any CPU
{68ECAB75-580B-425E-9D84-832E6F6F8BCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68ECAB75-580B-425E-9D84-832E6F6F8BCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68ECAB75-580B-425E-9D84-832E6F6F8BCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68ECAB75-580B-425E-9D84-832E6F6F8BCD}.Release|Any CPU.Build.0 = Release|Any CPU
{A12CE372-B83A-43A1-86CB-CEAF4B2C4154}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A12CE372-B83A-43A1-86CB-CEAF4B2C4154}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A12CE372-B83A-43A1-86CB-CEAF4B2C4154}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A12CE372-B83A-43A1-86CB-CEAF4B2C4154}.Release|Any CPU.Build.0 = Release|Any CPU
{0AA64147-2900-4336-B8B7-B2F385DAD4A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0AA64147-2900-4336-B8B7-B2F385DAD4A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0AA64147-2900-4336-B8B7-B2F385DAD4A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0AA64147-2900-4336-B8B7-B2F385DAD4A2}.Release|Any CPU.Build.0 = Release|Any CPU
{ECA65280-9549-40C5-9876-21D111D7C811}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ECA65280-9549-40C5-9876-21D111D7C811}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ECA65280-9549-40C5-9876-21D111D7C811}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ECA65280-9549-40C5-9876-21D111D7C811}.Release|Any CPU.Build.0 = Release|Any CPU
{3881133B-BE58-46FA-978F-558A53004984}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3881133B-BE58-46FA-978F-558A53004984}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3881133B-BE58-46FA-978F-558A53004984}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3881133B-BE58-46FA-978F-558A53004984}.Release|Any CPU.Build.0 = Release|Any CPU
{EB8E5222-4E85-4EBD-9894-33238CE89662}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB8E5222-4E85-4EBD-9894-33238CE89662}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB8E5222-4E85-4EBD-9894-33238CE89662}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB8E5222-4E85-4EBD-9894-33238CE89662}.Release|Any CPU.Build.0 = Release|Any CPU
{E0ACC792-32CF-4698-A2DF-5697BD4395F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E0ACC792-32CF-4698-A2DF-5697BD4395F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0ACC792-32CF-4698-A2DF-5697BD4395F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0ACC792-32CF-4698-A2DF-5697BD4395F0}.Release|Any CPU.Build.0 = Release|Any CPU
{68D70001-A1DA-4D99-A828-98346F42C435}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68D70001-A1DA-4D99-A828-98346F42C435}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68D70001-A1DA-4D99-A828-98346F42C435}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68D70001-A1DA-4D99-A828-98346F42C435}.Release|Any CPU.Build.0 = Release|Any CPU
{D5714C79-0651-4BAB-80D2-65D73B82E2F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5714C79-0651-4BAB-80D2-65D73B82E2F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5714C79-0651-4BAB-80D2-65D73B82E2F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5714C79-0651-4BAB-80D2-65D73B82E2F1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E3F72AF0-2B74-46B9-837A-A5C1417CFBF8} = {EB48C776-7740-4A71-8E82-B7AE9CFEB7C3}
{3137A5F4-375A-4FB0-AA4B-7C0380A48BB2} = {685CBDEC-BE8B-4B23-8EDA-42C0B312322F}
{A454C322-58E6-4FEB-B709-5E277C7E71B7} = {685CBDEC-BE8B-4B23-8EDA-42C0B312322F}
{B1BFBB4E-0213-4D41-A05B-43C276F9CDAB} = {685CBDEC-BE8B-4B23-8EDA-42C0B312322F}
{7A014245-A193-435C-B1BA-2666EBD86CCA} = {685CBDEC-BE8B-4B23-8EDA-42C0B312322F}
{3B487959-6744-4784-B5F8-F91012F37C70} = {685CBDEC-BE8B-4B23-8EDA-42C0B312322F}
{68ECAB75-580B-425E-9D84-832E6F6F8BCD} = {685CBDEC-BE8B-4B23-8EDA-42C0B312322F}
{A12CE372-B83A-43A1-86CB-CEAF4B2C4154} = {685CBDEC-BE8B-4B23-8EDA-42C0B312322F}
{0AA64147-2900-4336-B8B7-B2F385DAD4A2} = {156E45DF-D59B-4EA0-9BC0-77692BD91E1E}
{ECA65280-9549-40C5-9876-21D111D7C811} = {156E45DF-D59B-4EA0-9BC0-77692BD91E1E}
{3881133B-BE58-46FA-978F-558A53004984} = {156E45DF-D59B-4EA0-9BC0-77692BD91E1E}
{EB8E5222-4E85-4EBD-9894-33238CE89662} = {156E45DF-D59B-4EA0-9BC0-77692BD91E1E}
{E0ACC792-32CF-4698-A2DF-5697BD4395F0} = {156E45DF-D59B-4EA0-9BC0-77692BD91E1E}
{68D70001-A1DA-4D99-A828-98346F42C435} = {156E45DF-D59B-4EA0-9BC0-77692BD91E1E}
{D5714C79-0651-4BAB-80D2-65D73B82E2F1} = {156E45DF-D59B-4EA0-9BC0-77692BD91E1E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {45CD52A2-9BCF-4BCE-BFE4-6512506C0D1F}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@ -6,6 +6,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Serilog; using Serilog;
using Serilog.Events; using Serilog.Events;
using Syc.Authorize.JwtBearer;
namespace Syc.Basic.Web.WMS; namespace Syc.Basic.Web.WMS;

View File

@ -10,7 +10,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="StackExchange.Redis" Version="2.2.4" /> <PackageReference Include="StackExchange.Redis" Version="2.2.4" />
<PackageReference Include="Volo.Abp.Autofac" Version="6.0.0" /> <PackageReference Include="Volo.Abp.Autofac" Version="6.0.0" />
@ -33,8 +33,6 @@
<ProjectReference Include="..\..\services\Syc.Basic.Web.WMS.Application\Syc.Basic.Web.WMS.Application.csproj" /> <ProjectReference Include="..\..\services\Syc.Basic.Web.WMS.Application\Syc.Basic.Web.WMS.Application.csproj" />
<ProjectReference Include="..\..\services\Syc.Basic.Web.WMS.EntityFrameworkCore\Syc.Basic.Web.WMS.EntityFrameworkCore.csproj" /> <ProjectReference Include="..\..\services\Syc.Basic.Web.WMS.EntityFrameworkCore\Syc.Basic.Web.WMS.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\services\Syc.Basic.Web.WMS.HttpApi\Syc.Basic.Web.WMS.HttpApi.csproj" /> <ProjectReference Include="..\..\services\Syc.Basic.Web.WMS.HttpApi\Syc.Basic.Web.WMS.HttpApi.csproj" />
<ProjectReference Include="..\..\share\Seyounth.Auto.Hs.Runtime\Seyounth.Auto.Hs.Runtime.csproj" />
<ProjectReference Include="..\..\share\Seyounth.Auto.Plc\Seyounth.Auto.Plc.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -23,10 +23,13 @@ using Volo.Abp.Caching;
using Volo.Abp.AspNetCore.Mvc.AntiForgery; using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using System.Net; using System.Net;
using StackExchange.Redis; using StackExchange.Redis;
using Syc.Authorize.JwtBearer;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Syc.Basic.Web.WMS; namespace Syc.Basic.Web.WMS;
[DependsOn( [DependsOn(
typeof(JwtBearerAuthenticationModule),
typeof(WMSHttpApiModule), typeof(WMSHttpApiModule),
typeof(AbpAutofacModule), typeof(AbpAutofacModule),
typeof(WMSApplicationModule), typeof(WMSApplicationModule),

View File

@ -6,7 +6,7 @@
}, },
"ConnectionStrings": { "ConnectionStrings": {
//"WMSDb": "Server=113.141.94.252,51197;Database=syc_wms_DB; User ID=syc; Password=syc@123456;TrustServerCertificate=True", //"WMSDb": "Server=113.141.94.252,51197;Database=syc_wms_DB; User ID=syc; Password=syc@123456;TrustServerCertificate=True",
"WMSDb": "Server=.;Database=Hyosung_VietNamTY; User ID=sa; Password=seyounth@2025;TrustServerCertificate=True", "WMSDb": "Server=.;Database=Yulin; User ID=sa; Password=123;TrustServerCertificate=True"
}, },
"AuthServer": { "AuthServer": {
"Authority": "https://localhost:44386", "Authority": "https://localhost:44386",

View File

@ -2,6 +2,6 @@
<configuration> <configuration>
<packageSources> <packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Seyounth" value="http://8.134.253.216:8002/v3/index.json" /> <add key="Seyounth" value="http://8.134.253.216:8002/v3/index.json" allowinsecureConnections="true"/>
</packageSources> </packageSources>
</configuration> </configuration>

View File

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<RootNamespace>Syc.Basic.Web.WMS</RootNamespace> <RootNamespace>Syc.Basic.Web.WMS</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile> <GenerateDocumentationFile>True</GenerateDocumentationFile>
<DocumentationFile>$(MSBuildProjectName).xml</DocumentationFile> <DocumentationFile>$(MSBuildProjectName).xml</DocumentationFile>

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Syc.Basic.Web.WMS.Dto;
namespace Syc.Basic.Web.Mapper namespace Syc.Basic.Web.Mapper
{ {
@ -22,6 +23,15 @@ namespace Syc.Basic.Web.Mapper
.ForMember(dest => dest.DictionaryCode,opt => opt.MapFrom(m => m.dictCode)) .ForMember(dest => dest.DictionaryCode,opt => opt.MapFrom(m => m.dictCode))
.ForMember(dest => dest.Createtime,opt => opt.MapFrom(m => m.createdAt)) .ForMember(dest => dest.Createtime,opt => opt.MapFrom(m => m.createdAt))
.ReverseMap(); .ReverseMap();
CreateMap<Silk, SilkDto>();
CreateMap<SilkDto, Silk>();
CreateMap<Box, BoxDto>()
.ForMember(dest => dest.Net_Weight, opt => opt.MapFrom(m => m.Net_Weight))
.ForMember(dest => dest.Length, opt => opt.MapFrom(m => m.Length))
.ReverseMap();
//CreateMap<BoxDto, Box>();
} }
} }
} }

View File

@ -24,7 +24,8 @@ using Volo.Abp.Domain.Repositories;
namespace Syc.Basic.Web.WMS.Service namespace Syc.Basic.Web.WMS.Service
{ {
[ApiExplorerSettings(GroupName = "鉴权/授权服务"), Authorize] //[ApiExplorerSettings(GroupName = "鉴权/授权服务"), Authorize]
[AllowAnonymous]
public class AuthService : ApiService, IAuthService public class AuthService : ApiService, IAuthService
{ {
private readonly IJwtTokenService jwtTokenService; private readonly IJwtTokenService jwtTokenService;
@ -33,11 +34,13 @@ namespace Syc.Basic.Web.WMS.Service
private readonly IRepository<Menu> menuRepository; private readonly IRepository<Menu> menuRepository;
private readonly ICapPublisher capPublisher; private readonly ICapPublisher capPublisher;
public AuthService(IJwtTokenService jwtTokenService public AuthService(
, IUserDomainService userDomainService IJwtTokenService jwtTokenService
,IUserDomainService userDomainService
, IRoleRepository roleRepository , IRoleRepository roleRepository
, IRepository<Menu> menuRepository , IRepository<Menu> menuRepository
, ICapPublisher capPublisher) //, ICapPublisher capPublisher
)
{ {
this.jwtTokenService = jwtTokenService; this.jwtTokenService = jwtTokenService;
this.userDomainService = userDomainService; this.userDomainService = userDomainService;
@ -51,7 +54,7 @@ namespace Syc.Basic.Web.WMS.Service
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[AllowAnonymous] [HttpPost]
public async Task<AuthResultDto> LoginAsync(LoginInput input) public async Task<AuthResultDto> LoginAsync(LoginInput input)
{ {
var userDO = await userDomainService.GetUserByAccountAsync(input.UserName); var userDO = await userDomainService.GetUserByAccountAsync(input.UserName);
@ -63,8 +66,8 @@ namespace Syc.Basic.Web.WMS.Service
if (!userDO.IsEnable) if (!userDO.IsEnable)
throw Oops.Oh("用户已被冻结,请联系系统管理员"); throw Oops.Oh("用户已被冻结,请联系系统管理员");
var userInfo = ObjectMapper.Map(userDO.User(), new Identity()); // var userInfo = ObjectMapper.Map(userDO.User(), new Identity());
var token = jwtTokenService.GenerateToken(userInfo); var token = jwtTokenService.GenerateToken(userDO);
return new AuthResultDto(token); return new AuthResultDto(token);
} }
@ -73,6 +76,7 @@ namespace Syc.Basic.Web.WMS.Service
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[AllowAnonymous] [AllowAnonymous]
[HttpPost]
public async Task Logout() public async Task Logout()
{ {
await capPublisher.PublishAsync("mes.test", "测试消息"); await capPublisher.PublishAsync("mes.test", "测试消息");

View File

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<RootNamespace>Syc.Basic.Web.WMS</RootNamespace> <RootNamespace>Syc.Basic.Web.WMS</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile> <GenerateDocumentationFile>True</GenerateDocumentationFile>
<DocumentationFile>$(MSBuildProjectName).xml</DocumentationFile> <DocumentationFile>$(MSBuildProjectName).xml</DocumentationFile>

View File

@ -36,6 +36,76 @@
<returns></returns> <returns></returns>
<exception cref="T:System.NotImplementedException"></exception> <exception cref="T:System.NotImplementedException"></exception>
</member> </member>
<member name="M:Syc.Basic.Web.WMS.Service.BoxService.GetBoxList(Syc.Basic.Web.WMS.Dto.BoxDto)">
<summary>
查询纸箱
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Syc.Basic.Web.WMS.Service.BoxService.InsertBox(Syc.Basic.Web.WMS.Dto.BoxDto)">
<summary>
添加纸箱
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Syc.Basic.Web.WMS.Service.BoxService.UpdateBox(Syc.Basic.Web.WMS.Dto.BoxDto)">
<summary>
修改纸箱
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Syc.Basic.Web.WMS.Service.BoxService.DeleteSilkList(Syc.Basic.Web.WMS.Dto.BoxInput)">
<summary>
删除纸箱
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Syc.Basic.Web.WMS.Service.BoxService.DeletesSilkList(Syc.Basic.Web.WMS.Dto.BoxInput)">
<summary>
批量删除纸箱
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Syc.Basic.Web.WMS.Service.SilkService.GetSilkList(Syc.Basic.Web.WMS.Dto.SilkDto)">
<summary>
查询丝锭
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Syc.Basic.Web.WMS.Service.SilkService.InsertSilk(Syc.Basic.Web.WMS.Dto.SilkDto)">
<summary>
添加丝锭
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Syc.Basic.Web.WMS.Service.SilkService.UpdateSilk(Syc.Basic.Web.WMS.Dto.SilkDto)">
<summary>
修改丝锭
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Syc.Basic.Web.WMS.Service.SilkService.DeleteSilk(Syc.Basic.Web.WMS.Dto.SilkInput)">
<summary>
删除丝锭
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Syc.Basic.Web.WMS.Service.SilkService.DeletesSilks(Syc.Basic.Web.WMS.Dto.SilkInput)">
<summary>
批量删除丝锭
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:Syc.Basic.Web.Service.MenuService"> <member name="T:Syc.Basic.Web.Service.MenuService">
<summary> <summary>
菜单服务 菜单服务

View File

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<RootNamespace>Syc.Basic.Web.WMS</RootNamespace> <RootNamespace>Syc.Basic.Web.WMS</RootNamespace>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup> </PropertyGroup>
@ -20,6 +20,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\share\Seyounth.Auto.Plc\Seyounth.Auto.Plc.csproj" />
<ProjectReference Include="..\..\share\Syc.Abp.Caching\Syc.Abp.Caching.csproj" /> <ProjectReference Include="..\..\share\Syc.Abp.Caching\Syc.Abp.Caching.csproj" />
</ItemGroup> </ItemGroup>

View File

@ -5,6 +5,10 @@ using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.Validation.Localization; using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem; using Volo.Abp.VirtualFileSystem;
using Seyounth.Auto.Hs;
using Seyounth.Auto.Hs.Runtime;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Seyounth.Auto.Hs.Runtime.Handlers;
namespace Syc.Basic.Web.WMS; namespace Syc.Basic.Web.WMS;
@ -38,5 +42,7 @@ public class WMSDomainSharedModule : AbpModule
{ {
options.MapCodeNamespace("WMS", typeof(WMSResource)); options.MapCodeNamespace("WMS", typeof(WMSResource));
}); });
context.Services.AddHs<DefaultOnWarningHandler, DefaultWeighSpindleRequestHandler, DefaultWeighSpindleRequestHandler>();
} }
} }

View File

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<RootNamespace>Syc.Basic.Web.WMS</RootNamespace> <RootNamespace>Syc.Basic.Web.WMS</RootNamespace>
</PropertyGroup> </PropertyGroup>

View File

@ -162,6 +162,18 @@ namespace Syc.Basic.Web.EntityFrameworkCore
b.HasOne(e => e.Dictionary).WithMany(e => e.DictionaryItems).HasForeignKey(e => e.DictionaryCode); b.HasOne(e => e.Dictionary).WithMany(e => e.DictionaryItems).HasForeignKey(e => e.DictionaryCode);
}); });
modelBuilder.Entity<Box>(b =>
{
b.ToTable(nameof(Box));
b.ConfigureByConvention();
});
modelBuilder.Entity<Silk>(b =>
{
b.ToTable(nameof(Silk));
b.ConfigureByConvention();
});
return modelBuilder; return modelBuilder;
} }
} }

View File

@ -72,6 +72,13 @@ public class WMSDbContext :
/// </summary> /// </summary>
public virtual DbSet<DictionaryItems> DictionaryItems { get; set; } public virtual DbSet<DictionaryItems> DictionaryItems { get; set; }
/// <summary>
/// 料箱
/// </summary>
public virtual DbSet<Box> Boxs { get; set; }
public virtual DbSet<Silk> Silk { get; set; }
protected override void OnModelCreating(ModelBuilder builder) protected override void OnModelCreating(ModelBuilder builder)
{ {
base.OnModelCreating(builder); base.OnModelCreating(builder);

View File

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<RootNamespace>Syc.Basic.Web.WMS</RootNamespace> <RootNamespace>Syc.Basic.Web.WMS</RootNamespace>
</PropertyGroup> </PropertyGroup>

View File

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<RootNamespace>Syc.Basic.Web.WMS</RootNamespace> <RootNamespace>Syc.Basic.Web.WMS</RootNamespace>
</PropertyGroup> </PropertyGroup>

View File

@ -3,7 +3,7 @@
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<RootNamespace>Syc.Basic.Web.WMS</RootNamespace> <RootNamespace>Syc.Basic.Web.WMS</RootNamespace>
</PropertyGroup> </PropertyGroup>

View File

@ -13,3 +13,11 @@ public abstract class OnWarningHandler : IRequestHandler<OnWarning>
{ {
public abstract Task Handle(OnWarning request, CancellationToken cancellationToken); public abstract Task Handle(OnWarning request, CancellationToken cancellationToken);
} }
public class DefaultOnWarningHandler : OnWarningHandler
{
public override Task Handle(OnWarning request, CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}

View File

@ -18,3 +18,11 @@ public abstract class WeighSpindleRequestHandler : IRequestHandler<WeighSpindleR
{ {
public abstract Task<string> Handle(WeighSpindleRequest request, CancellationToken cancellationToken); public abstract Task<string> Handle(WeighSpindleRequest request, CancellationToken cancellationToken);
} }
public class DefaultWeighSpindleRequestHandler : WeighSpindleRequestHandler
{
public override Task<string> Handle(WeighSpindleRequest request, CancellationToken cancellationToken)
{
return Task.FromResult("");
}
}

View File

@ -18,7 +18,7 @@ public class HsAutoRuntime : IHsAutoRuntime
private readonly IPrinterService _printers; private readonly IPrinterService _printers;
public HsAutoRuntime(IPlcService plcService, IMediator mediator, IBalanceService balances, IScannerService scanners, public HsAutoRuntime(IPlcService plcService, IMediator mediator, IBalanceService balances, IScannerService scanners,
ILogger<HsAutoRuntime> logger, IPrinterService printers) IPrinterService printers,ILogger<HsAutoRuntime> logger)
{ {
_printers = printers; _printers = printers;
_mediator = mediator; _mediator = mediator;

View File

@ -28,8 +28,14 @@ public static class HsExtensions
services.AddSingleton<IPrinterService, PrinterService>(); services.AddSingleton<IPrinterService, PrinterService>();
services.AddSingleton<IScannerService, ScannerService>(); services.AddSingleton<IScannerService, ScannerService>();
services.AddSingleton<IHsAutoRuntime, HsAutoRuntime>(); services.AddSingleton<IHsAutoRuntime, HsAutoRuntime>();
services.AddHostedService<PlcBackgroundService>(); #region
services.AddHostedService<HsBackgroundService>(); //services.AddHostedService<PlcBackgroundService>();
// services.AddHostedService<HsBackgroundService>();
#endregion
services.AddMediatR(cfg =>
{
cfg.RegisterServicesFromAssembly(typeof(OnWarningHandler).Assembly);
});
return services; return services;
} }
} }

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<RootNamespace>Syc.Abp.Domain</RootNamespace> <RootNamespace>Syc.Abp.Domain</RootNamespace>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" /> <Import Project="..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>