From 9de6c7c6d835ba5161d64114d154bfc7676244a1 Mon Sep 17 00:00:00 2001
From: 陈勇 <竞男@ASUNA>
Date: 星期一, 06 四月 2026 12:44:43 +0800
Subject: [PATCH] 同步

---
 项目代码/WMS/WMSServer/WIDESEA_StorageBasicServices/Stock/VV_MesLockInfoService.cs |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 55 insertions(+), 1 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageBasicServices/Stock/VV_MesLockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageBasicServices/Stock/VV_MesLockInfoService.cs"
index 5d007f0..245f1c5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageBasicServices/Stock/VV_MesLockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageBasicServices/Stock/VV_MesLockInfoService.cs"
@@ -6,13 +6,67 @@
 using System.Drawing.Printing;
 using System.Linq.Expressions;
 using WIDESEA_Core;
+using WIDESEA_DTO.Basic;
 
 namespace WIDESEA_StorageBasicService;
 
 public class VV_MesLockInfoService : ServiceBase<VV_MesLockInfo, IVV_MesLockInfoRepository>, IVV_MesLockInfoService
 {
-    public VV_MesLockInfoService(IVV_MesLockInfoRepository BaseDal) : base(BaseDal)
+    private readonly IVV_StockInfoRepository _stockInfoRepository;
+    public VV_MesLockInfoService(IVV_MesLockInfoRepository BaseDal, IVV_StockInfoRepository stockInfoRepository) : base(BaseDal)
     {
+        _stockInfoRepository = stockInfoRepository;
     }
 
+    public WebResponseContent GetMesLockInfo()
+    {
+        WebResponseContent content = new WebResponseContent();
+        try
+        {
+            List<VV_MesLockInfo> mesLockInfos = BaseDal.QueryData(x => x.LockStatue == 1 || x.LockStatue == 0).OrderBy(x => x.sequenceNo).ToList();
+            List<VV_StockInfo> stockInfos = _stockInfoRepository.QueryData(x => x.CarType == 2).OrderBy(x => x.CreateDate).Take(50).ToList();
+            List<MesLockDTO> mesLockDTOs = new List<MesLockDTO>();
+            mesLockInfos.ForEach(x =>
+            {
+                mesLockDTOs.Add(new MesLockDTO
+                {
+                    lockStatue = x.LockStatue,
+                    pvi = x.PVI,
+                    vehicleCharacteristic = x.vehicleCharacteristic,
+                    carBodyCharacteristic = x.carBodyCharacteristic
+                });
+            });
+            stockInfos.ForEach(x =>
+            {
+                mesLockDTOs.Add(new MesLockDTO
+                {
+                    lockStatue = 2,
+                    pvi = x.PVI,
+                    vehicleCharacteristic = x.vehicleCharacteristic,
+                    carBodyCharacteristic = x.carBodyCharacteristic
+                });
+            });
+
+            return content.OK(data: mesLockDTOs);
+        }
+        catch (Exception ex)
+        {
+            return content.Error(ex.Message);
+        }
+    }
+
+    public WebResponseContent GetStockInfo(string PVI)
+    {
+        WebResponseContent content = new WebResponseContent();
+        try
+        {
+            VV_StockInfo stockInfos = _stockInfoRepository.QueryFirst(x => x.PVI == PVI);
+
+            return content.OK(data: stockInfos);
+        }
+        catch (Exception ex)
+        {
+            return content.Error(ex.Message);
+        }
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3