已添加1个文件
已修改14个文件
315 ■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/ApiInfoService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/HKLocationInfoService.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WMS/PLCAlarmDTO.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IHKLocationInfoService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/KHAGVController.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TSJExtend.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TSJJob.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TestExtend.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/ApiInfoService.cs
@@ -46,7 +46,7 @@
                response = HttpHelper.Post(apiInfo.ApiAddress, requestParameters);
                requestHash = ComputeHash(requestParameters);
                responseHash = ComputeHash(response);
                if (apiInfo.Remark.Contains("四向车"))
                if (apiInfo.Remark.Contains("四向穿梭车"))
                {
                    FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
                    if (fOURBOTReturn == null) throw new Exception($"{apiInfo.Remark}响应内容转换实体失败!");
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/HKLocationInfoService.cs
@@ -27,10 +27,11 @@
        };
        public IRepository<Dt_HKLocationInfo> Repository => BaseDal;
        public Dt_HKLocationInfo? GetFreeLocationInfo(string toAreaCode)
        public Dt_HKLocationInfo? GetFreeLocationInfo(string toAreaCode, int containerType)
        {
            Dt_HKLocationInfo hKLocationInfo = BaseDal.QueryFirst(x => x.WarehouseId.ToString() == toAreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt(), _emptyAssignOrderBy);
            Dt_HKLocationInfo hKLocationInfo = BaseDal.QueryFirst(x => x.WarehouseId.ToString() == toAreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == containerType, _emptyAssignOrderBy);
            return hKLocationInfo;
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WMS/PLCAlarmDTO.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEAWCS_DTO.WMS
{
    public class PLCAlarmDTO
    {
        /// <summary>
        /// æŠ¥è­¦ä¿¡æ¯
        /// </summary>
        public string errorMsg { get; set; }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IHKLocationInfoService.cs
@@ -13,6 +13,6 @@
    {
        public IRepository<Dt_HKLocationInfo> Repository { get; }
        Dt_HKLocationInfo? GetFreeLocationInfo(string toAreaCode);
        Dt_HKLocationInfo? GetFreeLocationInfo(string toAreaCode, int containerType);
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -336,5 +336,11 @@
        /// <returns></returns>
         WebResponseContent HKDeviceAlarm(HKDeviceAalarmDTO hKDeviceAalarmDTO);
        WebResponseContent PLCAlarmtoWMS(string ErrorMsg);
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/KHAGVController.cs
@@ -3,7 +3,9 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEAWCS_Common;
using WIDESEAWCS_DTO;
using WIDESEAWCS_DTO.AGV.HIKROBOT;
using WIDESEAWCS_DTO.RGV.FOURBOT;
using WIDESEAWCS_DTO.WMS;
using WIDESEAWCS_ITaskInfoService;
namespace WIDESEAWCS_Server.Controllers.AGV
@@ -41,5 +43,31 @@
            return returnHK;
        }
        /// <summary>
        /// æµ·åº·è®¾å¤‡æŠ¥è­¦æŽ¥å£
        /// </summary>
        /// <param name="taskDTOs"></param>
        /// <returns></returns>
        [HttpPost, Route("HKDeviceAlarm"), AllowAnonymous]
        public HIKROBOTReturn HKDeviceAlarm([FromBody]HKDeviceAalarmDTO hKDeviceAalarmDTO)
        {
            HIKROBOTReturn returnHK = new HIKROBOTReturn();
            var take = _taskService.HKDeviceAlarm(hKDeviceAalarmDTO);
            if (take.Status)
            {
                returnHK.code = "SUCCESS";
                returnHK.message = "succ";
            }
            else
            {
                returnHK.code = "404";
                returnHK.message = take.Message;
            }
            return returnHK;
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs
@@ -34,6 +34,7 @@
            try
            {
                Dt_HKLocationInfo? hKLocationInfo = null;
                int containerType = taskDTO.containerCode.Contains("LXM") ? (int)LocationTypeEnum.LargePallet : (int)LocationTypeEnum.SmallPallet;
                if (taskType == (int)TaskTypeEnum.STURR)
                {
                    var reslut = _stationInfo.Repository.QueryFirst(x => x.StationCode == taskDTO.fromLocationCode) ?? throw new Exception($"未找到起点货位【{taskDTO.fromLocationCode}】");
@@ -47,7 +48,7 @@
                #endregion
                //获取货位信息
                else
                    hKLocationInfo = _hKLocationInfoService.GetFreeLocationInfo(taskDTO.toAreaCode) ?? throw new Exception($"未找到终点库区【{taskDTO.toAreaCode}】可用空货位!");
                    hKLocationInfo = _hKLocationInfoService.GetFreeLocationInfo(taskDTO.toAreaCode, containerType) ?? throw new Exception($"未找到终点库区【{taskDTO.toAreaCode}】可用空货位!");
                if (taskType == (int)TaskTypeEnum.Q1TSJ4)
                {
                    var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "TSJ") as OtherDevice;
@@ -466,6 +467,11 @@
        /// <summary>
        /// æµ·åº·è®¾å¤‡æŠ¥è­¦
        /// </summary>
        /// <param name="hKDeviceAalarmDTO"></param>
        /// <returns></returns>
        public WebResponseContent HKDeviceAlarm(HKDeviceAalarmDTO hKDeviceAalarmDTO)
        {
            WebResponseContent content = new WebResponseContent();
@@ -485,7 +491,7 @@
                    extra = hKDeviceAalarmDTO.extra,
                };
                string response = HttpHelper.Post(apiInfo.ApiAddress, hIKROBOTDeviceAlarm.Serialize());
                string response = HttpHelper.Post(apiInfo.ApiAddress,hIKROBOTDeviceAlarm.Serialize());
                wMSReturn = response.DeserializeObject<WMSReturn>();
                if (wMSReturn.success == true && wMSReturn.message == "success")
                {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs
@@ -102,36 +102,39 @@
                                //入提升机
                                if (task.TaskType == TaskTypeEnum.RK3F.ObjToInt() && task.TaskState == (int)TaskStatusEnum.CheckPalletCodeFinish)
                                {
                                    var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "TSJ") as OtherDevice;
                                    if (device == null) task.ExceptionMessage = "未找到提升机信息";
                                    else
                                    if (task.CurrentAddress==task.TargetAddress)
                                    {
                                        bool Work = false;
                                        try
                                        var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "TSJ") as OtherDevice;
                                        if (device == null) task.ExceptionMessage = "未找到提升机信息";
                                        else
                                        {
                                            if (device.IsConnected)
                                            bool Work = false;
                                            try
                                            {
                                                int i = 0;
                                                while (!Work && i <= 3)
                                                if (device.IsConnected)
                                                {
                                                    i++;
                                                    Work = device.SetValue(HoistEnum.Inboundboxon, 1, task.TargetAddress);
                                                    Thread.Sleep(500);
                                                    int i = 0;
                                                    while (!Work && i <= 3)
                                                    {
                                                        i++;
                                                        Work = device.SetValue(HoistEnum.Inboundboxon, 1, task.CurrentAddress);
                                                        Thread.Sleep(500);
                                                    }
                                                }
                                                if (!Work)
                                                {
                                                    task.ExceptionMessage = $"【{task.CurrentAddress}】写入3楼入库箱放到位失败";
                                                    task.Remark = $"{device.DeviceCode}_Inboundboxon_{1}_{task.CurrentAddress}";
                                                }
                                            }
                                            if (!Work)
                                            catch (Exception ex)
                                            {
                                                task.ExceptionMessage = $"【{task.TargetAddress}】写入3楼入库箱放到位失败";
                                                task.Remark = $"{device.DeviceCode}_Inboundboxon_{1}_{task.TargetAddress}";
                                                task.ExceptionMessage = $"【{task.CurrentAddress}】写入3楼入库箱放到位失败!{ex.Message}";
                                                task.Remark = $"{device.DeviceCode}_Inboundboxon_{1}_{task.CurrentAddress}";
                                            }
                                        }
                                        catch (Exception ex)
                                        {
                                            task.ExceptionMessage = $"【{task.TargetAddress}】写入3楼入库箱放到位失败!{ex.Message}";
                                            task.Remark = $"{device.DeviceCode}_Inboundboxon_{1}_{task.TargetAddress}";
                                        }
                                        BaseDal.UpdateData(task);
                                    }
                                    BaseDal.UpdateData(task);
                                }
                                //3 å‡ºæå‡æœº ä¹‹å‰æ˜¯AGV_ToExecute
@@ -165,7 +168,7 @@
                                            task.ExceptionMessage = $"【{task.SourceAddress}】写入3楼出库箱放到位失败{ex.Message}";
                                            task.Remark = $"{device.DeviceCode}_Outboundboxon_{1}_{task.SourceAddress}"; throw;
                                        }
                                    }
                                    BaseDal.UpdateData(task);
                                }
@@ -201,7 +204,7 @@
                                            task.ExceptionMessage = $"【{task.TargetAddress}】写入4楼空箱放到位失败{ex.Message}";
                                            task.Remark = $"{device.DeviceCode}_Emptyboxplacedinposition_{1}_{task.TargetAddress}";
                                        }
                                    }
                                    BaseDal.UpdateData(task);
                                }
@@ -237,7 +240,7 @@
                                            task.ExceptionMessage = $"【{task.SourceAddress}】写入4楼出库取箱完成失败{ex.Message}";
                                            task.Remark = $"{device.DeviceCode}_Outboundboxretrievalcompleted_{1}_{task.SourceAddress}";
                                        }
                                    }
                                    BaseDal.UpdateData(task);
                                }
@@ -274,7 +277,7 @@
                                            task.ExceptionMessage = $"【{Address}】关闭请求进入失败!{ex.Message}";
                                            task.Remark = $"{device.DeviceCode}_RequestToEnter_{false}_{Address}";
                                        }
                                    }
                                    BaseDal.UpdateData(task);
                                }
@@ -318,7 +321,7 @@
                                        task.ExceptionMessage = $"【TSJR3F】3楼读码触发失败!{ex.Message}";
                                        task.Remark = $"{device.DeviceCode}_Codereadingtriggered_{1}_TSJR3F";
                                    }
                                }
                                task.TaskState = (int)TaskStatusEnum.CheckPalletCodeing;
                                BaseDal.UpdateData(task);
@@ -375,7 +378,7 @@
                    var task = BaseDal.QueryFirst(x => x.PalletCode == Rgv.content.podID);
                    if (task == null) throw new Exception($"未找到任务,任务编号【{Rgv.content.taskID}】");
                    //移库
                    if (task.TaskType == TaskTypeEnum.CPMoveInventory.ObjToInt())
                    if (task.TaskType == TaskTypeEnum.CPMoveInventory.ObjToInt() && string.IsNullOrEmpty(task.WMSTaskNum))
                    {
                        if (Rgv.messageType == 72)
                        {
@@ -419,15 +422,18 @@
                            if (task.TaskType == (int)TaskTypeEnum.CPInbound && task.TaskState == (int)TaskStatusEnum.Execut)
                            {
                                task.TaskState = (int)TaskStatusEnum.WaiCheckShape;
                                //BaseDal.UpdateData(task);//给质检门写入启动信号
                                var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "F1") as OtherDevice;
                                if (device == null) task.ExceptionMessage = "未找到1楼质检门设备信息";
                                else
                                if (task.SourceAddress != "OUT-01")
                                {
                                    if (device.IsConnected)
                                        device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
                                    //BaseDal.UpdateData(task);//给质检门写入启动信号
                                    var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "F1") as OtherDevice;
                                    if (device == null) task.ExceptionMessage = "未找到1楼质检门设备信息";
                                    else
                                        task.ExceptionMessage = "1楼质检门设备连接失败";
                                    {
                                        if (device.IsConnected)
                                            device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
                                        else
                                            task.ExceptionMessage = "1楼质检门设备连接失败";
                                    }
                                }
                                TaskFeedback(task, 4);
                            }
@@ -684,7 +690,7 @@
                    {
                        if (locationStatusEnum == LocationStatusEnum.Free) //如果起点完成就给货位赋值托盘号
                        {
                            stationManger.Remark ="";
                            stationManger.Remark = "";
                            stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt();
                        }
                        else
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -1286,6 +1286,7 @@
        {
            throw new NotImplementedException();
        }
        public WebResponseContent InboundElevatorExit(string LocationCode, string containerCode)
        {
            WebResponseContent content = new WebResponseContent();
@@ -1405,6 +1406,7 @@
                {
                    stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt();
                    stationManger.Remark = "";
                    _stationMangerService.UpdateData(stationManger);
                    FOURBOToccupyStation fOURBOToccupyStation = new FOURBOToccupyStation()
                    {
                        stationCode = wMSContainerFlow.slotCode,
@@ -1413,7 +1415,6 @@
                    FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
                    content.OK(data: fOURBOTReturn);
                    if (fOURBOTReturn.returnCode != 0) throw new Exception(fOURBOTReturn.returnUserMsg);
                    _stationMangerService.UpdateData(stationManger);
                }
                return content.OK();
            }
@@ -1868,5 +1869,36 @@
                return content.Error($"更新站台状态失败:{ex.Message}");
            }
        }
        /// <summary>
        /// PLC报警信息
        /// </summary>
        /// <param name="ErrorMsg"></param>
        /// <returns></returns>
        public WebResponseContent PLCAlarmtoWMS(string ErrorMsg)
        {
            PLCAlarmDTO PLCAlarmDTO = new PLCAlarmDTO();
            WebResponseContent content = new WebResponseContent();
            try
            {
                Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(PLCAlarmDTO)) ?? throw new Exception("未找到PLC报警信息接口配置信息!请检查接口配置");
                PLCAlarmDTO.errorMsg = ErrorMsg;
                string response = HttpHelper.Post(apiInfo.ApiAddress, PLCAlarmDTO.Serialize());
                content.OK(data: response);
                WMSReturn wMSReturn = response.DeserializeObject<WMSReturn>();
                if (wMSReturn == null) throw new Exception("WMS返回结果转换失败!");
                if (!wMSReturn.success) throw new Exception(wMSReturn.message);
               return content.OK();
            }
            catch (Exception ex)
            {
                return content.Error(ex.Message);
            }
            finally
            {
                _trackloginfoService.AddTrackLog(PLCAlarmDTO, content, "PLC报警信息上报WMS", "", "");
            }
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TSJExtend.cs
@@ -207,6 +207,11 @@
                                RK3FTask.TargetAddress = Location.StationCode;
                                _taskService.UpdateData(RK3FTask);
                            }
                            else //成功
                            {
                                RK3FTask.CurrentAddress = RK3FTask.TargetAddress;
                                _taskService.UpdateData(RK3FTask);
                            }
                            //调用海康进行执行完成接口
                            var result = _taskService.Hikvisiontaskscontinue(RK3FTask.WMSTaskNum, RK3FTask.NextAddress);
                            if (result.Status)
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TSJJob.cs
@@ -54,6 +54,8 @@
                PalletNumConfirmation(device);
                PalletReportingToWMS(device);
                TSJAlarm(device);
            }
            else
            {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs
@@ -4,6 +4,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common;
@@ -164,7 +165,7 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                List<Dt_Task> dt_Tasks = new List<Dt_Task>();
                //List<Dt_Task> dt_Tasks = new List<Dt_Task>();
                var PalletCodes = tasks.Select(x => x.PalletCode).ToList();
                var request = new GetBlockPodContentListDto
                {
@@ -221,34 +222,69 @@
                        _taskService.UpdateData(tasks);
                        return;
                    }
                    foreach (var Result in getBlockPod.Result)
                    #region åˆ¤æ–­æ˜¯å¦éœ€è¦ç§»åº“
                    foreach (var task in tasks)
                    {
                        foreach (var item in Result.outPods)
                        var item = getBlockPod.Result[0].outPods.FirstOrDefault(x => x.outPod == task.PalletCode);
                        if (item != null)
                        {
                            var task = tasks.First(x => x.PalletCode == item.outPod);
                            if (item.blockPods != null && item.blockPods.Count > 0)
                                item.blockPods = item.blockPods.Except(PalletCodes).ToList();
                            if (item.blockPods != null && item.blockPods.Count > 0)
                            {
                                #region åˆ¤æ–­é˜»ç¢æ‰˜æ˜¯å¦ä¸ºå‡ºåº“任务
                                //var except = item.blockPods.Except(PalletCodes).ToList();
                                #endregion
                                var responseContent = AddMoveTask(item.blockPods, task);//添加移库任务
                                if (!responseContent.Status) task.ExceptionMessage = responseContent.Message;
                                else
                                {
                                    task.TaskState = (int)TaskStatusEnum.RGV_WaitMoveToExecute;
                                }
                                dt_Tasks.Add(task);
                                else task.TaskState = (int)TaskStatusEnum.RGV_WaitMoveToExecute;
                                #region ç§»åº“状态反馈给WMS
                                WMSInOutBoundCompleteFeedback boundCompleteFeedback = new WMSInOutBoundCompleteFeedback();
                                boundCompleteFeedback.taskCode = task.WMSTaskNum;
                                boundCompleteFeedback.containerCode = task.PalletCode;
                                boundCompleteFeedback.fromStationCode = task.SourceAddress;
                                boundCompleteFeedback.toLocationCode = task.TargetAddress;
                                boundCompleteFeedback.status = 5;
                                boundCompleteFeedback.custStatus = "";
                                _apiInfoService.PostInterfaceRequest(nameof(WMSInOutBoundCompleteFeedback), boundCompleteFeedback.Serialize(), "成品出库任务等待移库上报WMS");
                                #endregion
                            }
                            else
                            {
                                task.TaskState = (int)TaskStatusEnum.RGV_WaitSend;
                                dt_Tasks.Add(task);
                            }
                        }
                        else task.ExceptionMessage = $"RCS未反馈【{task.PalletCode}】可出库托盘信息,详情请查看批量获取阻碍托盘关系接口日志!";
                    }
                    _taskService.UpdateData(dt_Tasks);
                    _taskService.Repository.UpdateData(tasks);
                    #endregion
                    #region MyRegion
                    //foreach (var Result in getBlockPod.Result)
                    //{
                    //    foreach (var item in Result.outPods)
                    //    {
                    //        var task = tasks.First(x => x.PalletCode == item.outPod);
                    //        if (item.blockPods != null && item.blockPods.Count > 0)
                    //            item.blockPods = item.blockPods.Except(PalletCodes).ToList();
                    //        if (item.blockPods != null && item.blockPods.Count > 0)
                    //        {
                    //            #region åˆ¤æ–­é˜»ç¢æ‰˜æ˜¯å¦ä¸ºå‡ºåº“任务
                    //            //var except = item.blockPods.Except(PalletCodes).ToList();
                    //            #endregion
                    //            var responseContent = AddMoveTask(item.blockPods, task);//添加移库任务
                    //            if (!responseContent.Status) task.ExceptionMessage = responseContent.Message;
                    //            else
                    //            {
                    //                task.TaskState = (int)TaskStatusEnum.RGV_WaitMoveToExecute;
                    //            }
                    //            dt_Tasks.Add(task);
                    //        }
                    //        else
                    //        {
                    //            task.TaskState = (int)TaskStatusEnum.RGV_WaitSend;
                    //            dt_Tasks.Add(task);
                    //        }
                    //    }
                    //}
                    //_taskService.UpdateData(dt_Tasks);
                    #endregion
                    content.OK();
                }
            }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs
@@ -7,9 +7,12 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DTO;
namespace WIDESEAWCS_Tasks
{
@@ -44,7 +47,7 @@
                    //#endregion
                    #region ä¸‹å‘海康1到6楼的AGV任务/下发海康6到1楼的AGV任务
                    Tasks = newTasks.Where(x => (x.TaskType == (int)TaskTypeEnum.Q3CK) || x.TaskType == (int)TaskTypeEnum.Q3RK||x.TaskType==(int)TaskTypeEnum.F01).OrderByDescending(x => x.Grade).ToList();
                    Tasks = newTasks.Where(x => (x.TaskType == (int)TaskTypeEnum.Q3CK) || x.TaskType == (int)TaskTypeEnum.Q3RK || x.TaskType == (int)TaskTypeEnum.F01).OrderByDescending(x => x.Grade).ToList();
                    if (Tasks.Count > 0) SendAGVTask(Tasks);
@@ -126,5 +129,35 @@
            }
        }
        #endregion
        /// <summary>
        /// å¤„理写入设备信号异常任务
        /// </summary>
        public void HandleTasks()
        {
            #region
            var tasks = _taskService.Repository.QueryData(x => x.TaskState == TaskStatusEnum.Finish.ObjToInt() && !string.IsNullOrEmpty(x.Remark));
            if (tasks.Count > 0)
            {
                List<Dt_Task> list = new List<Dt_Task>();
                foreach (var item in tasks)
                {
                    var infos = item.Remark.Split("_");
                    var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == infos[0]) as OtherDevice;
                    if (device != null && device.IsConnected)
                    {
                        DeviceProDTO? devicePro = device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == infos[1] && x.DeviceChildCode == infos[3]);
                        if (devicePro != null)
                        {
                            var W = device.Communicator.WriteObj(devicePro.DeviceProAddress, devicePro.DeviceDataType, infos[2]);
                            if (W) list.Add(item);
                        }
                    }
                }
                _taskService.Repository.DeleteAndMoveIntoHty(list, OperateTypeEnum.自动删除);
            }
            #endregion
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs
@@ -11,6 +11,7 @@
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_BasicInfoService;
@@ -61,28 +62,8 @@
                SendWaitToTask();
                #region å¤„理写入设备信号异常任务
                var tasks = _taskService.Repository.QueryData(x => x.TaskState == TaskStatusEnum.Finish.ObjToInt() && !string.IsNullOrEmpty(x.Remark));
                if (tasks.Count > 0)
                {
                    List<Dt_Task> list = new List<Dt_Task>();
                    foreach (var item in tasks)
                    {
                        var infos = item.Remark.Split("_");
                        var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == infos[0]) as OtherDevice;
                        if (device != null && device.IsConnected)
                        {
                            DeviceProDTO? devicePro = device.DeviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == infos[1] && x.DeviceChildCode == infos[3]);
                            if (devicePro != null)
                            {
                                var W = device.Communicator.WriteObj(devicePro.DeviceProAddress, devicePro.DeviceDataType, infos[2]);
                                if (W) list.Add(item);
                            }
                        }
                    }
                    _taskService.Repository.DeleteAndMoveIntoHty(list, OperateTypeEnum.自动删除);
                }
                #endregion
                HandleTasks();
            }
            catch (Exception ex)
            {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TestExtend.cs
@@ -26,6 +26,13 @@
            //任务的目标地址对于站台号;
            foreach (var task in taskList)
            {
                if (task.SourceAddress == "OUT-01")
                {
                    task.TaskState = TaskStatusEnum.CheckShapeingOk.ObjToInt();
                    task.ExceptionMessage = "";
                    Uptasks.Add(task);
                    continue;
                }
                if (device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_QualityInspection, task.SourceAddress))
                {
                    device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, false, task.SourceAddress);