package com.kcim.dao.repository;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kcim.common.util.UserContext;
import com.kcim.dao.mapper.CostResponsibilityDepartmentMapper;
import com.kcim.dao.model.CostResponsibilityDepartment;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @program: CostAccount
 * @description:
 * @author: Wang.YS
 * @create: 2023-12-13 16:22
 **/
@Repository
public class CostResponsibilityDepartmentRepository extends ServiceImpl<CostResponsibilityDepartmentMapper, CostResponsibilityDepartment> {
    public List<CostResponsibilityDepartment> getList() {
        LambdaQueryWrapper<CostResponsibilityDepartment> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(CostResponsibilityDepartment::getHospId, UserContext.getHospId());
        return this.list(queryWrapper);
    }
}
