chengsc
2024-08-03 8d39b5ce375fcdf8397202e9a4d2732ffaae0a26
Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -2024,10 +2024,7 @@
                var stockDetail = Db.Queryable<DataStockDetail>().Where(m => m.PalletNo == task.PalletNo).ToList();
                //当前任务中的储位信息
                var locate = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == task.EndLocat);
                if (locate == null)
                {
                    throw new Exception($"未查询到任务中的储位信息");
                }
                //获取箱码信息
                var box1 = Db.Queryable<BllBoxInfo>().First(a => a.PalletNo == task.PalletNo && a.IsDel == "0" && a.Status != "2");
@@ -2049,6 +2046,11 @@
                    locate.Status = "1";
                    Db.Updateable(locate).ExecuteCommand();
                    return;
                }
                // 判断储位是否为空
                if (locate == null)
                {
                    throw new Exception($"未查询到任务中的储位信息");
                }
                //判断是否是回流入库完成
                if (stockDetail.Any())
@@ -2790,13 +2792,11 @@
                    Db.Updateable(bind).ExecuteCommand();
                }
                var locate = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == task.EndLocat);
                if (locate == null)
                if (locate != null)
                {
                    throw new Exception("未查询道储位信息");
                    locate.Status = "0"; //修改储位状态
                    Db.Updateable(locate).ExecuteCommand();
                }
                locate.Status = "0"; //修改储位状态
                Db.Updateable(locate).ExecuteCommand();
                //添加操作日志记录
                var k = new OperationASNServer().AddLogOperationAsn("入库作业", "入库日志", taskNo, "取消", $"点击取消按钮取消了任务号为:{taskNo}的任务", (int)userId);
@@ -2804,6 +2804,7 @@
            }
            catch (Exception e)
            {
                Db.RollbackTran();
                throw new Exception(e.Message);
            }
        }