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;
|
}
|
|
|
}
|