wangxinhui
2025-05-28 b35e72bcf8011cf6e30182b0800e2f6e1a18e149
更新代码
已删除6个文件
已修改11个文件
已添加10个文件
348 ■■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/009c71ac-3f6b-4e87-8d77-9e67b15f196a.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/30faed0f-10c1-4ef3-8430-efc0de767fc3.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/658de7b0-2303-43c4-87fc-06fd585d17a1.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/be38a26a-2b17-43c8-b4f8-d9fd5f3264c6.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f8161659-1011-4682-a876-a3c22814902c.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/R_ConveyorLineFLDB.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/W_ConveyorLineFLDB.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/RGVJob_BC.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/辅料仓/AGV_FLExtend.cs 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/辅料仓/AGV_FLJob.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/辅料仓/ConveyorLineJob_FL.cs 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/locationInfoRow.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0e979b6f-9ff2-47ad-99d3-7cc8a7e6a04e.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/19d5ae45-3a83-4410-845f-c9171efb0b93.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3c89de48-4a08-4fe0-8316-5c4d4bd0d410.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/652a771c-a3ae-42e9-830b-5ed6ccfb1711.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9528bf53-2d7f-4000-b6f7-8c81cee17136.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b157c59e-a4e0-4f94-a6da-466245995b56.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dd599f2b-2dfa-4770-8051-fa2d6b46372d.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/009c71ac-3f6b-4e87-8d77-9e67b15f196a.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/30faed0f-10c1-4ef3-8430-efc0de767fc3.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/658de7b0-2303-43c4-87fc-06fd585d17a1.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/be38a26a-2b17-43c8-b4f8-d9fd5f3264c6.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f8161659-1011-4682-a876-a3c22814902c.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs
@@ -106,6 +106,12 @@
        Pending = 970,
        /// <summary>
        /// Mes出库挂起
        /// </summary>
        [Description("Mes出库挂起")]
        MesPending = 975,
        /// <summary>
        /// ä»»åŠ¡å–æ¶ˆ
        /// </summary>
        [Description("任务取消")]
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs
@@ -14,6 +14,7 @@
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_Tasks;
using WIDESEAWCS_Tasks.ConveyorLineJob;
using static Dm.net.buffer.ByteArrayBuffer;
namespace WIDESEAWCS_Server.Controllers
@@ -174,6 +175,7 @@
                var task = _taskRepository.QueryFirst(x => agvUpdateModel.TaskCode == x.AgvTaskNum);
                //是否存在输送线体待AGV搬运任务
                var taskExecutes = _taskRepository.QueryData(x => x.NextAddress == task.CurrentAddress && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.TaskType == TaskTypeEnum.InProduct.ObjToInt());
                var taskExecutesFL = _taskRepository.QueryData(x => x.TaskState == TaskStatusEnum.New.ObjToInt() &&  x.DeviceCode=="AGV_FL" && !string.IsNullOrEmpty(x.DeviceCode));
                if (task == null) throw new Exception($"未找到任务,任务号【{agvUpdateModel.TaskCode}】");
                
                switch (agvUpdateModel.Method.ToUpper())
@@ -283,13 +285,59 @@
                                _taskRepository.UpdateData(task);
                            }
                        }
                        else //更改辅料取货
                        {
                            //是否存在输送线体待AGV搬运任务
                            if (taskExecutesFL.Count > 0)
                            {
                                //调用AGV预调度接口
                                AgvScheduleTaskDTO agvScheduleTask = new AgvScheduleTaskDTO()
                                {
                                    PositionCode = task.CurrentAddress,
                                    NextTask = "60",
                                    UseableLayers = "1",
                                    CacheCount = "1",
                                    Update = "0",
                                    AgvTyp = "11",
                                    PreTaskQty = "1",
                                    ReqCode = Guid.NewGuid().ToString().Replace("-", ""),
                                    ReqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                                };
                                WebResponseContent contentFL = _taskService.AgvPreScheduleTask(agvScheduleTask);
                                if (!contentFL.Status)
                                {
                                    agvResponseContent.Code = "1";
                                    agvResponseContent.Message = contentFL.Message;
                                    return agvResponseContent;
                                }
                            }
                            //获取调入参数
                            AGVBoxApplyPassDTO boxApplyPassDTO = new AGVBoxApplyPassDTO()
                            {
                                ReqCode = Guid.NewGuid().ToString().Replace("-", ""),
                                ReqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                                TaskCode = task.AgvTaskNum
                            };
                            boxApplyPassDTO.Type = "1";
                            //请求料箱回调接口
                            WebResponseContent content = _taskService.AgvBoxApplyPass(boxApplyPassDTO);
                            if (content.Status && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                            {
                                _taskService.UpdateTask(task, TaskStatusEnum.AGV_Executing);
                            }
                            else
                            {
                                task.ExceptionMessage = content.Message;
                                _taskService.UpdateTask(task, TaskStatusEnum.Exception);
                            }
                        }
                        break;
                    case "APPLYFROMAGV":
                        //更改成品出AGV放货任务状态
                        if (task.TaskType == TaskTypeEnum.OutProduct.ObjToInt())
                        {
                        //if (task.TaskType == TaskTypeEnum.OutProduct.ObjToInt())
                        //{
                            _taskService.UpdateTask(task, TaskStatusEnum.AGV_WaitToExecute);
                        }
                        //}
                        break;
                    case "OUTBIN":
                        if (task.TaskType == TaskTypeEnum.InProduct.ObjToInt() || task.TaskType == TaskTypeEnum.InProductBack.ObjToInt())
@@ -374,7 +422,7 @@
        /// <param name="code"></param>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("PutFinish"), AllowAnonymous]
        public WebResponseContent PutFinish(string code)
        public WebResponseContent PutFinish(string code,string barCode="",string taskNum="")
        {
            try
            {
@@ -390,8 +438,15 @@
                }
                OtherDevice otherDevice = (OtherDevice)device;
                if (!barCode.IsNullOrEmpty() && !taskNum.IsNullOrEmpty())
                {
                    otherDevice.SetValue(W_ConveyorLineFLDB.Barcode, barCode, stationManger.StationCode);
                    Thread.Sleep(500);
                    otherDevice.SetValue(W_ConveyorLineFLDB.TaskNum, taskNum, stationManger.StationCode);
                    Thread.Sleep(500);
                }
                otherDevice.SetValue(GroundStationDBName.W_PutFinish, true, stationManger.StationCode);
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -263,7 +263,14 @@
                            {
                                task.NextAddress = router.NextPosi;
                                task.DeviceCode = stationManger.StackerCraneCode;
                                task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
                                if (item.TaskType == TaskTypeEnum.MesOutbound.ObjToInt() && task.TargetAddress== "SCUTL-001")
                                {
                                    task.TaskState = TaskStatusEnum.MesPending.ObjToInt();
                                }
                                else
                                {
                                    task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
                                }
                            }
                            else if (item.TaskType == TaskTypeEnum.MesOutbound.ObjToInt() && item.RoadWay.Contains("ZH"))
                            {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/ConveyorLineTaskCommand.cs
@@ -163,6 +163,22 @@
        /// </summary>
        public short CheckPos { get; set; }
    }
    public class R_ConveyorLineFLInfo : DeviceCommand
    {
        /// <summary>
        /// æ‰˜ç›˜å·
        /// </summary>
        /// <summary>
        [DataLength(20)]
        public string Barcode { get; set; }
        /// <summary>
        /// ä»»åŠ¡å·
        /// </summary>
        [DataLength(20)]
        public string TaskNum { get; set; }
    }
    public class R_ConveyorLineStatus
    {
        /// <summary>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/R_ConveyorLineFLDB.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEAWCS_Tasks.ConveyorLineJob
{
    public enum R_ConveyorLineFLDB
    {
        /// <summary>
        /// åˆ°ä½ä¿¡å·
        /// </summary>
        ConveyArrivaled,
        /// <summary>
        /// æ‰˜ç›˜å·
        /// </summary>
        Barcode,
        /// <summary>
        /// ä»»åŠ¡å·
        /// </summary>
        TaskNum
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/W_ConveyorLineFLDB.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEAWCS_Tasks.ConveyorLineJob
{
    public enum W_ConveyorLineFLDB
    {
        /// <summary>
        /// æ‰˜ç›˜å·
        /// </summary>
        Barcode,
        /// <summary>
        /// ä»»åŠ¡å·
        /// </summary>
        TaskNum
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/°å²Ä²Ö/RGVJob_BC.cs
@@ -98,7 +98,22 @@
                        ConveyorLineSignal conveyorLineSignalRead = conveyorLineInfoRead.Signal.ByteToBoolObject<ConveyorLineSignal>();
                        ConveyorLineSignal conveyorLineSignalWrite = conveyorLineInfoWrite.Signal.ByteToBoolObject<ConveyorLineSignal>();
                        //如果有退料或者入库任务进行管控
                        Dt_Task taskInControl = _taskRepository.QueryFirst(x => x.TaskType>=TaskTypeEnum.Inbound.ObjToInt() && x.WarehouseId== warehouseDevice.WarehouseId);
                        if (item.StationCode=="1511")
                        {
                            short isControl = device.GetValue<W_ConveyorLineDB, short>(W_ConveyorLineDB.Spare2, item.StationCode);
                            if (taskInControl!=null && isControl == 0)
                            {
                                device.SetValue(W_ConveyorLineDB.Spare2, 1, item.StationCode);
                                WriteDebug($"{item.StationCode}管控", $"管控控制");
                            }
                            else if (isControl==1 && taskInControl==null)
                            {
                                device.SetValue(W_ConveyorLineDB.Spare2, 0, item.StationCode);
                                WriteDebug($"{item.StationCode}管控", $"管控恢复");
                            }
                        }
                        if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt())
                        {
                            //if (conveyorLineSignalRead.STB && !conveyorLineSignalWrite.ACK && !string.IsNullOrEmpty(conveyorLineInfoRead.Barcode) && conveyorLineInfoRead.TaskNum == 0)//入库
@@ -153,6 +168,21 @@
                                device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode);
                            }
                        }
                        //允许放行一号开料口出库任务
                        bool outAllow = device.Communicator.Read<bool>("DB14.4.6");
                        if (outAllow)
                        {
                            Dt_Task taskExcuting = _taskRepository.QueryFirst(x => x.WarehouseId== warehouseDevice.WarehouseId && (x.TargetAddress== "SCUTL-001" || x.TargetAddress == "1101")
                            && (x.TaskState==TaskStatusEnum.SC_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt()
                            || x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt()));
                            Dt_Task? taskExecute = _taskRepository.QueryData(x => x.WarehouseId == warehouseDevice.WarehouseId && x.TargetAddress == "SCUTL-001"
                            && x.TaskState==TaskStatusEnum.MesPending.ObjToInt()).OrderByDescending(x=>x.Grade).ThenBy(x=>x.TaskNum).ThenBy(x=>x.CreateDate).FirstOrDefault();
                            if (taskExcuting == null && taskExecute!=null)
                            {
                                _taskService.UpdateTask(taskExecute, TaskStatusEnum.SC_Execute);
                                WriteDebug($"一号开料口放行任务", $"任务号{taskExecute.TaskNum}");
                            }
                        }
                    }
                    else
                    {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸¨ÁϲÖ/AGV_FLExtend.cs
@@ -8,7 +8,9 @@
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO.Agv;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_Tasks.StackerCraneJob;
namespace WIDESEAWCS_Tasks
@@ -22,7 +24,10 @@
        {
            try
            {
                var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && nameof(AGV_FLJob).Contains(x.DeviceCode) && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList();
                var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => ((x.TaskState == TaskStatusEnum.AGV_Execute.ObjToInt() && x.TaskType>=TaskTypeEnum.Inbound.ObjToInt())
                || (x.TaskState == TaskStatusEnum.New.ObjToInt() && x.TaskType < TaskTypeEnum.Inbound.ObjToInt()))
                && nameof(AGV_FLJob).Contains(x.DeviceCode)
                && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList();
                foreach (var task in newTasks)
                {
                    try
@@ -71,6 +76,60 @@
            }
        }
        /// <summary>
        /// AGV取放货回调
        /// </summary>
        public void ContinueAGVTask()
        {
            try
            {
                //获取是否有安全申请中的任务
                var continueTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => (x.TaskState == TaskStatusEnum.AGV_WaitToExecute.ObjToInt()) && nameof(AGV_FLJob).Contains(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList();
                foreach (var continueTask in continueTasks)
                {
                    Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == continueTask.NextAddress);
                    if (stationManger == null)
                    {
                        continue;
                    }
                    IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
                    if (device == null)
                    {
                        continue;
                    }
                    OtherDevice otherDevice = (OtherDevice)device;
                    bool canPut = otherDevice.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, stationManger.StationCode);
                    if (!canPut)
                    {
                        continue;
                    }
                    //获取调入参数
                    AGVBoxApplyPassDTO boxApplyPassDTO = new AGVBoxApplyPassDTO()
                    {
                        ReqCode = Guid.NewGuid().ToString().Replace("-", ""),
                        ReqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                        TaskCode = continueTask.AgvTaskNum
                    };
                    boxApplyPassDTO.Type = "2";
                    //请求料箱回调接口
                    WebResponseContent content = _taskService.AgvBoxApplyPass(boxApplyPassDTO);
                    if (content.Status && boxApplyPassDTO.TaskCode == continueTask.AgvTaskNum)
                    {
                        _taskService.UpdateTask(continueTask, TaskStatusEnum.AGV_Puting);
                    }
                    else
                    {
                        continueTask.ExceptionMessage = content.Message;
                        _taskService.UpdateTask(continueTask, TaskStatusEnum.Exception);
                    }
                }
            }
            catch (Exception ex)
            {
                WriteError(nameof(AGV_CPJob), ex.Message, ex);
            }
        }
        /// <summary>
        /// èŽ·å–AGV地址
        /// </summary>
        /// <param name="Address"></param>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸¨ÁϲÖ/AGV_FLJob.cs
@@ -42,6 +42,7 @@
            try
            {
                SendAGVTask();
                ContinueAGVTask();
            }
            catch (Exception ex)
            {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/¸¨ÁϲÖ/ConveyorLineJob_FL.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,92 @@
using Microsoft.AspNetCore.Components.Routing;
using Newtonsoft.Json;
using Quartz;
using SqlSugar.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_QuartzJob.Service;
using WIDESEAWCS_Tasks.ConveyorLineJob;
using ICacheService = WIDESEAWCS_Core.Caches.ICacheService;
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class ConveyorLineJob_FL : JobBase, IJob
    {
        private readonly ICacheService _cacheService;
        private readonly ITaskService _taskService;
        private readonly ITaskExecuteDetailService _taskExecuteDetailService;
        private readonly ITaskRepository _taskRepository;
        private readonly IStationMangerRepository _stationMangerRepository;
        private readonly IRouterRepository _routerRepository;
        private readonly IRouterService _routerService;
        private readonly IRouterExtension _routerExtension;
        private readonly List<Dt_WarehouseDevice> warehouseDevices;
        public ConveyorLineJob_FL(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension)
        {
            _cacheService = cacheService;
            _taskService = taskService;
            _taskExecuteDetailService = taskExecuteDetailService;
            _taskRepository = taskRepository;
            _stationMangerRepository = stationMangerRepository;
            _routerRepository = routerRepository;
            _routerService = routerService;
            _routerExtension = routerExtension;
            string? warehouseDevicesStr = _cacheService.Get<string>(nameof(Dt_WarehouseDevice));
            if (!string.IsNullOrEmpty(warehouseDevicesStr))
            {
                warehouseDevices = JsonConvert.DeserializeObject<List<Dt_WarehouseDevice>>(warehouseDevicesStr) ?? new List<Dt_WarehouseDevice>();
            }
            else
            {
                warehouseDevices = new List<Dt_WarehouseDevice>();
            }
        }
        public Task Execute(IJobExecutionContext context)
        {
            bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
            if (flag && value != null)
            {
                OtherDevice device = (OtherDevice)value;
                List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList();
                List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
                foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
                {
                    DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineFLDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                    if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProRead != null)
                    {
                        R_ConveyorLineFLInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineFLInfo>(deviceProRead.DeviceProAddress);
                        bool conveyArrivaled = device.GetValue<R_ConveyorLineFLDB, bool>(R_ConveyorLineFLDB.ConveyArrivaled, item.StationCode);
                        if (conveyArrivaled)
                        {
                            Dt_Task newTask = _taskRepository.QueryFirst(x => x.TaskNum== conveyorLineInfoRead.TaskNum.ObjToInt() && x.PalletCode == conveyorLineInfoRead.Barcode && x.TaskState == TaskStatusEnum.New.ObjToInt() && x.DeviceCode== item.StackerCraneCode && !string.IsNullOrEmpty(x.DeviceCode));
                            if (newTask != null)
                            {
                                _taskService.UpdateTask(newTask, TaskStatusEnum.AGV_Execute);
                            }
                            WriteError(item.StationName, $"入库到位信号,托盘号{conveyorLineInfoRead.Barcode},任务号:{conveyorLineInfoRead.TaskNum}");
                        }
                    }
                }
            }
            return Task.CompletedTask;
        }
    }
}
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/basic/locationInfoRow.vue
@@ -346,6 +346,7 @@
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 8px;
  cursor: pointer;
}
.location-cell {
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0e979b6f-9ff2-47ad-99d3-7cc8a7e6a04e.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/19d5ae45-3a83-4410-845f-c9171efb0b93.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3c89de48-4a08-4fe0-8316-5c4d4bd0d410.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/652a771c-a3ae-42e9-830b-5ed6ccfb1711.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9528bf53-2d7f-4000-b6f7-8c81cee17136.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/b157c59e-a4e0-4f94-a6da-466245995b56.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dd599f2b-2dfa-4770-8051-fa2d6b46372d.vsidx
Binary files differ
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -140,7 +140,7 @@
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public WebResponseContent PutFinish(string code)
        public WebResponseContent PutFinish(string code, string barCode = "", string taskNum = "")
        {
            try
            {
@@ -149,7 +149,7 @@
                {
                    return WebResponseContent.Instance.Error($"未找到WCSAApi地址,请检查配置文件");
                }
                string response = HttpHelper.Post($"{url}/api/CTU_AGV/PutFinish?code=" + code);
                string response = HttpHelper.Post($"{url}/api/CTU_AGV/PutFinish?code={code}&barCode={barCode}&taskNum={taskNum}" );
                return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("返回错误");
            }
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -128,6 +128,15 @@
                    {
                        stockInfo.StockStatus = StockStatusEmun.入库确认.ObjToInt();
                    }
                    if (warehouse.WarehouseCode==WarehouseEnum.HA57.ToString())
                    {
                        Dt_Task dt_TaskMesReturn = BaseDal.QueryFirst(x=>x.TaskType==TaskTypeEnum.MesMatReturn.ObjToInt() && x.TaskStatus!=TaskStatusEnum.SC_Executing.ObjToInt());
                        if (dt_TaskMesReturn!=null)
                        {
                            return WebResponseContent.Instance.Error($"退料任务正执行");
                        }
                    }
                    _unitOfWorkManage.BeginTran();
                    int taskId = BaseDal.AddData(newTask);
                    newTask.TaskId = taskId;
@@ -200,7 +209,7 @@
                _stockRepository.StockInfoRepository.AddData(stockInfo);
                _unitOfWorkManage.CommitTran();
                PushTasksToWCS(new List<Dt_Task> { newTask });
                PutFinish(address);
                PutFinish(address, newTask.PalletCode, newTask.TaskNum.ToString());
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
@@ -367,7 +376,7 @@
                WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask);
                PushTasksToWCS(new List<Dt_Task> { newTask });
                if (newTask.WarehouseId == 5) PutFinish(stationCode);
                if (newTask.WarehouseId == 5) PutFinish(stationCode.ToString(),newTask.PalletCode, newTask.TaskNum.ToString());
                return WebResponseContent.Instance.OK(data: wMSTaskDTO);
            }
            catch (Exception ex)
@@ -462,7 +471,7 @@
                WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask);
                PushTasksToWCS(new List<Dt_Task> { newTask });
                if (newTask.WarehouseId == 5) PutFinish(stationCode);
                if (newTask.WarehouseId == 5) PutFinish(stationCode, newTask.PalletCode, newTask.TaskNum.ToString());
                return WebResponseContent.Instance.OK(data: wMSTaskDTO);
            }
            catch (Exception ex)
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -13,7 +13,7 @@
  //连接字符串
  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
  //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=WMS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //旧WMS数据库连接
  //"TeConnectionString": "Data Source=10.30.4.92;Initial Catalog=TeChuang;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",