刘磊
2025-08-25 4c308eab6106324bd40e6ad7fd9e769a5cedcedf
ÏîÄ¿´úÂë/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)