sinake
10 天以前 d5a5416a0e4b1e52c7805e3efc28eec40ab95782
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
package com.ruoyi.project.service.impl;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.project.domain.ServiceTotals;
import com.ruoyi.project.domain.vo.*;
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<ServiceTotalsTrend> 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<ServiceTotalsTrend> caseTrendMoon(ServiceTotals totals) {
        return mapper.caseTrendMoon(totals);
    }
 
    /**
     * 案例趋势区域
     *
     */
    @Override
    public List<ServiceTotalsTrend> caseTrendArea(ServiceTotals totals) {
        return mapper.caseTrendArea(totals);
    }
 
    /**
     * 捐献器官统计明细
     *
     */
    @Override
    public List<ServiceTotalsOrgan> organ(ServiceTotals totals) {
        return mapper.organ(totals);
    }
 
    /**
     * 器官获取/移植趋势
     *
     */
    @Override
    public List<ServiceTotalsOrgan> organMoon(ServiceTotals totals) {
        return mapper.organMoon(totals);
    }
 
    /**
     * 器官类型分布
     *
     */
    @Override
    public List<ServiceTotalsOrgan> organType(ServiceTotals totals) {
        return mapper.organType(totals);
    }
 
    /**
     * 捐献者年龄性别分布
     *
     */
    @Override
    public List<ServiceTotalsSex> caseSex(ServiceTotals totals) {
        return mapper.caseSex(totals);
    }
 
    /**
     * 平均年龄
     *
     */
    @Override
    public List<ServiceTotals> caseAvgAge(ServiceTotals totals) {
        return mapper.caseAvgAge(totals);
    }
    /**
     * 性别与血型分布
     *
     */
    @Override
    public List<ServiceTotalsBood> caseBloodType(ServiceTotals totals) {
        return mapper.caseBloodType(totals);
    }
 
    /**
     * 性别与血型分布
     *
     */
    @Override
    public List<ServiceTotalsTotal> totals(ServiceTotals totals) {
        return mapper.totals(totals);
    }
 
    /**
     * 案例明细列表
     *
     */
    @Override
    public List<trendList> trendList(ServiceTotals totals) {
        return mapper.trendList(totals);
    }
 
    /**
     * 案例明细数量
     *
     */
    @Override
    public Long trendCount(ServiceTotals totals) {
        return mapper.trendCount(totals);
    }
 
    /**
     * 器管移植总统计
     *
     */
    @Override
    public List<ServiceTotalsOrganTotals> organTotals(ServiceTotals totals) {
        return mapper.organTotals(totals);
    }
 
    /**
     * 捐献器官统计明细列表
     *
     */
    @Override
    public List<organList> organList(ServiceTotals totals) {
        return mapper.organList(totals);
    }
 
    /**
     * 捐献器官统计明细数量
     *
     */
    @Override
    public Long organCount(ServiceTotals totals) {
        return mapper.organCount(totals);
    }
 
}