From 457b75b642a1fdaa7158e5b047cabc5d7ae16333 Mon Sep 17 00:00:00 2001
From: xxyy <cathay_xy@163.com>
Date: 星期一, 10 三月 2025 10:10:13 +0800
Subject: [PATCH] 修复和优化 Dt_TaskService.cs 中的任务请求逻辑
---
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
index 49aa330..909b441 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -1,12 +1,9 @@
锘縰sing AutoMapper;
using HslCommunication;
using Mapster;
-using Microsoft.AspNetCore.Components.Routing;
using Newtonsoft.Json;
-using Oracle.ManagedDataAccess.Types;
using SqlSugar;
using System.Diagnostics.CodeAnalysis;
-using System.Threading.Tasks;
using WIDESEAWCS_BasicInfoRepository;
using WIDESEAWCS_BasicInfoService;
using WIDESEAWCS_Common;
@@ -21,13 +18,9 @@
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;
-using WIDESEAWCS_TaskInfo_HtyRepository;
-using WIDESEAWCS_TaskInfoRepository;
namespace WIDESEAWCS_TaskInfoService
{
@@ -100,7 +93,7 @@
if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
{
// 鍒ゆ柇浠诲姟鐩爣鍦板潃鍜岃矾寰勬槸鍚︽弧瓒崇壒瀹氭潯浠�
- if (task.TargetAddress == "002-021-001" && task.Roadway.Contains("JZ") && task.TaskType == (int)TaskOutboundTypeEnum.OutTray)
+ if ((task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001") && task.Roadway.Contains("JZ"))
{
// 璁剧疆浠诲姟鐘舵�佷负鍑哄簱鏂板缓
task.TaskState = (int)TaskOutStatusEnum.OutNew;
@@ -221,7 +214,7 @@
wmsIpAddrss = GetIpAddress(SysConfigKeyConst.WMSIP_BASE, SysConfigKeyConst.RequestTask);
}
- var result = await HttpHelper.PostAsync(wmsIpAddrss, new { Position = sourceAddress, PalletCode = palletCode }.ToJsonString());
+ var result = await HttpHelper.PostAsync(wmsIpAddrss, new { Position = sourceAddress, PalletCode = palletCode, stationManager.productLine }.ToJsonString());
content = JsonConvert.DeserializeObject<WebResponseContent>(result);
if (!content.Status)
@@ -515,13 +508,11 @@
_taskHtyRepository.AddData(task_Hty);
}
-
if (task.TaskState == (int)TaskOutStatusEnum.SC_OutFinish)
{
content = StackCraneTaskCompleted(task.TaskNum);
return content;
}
-
}
else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
{
@@ -577,7 +568,6 @@
content = StackCraneTaskCompleted(task.TaskNum);
return content;
}
-
task.ModifyDate = DateTime.Now;
task.Modifier = "System";
@@ -893,6 +883,7 @@
}
return wcsBasez + address;
}
+
#region 閲嶅啓鏂规硶
public override WebResponseContent DeleteData(object[] key)
@@ -906,7 +897,7 @@
}
return base.DeleteData(key);
}
-
- #endregion
+
+ #endregion 閲嶅啓鏂规硶
}
}
\ No newline at end of file
--
Gitblit v1.9.3