This commit is contained in:
2025-10-13 15:14:02 +02:00
parent 9f95bb23e6
commit effdc317c2
4 changed files with 10 additions and 26 deletions

View File

@@ -179,9 +179,9 @@ public class ManageDataService(
activities = await localDb.Get<StbActivity>(x =>
(whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) ||
(whereCond.Start != null && whereCond.End != null && x.EffectiveDate == null &&
x.EstimatedDate >= whereCond.Start && x.EstimatedDate <= whereCond.End) ||
(x.EffectiveDate >= whereCond.Start && x.EffectiveDate <= whereCond.End) ||
(whereCond.Start != null && whereCond.End != null && x.EffectiveTime == null &&
x.EstimatedTime >= whereCond.Start && x.EstimatedTime <= whereCond.End) ||
(x.EffectiveTime >= whereCond.Start && x.EffectiveTime <= whereCond.End) ||
(whereCond.ActivityId == null && (whereCond.Start == null || whereCond.End == null))
);
@@ -223,9 +223,9 @@ public class ManageDataService(
{
activities = await localDb.Get<StbActivity>(x =>
(whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) ||
(whereCond.Start != null && whereCond.End != null && x.EffectiveDate == null &&
x.EstimatedDate >= whereCond.Start && x.EstimatedDate <= whereCond.End) ||
(x.EffectiveDate >= whereCond.Start && x.EffectiveDate <= whereCond.End) ||
(whereCond.Start != null && whereCond.End != null && x.EffectiveTime == null &&
x.EstimatedTime >= whereCond.Start && x.EstimatedTime <= whereCond.End) ||
(x.EffectiveTime >= whereCond.Start && x.EffectiveTime <= whereCond.End) ||
(whereCond.ActivityId == null && (whereCond.Start == null || whereCond.End == null))
);
}