package com.sinata.web.controller.screen;
|
|
import com.sinata.common.core.domain.R;
|
import com.sinata.system.domain.MedicalWasteStaticsVO;
|
import com.sinata.system.domain.vo.ScreenDepartmentVO;
|
import com.sinata.system.domain.vo.TodayMedicalWastePieVO;
|
import com.sinata.system.domain.vo.TotalCollectWeightByTypeVO;
|
import com.sinata.system.service.biz.ScreenService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiParam;
|
import lombok.RequiredArgsConstructor;
|
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
/**
|
* @author mitao
|
* @date 2025/1/1
|
*/
|
@Validated
|
@Api(tags = {"数据大屏相关接口"})
|
@RestController
|
@RequiredArgsConstructor
|
@RequestMapping("/screen")
|
public class ScreenController {
|
private final ScreenService screenService;
|
|
/**
|
* 获取单位列表
|
*
|
* @return
|
*/
|
@ApiOperation(value = "获取单位列表", notes = "展示单位分布")
|
@GetMapping(value = "/departmentList")
|
public R<List<ScreenDepartmentVO>> departmentList() {
|
return R.ok(screenService.departmentList());
|
}
|
|
/**
|
* 预警数据统计
|
*
|
* @return
|
*/
|
@ApiOperation("预警数据统计")
|
@GetMapping("/medicalWaste")
|
public R<MedicalWasteStaticsVO> medicalWasteStatics() {
|
return R.ok(screenService.medicalWasteStatics());
|
}
|
|
/**
|
* 今日医废类型占比
|
*
|
* @return
|
*/
|
@ApiOperation("今日医废类型统计占比")
|
@GetMapping("/todayMedicalWastePie")
|
public R<List<TodayMedicalWastePieVO>> todayMedicalWastePie() {
|
return R.ok(screenService.todayMedicalWastePie());
|
}
|
|
/**
|
* 各类型医废收集总量
|
*
|
* @param type
|
* @return
|
*/
|
@ApiOperation("各类型医废收集总量")
|
@GetMapping("/totalCollectWeightByType/{type}")
|
public R<TotalCollectWeightByTypeVO> totalCollectWeightByType(@ApiParam(name = "type", value = "统计类型 1:按周统计 2:按月统计") @PathVariable("type") Integer type) {
|
return R.ok(screenService.totalCollectWeightByType(type));
|
}
|
}
|