肖洋
2024-12-10 578c0eefb1f2e945c4d22ddcd1ab5d20b9c036f6
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -1,6 +1,8 @@

using AutoMapper;
using HslCommunication;
using Mapster;
using Microsoft.AspNetCore.Components.Routing;
using Newtonsoft.Json;
using SqlSugar;
using System.Diagnostics.CodeAnalysis;
@@ -19,6 +21,8 @@
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_QuartzJob.Service;
@@ -602,8 +606,11 @@
                    else
                    {
                        task.TaskState = (int)TaskOutStatusEnum.OutFinish;
                        BaseDal.UpdateData(task);
                        BaseDal.DeleteData(task);
                        ConsoleHelper.WriteWarningLine($"高温出库目的地址{task.TargetAddress}");
                        var taskHty = task.Adapt<Dt_Task_Hty>();
                        _taskHtyRepository.AddData(taskHty);
                        _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"堆垛机出库完成");
                    }
@@ -748,5 +755,10 @@
            }
            return content;
        }
        public Dt_Task QueryRelocationTask(string deviceNo)
        {
            return BaseDal.QueryFirst(x => x.Roadway == deviceNo && x.TaskType == (int)TaskRelocationTypeEnum.Relocation && x.TaskState == (int)TaskStatus.Created);
        }
    }
}