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