wangxinhui
2024-12-18 a44d4ac81a863fb3b93e1c8ad8526ef754c24615
Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
已删除12个文件
已修改24个文件
已添加23个文件
1994 ■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0f60b943-ef81-4dea-85d5-c72f1e023d53.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/21553faa-f482-4cad-bdea-7867d42f4bac.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/3ea8b77f-1ded-4afe-bbbb-d42ee2627f62.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/456f23a3-e9db-4baa-b211-0debbf6a9766.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/48209466-174f-415e-a834-4bc50f2d98fd.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/672f95bc-ead2-44f0-a24c-957a3a267788.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/77d1070c-616d-4033-b739-10b3890a2871.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7ef307ad-ea94-4ff6-9f94-954e08ae3914.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8f970bf6-017d-4af8-aaf8-8f1412be4898.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e0712c6d-3f7b-4769-b7a3-cc59cff4d10a.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f7a5ecd7-5ca5-4e04-904a-54fa34104eb6.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoRepository/StationMangerRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoRepository/IStationMangerRepository.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/WIDESEAWCS_IBasicInfoService.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGVController.cs 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/CustomProfile.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/测试架仓/StackerCraneJob_CSJ.cs 303 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/GroundStationDBName.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/StackerCraneJob_ZH.cs 309 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2890c663-d711-4602-bdad-56852b6a51bc.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/433da193-e6b4-48ed-bdc6-2332b099c9c2.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4b9d13b5-464a-47d4-8dae-9937d5273cc6.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5023b4f8-50f2-4301-b3ca-8d83fa478bdc.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5e0bd2ed-63f0-464e-b65d-6e328058f9ca.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/776b31ca-b3d0-487d-8a56-85a65dead3f1.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bb9c5c98-5de4-43c8-8a36-34ad166b9c7a.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d6701bb1-0090-4502-a2ca-a4e0726e92d8.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Attributes/MethodParamsValidateAttribute.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Attributes/ModelValidateAttribute.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MaterielInfoDTO.cs 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/SupplierDTO.cs 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpOutOrderDTO.cs 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpResponseContent.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/MaterielInfoDTO.cs 174 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/PurchaseOrderModel.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ReceiveOrderModel.cs 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/Root.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockOutboundOrderDTO.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielInfo.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/0f60b943-ef81-4dea-85d5-c72f1e023d53.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/21553faa-f482-4cad-bdea-7867d42f4bac.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/3ea8b77f-1ded-4afe-bbbb-d42ee2627f62.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/456f23a3-e9db-4baa-b211-0debbf6a9766.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/48209466-174f-415e-a834-4bc50f2d98fd.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/672f95bc-ead2-44f0-a24c-957a3a267788.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/77d1070c-616d-4033-b739-10b3890a2871.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7ef307ad-ea94-4ff6-9f94-954e08ae3914.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/8f970bf6-017d-4af8-aaf8-8f1412be4898.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/e0712c6d-3f7b-4769-b7a3-cc59cff4d10a.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f7a5ecd7-5ca5-4e04-904a-54fa34104eb6.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoRepository/StationMangerRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_BasicInfoRepository
{
    public class StationMangerRepository : RepositoryBase<Dt_StationManger>, IStationMangerRepository
    {
        public StationMangerRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoRepository/IStationMangerRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_IBasicInfoRepository
{
    public interface IStationMangerRepository : IRepository<Dt_StationManger>
    {
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/WIDESEAWCS_IBasicInfoService.csproj
@@ -6,4 +6,8 @@
    <Nullable>enable</Nullable>
  </PropertyGroup>
  <ItemGroup>
    <ProjectReference Include="..\WIDESEAWCS_BasicInfoRepository\WIDESEAWCS_BasicInfoRepository.csproj" />
  </ItemGroup>
</Project>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.DB.Models;
namespace WIDESEAWCS_Model.Models
{
    [SugarTable(nameof(Dt_StationManger), "站台表")]
    public class Dt_StationManger : BaseEntity
    {
        /// <summary>
        /// ä¸»é”®
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        /// <summary>
        /// ç«™å°ç¼–号
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "站台编号")]
        public string StationCode { get; set; }
        /// <summary>
        /// ç«™å°åç§°
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "站台名称")]
        public string StationName { get; set; }
        /// <summary>
        /// å¯¹åº”堆垛机排-列-层
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "对应堆垛机排-列-层")]
        public string StackerCraneStationCode { get; set; }
        /// <summary>
        /// ç«™å°è®¾å¤‡ç¼–号
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "站台设备编号")]
        public string StationDeviceCode { get; set; }
        /// <summary>
        /// å †åž›æœºç¼–号
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "堆垛机编号")]
        public string StackerCraneCode { get; set; }
        /// <summary>
        /// AGV站台编号
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "AGV站台编号")]
        public string AGVStationCode { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "备注")]
        public string Remark { get; set; }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs
@@ -55,6 +55,12 @@
        public string PalletCode { get; set; }
        /// <summary>
        /// æ‰˜ç›˜ç±»åž‹
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "托盘类型")]
        public int PalletType { get; set; }
        /// <summary>
        /// å··é“号
        /// </summary>
        [ImporterHeader(Name = "巷道号")]
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net6.0</TargetFramework>
@@ -13,10 +13,6 @@
    <ItemGroup>
        <ProjectReference Include="..\WIDESEAWCS_Common\WIDESEAWCS_Common.csproj" />
    </ItemGroup>
    <ItemGroup>
        <Folder Include="Models\BasicInfo\" />
    </ItemGroup>
</Project>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln
@@ -50,9 +50,13 @@
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_BasicInfoService", "WIDESEAWCS_BasicInfoService\WIDESEAWCS_BasicInfoService.csproj", "{FFAB2C76-1C9E-4006-95C8-A0B2AA53139D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WIDESEAWCS_Model", "WIDESEAWCS_Model\WIDESEAWCS_Model.csproj", "{9D2AC22C-9A86-41AE-AA02-553554A7B1D7}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_Model", "WIDESEAWCS_Model\WIDESEAWCS_Model.csproj", "{9D2AC22C-9A86-41AE-AA02-553554A7B1D7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WIDESEAWCS_ISystemRepository", "WIDESEAWCS_ISystemRepository\WIDESEAWCS_ISystemRepository.csproj", "{B778DFFD-A5BA-4CAF-805E-2630CF080CDC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_ISystemRepository", "WIDESEAWCS_ISystemRepository\WIDESEAWCS_ISystemRepository.csproj", "{B778DFFD-A5BA-4CAF-805E-2630CF080CDC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WIDESEAWCS_IBasicInfoRepository", "WIDESEAWCS_IBasicInfoRepository\WIDESEAWCS_IBasicInfoRepository.csproj", "{3B954A6E-CE88-4B33-BEAC-757BE4BE1204}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WIDESEAWCS_BasicInfoRepository", "WIDESEAWCS_BasicInfoRepository\WIDESEAWCS_BasicInfoRepository.csproj", "{D0CC28FA-6426-4FDE-A5B9-24CF06787863}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -120,6 +124,14 @@
        {B778DFFD-A5BA-4CAF-805E-2630CF080CDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {B778DFFD-A5BA-4CAF-805E-2630CF080CDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {B778DFFD-A5BA-4CAF-805E-2630CF080CDC}.Release|Any CPU.Build.0 = Release|Any CPU
        {3B954A6E-CE88-4B33-BEAC-757BE4BE1204}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {3B954A6E-CE88-4B33-BEAC-757BE4BE1204}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {3B954A6E-CE88-4B33-BEAC-757BE4BE1204}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {3B954A6E-CE88-4B33-BEAC-757BE4BE1204}.Release|Any CPU.Build.0 = Release|Any CPU
        {D0CC28FA-6426-4FDE-A5B9-24CF06787863}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {D0CC28FA-6426-4FDE-A5B9-24CF06787863}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {D0CC28FA-6426-4FDE-A5B9-24CF06787863}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {D0CC28FA-6426-4FDE-A5B9-24CF06787863}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
@@ -141,6 +153,8 @@
        {8C2CC25B-DE5D-433E-A550-63864C7A716D} = {9CB2F821-BB23-48E5-88E8-C326477733C0}
        {FFAB2C76-1C9E-4006-95C8-A0B2AA53139D} = {9CB2F821-BB23-48E5-88E8-C326477733C0}
        {B778DFFD-A5BA-4CAF-805E-2630CF080CDC} = {93EFF637-042E-4DD0-A74B-7F0CF998CF96}
        {3B954A6E-CE88-4B33-BEAC-757BE4BE1204} = {5CC8AEFF-2F75-4053-9569-73419839875A}
        {D0CC28FA-6426-4FDE-A5B9-24CF06787863} = {5CC8AEFF-2F75-4053-9569-73419839875A}
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
        SolutionGuid = {C9A356D5-D4FE-414B-B982-6C97792BE6C6}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGVController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,166 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEAWCS_Core;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_Tasks.阻焊仓;
namespace WIDESEAWCS_Server.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class AGVController : ControllerBase
    {
        private readonly IStationMangerRepository _stationMangerRepository;
        public AGVController(IStationMangerRepository stationMangerRepository)
        {
            _stationMangerRepository = stationMangerRepository;
        }
        [HttpPost, HttpGet, Route("PutRequest"), AllowAnonymous]
        public WebResponseContent PutRequest(string code, int palletType)
        {
            try
            {
                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == code);
                if (stationManger == null)
                {
                    return WebResponseContent.Instance.Error($"未找到站台配置");
                }
                IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
                if (device == null)
                {
                    return WebResponseContent.Instance.Error($"未找到对应设备");
                }
                OtherDevice otherDevice = (OtherDevice)device;
                bool canPut = otherDevice.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, stationManger.StationCode);
                if (canPut)
                {
                    return WebResponseContent.Instance.OK();
                }
                else
                {
                    otherDevice.SetValue(GroundStationDBName.W_PutRequest, true, stationManger.StationCode);
                    otherDevice.SetValue(GroundStationDBName.W_PutPalletType, (short)palletType, stationManger.StationCode);
                    Thread.Sleep(1000);
                    canPut = otherDevice.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, stationManger.StationCode);
                    if (canPut)
                    {
                        return WebResponseContent.Instance.OK();
                    }
                    else
                    {
                        return WebResponseContent.Instance.Error($"放货申请中");
                    }
                }
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        [HttpPost, HttpGet, Route("PutFinish"), AllowAnonymous]
        public WebResponseContent PutFinish(string code)
        {
            try
            {
                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == code);
                if (stationManger == null)
                {
                    return WebResponseContent.Instance.Error($"未找到站台配置");
                }
                IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
                if (device == null)
                {
                    return WebResponseContent.Instance.Error($"未找到对应设备");
                }
                OtherDevice otherDevice = (OtherDevice)device;
                otherDevice.SetValue(GroundStationDBName.W_PutFinish, true, stationManger.StationCode);
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        [HttpPost, HttpGet, Route("TakeRequest"), AllowAnonymous]
        public WebResponseContent TakeRequest(string code)
        {
            try
            {
                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == code);
                if (stationManger == null)
                {
                    return WebResponseContent.Instance.Error($"未找到站台配置");
                }
                IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
                if (device == null)
                {
                    return WebResponseContent.Instance.Error($"未找到对应设备");
                }
                OtherDevice otherDevice = (OtherDevice)device;
                bool canPut = otherDevice.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanTake, stationManger.StationCode);
                if (canPut)
                {
                    return WebResponseContent.Instance.OK();
                }
                else
                {
                    otherDevice.SetValue(GroundStationDBName.W_TakeRequest, true, stationManger.StationCode);
                    Thread.Sleep(1000);
                    canPut = otherDevice.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanTake, stationManger.StationCode);
                    if (canPut)
                    {
                        return WebResponseContent.Instance.OK();
                    }
                    else
                    {
                        return WebResponseContent.Instance.Error($"取货申请中");
                    }
                }
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
        [HttpPost, HttpGet, Route("TakeFinish"), AllowAnonymous]
        public WebResponseContent TakeFinish(string code)
        {
            try
            {
                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == code);
                if (stationManger == null)
                {
                    return WebResponseContent.Instance.Error($"未找到站台配置");
                }
                IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
                if (device == null)
                {
                    return WebResponseContent.Instance.Error($"未找到对应设备");
                }
                OtherDevice otherDevice = (OtherDevice)device;
                otherDevice.SetValue(GroundStationDBName.W_TakeFinish, true, stationManger.StationCode);
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/CustomProfile.cs
@@ -4,6 +4,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_DTO.System;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob.DTO;
@@ -19,6 +20,7 @@
        /// </summary>
        public CustomProfile() 
        {
            CreateMap<Sys_Menu, MenuDTO>();
            CreateMap<Dt_DeviceInfo,DeviceInfoDTO>();
            CreateMap<WMSTaskDTO, Dt_Task>().ForMember(a => a.WMSId, b => b.MapFrom(b => b.Id));
            CreateMap<Dt_Task, ConveyorLineTaskCommand>().ForMember(a => a.TargetAddress, b => b.MapFrom(b => b.NextAddress)).ForMember(a => a.Barcode, b => b.MapFrom(b => b.PalletCode)).ForMember(a => a.TaskNum, b => b.MapFrom(b => b.TaskNum));
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -12,7 +12,7 @@
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  //连接字符串
  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS__HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //跨域
  "Cors": {
    "PolicyName": "CorsIpAccess", //策略名称
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/²âÊԼܲÖ/StackerCraneJob_CSJ.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,303 @@
using Microsoft.AspNetCore.Components.Routing;
using Quartz;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Service;
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
using WIDESEAWCS_Tasks.HoisterJob;
using WIDESEAWCS_Tasks.StackerCraneJob;
using WIDESEAWCS_Tasks.阻焊仓;
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class StackerCraneJob_CSJ : JobBase, IJob
    {
        private readonly ITaskService _taskService;
        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
        private readonly ITaskRepository _taskRepository;
        private readonly IRouterService _routerService;
        private readonly IStationMangerRepository _stationMangerRepository;
        public StackerCraneJob_CSJ(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository)
        {
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
            _taskRepository = taskRepository;
            _routerService = routerService;
            _stationMangerRepository = stationMangerRepository;
        }
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams");
                if (commonStackerCrane != null)
                {
                    if (!commonStackerCrane.IsEventSubscribed)
                    {
                        commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//订阅任务完成事件
                    }
                    if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal)
                    {
                        commonStackerCrane.CheckStackerCraneTaskCompleted();//防止任务完成事件监测超时,再手动触发一次
                        if (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
                        {
                            Dt_Task? task = GetTask(commonStackerCrane);
                            if (task != null)
                            {
                                StackerCraneTaskCommand? stackerCraneTaskCommand = ConvertToStackerCraneTaskCommand(task);
                                if (stackerCraneTaskCommand != null)
                                {
                                    bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
                                    if (sendFlag)
                                    {
                                        commonStackerCrane.LastTaskType = task.TaskType;
                                        _taskService.UpdateTaskStatusToNext(task.TaskNum);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                WriteError(nameof(CommonStackerCraneJob), ex.Message, ex);
            }
            return Task.CompletedTask;
        }
        /// <summary>
        /// ä»»åŠ¡å®Œæˆäº‹ä»¶è®¢é˜…çš„æ–¹æ³•
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender, WIDESEAWCS_QuartzJob.StackerCrane.StackerCraneTaskCompletedEventArgs e)
        {
            CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane;
            if (commonStackerCrane != null)
            {
                if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
                {
                    Console.Out.WriteLine("TaskCompleted" + e.TaskNum);
                    _taskService.StackCraneTaskCompleted(e.TaskNum);
                    commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5);
                }
            }
        }
        /// <summary>
        /// èŽ·å–ä»»åŠ¡
        /// </summary>
        /// <param name="commonStackerCrane">堆垛机对象</param>
        /// <returns></returns>
        private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane)
        {
            Dt_Task task;
            if (commonStackerCrane.LastTaskType == null)
            {
                task = _taskService.QueryStackerCraneTask(commonStackerCrane.DeviceCode);
            }
            else
            {
                if (commonStackerCrane.LastTaskType.GetValueOrDefault().GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                {
                    task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
                    if (task == null)
                    {
                        task = _taskService.QueryStackerCraneOutTask(commonStackerCrane.DeviceCode);
                    }
                }
                else
                {
                    task = _taskService.QueryStackerCraneOutTask(commonStackerCrane.DeviceCode);
                    if (task == null)
                    {
                        task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
                    }
                }
            }
            if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                if (OutTaskStationIsOccupied(task) != null || true)
                {
                    return task;
                }
                else
                {
                    List<string> otherOutStaionCodes = _routerService.QueryNextRoutes(commonStackerCrane.DeviceCode, task.NextAddress).Select(x => x.ChildPosi).ToList();
                    List<Dt_Task> tasks = _taskService.QueryStackerCraneOutTasks(commonStackerCrane.DeviceCode, otherOutStaionCodes);
                    foreach (var item in tasks)
                    {
                        if (OutTaskStationIsOccupied(task) != null)
                        {
                            return task;
                        }
                    }
                    task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
                }
            }
            return task;
        }
        /// <summary>
        /// å‡ºåº“任务判断出库站台是否被占用
        /// </summary>
        /// <param name="task">任务实体</param>
        /// <returns>如果未被占用,返回传入的任务信息,否则,返回null</returns>
        private Dt_Task? OutTaskStationIsOccupied([NotNull] Dt_Task task)
        {
            Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.TargetAddress && x.StackerCraneCode == task.Roadway);
            if (stationManger != null)
            {
                IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
                if (device != null)
                {
                    OtherDevice client = (OtherDevice)device;
                    if (client.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, stationManger.StationCode))//出库站台未被占用
                    {
                        task.TargetAddress = stationManger.StackerCraneStationCode;
                        _taskRepository.UpdateData(task);
                        return task;
                    }
                }
                else
                {
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到出库站台【{stationManger.StationDeviceCode}】对应的通讯对象,无法判断出库站台是否被占用");
                }
            }
            else
            {
                _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.NextAddress}】信息,无法校验站台");
            }
            return null;
        }
        /// <summary>
        /// ä»»åŠ¡å®žä½“è½¬æ¢æˆå‘½ä»¤Model
        /// </summary>
        /// <param name="task">任务实体</param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public StackerCraneTaskCommand? ConvertToStackerCraneTaskCommand([NotNull] Dt_Task task)
        {
            StackerCraneTaskCommand stackerCraneTaskCommand = new StackerCraneTaskCommand();
            stackerCraneTaskCommand.Barcode = task.PalletCode;
            stackerCraneTaskCommand.TaskNum = task.TaskNum;
            stackerCraneTaskCommand.WorkType = 1;
            stackerCraneTaskCommand.TrayType = 1;
            if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//判断是否是入库任务
            {
                //List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway);
                //if (routers.Count > 0)
                //{
                string[] startCodes = task.CurrentAddress.Split("-");
                stackerCraneTaskCommand.StartRow = Convert.ToInt16(startCodes[0]);
                stackerCraneTaskCommand.StartColumn = Convert.ToInt16(startCodes[1]);
                stackerCraneTaskCommand.StartLayer = Convert.ToInt16(startCodes[2]);
                string[] targetCodes = task.NextAddress.Split("-");
                if (targetCodes.Length == 3)
                {
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
                }
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"入库任务终点错误,起点:【{task.NextAddress}】");
                    return null;
                }
                //}
                //else
                //{
                //    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.NextAddress}】信息,无法获取对应的堆垛机取货站台信息");
                //    return null;
                //}
            }
            else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                //List<Dt_Router> routers = _routerService.QueryNextRoutes(task.Roadway, task.TargetAddress);
                //if (routers.Count > 0)
                {
                    string[] targetCodes = task.NextAddress.Split("-");
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
                    string[] sourceCodes = task.CurrentAddress.Split("-");
                    if (sourceCodes.Length == 3)
                    {
                        stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]);
                        stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
                        stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
                    }
                    else
                    {
                        //数据配置错误
                        _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"出库任务起点错误,起点:【{task.CurrentAddress}】");
                        return null;
                    }
                }
                //else
                //{
                //    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.NextAddress}】信息,无法获取对应的堆垛机放货站台信息");
                //    return null;
                //}
            }
            else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
            {
                string[] targetCodes = task.NextAddress.Split("-");
                if (targetCodes.Length == 3)
                {
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
                }
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库任务终点错误,起点:【{task.NextAddress}】");
                    return null;
                }
                string[] sourceCodes = task.CurrentAddress.Split("-");
                if (sourceCodes.Length == 3)
                {
                    stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]);
                    stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
                    stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
                }
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库任务起点错误,起点:【{task.CurrentAddress}】");
                    return null;
                }
            }
            return stackerCraneTaskCommand;
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/×躸²Ö/GroundStationDBName.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEAWCS_Tasks.阻焊仓
{
    public enum GroundStationDBName
    {
        /// <summary>
        /// æ˜¯å¦å…è®¸æ”¾è´§(读)
        /// </summary>
        R_IsCanPut,
        /// <summary>
        /// æ˜¯å¦å…è®¸å–è´§(读)
        /// </summary>
        R_IsCanTake,
        /// <summary>
        /// å–货托盘类型(读)
        /// </summary>
        R_TakePalletType,
        /// <summary>
        /// æ”¾è´§æ‰˜ç›˜ç±»åž‹(写)
        /// </summary>
        W_PutPalletType,
        /// <summary>
        /// æ”¾è´§è¯·æ±‚(写)
        /// </summary>
        W_PutRequest,
        /// <summary>
        /// æ”¾è´§å®Œæˆ(写)
        /// </summary>
        W_PutFinish,
        /// <summary>
        /// å–货请求(写)
        /// </summary>
        W_TakeRequest,
        /// <summary>
        /// å–货完成(写)
        /// </summary>
        W_TakeFinish
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/×躸²Ö/StackerCraneJob_ZH.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,309 @@
using Microsoft.AspNetCore.Components.Routing;
using Quartz;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Service;
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
using WIDESEAWCS_Tasks.HoisterJob;
using WIDESEAWCS_Tasks.StackerCraneJob;
using WIDESEAWCS_Tasks.阻焊仓;
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class StackerCraneJob_ZH : JobBase, IJob
    {
        private readonly ITaskService _taskService;
        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
        private readonly ITaskRepository _taskRepository;
        private readonly IRouterService _routerService;
        private readonly IStationMangerRepository _stationMangerRepository;
        public StackerCraneJob_ZH(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository)
        {
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
            _taskRepository = taskRepository;
            _routerService = routerService;
            _stationMangerRepository = stationMangerRepository;
        }
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams");
                if (commonStackerCrane != null)
                {
                    if (!commonStackerCrane.IsEventSubscribed)
                    {
                        commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//订阅任务完成事件
                    }
                    if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal)
                    {
                        commonStackerCrane.CheckStackerCraneTaskCompleted();//防止任务完成事件监测超时,再手动触发一次
                        if (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
                        {
                            Dt_Task? task = GetTask(commonStackerCrane);
                            if (task != null)
                            {
                                StackerCraneTaskCommand? stackerCraneTaskCommand = ConvertToStackerCraneTaskCommand(task);
                                if (stackerCraneTaskCommand != null)
                                {
                                    bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
                                    if (sendFlag)
                                    {
                                        commonStackerCrane.LastTaskType = task.TaskType;
                                        _taskService.UpdateTaskStatusToNext(task.TaskNum);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                WriteError(nameof(StackerCraneJob_ZH), ex.Message, ex);
            }
            return Task.CompletedTask;
        }
        /// <summary>
        /// ä»»åŠ¡å®Œæˆäº‹ä»¶è®¢é˜…çš„æ–¹æ³•
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender, WIDESEAWCS_QuartzJob.StackerCrane.StackerCraneTaskCompletedEventArgs e)
        {
            CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane;
            if (commonStackerCrane != null)
            {
                if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
                {
                    Console.Out.WriteLine("TaskCompleted" + e.TaskNum);
                    _taskService.StackCraneTaskCompleted(e.TaskNum);
                    commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5);
                }
            }
        }
        /// <summary>
        /// èŽ·å–ä»»åŠ¡
        /// </summary>
        /// <param name="commonStackerCrane">堆垛机对象</param>
        /// <returns></returns>
        private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane)
        {
            Dt_Task task;
            if (commonStackerCrane.LastTaskType == null)
            {
                task = _taskService.QueryStackerCraneTask(commonStackerCrane.DeviceCode);
            }
            else
            {
                if (commonStackerCrane.LastTaskType.GetValueOrDefault().GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                {
                    task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
                    if (task == null)
                    {
                        task = _taskService.QueryStackerCraneOutTask(commonStackerCrane.DeviceCode);
                    }
                }
                else
                {
                    task = _taskService.QueryStackerCraneOutTask(commonStackerCrane.DeviceCode);
                    if (task == null)
                    {
                        task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
                    }
                }
            }
            if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                if (OutTaskStationIsOccupied(task) != null || true)
                {
                    return task;
                }
                else
                {
                    List<string> otherOutStaionCodes = _routerService.QueryNextRoutes(commonStackerCrane.DeviceCode, task.NextAddress).Select(x => x.ChildPosi).ToList();
                    List<Dt_Task> tasks = _taskService.QueryStackerCraneOutTasks(commonStackerCrane.DeviceCode, otherOutStaionCodes);
                    foreach (var item in tasks)
                    {
                        if (OutTaskStationIsOccupied(task) != null)
                        {
                            return task;
                        }
                    }
                    task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode);
                }
            }
            return task;
        }
        /// <summary>
        /// å‡ºåº“任务判断出库站台是否被占用
        /// </summary>
        /// <param name="task">任务实体</param>
        /// <returns>如果未被占用,返回传入的任务信息,否则,返回null</returns>
        private Dt_Task? OutTaskStationIsOccupied([NotNull] Dt_Task task)
        {
            Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == task.TargetAddress && x.StackerCraneCode == task.Roadway);
            if (stationManger != null)
            {
                IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
                if (device != null)
                {
                    OtherDevice client = (OtherDevice)device;
                    if (client.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, stationManger.StationCode))//出库站台未被占用
                    {
                        task.TargetAddress = stationManger.StackerCraneStationCode;
                        _taskRepository.UpdateData(task);
                        return task;
                    }
                }
                else
                {
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到出库站台【{stationManger.StationDeviceCode}】对应的通讯对象,无法判断出库站台是否被占用");
                    WriteInfo(nameof(StackerCraneJob_ZH), $"未找到出库站台【{stationManger.StationDeviceCode}】对应的通讯对象,无法判断出库站台是否被占用");
                }
            }
            else
            {
                _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.NextAddress}】信息,无法校验站台");
                WriteInfo(nameof(StackerCraneJob_ZH), $"未找到站台【{task.NextAddress}】信息,无法校验站台");
            }
            return null;
        }
        /// <summary>
        /// ä»»åŠ¡å®žä½“è½¬æ¢æˆå‘½ä»¤Model
        /// </summary>
        /// <param name="task">任务实体</param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public StackerCraneTaskCommand? ConvertToStackerCraneTaskCommand([NotNull] Dt_Task task)
        {
            StackerCraneTaskCommand stackerCraneTaskCommand = new StackerCraneTaskCommand();
            stackerCraneTaskCommand.Barcode = task.PalletCode;
            stackerCraneTaskCommand.TaskNum = task.TaskNum;
            stackerCraneTaskCommand.WorkType = 1;
            stackerCraneTaskCommand.TrayType = 1;
            if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//判断是否是入库任务
            {
                //List<Dt_Router> routers = _routerService.QueryNextRoutes(task.CurrentAddress, task.Roadway);
                //if (routers.Count > 0)
                //{
                string[] startCodes = task.CurrentAddress.Split("-");
                stackerCraneTaskCommand.StartRow = Convert.ToInt16(startCodes[0]);
                stackerCraneTaskCommand.StartColumn = Convert.ToInt16(startCodes[1]);
                stackerCraneTaskCommand.StartLayer = Convert.ToInt16(startCodes[2]);
                string[] targetCodes = task.NextAddress.Split("-");
                if (targetCodes.Length == 3)
                {
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
                }
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"入库任务终点错误,起点:【{task.NextAddress}】");
                    return null;
                }
                //}
                //else
                //{
                //    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.NextAddress}】信息,无法获取对应的堆垛机取货站台信息");
                //    return null;
                //}
            }
            else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
            {
                //List<Dt_Router> routers = _routerService.QueryNextRoutes(task.Roadway, task.TargetAddress);
                //if (routers.Count > 0)
                {
                    string[] targetCodes = task.NextAddress.Split("-");
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
                    string[] sourceCodes = task.CurrentAddress.Split("-");
                    if (sourceCodes.Length == 3)
                    {
                        stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]);
                        stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
                        stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
                    }
                    else
                    {
                        //数据配置错误
                        _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"出库任务起点错误,起点:【{task.CurrentAddress}】");
                        WriteInfo(nameof(StackerCraneJob_ZH), $"出库任务起点错误,起点:【{task.CurrentAddress}】");
                        return null;
                    }
                }
                //else
                //{
                //    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"未找到站台【{task.NextAddress}】信息,无法获取对应的堆垛机放货站台信息");
                //    return null;
                //}
            }
            else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
            {
                string[] targetCodes = task.NextAddress.Split("-");
                if (targetCodes.Length == 3)
                {
                    stackerCraneTaskCommand.EndRow = Convert.ToInt16(targetCodes[0]);
                    stackerCraneTaskCommand.EndColumn = Convert.ToInt16(targetCodes[1]);
                    stackerCraneTaskCommand.EndLayer = Convert.ToInt16(targetCodes[2]);
                }
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库任务终点错误,起点:【{task.NextAddress}】");
                    WriteInfo(nameof(StackerCraneJob_ZH), $"移库任务终点错误,起点:【{task.NextAddress}】");
                    return null;
                }
                string[] sourceCodes = task.CurrentAddress.Split("-");
                if (sourceCodes.Length == 3)
                {
                    stackerCraneTaskCommand.StartRow = Convert.ToInt16(sourceCodes[0]);
                    stackerCraneTaskCommand.StartColumn = Convert.ToInt16(sourceCodes[1]);
                    stackerCraneTaskCommand.StartLayer = Convert.ToInt16(sourceCodes[2]);
                }
                else
                {
                    //数据配置错误
                    _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"移库任务起点错误,起点:【{task.CurrentAddress}】");
                    WriteInfo(nameof(StackerCraneJob_ZH), $"移库任务起点错误,起点:【{task.CurrentAddress}】");
                    return null;
                }
            }
            return stackerCraneTaskCommand;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/2890c663-d711-4602-bdad-56852b6a51bc.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/433da193-e6b4-48ed-bdc6-2332b099c9c2.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/4b9d13b5-464a-47d4-8dae-9937d5273cc6.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5023b4f8-50f2-4301-b3ca-8d83fa478bdc.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5e0bd2ed-63f0-464e-b65d-6e328058f9ca.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/776b31ca-b3d0-487d-8a56-85a65dead3f1.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/bb9c5c98-5de4-43c8-8a36-34ad166b9c7a.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d6701bb1-0090-4502-a2ca-a4e0726e92d8.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/MaterielInfoService.cs
@@ -13,8 +13,11 @@
{
    public partial class MaterielInfoService : ServiceBase<Dt_MaterielInfo, IMaterielInfoRepository>, IMaterielInfoService
    {
        public MaterielInfoService(IMaterielInfoRepository BaseDal) : base(BaseDal)
        private readonly IBasicRepository _basicRepository;
        public MaterielInfoService(IMaterielInfoRepository BaseDal, IBasicRepository basicRepository) : base(BaseDal)
        {
            _basicRepository = basicRepository;
        }
        public IMaterielInfoRepository Repository => BaseDal;
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs
@@ -14,20 +14,20 @@
{
    public class BasicService : IBasicService
    {
        /// <summary>
        ///
        /// </summary>
        public ILocationInfoService LocationInfoService { get; }
        public IMaterielInfoService MaterielInfoService { get; }
        public IWarehouseService WarehouseService { get; }
        public BasicService(ILocationInfoService locationInfoService, IMaterielInfoService materielInfoService, IWarehouseService warehouseService)
        public ISupplierInfoService SupplierInfoService { get; }
        public BasicService(ILocationInfoService locationInfoService, IMaterielInfoService materielInfoService, IWarehouseService warehouseService, ISupplierInfoService supplierInfoService)
        {
            LocationInfoService = locationInfoService;
            MaterielInfoService = materielInfoService;
            WarehouseService = warehouseService;
            SupplierInfoService = supplierInfoService;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/MaterielInfoService.cs
@@ -9,6 +9,7 @@
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.ERP;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
@@ -66,6 +67,12 @@
        {
            try
            {
                Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == model.WaId);
                if (warehouse == null)
                {
                    return WebResponseContent.Instance.Error($"未找到仓库信息");
                }
                if (model.OperateType == 0)
                {
                    Dt_MaterielInfo materielInfo = new Dt_MaterielInfo()
@@ -78,14 +85,14 @@
                        MaterielName = model.Name,
                        MaterielSize = model.Size,
                        MaterielSourceType = (MaterielSourceTypeEnum)model.ItemSourceType,
                        MaterielSpec = "model.",
                        MaterielSpec = model.StandType,
                        MaterielState = (EnableEnum)model.State,
                        MaterielThickness = model.Thickness,
                        MaterielType = (MaterielTypeEnum)model.ItemType,
                        MaterielUnit = model.Unit,
                        MaterielVersion = model.MaterialVersion,
                        MaterielWide = model.Wide,
                        WarehouseId = model.WaId,
                        WarehouseId = warehouse.WarehouseId,
                    };
                    BaseDal.AddData(materielInfo);
                }
@@ -112,7 +119,7 @@
                    materielInfo.MaterielUnit = model.Unit;
                    materielInfo.MaterielVersion = model.MaterialVersion;
                    materielInfo.MaterielWide = model.Wide;
                    materielInfo.WarehouseId = model.WaId;
                    materielInfo.WarehouseId = warehouse.WarehouseId;
                    BaseDal.UpdateData(materielInfo);
                }
                else if (model.OperateType == 2)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Attributes/MethodParamsValidateAttribute.cs
@@ -9,5 +9,6 @@
    [AttributeUsage(AttributeTargets.Method)]
    public class MethodParamsValidateAttribute : Attribute
    {
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Attributes/ModelValidateAttribute.cs
@@ -88,6 +88,8 @@
        public Func<object, (bool, string, object?)> CustomValidateMethod { get; set; }
        public object ErrorResponse { get; set; }
        public ModelValidateAttribute()
        {
        }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MaterielInfoDTO.cs
ÎļþÒÑɾ³ý
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/SupplierDTO.cs
@@ -8,45 +8,72 @@
namespace WIDESEA_DTO.Basic
{
    [ModelValidate]
    public class Supplier
    {
        /// <summary>
        ///
        /// </summary>
        public string From { get; set; }
        /// <summary>
        ///
        /// </summary>
        public string DateTime { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("物料列表", NotNullAndEmpty = true)]
        public SupplierDTO Content { get; set; }
    }
    [ModelValidate]
    public class SupplierDTO
    {
        /// <summary>
        /// ä¾›åº”商编码
        /// </summary>
        [PropertyValidate("供应商编码", NotNullAndEmpty = true)]
        public string Code { get; set; }
        /// <summary>
        /// ä¾›åº”商全称
        /// </summary>
        [PropertyValidate("供应商全称", NotNullAndEmpty = true)]
        public string Name { get; set; }
        /// <summary>
        /// ä¾›åº”商简称
        /// </summary>
        [PropertyValidate("供应商简称", NotNullAndEmpty = true)]
        public string ShortName { get; set; }
        /// <summary>
        /// è”系人
        /// </summary>
        [PropertyValidate("联系人", NotNullAndEmpty = true)]
        public string Contacts { get; set; }
        /// <summary>
        /// è”系电话
        /// </summary>
        [PropertyValidate("联系电话", NotNullAndEmpty = true)]
        public string ContactNumber { get; set; }
        /// <summary>
        /// è”系地址
        /// </summary>
        [PropertyValidate("联系地址", NotNullAndEmpty = true)]
        public string ContactAddress { get; set; }
        /// <summary>
        /// ç”µå­é‚®ç®±
        /// </summary>
        [PropertyValidate("电子邮箱", NotNullAndEmpty = true)]
        public string Email { get; set; }
        /// <summary>
        /// æè¿°
        /// </summary>
        [PropertyValidate("描述", NotNullAndEmpty = true)]
        public string Description { get; set; }
        /// <summary>
        /// çŠ¶æ€
        /// </summary>
        [PropertyValidate("状态", NotNullAndEmpty = true)]
        public int State { get; set; }
        public string InvOrgId { get; set; }
        /// <summary>
        /// åº“存组织
        /// </summary>
        [PropertyValidate("库存组织", NotNullAndEmpty = true)]
        public string InvOrgId { get; set; } = "淮安特创二厂";
        /// <summary>
        /// æ“ä½œç±»åž‹
        /// </summary>
        [PropertyValidate("操作类型", NotNullAndEmpty = true,Check = new object[] { 0, 1, 2 })]
        public string OperateType {  get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpOutOrderDTO.cs
@@ -8,50 +8,99 @@
namespace WIDESEA_DTO.ERP
{
    [ModelValidate]
    public class ErpOutOrder
    {
        /// <summary>
        ///
    /// å‡ºåº“单
        /// </summary>
        public string From { get; set; }
        /// <summary>
        ///
        /// </summary>
        public string DateTime { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("物料列表", NotNullAndEmpty = true)]
        public ErpOutOrderDTO Content { get; set; }
    }
    [ModelValidate]
    public class ErpOutOrderDTO
    {
        /// <summary>
        /// æ“ä½œç±»åž‹<br/>
        /// 1:新增<br/>
        /// 2:修改<br/>
        /// 3:删除(删除只要明细行号和领料单号)
        /// </summary>
        [PropertyValidate("操作类型", NotNullAndEmpty = true, Check = new object[] { 1, 2, 3 })]
        public int Way { get; set; }
        /// <summary>
        /// æ˜Žç»†è¡Œå·
        /// </summary>
        [PropertyValidate("明细行号", NotNullAndEmpty = true)]
        public string RowNo { get; set; }
        /// <summary>
        /// é¢†æ–™è®¢å•号
        /// </summary>
        [PropertyValidate("领料订单号", NotNullAndEmpty = true)]
        public string OrderNo { get; set; }
        /// <summary>
        /// ä»“库编号
        /// </summary>
        [PropertyValidate("仓库编号", NotNullAndEmpty = true)]
        public string WaId { get; set; }
        /// <summary>
        /// è®¢å•类型<br/>
        /// 1:标准生产领料<br/>
        /// 2:标准部门领料<br/>
        /// 3:研发项目领料<br/>
        /// 4:物料送检出仓<br/>
        /// 5:物料调出<br/>
        /// 6:维修发料<br/>
        /// 7:销售贸易<br/>
        /// 8:退货管理
        /// </summary>
        [PropertyValidate("订单类型", NotNullAndEmpty = true, Check = new object[] { 1, 2, 3, 4, 5, 6, 7, 8 })]
        public int OType { get; set; }
        /// <summary>
        /// ç‰©æ–™ç¼–码
        /// </summary>
        [PropertyValidate("物料编码", NotNullAndEmpty = true)]
        public string MCode { get; set; }
        /// <summary>
        /// ç‰©æ–™æ‰¹æ¬¡
        /// </summary>
        [PropertyValidate("物料批次")]
        public string MLot { get; set; }
        /// <summary>
        /// æ•°é‡
        /// </summary>
        [PropertyValidate("数量", NotNullAndEmpty = true, MinValue = 0, IsContainMinValue = false)]
        public float Qty { get; set; }
        /// <summary>
        /// å•位
        /// </summary>
        [PropertyValidate("单位", NotNullAndEmpty = true)]
        public string Unit { get; set; }
        /// <summary>
        /// ä¸‹å•日期
        /// </summary>
        [PropertyValidate("下单日期", NotNullAndEmpty = true)]
        public string OrderData { get; set; }
        /// <summary>
        /// å¤‡æ³¨
        /// </summary>
        [PropertyValidate("备注")]
        public string Node { get; set; }
        /// <summary>
        /// éƒ¨é—¨ç¼–号
        /// </summary>
        [PropertyValidate("部门编号")]
        public string DepartmentCode { get; set; }
        /// <summary>
        /// éƒ¨é—¨åç§°
        /// </summary>
        [PropertyValidate("部门名称")]
        public string DepartmentName { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ErpResponseContent.cs
@@ -32,15 +32,15 @@
        /// <summary>
        /// 
        /// </summary>
        public bool bSucc { get; set; } = true;
        public bool BSucc { get; set; } = true;
        /// <summary>
        /// 
        /// </summary>
        public string strCode { get; set; } = "0000";
        public string StrCode { get; set; } = "0000";
        /// <summary>
        /// æ‰§è¡ŒæˆåŠŸ
        /// </summary>
        public string strMsg { get; set; } = "执行成功";
        public string StrMsg { get; set; } = "执行成功";
        /// <summary>
        /// 
        /// </summary>
@@ -56,17 +56,17 @@
        }
        public ErpResponseContent OK(string message = null)
        {
            bSucc = true;
            strCode = "0000";
            strMsg = message == null ? "执行成功" : message;
            BSucc = true;
            StrCode = "0000";
            StrMsg = message == null ? "执行成功" : message;
            return this;
        }
        public ErpResponseContent Error(string message = null)
        {
            bSucc = false;
            strCode = "404";
            strMsg = message == null ? "执行失败" : message;
            BSucc = false;
            StrCode = "404";
            StrMsg = message == null ? "执行失败" : message;
            return this;
        }
    }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/MaterielInfoDTO.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,174 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
namespace WIDESEA_DTO.ERP
{
    [ModelValidate()]
    public class MaterielInfoDTO
    {
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string Code { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string Name { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string StandType { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public int ItemType { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string Type { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public int ItemSourceType { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string Unit { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string MaterialVersion { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public int Size { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public int Length { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public int Thickness { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public int Wide { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string Model { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string Color { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string MaterialTG { get; set; }
        ///// <summary>
        /////
        ///// </summary>
        //[PropertyValidate("", NotNullAndEmpty = true)]
        //public string Spare1 { get; set; }
        ///// <summary>
        /////
        ///// </summary>
        //[PropertyValidate("", NotNullAndEmpty = true)]
        //public string Spare2 { get; set; }
        ///// <summary>
        /////
        ///// </summary>
        //[PropertyValidate("", NotNullAndEmpty = true)]
        //public string Spare3 { get; set; }
        ///// <summary>
        /////
        ///// </summary>
        //[PropertyValidate("", NotNullAndEmpty = true)]
        //public string Spare4 { get; set; }
        ///// <summary>
        /////
        ///// </summary>
        //[PropertyValidate("", NotNullAndEmpty = true)]
        //public string Spare5 { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public int State { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string InvOrgId { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public int OperateType { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string UserDef01 { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string UserDef04 { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public int IsCheck { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("", NotNullAndEmpty = true)]
        public string WaId { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/PurchaseOrderModel.cs
@@ -11,23 +11,7 @@
namespace WIDESEA_DTO
{
    [ModelValidate]
    public class Root
    {
        /// <summary>
        ///
        /// </summary>
        public string From { get; set; }
        /// <summary>
        ///
        /// </summary>
        public string DateTime { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("物料列表", NotNullAndEmpty = true)]
        public PurchaseOrderModel Content { get; set; }
    }
    /// <summary>
    /// é‡‡è´­å•模型
    /// </summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/ReceiveOrderModel.cs
ÎļþÒÑɾ³ý
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/Root.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
namespace WIDESEA_DTO.ERP
{
    [ModelValidate]
    public class Root<T>
    {
        /// <summary>
        ///
        /// </summary>
        public string From { get; set; }
        /// <summary>
        ///
        /// </summary>
        public string DateTime { get; set; }
        /// <summary>
        ///
        /// </summary>
        [PropertyValidate("内容", NotNullAndEmpty = true)]
        public T Content { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
namespace WIDESEA_DTO
{
    [ModelValidate]
    public class MesResponseContent
    {
        /// <summary>
        ///
        /// </summary>
        public bool bSucc { get; set; }
        /// <summary>
        ///
        /// </summary>
        public string StrCode { get; set; }
        /// <summary>
        /// æ‰§è¡ŒæˆåŠŸ
        /// </summary>
        public string StrMsg { get; set; }
        /// <summary>
        ///
        /// </summary>
        public DateTime DataTime { get; set; }
        /// <summary>
        ///
        /// </summary>
        public content Content { get; set; }
        public class content
        {
            /// <summary>
            ///
            /// </summary>
            public string Code { get; set; }
            /// <summary>
            ///
            /// </summary>
            public string Name { get; set; }
            /// <summary>
            ///
            /// </summary>
            public string ShortName { get; set; }
            /// <summary>
            ///
            /// </summary>
            public string Contacts { get; set; }
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
namespace WIDESEA_DTO
{
    /// <summary>
    /// æµ‹è¯•架出仓模型
    /// </summary>
    [ModelValidate]
    public class TestToolOutModel
    {
        /// <summary>
        /// æµ‹æž¶ç¼–码
        /// </summary>
        [PropertyValidate("测架编码", NotNullAndEmpty = true)]
        public string ToolCode { get; set; }
        /// <summary>
        /// ç›®æ ‡åœ°å€ç 
        /// </summary>
        [PropertyValidate("目标地址码", NotNullAndEmpty = true)]
        public string TargetAddressCode { get; set; }
    }
    /// <summary>
    /// æµ‹è¯•架报废模型
    /// </summary>
    [ModelValidate]
    public class TestToolScrapModel
    {
        /// <summary>
        /// æµ‹æž¶ç¼–码
        /// </summary>
        [PropertyValidate("测架编码", NotNullAndEmpty = true)]
        public string ToolCode { get; set; }
    }
    /// <summary>
    /// æµ‹è¯•架退库模型
    /// </summary>
    [ModelValidate]
    public class TestToolBackModel
    {
        /// <summary>
        /// æºä½ç½®
        /// </summary>
        [PropertyValidate("源位置", NotNullAndEmpty = true)]
        public string SourceAddressCode { get; set; }
        /// <summary>
        /// æµ‹è¯•架编码
        /// </summary>
        [PropertyValidate("测试架编码", NotNullAndEmpty = true)]
        public string TestToolCode { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockOutboundOrderDTO.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_DTO.Stock
{
    public class StockOutboundOrderDTO
    {
        /// <summary>
        /// å•据编码
        /// </summary>
        public string OrderNo { get; set; }
        /// <summary>
        /// æ‰˜ç›˜å·
        /// </summary>
        public string PalletCode { get; set; }
        /// <summary>
        /// ç‰©æ–™ç¼–码
        /// </summary>
        public string MaterielCode { get; set; }
        /// <summary>
        /// ç‰©æ–™åç§°
        /// </summary>
        public string MaterielName { get; set; }
        /// <summary>
        /// æ‰¹æ¬¡å·
        /// </summary>
        public string BatchNo { get; set; }
        /// <summary>
        /// åºåˆ—号
        /// </summary>
        public string SerialNumber {  get; set; }
        /// <summary>
        /// åº“存数量
        /// </summary>
        public float StockQuantity { get; set; }
        /// <summary>
        /// å‡ºåº“数量
        /// </summary>
        public float OutboundQuantity { get; set; }
        /// <summary>
        /// å·¥å•总数
        /// </summary>
        public float OrderQuantity { get; set; }
        /// <summary>
        /// å·²å‡ºæ•°é‡
        /// </summary>
        public float OverOutQuantity { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs
@@ -9,11 +9,24 @@
{
    public interface IBasicService: IDependency
    {
        /// <summary>
        /// è´§ä½ä¸šåС层
        /// </summary>
        ILocationInfoService LocationInfoService { get; }
        /// <summary>
        /// ç‰©æ–™ä¸šåС层
        /// </summary>
        IMaterielInfoService MaterielInfoService { get; }
        /// <summary>
        /// ä»“库业务层
        /// </summary>
        IWarehouseService WarehouseService { get; }
        /// <summary>
        /// ä¾›åº”商业务层
        /// </summary>
        ISupplierInfoService SupplierInfoService { get; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs
@@ -6,6 +6,7 @@
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.ERP;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Stock;
using WIDESEA_IStockRepository;
@@ -19,5 +20,6 @@
        List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity);
        List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, int warehoseId);
        StockOutboundOrderDTO GetStockOutboundOrder(SaveModel saveModel);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -25,6 +25,8 @@
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_DTO;
using WIDESEA_DTO.ERP;
using WIDESEA_DTO.Stock;
using WIDESEA_ITaskInfoRepository;
using WIDESEA_Model.Models;
@@ -38,5 +40,11 @@
        WebResponseContent RequestInboundTask(string palletCode, string stationCode);
        WebResponseContent InboundTaskCompleted(int taskNum);
        /// <summary>
        /// æµ‹è¯•架出仓
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        MesResponseContent TestToolOut(TestToolOutModel model);
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs
@@ -39,6 +39,12 @@
        }
        private static object _rowNoLocker = new object();
        /// <summary>
        /// æ‰«ç æ·»åŠ æ”¶è´§å•æ˜Žç»†ï¼ˆå•ä¸ªï¼‰
        /// </summary>
        /// <param name="serNum">物料码</param>
        /// <param name="orderNo">收货单号</param>
        /// <returns></returns>
        public WebResponseContent AddReceiveOrderDetail(string serNum, string orderNo)
        {
            try
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_MaterielInfo.cs
@@ -116,7 +116,10 @@
        [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "备注")]
        public string Remark { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "仓库编号")]
        public string WarehouseId { get; set; }
        /// <summary>
        /// ä»“库编号
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "仓库编号")]
        public int WarehouseId { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -1,4 +1,5 @@
using AutoMapper;
using MailKit.Search;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using SqlSugar;
using System;
@@ -70,7 +71,54 @@
            }
        }
        public StockOutboundOrderDTO GetStockOutboundOrder(SaveModel saveModel)
        {
            try
            {
                var palletCode = saveModel.MainData["barcode"].ToString();
                Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
                if (stockInfo == null)
                {
                    throw new Exception($"未找到库存信息");
                }
                Dt_StockInfoDetail stockInfoDetail = stockInfo.Details.FirstOrDefault();
                if (stockInfoDetail == null)
                {
                    throw new Exception($"未找到库存详情");
                }
                BaseDal.QueryTabs<Dt_OutboundOrder, Dt_OutboundOrderDetail, StockOutboundOrderDTO>((a, b) => a.Id == b.OrderId, (a, b) => new StockOutboundOrderDTO
                {
                    OrderNo = a.OrderNo,
                    MaterielCode = b.MaterielCode,
                    MaterielName = b.MaterielName,
                    PalletCode = stockInfo.PalletCode,
                    BatchNo = b.BatchNo,
                    OrderQuantity = b.OrderQuantity,
                    OverOutQuantity = b.OverOutQuantity,
                    OutboundQuantity = stockInfoDetail.OutboundQuantity,
                    SerialNumber = stockInfoDetail.SerialNumber,
                    StockQuantity = stockInfoDetail.StockQuantity,
                }, a => true, b => b.BatchNo == stockInfoDetail.BatchNo && b.MaterielCode == stockInfoDetail.MaterielCode, x => true).Select(x => new StockOutboundOrderDTO
                {
                    OrderNo = x.OrderNo,
                    MaterielCode = x.MaterielCode,
                    MaterielName = x.MaterielName,
                    PalletCode = x.PalletCode,
                    BatchNo = x.BatchNo,
                    OrderQuantity = x.OrderQuantity,
                    OverOutQuantity = x.OverOutQuantity,
                    OutboundQuantity = x.OutboundQuantity,
                    SerialNumber = x.SerialNumber,
                    StockQuantity = x.StockQuantity,
                }).ToList();
                return new StockOutboundOrderDTO();
            }
            catch (Exception ex)
            {
                return null;
            }
        }
        public List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity)
        {
            List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>();
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO;
using WIDESEA_ITaskInfoRepository;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
namespace WIDESEA_TaskInfoService
{
    public partial class TaskService : ServiceBase<Dt_Task, ITaskRepository>, ITaskService
    {
        /// <summary>
        /// æµ‹è¯•架出仓
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public MesResponseContent TestToolOut(TestToolOutModel model)
        {
            return new MesResponseContent();
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs
@@ -47,7 +47,7 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost, Route("ReceivePurchaseOrderSingle"), AllowAnonymous, MethodParamsValidate]
        public ErpResponseContent ReceivePurchaseOrder([FromBody] Root model)
        public ErpResponseContent ReceivePurchaseOrder([FromBody] Root<PurchaseOrderModel> model)
        {
            WebResponseContent content = _purchaseOrderService.ReceivePurchaseOrder(model.Content);
            if (content.Status) return Instance.OK();
@@ -60,7 +60,7 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost, Route("ReceiveSupplier"), AllowAnonymous, MethodParamsValidate]
        public ErpResponseContent ReceiveSupplier([FromBody] Supplier model)
        public ErpResponseContent ReceiveSupplier([FromBody] Root<SupplierDTO> model)
        {
            WebResponseContent content = _supplierInfoService.ReceiveSupplier(model.Content);
            if (content.Status) return Instance.OK();
@@ -73,7 +73,7 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost, Route("ReceiveMaterial"), AllowAnonymous, MethodParamsValidate]
        public ErpResponseContent ReceiveMaterial([FromBody] MaterielInfo model)
        public ErpResponseContent ReceiveMaterial([FromBody] Root<MaterielInfoDTO> model)
        {
             WebResponseContent content = _materielInfoService.ReceiveMaterial(model.Content);
            if (content.Status) return Instance.OK();
@@ -86,7 +86,7 @@
        /// <param name="erpOutOrder"></param>
        /// <returns></returns>
        [HttpPost, Route("ReceiveOutOrder"), AllowAnonymous, MethodParamsValidate]
        public ErpResponseContent ReceiveOutOrder([FromBody] ErpOutOrder erpOutOrder)
        public ErpResponseContent ReceiveOutOrder([FromBody] Root<ErpOutOrderDTO> erpOutOrder)
        {
             WebResponseContent content = _outboundOrderService.ReceiveOutOrder(erpOutOrder.Content);
            if (content.Status) return Instance.OK();
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,48 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Attributes;
using WIDESEA_Core;
using WIDESEA_DTO;
using WIDESEA_IBasicService;
using WIDESEA_IInboundRepository;
using WIDESEA_IInboundService;
using WIDESEA_IOutboundService;
using WIDESEA_ITaskInfoService;
using WIDESEA_TaskInfoService;
using WIDESEA_DTO.ERP;
namespace WIDESEA_WMSServer.Controllers.MES
{
    [Route("api/Mes")]
    [ApiController]
    public class MesController : ControllerBase
    {
        private readonly IPurchaseOrderRepository _purchaseOrderRepository;
        private readonly IPurchaseOrderService _purchaseOrderService;
        private readonly ISupplierInfoService _supplierInfoService;
        private readonly IMaterielInfoService _materielInfoService;
        private readonly IOutboundOrderService _outboundOrderService;
        private readonly ITaskService _taskService;
        public MesController(IPurchaseOrderRepository purchaseOrderRepository, IPurchaseOrderService purchaseOrderService, ISupplierInfoService supplierInfoService, IMaterielInfoService materielInfoService, IOutboundOrderService outboundOrderService,ITaskService taskService)
        {
            _purchaseOrderRepository = purchaseOrderRepository;
            _purchaseOrderService = purchaseOrderService;
            _supplierInfoService = supplierInfoService;
            _materielInfoService = materielInfoService;
            _outboundOrderService = outboundOrderService;
            _taskService = taskService;
        }
        /// <summary>
        /// æŽ¥æ”¶MES测试架出库
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost, Route("TestToolOut"), AllowAnonymous, MethodParamsValidate]
        public MesResponseContent TestToolOut([FromBody] Root<TestToolOutModel> model)
        {
          return  _taskService.TestToolOut(model.Content);
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Stock;
using WIDESEA_IBasicRepository;
@@ -23,5 +24,16 @@
        {
            return Service.GetStockSelectViews(orderId, materielCode);
        }
        /// <summary>
        /// æ‹£é€‰
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("GetStockOutboundOrder")]
        public StockOutboundOrderDTO GetStockOutboundOrder([FromBody] SaveModel saveModel)
        {
            return Service.GetStockOutboundOrder(saveModel);
        }
    }
}