From dccc001554c6c5376482df77f929c0d49b258844 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期三, 04 二月 2026 08:58:00 +0800
Subject: [PATCH] 1

---
 WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs |   54 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 53 insertions(+), 1 deletions(-)

diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs b/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs
index 35c3d00..ff2e0b0 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs
@@ -1,11 +1,15 @@
-锘縰sing Org.BouncyCastle.Crypto;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Org.BouncyCastle.Crypto;
 using SqlSugar;
 using SqlSugar.Extensions;
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Reflection.Metadata;
 using System.Text;
 using System.Threading.Tasks;
+using WIDESEA_Core;
 using WIDESEA_Core.BaseRepository;
 using WIDESEA_Core.Enums;
 using WIDESEA_DTO.Stock;
@@ -131,5 +135,53 @@
 
             return Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == StockStatusEmun.宸插叆搴�.ObjToInt() && SqlFunc.Subqueryable<Dt_LocationInfo>().Where(v => v.LocationCode == x.LocationCode && v.RoadwayNo == roadwayNo && v.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (v.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || EnableStatusEnum.Normal.ObjToInt() == v.EnableStatus)).Any()).OrderBy(x => x.ModifyDate).First();
         }
+
+        public WebResponseContent GetStockDetails(SaveModel saveModel)
+        {
+            WebResponseContent responseContent = new WebResponseContent();
+            try
+            {
+                var palletCode = saveModel.MainData["palletCode"].ToString();
+                Dt_StockInfo stockInfo = Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
+                return responseContent = WebResponseContent.Instance.OK(data: stockInfo.Details);
+            }
+            catch (Exception)
+            {
+
+                throw;
+            }   
+        }
+        public WebResponseContent UpdateGetStockDetails(SaveModel saveModel)
+        {
+            WebResponseContent responseContent = new WebResponseContent();
+            try
+            {
+                var palletCode = saveModel.MainData["palletCode"].ToString();
+                var detailsJson = saveModel.MainData["details"];
+                JArray jArray = saveModel.MainData["details"] as JArray;
+                if (jArray == null)
+                {
+                    responseContent.Message = "details涓嶆槸鏈夋晥鐨勬暟缁勬牸寮�";
+                    return responseContent;
+                }
+
+                // 杞崲涓� List<string>
+                List<string> details = jArray.Select(x => x?.ToString()).ToList();
+                foreach (var item in details)
+                {
+                    //var stockdetailbox = BaseDal.Db.Queryable<Dt_StockInfo>().LeftJoin<Dt_StockInfoDetail>((s, d) => s.Id == d.StockId).LeftJoin<Dt_StockInfoDetailCP>((s, d, cp) => d.Id == cp.StockDetailId).Where((s, d, cp) => allBoxCodes.Contains(cp.BoxCode)).Select((s, d, cp) => cp.BoxCode)
+                    // .Distinct()
+                    // .ToList();
+
+
+                }
+                return null;
+            }
+            catch (Exception)
+            {
+
+                throw;
+            }
+        }
     }
 }

--
Gitblit v1.9.3