yangys
2024-03-27 e48aa2ac8dea1be5db11c63edf0b912c4ad5ce65
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
50
51
52
53
54
55
package com.qianwen.smartman.modules.mdc.controller;
 
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.qianwen.core.mp.support.Query;
import com.qianwen.core.oss.model.BladeFile;
import com.qianwen.core.scanner.modular.annotation.PostResource;
import com.qianwen.core.scanner.modular.stereotype.ApiResource;
import com.qianwen.core.secure.annotation.PreAuth;
import com.qianwen.core.tool.api.R;
import com.qianwen.smartman.modules.mdc.service.ITimeUsedAnalysisService;
import com.qianwen.smartman.modules.mdc.vo.QueryShiftIndexNameVO;
import com.qianwen.smartman.modules.mdc.vo.TimeUsedAnalysisWorkstationVO;
import com.qianwen.smartman.modules.mdc.vo.TimeUsedStatisticsByWorkstationVO;
import com.qianwen.smartman.modules.mdc.vo.WorkstationBandShiftVO;
import com.qianwen.smartman.modules.mdc.vo.excel.TimeUsedExcelVO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
 
@Api(value = "用时分析controller", tags = {"用时分析controller"})
@ApiResource({"blade-mdc/time-used-analysis"})
@RestController
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/mdc/controller/TimeUsedAnalysisController.class */
public class TimeUsedAnalysisController {
    private final ITimeUsedAnalysisService superAggregateStateService;
 
    public TimeUsedAnalysisController(final ITimeUsedAnalysisService superAggregateStateService) {
        this.superAggregateStateService = superAggregateStateService;
    }
 
    @PostMapping({"/work-stations"})
    @ApiOperationSupport(order = 1)
    @ApiOperation("按多设备统计用时")
    public R<TimeUsedAnalysisWorkstationVO> timeUsedStatisticsByWorkstation(Query query, @RequestBody @Validated TimeUsedStatisticsByWorkstationVO stationVO) {
        return R.data(this.superAggregateStateService.timeUsedStatisticsByWorkstation(stationVO, query));
    }
 
    @PostMapping({"/workstation/shiftName"})
    @ApiOperationSupport(order = 2)
    @ApiOperation("查询工位绑定的班次信息")
    public R<WorkstationBandShiftVO> queryWorkStationShiftIndexName(@RequestBody QueryShiftIndexNameVO vo) {
        return R.data(this.superAggregateStateService.queryWorkStationShiftIndexName(vo));
    }
 
    @ApiOperationSupport(order = 2)
    @PostResource({"excel/export"})
    @ApiOperation("导出")
    @PreAuth
    public R<BladeFile> exportTimeUsed(@RequestBody TimeUsedExcelVO vo) {
        return R.data(this.superAggregateStateService.exportTimeUsed(vo));
    }
}