From 8c8532db8fc7fa76b7fe4c254a36d67c6af24ace Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 11 六月 2025 14:46:33 +0800
Subject: [PATCH] 添加物料编码字段并更新查询逻辑

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
index d737843..81c370b 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
@@ -182,7 +182,7 @@
     {
         string[] chineseNumbers = new string[] { "闆�", "涓�", "浜�", "涓�", "鍥�", "浜�", "鍏�", "涓�", "鍏�", "涔�" };
         var locationList = new List<DtLocationInfo>();
-        for (int line = 3; line <= x; line++)
+        for (int line = 1; line <= x; line++)
         {
             for (int column = 1; column <= y; column++)
             {
@@ -198,10 +198,10 @@
                         LocationType = locType,
                         Remark = "",
                         Depth = locType > 1 ? (((line - 1) % 4) + 1) == 2 || (((line - 1) % 4) + 1) == 3 ? 1 : 2 : 1,
-                        RoadwayNo = locType > 1 ? $"JZSC{((line - 1) / 4) + 1}" : $"JZSC{((line - 1) / 2) + 1}",
+                        RoadwayNo = locType > 1 ? $"CHSC{((line - 1) / 4) + 1}" : $"CHSC{((line - 1) / 2) + 1}",
                         LocationStatus = LocationEnum.Free.ObjToInt(),
                         AreaId = areaId,
-                        Creater = "systeam",
+                        Creater = "System",
                         EnalbeStatus = 2,
                     });
                 }
@@ -400,7 +400,7 @@
 
     private async Task AddStockInfoHtyAsync(DtStockInfo_Hty dtStock)
     {
-        var isStockAdd = await SqlSugarHelper.Db.InsertNav(dtStock).IncludesAllFirstLayer().ExecuteCommandAsync();
+        var isStockAdd = await SqlSugarHelper.DbWMS.InsertNav(dtStock).IncludesAllFirstLayer().ExecuteCommandAsync();
         if (!isStockAdd)
         {
             throw new Exception("搴撳瓨鍘嗗彶淇℃伅娣诲姞澶辫触");
@@ -419,7 +419,7 @@
     private void AddStockInfoDetailHty(List<DtStockInfoDetail_Hty> details)
     {
 
-        var isStockAdd = SqlSugarHelper.Db.Insertable(details).ExecuteCommand();
+        var isStockAdd = SqlSugarHelper.DbWMS.Insertable(details).ExecuteCommand();
         if (isStockAdd==0)
         {
             throw new Exception("搴撳瓨鏄庣粏鍘嗗彶淇℃伅娣诲姞澶辫触");

--
Gitblit v1.9.3