wanshenmean
3 天以前 4b483d9d06bead231b88ca212fd799196668a057
fix(任务服务): 修复出库任务选择逻辑和货位分配问题

refactor(基础服务): 优化货位查询性能并添加空闲货位阈值检查

fix(常量配置): 修正常温1号出库地址和输送线映射关系

perf(库存服务): 添加按仓库ID和货位编码查询库存的接口

fix(模拟器): 调整PLC端口配置

style: 清理无用引用和格式化代码

fix(任务流): 设置WMS任务接收委托避免循环依赖

fix(Web响应): 完善WebResponseContent的默认值和状态码

fix(机器人任务): 修正仓库ID和巷道分配逻辑
已添加1个文件
已修改69个文件
851 ■■■■■ 文件已修改
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseModels/WebResponseContent.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/IOutboundTaskFlowService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs 168 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotTaskProcessor.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskSelector.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_Common/Constants/TaskAddressConstants.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_DTO/GradingMachine/OutPutDto.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_GradingMachine.cs 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_AutoOutbound.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Inbound.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Tray.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/BackgroundServices/AutoOutboundTaskBackgroundService.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/BackgroundServices/StockMonitorBackgroundService.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielCodeInfoController.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletCodeInfoController.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/WarehouseController.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Check/CheckOrderController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Check/CheckOrderResultController.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Dashboard/DashboardController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderDetailController.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderDetail_HtyController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrder_HtyController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Mes/MesLogController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderDetailController.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderDetail_HtyController.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrder_HtyController.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Record/LocationStatusChangeRecordController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Record/StockQuantityChangeRecordController.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoDetail_HtyController.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfo_HtyController.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_DictionaryController.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_DictionaryListController.cs 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_LogController.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_MenuController.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_RoleController.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_TenantController.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/Task_HtyController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/launchSettings.json 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/css/site.css 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/css/style.css 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/css/swaggerdoc.css 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/js/site.js 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/js/swaggerdoc.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/swg-login.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/测试工具/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1001/config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/测试工具/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/protocol-templates.json 162 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/设备协议/高常温堆垛机与输送线/~$WCS输送对接地址表_0420.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseModels/WebResponseContent.cs
@@ -36,6 +36,7 @@
        public WebResponseContent OK()
        {
            Status = true;
            Code = 200;
            return this;
        }
@@ -45,19 +46,20 @@
            get { return new WebResponseContent(); }
        }
        // OK方法,设置状态为true,并设置消息和数据,返回当前对象
        public WebResponseContent OK(string message = null, object data = null)
        public WebResponseContent OK(string? message = null, object? data = null)
        {
            Status = true;
            Message = message;
            Data = data;
            Code = 200;
            Message = message ?? "请求成功";
            Data = data ?? new { };
            return this;
        }
        // Error方法,设置状态为false,并设置消息,返回当前对象
        public WebResponseContent Error(string message = null)
        public WebResponseContent Error(string? message = null)
        {
            Status = false;
            Message = message;
            Message = message ?? "请求失败";
            return this;
        }
    }
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/IOutboundTaskFlowService.cs
@@ -30,5 +30,11 @@
        /// <param name="task">任务实体。</param>
        /// <returns>处理结果。</returns>
        WebResponseContent CompleteStackerTask([NotNull] Dt_Task task);
        /// <summary>
        /// è®¾ç½®æŽ¥æ”¶WMS任务的委托(由TaskService在构造后调用,避免循环依赖)。
        /// </summary>
        /// <param name="receiveWMSTaskFunc">接收WMS任务的方法委托。</param>
        void SetReceiveWMSTaskDelegate(Func<List<WMSTaskDTO>, WebResponseContent> receiveWMSTaskFunc);
    }
}
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -97,10 +97,10 @@
      "10030": "GWSC1"
    },
    "AddressSourceLineNoMap": { // å¯¹åº”输送线编号地址映射
      "11001": "10010",
      "11010": "10030",
      "10010": "11001",
      "10030": "11010"
      "11001": "2101",
      "11010": "2103",
      "2101": "11001",
      "2103": "11010"
    }
  },
  "RobotAddressRules": {
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs
@@ -1,5 +1,4 @@
using Autofac;
using Newtonsoft.Json;
using Newtonsoft.Json;
using Serilog;
using System.Diagnostics.CodeAnalysis;
using WIDESEA_Core;
@@ -12,6 +11,7 @@
using WIDESEAWCS_DTO;
using WIDESEAWCS_DTO.Stock;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob.Models;
@@ -29,9 +29,10 @@
        private readonly IRouterService _routerService;
        private readonly HttpClientHelper _httpClientHelper;
        private readonly IRobotTaskService _robotTaskService;
        private readonly IComponentContext _componentContext;
        private readonly ITaskRepository _taskRepository;
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        private readonly ILogger _logger;
        private Func<List<WMSTaskDTO>, WebResponseContent> _receiveWMSTaskFunc;
        /// <summary>
        /// åˆå§‹åŒ–出库任务流程服务。
@@ -39,21 +40,33 @@
        /// <param name="routerService">路由服务。</param>
        /// <param name="httpClientHelper">WMS接口调用帮助类。</param>
        /// <param name="robotTaskService">机械手任务服务。</param>
        /// <param name="componentContext">Autofac组件上下文(用于延迟解析ITaskService以避免循环依赖)。</param>
        public OutboundTaskFlowService(IRouterService routerService, HttpClientHelper httpClientHelper, IRobotTaskService robotTaskService, IComponentContext componentContext, IUnitOfWorkManage unitOfWorkManage, ILogger logger)
        /// <param name="taskRepository">任务仓储(用于删除/归档任务)。</param>
        /// <param name="unitOfWorkManage">工作单元管理器。</param>
        /// <param name="logger">日志记录器。</param>
        public OutboundTaskFlowService(
            IRouterService routerService,
            HttpClientHelper httpClientHelper,
            IRobotTaskService robotTaskService,
            ITaskRepository taskRepository,
            IUnitOfWorkManage unitOfWorkManage,
            ILogger logger)
        {
            _routerService = routerService;
            _httpClientHelper = httpClientHelper;
            _robotTaskService = robotTaskService;
            _componentContext = componentContext;
            _taskRepository = taskRepository;
            _unitOfWorkManage = unitOfWorkManage;
            _logger = logger;
        }
        /// <summary>
        /// å»¶è¿Ÿè§£æžITaskService以避免循环依赖
        /// è®¾ç½®æŽ¥æ”¶WMS任务的委托(由TaskService在构造后调用,避免循环依赖)。
        /// </summary>
        private ITaskService TaskService => _componentContext.Resolve<ITaskService>();
        /// <param name="receiveWMSTaskFunc">接收WMS任务的方法委托。</param>
        public void SetReceiveWMSTaskDelegate(Func<List<WMSTaskDTO>, WebResponseContent> receiveWMSTaskFunc)
        {
            _receiveWMSTaskFunc = receiveWMSTaskFunc;
        }
        /// <summary>
        /// æŽ¥æ”¶WMS任务时初始化出库任务。
@@ -180,14 +193,14 @@
                    _unitOfWorkManage.BeginTran(() =>
                    {
                        // å…ˆåˆ é™¤æœ¬åœ°å‡ºåº“任务,避免托盘号唯一键冲突
                        bool isDeleted = TaskService.Repository.DeleteAndMoveIntoHty(task, OperateTypeEnum.自动完成);
                        bool isDeleted = _taskRepository.DeleteAndMoveIntoHty(task, OperateTypeEnum.自动完成);
                        if (!isDeleted)
                        {
                            return content.Error($"删除本地出库任务失败,任务号:【{task.TaskNum}】,托盘号:【{task.PalletCode}】");
                        }
                        // è°ƒç”¨ReceiveWMSTask创建本地入库任务
                        var receiveResult = TaskService.ReceiveWMSTask(new List<WMSTaskDTO> { inboundTaskDto });
                        // è°ƒç”¨ReceiveWMSTask委托创建本地入库任务
                        var receiveResult = _receiveWMSTaskFunc(new List<WMSTaskDTO> { inboundTaskDto });
                        if (!receiveResult.Status)
                        {
                            return content.Error($"创建本地入库任务失败: {receiveResult.Message}");
@@ -228,7 +241,7 @@
            if (wMSTask == null)
                return WebResponseContent.Instance.Error($"获取WMS系统空托盘出库任务失败,任务号:【{task.TaskNum}】,托盘号:【{task.PalletCode}】,错误信息:【WMS未返回有效任务数据】");
            if (TaskService.ReceiveWMSTask(new List<WMSTaskDTO> { wMSTask }).Status)
            if (_receiveWMSTaskFunc(new List<WMSTaskDTO> { wMSTask }).Status)
                return WebResponseContent.Instance.OK("成功");
            return WebResponseContent.Instance.Error("接收WMS任务失败");
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -1,21 +1,10 @@
using MapsterMapper;
using SqlSugar;
using System.Diagnostics.CodeAnalysis;
using WIDESEA_Core;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_DTO;
using WIDESEAWCS_DTO.Stock;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Service;
namespace WIDESEAWCS_TaskInfoService;
@@ -70,5 +59,8 @@
        _inboundTaskFlowService = inboundTaskFlowService;
        _relocationTaskFlowService = relocationTaskFlowService;
        _robotTaskFlowService = robotTaskFlowService;
        // è®¾ç½®å§”托,避免OutboundTaskFlowService通过IComponentContext延迟解析导致ObjectDisposedException
        _outboundTaskFlowService.SetReceiveWMSTaskDelegate(ReceiveWMSTask);
    }
}
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
@@ -88,7 +88,7 @@
        /// </summary>
        /// <remarks>
        /// </remarks>
        private static List<string> AddressToDeviceType = new List<string> { "11020", "11028", "2125" };
        private static List<string> AddressToDeviceType = new List<string> { "11020", "11028", "2125", "11062" };
        /// <summary>
        /// æ‰˜ç›˜æ£€æŸ¥ä½ç½®çš„æœ€è¿‘执行时间(用于30秒间隔限制)
@@ -168,57 +168,57 @@
                            // ========== æ£€æŸ¥ç‰¹å®šä½ç½®æ˜¯å¦æœ‰æ‰˜ç›˜ ==========
                            // ä»Žé…ç½®ä¸­è¯»å–需要检查托盘的位置列表
                            var checkPalletPositions = App.Configuration.GetSection("CheckPalletPositions")
                                .Get<List<CheckPalletPosition>>() ?? new List<CheckPalletPosition>();
                            //var checkPalletPositions = App.Configuration.GetSection("CheckPalletPositions")
                            //    .Get<List<CheckPalletPosition>>() ?? new List<CheckPalletPosition>();
                            // å¦‚果当前设备在检查列表中
                            if (checkPalletPositions.Any(x => x.Code == childDeviceCode))
                            {
                                // 30秒间隔限制
                                if (_lastPalletCheckTime.TryGetValue(childDeviceCode, out var lastTime) &&
                                    (DateTime.Now - lastTime).TotalSeconds < 30)
                                {
                                    continue;
                                }
                            //// å¦‚果当前设备在检查列表中
                            //if (checkPalletPositions.Any(x => x.Code == childDeviceCode))
                            //{
                            //    // 30秒间隔限制
                            //    if (_lastPalletCheckTime.TryGetValue(childDeviceCode, out var lastTime) &&
                            //        (DateTime.Now - lastTime).TotalSeconds < 30)
                            //    {
                            //        continue;
                            //    }
                                // æ£€æŸ¥è¾“送线状态(是否有托盘)
                                if (command.CV_State == 2)
                                {
                                    // æ£€æŸ¥è¯¥ä½ç½®æ˜¯å¦å·²æœ‰ä»»åŠ¡
                                    var existingTask = _taskService.Db.Queryable<Dt_Task>().Count(x => x.TargetAddress == childDeviceCode);
                                    if (existingTask < 5)
                                    {
                                        // æ²¡æœ‰ä»»åŠ¡ï¼Œå‘ WMS è¯·æ±‚出库托盘任务
                                        var position = checkPalletPositions.FirstOrDefault(x => x.Code == childDeviceCode);
                            //    // æ£€æŸ¥è¾“送线状态(是否有托盘)
                            //    if (command.CV_State == 2)
                            //    {
                            //        // æ£€æŸ¥è¯¥ä½ç½®æ˜¯å¦å·²æœ‰ä»»åŠ¡
                            //        var existingTask = _taskService.Db.Queryable<Dt_Task>().Count(x => x.TargetAddress == childDeviceCode);
                            //        if (existingTask < 5)
                            //        {
                            //            // æ²¡æœ‰ä»»åŠ¡ï¼Œå‘ WMS è¯·æ±‚出库托盘任务
                            //            var position = checkPalletPositions.FirstOrDefault(x => x.Code == childDeviceCode);
                                        string configKey = "GetOutBoundTrayTaskAsync";
                                        string requestParam = new CreateTaskDto()
                                        {
                                            WarehouseId = position.WarehouseId,
                                            TargetAddress = childDeviceCode
                                        }.Serialize();
                                        DateTime startTime = DateTime.Now;
                            //            string configKey = "GetOutBoundTrayTaskAsync";
                            //            string requestParam = new CreateTaskDto()
                            //            {
                            //                WarehouseId = position.WarehouseId,
                            //                TargetAddress = childDeviceCode
                            //            }.Serialize();
                            //            DateTime startTime = DateTime.Now;
                                        var responseResult = _httpClientHelper.Post<WebResponseContent>(configKey, requestParam);
                            //            var responseResult = _httpClientHelper.Post<WebResponseContent>(configKey, requestParam);
                                        _lastPalletCheckTime[childDeviceCode] = DateTime.Now;
                            //            _lastPalletCheckTime[childDeviceCode] = DateTime.Now;
                                        // å¦‚果请求成功,接收 WMS è¿”回的任务
                                        if (responseResult.IsSuccess && responseResult.Data.Status)
                                        {
                                            QuartzLogHelper.LogInfo(_logger, $"调用WMS接口成功,接口:【{configKey}】,请求参数:【{requestParam}】,响应数据:【{responseResult.Data?.Data}】,耗时:{(DateTime.Now - startTime).TotalMilliseconds}ms", conveyorLine.DeviceCode);
                                            var wmsTask = JsonConvert.DeserializeObject<WMSTaskDTO>(responseResult.Data.Data.ToString());
                                            List<WMSTaskDTO> taskDTOs = new List<WMSTaskDTO> { wmsTask };
                                            if (wmsTask != null)
                                                _taskService.ReceiveWMSTask(taskDTOs);
                                        }
                                        else
                                        {
                                            QuartzLogHelper.LogError(_logger, $"调用WMS接口失败,接口:【{configKey}】,请求参数:【{requestParam}】,错误信息:【{responseResult.Data?.Message}】", conveyorLine.DeviceCode);
                                        }
                                    }
                                }
                            }
                            //            // å¦‚果请求成功,接收 WMS è¿”回的任务
                            //            if (responseResult.IsSuccess && responseResult.Data.Status)
                            //            {
                            //                QuartzLogHelper.LogInfo(_logger, $"调用WMS接口成功,接口:【{configKey}】,请求参数:【{requestParam}】,响应数据:【{responseResult.Data?.Data}】,耗时:{(DateTime.Now - startTime).TotalMilliseconds}ms", conveyorLine.DeviceCode);
                            //                var wmsTask = JsonConvert.DeserializeObject<WMSTaskDTO>(responseResult.Data.Data.ToString());
                            //                List<WMSTaskDTO> taskDTOs = new List<WMSTaskDTO> { wmsTask };
                            //                if (wmsTask != null)
                            //                    _taskService.ReceiveWMSTask(taskDTOs);
                            //            }
                            //            else
                            //            {
                            //                QuartzLogHelper.LogError(_logger, $"调用WMS接口失败,接口:【{configKey}】,请求参数:【{requestParam}】,错误信息:【{responseResult.Data?.Message}】", conveyorLine.DeviceCode);
                            //            }
                            //        }
                            //    }
                            //}
                            #endregion æ£€æµ‹æ˜¯å¦éœ€è¦ç©ºæ‰˜ç›˜
@@ -299,48 +299,48 @@
                                        conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, (short)1, childDeviceCode);
                                    }
                                }
                                else if (!command.Barcode.IsNullOrEmpty() && (childDeviceCode == "11001" || childDeviceCode == "11010"))
                                {
                                    var isWcsTask = _taskService.Db.Queryable<Dt_Task>().Any(x => x.PalletCode == command.Barcode && (x.TaskStatus == (int)TaskOutStatusEnum.OutNew || x.TaskStatus == (int)TaskInStatusEnum.InNew));
                                    var isRobotTask = _robotTaskService.Db.Queryable<Dt_RobotTask>().Any(x => x.RobotTargetAddressPalletCode == command.Barcode);
                                    if (isWcsTask || isRobotTask)
                                    {
                                        continue;
                                    }
                                //else if (!command.Barcode.IsNullOrEmpty() && (childDeviceCode == "11001" || childDeviceCode == "11010"))
                                //{
                                //    var isWcsTask = _taskService.Db.Queryable<Dt_Task>().Any(x => x.PalletCode == command.Barcode && (x.TaskStatus == (int)TaskOutStatusEnum.OutNew || x.TaskStatus == (int)TaskInStatusEnum.InNew));
                                //    var isRobotTask = _robotTaskService.Db.Queryable<Dt_RobotTask>().Any(x => x.RobotTargetAddressPalletCode == command.Barcode);
                                //    if (isWcsTask || isRobotTask)
                                //    {
                                //        continue;
                                //    }
                                    // è°ƒç”¨ WMS åˆ›å»ºç©ºæ‰˜ç›˜å…¥åº“任务
                                    string configKey = nameof(ConfigKey.CreateTaskInboundAsync);
                                    string requestParam = new CreateTaskDto()
                                    {
                                        PalletCode = command.Barcode,
                                        SourceAddress = childDeviceCode,
                                        TargetAddress = "GWSC1",  // ç›®æ ‡åœ°å€
                                        Roadway = "GWSC1",             // å··é“
                                        WarehouseId = 1,                   // ä»“库 ID
                                        PalletType = 1,                             // æ‰˜ç›˜ç±»åž‹ï¼ˆé»˜è®¤ä¸º1)
                                        TaskType = TaskTypeEnum.InEmpty.GetHashCode()                         // ä»»åŠ¡ç±»åž‹ï¼ˆå…¥åº“/空托盘入库)
                                    }.Serialize();
                                    DateTime startTime = DateTime.Now;
                                //    // è°ƒç”¨ WMS åˆ›å»ºç©ºæ‰˜ç›˜å…¥åº“任务
                                //    string configKey = nameof(ConfigKey.CreateTaskInboundAsync);
                                //    string requestParam = new CreateTaskDto()
                                //    {
                                //        PalletCode = command.Barcode,
                                //        SourceAddress = childDeviceCode,
                                //        TargetAddress = "GWSC1",  // ç›®æ ‡åœ°å€
                                //        Roadway = "GWSC1",             // å··é“
                                //        WarehouseId = 1,                   // ä»“库 ID
                                //        PalletType = 1,                             // æ‰˜ç›˜ç±»åž‹ï¼ˆé»˜è®¤ä¸º1)
                                //        TaskType = TaskTypeEnum.InEmpty.GetHashCode()                         // ä»»åŠ¡ç±»åž‹ï¼ˆå…¥åº“/空托盘入库)
                                //    }.Serialize();
                                //    DateTime startTime = DateTime.Now;
                                    var responseResult = _httpClientHelper.Post<WebResponseContent>(configKey, requestParam);
                                //    var responseResult = _httpClientHelper.Post<WebResponseContent>(configKey, requestParam);
                                    if (responseResult.IsSuccess && responseResult.Data.Status)
                                    {
                                        QuartzLogHelper.LogInfo(_logger, $"调用WMS接口成功,接口:【{configKey}】,请求参数:【{requestParam}】,响应数据:【{responseResult.Data?.Data}】,耗时:{(DateTime.Now - startTime).TotalMilliseconds}ms", conveyorLine.DeviceCode);
                                        var wmsTask = JsonConvert.DeserializeObject<WMSTaskDTO>(responseResult?.Data?.Data?.ToString());
                                        List<WMSTaskDTO> taskDTOs = new List<WMSTaskDTO> { wmsTask };
                                        if (wmsTask == null) continue;
                                //    if (responseResult.IsSuccess && responseResult.Data.Status)
                                //    {
                                //        QuartzLogHelper.LogInfo(_logger, $"调用WMS接口成功,接口:【{configKey}】,请求参数:【{requestParam}】,响应数据:【{responseResult.Data?.Data}】,耗时:{(DateTime.Now - startTime).TotalMilliseconds}ms", conveyorLine.DeviceCode);
                                //        var wmsTask = JsonConvert.DeserializeObject<WMSTaskDTO>(responseResult?.Data?.Data?.ToString());
                                //        List<WMSTaskDTO> taskDTOs = new List<WMSTaskDTO> { wmsTask };
                                //        if (wmsTask == null) continue;
                                        if (_taskService.ReceiveWMSTask(taskDTOs).Status)
                                        {
                                            conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, (short)1, childDeviceCode);
                                        }
                                    }
                                    else
                                    {
                                        QuartzLogHelper.LogError(_logger, $"调用WMS接口失败,接口:【{configKey}】,请求参数:【{requestParam}】,错误信息:【{responseResult.Data?.Message}】", conveyorLine.DeviceCode);
                                    }
                                }
                                //        if (_taskService.ReceiveWMSTask(taskDTOs).Status)
                                //        {
                                //            conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, (short)1, childDeviceCode);
                                //        }
                                //    }
                                //    else
                                //    {
                                //        QuartzLogHelper.LogError(_logger, $"调用WMS接口失败,接口:【{configKey}】,请求参数:【{requestParam}】,错误信息:【{responseResult.Data?.Message}】", conveyorLine.DeviceCode);
                                //    }
                                //}
                            }
                        }
                        catch (Exception innerEx)
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotTaskProcessor.cs
@@ -525,7 +525,7 @@
                        PalletCode = currentTask.RobotSourceAddressPalletCode;  // ä½¿ç”¨æºåœ°å€çš„æ‰˜ç›˜ç 
                        if (isRoadway == "HCSC1")
                        {
                            warehouseId = 2;
                            warehouseId = 3;
                            roadway = "HCSC1";
                        }
                        else if (isRoadway == "GWSC1")
@@ -542,7 +542,7 @@
                        taskType = TaskTypeEnum.InEmpty.GetHashCode();  // ç©ºæ‰˜ç›˜å…¥åº“
                        PalletCode = currentTask.RobotSourceAddressPalletCode;  // ä½¿ç”¨æºåœ°å€çš„æ‰˜ç›˜ç 
                        warehouseId = 3;
                        warehouseId = 2;
                        roadway = "CWSC1";
                        SourceAddress = currentTask.RobotSourceAddressLineCode;
@@ -562,7 +562,7 @@
                        if (isRoadway == "HCSC1")
                        {
                            warehouseId = 2;
                            warehouseId = 3;
                            roadway = "HCSC1";
                        }
                        else if (isRoadway == "GWSC1")
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskSelector.cs
@@ -155,6 +155,8 @@
            var sameStationTasks = _taskService
                .QueryStackerCraneOutTasks(deviceCode, new List<string> { candidateTask.NextAddress })
                .Where(x => x.TaskId != candidateTask.TaskId && x.TargetAddress != candidateTask.TargetAddress)
                .GroupBy(x => x.TargetAddress)
                .Select(g => g.FirstOrDefault())
                .ToList();
            foreach (var sameStationTask in sameStationTasks)
@@ -206,7 +208,7 @@
        {
            // å…ˆè¿›è¡Œæœ¬åœ°ç«™å°æ£€æŸ¥ï¼ˆPLC è¯»å–,快速),避免不必要的 WMS HTTP è°ƒç”¨
            if (outboundTask.TaskType != (int)TaskOutboundTypeEnum.OutEmpty)
            if (outboundTask.TaskType != (int)TaskOutboundTypeEnum.OutEmpty && outboundTask.Roadway != "GWSC1" && outboundTask.TargetAddress != "CWSC1")
            {
                // åˆ¤æ–­ TargetAddress è¾“送线站台是否空闲
                if (!IsTargetAddressConveyorStationAvailable(outboundTask))
@@ -221,6 +223,8 @@
                return null;
            }
            if (outboundTask.TargetAddress != "CWSC1")
            {
            // æ£€æŸ¥æ˜¯å¦æœ‰æ­£åœ¨æ‰§è¡Œçš„输送线任务去往同一 TargetAddress
            if (_taskService.HasExecutingTaskToTarget(outboundTask.Roadway, outboundTask.TargetAddress))
            {
@@ -228,7 +232,12 @@
                    $"TrySelectOutboundTask:TargetAddress: {outboundTask.TargetAddress} å·²æœ‰æ­£åœ¨æ‰§è¡Œçš„输送线任务", outboundTask.Roadway, outboundTask.TargetAddress, outboundTask.TaskNum);
                return null;
            }
            }
            if(outboundTask.Roadway != "GWSC1")
            {
                return outboundTask;
            }
            // ç«™å°æ£€æŸ¥é€šè¿‡åŽï¼Œè°ƒç”¨ WMS åˆ¤æ–­æ˜¯å¦éœ€è¦ç§»åº“
            var taskAfterTransferCheck = _transferCheck(outboundTask.TaskNum) ?? outboundTask;
            var taskGroup = taskAfterTransferCheck.TaskType.GetTaskTypeGroup();
Code/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs
@@ -133,25 +133,43 @@
        /// <summary>
        /// æ ¹æ®å··é“获取空闲货位信息
        /// æŽ’序策略:深度优先(二深位优先),其次按层、列、行升序
        /// </summary>
        /// <param name="roadwayNo">巷道编号</param>
        /// <returns>空闲货位信息,如果未找到则返回null</returns>
        /// <returns>空闲货位信息,如果空闲货位不足则返回null</returns>
        public async Task<Dt_LocationInfo?> GetLocationInfo(string roadwayNo)
        {
            var locations = await BaseDal.QueryDataAsync(x =>
                x.EnableStatus == EnableStatusEnum.Normal.GetHashCode() &&
                x.RoadwayNo == roadwayNo &&
                x.LocationStatus == LocationStatusEnum.Free.GetHashCode() &&
                (roadwayNo.Contains("HC")
                    ? x.LocationType == (int)LocationTypeEnum.Capacity
                    : x.LocationType == (int)LocationTypeEnum.ShelfCapacity));
            // HC å··é“使用 Capacity ç±»åž‹ï¼Œå…¶ä»–巷道使用 ShelfCapacity ç±»åž‹
            var locationType = roadwayNo.Contains("HC")
                ? (int)LocationTypeEnum.Capacity
                : (int)LocationTypeEnum.ShelfCapacity;
            return locations?
                .OrderByDescending(x => x.Depth)  // 1. æ·±åº¦ä¼˜å…ˆï¼ˆä»Žå¤§åˆ°å°ï¼‰
                .ThenBy(x => x.Layer)             // 2. å±‚æ•°
                .ThenBy(x => x.Column)            // 3. åˆ—
                .ThenBy(x => x.Row)               // 4. è¡Œ
                .FirstOrDefault();
            var enableStatus = EnableStatusEnum.Normal.GetHashCode();
            var freeStatus = LocationStatusEnum.Free.GetHashCode();
            // æ•°æ®åº“端 COUNT æ£€æŸ¥ç©ºé—²è´§ä½æ•°é‡ï¼ˆä»…返回一个数字,无数据传输开销)
            var freeCount = await BaseDal.Db.Queryable<Dt_LocationInfo>()
                .Where(x => x.EnableStatus == enableStatus
                    && x.RoadwayNo == roadwayNo
                    && x.LocationStatus == freeStatus
                    && x.LocationType == locationType)
                .CountAsync();
            // ç©ºé—²è´§ä½ä¸è¶³æœ€ä½Žä¿ç•™æ•°é‡æ—¶è¿”回null,避免将巷道分配耗尽
            const int minFreeLocationThreshold = 5;
            if (freeCount < minFreeLocationThreshold) return null;
            // æ•°æ®åº“端排序取第一条(只传输单行数据)
            return await BaseDal.Db.Queryable<Dt_LocationInfo>()
                .Where(x => x.EnableStatus == enableStatus
                    && x.RoadwayNo == roadwayNo
                    && x.LocationStatus == freeStatus
                    && x.LocationType == locationType)
                .OrderByDescending(x => x.Depth)
                .OrderBy(x => x.Layer)
                .OrderBy(x => x.Column)
                .OrderBy(x => x.Row)
                .FirstAsync();
        }
        /// <summary>
@@ -311,7 +329,7 @@
            // åˆ¤æ–­è¯¥ä½ç½®æ˜¯å¦æœ‰åº“å­˜
            var stockInfo = await _stockInfoRepository.QueryDataNavFirstAsync(x =>
                            x.LocationCode == newLocationID &&
                            x.StockStatus == StockStatusEmun.入库完成.GetHashCode() &&
                            (x.StockStatus == StockStatusEmun.入库完成.GetHashCode() || x.StockStatus == StockStatusEmun.空托盘库存.GetHashCode()) &&
                            x.LocationDetails.LocationStatus == LocationStatusEnum.InStock.GetHashCode());
            if (stockInfo == null)
            {
Code/WMS/WIDESEA_WMSServer/WIDESEA_Common/Constants/TaskAddressConstants.cs
@@ -23,7 +23,7 @@
        /// <summary>
        /// å¸¸æ¸©1号出库地址
        /// </summary>
        public const string CW1_ADDRESS = "22001";
        public const string CW1_ADDRESS = "11085";
        /// <summary>
        /// åˆ†å®¹åº“出库地址
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs
@@ -1,10 +1,5 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Const;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
@@ -19,19 +14,20 @@
        public int Total { get; set; }
        public string TableName { get; set; }
        public string Sort { get; set; }
        /// <summary>
        /// æŽ’序方式
        /// </summary>
        public string Order { get; set; }
        public string Wheres { get; set; }
        public bool Export { get; set; }
        public object Value { get; set; }
        /// <summary>
        /// æŸ¥è¯¢æ¡ä»¶
        /// </summary>
        public List<SearchParameters> Filter { get; set; }
        public string ValidatePageOptions(PropertyInfo[] entityProperties)
        {
@@ -117,7 +113,6 @@
            return where;
        }
        public Dictionary<string, OrderByType> GetPageDataSort(PropertyInfo[] propertyInfo)
        {
            if (!string.IsNullOrEmpty(Sort))
@@ -143,10 +138,12 @@
            return new Dictionary<string, OrderByType> { { "CreateDate", Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc } };
        }
    }
    public class SearchParameters
    {
        public string Name { get; set; }
        public string Value { get; set; }
        //查询类型:LinqExpressionType
        public string DisplayType { get; set; }
    }
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs
@@ -28,6 +28,7 @@
        public WebResponseContent OK()
        {
            Status = true;
            Code = 200;
            return this;
        }
@@ -38,15 +39,16 @@
        public WebResponseContent OK(string? message = null, object? data = null)
        {
            Status = true;
            Message = message;
            Data = data;
            Code = 200;
            Message = message ?? "请求成功";
            Data = data ?? new { };
            return this;
        }
        public WebResponseContent Error(string? message = null)
        {
            Status = false;
            Message = message;
            Message = message ?? "请求失败";
            return this;
        }
    }
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
@@ -16,6 +16,7 @@
using WIDESEA_Core.DB.Models;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
//using WIDESEA_Core.HostedService;
using WIDESEA_Core.Utilities;
using ICacheService = WIDESEA_Core.Caches.ICacheService;
@@ -82,6 +83,7 @@
        }
        private PropertyInfo[] _propertyInfo { get; set; } = null;
        public PropertyInfo[] TProperties
        {
            get
@@ -201,7 +203,6 @@
            string? value = propertyValue?.ToString();
            if (value == null) return p => true;
            parameter = parameter ?? Expression.Parameter(typeof(TEntity), "x");
            //创建节点的属性p=>p.name å±žæ€§name
            MemberExpression memberProperty = Expression.PropertyOrField(parameter, propertyName);
@@ -274,21 +275,27 @@
                case LinqExpressionType.Equal:
                    expression = Expression.Lambda<Func<TEntity, bool>>(Expression.Equal(member, constant), parameter);
                    break;
                case LinqExpressionType.NotEqual:
                    expression = Expression.Lambda<Func<TEntity, bool>>(Expression.NotEqual(member, constant), parameter);
                    break;
                case LinqExpressionType.GreaterThan:
                    expression = Expression.Lambda<Func<TEntity, bool>>(Expression.GreaterThan(member, constant), parameter);
                    break;
                case LinqExpressionType.LessThan:
                    expression = Expression.Lambda<Func<TEntity, bool>>(Expression.LessThan(member, constant), parameter);
                    break;
                case LinqExpressionType.ThanOrEqual:
                    expression = Expression.Lambda<Func<TEntity, bool>>(Expression.GreaterThanOrEqual(member, constant), parameter);
                    break;
                case LinqExpressionType.LessThanOrEqual:
                    expression = Expression.Lambda<Func<TEntity, bool>>(Expression.LessThanOrEqual(member, constant), parameter);
                    break;
                case LinqExpressionType.Contains:
                case LinqExpressionType.NotContains:
                    MethodInfo? method = typeof(string).GetMethod("Contains", new[] { typeof(string) });
@@ -309,6 +316,7 @@
                        expression = p => true;
                    }
                    break;
                default:
                    expression = p => false;
                    break;
@@ -346,8 +354,6 @@
            }
            return new Dictionary<string, OrderByType> { { "CreateDate", pageData.Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc } };
        }
        //private string GetDataRole(Type type)
        //{
@@ -721,7 +727,6 @@
                {
                    content = WebResponseContent.Instance.Error("未找到主表主键值");
                }
            }
            catch (Exception ex)
            {
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs
@@ -1,15 +1,7 @@
using Autofac;
using Autofac.Extras.DynamicProxy;
using HslCommunication.WebSocket;
using Microsoft.Extensions.DependencyModel;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.Loader;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.AOP;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs
@@ -1,14 +1,8 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Org.BouncyCastle.Asn1.Ocsp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using WIDESEA_Core.Helper;
using WIDESEA_Core.LogHelper;
@@ -101,7 +95,6 @@
                catch (Exception ex)
                {
                    // è®°å½•异常
                }
                finally
                {
Code/WMS/WIDESEA_WMSServer/WIDESEA_DTO/GradingMachine/OutPutDto.cs
@@ -32,6 +32,19 @@
        public int IsNormalProcedure { get; set; }
        /// <summary>
        /// ç”µèŠ¯æ•°æ®
        /// </summary>
        public CellCodeData Data { get; set; }
    }
    /// <summary>
    /// ç”µèŠ¯æ¡ç 
    /// </summary>
    public class CellCodeData
    {
        /// <summary>
        /// é€šé“号
        /// </summary>
        public string Channel { get; set; }
Code/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs
@@ -52,6 +52,14 @@
        Task<Dt_StockInfo> GetStockInfoAsync(string palletCode, string locationCode);
        /// <summary>
        /// æ£€ç´¢æŒ‡å®šè´§ä½åœ¨ç»™å®šä»“库的库存详细信息
        /// </summary>
        /// <param name="warehouseId">仓库ID</param>
        /// <param name="locationCode">货位编码</param>
        /// <returns>库存信息</returns>
        Task<Dt_StockInfo> GetStockInfoAsync(int warehouseId, string locationCode);
        /// <summary>
        /// èŽ·å–ä»“åº“3D布局数据
        /// </summary>
        /// <param name="warehouseId">仓库ID</param>
Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -201,6 +201,17 @@
        }
        /// <summary>
        /// æ£€ç´¢æŒ‡å®šè´§ä½åœ¨ç»™å®šä»“库的库存详细信息
        /// </summary>
        /// <param name="warehouseId">仓库ID</param>
        /// <param name="locationCode">货位编码</param>
        /// <returns>库存信息</returns>
        public async Task<Dt_StockInfo> GetStockInfoAsync(int warehouseId, string locationCode)
        {
            return await BaseDal.QueryDataNavFirstAsync(x => x.WarehouseId == warehouseId && x.LocationCode == locationCode);
        }
        /// <summary>
        /// èŽ·å–ä»“åº“3D布局数据
        /// </summary>
        /// <param name="warehouseId">仓库ID</param>
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_GradingMachine.cs
@@ -1,27 +1,10 @@
using Mapster;
using MapsterMapper;
using Microsoft.Extensions.Configuration;
using SqlSugar;
using System.DirectoryServices.Protocols;
using System.Text.Json;
using WIDESEA_Common.Constants;
using WIDESEA_Common.LocationEnum;
using WIDESEA_Common.StockEnum;
using WIDESEA_Common.TaskEnum;
using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Core;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.GradingMachine;
using WIDESEA_DTO.MES;
using WIDESEA_DTO.Stock;
using WIDESEA_DTO.Task;
using WIDESEA_IBasicService;
using WIDESEA_IStockService;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
namespace WIDESEA_TaskInfoService
@@ -36,25 +19,19 @@
        public async Task<WebResponseContent> InOrOutCompletedAsync(GradingMachineInputDto input)
        {
            WebResponseContent content = new WebResponseContent();
            if (string.IsNullOrWhiteSpace(input.PalletCode) || string.IsNullOrWhiteSpace(input.LocationCode))
            if (string.IsNullOrWhiteSpace(input.LocationCode))
            {
                return content.Error($"托盘号或者货位编号不能为空");
                return content.Error($"货位编号不能为空");
            }
            try
            {
                var stockInfo = await _stockInfoService.GetStockInfoAsync(input.PalletCode, input.LocationCode);
                var stockInfo = await _stockInfoService.GetStockInfoAsync(3, input.LocationCode);
                int locationStatus;
                if (stockInfo == null)
                {
                    var location = await _locationInfoService.GetLocationInfoAsync(input.LocationCode);
                    locationStatus = location?.LocationStatus == (int)LocationStatusEnum.InStock ? 10 : 0;
                }
                else
                {
                    return content.Error("WMS未找到库存信息");
                    locationStatus = MapLocationStatus(stockInfo.StockStatus);
                }
                int MapLocationStatus(int stockStatus) => stockStatus switch
                {
@@ -66,7 +43,7 @@
                OutputDto outPutDto = new OutputDto()
                {
                    LocationCode = input.LocationCode,
                    PalletCode = input.PalletCode,
                    PalletCode = stockInfo.PalletCode,
                    IsNormalProcedure = 1,
                    LocationStatus = locationStatus
                };
@@ -196,15 +173,19 @@
                {
                    return content.Error("未找到对应的托盘");
                }
                var outPutDtos = stockInfo.Details.Select(x => new OutputDto()
                var outPutDtos = new
                {
                    LocationCode = input.LocationCode,
                    PalletCode = input.PalletCode,
                    input.LocationCode,
                    input.PalletCode,
                    IsNormalProcedure = 1,
                    LocationStatus = stockInfo.LocationDetails.LocationStatus,
                    stockInfo.LocationDetails.LocationStatus,
                    Data = stockInfo.Details.Select(x => new CellCodeData
                    {
                    CellCode = x.SerialNumber,
                    Channel = x.InboundOrderRowNo.ToString()
                }).ToList();
                    }).ToList()
                };
                return content.OK(data: outPutDtos);
            }
            catch (Exception ex)
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_AutoOutbound.cs
@@ -23,7 +23,7 @@
                // 1. æŸ¥è¯¢åˆ°æœŸåº“å­˜
                var expiredStocks = await _stockInfoService.Repository
                    .QueryDataNavAsync(s => s.OutboundDate <= DateTime.Now
                        && s.StockStatus == StockStatusEmun.入库完成.GetHashCode());
                        && s.StockStatus == StockStatusEmun.入库完成.GetHashCode() && s.WarehouseId != 3);
                if (expiredStocks == null || !expiredStocks.Any())
                {
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Inbound.cs
@@ -161,6 +161,7 @@
                        WebResponseContent content = new WebResponseContent();
                        stockInfo.LocationCode = location.LocationCode;
                        stockInfo.LocationId = location.Id;
                        stockInfo.WarehouseId = task.WarehouseId;
                        SetOutboundDateByRoadway(task, stockInfo);
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs
@@ -120,12 +120,12 @@
                            TaskNum = await BaseDal.GetTaskNo(),
                            PalletCode = task.PalletCode,
                            PalletType = task.PalletType,
                            Roadway = "CW1",
                            Roadway = "CWSC1",
                            TaskType = TaskInboundTypeEnum.Inbound.GetHashCode(),
                            TaskStatus = TaskInStatusEnum.InNew.GetHashCode(),
                            SourceAddress = task.TargetAddress,
                            SourceAddress = "11042",
                            TargetAddress = task.TargetAddress,
                            CurrentAddress = task.TargetAddress,
                            CurrentAddress = "11042",
                            NextAddress = task.TargetAddress,
                            WarehouseId = (int)WarehouseEnum.CW1,
                            Grade = 1,
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Tray.cs
@@ -100,7 +100,7 @@
                    return WebResponseContent.Instance.OK("任务创建成功", taskDTO);
                }
                var stockInfo = await _stockInfoService.Repository.QueryDataNavFirstAsync(x => x.LocationDetails.WarehouseId == taskDto.WarehouseId && x.LocationDetails.LocationStatus == LocationStatusEnum.InStock.GetHashCode() && x.StockStatus == StockStatusEmun.空托盘库存.GetHashCode());
                var stockInfo = await _stockInfoService.Repository.QueryDataNavFirstAsync(x => x.LocationDetails.WarehouseId == taskDto.WarehouseId && x.LocationDetails.LocationStatus == LocationStatusEnum.InStock.GetHashCode() && x.StockStatus == StockStatusEmun.空托盘库存.GetHashCode() && x.LocationDetails.EnableStatus == (int)EnableStatusEnum.Normal);
                if (stockInfo == null)
                    return WebResponseContent.Instance.Error("未找到对应的库存信息");
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/BackgroundServices/AutoOutboundTaskBackgroundService.cs
@@ -1,9 +1,4 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System;
using System.Threading;
using System.Threading.Tasks;
using WIDESEA_Core.Core;
using WIDESEA_ITaskInfoService;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/BackgroundServices/StockMonitorBackgroundService.cs
@@ -1,13 +1,5 @@
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
@@ -43,6 +35,7 @@
        /// åˆ†åˆ«è·Ÿè¸ªè´§ä½ã€åº“存主表、库存明细,避免每次全表扫描。
        /// </summary>
        private DateTime _lastLocationCheckTime = DateTime.MinValue;
        private DateTime _lastStockCheckTime = DateTime.MinValue;
        private DateTime _lastDetailCheckTime = DateTime.MinValue;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoController.cs
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielCodeInfoController.cs
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs
@@ -1,12 +1,5 @@
using Autofac.Core;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.CodeConfigEnum;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.Basic;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
@@ -22,6 +15,5 @@
        public MaterielInfoController(IMaterielInfoService service) : base(service)
        {
        }
    }
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/PalletCodeInfoController.cs
@@ -1,6 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
@@ -14,6 +12,5 @@
        public PalletCodeInfoController(IPalletCodeInfoService service) : base(service)
        {
        }
    }
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/WarehouseController.cs
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_IBasicService;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Check/CheckOrderController.cs
@@ -1,7 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_ICheckService;
using WIDESEA_Model.Models;
@@ -18,6 +15,5 @@
        public CheckOrderController(ICheckOrderService service) : base(service)
        {
        }
    }
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Check/CheckOrderResultController.cs
@@ -1,6 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_ICheckService;
using WIDESEA_Model.Models;
@@ -17,6 +15,5 @@
        public CheckOrderResultController(ICheckOrderResultService service) : base(service)
        {
        }
    }
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Dashboard/DashboardController.cs
@@ -139,6 +139,7 @@
                return WebResponseContent.Instance.Error($"每日统计获取失败: {ex.Message}");
            }
        }
        /// <summary>
        /// æ¯å‘¨ç»Ÿè®¡
        /// </summary>
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs
@@ -1,9 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Inbound;
using WIDESEA_IInboundService;
using WIDESEA_Model.Models;
@@ -19,6 +15,5 @@
        public InboundOrderController(IInboundOrderService service) : base(service)
        {
        }
    }
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderDetailController.cs
@@ -1,6 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IInboundService;
using WIDESEA_Model.Models;
@@ -17,6 +15,5 @@
        public InboundOrderDetailController(IInboundOrderDetailService service) : base(service)
        {
        }
    }
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderDetail_HtyController.cs
@@ -1,9 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Inbound;
using WIDESEA_IInboundService;
using WIDESEA_Model.Models;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrder_HtyController.cs
@@ -1,9 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Inbound;
using WIDESEA_IInboundService;
using WIDESEA_Model.Models;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Mes/MesLogController.cs
@@ -1,4 +1,3 @@
using Autofac.Core;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs
@@ -1,7 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
@@ -18,6 +15,5 @@
        public OutStockLockInfoController(IOutStockLockInfoService service) : base(service)
        {
        }
    }
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderController.cs
@@ -1,12 +1,5 @@
using Autofac.Core;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.CodeConfigEnum;
using WIDESEA_DTO.Inbound;
using WIDESEA_DTO.Outbound;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
@@ -21,8 +14,6 @@
    {
        public OutboundOrderController(IOutboundOrderService service) : base(service)
        {
        }
    }
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderDetailController.cs
@@ -1,9 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Stock;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
@@ -19,6 +15,5 @@
        public OutboundOrderDetailController(IOutboundOrderDetailService service) : base(service)
        {
        }
    }
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderDetail_HtyController.cs
@@ -1,10 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Inbound;
using WIDESEA_IInboundService;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrder_HtyController.cs
@@ -1,10 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Inbound;
using WIDESEA_IInboundService;
using WIDESEA_IOutboundService;
using WIDESEA_Model.Models;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs
@@ -1,15 +1,10 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.IO;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.Inbound;
using WIDESEA_IInboundService;
using WIDESEA_IOutboundService;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers
{
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Record/LocationStatusChangeRecordController.cs
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
@@ -18,6 +17,7 @@
        public LocationStatusChangeRecordController(ILocationStatusChangeRecordService service) : base(service)
        {
        }
        /// <summary>
        /// æ ¹æ®ID获取货位状态变动记录
        /// </summary>
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Record/StockQuantityChangeRecordController.cs
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_IRecordService;
using WIDESEA_Model.Models;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockController.cs
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs
@@ -1,17 +1,14 @@
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_DTO.MES;
using WIDESEA_IStockService;
using WIDESEA_IBasicService;
using WIDESEA_ISystemService;
using WIDESEA_Model.Models;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Common.Constants;
using WIDESEA_Common.StockEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.MES;
using WIDESEA_IBasicService;
using WIDESEA_IStockService;
using WIDESEA_ISystemService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Stock
{
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoDetail_HtyController.cs
@@ -1,8 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Stock;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfo_HtyController.cs
@@ -1,8 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Stock;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs
@@ -1,12 +1,8 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Stock;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.Stock
{
@@ -18,6 +14,7 @@
    public class StockViewController : Controller
    {
        private readonly IStockViewService _stockViewService;
        public StockViewController(IStockViewService stockViewService) 
        {
            _stockViewService = stockViewService;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_DictionaryController.cs
@@ -1,11 +1,8 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.Helper;
using WIDESEA_ISystemService;
using WIDESEA_Model.Models;
using WIDESEA_DTO.System;
namespace WIDESEA_WMSServer.Controllers
{
@@ -17,6 +14,7 @@
    public class Sys_DictionaryController : ApiBaseController<ISys_DictionaryService, Sys_Dictionary>
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        public Sys_DictionaryController(ISys_DictionaryService service, IHttpContextAccessor httpContextAccessor) : base(service)
        {
            _httpContextAccessor = httpContextAccessor;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_DictionaryListController.cs
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_LogController.cs
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_ISystemService;
using WIDESEA_Model.Models;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_MenuController.cs
@@ -14,10 +14,12 @@
    public class Sys_MenuController : ApiBaseController<ISys_MenuService, Sys_Menu>
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        public Sys_MenuController(ISys_MenuService menuService, IHttpContextAccessor httpContextAccessor) : base(menuService)
        {
            _httpContextAccessor = httpContextAccessor;
        }
        [HttpGet, HttpPost, Route("getTreeMenu")]
        public IActionResult GetTreeMenu()
        {
@@ -48,6 +50,7 @@
                return Json(WebResponseContent.Instance.Error("仅限超级管理员修改数据"));
            }
        }
        [HttpPost, Route("delMenu")]
        public WebResponseContent DelMenu(int menuId)
        {
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_RoleController.cs
@@ -1,10 +1,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
using WIDESEA_DTO.System;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.BaseRepository;
using WIDESEA_DTO.System;
using WIDESEA_ISystemService;
using WIDESEA_Model.Models;
using WIDESEA_Model.Models.System;
@@ -19,6 +16,7 @@
    public class Sys_RoleController : ApiBaseController<ISys_RoleService, Sys_Role>
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        public Sys_RoleController(ISys_RoleService service, IHttpContextAccessor httpContextAccessor) : base(service)
        {
            _httpContextAccessor = httpContextAccessor;
@@ -63,6 +61,7 @@
        {
            return Json(Service.GetCurrentTreePermissionPDA());
        }
        [HttpPost, Route("getUserTreePermissionPDA")]
        public IActionResult GetUserTreePermissionPDA(int roleId)
        {
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_TenantController.cs
@@ -1,14 +1,8 @@

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.Const;
using WIDESEA_Core.Helper;
using WIDESEA_Core.HttpContextUser;
using WIDESEA_ISystemService;
using WIDESEA_Model;
using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs
@@ -1,17 +1,12 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using Newtonsoft.Json;
using StackExchange.Profiling;
using WIDESEA_Core;
using WIDESEA_Core.Authorization;
using WIDESEA_Core.BaseController;
using WIDESEA_Core.Caches;
using WIDESEA_Core.Const;
using WIDESEA_Core.Extensions;
using WIDESEA_Core.Helper;
using WIDESEA_Core.HttpContextUser;
using WIDESEA_Core.Utilities;
using WIDESEA_ISystemService;
using WIDESEA_Model;
@@ -114,11 +109,13 @@
            return Json(data);
        }
        [HttpGet, Route("SerializeJwt"), AllowAnonymous]
        public WebResponseContent SerializeJwt(string code)
        {
            return WebResponseContent.Instance.OK(data: JwtHelper.SerializeJwt(code));
        }
        /// <summary>
        /// æ›¿æ¢Token(刷新令牌)
        /// </summary>
@@ -150,8 +147,8 @@
            {
                return responseContent.Error(ex.Message);
            }
        }
        /// <summary>
        /// æ›´æ–°å¯†ç 
        /// </summary>
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -1,8 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.DirectoryServices.Protocols;
using WIDESEA_Common.CommonEnum;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.GradingMachine;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/Task_HtyController.cs
@@ -1,9 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core;
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Stock;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Properties/launchSettings.json
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/css/site.css
@@ -29,6 +29,7 @@
html {
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
@@ -38,6 +39,7 @@
.border-top {
  border-top: 1px solid #e5e5e5;
}
.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}
@@ -62,6 +64,7 @@
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  bottom: 0;
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/css/style.css
@@ -1,19 +1,24 @@
@charset "utf-8";
::selection {
  background: #2D2F36;
}
::-webkit-selection {
  background: #2D2F36;
}
::-moz-selection {
  background: #2D2F36;
}
body {
  background: white;
  font-family: 'Inter UI', sans-serif;
  margin: 0;
  padding: 20px;
}
.page {
  background: #e2e2e5;
  display: flex;
@@ -23,6 +28,7 @@
  place-content: center;
  width: calc(100% - 40px);
}
@media (max-width: 767px) {
  .page {
    height: auto;
@@ -30,12 +36,14 @@
    padding-bottom: 20px;
  }
}
.container {
  display: flex;
  height: 320px;
  margin: 0 auto;
  width: 640px;
}
@media (max-width: 767px) {
  .container {
    flex-direction: column;
@@ -43,6 +51,7 @@
    width: 320px;
  }
}
.left {
  background: white;
  height: calc(100% - 40px);
@@ -50,6 +59,7 @@
  position: relative;
  width: 50%;
}
@media (max-width: 767px) {
  .left {
    height: 100%;
@@ -58,17 +68,20 @@
    max-height: 270px;
  }
}
.login {
  font-size: 33px;
  font-weight: 900;
  margin: 50px 40px 40px;
}
.eula {
  color: #999;
  font-size: 14px;
  line-height: 1.5;
  margin: 40px;
}
.right {
  background: #474A59;
  box-shadow: 0px 0px 40px 16px rgba(0,0,0,0.22);
@@ -76,6 +89,7 @@
  position: relative;
  width: 50%;
}
@media (max-width: 767px) {
  .right {
    flex-shrink: 0;
@@ -84,20 +98,25 @@
    max-height: 350px;
  }
}
svg {
  position: absolute;
  width: 320px;
}
path {
  fill: none;
  stroke: url(#linearGradient);;
    stroke: url(#linearGradient);
    ;
  stroke-width: 4;
  stroke-dasharray: 240 1386;
}
.form {
  margin: 40px;
  position: absolute;
}
label {
  color:  #c2c2c5;
  display: block;
@@ -106,6 +125,7 @@
  margin-top: 20px;
  margin-bottom: 5px;
}
input {
  background: transparent;
  border: 0;
@@ -116,17 +136,21 @@
  outline: none !important;
  width: 100%;
}
input::-moz-focus-inner { 
  border: 0; 
}
#submit {
  color: #707075;
  margin-top: 40px;
  transition: color 300ms;
}
#submit:focus {
  color: #f2f2f2;
}
#submit:active {
  color: #d0d0d2;
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/css/swaggerdoc.css
@@ -55,6 +55,7 @@
    -webkit-transform: translateY(0);
    transform: translateY(0);
}
.drop li:first-child:before {
    content: " ";
    font-size: 0;
@@ -86,6 +87,7 @@
    -webkit-transition: all .2s ease-in;
    transition: all .2s ease-in;
}
.drop li:first-child a {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
@@ -97,6 +99,7 @@
    border-bottom-right-radius: 5px;
    border-bottom: none;
}
.drop li:hover:before {
    background-color: #85ea2d;
}
@@ -105,5 +108,3 @@
    background-color: #85ea2d;
    color: #fff;
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/js/site.js
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/js/swaggerdoc.js
@@ -64,7 +64,6 @@
    }, 788);
}
/**
 * å»¶è¿Ÿå‡½æ•°
 * @param {any} delay
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/wwwroot/swg-login.html
@@ -135,6 +135,5 @@
            });
        }
    </script>
</body>
</html>
Code/²âÊÔ¹¤¾ß/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1001/config.json
@@ -2,7 +2,7 @@
  "id": "1001",
  "name": "A\u533A_\u4E00\u6CE8\u8F93\u9001\u7EBF",
  "plcType": "S71500",
  "port": 102,
  "port": 103,
  "activationKey": "",
  "autoStart": false,
  "protocolTemplateId": "protocol-1001",
Code/²âÊÔ¹¤¾ß/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/protocol-templates.json
@@ -4012,6 +4012,168 @@
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_TaskNo",
        "dbNumber": 50,
        "offset": 4000,
        "bit": 1,
        "dataType": 1,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_Source",
        "dbNumber": 50,
        "offset": 4002,
        "bit": 1,
        "dataType": 1,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_Target",
        "dbNumber": 50,
        "offset": 4004,
        "bit": 1,
        "dataType": 1,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_BoxType",
        "dbNumber": 50,
        "offset": 4006,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_CV_State",
        "dbNumber": 50,
        "offset": 4007,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_CV_ERRCode",
        "dbNumber": 50,
        "offset": 4008,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_WCS_STB",
        "dbNumber": 50,
        "offset": 4009,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_WCS_ACK",
        "dbNumber": 50,
        "offset": 4010,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_PLC_STB",
        "dbNumber": 50,
        "offset": 4011,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_PLC_ACK",
        "dbNumber": 50,
        "offset": 4012,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_PLC_REQ",
        "dbNumber": 50,
        "offset": 4013,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_WCS_ERRCode",
        "dbNumber": 50,
        "offset": 4014,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_WCS_Special",
        "dbNumber": 50,
        "offset": 4015,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_Equ_Auto",
        "dbNumber": 50,
        "offset": 4016,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_Last_pallet",
        "dbNumber": 50,
        "offset": 4017,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_Barcode",
        "dbNumber": 50,
        "offset": 4018,
        "bit": 1,
        "dataType": 0,
        "length": 20,
        "direction": 2
      },
      {
        "fieldKey": "2201_Spare_1",
        "dbNumber": 50,
        "offset": 4038,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      },
      {
        "fieldKey": "2201_Spare_2",
        "dbNumber": 50,
        "offset": 4039,
        "bit": 1,
        "dataType": 0,
        "length": 1,
        "direction": 2
      }
    ]
  }
ÏîÄ¿×ÊÁÏ/É豸ЭÒé/¸ß³£Î¶Ѷâ»úÓëÊäËÍÏß/~$WCSÊäËͶԽӵØÖ·±í_0420.xlsx
Binary files differ