sinake
2026-09-15 afe21cabc75e56e44aafbd461ebdade8b77aefff
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
97
98
99
100
101
102
103
104
105
106
107
package com.ruoyi.project.service.impl;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.project.domain.ServiceTotals;
import com.ruoyi.project.mapper.ServiceTotalsMapper;
import com.ruoyi.project.service.iServiceTotalsService;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
@Service
public class ServiceTotalsServiceImp extends ServiceImpl<ServiceTotalsMapper, ServiceTotals> implements iServiceTotalsService
{
    @Autowired
    ServiceTotalsMapper mapper;
 
    /**
     * 案例趋势
     *
     */
    @Override
    public List<ServiceTotals> caseTrend(ServiceTotals totals) {
        if(ObjectUtils.isNotEmpty(totals.getAgeGroup())){
            switch (totals.getAgeGroup()) {
                case "1": totals.setAgeGroup(" and age<=17 "); break;
                case "2": totals.setAgeGroup(" and age>17 and age<=49 "); break;
                case "3": totals.setAgeGroup(" and age>49 and age<=69 "); break;
                case "4": totals.setAgeGroup(" and age>69 "); break;
                default: break;
            }
        }
        return mapper.caseTrend(totals);
    }
    /**
     * 案例趋势月份
     *
     */
    @Override
    public List<ServiceTotals> caseTrendMoon(ServiceTotals totals) {
        return mapper.caseTrendMoon(totals);
    }
 
    /**
     * 案例趋势区域
     *
     */
    @Override
    public List<ServiceTotals> caseTrendArea(ServiceTotals totals) {
        return mapper.caseTrendArea(totals);
    }
 
    /**
     * 捐献器官统计明细
     *
     */
    @Override
    public List<ServiceTotals> organ(ServiceTotals totals) {
        return mapper.caseTrendArea(totals);
    }
 
    /**
     * 器官获取/移植趋势
     *
     */
    @Override
    public List<ServiceTotals> organMoon(ServiceTotals totals) {
        return mapper.caseTrendArea(totals);
    }
 
    /**
     * 器官类型分布
     *
     */
    @Override
    public List<ServiceTotals> organType(ServiceTotals totals) {
        return mapper.caseTrendArea(totals);
    }
 
    /**
     * 捐献者年龄性别分布
     *
     */
    @Override
    public List<ServiceTotals> caseSex(ServiceTotals totals) {
        return mapper.caseTrendArea(totals);
    }
 
    /**
     * 平均年龄
     *
     */
    @Override
    public List<ServiceTotals> caseAvgAge(ServiceTotals totals) {
        return mapper.caseTrendArea(totals);
    }
    /**
     * 性别与血型分布
     *
     */
    @Override
    public List<ServiceTotals> caseBloodType(ServiceTotals totals) {
        return mapper.caseTrendArea(totals);
    }
 
}