chengsc
2025-05-07 48df8080d7befac9fff4f5345750699c592512f6
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -1797,21 +1797,22 @@
                foreach (var s in stockDetail)
                {
                    //获取储位信息
                    var locat = await Db.Queryable<SysStorageLocat>().FirstAsync(l => l.LocatNo == s.LocatNo && l.IsDel == "0" && l.WareHouseNo == "W01");
                    var locat = await Db.Queryable<SysStorageLocat>().FirstAsync(l => l.LocatNo == s.LocatNo && l.IsDel == "0" && l.WareHouseNo == "W02");
                    if (locat != null)
                    if (locat == null)
                    {
                        if (locat.Status != "1")
                        {
                            continue;
                        }
                        //更改储位状态为出库中
                        locat.Status = "3"; //3 出库中
                        locat.UpdateTime = serverTime; //修改时间
                        locat.UpdateUser = userId; //修改人
                        //修改储位信息
                        await Db.Updateable(locat).ExecuteCommandAsync();
                        throw new Exception("储位上没有空托盘跺");
                    }
                    if (locat.Status != "1")
                    {
                        continue;
                    }
                    //更改储位状态为出库中
                    locat.Status = "3"; //3 出库中
                    locat.UpdateTime = serverTime; //修改时间
                    locat.UpdateUser = userId; //修改人
                                               //修改储位信息
                    await Db.Updateable(locat).ExecuteCommandAsync();
                    //增加库存锁定数量
                    //stock.AllotQty +=
@@ -1897,7 +1898,8 @@
                        TaskNo = exTask.TaskNo, // 任务号
                        TaskType = "1",// 任务类型 (出库)
                        OutMode = model.OutMode,  //目标地址
                        Order = 1
                        Order = 1,
                        Type = PLCTypeEnum.AGV
                    });
                    await Db.Insertable(exTask).ExecuteCommandAsync();
@@ -1952,13 +1954,13 @@
                var k = new OperationSOServer().AddLogOperationSo("PDA模块", "空托出库", i + "", "下发", $"用PDA下发了 {i} 个空托垛", userId);
                Db.CommitTran();
                return "";
                return "成功";
            }
            catch (Exception e)
            {
                Db.RollbackTran();
                return "";
                return e.Message;
            }
        }