From 358e54302d5cc4053c826b61542d5a648c122604 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 6 Sep 2022 15:26:01 +0800 Subject: [PATCH] * fix bug #27292. --- module/weekly/model.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/module/weekly/model.php b/module/weekly/model.php index 54600cea55..9b0c96b94b 100755 --- a/module/weekly/model.php +++ b/module/weekly/model.php @@ -240,6 +240,7 @@ class weeklyModel extends model ->andWhere("(status='done' or closedReason= 'done')") ->andWhere('finishedDate')->ge($monday) ->andWhere('finishedDate')->le($sunday) + ->andWhere('deleted')->eq(0) ->fetchAll(); return $this->loadModel('task')->processTasks($tasks); } @@ -267,6 +268,7 @@ class weeklyModel extends model ->andWhere('status')->in('wait,doing,pause') ->andWhere('deadline')->ge($monday) ->andWhere('deadline')->le($sunday) + ->andWhere('deleted')->eq(0) ->fetchAll('id'); $postponed = $this->dao->select('*') @@ -275,6 +277,7 @@ class weeklyModel extends model ->andWhere('finishedDate')->gt($nextMonday) ->andWhere('deadline')->ge($monday) ->andWhere('deadline')->lt($nextMonday) + ->andWhere('deleted')->eq(0) ->fetchAll('id'); $tasks = array_merge($unFinished, $postponed); @@ -303,6 +306,7 @@ class weeklyModel extends model ->from(TABLE_TASK) ->where('execution')->in($executionIdList) ->andWhere("((deadline > '$nextMonday' and deadline < '$sencondMondy') or (estStarted > '$nextMonday' and estStarted < '$sencondMondy'))") + ->andWhere('deleted')->eq(0) ->fetchAll('id'); return $this->loadModel('task')->processTasks($tasks); @@ -330,6 +334,7 @@ class weeklyModel extends model return $this->dao->select('type, sum(cast(estimate as decimal(10,2))) as workload') ->from(TABLE_TASK) ->where('execution')->in($executionIdList) + ->andWhere('deleted')->eq(0) ->groupBy('type') ->fetchPairs(); } @@ -355,6 +360,7 @@ class weeklyModel extends model ->from(TABLE_TASK) ->where('execution')->in($executionIdList) ->andWhere('deadline')->ge($monday) + ->andWhere('deleted')->eq(0) ->fetchAll('id'); } @@ -385,8 +391,7 @@ class weeklyModel extends model ->where('execution')->in($executionIdList) ->andWhere("parent")->ge(0) ->andWhere("deleted")->eq(0) - ->andWhere("estStarted")->ge($monday) - ->andWhere("estStarted")->lt($nextMonday) + ->andWhere("((estStarted >= '$monday' AND estStarted < '$nextMonday') OR (deadline >= '$monday' AND deadline < '$nextMonday') OR (estStarted < '$monday' AND deadline > '$nextMonday'))") ->fetchAll('id'); $PV = 0;