dengjunjie
2026-03-06 b834b2c0977af30a5040c9b8416d930608fc845d
优化四向车接口
已添加1个文件
已重命名1个文件
已修改18个文件
301 ■■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/StationMangerService.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/RgvCommand.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTNewMovePodTask.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTTaskStatusNotify.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOToccupyStation.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IStationMangerService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/.config/dotnet-tools.json 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RGVTaskMethods.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WIDESEAWCS_TaskInfoService.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TestJob.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/StationMangerService.cs
@@ -20,9 +20,14 @@
        public IRepository<Dt_StationManger> Repository => BaseDal;
        public Dt_StationManger GetStationInfo(string fromLocationCode)
        {
            return BaseDal.QueryFirst(x => x.StationCode == fromLocationCode);
        }
        public Dt_StationManger GetInStationInfo(string fromLocationCode)
        {
            return BaseDal.QueryFirst(x => x.StationCode == fromLocationCode && x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt());
            return BaseDal.QueryFirst(x => x.StationCode == fromLocationCode && (x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() || x.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt()));
        }
        /// <summary>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/RgvCommand.cs
ÎļþÃû´Ó ´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RgvCommand.cs ÐÞ¸Ä
@@ -3,9 +3,8 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_QuartzJob.DeviceBase;
namespace WIDESEAWCS_Tasks
namespace WIDESEAWCS_Common
{
    public enum QualityInspectionCommandEnum
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTNewMovePodTask.cs
@@ -12,6 +12,9 @@
    /// </summary>
    public class FOURBOTnewMovePodTask
    {
        public string warehouseID { get; set; } = "HETU";
        public string clientCode { get; set; } = "WCS";
        public string requestID { get; set; } = DateTime.Now.ToString("yyyyMMddHHmmss");
        /// <summary>
        /// ä¼˜å…ˆçº§
        /// </summary>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTTaskStatusNotify.cs
@@ -6,6 +6,15 @@
namespace WIDESEAWCS_DTO.RGV.FOURBOT
{
    public class RGVReturnInfo
    {
        public long messageID { get; set; }
        public int messageType { get; set; }
        public string warehouseID { get; set; }
        public string createTime { get; set; }
        public FOURBOTTaskStatusNotify content { get; set; }
    }
    /// <summary>
    /// å››å‘车任务状态更新消息
    /// </summary>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOToccupyStation.cs
@@ -15,6 +15,9 @@
        /// ç«™ç‚¹ç¼–码
        /// </summary>
        public string stationCode { get; set; }
        public string warehouseID { get; set; } = "HETU";
        public string clientCode { get; set; } = "WCS";
        public string requestID { get; set; } = DateTime.Now.ToString("yyyyMMddHHmmss");
        /// <summary>
        /// æ‰˜ç›˜å·
@@ -24,7 +27,7 @@
        /// <summary>
        /// æ‰˜ç›˜è§„格名称
        /// </summary>
        public string layoutID { get; set; }
        public string layoutID { get; set; } = "609284257625407509";
        /// <summary>
        /// æ‰˜ç›˜é‡é‡(kg)
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IStationMangerService.cs
@@ -13,6 +13,12 @@
    {
        public IRepository<Dt_StationManger> Repository { get; }
        /// <summary>
        /// èŽ·å–ç«™å°ä¿¡æ¯
        /// </summary>
        /// <param name="fromLocationCode"></param>
        /// <returns></returns>
        Dt_StationManger GetStationInfo(string fromLocationCode);
        /// <summary>
        /// èŽ·å–å…¥åº“ç«™å°
        /// </summary>
        /// <param name="fromLocationCode"></param>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -226,7 +226,7 @@
        /// <param name="deviceTypeEnum"></param>
        /// <param name="locationStatusEnum"></param>
        /// <returns></returns>
        WebResponseContent UpdateLocationStatus(Dt_Task task, DeviceTypeEnum deviceTypeEnum, LocationStatusEnum locationStatusEnum);
        WebResponseContent UpdateLocationStatus(string locationCode,string palletCode, DeviceTypeEnum deviceTypeEnum, LocationStatusEnum locationStatusEnum);
        WebResponseContent ModifyWMSLayoutZone(WMSUpdateLocationArea wMSUpdateLocationArea);
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs
@@ -39,9 +39,9 @@
        public int StationType {  get; set; }
        /// <summary>
        /// å¯¹åº”四向车点ID
        /// å¯¹åº”四向车外形检测点ID
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "对应四向车点ID")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "对应四向车外形检测点ID")]
        public string RGVStationCode { get; set; }
        /// <summary>
@@ -69,7 +69,7 @@
        [SugarColumn(IsNullable = false, ColumnDescription = "站台是否可用")]
        public int IsOccupied { get; set; }
        /// <summary>
        /// å¤‡æ³¨(外形检测点ID)
        /// å¤‡æ³¨
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "备注")]
        public string Remark { get; set; }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/.config/dotnet-tools.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
{
  "version": 1,
  "isRoot": true,
  "tools": {
    "dotnet-ef": {
      "version": "10.0.3",
      "commands": [
        "dotnet-ef"
      ]
    }
  }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs
@@ -99,7 +99,7 @@
        /// </summary>
        /// <param name="AreaCode">区域号</param>
        /// <returns></returns>
        [HttpPost, Route("QueryStation"), AllowAnonymous]
        [HttpGet, HttpPost, Route("QueryStation"), AllowAnonymous]
        public WMSReturn QueryStation(string AreaCode)
        {
            WebResponseContent content = _taskService.LocationInquiry(AreaCode);
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml
@@ -10,8 +10,12 @@
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <PublishProvider>FileSystem</PublishProvider>
    <PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
    <PublishUrl>E:\IISText\GaoPu</PublishUrl>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <_TargetId>Folder</_TargetId>
    <SiteUrlToLaunchAfterPublish />
    <TargetFramework>net6.0</TargetFramework>
    <ProjectGuid>487fa45b-ea1a-4aca-bb5b-0f6708f462c0</ProjectGuid>
    <SelfContained>false</SelfContained>
  </PropertyGroup>
</Project>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs
@@ -119,7 +119,15 @@
        #region 6 è£å‰ªé€è´§
        public WebResponseContent CJCarryTaske(TaskDTO taskDTO, int taskType)
        {
            return WebResponseContent.Instance.OK();
            try
            {
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        #endregion
    }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RGVTaskMethods.cs
@@ -44,7 +44,7 @@
                    TaskType = taskType,
                    SourceAddress = taskDTO.fromLocationCode,
                    CurrentAddress = taskDTO.fromLocationCode,
                    NextAddress = stationManger.Remark,//找入库站台对应的外形检测编号
                    NextAddress = stationManger.RGVStationCode,//找入库站台对应的外形检测编号
                    TargetAddress = "",
                    //Remark = taskDTO.toAreaCode,
                    Creater = "WMS",
@@ -58,8 +58,8 @@
            }
            catch (Exception ex)
            {
                Db.Ado.RollbackTran();
                return WebResponseContent.Instance.Error(ex.Message);
                //Db.Ado.RollbackTran();
                throw new Exception(ex.Message);
            }
        }
        /// <summary>
@@ -93,16 +93,23 @@
                    Creater = "WMS",
                };
                rGVLocationInfo.LocationStatus = LocationStatusEnum.OutLock.ObjToInt();
                Db.Ado.BeginTran();
                BaseDal.AddData(dt_Task);
                _rGVLocationInfoService.Repository.UpdateData(rGVLocationInfo);
                Db.Ado.CommitTran();
                try
                {
                    Db.Ado.BeginTran();
                    BaseDal.AddData(dt_Task);
                    _rGVLocationInfoService.Repository.UpdateData(rGVLocationInfo);
                    Db.Ado.CommitTran();
                }
                catch (Exception ex)
                {
                    Db.Ado.RollbackTran();
                    throw new Exception(ex.Message);
                }
                return WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
            {
                Db.Ado.RollbackTran();
                return WebResponseContent.Instance.Error(ex.Message);
                throw new Exception(ex.Message);
            }
        }
        #endregion
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs
@@ -1,4 +1,5 @@
using Magicodes.IE.Core;
using Autofac.Core;
using Magicodes.IE.Core;
using NetTaste;
using System;
using System.Collections.Generic;
@@ -18,6 +19,7 @@
using WIDESEAWCS_DTO.RGV.FOURBOT;
using WIDESEAWCS_DTO.WMS;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
namespace WIDESEAWCS_TaskInfoService
{
@@ -37,13 +39,13 @@
            WebResponseContent content = new WebResponseContent();
            GALAXISUpdateTaskStatus gALAXIS = new();
            FOURBOTTaskStatusNotify Rgv = new();//四向车任务状态通知
            RGVReturnInfo Rgv = new();//四向车任务状态通知
            HIKROBOTTaskProcessReport hIKROBOT = new();//海康机器人
            try
            {
                if (deviceTypeEnum == DeviceTypeEnum.GALAXIS)
                {
                     gALAXIS = TaskDTO.Serialize().DeserializeObject<GALAXISUpdateTaskStatus>();
                    gALAXIS = TaskDTO.Serialize().DeserializeObject<GALAXISUpdateTaskStatus>();
                    if (gALAXIS == null) throw new Exception("参数转换失败!");
                    var task = BaseDal.QueryFirst(x => x.WMSTaskNum == gALAXIS.taskId);
                    if (task == null) throw new Exception($"未找到任务,任务编号【{gALAXIS.taskId}】");
@@ -63,8 +65,8 @@
                }
                else if (deviceTypeEnum == DeviceTypeEnum.HIKROBOT)
                {
                    hIKROBOT=TaskDTO.Serialize().DeserializeObject<HIKROBOTTaskProcessReport>();
                    if (hIKROBOT==null) throw new Exception("参数转换失败!");
                    hIKROBOT = TaskDTO.Serialize().DeserializeObject<HIKROBOTTaskProcessReport>();
                    if (hIKROBOT == null) throw new Exception("参数转换失败!");
                    var task = BaseDal.QueryFirst(x => x.WMSTaskNum == hIKROBOT.robotTaskCode);
                    if (task == null) throw new Exception($"未找到任务,任务编号【{hIKROBOT.robotTaskCode}】");
                    switch (hIKROBOT.extra.values.method)
@@ -76,33 +78,39 @@
                            TaskFromCompleted(task, deviceTypeEnum);
                            break;
                        default:
                            task.TaskState = ReturnTaskStatus(gALAXIS.taskStatus, deviceTypeEnum);
                            task.TaskState = ReturnTaskStatus(hIKROBOT.extra.values.method, deviceTypeEnum);
                            BaseDal.UpdateData(task);
                            break;
                    }
                }
                else //四向车
                {
                    Rgv = TaskDTO.Serialize().DeserializeObject<FOURBOTTaskStatusNotify>();
                    if (Rgv==null) throw new Exception("参数转换失败!");
                    var task = BaseDal.QueryFirst(x => x.WMSTaskNum == Rgv.taskID.ToString());
                    if (task==null) throw new Exception($"未找到任务,任务编号【{Rgv.taskID}】");
                    switch (Rgv.status)
                    Rgv = TaskDTO.Serialize().DeserializeObject<RGVReturnInfo>();
                    if (Rgv == null) throw new Exception("参数转换失败!");
                    //var task = BaseDal.QueryFirst(x => x.RGVTaskId == Rgv.content.taskID);
                    var task = BaseDal.QueryFirst(x => x.PalletCode == Rgv.content.podID);
                    if (task == null) throw new Exception($"未找到任务,任务编号【{Rgv.content.taskID}】");
                    if (Rgv.messageType == 72)//小车顶起货物
                    {
                        case 2:
                            TaskCompleted(task, deviceTypeEnum);
                            break;
                        case 4:
                            TaskFromCompleted(task, deviceTypeEnum);
                            break;
                        default:
                            task.TaskState = ReturnTaskStatus(gALAXIS.taskStatus, deviceTypeEnum);
                            break;
                        TaskFromCompleted(task, deviceTypeEnum);
                        //给质检门写入启动信号
                        var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "F1") as OtherDevice ?? throw new Exception("未找到1楼质检门设备信息");
                        device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
                    }
                    else if (Rgv.messageType == 10)
                    {
                        if (task.TaskState == (int)TaskStatusEnum.TakeFinish && Rgv.content.status == 4)
                        {
                            task.TaskState = (int)TaskStatusEnum.CheckShapeing;
                            BaseDal.UpdateData(task);
                        }
                        else if (task.TaskState == (int)TaskStatusEnum.Puting && Rgv.content.status == 4)
                        {
                            TaskCompleted(task, deviceTypeEnum);
                        }
                    }
                }
               return content.OK();
                return content.OK();
            }
            catch (Exception ex)
            {
@@ -124,7 +132,7 @@
                    logObject = hIKROBOT;
                    deviceName = "海康机器人";
                }
                else if (Rgv != null && Rgv.taskID != 0)
                else if (Rgv != null && Rgv.content.taskID != 0)
                {
                    logObject = Rgv;
                    deviceName = "四向车";
@@ -193,7 +201,7 @@
            {
                dt_Task.TaskState = TaskStatusEnum.TakeFinish.ObjToInt();
                Db.Ado.BeginTran();
                UpdateLocationStatus(dt_Task, deviceTypeEnum, LocationStatusEnum.Free);
                UpdateLocationStatus(dt_Task.SourceAddress, dt_Task.PalletCode, deviceTypeEnum, LocationStatusEnum.Free);
                BaseDal.UpdateData(dt_Task);
                Db.Ado.CommitTran();
                return WebResponseContent.Instance.OK();
@@ -245,7 +253,7 @@
                    if (agvContent.code != 0) dt_Task.ExceptionMessage = agvContent.msg;
                }
                Db.Ado.BeginTran();
                UpdateLocationStatus(dt_Task, deviceTypeEnum, LocationStatusEnum.InStock);
                UpdateLocationStatus(dt_Task.TargetAddress, dt_Task.PalletCode, deviceTypeEnum, LocationStatusEnum.InStock);
                if (agvContent != null && agvContent.code == 0)
                    BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.自动完成);
                else
@@ -269,22 +277,22 @@
        /// <param name="deviceTypeEnum"></param>
        /// <param name="locationStatusEnum"></param>
        /// <returns></returns>
        public WebResponseContent UpdateLocationStatus(Dt_Task takse, DeviceTypeEnum deviceTypeEnum, LocationStatusEnum locationStatusEnum)
        public WebResponseContent UpdateLocationStatus(string locationCode, string palletCode, DeviceTypeEnum deviceTypeEnum, LocationStatusEnum locationStatusEnum)
        {
            try
            {
                if (deviceTypeEnum == DeviceTypeEnum.GALAXIS)
                {
                    Dt_KLSLocationInfo? dt_KLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.LocationCode == takse.SourceAddress);
                    Dt_KLSLocationInfo? dt_KLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.LocationCode == locationCode);
                    if (dt_KLSLocationInfo != null)
                    {
                        if (locationStatusEnum== LocationStatusEnum.Free) //如果起点完成就给货位赋值托盘号
                        if (locationStatusEnum == LocationStatusEnum.Free) //如果起点完成就给货位赋值托盘号
                        {
                            dt_KLSLocationInfo.PalletCode = "";
                        }
                        else
                        {
                            dt_KLSLocationInfo.PalletCode = takse.PalletCode;
                            dt_KLSLocationInfo.PalletCode = palletCode;
                        }
                        dt_KLSLocationInfo.LocationStatus = locationStatusEnum.ObjToInt();
                        _kLSLocationInfoService.Repository.UpdateData(dt_KLSLocationInfo);
@@ -292,7 +300,7 @@
                }
                else if (deviceTypeEnum == DeviceTypeEnum.HIKROBOT)
                {
                    Dt_HKLocationInfo? dt_HKLocationInfo = _hKLocationInfoService.Repository.QueryFirst(x => x.LocationCode == takse.SourceAddress);
                    Dt_HKLocationInfo? dt_HKLocationInfo = _hKLocationInfoService.Repository.QueryFirst(x => x.LocationCode == locationCode);
                    if (dt_HKLocationInfo != null)
                    {
                        if (locationStatusEnum == LocationStatusEnum.Free) //如果起点完成就给货位赋值托盘号
@@ -301,7 +309,7 @@
                        }
                        else
                        {
                            dt_HKLocationInfo.PalletCode = takse.PalletCode;
                            dt_HKLocationInfo.PalletCode = palletCode;
                        }
                        dt_HKLocationInfo.LocationStatus = locationStatusEnum.ObjToInt();
                        _hKLocationInfoService.Repository.UpdateData(dt_HKLocationInfo);
@@ -309,7 +317,7 @@
                }
                else if (deviceTypeEnum == DeviceTypeEnum.YuanLiJuHe)
                {
                    Dt_RGVLocationInfo dt_RGVLocationInfo = _rGVLocationInfoService.Repository.QueryFirst(x => x.LocationCode == takse.SourceAddress);
                    Dt_RGVLocationInfo dt_RGVLocationInfo = _rGVLocationInfoService.Repository.QueryFirst(x => x.LocationCode == locationCode);
                    //这里将任务的托盘号给货位表中的PalletCode字段。
                    if (dt_RGVLocationInfo != null)
@@ -320,13 +328,13 @@
                        }
                        else
                        {
                            dt_RGVLocationInfo.PalletCode = takse.PalletCode;
                            dt_RGVLocationInfo.PalletCode = palletCode;
                        }
                        dt_RGVLocationInfo.LocationStatus = locationStatusEnum.ObjToInt();
                        _rGVLocationInfoService.Repository.UpdateData(dt_RGVLocationInfo);
                    }
                }
                else//库外站台
                else//平库库位
                {
                }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -20,6 +20,7 @@
using System.Diagnostics.CodeAnalysis;
using WIDESEAWCS_BasicInfoService;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.LocationEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseRepository;
@@ -69,7 +70,7 @@
        /// </summary>
        public IRepository<Dt_Task> Repository => BaseDal;
        public TaskService(IRepository<Dt_Task> BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, IRepository<Dt_TaskExecuteDetail> taskExecuteDetailRepository, IMapper mapper, IKLSLocationInfoService kLSLocationInfoService, IRGVLocationInfoService rGVLocationInfoService, IHKLocationInfoService hKLocationInfoService, IApiInfoService apiInfoService, ITrackloginfoService trackloginfoService) : base(BaseDal)
        public TaskService(IRepository<Dt_Task> BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, IRepository<Dt_TaskExecuteDetail> taskExecuteDetailRepository, IMapper mapper, IKLSLocationInfoService kLSLocationInfoService, IRGVLocationInfoService rGVLocationInfoService, IHKLocationInfoService hKLocationInfoService, IApiInfoService apiInfoService, ITrackloginfoService trackloginfoService, IStationMangerService stationMangerService) : base(BaseDal)
        {
            _routerService = routerService;
            _taskExecuteDetailService = taskExecuteDetailService;
@@ -80,6 +81,7 @@
            _hKLocationInfoService = hKLocationInfoService;
            _apiInfoService = apiInfoService;
            _trackloginfoService = trackloginfoService;
            _stationMangerService=stationMangerService;
        }
        public WebResponseContent ReceiveWMSTask([NotNull] List<WMSTasksDTO> taskDTOs)
        {
@@ -328,8 +330,8 @@
                    Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(HIKROBOTTaskGrade));
                    if (apiInfo == null) throw new Exception("未找到四向车AGV任务下发接口配置信息!请检查接口配置");
                    string response = HttpHelper.Post(apiInfo.ApiAddress, request.Serialize());
                    HIKROBOTReturn hIKROBOTReturn=response.DeserializeObject<HIKROBOTReturn>();
                    if (hIKROBOTReturn.code == "SUCCESS0"&&hIKROBOTReturn.message=="成功")
                    HIKROBOTReturn hIKROBOTReturn = response.DeserializeObject<HIKROBOTReturn>();
                    if (hIKROBOTReturn.code == "SUCCESS0" && hIKROBOTReturn.message == "成功")
                    {
                        BaseDal.UpdateData(dt_Task);
                        return content.OK("修改任务优先级成功", dt_Task);
@@ -1072,10 +1074,10 @@
        {
            try
            {
                var  Agvlocation = _rGVLocationInfoService.Repository.QueryData(x=> fOURBOTStorageStatusNotify.storageCode.Contains(x.LocationCode));
                var Agvlocation = _rGVLocationInfoService.Repository.QueryData(x => fOURBOTStorageStatusNotify.storageCode.Contains(x.LocationCode));
                foreach (var item in Agvlocation)
                {
                    item.LocationStatus = (int)(fOURBOTStorageStatusNotify.disable==0?EnableStatusEnum.Normal:EnableStatusEnum.Disable);
                    item.LocationStatus = (int)(fOURBOTStorageStatusNotify.disable == 0 ? EnableStatusEnum.Normal : EnableStatusEnum.Disable);
                }
                _rGVLocationInfoService.UpdateData(Agvlocation);
                return WebResponseContent.Instance.OK();
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WIDESEAWCS_TaskInfoService.csproj
@@ -7,6 +7,10 @@
    </PropertyGroup>
    <ItemGroup>
      <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.11" />
    </ItemGroup>
    <ItemGroup>
        <ProjectReference Include="..\WIDESEAWCS_BasicInfoService\WIDESEAWCS_BasicInfoService.csproj" />
        <ProjectReference Include="..\WIDESEAWCS_ITaskInfoService\WIDESEAWCS_ITaskInfoService.csproj" />
    </ItemGroup>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs
@@ -37,15 +37,21 @@
                {
                    fOURBOTnewMovePodTask.priority = item.Grade;
                    fOURBOTnewMovePodTask.podID = item.PalletCode;
                    fOURBOTnewMovePodTask.destination = item.NextAddress;
                    //fOURBOTnewMovePodTask.destination = item.NextAddress;
                    fOURBOTnewMovePodTask.desExt = new
                    {
                        unload = 0//是否放下容器,0否1是
                    };
                    fOURBOTnewMovePodTask.desType = 2;
                    fOURBOTnewMovePodTask.taskExt = new
                    {
                        keepRobot = 1,
                        keepRobotTimeout = 1
                    };
                    fOURBOTnewMovePodTask.desType = 1;
                    fOURBOTnewMovePodTask.desNodeID = item.NextAddress;
                    string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize());
                    FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
                    content.Data= fOURBOTReturn;
                    content.Data = fOURBOTReturn;
                    if (fOURBOTReturn.returnCode == 0)
                    {
                        string dataJson = fOURBOTReturn.data.ToString();
@@ -68,7 +74,7 @@
            }
            finally
            {
                _trackloginfoService.AddTrackLog(fOURBOTnewMovePodTask, content, "下发四向车新建入库任务", "","");
                _trackloginfoService.AddTrackLog(fOURBOTnewMovePodTask, content, "下发四向车新建入库任务", "", "");
            }
        }
        #endregion
@@ -82,7 +88,7 @@
        {
            object requestData = null;  // æ·»åŠ å˜é‡è®°å½•è¯·æ±‚æ•°æ®
            WebResponseContent content =new WebResponseContent();
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(GetBlockPodContentDto)) ?? throw new Exception("未找到四向车任务下发接口配置信息!请检查接口配置");
@@ -104,13 +110,13 @@
                //content.candidatePodIDs = tasks.Select(x => x.PalletCode).ToList();
                string response = HttpHelper.Post(apiInfo.ApiAddress, request.Serialize());
                FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
                content.Data= fOURBOTReturn;
                content.Data = fOURBOTReturn;
                if (fOURBOTReturn.returnCode == 0)
                {
                    //ReturnBlockPodResultDto getBlockPod = fOURBOTReturn.data as ReturnBlockPodResultDto ?? throw new Exception("未获取到阻碍托盘关系数据");
                    var dataJson = fOURBOTReturn.data.ToString();
                    ReturnBlockPodResultDto? getBlockPod = JsonConvert.DeserializeObject<ReturnBlockPodResultDto>(dataJson);
                    if (getBlockPod.Result.Count==0)
                    if (getBlockPod.Result.Count == 0)
                    {
                        throw new Exception("未获取到阻碍托盘关系数据");
                    }
@@ -179,12 +185,18 @@
                        {
                            priority = item.Grade,
                            podID = item.PalletCode,
                            destination = rGVLocationInfo.LocationCode,
                            desStorageID = rGVLocationInfo.LocationCode,
                            //destination = rGVLocationInfo.LocationCode,
                            desExt = new { unload = 1 }, // æ˜¯å¦æ”¾ä¸‹å®¹å™¨,0否1是
                            desType = 2
                        };
                        fOURBOTnewMovePodTask.taskExt = new
                        {
                            autoToRest = 1
                        };
                        item.CurrentAddress = item.NextAddress;
                        item.NextAddress = rGVLocationInfo.LocationCode;
                        item.TargetAddress = rGVLocationInfo.LocationCode;
                        item.Roadway = rGVLocationInfo.RoadwayNo;
                        string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize());
@@ -224,7 +236,7 @@
                        content.Error($"四向车接口返回错误:{ex.Message}");
                    }
                    tasksToUpdate.Add(item);
                }
                }
                #endregion
                #region æ›´æ–°æ•°æ®
                // å¦‚果有需要更新的数据,才执行事务
@@ -248,7 +260,7 @@
                        _unitOfWorkManage.RollbackTran();
                        WriteError(nameof(TaskJob), ex.Message, ex);
                    }
                }
                }
                #endregion
            }
            catch (Exception ex)
@@ -275,7 +287,7 @@
                {
                    Dt_StationManger stationManger = _stationMangerService.GetInStationInfo(item.SourceAddress);
                    item.CurrentAddress = item.NextAddress;
                    item.NextAddress = stationManger.RGVStationCode;
                    item.NextAddress = stationManger.StationCode;
                    fOURBOTnewMovePodTask.priority = item.Grade;
                    fOURBOTnewMovePodTask.podID = item.PalletCode;
                    fOURBOTnewMovePodTask.destination = item.NextAddress;
@@ -283,7 +295,11 @@
                    {
                        unload = 1//是否放下容器,0否1是
                    };
                    fOURBOTnewMovePodTask.desType = 2;
                    fOURBOTnewMovePodTask.taskExt = new
                    {
                        autoToRest = 1
                    };
                    fOURBOTnewMovePodTask.desType = 5;
                    string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize());
                    FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
                    content.Data = fOURBOTReturn;
@@ -369,7 +385,7 @@
            List<MoveBlockPodContentDto> moveBlocks = new List<MoveBlockPodContentDto>();
            try
            {
                Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(MoveBlockPodContentDto)) ?? throw new Exception("未找到四向车批量搬运阻碍托任务接口配置信息!请检查接口配置");
                foreach (var item in tasks)
                {
@@ -427,7 +443,7 @@
                    var takes = _taskService.Repository.QueryFirst(x => x.Roadway == item.Roadway && x.TaskType == (int)TaskTypeEnum.CPMoveInventory);
                    if (takes == null)
                    {
                        item.TaskState = (int)TaskStatusEnum.RGV_WaitSend;
                        item.TaskState = (int)TaskStatusEnum.RGV_WaitSend;
                    }
                }
                _taskService.UpdateData(tasks);
@@ -450,6 +466,7 @@
                foreach (var item in tasks)
                {
                    var stationManger = _stationMangerService.GetOutStationInfo(item.TargetAddress);
                    item.NextAddress = stationManger.StationCode;
                    if (stationManger.IsOccupied != LocationStatusEnum.Free.ObjToInt()) continue;
                    #region ä¸‹å‘出库任务
                    fOURBOTnewMovePodTask.priority = item.Grade;
@@ -459,10 +476,14 @@
                    {
                        unload = 0//是否放下容器,0否1是
                    };
                    fOURBOTnewMovePodTask.desType = 2;
                    fOURBOTnewMovePodTask.taskExt = new
                    {
                        autoToRest = 1
                    };
                    fOURBOTnewMovePodTask.desType = 5;
                    string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize());
                    FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
                    content.Data= fOURBOTReturn;
                    content.Data = fOURBOTReturn;
                    if (fOURBOTReturn.returnCode == 0)
                    {
                        string dataJson = fOURBOTReturn.data.ToString();
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs
@@ -49,9 +49,9 @@
        {
            try
            {
                SendNewTask();
                //SendNewTask();
                SendWaitToTask();
                //SendWaitToTask();
            }
            catch (Exception ex)
            {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TestJob.cs
@@ -11,6 +11,7 @@
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Communicator;
using WIDESEAWCS_Core.Helper;
@@ -21,6 +22,7 @@
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
using WIDESEAWCS_TaskInfoService;
namespace WIDESEAWCS_Tasks
{
@@ -48,25 +50,14 @@
                // _taskService.Repository ä»“储层,进行数据库访问-
                try
                {
                    List<Dt_Task> Uptasks = new List<Dt_Task>();
                    var taskList = _taskService.Repository.QueryData(x => x.TaskType == TaskTypeEnum.CPInbound.ObjToInt() && x.TaskState == TaskStatusEnum.CheckShapeing.ObjToInt());
                    //任务的目标地址对于站台号;
                    foreach (var task in taskList)
                    {
                        ////找到对于站台的管理信息,看看这个站台有没有货,如果有货的话,就进行质检,如果没有货的话,就不进行质检
                        //var  stationMangers = _stationMangerService.Repository.QueryFirst(x => x.StationCode == task.SourceAddress);
                        //device.SetValue(QualityInspectionCommandEnum.StartqualityInspection,true,task.SourceAddress);
                        //如果有货的话,才进行质检,把站台状态该为占用
                        var R_StockAvailableSymbol = device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_StockAvailableSymbol, task.SourceAddress);
                        if (R_StockAvailableSymbol == true)
                        if (device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_QualityInspection, task.SourceAddress))
                        {
                            //stationMangers.IsOccupied=1;//改为占用
                            //开启质检
                            device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
                            //如果读到质检执行中为true的话,就关闭质检
                            if (device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_QualityInspection, task.SourceAddress))
                            {
                                device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, false, task.SourceAddress);
                            }
                            device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, false, task.SourceAddress);
                            //再读取质检结果
                            var qualityResult = device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_QualityInspectionInProgress, task.SourceAddress);
                            //左超宽警告
@@ -75,35 +66,34 @@
                            var R_RightWideWarning = device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_RightWideWarning, task.SourceAddress);
                            //超高警告
                            var R_ExtremeWarning = device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_ExtremeWarning, task.SourceAddress);
                            //写入停止质检信号
                            device.SetValue(QualityInspectionCommandEnum.StopqualityInspection, true, task.SourceAddress);
                            if (qualityResult)
                            {
                                //如果质检通过了,就把任务状态改为质检完成
                                task.TaskState = TaskStatusEnum.CheckShapeingOk.ObjToInt();
                                Uptasks.Add(task);
                            }
                            else if (R_LeftOverWidthWarning)
                            else
                            {
                                task.ExceptionMessage += "质检失败,左超宽";
                                task.TaskState = TaskStatusEnum.CheckShapeingNG.ObjToInt();
                            }
                            else if (R_RightWideWarning)
                            {
                                task.ExceptionMessage += "质检失败,右超宽";
                            }
                            else if (R_ExtremeWarning)
                            {
                                task.ExceptionMessage += "质检失败,超高";
                            }
                            else if (qualityResult == false) //如果质检失败,就复位
                            {
                                task.ExceptionMessage = "质检失败";
                                if (R_LeftOverWidthWarning) task.ExceptionMessage += ",左超宽";
                                if (R_RightWideWarning) task.ExceptionMessage += ",右超宽";
                                if (R_ExtremeWarning) task.ExceptionMessage += ",超高";
                                Uptasks.Add(task);
                                //写入复位信号
                                device.SetValue(QualityInspectionCommandEnum.FaultReset, true, task.SourceAddress);
                            }
                            //写入停止质检信号
                            device.SetValue(QualityInspectionCommandEnum.StopqualityInspection, true, task.SourceAddress);
                        }
                        else
                        {
                            //写入停止质检信号
                            device.SetValue(QualityInspectionCommandEnum.StopqualityInspection, false, task.SourceAddress);
                            device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
                        }
                    }
                    _taskService.UpdateData(Uptasks);
                    WriteInfo(device.DeviceName, "infoLog");
                    WriteDebug(device.DeviceName, "debugLog");
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj
@@ -7,7 +7,7 @@
    </PropertyGroup>
    <ItemGroup>
      <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.9" />
      <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.11" />
    </ItemGroup>
    <ItemGroup>