luodangjia
2025-01-03 4a8c7756c66e2c5128dc9974ff7d3335deb903e4
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
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.DepartmentTagInfoVO;
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("/backend/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());
    }
 
    /**
     * 获取单位标签信息
     *
     * @param id
     * @return
     */
    @ApiOperation("获取单位标签信息")
    @GetMapping("/getTagInfo/{id}")
    public R<DepartmentTagInfoVO> getTagInfo(@ApiParam(name = "id", value = "单位id", required = true) @PathVariable("id") Long id) {
        return R.ok(screenService.getTagInfo(id));
    }
 
    /**
     * 预警数据统计
     *
     * @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));
    }
//    /**
//     * 医疗机构收集情况
//     */
//    @ApiOperation("医疗机构收集情况")
//    @GetMapping("/medicalInstitutionCollectList")
//    public R<List<MedicalInstitutionCollectListVO>>
}