From 7ca9651f81d7b84f054194d3d46fdbd1d9c8b922 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 09 七月 2025 22:55:27 +0800
Subject: [PATCH] 增加质检出入库逻辑

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderService.cs |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderService.cs"
index af86350..a65a4a5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderService.cs"
@@ -47,7 +47,7 @@
         /// </summary>
         /// <param name="materielGroupDTO"></param>
         /// <returns></returns>
-        public WebResponseContent PdaAddEmptyStockInfo(string barcode)
+        public WebResponseContent PdaAddEmptyStockInfo(string barcode, string station)
         {
             try
             {
@@ -59,16 +59,16 @@
                 {
                     task = new Dt_Task()
                     {
-                        CurrentAddress = "1001",
-                        NextAddress = "SC01",
-                        SourceAddress = "1001",
+                        CurrentAddress = station,
+                        NextAddress = "1001",
+                        SourceAddress = station,
                         TargetAddress = "SC01",
                         Creater = "System",
                         PalletCode = barcode,
                         Roadway = "SC01",
                         OrderNo = DateTime.Now.ToString("yyMMdd"),
                         TaskNum = _taskRepository.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
-                        TaskState = InTaskStatusEnum.AGV_InFinish.ObjToInt(),
+                        TaskState = InTaskStatusEnum.InNew.ObjToInt(),
                         TaskType = TaskTypeEnum.PalletInbound.ObjToInt(),
                         CreateDate = DateTime.Now,
                         Dispatchertime = DateTime.Now,
@@ -410,11 +410,11 @@
             return (true, "鎴愬姛", materielGroupDTO);
         }
 
-        public WebResponseContent QueryOrderInfo(int pageNo, string orderNo)
+        public WebResponseContent QueryOrderInfo(int pageNo, string orderNo, int orderType)
         {
             if (string.IsNullOrEmpty(orderNo))
             {
-                object obj = Repository.QueryPage(x => true, pageNo, 10, new Dictionary<string, OrderByType> { { nameof(Dt_InboundOrder.CreateDate), OrderByType.Desc } }).Rows.Select(x => new
+                object obj = Repository.QueryPage(x => x.OrderType == orderType, pageNo, 10, new Dictionary<string, OrderByType> { { nameof(Dt_InboundOrder.CreateDate), OrderByType.Desc } }).Rows.Select(x => new
                 {
                     x.OrderNo,
                     x.UpperOrderNo,
@@ -425,7 +425,7 @@
             }
             else
             {
-                object obj = Repository.QueryPage(x => x.OrderNo == orderNo, pageNo, 10, new Dictionary<string, OrderByType> { { nameof(Dt_InboundOrder.CreateDate), OrderByType.Desc } }).Rows.Select(x => new
+                object obj = Repository.QueryPage(x => x.OrderNo.Contains(orderNo), pageNo, 10, new Dictionary<string, OrderByType> { { nameof(Dt_InboundOrder.CreateDate), OrderByType.Desc } }).Rows.Select(x => new
                 {
                     x.OrderNo,
                     x.UpperOrderNo,
@@ -435,5 +435,14 @@
                 return WebResponseContent.Instance.OK(data: obj);
             }
         }
+
+        public WebResponseContent QueryOrderDetailInfo(int pageNo, string orderNo)
+        {
+            WebResponseContent content = new WebResponseContent();
+            Dt_InboundOrder inboundOrder = GetInboundOrder(orderNo);
+            List<Dt_InboundOrderDetail> inboundOrderDetails = inboundOrder.Details;
+            content.OK(data: inboundOrderDetails);
+            return content;
+        }
     }
 }

--
Gitblit v1.9.3