From 4fc31b41c205507607c91ab3afe10fbc06a9aa09 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期五, 05 十二月 2025 13:52:15 +0800
Subject: [PATCH] 1.添加启动提升机、停止提升机、复位提升机功能 2.优化初始化提升机功能
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task/TaskController.cs | 153 ++++++++++++++++++++++++++++++++++++++------------
1 files changed, 115 insertions(+), 38 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task/TaskController.cs"
index f07d2e9..bf0795b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task/TaskController.cs"
@@ -1,4 +1,5 @@
-锘縰sing WIDESEA_DTO;
+锘縰sing Org.BouncyCastle.Asn1.Mozilla;
+using WIDESEA_DTO;
namespace WIDESEA_WMSServer.Controllers.Task;
@@ -11,15 +12,11 @@
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IDt_TaskService _taskService;
- private readonly ILocationInfoService _locationService;
- public TaskController(IDt_TaskService taskService,
- IHttpContextAccessor httpContextAccessor,
- ILocationInfoService locationService) : base(taskService)
+ public TaskController(IDt_TaskService service,
+ IHttpContextAccessor httpContextAccessor) : base(service)
{
_httpContextAccessor = httpContextAccessor;
- _taskService = taskService;
- _locationService = locationService;
}
/// <summary>
@@ -27,46 +24,50 @@
/// </summary>
/// <param name="saveModel">浠诲姟鍙�</param>
/// <returns>鎴愬姛鎴栧け璐�</returns>
- [HttpGet, Route("CompleteTaskAsync"), AllowAnonymous]
- //[TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5绉掕妭娴�
+ [HttpGet,HttpPost, Route("CompleteTaskAsync"), AllowAnonymous]
public async Task<WebResponseContent> CompleteTaskAsync(int taskNum)
{
- return await _taskService.CompleteAsync(taskNum);
- }
- /// <summary>
- /// 璇锋眰浠诲姟宸烽亾
- /// </summary>
- /// <param name="input">璇锋眰鏁版嵁</param>
- /// <returns></returns>
- [HttpPost, AllowAnonymous, Route("RequestTaskAsync")]
- [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5绉掕妭娴�
- public async Task<WebResponseContent> RequestTaskAsync([FromBody] RequestTaskDto input)
- {
- return await Service.RequestTaskAsync(input);
+ return await Service.CompleteAsync(taskNum);
}
/// <summary>
- /// 璇锋眰浠诲姟璐т綅
+ /// 浠诲姟鍙栨秷
/// </summary>
- /// <param name="input">璇锋眰鏁版嵁</param>
+ /// <param name="taskNum"></param>
/// <returns></returns>
- [HttpPost, AllowAnonymous, Route("RequestLocationTaskAsync")]
- [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5绉掕妭娴�
- public async Task<WebResponseContent> UpdateExistingTask([FromBody] RequestTaskDto input)
+ [HttpPost, HttpGet,Route("TaskCancel"), AllowAnonymous]
+ public WebResponseContent TaskCancel(int taskNum)
{
- return await Service.UpdateExistingTask(input);
+ return Service.TaskCancel(taskNum);
}
/// <summary>
- /// 绌烘墭鐩樺叆搴撹姹�
+ /// 鑾峰彇浠诲姟淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("GetTaskInfo")]
+ public WebResponseContent GetTaskInfo()
+ {
+ return Service.GetTaskInfo();
+ }
+
+ /// <summary>
+ /// 璇锋眰鍏ュ簱浠诲姟
/// </summary>
/// <param name="input">璇锋眰鏁版嵁</param>
/// <returns></returns>
- [HttpPost, AllowAnonymous, Route("RequestTrayInTaskAsync")]
- [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5绉掕妭娴�
- public async Task<WebResponseContent> RequestTrayInTaskAsync([FromBody] RequestTaskDto input)
+ [HttpPost, HttpGet, AllowAnonymous, Route("RequestInboundTaskAsync")]
+ [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
+ public async Task<WebResponseContent> RequestInboundTaskAsync([FromBody] RequestTaskDto input)
{
- return await Service.RequestTrayInTaskAsync(input);
+ return await Service.RequestInboundTaskAsync(input);
+ }
+
+ [HttpPost, HttpGet, AllowAnonymous, Route("RequestRelocationTaskAsync")]
+ [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
+ public Task<WebResponseContent> RequestRelocationTaskAsync(string SourceAddress, string TargetAddress)
+ {
+ return Service.RequestRelocationTaskAsync(SourceAddress, TargetAddress);
}
/// <summary>
@@ -74,11 +75,37 @@
/// </summary>
/// <param name="request">璇锋眰鏁版嵁</param>
/// <returns></returns>
- [HttpPost, AllowAnonymous, Route("RequestTrayOutTaskAsync")]
- [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5绉掕妭娴�
- public async Task<WebResponseContent> RequestTrayOutTaskAsync([FromBody] RequestOutTaskDto request)
+ [HttpPost, HttpGet, AllowAnonymous, Route("RequestOutboundTaskAsync")]
+ [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
+ public async Task<Dt_Task> RequestOutboundTaskAsync([FromBody] RequestTaskDto taskDto)
{
- return await Service.RequestTrayOutTaskAsync(request.Position, request.Tag, request.AreaCdoe, request.AreaCdoes, request.ProductionLine);
+ return await Service.RequestOutboundTaskAsync(taskDto);
+ }
+
+ /// <summary>
+ /// 鍑哄簱鑷崇紦瀛樺尯
+ /// </summary>
+ /// <param name="request">璇锋眰鏁版嵁</param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, AllowAnonymous, Route("OutBoundTaskAsync")]
+ [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 2 })]
+ public Task<WebResponseContent> OutBoundTaskAsync(string palletCode, string remark, int doubleTray)
+ {
+ return Service.OutBoundTaskAsync(palletCode, remark, doubleTray);
+ }
+
+ [HttpPost, HttpGet, AllowAnonymous, Route("OtherOutBoundTaskAsync")]
+ [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 2 })]
+ public Task<WebResponseContent> OtherOutBoundTaskAsync([FromBody] List<DtStockInfoDetail> details)
+ {
+ return Service.OtherOutBoundTaskAsync(details);
+ }
+
+ [HttpPost, HttpGet, AllowAnonymous, Route("HandAllocateOutBoundTaskAsync")]
+ [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 2 })]
+ public Task<WebResponseContent> HandAllocateOutBoundTaskAsync([FromBody] List<DtStockInfoDetail> details)
+ {
+ return Service.HandAllocateOutBoundTaskAsync(details);
}
/// <summary>
@@ -86,11 +113,61 @@
/// </summary>
/// <param name="input">璇锋眰鏁版嵁</param>
/// <returns></returns>
- [HttpPost, AllowAnonymous, Route("UpdateTaskStatus")]
- [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })] // 5绉掕妭娴�
+ [HttpPost,HttpGet,Route("UpdateTaskStatus") ,AllowAnonymous]
+ [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
public async Task<WebResponseContent> UpdateTaskStatus([FromBody] UpdateStatusDto input)
{
return await Service.UpdateTaskStatus(input.TaskNum, input.TaskState);
}
+ /// <summary>
+ /// 璇锋眰璺ㄦゼ灞備换鍔�2
+ /// </summary>
+ /// <param name="taskDto"></param>
+ /// <returns></returns>
+ [HttpPost, AllowAnonymous, Route("AcrossFloorTaskAsync")]
+ public async Task<WebResponseContent> AcrossFloorTaskAsync([FromBody] RequestAcrossFloorTaskDto taskDto)
+ {
+ return await Service.AcrossFloorTaskAsync(taskDto);
+ }
+
+
+ [HttpPost, AllowAnonymous, Route("GetEmptyLocation")]
+ [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
+ public async Task<DtLocationInfo> GetEmptyLocation(string roadWay)
+ {
+ return await Service.GetEmptyLocation(roadWay);
+ }
+
+ [HttpPost, AllowAnonymous, Route("GetAGVEmptyCacheLocation")]
+ [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
+ public async Task<DtLocationInfo> GetAGVEmptyCacheLocation(int AreaId,DtLocationInfo location)
+ {
+ return await Service.GetAGVEmptyCacheLocation(AreaId,location);
+ }
+
+ [HttpPost, AllowAnonymous, Route("StackerIsNeedRelocationAsync")]
+ [TypeFilter(typeof(ThrottleFilter), Arguments = new object[] { 5 })]
+ public async Task<WebResponseContent> StackerIsNeedRelocationAsync([FromBody] RequestTaskDto taskDto)
+ {
+ return await Service.StackerIsNeedRelocationAsync(taskDto);
+ }
+
+ [HttpPost, AllowAnonymous, Route("AGVIsNeedRelocationAsync")]
+ public async Task<WebResponseContent> AGVIsNeedRelocationAsync([FromBody] RequestTaskDto taskDto)
+ {
+ return await Service.AGVIsNeedRelocationAsync(taskDto);
+ }
+
+ [HttpPost, AllowAnonymous, Route("UpdateStartLocationInfo")]
+ public async Task<WebResponseContent> UpdateStartLocationInfo([FromBody]Dt_Task task)
+ {
+ return await Service.UpdateStartLocationInfo(task);
+ }
+ [HttpPost,HttpGet, AllowAnonymous, Route("RequestLocation")]
+ public Task<WebResponseContent> RequestLocation(string palletCode)
+ {
+ return Service.RequestLocation(palletCode);
+ }
+
}
\ No newline at end of file
--
Gitblit v1.9.3