正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -122,14 +122,14 @@ class TicketCount extends Command | @@ -122,14 +122,14 @@ class TicketCount extends Command | ||
| 122 | */ | 122 | */ |
| 123 | public function dept_action(){ | 123 | public function dept_action(){ |
| 124 | $belongingGroupModel = new BelongingGroup(); | 124 | $belongingGroupModel = new BelongingGroup(); |
| 125 | - $groupList = $belongingGroupModel->list(['id'=>['in',[1,2,3,4,5,6,7,8,9],'dept_id'=>1]],'id',['id','name']); | 125 | + $groupList = $belongingGroupModel->list(['id'=>['in',[1,2,3,4,5,6,7,8,9]]],'id',['id','name']); |
| 126 | $manageHrModel = new ManageHr(); | 126 | $manageHrModel = new ManageHr(); |
| 127 | $ticketLogModel = new TicketLog(); | 127 | $ticketLogModel = new TicketLog(); |
| 128 | $ticketDailyDeptModel = new TicketDailyDeptCount(); | 128 | $ticketDailyDeptModel = new TicketDailyDeptCount(); |
| 129 | $date = Carbon::yesterday()->toDateString(); // "2025-08-07" | 129 | $date = Carbon::yesterday()->toDateString(); // "2025-08-07" |
| 130 | foreach ($groupList as $item){ | 130 | foreach ($groupList as $item){ |
| 131 | $this->output('组统计:执行的组/id:'.$item['name'].'/'.$item['id']); | 131 | $this->output('组统计:执行的组/id:'.$item['name'].'/'.$item['id']); |
| 132 | - $manageIdArr = $manageHrModel->selectField(['belong_group'=>$item['id'],'status'=>1],'manage_id'); | 132 | + $manageIdArr = $manageHrModel->selectField(['belong_group'=>$item['id'],'status'=>1,'dept_id'=>1],'manage_id'); |
| 133 | $ticket_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1]); | 133 | $ticket_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1]); |
| 134 | $timeCount = $ticketLogModel->formatQuery(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1])->sum('end_time'); | 134 | $timeCount = $ticketLogModel->formatQuery(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1])->sum('end_time'); |
| 135 | if(!empty($timeCount)){ | 135 | if(!empty($timeCount)){ |
-
请 注册 或 登录 后发表评论