package com.bonus.boot.manager.statistics.service.Impl;

import com.bonus.boot.manager.basic.entity.MapBean;
import com.bonus.boot.manager.basic.entity.PersonnelLibraryBean;
import com.bonus.boot.manager.manager.utils.UserUtil;
import com.bonus.boot.manager.statistics.dao.CareeStatisticsDao;
import com.bonus.boot.manager.statistics.service.CareeStatisticsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author xliu
 * @date 2023/6/10 10:12
 */
@Service("careeStatisticsService")
public class CareeStatisticsServiceImpl implements CareeStatisticsService {

    @Resource
    private CareeStatisticsDao dao;


    @Override
    public List<MapBean> getList(MapBean bean) {
        return dao.getList(bean);
    }

    @Override
    public List<PersonnelLibraryBean> getChildList(PersonnelLibraryBean bean) {
        String hospid = UserUtil.getLoginUser().getHospitalId();
        bean.setHospId(hospid);
        return dao.getChildList(bean);
    }
}
