| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.staff.service.AnalyticsService; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | @RestController |
| | | @RequestMapping("/staff/analytics") |
| | | public class AnalyticsController { |
| | | public class AnalyticsController extends BaseController { |
| | | |
| | | @Resource |
| | | private AnalyticsService analyticsService; |
| | | |
| | | @GetMapping("/reason") |
| | | public AjaxResult staffLeaveReasonAnalytics() { |
| | | return AjaxResult.success(analyticsService.staffLeaveReasonAnalytics()); |
| | | public R<?> staffLeaveReasonAnalytics() { |
| | | return R.ok(analyticsService.staffLeaveReasonAnalytics()); |
| | | } |
| | | |
| | | @GetMapping("/monthly_turnover_rate") |
| | | public AjaxResult getMonthlyTurnoverRateFor12Months() { |
| | | return AjaxResult.success(analyticsService.getMonthlyTurnoverRateFor12Months()); |
| | | public R<?> getMonthlyTurnoverRateFor12Months() { |
| | | return R.ok(analyticsService.getMonthlyTurnoverRateFor12Months()); |
| | | } |
| | | |
| | | @GetMapping("/total_statistic") |
| | | public AjaxResult getTotalStatistic() { |
| | | return AjaxResult.success(analyticsService.getTotalStatistic()); |
| | | public R<?> getTotalStatistic() { |
| | | return R.ok(analyticsService.getTotalStatistic()); |
| | | } |
| | | } |