yangys
2024-03-29 4b479381a65bd3ef526cb92631d3550f2aa17459
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
package com.qianwen.smartman.modules.report.controller;
 
import cn.hutool.json.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.qianwen.smartman.modules.mdc.enums.StatisticalMethodEnum;
import com.qianwen.smartman.modules.report.service.IOutputStatisticsReportService;
import com.qianwen.smartman.modules.report.vo.StatisticsQueryVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RequestMapping({"blade-report/output"})
@Api(tags = {"产量统计接入报表"})
@RestController
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/report/controller/OutputStatisticsReportController.class */
public class OutputStatisticsReportController {
    private final IOutputStatisticsReportService outputStatisticsReportService;
 
    public OutputStatisticsReportController(final IOutputStatisticsReportService outputStatisticsReportService) {
        this.outputStatisticsReportService = outputStatisticsReportService;
    }
 
    @GetMapping({"/list"})
    @ApiOperation("根据班次或时间周期进行产量统计")
    public JSONObject outputStatistics(StatisticsQueryVO statisticsQueryVO) {
        return statisticsQueryVO.getStatisticsType().equals(StatisticalMethodEnum.SHIFT.getCode()) ? this.outputStatisticsReportService.outputStatisticsByShift(statisticsQueryVO) : this.outputStatisticsReportService.outputStatisticsByDate(statisticsQueryVO);
    }
}