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));
|
}
|
}
|