正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -85,7 +85,7 @@ class TicketCount extends Command | @@ -85,7 +85,7 @@ class TicketCount extends Command | ||
| 85 | $timeCount = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1])->sum('end_time'); | 85 | $timeCount = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1])->sum('end_time'); |
| 86 | $complete_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]]); | 86 | $complete_num = $ticketLogModel->counts(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]]); |
| 87 | if(!empty($timeCount)){ | 87 | if(!empty($timeCount)){ |
| 88 | - $average_time = round($timeCount / $complete_num, 2); | 88 | + $average_time = round($timeCount / $complete_num, 4); |
| 89 | } | 89 | } |
| 90 | //最快完成的时间 | 90 | //最快完成的时间 |
| 91 | $fastest_time = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]])->min('end_time'); | 91 | $fastest_time = $ticketLogModel->formatQuery(['engineer_id'=>$item['manage_id'],'is_engineer'=>1,'end_at'=>['!=',null]])->min('end_time'); |
| @@ -145,12 +145,12 @@ class TicketCount extends Command | @@ -145,12 +145,12 @@ class TicketCount extends Command | ||
| 145 | $ticket_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1]); | 145 | $ticket_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1]); |
| 146 | $timeCount = $ticketLogModel->formatQuery(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1])->sum('end_time'); | 146 | $timeCount = $ticketLogModel->formatQuery(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1])->sum('end_time'); |
| 147 | if(!empty($timeCount)){ | 147 | if(!empty($timeCount)){ |
| 148 | - $average_time = round($timeCount / $ticket_num, 2); | 148 | + $average_time = round($timeCount / $ticket_num, 4); |
| 149 | } | 149 | } |
| 150 | //超期工单数量 | 150 | //超期工单数量 |
| 151 | $timeout_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]); | 151 | $timeout_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1,'plan_end_at'=>['>',date('Y-m-d H:i:s')]]); |
| 152 | if(!empty($timeout_num)){ | 152 | if(!empty($timeout_num)){ |
| 153 | - $timeout_ratio = round($timeout_num / $ticket_num, 2); | 153 | + $timeout_ratio = round($timeout_num / $ticket_num, 4); |
| 154 | } | 154 | } |
| 155 | $data = [ | 155 | $data = [ |
| 156 | 'date'=>$date, | 156 | 'date'=>$date, |
| @@ -185,7 +185,7 @@ class TicketCount extends Command | @@ -185,7 +185,7 @@ class TicketCount extends Command | ||
| 185 | $time_end_num = $ticketModel->counts(['end_at'=>['!=',null]]);//已完成的工单 | 185 | $time_end_num = $ticketModel->counts(['end_at'=>['!=',null]]);//已完成的工单 |
| 186 | $time_end_count = $ticketModel->formatQuery(['end_at'=>['!=',null]])->sum('end_time');//已完成工单时长 | 186 | $time_end_count = $ticketModel->formatQuery(['end_at'=>['!=',null]])->sum('end_time');//已完成工单时长 |
| 187 | if(!empty($time_end_count)){ | 187 | if(!empty($time_end_count)){ |
| 188 | - $average_time = round($time_end_count / $time_end_num, 2); | 188 | + $average_time = round($time_end_count / $time_end_num, 4); |
| 189 | } | 189 | } |
| 190 | $add_num = $ticketModel->counts(['created_at'=>['between',[$date.' 00:00:00',$date.' 23:59:59']]]); | 190 | $add_num = $ticketModel->counts(['created_at'=>['between',[$date.' 00:00:00',$date.' 23:59:59']]]); |
| 191 | $untreated_num = $ticketModel->counts(['end_at'=>null]); | 191 | $untreated_num = $ticketModel->counts(['end_at'=>null]); |
-
请 注册 或 登录 后发表评论