package com.ruoyi.inspect.controller;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.ruoyi.common.core.domain.Result;
|
import com.ruoyi.inspect.service.InsOrderService;
|
import com.ruoyi.inspect.service.ReportService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.AllArgsConstructor;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
@RestController
|
@AllArgsConstructor
|
@RequestMapping("/report")
|
@Api(tags = "报表模块")
|
public class ReportController {
|
|
private ReportService reportService;
|
|
private InsOrderService insOrderService;
|
|
@ApiOperation(value = "查看样品缺陷指数")
|
@PostMapping("/selectSampleDefects")
|
public Result selectSampleDefects(Integer size, Integer current, String inspectionItems, String orderNumber) {
|
return Result.success(insOrderService.selectSampleDefects(new Page<>(current, size),inspectionItems, orderNumber));
|
}
|
|
@ApiOperation(value = "查看每日业务统计")
|
@GetMapping("/businessStatisticsByDay")
|
public Result businessStatisticsByDay(){
|
return Result.success(reportService.businessStatisticsByDay());
|
}
|
|
@ApiOperation(value = "查看检测项目统计")
|
@GetMapping("/testProductByDay")
|
public Result testProductByDay(){
|
return Result.success(reportService.testProductByDay());
|
}
|
|
@ApiOperation(value = "查询日历任务图")
|
@GetMapping("/calendarWorkByWeek")
|
public Result calendarWorkByWeek(){
|
return Result.success(reportService.calendarWorkByWeek());
|
}
|
|
@ApiOperation(value = "添加日程")
|
@PostMapping("/addSchedule")
|
public Result addSchedule(String time, String text){
|
return Result.success(reportService.addSchedule(time,text));
|
}
|
|
@ApiOperation(value = "查询我的日程")
|
@PostMapping("/ScheduleByMe")
|
public Result ScheduleByMe(String date){
|
return Result.success(reportService.ScheduleByMe(date));
|
}
|
}
|