服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2025-03-12 0a68c7142da0814044f81b7081e702b0f72078ef
雅达-修复 WmsTask.cs 中的空引用问题

在 `WmsTask.cs` 文件中,使用安全导航运算符 `?.` 修改了对 `CurInvItem.Location.LOCATION_CODE` 的访问方式,以防止在 `CurInvItem.Location` 为 `null` 时引发异常。这一改动提高了代码的健壮性,避免了潜在的空引用错误。
已修改1个文件
2 ■■■ 文件已修改
Tiger.Business.WMS/Common/WmsTask.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.WMS/Common/WmsTask.cs
@@ -144,7 +144,7 @@
                var location = Biz.Db.Queryable<V_WH_UNIT>().Where(q => q.LOCATION_CODE == targetLocation && q.AUTH_ORG == option.CurOrg).IncludesAllFirstLayer().First();
                if (!location.IsNullOrEmpty())
                {
                    var isTransfer = CurInvItem.Location.LOCATION_CODE != location.LOCATION_CODE;
                    var isTransfer = CurInvItem.Location?.LOCATION_CODE != location.LOCATION_CODE;
                    foreach (var item in CurInvItem.Items)
                    {
                        item.STATUS = WMS_ITEM.STATUSs.InStore.GetValue();