| | |
| | | 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) |
| | |
| | | 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") |
| | | { |
| | |
| | | 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) |
| | | { |
| | |
| | | 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(); |
| | |
| | | case "3": |
| | | model.Status = "出库中"; |
| | | break; |
| | | case "4": |
| | | model.Status = "移入中"; |
| | | break; |
| | | case "5": |
| | | model.Status = "移出中"; |
| | | break; |
| | | default: |
| | | model.Status = ""; |
| | | break; |