jiaosong
2023-08-18 b42aecb23d3b2baa52fd7474282dfc1018fd066e
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
package doumeemes.api.ext;
 
import doumeemes.api.BaseController;
import doumeemes.core.model.ApiResponse;
import doumeemes.dao.business.dto.statistics.StatisticsPlanDataModel;
import doumeemes.dao.business.dto.statistics.Unqualified7DayModel;
import doumeemes.dao.business.dto.statistics.UserProduceTopModel;
import doumeemes.service.ext.StatisticsService;
import doumeemes.service.ext.WorkorderExtService;
import doumeemes.service.ext.WorkorderRecordExtService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * 大屏统计数据接口
 * @author 江蹄蹄
 * @date 2022/04/20 10:56
 */
@RestController
@RequestMapping("/ext/statistic")
@Api(tags = "大屏数据看板-统计数据接口")
public class StatisticsController extends BaseController {
 
    @Autowired
    private StatisticsService statisticsService;
 
    @ApiOperation("数据统计,执行中、延期计划数、今日生产人数、今日生产设备数、今日不良品")
    @GetMapping("/getPlanData/{companyId}/{departId}")
    public ApiResponse<StatisticsPlanDataModel> getPlansData(@PathVariable Integer companyId, @PathVariable Integer departId) {
        return ApiResponse.success(statisticsService.getPlansData(companyId,departId));
    }
 
    @ApiOperation("员工产品统计TOP10")
    @GetMapping("/userProduceTop/{companyId}/{departId}")
    public ApiResponse<List<UserProduceTopModel>> getUserProducceTop(@PathVariable Integer companyId, @PathVariable Integer departId) {
        return ApiResponse.success(statisticsService.getUserProduceTopData(companyId,departId));
    }
    @ApiOperation("近7天不良品分布-不良品数量统计")
    @GetMapping("/getUnqualified7DayData/{companyId}/{departId}")
    public ApiResponse<List<Unqualified7DayModel>> getUnqualified7DayData(@PathVariable Integer companyId, @PathVariable Integer departId) {
        return ApiResponse.success(statisticsService.getUnqualified7DayData(companyId,departId));
    }
 
 
}