From 1f361850d35ba47225951efbc49d592eea685cf8 Mon Sep 17 00:00:00 2001 From: z8018 <1282578289@qq.com> Date: 星期三, 16 四月 2025 17:35:53 +0800 Subject: [PATCH] 1 --- 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" index 3668c2f..c5188d0 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" @@ -3,7 +3,8 @@ using Microsoft.AspNetCore.Mvc; using WIDESEAWCS_Core; using WIDESEAWCS_Core.BaseController; -using WIDESEAWCS_DTO.TaskInfo; +using WIDESEAWCS_DTO.BasicInfo; +using WIDESEAWCS_IBasicInfoService; using WIDESEAWCS_ITaskInfoService; using WIDESEAWCS_Model.Models; @@ -14,11 +15,30 @@ public class TaskController : ApiBaseController<ITaskService, Dt_Task> { private readonly IHttpContextAccessor _httpContextAccessor; - public TaskController(ITaskService service, IHttpContextAccessor httpContextAccessor) : base(service) + private readonly IOrderDetailsService _orderDetailsService; + public TaskController(ITaskService service, IHttpContextAccessor httpContextAccessor,IOrderDetailsService orderDetailsService) : base(service) { _httpContextAccessor = httpContextAccessor; + _orderDetailsService = orderDetailsService; } - + [HttpPost, HttpGet, Route("CreateTask"), AllowAnonymous] + public WebResponseContent CreateTask(string takePosition, string putPosition, string deviceCode, int length, int width, int height) + { + return Service.CreateTask(takePosition, putPosition, deviceCode, length, width, height); + } + + [HttpPost, HttpGet, Route("PlaceBlockTest"), AllowAnonymous] + public WebResponseContent PlaceBlockTest(int orderRowId) + { + return Service.PlaceBlockTest(orderRowId); + } + + [HttpPost, HttpGet, Route("GenerateTask"), AllowAnonymous] + public Dt_Task GenerateTask(string barcode) + { + OrderInfo orderInfo = _orderDetailsService.GetOrderInfoByBarcode(barcode); + return Service.GenerateTask(orderInfo); + } } } -- Gitblit v1.9.3