package com.diagbot.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.diagbot.dto.BasDeptInfoDTO;
import com.diagbot.dto.DeptBaseDTO;
import com.diagbot.entity.BasDeptInfo;
import com.diagbot.mapper.BasDeptInfoMapper;
import com.diagbot.service.BasDeptInfoService;
import com.diagbot.vo.BasDeptInfoVO;
import com.diagbot.vo.FilterVO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 医院科室信息 服务实现类
 * </p>
 *
 * @author gaodm
 * @since 2020-04-27
 */
@Service
public class BasDeptInfoServiceImpl extends ServiceImpl<BasDeptInfoMapper, BasDeptInfo> implements BasDeptInfoService {

    @Override
    public List<BasDeptInfoDTO> getList(BasDeptInfoVO basDeptInfoVO) {
        return baseMapper.getList(basDeptInfoVO);
    }

    @Override
    public List<BasDeptInfoDTO> getListUser(BasDeptInfoVO basDeptInfoVO) {
        return baseMapper.getListUser(basDeptInfoVO);
    }

    /**
     * 查询用户关联科室
     *
     * @param filterVO
     * @return
     */
    @Override
    public List<DeptBaseDTO> getDeptByUser(FilterVO filterVO) {
        return baseMapper.getDeptByUser(filterVO);
    }


    /**
     * 根据科室编码，医院编码，批量修改
     * @param list
     */
    public void updateBatchByKey(List<BasDeptInfo> list){
        this.baseMapper.updateBatchByKey(list);
    }
}
