From f85db70c20930e1ca24e6b856744bafa1662438d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 30 Dec 2022 14:46:20 +0800 Subject: [PATCH] * adjust for save weekly. --- module/weekly/model.php | 9 +++------ module/weekly/view/index.html.php | 5 +---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/module/weekly/model.php b/module/weekly/model.php index 2345721663..92728440b6 100755 --- a/module/weekly/model.php +++ b/module/weekly/model.php @@ -116,13 +116,9 @@ class weeklyModel extends model public function save($project, $date) { $weekStart = $this->getThisMonday($date); - $this->dao->delete()->from(TABLE_WEEKLYREPORT) - ->where('project')->eq($project) - ->andWhere('weekStart')->eq($weekStart) - ->exec(); + $report = new stdclass(); + $PVEV = $this->getPVEV($project, $date); - $report = new stdclass; - $PVEV = $this->getPVEV($project, $date); $report->pv = $PVEV['PV']; $report->ev = $PVEV['EV']; $report->ac = $this->getAC($project, $date); @@ -402,6 +398,7 @@ class weeklyModel extends model $this->loadModel('holiday'); while($task = $stmt->fetch()) { + if(empty($task->execution)) continue; $execution = $executions[$task->execution]; if(helper::isZeroDate($task->estStarted)) $task->estStarted = $execution->begin; if(helper::isZeroDate($task->deadline)) $task->deadline = $execution->end; diff --git a/module/weekly/view/index.html.php b/module/weekly/view/index.html.php index 4a7c9594b7..668beb1f1b 100644 --- a/module/weekly/view/index.html.php +++ b/module/weekly/view/index.html.php @@ -13,10 +13,7 @@