From 761260f2ac0aa211625c8904cc86fc2400a8adfc Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 04 三月 2026 16:56:57 +0800
Subject: [PATCH] 1
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs | 22 ++++-
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/HKTaskExtend.cs | 64 ++++++++++++++-
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/HIKROBOT/HIKROBOTReturn.cs | 5
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs | 2
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs | 8 +
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs | 2
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WMS/IQCResultDTO.cs | 23 +++++
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json | 2
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs | 46 ++++++++---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 10 ++
10 files changed, 156 insertions(+), 28 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs"
index 9c4e227..f702aca 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs"
@@ -97,16 +97,30 @@
#region 娴峰悍AGV鍏朵粬浠诲姟鐘舵��
/// <summary>
+ /// AGV寰呯户缁墽琛�,AGV寰呰繘鍏ヨ緭閫佺嚎鍙�
+ /// </summary>
+ [Description("AGV寰呯户缁墽琛�")]
+ AGV_WaitToExecute,
+ /// <summary>
+ /// AGV杩涘叆杈撻�佺嚎鍙d腑
+ /// </summary>
+ [Description("AGV杩涘叆杈撻�佺嚎鍙d腑")]
+ AGV_ToExecute,
+ /// <summary>
/// 鎵樼洏鍙风‘璁や腑
/// </summary>
[Description("鎵樼洏鍙风‘璁や腑")]
CheckPalletCodeing,
-
/// <summary>
- /// AGV寰呯户缁墽琛�
+ /// 鎵樼洏鍙风‘璁ゅ畬鎴�
/// </summary>
- [Description("AGV寰呯户缁墽琛�")]
- AGV_WaitToExecute,
+ [Description("鎵樼洏鍙风‘璁ゅ畬鎴�")]
+ CheckPalletCodeFinish,
+ ///// <summary>
+ ///// AGV鍙�/鏀捐揣涓�
+ ///// </summary>
+ //[Description("AGV鍙�/鏀捐揣涓�")]
+ //AGV_ToPuting,
#endregion
#region 鍥涘悜杞﹀叾浠栦换鍔$姸鎬�
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/HIKROBOT/HIKROBOTReturn.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/HIKROBOT/HIKROBOTReturn.cs"
index 7a9906a..1559d2a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/HIKROBOT/HIKROBOTReturn.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/AGV/HIKROBOT/HIKROBOTReturn.cs"
@@ -1,4 +1,5 @@
锘縰sing Newtonsoft.Json;
+using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -15,8 +16,8 @@
/// <summary>
/// 杩斿洖鐮�
/// </summary>
- public int code { get; set; }
- public bool message { get; set; }
+ public string code { get; set; }
+ public string message { get; set; }
public object data { get; set; }
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WMS/IQCResultDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WMS/IQCResultDTO.cs"
new file mode 100644
index 0000000..2b86a76
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WMS/IQCResultDTO.cs"
@@ -0,0 +1,23 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEAWCS_DTO.WMS
+{
+ /// <summary>
+ /// 璐ㄦ缁撴灉鍙嶉
+ /// </summary>
+ public class IQCResultDTO
+ {
+ /// <summary>
+ /// 绔欏彴鍙�
+ /// </summary>
+ public string StationCode { get; set; }
+ /// <summary>
+ /// 鏂欑鏉$爜
+ /// </summary>
+ public string ContainerCode { get; set; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
index 12a656e..89a87b4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
@@ -274,5 +274,7 @@
/// <param name="wMSMoveLocationFeedback"></param>
/// <returns></returns>
public WebResponseContent WcsMovingDataBack(WMSMoveLocationFeedback wMSMoveLocationFeedback);
+ WebResponseContent ContainerRequest(WMSContainerFlow wMSContainerFlow);
+ WebResponseContent IQCResult(IQCResultDTO iQC);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
index 2fac1c4..78c2736 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_Task.cs"
@@ -150,7 +150,7 @@
public DateTime? Dispatchertime { get; set; }
/// <summary>
- /// 澶囨敞
+ /// 澶囨敞,娴峰悍AGV浠诲姟鍙�
/// </summary>
[ImporterHeader(Name = "澶囨敞")]
[ExporterHeader(DisplayName = "澶囨敞")]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
index 1edd6ad..fdc28a3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
@@ -22,10 +22,6 @@
_stationMangerService = stationMangerService;
}
-
-
-
-
/// <summary>
/// WMS涓嬪彂浠诲姟
/// </summary>
@@ -35,6 +31,18 @@
public WMSReturn ReceiveWMSTask([FromBody] List<WMSTasksDTO> taskDTOs)
{
WebResponseContent content = _taskService.ReceiveWMSTask(taskDTOs);
+ return WMSReturnMethod.ReturnWMS(content);
+ }
+
+ /// <summary>
+ /// 瀹瑰櫒娴佸姩璇锋眰
+ /// </summary>
+ /// <param name="taskDTOs"></param>
+ /// <returns></returns>
+ [HttpPost, Route("ContainerRequest"), AllowAnonymous]
+ public WMSReturn ContainerRequest([FromBody] WMSContainerFlow wMSContainerFlow)
+ {
+ WebResponseContent content = _taskService.ContainerRequest(wMSContainerFlow);
return WMSReturnMethod.ReturnWMS(content);
}
@@ -51,14 +59,14 @@
}
/// <summary>
- /// 淇敼浠诲姟浼樺厛绾�
+ /// 璐ㄦ缁撴灉鍙嶉
/// </summary>
- /// <param name="updateTaskPriority"></param>
+ /// <param name="iQC"></param>
/// <returns></returns>
- [HttpPost, Route("UpdateWMSTaskPriority"), AllowAnonymous]
- public WMSReturn UpdateWMSTaskPriority([FromBody] WMSUpdateTaskPriority updateTaskPriority)
+ [HttpPost, Route("IQCResult"), AllowAnonymous]
+ public WMSReturn IQCResult([FromBody] IQCResultDTO iQC)
{
- WebResponseContent content = _taskService.UpdateWMSTaskPriority(updateTaskPriority);
+ WebResponseContent content = _taskService.IQCResult(iQC);
return WMSReturnMethod.ReturnWMS(content);
}
@@ -67,10 +75,22 @@
/// </summary>
/// <param name="WMSUpdateLocationArea"></param>
/// <returns></returns>
- [HttpPost, Route("ModifyWMSLayoutZone"), AllowAnonymous]
- public WMSReturn ModifyWMSLayoutZone([FromBody] WMSUpdateLocationArea wMSUpdateLocationArea)
+ [HttpPost, Route("UpdateArea"), AllowAnonymous]
+ public WMSReturn UpdateArea([FromBody] WMSUpdateLocationArea wMSUpdateLocationArea)
{
WebResponseContent content = _taskService.ModifyWMSLayoutZone(wMSUpdateLocationArea);
+ return WMSReturnMethod.ReturnWMS(content);
+ }
+
+ /// <summary>
+ /// 淇敼浠诲姟浼樺厛绾�
+ /// </summary>
+ /// <param name="updateTaskPriority"></param>
+ /// <returns></returns>
+ [HttpPost, Route("UpdateTaskGrade"), AllowAnonymous]
+ public WMSReturn UpdateTaskGrade([FromBody] WMSUpdateTaskPriority updateTaskPriority)
+ {
+ WebResponseContent content = _taskService.UpdateWMSTaskPriority(updateTaskPriority);
return WMSReturnMethod.ReturnWMS(content);
}
@@ -79,8 +99,8 @@
/// </summary>
/// <param name="AreaCode">鍖哄煙鍙�</param>
/// <returns></returns>
- [HttpPost, Route("LocationInquiry"), AllowAnonymous]
- public WMSReturn LocationInquiry(string AreaCode)
+ [HttpPost, Route("QueryStation"), AllowAnonymous]
+ public WMSReturn QueryStation(string AreaCode)
{
WebResponseContent content = _taskService.LocationInquiry(AreaCode);
return WMSReturnMethod.ReturnWMS(content);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
index c18c31b..2ac621f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
@@ -33,7 +33,7 @@
"DBSeedEnable": false,
"QuartzDBSeedEnable": false,
"LogDeubgEnable": true, //鏄惁璁板綍璋冭瘯鏃ュ織
- "PrintSql": true, //鎵撳嵃SQL璇彞
+ "PrintSql": false, //鎵撳嵃SQL璇彞
"LogAOPEnable": true, //鏄惁璁板綍AOP鏃ュ織
"WebSocketEnable": true, //鏄惁寮�鍚疻ebSocket鏈嶅姟
"WebSocketPort": 9296 //WebSocket鏈嶅姟绔彛
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 2df98a2..8fc1547 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -966,5 +966,15 @@
{
throw new NotImplementedException();
}
+
+ public WebResponseContent ContainerRequest(WMSContainerFlow wMSContainerFlow)
+ {
+ throw new NotImplementedException();
+ }
+
+ public WebResponseContent IQCResult(IQCResultDTO iQC)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/HKTaskExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/HKTaskExtend.cs"
index f3da0ab..2c3ae55 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/HKTaskExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/HKTaskExtend.cs"
@@ -5,7 +5,10 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_DTO;
using WIDESEAWCS_DTO.AGV.HIKROBOT;
+using WIDESEAWCS_DTO.RGV.FOURBOT;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_Tasks
@@ -13,25 +16,73 @@
public partial class TaskJob
{
#region 澶勭悊娴峰悍AGV浠诲姟
+ /// <summary>
+ /// 澶勭悊娴峰悍涓嶅悓绫诲瀷鐨勪换鍔★紝杩涜涓嶅悓鐨勪笟鍔¢�昏緫澶勭悊锛堥厤濂椾换鍔�:淇敼骞冲簱璐т綅淇℃伅/鎹㈠眰浠诲姟璁板綍灏忚溅淇℃伅(灏忚溅浣嶇疆灞�)锛涘嚭鍏ュ簱浠诲姟澶勭悊搴撲綅淇℃伅锛�
+ /// </summary>
+ /// <param name="tasks"></param>
public void HIKROBOTTask(List<Dt_Task> tasks)
{
foreach (var item in tasks)
{
- SendHIKROBOTTask(item);
+ var content = SendHIKROBOTTask(item);
+ }
+ }
+ #endregion
+
+ #region 澶勭悊娴峰悍寰呯户缁墽琛屼换鍔�
+ public void SendAGVWaitToExecuteTask(List<Dt_Task> tasks)
+ {
+ foreach (var item in tasks)
+ {
+ var content = SendHIKROBOTTask(item);
}
}
#endregion
#region 涓嬪彂娴峰悍AGV浠诲姟
- public void SendHIKROBOTTask(Dt_Task task)
+ public WebResponseContent SendHIKROBOTTask(Dt_Task task)
{
WebResponseContent content = new WebResponseContent();
- HIKROBOTTaskSubmit hIKROBOTTaskSubmit = new HIKROBOTTaskSubmit();
try
{
- hIKROBOTTaskSubmit.taskType = "";
- hIKROBOTTaskSubmit.targetRoute = new List<TargetRouteDto> { new TargetRouteDto() };
- hIKROBOTTaskSubmit.initPriority = task.Grade;
+ Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(HIKROBOTTaskSubmit)) ?? throw new Exception("鏈壘鍒版捣搴稟GV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
+
+ #region 浠诲姟淇℃伅杞崲
+ HIKROBOTTaskSubmit hIKROBOTTaskSubmit = new HIKROBOTTaskSubmit()
+ {
+ taskType = "",
+ initPriority = task.Grade,
+ targetRoute = new List<TargetRouteDto>
+ {
+ new TargetRouteDto
+ {
+ type= "SITE",
+ code=task.CurrentAddress,
+ operation="COLLECT",//鍙栬揣
+ },
+ new TargetRouteDto
+ {
+ type= "SITE",
+ code=task.NextAddress,
+ operation="DELIVERY",//閫佽揣
+ }
+ }
+ };
+ #endregion
+
+ string response = HttpHelper.Post(apiInfo.ApiAddress, hIKROBOTTaskSubmit.Serialize());
+ var hIKROBOTReturn = response.DeserializeObject<HIKROBOTReturn>();
+ if (hIKROBOTReturn.code == "SUCCESS")
+ {
+ var data = hIKROBOTReturn.data.ToString().DeserializeObject<HIKROBOTReturnData>();
+ content.OK(data: data);
+ //task.Remark = data.robotTaskCode;
+ }
+ else
+ {
+ throw new Exception(hIKROBOTReturn.message);
+ }
+ //_taskService.UpdateData(task);
}
catch (Exception ex)
{
@@ -41,6 +92,7 @@
{
}
+ return content;
}
#endregion
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs"
index d14788a..bcb8b8f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs"
@@ -85,8 +85,14 @@
if (Tasks.Count > 0) SendOutTask(Tasks);
#endregion
- #region 涓嬪彂鎵樼洏纭鐨勬捣搴稟GV浠诲姟
+ #region 涓嬪彂澶栬鍏佽杩涘叆鐨勬捣搴稟GV浠诲姟
+ Tasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == (int)TaskStatusEnum.AGV_WaitToExecute).ToList();
+ if (Tasks.Count > 0) SendAGVWaitToExecuteTask(Tasks);
+ #endregion
+ #region 涓嬪彂鎵樼洏纭瀹屾垚鐨勬捣搴稟GV浠诲姟
+ Tasks = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == (int)TaskStatusEnum.CheckPalletCodeFinish).ToList();
+ if (Tasks.Count > 0) SendAGVWaitToExecuteTask(Tasks);
#endregion
}
catch (Exception ex)
--
Gitblit v1.9.3