From 2779947fe07c41250237437365f367b5a78a03b6 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 10 六月 2025 23:57:58 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/QMS/QmsController.cs |   94 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 94 insertions(+), 0 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/QMS/QmsController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/QMS/QmsController.cs"
new file mode 100644
index 0000000..08263c7
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/QMS/QmsController.cs"
@@ -0,0 +1,94 @@
+锘縰sing Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using SqlSugar;
+using WIDESEA_Common.CommonEnum;
+using WIDESEA_Common.MaterielEnum;
+using WIDESEA_Common.OrderEnum;
+using WIDESEA_Core;
+using WIDESEA_Core.Attributes;
+using WIDESEA_Core.Helper;
+using WIDESEA_DTO;
+using WIDESEA_DTO.Basic;
+using WIDESEA_DTO.ERP;
+using WIDESEA_DTO.QMS;
+using WIDESEA_External.ERPService;
+using WIDESEA_External.Model;
+using WIDESEA_External.QMSService;
+using WIDESEA_IBasicRepository;
+using WIDESEA_IBasicService;
+using WIDESEA_IInboundRepository;
+using WIDESEA_IInboundService;
+using WIDESEA_InboundService;
+using WIDESEA_IOutboundService;
+using WIDESEA_Model.Models;
+using static WIDESEA_DTO.ErpResponseContent;
+
+namespace WIDESEA_WMSServer.Controllers.QMS
+{
+    /// <summary>
+    /// ERP鎺ュ彛
+    /// </summary>
+    [Route("api/Qms")]
+    [ApiController]
+    public class QmsController : ControllerBase
+    {
+        private readonly IBasicService _basicService;
+        private readonly IOutboundService _outboundService;
+        private readonly IInboundService _inboundService;
+        private readonly IInvokeERPService _invokeERPService;
+        private readonly IReturnOrderService _returnOrderService;
+        private readonly IInvokeQMSService _invokeQMSService;
+
+        public QmsController(IBasicService basicService, IOutboundService outboundService, IInboundService inboundService,
+            IInvokeERPService invokeERPService, IReturnOrderService returnOrderService, IInvokeQMSService invokeQMSService)
+        {
+            _basicService = basicService;
+            _outboundService = outboundService;
+            _inboundService = inboundService;
+            _invokeERPService = invokeERPService;
+            _returnOrderService = returnOrderService;
+            _invokeQMSService = invokeQMSService;
+        }
+
+        ///// <summary>
+        ///// 妫�楠屽崟鍥炰紶鏇存柊
+        ///// </summary>
+        ///// <param name="model"></param>
+        ///// <returns></returns>
+        //[HttpPost, Route("CheckResultReturn"), AllowAnonymous, MethodParamsValidate]
+        //public ErpResponseContent ReceivePurchaseOrder([FromBody] Root<CheckResultDTO> model)
+        //{
+        //    WebResponseContent content = _inboundService.PurchaseOrderService.ReceivePurchaseOrder(model.Content);
+        //    if (content.Status) return Instance.OK();
+        //    else return Instance.Error(content.Message);
+        //}
+        /// <summary>
+        /// 鏀惰揣鍗曟潵鏂欐楠屾帹閫�
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost, Route("ReceiveCheck"), AllowAnonymous, MethodParamsValidate]
+        public string ReceivePurchaseOrder([FromBody] QMSReceiveCheckModel model)
+        {
+           string content = _invokeQMSService.InvokeReceiveCheckApi(model);
+           return content;
+        }
+        /// <summary>
+        /// 妫�楠屽崟鍥炰紶鏇存柊
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost, Route("CheckResultReturn"), AllowAnonymous, MethodParamsValidate]
+        public MesResponseContent CheckResultReturn([FromBody] ERPCheckModel model)
+        {
+            string content = _invokeERPService.InvokeCheckOrderApi(model);
+            ErpRequestContent requestContent = content.DeserializeObject<ErpRequestContent>();
+            if (requestContent.res != 1)
+            {
+                return MesResponseContent.Instance.Error(requestContent.Data);
+            }
+            return MesResponseContent.Instance.OK("鎴愬姛");
+        }
+    }
+}

--
Gitblit v1.9.3