合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !2544
正在显示
4 个修改的文件
包含
33 行增加
和
5 行删除
| @@ -72,7 +72,7 @@ class TicketCount extends Command | @@ -72,7 +72,7 @@ class TicketCount extends Command | ||
| 72 | public function manage_action(){ | 72 | public function manage_action(){ |
| 73 | $manageHrModel = new ManageHr(); | 73 | $manageHrModel = new ManageHr(); |
| 74 | $manageList = $manageHrModel->list(['status'=>1,'dept_id'=>['in',[1,2]]],'id',['id','dept_id','manage_id','name','nickname']); | 74 | $manageList = $manageHrModel->list(['status'=>1,'dept_id'=>['in',[1,2]]],'id',['id','dept_id','manage_id','name','nickname']); |
| 75 | - $date = date('Y-m-d'); | 75 | + $date = Carbon::yesterday()->toDateString(); // "2025-08-07" |
| 76 | $ticketManageCountModel = new TicketDailyManageCount(); | 76 | $ticketManageCountModel = new TicketDailyManageCount(); |
| 77 | foreach ($manageList as $item){ | 77 | foreach ($manageList as $item){ |
| 78 | $this->output('按人员统计:执行的人员名称/id:'.$item['name'].'/'.$item['manage_id']); | 78 | $this->output('按人员统计:执行的人员名称/id:'.$item['name'].'/'.$item['manage_id']); |
| @@ -126,7 +126,7 @@ class TicketCount extends Command | @@ -126,7 +126,7 @@ class TicketCount extends Command | ||
| 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 = date('Y-m-d'); | 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],'manage_id'); |
| @@ -44,6 +44,14 @@ class TicketController extends BaseController | @@ -44,6 +44,14 @@ class TicketController extends BaseController | ||
| 44 | * @time :2025/8/11 14:24 | 44 | * @time :2025/8/11 14:24 |
| 45 | */ | 45 | */ |
| 46 | public function manageTicketCount(){ | 46 | public function manageTicketCount(){ |
| 47 | - | 47 | + $this->request->validate([ |
| 48 | + 'dept_id' => 'required', | ||
| 49 | + ],[ | ||
| 50 | + 'dept_id.required' => '技术组id', | ||
| 51 | + ]); | ||
| 52 | + $this->order = 'ticket_num'; | ||
| 53 | + $sort = $this->map['sort'] ?? 'desc'; | ||
| 54 | + $data = $this->logic->getManageTicketCount($this->map,$this->order,$sort); | ||
| 55 | + $this->response('success',Code::SUCCESS,$data); | ||
| 48 | } | 56 | } |
| 49 | } | 57 | } |
| @@ -50,9 +50,9 @@ class TicketLogic extends BaseLogic | @@ -50,9 +50,9 @@ class TicketLogic extends BaseLogic | ||
| 50 | * @time :2025/8/11 10:57 | 50 | * @time :2025/8/11 10:57 |
| 51 | */ | 51 | */ |
| 52 | public function getDailyTicketCount(){ | 52 | public function getDailyTicketCount(){ |
| 53 | - $dailyModel = new TicketDailyCount(); | ||
| 54 | - $dailyList = $dailyModel->list([],'average_time',['*'],'desc',5);//取最近5条数据 | ||
| 55 | $date = Carbon::yesterday()->toDateString(); //昨日时间 | 53 | $date = Carbon::yesterday()->toDateString(); //昨日时间 |
| 54 | + $dailyModel = new TicketDailyCount(); | ||
| 55 | + $dailyList = $dailyModel->list(['date'=>$date],'average_time',['*'],'desc',5);//取最近5条数据 | ||
| 56 | $manageModel = new TicketDailyManageCount(); | 56 | $manageModel = new TicketDailyManageCount(); |
| 57 | $manageList = $manageModel->list(['date'=>$date],'average_time',['*'],'desc',5);//取最近5条数据 | 57 | $manageList = $manageModel->list(['date'=>$date],'average_time',['*'],'desc',5);//取最近5条数据 |
| 58 | $deptModel = new TicketDailyDeptCount(); | 58 | $deptModel = new TicketDailyDeptCount(); |
| @@ -61,4 +61,19 @@ class TicketLogic extends BaseLogic | @@ -61,4 +61,19 @@ class TicketLogic extends BaseLogic | ||
| 61 | return $this->success($data); | 61 | return $this->success($data); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | + /** | ||
| 65 | + * @remark :根据技术组获取 | ||
| 66 | + * @name :getManageTicketCount | ||
| 67 | + * @author :lyh | ||
| 68 | + * @method :post | ||
| 69 | + * @time :2025/8/11 14:41 | ||
| 70 | + */ | ||
| 71 | + public function getManageTicketCount($map,$order = 'ticket_num',$desc = 'desc'){ | ||
| 72 | + $manageModel = new TicketDailyManageCount(); | ||
| 73 | + unset($map['sort']); | ||
| 74 | + $map['date'] = Carbon::yesterday()->toDateString(); | ||
| 75 | + $manageList = $manageModel->list($map,$order,['*'],$desc,['*']); | ||
| 76 | + return $this->success($manageList); | ||
| 77 | + } | ||
| 78 | + | ||
| 64 | } | 79 | } |
| @@ -759,6 +759,11 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -759,6 +759,11 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 759 | Route::any('/countQuantity', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'countQuantity'])->name('geo_result_countQuantity');//geo统计 | 759 | Route::any('/countQuantity', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'countQuantity'])->name('geo_result_countQuantity');//geo统计 |
| 760 | Route::any('/getSearchDate', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getSearchDate'])->name('geo_result_getSearchDate');//搜索记录时间 | 760 | Route::any('/getSearchDate', [\App\Http\Controllers\Bside\Geo\GeoQuestionResController::class, 'getSearchDate'])->name('geo_result_getSearchDate');//搜索记录时间 |
| 761 | }); | 761 | }); |
| 762 | + //ticket | ||
| 763 | + Route::prefix('ticket_count')->group(function () { | ||
| 764 | + Route::any('/ticketCount', [\App\Http\Controllers\Bside\Ticket\TicketController::class,'ticketCount'])->name('ticket_count_ticketCount'); | ||
| 765 | + Route::any('/manageTicketCount', [\App\Http\Controllers\Bside\Ticket\TicketController::class,'manageTicketCount'])->name('ticket_count_manageTicketCount'); | ||
| 766 | + }); | ||
| 762 | }); | 767 | }); |
| 763 | //无需登录验证的路由组 | 768 | //无需登录验证的路由组 |
| 764 | Route::group([], function () { | 769 | Route::group([], function () { |
-
请 注册 或 登录 后发表评论