作者 lyh

gx

... ... @@ -44,6 +44,15 @@ class TicketController extends BaseController
* @time :2025/8/11 14:24
*/
public function manageTicketCount(){
$this->request->validate([
'dept_id' => 'required',
],[
'dept_id.required' => '技术组id',
]);
$this->order = 'ticket_num';
$sort = $this->map['sort'] ?? 'desc';
unset($this->map['sort']);
$data = $this->logic->getManageTicketCount($this->map,$this->order,$sort);
$this->response('success',Code::SUCCESS,$data);
}
}
... ...
... ... @@ -61,4 +61,18 @@ class TicketLogic extends BaseLogic
return $this->success($data);
}
/**
* @remark :根据技术组获取
* @name :getManageTicketCount
* @author :lyh
* @method :post
* @time :2025/8/11 14:41
*/
public function getManageTicketCount($map,$order = 'ticket_num',$desc = 'desc'){
$manageModel = new TicketDailyManageCount();
$map['date'] = Carbon::yesterday()->toDateString();
$manageList = $manageModel->list($map,$order,['*'],$desc,['*']);
return $this->success($manageList);
}
}
... ...
... ... @@ -762,6 +762,7 @@ Route::middleware(['bloginauth'])->group(function () {
//ticket
Route::prefix('ticket_count')->group(function () {
Route::any('/ticketCount', [\App\Http\Controllers\Bside\Ticket\TicketController::class,'ticketCount'])->name('ticket_count_ticketCount');
Route::any('/manageTicketCount', [\App\Http\Controllers\Bside\Ticket\TicketController::class,'manageTicketCount'])->name('ticket_count_manageTicketCount');
});
});
//无需登录验证的路由组
... ...