From 00e5e4ceb7558042e81597cc5b91f98746cf338d Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 15 Jan 2024 19:14:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/Model/TaskStages.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/application/common/Model/TaskStages.php b/application/common/Model/TaskStages.php index 33cce1a..4da9247 100755 --- a/application/common/Model/TaskStages.php +++ b/application/common/Model/TaskStages.php @@ -130,11 +130,10 @@ class TaskStages extends CommonModel $task['exchange_info'] = MemberAccount::whereIn('member_code', $arr)->field('member_code,name,avatar')->select(); $task['copied_info'] = MemberAccount::whereIn('member_code', $arr2)->field('member_code,name,avatar')->select(); $endTime = strtotime($task['end_time']); - $createTime = strtotime($task['create_time']); $task['timeout']=0; $task['department_name']=Department::where('code',$task['department'])->value('name'); - if ($endTime > $createTime) { - $timeDifference = abs($endTime - $createTime); + if ($endTime < time()) { + $timeDifference = abs(time() - $endTime); // 计算天数 $days = bcdiv($timeDifference,86400,2); $task['timeout']=$days.'天';