liusheng
2026-01-28 0bb9f6c3e894e56ff58d335110fbe4cfa87b64b2
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
package com.ruoyi.project.service.impl;
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.domain.ServiceDeathinfo;
import com.ruoyi.project.domain.dto.DeathBaseInfoDTO;
import com.ruoyi.project.domain.vo.DeathBaseInfoVO;
import com.ruoyi.project.mapper.ServiceDeathinfoMapper;
import com.ruoyi.project.service.IServiceDeathinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
/**
 * 患者死亡信息Service业务层处理
 *
 * @author ls
 * @date 2026-01-20
 */
@Service
public class ServiceDeathinfoServiceImpl extends ServiceImpl<ServiceDeathinfoMapper, ServiceDeathinfo> implements IServiceDeathinfoService {
 
    @Autowired
    private ServiceDeathinfoMapper serviceDeathinfoMapper;
 
    /**
     * 查询患者死亡信息列表
     *
     * @param serviceDeathinfo 患者死亡信息
     * @return 患者死亡信息
     */
    @Override
    public Page<ServiceDeathinfo> queryList(ServiceDeathinfo serviceDeathinfo) {
        LambdaQueryWrapper<ServiceDeathinfo> wrappers = Wrappers.lambdaQuery();
        if (serviceDeathinfo.getInfoid() != null) {
            wrappers.eq(ServiceDeathinfo::getInfoid, serviceDeathinfo.getInfoid());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getDonorno())) {
            wrappers.eq(ServiceDeathinfo::getDonorno, serviceDeathinfo.getDonorno());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getGainhospitalno())) {
            wrappers.eq(ServiceDeathinfo::getGainhospitalno, serviceDeathinfo.getGainhospitalno());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getGainhospitalname())) {
            wrappers.like(ServiceDeathinfo::getGainhospitalname, serviceDeathinfo.getGainhospitalname());
        }
        if (serviceDeathinfo.getDeathtime() != null) {
            wrappers.eq(ServiceDeathinfo::getDeathtime, serviceDeathinfo.getDeathtime());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getDeathreason())) {
            wrappers.eq(ServiceDeathinfo::getDeathreason, serviceDeathinfo.getDeathreason());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getDeathjudgedocto())) {
            wrappers.eq(ServiceDeathinfo::getDeathjudgedocto, serviceDeathinfo.getDeathjudgedocto());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getDeathjudgedoctt())) {
            wrappers.eq(ServiceDeathinfo::getDeathjudgedoctt, serviceDeathinfo.getDeathjudgedoctt());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getDeathjudgeannex())) {
            wrappers.eq(ServiceDeathinfo::getDeathjudgeannex, serviceDeathinfo.getDeathjudgeannex());
        }
        if (serviceDeathinfo.getIsspendremember() != null) {
            wrappers.eq(ServiceDeathinfo::getIsspendremember, serviceDeathinfo.getIsspendremember());
        }
        if (serviceDeathinfo.getIsrestoreremains() != null) {
            wrappers.eq(ServiceDeathinfo::getIsrestoreremains, serviceDeathinfo.getIsrestoreremains());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getRememberannex())) {
            wrappers.eq(ServiceDeathinfo::getRememberannex, serviceDeathinfo.getRememberannex());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getResponsibleuserid())) {
            wrappers.eq(ServiceDeathinfo::getResponsibleuserid, serviceDeathinfo.getResponsibleuserid());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getResponsibleusername())) {
            wrappers.like(ServiceDeathinfo::getResponsibleusername, serviceDeathinfo.getResponsibleusername());
        }
 
        int currentPage = (serviceDeathinfo.getPageNum() == null || serviceDeathinfo.getPageNum() < 1) ? 1 : serviceDeathinfo.getPageNum();
        int size = (serviceDeathinfo.getPageSize() == null || serviceDeathinfo.getPageSize() < 1) ? 10 : serviceDeathinfo.getPageSize();
        Page<ServiceDeathinfo> page = new Page<>(currentPage, size);
        List<ServiceDeathinfo> serviceDeathinfoList = serviceDeathinfoMapper.selectPage(page, wrappers).getRecords();
 
        return page.setRecords(serviceDeathinfoList);
    }
 
 
    /**
     * 查询患者死亡信息列表
     *
     * @param serviceDeathinfo 患者死亡信息
     * @return 患者死亡信息
     */
    @Override
    public List<ServiceDeathinfo> exportQueryList(ServiceDeathinfo serviceDeathinfo) {
        LambdaQueryWrapper<ServiceDeathinfo> wrappers = Wrappers.lambdaQuery();
        if (serviceDeathinfo.getInfoid() != null) {
            wrappers.eq(ServiceDeathinfo::getInfoid, serviceDeathinfo.getInfoid());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getDonorno())) {
            wrappers.eq(ServiceDeathinfo::getDonorno, serviceDeathinfo.getDonorno());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getGainhospitalno())) {
            wrappers.eq(ServiceDeathinfo::getGainhospitalno, serviceDeathinfo.getGainhospitalno());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getGainhospitalname())) {
            wrappers.like(ServiceDeathinfo::getGainhospitalname, serviceDeathinfo.getGainhospitalname());
        }
        if (serviceDeathinfo.getDeathtime() != null) {
            wrappers.eq(ServiceDeathinfo::getDeathtime, serviceDeathinfo.getDeathtime());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getDeathreason())) {
            wrappers.eq(ServiceDeathinfo::getDeathreason, serviceDeathinfo.getDeathreason());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getDeathjudgedocto())) {
            wrappers.eq(ServiceDeathinfo::getDeathjudgedocto, serviceDeathinfo.getDeathjudgedocto());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getDeathjudgedoctt())) {
            wrappers.eq(ServiceDeathinfo::getDeathjudgedoctt, serviceDeathinfo.getDeathjudgedoctt());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getDeathjudgeannex())) {
            wrappers.eq(ServiceDeathinfo::getDeathjudgeannex, serviceDeathinfo.getDeathjudgeannex());
        }
        if (serviceDeathinfo.getIsspendremember() != null) {
            wrappers.eq(ServiceDeathinfo::getIsspendremember, serviceDeathinfo.getIsspendremember());
        }
        if (serviceDeathinfo.getIsrestoreremains() != null) {
            wrappers.eq(ServiceDeathinfo::getIsrestoreremains, serviceDeathinfo.getIsrestoreremains());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getRememberannex())) {
            wrappers.eq(ServiceDeathinfo::getRememberannex, serviceDeathinfo.getRememberannex());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getResponsibleuserid())) {
            wrappers.eq(ServiceDeathinfo::getResponsibleuserid, serviceDeathinfo.getResponsibleuserid());
        }
        if (StringUtils.isNotBlank(serviceDeathinfo.getResponsibleusername())) {
            wrappers.like(ServiceDeathinfo::getResponsibleusername, serviceDeathinfo.getResponsibleusername());
        }
        return this.list(wrappers);
    }
 
    @Override
    public List<DeathBaseInfoDTO> dathInfoBaseInfoList(DeathBaseInfoVO deathBaseInfoVO) {
        List<DeathBaseInfoDTO> deathBaseInfoDTOS = serviceDeathinfoMapper.dathInfoBaseInfoList(deathBaseInfoVO);
        return deathBaseInfoDTOS;
    }
 
 
}