From 0b87b08ef12e2293cf073f75f7ee73b9423686fa Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期六, 08 十一月 2025 10:12:48 +0800
Subject: [PATCH] 1

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs |   35 ++++++++++++++++++++++++++---------
 1 files changed, 26 insertions(+), 9 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
index d00daf2..93ae8e7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
@@ -5,6 +5,7 @@
 using SqlSugar;
 using System.Net;
 using System.Threading.Tasks;
+using WIDESEA_BasicService;
 using WIDESEA_Common.OrderEnum;
 using WIDESEA_Core;
 using WIDESEA_Core.Attributes;
@@ -30,16 +31,24 @@
         private readonly WIDESEA_IBasicService.IInvokeMESService _invokeMESService;
 
         private readonly IESSApiService _eSSApiService;
-        public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService) : base(service)
+        private readonly ILocationInfoService _locationInfoService;
+        private readonly IDailySequenceService _dailySequenceService;
+        public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService) : base(service)
         {
             this.erpApiService = erpApiService;
             _invokeMESService = invokeMESService;
             _eSSApiService = eSSApiService;
+            _dailySequenceService = dailySequenceService;
+            _locationInfoService = locationInfoService;
         }
 
         [HttpPost, Route("Test"), AllowAnonymous, MethodParamsValidate]
         public async Task<WebResponseContent> Test()
         {
+            
+            var sddd = _locationInfoService.AssignLocation();
+            var code = sddd.LocationCode;
+            // await _dailySequenceService.GetNextSequenceAsync();
             //erpApiService.GetSuppliersAsync();
 
             //erpApiService.GetMaterialUnitAsync();
@@ -59,13 +68,18 @@
             //      qty = "20.0",
             //  });
 
-            await _eSSApiService.MoveContainerAsync(new WIDESEA_DTO.Basic.MoveContainerRequest
-            {
-                slotCode = "3-5",
-                containerCode = "A000008006"
-            });
-            //  erpApiService.GetMaterialInfoAsy2nc(new WIDESEA_DTO.Basic.MaterialRequest());
-            return WebResponseContent.Instance.OK();
+            //await _eSSApiService.MoveContainerAsync(new WIDESEA_DTO.Basic.MoveContainerRequest
+            //{
+            //    slotCode = "3-5",
+            //    containerCode = "A000008002"
+            //});
+
+            //await erpApiService.GetSuppliersAsync();
+            //await erpApiService.GetMaterialUnitAsync();
+            //await  erpApiService.GetMaterialInfoAsync(new WIDESEA_DTO.Basic.MaterialRequest());
+
+
+            return WebResponseContent.Instance.OK(code);
         }
 
         /// <summary>
@@ -76,7 +90,10 @@
         [HttpPost, Route("ReceiveInboundOrder"), AllowAnonymous, MethodParamsValidate]
         public WebResponseContent ReceiveInboundOrder([FromBody] InboundRequestModel model)
         {
-
+            if(model.inBounds == null || !model.inBounds.Any())
+            {
+                return WebResponseContent.Instance.Error("鍏ュ簱鍗曚笉鑳戒负绌�");
+            }
 
             List<Dt_InboundOrder> inboundOrders = new List<Dt_InboundOrder>();
 

--
Gitblit v1.9.3