package com.ruoyi.wrzs.report.controller;
|
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
import com.ruoyi.wrzs.report.service.ReportCenterService;
|
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.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/**
|
* 报表中心
|
* <p>
|
* 每日过磅统计报表(车次/货量/偏差率) + 承运商绩效分析(准时率/作弊次数)
|
*/
|
@Api(tags = "报表中心")
|
@AllArgsConstructor
|
@RestController
|
@RequestMapping("/environmentAccess")
|
public class ReportCenterController {
|
|
private final ReportCenterService reportCenterService;
|
|
@ApiOperation("每日过磅统计报表")
|
@GetMapping("/reportCenterDaily")
|
public AjaxResult daily(@RequestParam(required = false) String startDate,
|
@RequestParam(required = false) String endDate) {
|
return AjaxResult.success(reportCenterService.dailyWeighbridge(startDate, endDate));
|
}
|
|
@ApiOperation("承运商绩效分析(准时率/作弊次数)")
|
@GetMapping("/reportCenterCarrier")
|
public AjaxResult carrier(@RequestParam(required = false) String startDate,
|
@RequestParam(required = false) String endDate) {
|
return AjaxResult.success(reportCenterService.carrierPerformance(startDate, endDate));
|
}
|
|
@ApiOperation("报表区间总览")
|
@GetMapping("/reportCenterOverview")
|
public AjaxResult overview(@RequestParam(required = false) String startDate,
|
@RequestParam(required = false) String endDate) {
|
return AjaxResult.success(reportCenterService.overview(startDate, endDate));
|
}
|
}
|