dengjunjie
2024-11-06 36230cd4dd0ebe5d21eede3eff6216908f7f7a8e
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ShuttleCarJob/ShuttleCarJob.cs
@@ -9,9 +9,9 @@
using System.Threading.Tasks;
using WIDESEAWCS_Common.ShuttleCarEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Common.WMSInfo;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO.WMSInfo;
using WIDESEAWCS_IShuttleCar;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
@@ -26,7 +26,7 @@
namespace WIDESEAWCS_Tasks
{
    [DisallowConcurrentExecution]
    public class CommonShuttleCarJob : IJob
    public class CommonShuttleCarJob : JobBase, IJob
    {
        private readonly ITaskService _taskService;
        private readonly IShuttleCarService _shuttleCarService;
@@ -50,7 +50,7 @@
                ShuttleCar shuttleCar = (ShuttleCar)context.JobDetail.JobDataMap.Get("JobParams");
                if (shuttleCar != null)
                {
                    ShuttleCarTaskCommandR command = shuttleCar.ReadCustomer<ShuttleCarTaskCommandR>(shuttleCar.DeviceCode);//读取穿梭车信息
                    ShuttleCarTaskCommandR command = shuttleCar.Communicator.ReadCustomer<ShuttleCarTaskCommandR>(shuttleCar.DeviceCode);//读取穿梭车信息
                    if (command != null && command.JoinStatus == 1)
                    {
                        #region ç©¿æ¢­è½¦ä»»åŠ¡å®Œæˆ
@@ -109,7 +109,7 @@
                            {
                                #region å‘WMS申请
                                WebResponseContent content = new WebResponseContent();
                                var ResultData = HttpHelper.PostAsync(WMSIP.GetPosition + $"?position={dt_Task.SourceAddress}", "", headers: new Dictionary<string, string>());
                                var ResultData = HttpHelper.PostAsync(WMSInterfaceAddress.GetPosition + $"?position={dt_Task.SourceAddress}", "", headers: new Dictionary<string, string>());
                                if (ResultData.Result != null)
                                {
                                    content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result);
@@ -187,7 +187,7 @@
            ShuttleCar shuttleCar = Storage.Devices.FirstOrDefault(x => x.DeviceCode == task.ShuttleCarCode) as ShuttleCar;
            if (shuttleCar != null)
            {
                ShuttleCarTaskCommandR command = shuttleCar.ReadCustomer<ShuttleCarTaskCommandR>(shuttleCar.DeviceCode);//读取穿梭车信息
                ShuttleCarTaskCommandR command = shuttleCar.Communicator.ReadCustomer<ShuttleCarTaskCommandR>(shuttleCar.DeviceCode);//读取穿梭车信息
                if (command != null && command.Status == (short)ShuttleCarStatus.Standby && command.TaskTypeComplete == (short)ShuttleCarTaskComplete.Standby && command.Err_Status == (short)ShuttleCarErr.Normal)
                {
                    //任务转换
@@ -222,7 +222,7 @@
                    }
                }
                ///退出充电任务??????????????????????????????????????
                ///下发退出充电任务并生成移库任务
                if (command.ElectricQuantity > 50)
                {