From 1ab9c0728ee125c03ca0565ffa8260b0ca394db8 Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期三, 25 六月 2025 17:10:56 +0800 Subject: [PATCH] 修正 HtmlElementType 枚举值的大小写匹配 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 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 3d56886..81c370b 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs @@ -144,9 +144,12 @@ List<DtStockInfoDetail> detail = _stockInfoDetailRepository.QueryData(x => x.StockId == stock.Id).ToList(); if (detail != null && detail.Count() > 0) { + List<DtStockInfoDetail_Hty> details = detail.Adapt<List<DtStockInfoDetail_Hty>>(); await DeleteStockInfoDetailsAsync(detail); + AddStockInfoDetailHty(details); } await AddStockInfoHtyAsync(stockInfo_Hty); + location.LocationStatus = (int)LocationEnum.Lock; BaseDal.UpdateData(location); @@ -179,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++) { @@ -195,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, }); } @@ -397,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("搴撳瓨鍘嗗彶淇℃伅娣诲姞澶辫触"); @@ -413,6 +416,16 @@ throw new Exception("搴撳瓨璇︽儏淇℃伅鏇存柊澶辫触"); } } + private void AddStockInfoDetailHty(List<DtStockInfoDetail_Hty> details) + { + + var isStockAdd = SqlSugarHelper.DbWMS.Insertable(details).ExecuteCommand(); + if (isStockAdd==0) + { + throw new Exception("搴撳瓨鏄庣粏鍘嗗彶淇℃伅娣诲姞澶辫触"); + } + } + #endregion #endregion 鍐呴儴鏂规硶 -- Gitblit v1.9.3