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 implements iServiceTotalsService { @Autowired ServiceTotalsMapper mapper; /** * 案例趋势 * */ @Override public List 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 caseTrendMoon(ServiceTotals totals) { return mapper.caseTrendMoon(totals); } /** * 案例趋势区域 * */ @Override public List caseTrendArea(ServiceTotals totals) { return mapper.caseTrendArea(totals); } /** * 捐献器官统计明细 * */ @Override public List organ(ServiceTotals totals) { return mapper.organ(totals); } /** * 器官获取/移植趋势 * */ @Override public List organMoon(ServiceTotals totals) { return mapper.organMoon(totals); } /** * 器官类型分布 * */ @Override public List organType(ServiceTotals totals) { return mapper.organType(totals); } /** * 捐献者年龄性别分布 * */ @Override public List caseSex(ServiceTotals totals) { return mapper.caseSex(totals); } /** * 平均年龄 * */ @Override public List caseAvgAge(ServiceTotals totals) { return mapper.caseAvgAge(totals); } /** * 性别与血型分布 * */ @Override public List caseBloodType(ServiceTotals totals) { return mapper.caseBloodType(totals); } /** * 性别与血型分布 * */ @Override public List totals(ServiceTotals totals) { return mapper.totals(totals); } /** * 案例明细列表 * */ @Override public List trendList(ServiceTotals totals) { return mapper.trendList(totals); } /** * 案例明细数量 * */ @Override public Long trendCount(ServiceTotals totals) { return mapper.trendCount(totals); } /** * 器管移植总统计 * */ @Override public List organTotals(ServiceTotals totals) { return mapper.organTotals(totals); } /** * 捐献器官统计明细列表 * */ @Override public List organList(ServiceTotals totals) { return mapper.organList(totals); } /** * 捐献器官统计明细数量 * */ @Override public Long organCount(ServiceTotals totals) { return mapper.organCount(totals); } }