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;
|
|
/**
|
* @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("/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));
|
}
|
|
}
|