医院废弃物信息化管理平台
“mitao”
2025-12-24 3763145f34d7706923d55edc32f5cfbc8bc08b92
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
package cn.besteam.modules.system.service.impl;
 
import cn.besteam.modules.report.dto.MedicalReportDTO;
import cn.besteam.modules.system.dto.SysDepartmentInformationDTO;
import cn.besteam.modules.system.entity.SysDepartmentInformation;
import cn.besteam.modules.system.mapper.SysDepartmentInformationMapper;
import cn.besteam.modules.system.service.ISysDepartmentInformationService;
import cn.besteam.modules.system.vo.SysDepartmentInformationReportVO;
import cn.besteam.modules.system.vo.SysDepartmentInformationVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.Synchronized;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
import java.util.Map;
 
/**
 * 医疗机构信息
 */
@Service
public class SysDepartmentInformationServiceImpl extends ServiceImpl<SysDepartmentInformationMapper, SysDepartmentInformation> implements ISysDepartmentInformationService {
    @Autowired
    SysDepartmentInformationMapper sysDepartmentInformationMapper;
 
    @Override
    public SysDepartmentInformationVO queryOne(Integer departmentId) {
        SysDepartmentInformationVO vo =  sysDepartmentInformationMapper.queryOne(departmentId);
        if(vo==null){
            //vo=new SysDepartmentInformationVO();
        }
        return vo;
    }
 
    @Override
    public Integer queryOneCount(Integer departmentId) {
        return sysDepartmentInformationMapper.queryOneCount(departmentId);
    }
 
    @Override
    public SysDepartmentInformationVO update(SysDepartmentInformationDTO departmentInformationDTO) {
        SysDepartmentInformationVO sysDepartmentInformationVO=new SysDepartmentInformationVO();
        SysDepartmentInformation sysDepartmentInformation=new SysDepartmentInformation();
        BeanUtils.copyProperties(departmentInformationDTO,sysDepartmentInformation);
        this.saveOrUpdate(sysDepartmentInformation);
        BeanUtils.copyProperties(sysDepartmentInformation,sysDepartmentInformationVO);
        return sysDepartmentInformationVO;
    }
 
    @Override
    public void delete(Integer id) {
        this.removeById(id);
    }
 
    @Override
    public List<SysDepartmentInformationReportVO> getDepartmentInformationList(MedicalReportDTO medicalReportDTO) {
        return baseMapper.getDepartmentInformationList(medicalReportDTO);
    }
 
    @Override
    public List<Map<String, Object>> getDepartmentNumber(String treeCode) {
        return baseMapper.getDepartmentNumber(treeCode);
    }
 
}