From b466b3135cd7f3b08f570efda0ffb691daff5270 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 05 十二月 2025 18:15:16 +0800
Subject: [PATCH] 一期输送线代码及AGV请求等

---
 项目代码/WCSServices/WIDESEAWCS_Server/Controllers/WebAPIController.cs |  129 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 129 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/WebAPIController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/WebAPIController.cs"
new file mode 100644
index 0000000..40a56db
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/WebAPIController.cs"
@@ -0,0 +1,129 @@
+锘縰sing Autofac.Core;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using System.Text;
+using System.Text.RegularExpressions;
+using WIDESEA_DTO.Agv;
+using WIDESEA_External.Model;
+using WIDESEAWCS_Common;
+using WIDESEAWCS_Common.APIEnum;
+using WIDESEAWCS_Common.TaskEnum;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.Enums;
+using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_Core.LogHelper;
+using WIDESEAWCS_DTO;
+using WIDESEAWCS_DTO.Agv;
+using WIDESEAWCS_IBasicInfoRepository;
+using WIDESEAWCS_ITaskInfoRepository;
+using WIDESEAWCS_ITaskInfoService;
+using WIDESEAWCS_Model.Models;
+using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_QuartzJob.DTO;
+using WIDESEAWCS_QuartzJob.Models;
+using WIDESEAWCS_QuartzJob.Repository;
+using WIDESEAWCS_Tasks;
+using WIDESEAWCS_Tasks.DBNames;
+using static Dm.net.buffer.ByteArrayBuffer;
+
+namespace WIDESEAWCS_Server.Controllers
+{
+    [Route("api/[controller]")]
+    [ApiController]
+    public class WebAPIController : ControllerBase
+    {
+        private readonly IStationMangerRepository _stationMangerRepository;
+        private readonly ITaskService _taskService;
+        private readonly ITaskRepository _taskRepository;
+        private readonly IRouterRepository _routerRepository;
+
+        public WebAPIController(IStationMangerRepository stationMangerRepository, ITaskService taskService, ITaskRepository taskRepository, IRouterRepository routerRepository)
+        {
+            _stationMangerRepository = stationMangerRepository;
+            _taskService = taskService;
+            _taskRepository = taskRepository;
+            _routerRepository = routerRepository;
+        }
+        /// <summary>
+        /// 鍥炶皟涓婁紶
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("PickOrderCallBack"), AllowAnonymous]
+        public EPLightContent? PickOrderCallBack([FromBody] List<EPLightBackDTO> lightBackDTOs)
+        {
+            EPLightContent content = new EPLightContent();
+            try
+            {
+                if (lightBackDTOs==null)
+                {
+                    return content.Error("浼犲叆涓嶈兘涓虹┖");
+                }
+                content.OK("鎺ユ敹鎴愬姛");
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+        /// <summary>
+        /// 鎾澧欎笅鍙�(浜屾湡)
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("PickOrderInfoRequest"), AllowAnonymous]
+        public EPLightContent PickOrderInfoRequest([FromBody] List<EPLightSendDTO> lightSendDTOs)
+        {
+            EPLightContent content = new EPLightContent();
+            try
+            {
+                if (lightSendDTOs == null)
+                {
+                    return content.Error("浼犲叆涓嶈兘涓虹┖");
+                }
+                content = _taskService.PickOrderInfoRequest(lightSendDTOs);
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+        /// <summary>
+        /// 鎾澧欏垵濮嬪寲(浜屾湡)
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("INITIALIZATION"), AllowAnonymous]
+        public EPLightContent INITIALIZATION()
+        {
+            EPLightContent content = new EPLightContent();
+            try
+            {
+                content = _taskService.INITIALIZATION();
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+        /// <summary>
+        /// 鎾澧欑粨鏉熶綔涓�(浜屾湡)
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("ENDWORK"), AllowAnonymous]
+        public EPLightContent ENDWORK()
+        {
+            EPLightContent content = new EPLightContent();
+            try
+            {
+                content = _taskService.ENDWORK();
+            }
+            catch (Exception ex)
+            {
+                content.Error(ex.Message);
+            }
+            return content;
+        }
+    }
+}

--
Gitblit v1.9.3