From 4c308eab6106324bd40e6ad7fd9e769a5cedcedf Mon Sep 17 00:00:00 2001 From: 刘磊 <1161824510@qq.com> Date: 星期一, 25 八月 2025 15:46:58 +0800 Subject: [PATCH] 代码同步 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs" index ba7b1fb..af5a165 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs" @@ -202,7 +202,7 @@ stockInfo_Hty.ModifyDate = DateTime.Now; await DeleteStockInfoAsync(stock.Id); List<DtStockInfoDetail> detail = _stockInfoDetailRepository.QueryData(x => x.StockId == stock.Id).ToList(); - if (detail != null && detail.Count() > 0) + if (detail is not null && detail.Count() > 0) { List<DtStockInfoDetail_Hty> details = detail.Adapt<List<DtStockInfoDetail_Hty>>(); await DeleteStockInfoDetailsAsync(detail); @@ -253,12 +253,12 @@ Row = line, Column = column, Layer = layer, - LocationCode = line.ToString().PadLeft(3, '0') + '-' + column.ToString().PadLeft(3, '0') + '-' + layer.ToString().PadLeft(3, '0'), + LocationCode = 'B' + line.ToString().PadLeft(2, '0') + '-' + column.ToString().PadLeft(2, '0') + '-' + layer.ToString().PadLeft(2, '0'), LocationName = ConvertToFormattedString(line, column, layer), - LocationType = 1, + LocationType = 2, Remark = "", - Depth = locType > 1 ? (((line - 1) % 4) + 1) == 2 || (((line - 1) % 4) + 1) == 3 ? 1 : 2 : 1, - RoadwayNo = locType > 1 ? $"SC{((line - 1) / 4) + 1}" : $"SC{((line - 1) / 2) + 1}", + Depth = 1,//locType > 1 ? (((line - 1) % 4) + 1) == 2 || (((line - 1) % 4) + 1) == 3 ? 1 : 2 : 1, + RoadwayNo = "AGV", //locType > 1 ? $"SC{((line - 1) / 4) + 1}" : $"SC{((line - 1) / 2) + 1}" LocationStatus = LocationEnum.Free.ObjToInt(), AreaId = areaId, Creater = "systeam", @@ -320,7 +320,7 @@ var data = BaseDal.QueryData(x => x.AreaId == Convert.ToInt32(area.areaCode)); List<LocationLayer> layers = new List<LocationLayer>(); - foreach (var layer in data.GroupBy(t => t.Layer)) + foreach (var layer in data.GroupBy(t => t.Column)) { var rows = new List<LocationRow>(); var data_rows = layer.GroupBy(t => t.Row); @@ -332,7 +332,8 @@ cols.Add(new LocationCol() { //鍒� - index = data_col.Column, + index = data_col.Layer, + locationCode = data_col.LocationCode, location_state = data_col.LocationStatus.ToString(), location_lock = data_col.LocationStatus.ToString(), }); @@ -350,6 +351,7 @@ { //灞� index = layer.Key, + //locationCode = layer.LocationCode, rows = rows }); } @@ -542,7 +544,7 @@ string layerString = ConvertNumberToChineseString(layer); // 鏍煎紡鍖栬緭鍑� - return $"{lineString}琛寋columnString}鍒梴layerString}灞�"; + return $"B{lineString}琛寋columnString}灞倇layerString}涓�"; } public static string ConvertNumberToChineseString(int number) -- Gitblit v1.9.3