hutongqing
2025-01-04 0ba846024a89bbdfe2b2e2183d0ed944ac9782bf
更新
已删除3个文件
已修改14个文件
已添加1个文件
340 ■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/09203851-2649-4a0f-b696-332fad6125e4.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2ce7b081-61db-4780-ab7b-3174d3d998cb.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/b28e2128-7595-489a-b656-9987625a9f04.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/cdf7c705-afc3-490d-b354-0b04d2de9c9b.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/StationTypeEnum.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/R_ConveyorLineDBName.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/W_ConveyorLineDBName.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/ConveyorLineJob_GM.cs 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/测试架仓/GroundStationJob_CSJ.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/09203851-2649-4a0f-b696-332fad6125e4.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/2ce7b081-61db-4780-ab7b-3174d3d998cb.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/b28e2128-7595-489a-b656-9987625a9f04.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/cdf7c705-afc3-490d-b354-0b04d2de9c9b.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs
@@ -24,7 +24,7 @@
        {
            bool[] boolArray = ByteToBoolArray(data);
            Array.Reverse(boolArray);
            //Array.Reverse(boolArray);
            Type type = typeof(T);
            object? obj = Activator.CreateInstance(type);
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/StationTypeEnum.cs
@@ -8,8 +8,24 @@
{
    public enum StationTypeEnum
    {
        /// <summary>
        /// å…¥åº“站台
        /// </summary>
        StationType_OnlyInbound = 1,
        /// <summary>
        /// å‡ºåº“站台
        /// </summary>
        StationType_OnlyOutbound = 2,
        StationType_InboundAndOutbound = 3
        /// <summary>
        /// å‡ºå…¥åº“站台
        /// </summary>
        StationType_InboundAndOutbound = 3,
        /// <summary>
        /// å‡ºå…¥åº“口
        /// </summary>
        StationType_InStartAndOutEnd = 33,
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs
@@ -37,6 +37,24 @@
        SC_Finish = 220,
        /// <summary>
        /// è¾“送线待执行
        /// </summary>
        [Description("输送线待执行")]
        Line_Execute = 400,
        /// <summary>
        /// è¾“送线执行中
        /// </summary>
        [Description("输送线执行中")]
        Line_Executing = 410,
        /// <summary>
        /// è¾“送线完成
        /// </summary>
        [Description("输送线完成")]
        Line_Finish = 420,
        /// <summary>
        /// AGV待执行
        /// </summary>
        [Description("AGV待执行")]
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/WIDESEAWCS_Model.csproj
@@ -8,7 +8,7 @@
    <ItemGroup>
        <PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
        <PackageReference Include="WIDESEAWCS_Core" Version="1.0.10" />
        <PackageReference Include="WIDESEAWCS_Core" Version="1.0.11" />
    </ItemGroup>
    <ItemGroup>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -161,27 +161,44 @@
                    List<Dt_WarehouseDevice> wades = warehouseDevices.Where(x => x.WarehouseId == item.WarehouseId).ToList();
                    Dt_Router? router = new Dt_Router();
                    Dt_Router? router;
                    TaskTypeGroup taskTypeGroup = item.TaskType.GetTaskTypeGroup();
                    if (string.IsNullOrEmpty(item.AGVArea))
                    {
                        //task.AgvTaskNum = "AGV-" + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum;
                        Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == item.SourceAddress || x.StackerCraneCode == item.RoadWay);
                        Dt_StationManger stationManger;
                        if (taskTypeGroup == TaskTypeGroup.InboundGroup)
                        {
                            stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == item.SourceAddress);
                        }
                        else
                        {
                            stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneCode == item.RoadWay);
                        }
                        if (stationManger == null)
                        {
                            return WebResponseContent.Instance.Error($"未找到站台配置信息");
                        }
                        List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && (stationManger.StationCode == x.StartPosi || stationManger.StackerCraneCode == x.StartPosi));
                        if (routers.FirstOrDefault() == null)
                        List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && (item.SourceAddress == x.StartPosi || item.RoadWay == x.StartPosi));
                        router = routers.FirstOrDefault();
                        if (router == null)
                        {
                            return WebResponseContent.Instance.Error($"未找到路由配置信息");
                        }
                        router = routers.FirstOrDefault();
                        if (routers.Count == 1)
                        {
                            task.NextAddress = router?.NextPosi ?? "";
                            task.DeviceCode = stationManger.StationDeviceCode;
                            if(taskTypeGroup == TaskTypeGroup.InboundGroup && item.TargetAddress == stationManger.StackerCraneCode)
                            {
                                task.NextAddress = router.NextPosi;
                                task.DeviceCode = stationManger.StationDeviceCode;
                            }
                            else
                            {
                                task.NextAddress = item.TargetAddress;
                                task.DeviceCode = stationManger.StationDeviceCode;
                            }
                        }
                        else
                        {
@@ -191,7 +208,7 @@
                    }
                    else
                    {
                        if (item.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                        if (taskTypeGroup == TaskTypeGroup.OutbondGroup)
                        {
                            task.AgvTaskNum = "AGV-" + DateTime.Now.ToString("yyyyMMdd") + item.TaskNum;
                            List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && item.AGVArea == x.NextPosi);
@@ -253,17 +270,23 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationDeviceCode == sourceAddress);
                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == sourceAddress);
                if (stationManger == null)
                {
                    return WebResponseContent.Instance.Error($"未找到站台信息");
                }
                HttpHelper.Post($"RequestInboundTask?palletCode={palletCode}&stationCode={sourceAddress}");
                string responseStr = HttpHelper.Get($"http://127.0.0.1:9293/api/Task/DeviceRequestInboundTask?stationCode={sourceAddress}&roadwayNo={stationManger.StackerCraneCode}&palletCode={palletCode}");
                WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
                if (responseContent != null && responseContent.Status && responseContent.Data != null)
                {
                    WMSTaskDTO? taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(responseContent.Data.ToString());
                    if (taskDTO != null)
                    {
                        content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
                    }
                }
                WMSTaskDTO taskDTO = new WMSTaskDTO();
                content = ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
            }
            catch (Exception ex)
            {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs
@@ -51,6 +51,11 @@
        public byte Status { get; set; }
        /// <summary>
        /// é¢„ç•™
        /// </summary>
        public byte Undefined { get; set; }
        /// <summary>
        /// ä»»åŠ¡å·
        /// </summary>
        public int TaskNum { get; set; }
@@ -100,6 +105,12 @@
        /// äº¤äº’信号
        /// </summary>
        public byte Signal { get; set; }
        /// <summary>
        /// é¢„ç•™
        /// </summary>
        public byte Undefined2 { get; set; }
    }
    public class R_ConveyorLineStatus
@@ -147,20 +158,22 @@
        public bool RequestUnpackPellet { get; set; }
    }
    public class R_ConveyorLineSignal
    public class ConveyorLineSignal
    {
        /// <summary>
        /// è¯·æ±‚信号
        /// </summary>
        [BoolIndex(0)]
        public bool STB { get; set; }
        /// <summary>
        /// å“åº”信号
        /// </summary>
        [BoolIndex(1)]
        public bool ACK { get; set; }
    }
    public class W_ConveyorLineInfo
    public class W_ConveyorLineInfo : DeviceCommand
    {
        /// <summary>
@@ -168,20 +181,9 @@
        /// </summary>
        public short ConveyorNo { get; set; }
        /// <summary>
        /// æ¡æ‰‹ä¿¡å·
        /// </summary>
        public bool HandShake { get; set; }
        public byte Operate { get; set; }
        /// <summary>
        /// å¤ä½æŠ¥è­¦
        /// </summary>
        public bool ClearAlarm { get; set; }
        /// <summary>
        /// é€€å›ž
        /// </summary>
        public bool Return { get; set; }
        public byte Undefined {  get; set; }
        /// <summary>
        /// ä»»åŠ¡å·
@@ -214,13 +216,35 @@
        public short Sapre2 { get; set; }
        /// <summary>
        /// è¯·æ±‚信号
        /// äº¤äº’信号
        /// </summary>
        public bool STB { get; set; }
        public byte Signal { get; set; }
        /// <summary>
        /// å“åº”信号
        /// é¢„ç•™
        /// </summary>
        public bool ACK { get; set; }
        public byte Undefined2 { get; set; }
    }
    public class W_ConveyorLineOperate
    {
        /// <summary>
        /// æ¡æ‰‹ä¿¡å·
        /// </summary>
        [BoolIndex(0)]
        public bool HandShake { get; set; }
        /// <summary>
        /// å¤ä½æŠ¥è­¦
        /// </summary>
        [BoolIndex(1)]
        public bool ClearAlarm { get; set; }
        /// <summary>
        /// é€€å›ž
        /// </summary>
        [BoolIndex(2)]
        public bool Return { get; set; }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/R_ConveyorLineDBName.cs
@@ -23,7 +23,7 @@
namespace WIDESEAWCS_Tasks.ConveyorLineJob
{
    public enum R_ConveyorLineDBName
    public enum R_ConveyorLineDB
    {
        /// <summary>
        /// ç«™å°ç¼–号
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/W_ConveyorLineDBName.cs
@@ -6,7 +6,7 @@
namespace WIDESEAWCS_Tasks.ConveyorLineJob
{
    public enum W_ConveyorLineDBName
    public enum W_ConveyorLineDB
    {
        /// <summary>
        /// ç«™å°ç¼–号
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸ÉĤ²Ö/ConveyorLineJob_GM.cs
@@ -6,6 +6,8 @@
using System.Threading.Tasks;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.Helper;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
@@ -13,6 +15,8 @@
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_Tasks.ConveyorLineJob;
namespace WIDESEAWCS_Tasks
@@ -25,13 +29,15 @@
        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
        private readonly ITaskRepository _taskRepository;
        private readonly IStationMangerRepository _stationMangerRepository;
        private readonly IRouterRepository _routerRepository;
        public ConveyorLineJob_GM(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository)
        public ConveyorLineJob_GM(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository,IRouterRepository routerRepository)
        {
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
            _taskRepository = taskRepository;
            _stationMangerRepository = stationMangerRepository;
            _routerRepository = routerRepository;
        }
        public Task Execute(IJobExecutionContext context)
@@ -44,21 +50,134 @@
                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
                foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
                {
                    if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt())
                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                    DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_ConveyorLineDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                    if (deviceProRead != null && deviceProWrite != null)
                    {
                        DeviceProDTO? devicePro = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                        if (devicePro != null)
                        {
                            R_ConveyorLineInfo conveyorLineInfo = device.Communicator.ReadCustomer<R_ConveyorLineInfo>(devicePro.DeviceProAddress);
                        R_ConveyorLineInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineInfo>(deviceProRead.DeviceProAddress);
                            R_ConveyorLineStatus conveyorLineStatus = conveyorLineInfo.Status.ByteToBoolObject<R_ConveyorLineStatus>();
                        R_ConveyorLineStatus conveyorLineStatus = conveyorLineInfoRead.Status.ByteToBoolObject<R_ConveyorLineStatus>();
                            bool stb = device.GetValue<R_ConveyorLineDBName, bool>(R_ConveyorLineDBName.STB);
                        }
                        else
                        ConveyorLineSignal conveyorLineSignalRead = conveyorLineInfoRead.Signal.ByteToBoolObject<ConveyorLineSignal>();
                        W_ConveyorLineInfo conveyorLineInfoWrite = device.Communicator.ReadCustomer<W_ConveyorLineInfo>(deviceProWrite.DeviceProAddress);
                        ConveyorLineSignal conveyorLineSignalWrite = conveyorLineInfoWrite.Signal.ByteToBoolObject<ConveyorLineSignal>();
                        if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt())
                        {
                            WriteInfo(device.DeviceName, $"未找到设备子编号{item.StationCode}的协议信息");
                            if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)
                            {
                                if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode))
                                {
                                    WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode);
                                    if (content.Status)
                                    {
                                        device.SetValue(W_ConveyorLineDB.ACK, true);
                                    }
                                }
                            }
                            else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
                            {
                                device.SetValue(W_ConveyorLineDB.ACK, false);
                            }
                        }
                        else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt())
                        {
                            if(conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK)
                            {
                                Dt_Task task = _taskRepository.QueryFirst(x => x.NextAddress == item.StackerCraneCode);
                                if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                                {
                                    Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
                                    if (stationManger == null)
                                    {
                                        WriteInfo(item.StationName, $"未找到对应站台信息,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                        continue;
                                    }
                                    string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
                                    if (string.IsNullOrEmpty(locationCode))
                                    {
                                        WriteInfo(item.StationName, $"请求分配货位返回信息错误,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                        continue;
                                    }
                                    string oldAddress = task.NextAddress;
                                    int oldStatus = task.TaskState;
                                    task.CurrentAddress = stationManger.StackerCraneStationCode;
                                    task.TargetAddress = locationCode;
                                    task.NextAddress = locationCode;
                                    task.DeviceCode = stationManger.StackerCraneCode;
                                    task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
                                    _taskRepository.UpdateData(task);
                                    _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"系统自动流程,目标地址由{oldAddress}变更为{task.NextAddress},任务状态由{oldStatus}变更为{task.TaskState}");
                                    device.SetValue(W_ConveyorLineDB.ACK, true);
                                }
                            }
                            else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK)
                            {
                                device.SetValue(W_ConveyorLineDB.ACK, false);
                            }
                            else
                            {
                                if (!conveyorLineSignalWrite.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
                                {
                                    Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt());
                                    if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                                    {
                                        Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == item.StationCode);
                                        if (stationManger == null)
                                        {
                                            WriteInfo(item.StationName, $"未找到对应站台信息,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                            continue;
                                        }
                                        Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && (task.CurrentAddress == x.StartPosi));
                                        if (router == null)
                                        {
                                            WriteInfo(item.StationName, $"未找到路由配置信息,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                            continue;
                                        }
                                        string oldAddress = task.NextAddress;
                                        int oldStatus = task.TaskState;
                                        task.NextAddress = router.NextPosi;
                                        task.TargetAddress = router.NextPosi;
                                        task.TaskState = TaskStatusEnum.Line_Executing.ObjToInt();
                                        _taskRepository.UpdateData(task);
                                        _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"系统自动流程,目标地址由{oldAddress}变更为{task.NextAddress},任务状态由{oldStatus}变更为{task.TaskState}");
                                        device.SetValue(W_ConveyorLineDB.TaskNum, task.TaskNum);
                                        device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress);
                                        device.SetValue(W_ConveyorLineDB.StartPos, task.CurrentAddress);
                                        device.SetValue(W_ConveyorLineDB.STB, true);
                                    }
                                }
                                else if(conveyorLineSignalWrite.STB && conveyorLineSignalRead.ACK && conveyorLineStatus.Goods)
                                {
                                    //todo ä»»åŠ¡å®Œæˆ
                                }
                            }
                        }
                        else if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt())
                        {
                            if(!conveyorLineSignalWrite.STB && !conveyorLineSignalWrite.ACK && !conveyorLineSignalRead.STB && !conveyorLineSignalRead.ACK && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm)
                            {
                                Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType));
                                if(task != null)
                                {
                                    device.SetValue(W_ConveyorLineDB.STB, true);
                                }
                            }
                        }
                    }
                    else
                    {
                        WriteInfo(device.DeviceName, $"未找到设备子编号{item.StationCode}的协议信息");
                    }
                }
            }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/²âÊԼܲÖ/GroundStationJob_CSJ.cs
@@ -83,13 +83,13 @@
                                if (stationManger == null)
                                {
                                    WriteInfo(item.StationName, $"未找到对应站台信息,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                    break;
                                    continue;
                                }
                                string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
                                if (string.IsNullOrEmpty(locationCode))
                                {
                                    WriteInfo(item.StationName, $"请求分配货位返回信息错误,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                    break;
                                    continue;
                                }
                                task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
                                task.CurrentAddress = stationManger.StackerCraneStationCode;
@@ -118,13 +118,13 @@
                            if (stationManger == null)
                            {
                                WriteInfo(item.StationName, $"未找到对应站台信息,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                break;
                                continue;
                            }
                            string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
                            if (string.IsNullOrEmpty(locationCode))
                            {
                                WriteInfo(item.StationName, $"请求分配货位返回信息错误,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                break;
                                continue;
                            }
                            string oldAddress = task.NextAddress;
                            int oldStatus = task.TaskState;
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs
@@ -155,7 +155,7 @@
                    apiLogAopInfo.ResponseJsonData = jsonResult;
                    Parallel.For(0, 1, e =>
                    {
                        LogLock.OutLogAOP("AOPLog", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) });
                        LogLock.OutLogAOP("全局日志AOP", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) });
                    });
                }
            }
@@ -179,7 +179,7 @@
                Parallel.For(0, 1, e =>
                {
                    //LogLock.OutSql2Log("AOPLog", new string[] { JsonConvert.SerializeObject(apiLogAopInfo) });
                    LogLock.OutLogAOP("AOPLog", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) });
                    LogLock.OutLogAOP("全局日志AOP", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) });
                });
            });
        }
@@ -201,7 +201,7 @@
                // å¼‚常日志里有详细的堆栈信息
                Parallel.For(0, 1, e =>
                {
                    LogLock.OutLogAOP("AOPLogEx", new string[] { apiLogAopExInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopExInfo) });
                    LogLock.OutLogAOP("全局异常错误日志AOP", new string[] { apiLogAopExInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopExInfo) });
                });
            }
        }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -53,6 +53,15 @@
        WebResponseContent RequestInboundTask(SaveModel saveModel);
        /// <summary>
        /// WCS申请入库
        /// </summary>
        /// <param name="stationCode"></param>
        /// <param name="roadwayNo"></param>
        /// <param name="palletCode"></param>
        /// <returns></returns>
        WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode);
        /// <summary>
        /// å…¥åº“任务申请分配货位
        /// </summary>
        /// <param name="taskNum">任务号</param>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -9,6 +9,7 @@
using WIDESEA_Common.TaskEnum;
using WIDESEA_Core;
using WIDESEA_Core.Helper;
using WIDESEA_DTO.Task;
using WIDESEA_Model.Models;
namespace WIDESEA_TaskInfoService
@@ -102,7 +103,7 @@
                Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode);
                if (task != null)
                {
                    return WebResponseContent.Instance.Error($"该托盘已生成任务");
                    return WebResponseContent.Instance.OK($"该托盘已生成任务", _mapper.Map<WMSTaskDTO>(task));
                }
                if (Repository.QueryFirst(x => x.SourceAddress == stationCode && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null)
@@ -158,8 +159,10 @@
                newTask.TaskId = taskId;
                _stockRepository.StockInfoRepository.UpdateData(stockInfo);
                _unitOfWorkManage.CommitTran();
                PushTasksToWCS(new List<Dt_Task> { newTask });
                return WebResponseContent.Instance.OK(data: newTask);
                WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask);
                //PushTasksToWCS(new List<Dt_Task> { newTask });
                return WebResponseContent.Instance.OK(data: wMSTaskDTO);
            }
            catch (Exception ex)
            {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -42,10 +42,12 @@
        {
            return Service.RequestInboundTask(saveModel);
        }
        //public WebResponseContent RequestInboundTask(string palletCode, string stationCode)
        //{
        //    return Service.RequestInboundTask(palletCode, stationCode);
        //}
        [HttpPost, HttpGet, Route("DeviceRequestInboundTask"), AllowAnonymous]
        public WebResponseContent DeviceRequestInboundTask(string stationCode, string roadwayNo, string palletCode)
        {
            return Service.DeviceRequestInboundTask(stationCode, roadwayNo, palletCode);
        }
        /// <summary>
        /// å…¥åº“任务申请分配货位