diff --git a/Services/ThingDepreciationService.cs b/Services/ThingDepreciationService.cs index 073282ba9f8c3b4fb0bee8293530d619eda7931b..b8737667fce891c0214bc9bc109e320d9655c63f 100644 --- a/Services/ThingDepreciationService.cs +++ b/Services/ThingDepreciationService.cs @@ -147,27 +147,27 @@ public class ThingDepreciationService : ITransient { return OperateResult.Faild($"{period.Period} 已折旧!"); } - if (args.Type == "Confirm") - { - var coll = provider.TryGetCollection(token, "_system-things"); - if (coll.success) - { - var filter = Builders.Filter.And( - Builders.Filter.Eq("belongId", token.BelongId.ToString()), - Builders.Filter.Eq("isDeleted", false), - Builders.Filter.Exists("locks") - ); - var count = await coll.data.Find(filter).Limit(1).CountDocumentsAsync(); - if (count > 0) - { - return OperateResult.Faild($"存在锁定中资产,业务完结后可确认折旧!"); - } - } - else - { - return OperateResult.Faild($"获取 _system-things 集合失败!"); - } - } + // if (args.Type == "Confirm") + // { + // var coll = provider.TryGetCollection(token, "_system-things"); + // if (coll.success) + // { + // var filter = Builders.Filter.And( + // Builders.Filter.Eq("belongId", token.BelongId.ToString()), + // Builders.Filter.Eq("isDeleted", false), + // Builders.Filter.Exists("locks") + // ); + // var count = await coll.data.Find(filter).Limit(1).CountDocumentsAsync(); + // if (count > 0) + // { + // return OperateResult.Faild($"存在锁定中资产,业务完结后可确认折旧!"); + // } + // } + // else + // { + // return OperateResult.Faild($"获取 _system-things 集合失败!"); + // } + // } break; case "Revoke": if (!(period.depreciated ?? false))