|
...
|
...
|
@@ -122,14 +122,14 @@ class TicketCount extends Command |
|
|
|
*/
|
|
|
|
public function dept_action(){
|
|
|
|
$belongingGroupModel = new BelongingGroup();
|
|
|
|
$groupList = $belongingGroupModel->list(['id'=>['in',[1,2,3,4,5,6,7,8,9],'dept_id'=>1]],'id',['id','name']);
|
|
|
|
$groupList = $belongingGroupModel->list(['id'=>['in',[1,2,3,4,5,6,7,8,9]]],'id',['id','name']);
|
|
|
|
$manageHrModel = new ManageHr();
|
|
|
|
$ticketLogModel = new TicketLog();
|
|
|
|
$ticketDailyDeptModel = new TicketDailyDeptCount();
|
|
|
|
$date = Carbon::yesterday()->toDateString(); // "2025-08-07"
|
|
|
|
foreach ($groupList as $item){
|
|
|
|
$this->output('组统计:执行的组/id:'.$item['name'].'/'.$item['id']);
|
|
|
|
$manageIdArr = $manageHrModel->selectField(['belong_group'=>$item['id'],'status'=>1],'manage_id');
|
|
|
|
$manageIdArr = $manageHrModel->selectField(['belong_group'=>$item['id'],'status'=>1,'dept_id'=>1],'manage_id');
|
|
|
|
$ticket_num = $ticketLogModel->counts(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1]);
|
|
|
|
$timeCount = $ticketLogModel->formatQuery(['engineer_id'=>['in',$manageIdArr],'is_engineer'=>1])->sum('end_time');
|
|
|
|
if(!empty($timeCount)){
|
...
|
...
|
|