fuliqi
2025-02-20 a1278f8b1edebde8114ca4add0f32d74495a835b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package com.ycl.platform.controller;
 
import com.ycl.platform.domain.query.HomeQuery;
import com.ycl.platform.service.*;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pojo.AjaxResult;
 
import java.lang.reflect.InvocationTargetException;
import java.text.ParseException;
 
/**
 * @author gonghl
 * @since 2024/8/1 下午 5:41
 */
 
@RestController
@RequiredArgsConstructor
@RequestMapping("/home")
public class HomeController {
 
    private final YwUnitService ywUnitService;
    private final ITMonitorService tMonitorService;
    private final WorkOrderService workOrderService;
    private final YwPointService ywPointService;
    private final ICheckScoreService checkScoreService;
 
    @GetMapping("/ywUnitList")
    public AjaxResult ywUnitList() {
        return AjaxResult.success(ywUnitService.all());
    }
 
    @GetMapping("/monitor")
    public AjaxResult monitor(HomeQuery monitorQuery) {
        return AjaxResult.success(tMonitorService.home(monitorQuery));
    }
 
    @GetMapping("/video")
    public AjaxResult videoHome(HomeQuery monitorQuery) throws ParseException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        return AjaxResult.success(tMonitorService.videoHome(monitorQuery));
    }
 
    @GetMapping("/car")
    public AjaxResult carHome(HomeQuery monitorQuery) throws ParseException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        return AjaxResult.success(tMonitorService.carHome(monitorQuery));
    }
    @GetMapping("/face")
    public AjaxResult faceHome(HomeQuery monitorQuery) throws ParseException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        return AjaxResult.success(tMonitorService.faceHome(monitorQuery));
    }
 
    @GetMapping("/workOrder")
    public AjaxResult workOrder(HomeQuery monitorQuery) {
        return AjaxResult.success(workOrderService.home(monitorQuery));
    }
 
    @GetMapping("/ywPoint")
    public AjaxResult ywPoint() {
        return AjaxResult.success(ywPointService.home());
    }
 
    @GetMapping("/ywUnitCount")
    public AjaxResult ywUnitCount() {
        return AjaxResult.success(ywUnitService.ywUnitCount());
    }
 
    @GetMapping("/checkScore")
    public AjaxResult checkScore() {
        return AjaxResult.success(checkScoreService.home());
    }
 
    @GetMapping("/calculate")
    public AjaxResult calculate(String category) {
        return AjaxResult.success(checkScoreService.calculate(category));
    }
 
}