From 2c4c080fc6e90d8c92355d779372cd24ae67b02e Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-JIE70N9>
Date: 星期一, 26 五月 2025 16:13:51 +0800
Subject: [PATCH] 线边库标签打印

---
 Wms/WMS.BLL/SysServer/StorageLocatServer.cs |   61 ++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 1 deletions(-)

diff --git a/Wms/WMS.BLL/SysServer/StorageLocatServer.cs b/Wms/WMS.BLL/SysServer/StorageLocatServer.cs
index 2f45fce..5676ea7 100644
--- a/Wms/WMS.BLL/SysServer/StorageLocatServer.cs
+++ b/Wms/WMS.BLL/SysServer/StorageLocatServer.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq.Expressions;
+using System.Reflection.Metadata;
 using System.Text;
 using System.Threading.Tasks;
 using Model.ModelDto.SysDto;
@@ -318,7 +319,7 @@
                 var depth = 0;
                 var depthString = "01";
                 // 鎺�(缁�)寰幆
-                for (int i = 1; i <= model.Row; i++)
+                for (int i = 19; i <= model.Row; i++)
                 {
                     // 鍒楀惊鐜�
                     for (int z = 1; z <= model.Col; z++)
@@ -974,5 +975,63 @@
         }
 
         #endregion
+
+        /// <summary>
+        /// 鑾峰彇鍌ㄤ綅淇℃伅(瀵嗛泦搴�)
+        /// </summary>
+        /// <param name="wareHouseNo">浠撳簱</param>
+        /// <param name="row">鎺�</param>
+        /// <returns></returns>
+        public async Task<BordModelVM> GetFlatLegend(string wareHouseNo, int layer)
+        {
+            var list = await Db.Queryable<SysStorageLocat>().Where(s => s.WareHouseNo == wareHouseNo && s.Layer == layer && s.IsDel == "0").ToListAsync();
+            BordModelVM listBord = new BordModelVM()
+            {
+                Col = 15,
+                Row = 21
+            };
+
+            foreach (var modLocat in list)
+            {
+                SlotsVm mod = new SlotsVm()
+                {
+                    SlotColumn = modLocat.Column,
+                    SlotRow = modLocat.Row,
+                    SlotCode = modLocat.LocatNo,
+                    //SlotStatusCls = modLocat.Flag!="0"? "eight": modLocat.Status == "0"? "zero":,
+                    Make = modLocat.Make
+                };
+                if (modLocat.Flag != "0")
+                    mod.SlotStatusCls = "eight";
+                switch (modLocat.Status)
+                {
+                    case "0":
+                        mod.SlotStatusCls = "zero";
+                        break;
+                    case "1":
+                        mod.SlotStatusCls = "one";
+                        break;
+                    case "2":
+                        mod.SlotStatusCls = "two";
+                        break;
+                    case "3":
+                        mod.SlotStatusCls = "three";
+                        break;
+                    case "4":
+                        mod.SlotStatusCls = "four";
+                        break;
+                    case "5":
+                        mod.SlotStatusCls = "five";
+                        break;
+                    default:
+                        break;
+                }
+                listBord.SlotsVm.Add(mod);
+            }
+
+            return listBord;
+
+        }
+
     }
 }

--
Gitblit v1.8.0