IPC-610
2024-09-28 a8eaf0a6432009e06b471bc965015e8ef2835b1d
Wms/WMS.BLL/SysServer/StorageLocatServer.cs
@@ -110,6 +110,7 @@
            try
            {
                var data = LocatRst.GetOneById(id);
                //var data = Db.Queryable<SysStorageLocat>().First(m=>m.Id == id);
                return data;
            }
            catch (Exception e)
@@ -118,7 +119,24 @@
                throw;
            }
        }
        public List<SysStorageLocat> GetStorageLocat(List<int> id)
        {
            try
            {
                var SysStorageLocats = new List<SysStorageLocat>();
                foreach (var item in id)
                {
                    var storage = LocatRst.GetOneById(item);
                    SysStorageLocats.Add(storage);
                }
                return SysStorageLocats;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
        public bool EditStorageLocat(EditLocateVm model, int userId)
        {
@@ -473,8 +491,8 @@
                int b = 0; //1:有物品 
                int c = 0; //2:入库中 
                int d = 0; //3:出库中 
                //int e = 0; //4:移入中
                //int f = 0; //5:移出中
                int e = 0; //4:移入中
                int f = 0; //5:移出中
                int g = 0; //6:损坏\屏蔽 
                foreach (var item in getLocateVms)
@@ -503,18 +521,18 @@
                        d = 1; //3:出库中 
                        continue;
                    }
                    ////4:移入中
                    //if (item.Status == "4")
                    //{
                    //    e = 1; //4:移入中
                    //    continue;
                    //}
                    ////5:移出中
                    //if (item.Status == "5")
                    //{
                    //    f = 1; //5:移出中
                    //    continue;
                    //}
                    //4:移入中
                    if (item.Status == "4")
                    {
                        e = 1; //4:移入中
                        continue;
                    }
                    //5:移出中
                    if (item.Status == "5")
                    {
                        f = 1; //5:移出中
                        continue;
                    }
                    //6:损坏\屏蔽 
                    if (item.Status == "6")
                    {
@@ -559,24 +577,24 @@
                    getLocateVm.Status = "3";
                    getLocateVms.Add(getLocateVm);
                }
                ////4:移入中
                //if (e == 0)
                //{
                //    getLocateVm = new GetLocateVm();
                //    getLocateVm.WareHouseNo = wareHouseNo; //仓库号
                //    getLocateVm.StatusNum = "0";
                //    getLocateVm.Status = "4";
                //    getLocateVms.Add(getLocateVm);
                //}
                ////5:移出中
                //if (f == 0)
                //{
                //    getLocateVm = new GetLocateVm();
                //    getLocateVm.WareHouseNo = wareHouseNo; //仓库号
                //    getLocateVm.StatusNum = "0";
                //    getLocateVm.Status = "5";
                //    getLocateVms.Add(getLocateVm);
                //}
                //4:移入中
                if (e == 0)
                {
                    getLocateVm = new GetLocateVm();
                    getLocateVm.WareHouseNo = wareHouseNo; //仓库号
                    getLocateVm.StatusNum = "0";
                    getLocateVm.Status = "4";
                    getLocateVms.Add(getLocateVm);
                }
                //5:移出中
                if (f == 0)
                {
                    getLocateVm = new GetLocateVm();
                    getLocateVm.WareHouseNo = wareHouseNo; //仓库号
                    getLocateVm.StatusNum = "0";
                    getLocateVm.Status = "5";
                    getLocateVms.Add(getLocateVm);
                }
                //6:损坏\屏蔽 
                if (g == 0)
                {
@@ -672,7 +690,7 @@
                    throw new Exception("未找到对应储位");
                }
                //有物品、出库中数据源(库存明细表)
                if (storageLocat.Status == "1" || storageLocat.Status == "3")
                if (storageLocat.Status == "1" || storageLocat.Status == "3" || storageLocat.Status == "5")
                {
                    //库存明细
                    List<DataStockDetail> stockDetailList = Db.Queryable<DataStockDetail>().Where(w => w.LocatNo == locatNo && w.IsDel == "0").ToList();
@@ -750,6 +768,12 @@
                    case "3":
                        model.Status = "出库中";
                        break;
                    case "4":
                        model.Status = "移入中";
                        break;
                    case "5":
                        model.Status = "移出中";
                        break;
                    default:
                        model.Status = "";
                        break;