bklLiudl
2024-08-23 62b3bf8205277b9bdceaa83f0d7e5d73312e1780
Wms/WMS.BLL/SysServer/StorageLocatServer.cs
@@ -59,7 +59,7 @@
                    .ToExpression();//注意 这一句 不能少
                var data = LocatRst.GetAllByOrderPageAsync(item, limit, page, out int counts)
                var data = LocatRst.GetAllByOrderPage(item, limit, page, out int counts)
                    .Includes(x => x.WareHouseInfo)
                    .Includes(x => x.AreaInfo)
                    .Includes(x => x.RoadwayInfo)
@@ -119,12 +119,25 @@
            }
        }
        public List<SysStorageLocat> GetStorageLocat()
        {
            try
            {
                var data = LocatRst.GetAll().ToList();
                return data;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
        public bool EditStorageLocat(EditLocateVm model, string url, int userId)
        {
            try
            {
                var bl = LocatRst.EditStorageLocat(model.Id, model.Status, model.Flag, model.Temperature, url, userId);
                var bl = LocatRst.EditStorageLocat(model.Id,model.AreaNo, model.Status, model.Flag, model.Temperature, url, userId);
                return bl;
            }
@@ -234,12 +247,30 @@
            try
            {
                var q = 0;
                var depth = 0;
                var depthString = "";
                // 排(组)循环
                for (int i = 1; i <= model.Row; i++)
                {
                    // 列循环
                    for (int z = 1; z <= model.Col; z++)
                    {
                        if (z == 1)
                        {
                            depth += 1;
                            if (depth >= 10)
                            {
                                depthString = depth.ToString();
                            }
                            else if (depth < 10)
                            {
                                depthString = "0" + depth.ToString();
                            }
                            else {
                                //其余条件
                            }
                        }
                        q += await LocatRst.AddAsync(new SysStorageLocat()
                        {
                            // 区域+排+列+层
@@ -251,7 +282,7 @@
                            AisleOne = "1",
                            AisleTwo = "",
                            Flag = "0",
                            Depth = z.ToString(),
                            Depth = depthString,
                            Row = i,
                            Column = z,
                            Layer = 1,
@@ -272,7 +303,7 @@
        {
            try
            {
                var bl = LocatRst.EditStorageLocatList(model.Id, model.Status, model.Flag, model.Temperature, url, userId);
                var bl = LocatRst.EditStorageLocatList(model.Id, model.AreaNo, model.Status, model.Flag, model.Temperature, url, userId);
                return bl;
            }