This commit is contained in:
mkm 2024-01-15 19:14:58 +08:00
parent c06de387de
commit 00e5e4ceb7

@ -130,11 +130,10 @@ class TaskStages extends CommonModel
$task['exchange_info'] = MemberAccount::whereIn('member_code', $arr)->field('member_code,name,avatar')->select(); $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(); $task['copied_info'] = MemberAccount::whereIn('member_code', $arr2)->field('member_code,name,avatar')->select();
$endTime = strtotime($task['end_time']); $endTime = strtotime($task['end_time']);
$createTime = strtotime($task['create_time']);
$task['timeout']=0; $task['timeout']=0;
$task['department_name']=Department::where('code',$task['department'])->value('name'); $task['department_name']=Department::where('code',$task['department'])->value('name');
if ($endTime > $createTime) { if ($endTime < time()) {
$timeDifference = abs($endTime - $createTime); $timeDifference = abs(time() - $endTime);
// 计算天数 // 计算天数
$days = bcdiv($timeDifference,86400,2); $days = bcdiv($timeDifference,86400,2);
$task['timeout']=$days.'天'; $task['timeout']=$days.'天';