package cn.besteam.modules.report.controller;
|
|
import cn.besteam.common.api.vo.Result;
|
import cn.besteam.modules.medical.dto.MwDataStatisticsDTO;
|
import cn.besteam.modules.report.biz.IndexBiz;
|
import cn.besteam.modules.report.vo.IndexScheduleVO;
|
import cn.besteam.modules.report.vo.IndexVO;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
@RestController
|
@RequestMapping(value = "/index")
|
@Slf4j
|
@Api(description = "首页")
|
public class IndexController {
|
|
@Autowired
|
private IndexBiz indexBiz;
|
|
@GetMapping("/getIndex")
|
@ApiOperation("指标")
|
public Result<IndexVO> getIndex() {
|
|
try {
|
return Result.ok(indexBiz.getIndex());
|
} catch (Exception e) {
|
throw new RuntimeException(e);
|
}
|
}
|
|
@GetMapping("/getIndexSchedule")
|
@ApiOperation("首页待办")
|
public Result<IndexScheduleVO> getIndexSchedule() {
|
|
return Result.ok (indexBiz.getIndexSchedule());
|
}
|
|
@GetMapping("/getTodayRankStatistics")
|
@ApiOperation("今日排行榜")
|
public Result<?> getTodayRankStatistics(String startTime,String endTime) {
|
|
return Result.ok(indexBiz.getTodayRankStatistics(startTime,endTime));
|
}
|
|
@GetMapping("/getLastSevenDaysStatistics")
|
@ApiOperation("最近7日统计")
|
public Result<?> getLastSevenDaysStatistics(String startTime,String endTime) {
|
|
return Result.ok(indexBiz.getLastSevenDaysStatistics(startTime,endTime));
|
}
|
|
/**
|
* 小程序端首页
|
* @param startTime
|
* @param endTime
|
* @param type :1按天展示,2按月展示
|
* @return
|
*/
|
@GetMapping("/getLastSevenDaysStatisticsX")
|
@ApiOperation("最近7日统计(医院收集排行榜)")
|
public Result<?> getLastSevenDaysStatisticsX(String startTime,String endTime,Integer type) {
|
|
return Result.ok(indexBiz.getLastSevenDaysStatisticsX(startTime,endTime,type));
|
}
|
|
|
/**
|
* 数据大屏
|
* @return
|
*/
|
@GetMapping("/getDataStatistics")
|
@ApiOperation("获取数据大屏数据")
|
public Result<MwDataStatisticsDTO> getDataStatistics() {
|
return Result.ok(indexBiz.getDataStatistics());
|
}
|
|
}
|