From 075c5319285ab9896a74655c82cec7c1ae0e0196 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期五, 12 十二月 2025 14:13:46 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs |  103 ++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 72 insertions(+), 31 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 3ba7403..c522cb8 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"
@@ -1,4 +1,5 @@
 锘縰sing Autofac.Core;
+using MailKit.Search;
 using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
@@ -8,15 +9,22 @@
 using System.Threading.Tasks;
 using WIDESEA_BasicService;
 using WIDESEA_Common.OrderEnum;
+using WIDESEA_Common.StockEnum;
 using WIDESEA_Core;
 using WIDESEA_Core.Attributes;
 using WIDESEA_Core.BaseController;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.Enums;
+using WIDESEA_DTO.Allocate;
 using WIDESEA_DTO.Inbound;
 using WIDESEA_DTO.Mes;
 using WIDESEA_IBasicService;
 using WIDESEA_IInboundService;
 using WIDESEA_InboundService;
+using WIDESEA_IOutboundService;
+using WIDESEA_ITaskInfoService;
 using WIDESEA_Model.Models;
+using WIDESEA_OutboundService;
 
 namespace WIDESEA_WMSServer.Controllers.Inbound
 {
@@ -30,13 +38,17 @@
         private readonly WIDESEA_IBasicService.IErpApiService erpApiService;
 
         private readonly WIDESEA_IBasicService.IInvokeMESService _invokeMESService;
- 
+        public readonly IInboundService _inboundService;
         private readonly IESSApiService _eSSApiService;
         private readonly ILocationInfoService _locationInfoService;
         private readonly IDailySequenceService _dailySequenceService;
         private readonly IMaterialUnitService _materialUnitService;
+        private readonly IOutStockLockInfoService _outStockLockInfoService;
+        private readonly IOutboundOrderDetailService _outboundOrderDetailService;
+        private readonly IRepository<Dt_Task> _taskRepository;
+        private readonly ITask_HtyService _task_HtyService;
         private readonly ILogger<InboundOrderController> _logger;
-        public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService) : base(service)
+        public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService, IInboundService inboundService, IOutStockLockInfoService outStockLockInfoService, IOutboundOrderDetailService outboundOrderDetailService, IRepository<Dt_Task> taskRepository, ITask_HtyService task_HtyService) : base(service)
         {
             this.erpApiService = erpApiService;
             _invokeMESService = invokeMESService;
@@ -45,37 +57,60 @@
             _locationInfoService = locationInfoService;
             _logger = logger;
             _materialUnitService = materialUnitService;
+            _inboundService = inboundService;
+            _outStockLockInfoService = outStockLockInfoService;
+            _outboundOrderDetailService = outboundOrderDetailService;
+            _taskRepository = taskRepository;
+            _task_HtyService = task_HtyService;
         }
 
         [HttpPost, Route("Test"), AllowAnonymous, MethodParamsValidate]
         public async Task<WebResponseContent> Test()
         {
-           // var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync("101001-00002", 10);
 
-           // var pdddurchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync("100513-00210", 10);
+            //var seq = await _dailySequenceService.GetNextSequenceAsync();
+            //var SDDD= "WSLOT" + DateTime.Now.ToString("yyyyMMdd") + seq.ToString()?.PadLeft(5, '0');
 
-            var sddd = _locationInfoService.AssignLocation();
-            var code = sddd.LocationCode;
+            //var originalTask = _taskRepository.Db.Queryable<Dt_Task>().First();
+
+            //var result = _task_HtyService.DeleteAndMoveIntoHty(originalTask, OperateTypeEnum.浜哄伐鍒犻櫎);
+            //if (result)
+            //{
+            //    var sddd = "trueee";
+            //}
+            //var originalTask = _taskRepository.Db.Queryable<Dt_Task>().First();
+            //_taskRepository.DeleteAndMoveIntoHty(originalTask, OperateTypeEnum.鑷姩瀹屾垚);
+            // Service.Db.Deleteable<Dt_InboundOrder>().Where(x=>x.UpperOrderNo== "12020251100040").ExecuteCommand();
+            //_inboundService.InboundOrderDetailService.Db.Deleteable<Dt_InboundOrderDetail>()
+            // .Where(p => SqlFunc.Subqueryable<Dt_InboundOrder>().Where(s => s.Id == p.OrderId && s.UpperOrderNo == "12020251100040").Any()).ExecuteCommand();
+
+            //var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync("100513-00303", 1);
+
+            //var pdddurchaseToStockResult = await _materialUnitService.ConvertFromToStockAsync("100513-00303", "W013", 1);
+
+            //var sddd = _locationInfoService.AssignLocation(1);
+            //var code = sddd.LocationCode;
             //var ssss=await _dailySequenceService.GetNextSequenceAsync();
             //var  ddddssss = "WSLOT" + DateTime.Now.ToString("yyyyMMddHHmmss") + ssss.ToString().PadLeft(5, '0');
             //erpApiService.GetSuppliersAsync();
 
-            //erpApiService.GetMaterialUnitAsync();
-            //var sss=await  _invokeMESService.NewMaterielToMes(new WIDESEA_DTO.Basic.MaterielToMesDTO
-            //  {
-            //      reqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
-            //      reqCode = Guid.NewGuid().ToString(),
-            //      oldmaterialCode = "b001",
-            //      newmaterialCode = "Bar01",
-            //      unit = "A01",
-            //      operationType = 1,
-            //      supplyCode = "A0001",
-            //      batchNo = "A0002",
-            //      materialCode = "FC00001",
-            //      warehouseCode = "",
-            //      factoryArea = "A01",
-            //      qty = "20.0",
-            //  });
+            // erpApiService.GetMaterialUnitAsync();
+
+            //var sss = await _invokeMESService.NewMaterielToMes(new WIDESEA_DTO.Basic.MaterielToMesDTO
+            //{
+            //    reqTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
+            //    reqCode = Guid.NewGuid().ToString(),
+            //    oldmaterialCode = "b001",
+            //    newmaterialCode = "Bar01",
+            //    unit = "A01",
+            //    operationType = 1,
+            //    supplyCode = "A0001",
+            //    batchNo = "A0002",
+            //    materialCode = "FC00001",
+            //    warehouseCode = "",
+            //    factoryArea = "A01",
+            //    qty =20,
+            //});
 
             //await _eSSApiService.MoveContainerAsync(new WIDESEA_DTO.Basic.MoveContainerRequest
             //{
@@ -88,7 +123,7 @@
             //await  erpApiService.GetMaterialInfoAsync(new WIDESEA_DTO.Basic.MaterialRequest());
 
 
-            return WebResponseContent.Instance.OK(code);
+            return WebResponseContent.Instance.OK( );
         }
 
         /// <summary>
@@ -99,12 +134,12 @@
         [HttpPost, Route("ReceiveInboundOrder"), AllowAnonymous, MethodParamsValidate]
         public async Task<WebResponseContent> ReceiveInboundOrder([FromBody] InboundRequestModel model)
         {
-            if(model.inBounds == null || !model.inBounds.Any())
+            if (model.inBounds == null || !model.inBounds.Any())
             {
                 return WebResponseContent.Instance.Error("鍏ュ簱鍗曚笉鑳戒负绌�");
             }
 
-            _logger.LogInformation("InboundOrderController ReceiveInboundOrder:  " +  JsonConvert.SerializeObject(model));
+            _logger.LogInformation("InboundOrderController ReceiveInboundOrder:  " + JsonConvert.SerializeObject(model));
             List<Dt_InboundOrder> inboundOrders = new List<Dt_InboundOrder>();
 
             foreach (var item in model.inBounds)
@@ -162,7 +197,7 @@
                 inboundOrders.Add(dt_InboundOrder);
             }
 
-            var content =await Service.ReceiveInboundOrder(inboundOrders, model.operationType);
+            var content = await Service.ReceiveInboundOrder(inboundOrders, model.operationType);
 
             if (content.Status) return WebResponseContent.Instance.OK(200);
             else return WebResponseContent.Instance.Error(content.Message);
@@ -182,10 +217,16 @@
 
         }
 
-        [HttpPost, Route("UndoPalletGroup"), AllowAnonymous, MethodParamsValidate]
-        public WebResponseContent UndoPalletGroup(string palletCode)
+        [HttpPost, Route("UnPalletGroupBarcode"), AllowAnonymous, MethodParamsValidate]
+        public WebResponseContent UnPalletGroupBarcode(string orderNo)
         {
-            return Service.UndoPalletGroup(palletCode);
+            return Service.UnPalletGroupBarcode(orderNo);
+        }
+
+        [HttpPost, Route("UndoPalletGroup"), AllowAnonymous, MethodParamsValidate]
+        public WebResponseContent UndoPalletGroup(string palletCode,string barcode="")
+        {
+            return Service.UndoPalletGroup(palletCode,barcode);
         }
         /// <summary>
         /// 
@@ -208,9 +249,9 @@
         }
 
         [HttpPost, Route("BatchOrderFeedbackToMes"), AllowAnonymous]
-        public async Task<WebResponseContent> BatchOrderFeedbackToMes([FromBody]  BatchOrderFeedbackToMesDto request)
+        public async Task<WebResponseContent> BatchOrderFeedbackToMes([FromBody] BatchOrderFeedbackToMesDto request)
         {
-           return await _invokeMESService.BatchOrderFeedbackToMes(request.orderNos, request.inout);
+            return await _invokeMESService.BatchOrderFeedbackToMes(request.orderNos, request.inout);
         }
 
     }

--
Gitblit v1.9.3