package com.ruoyi.web.work.service.impl;

import java.util.List;

import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.work.mapper.DgMapper;
import com.ruoyi.web.work.domain.Dg;
import com.ruoyi.web.work.service.IDgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @author lsw
 * @date 2024-07-19
 */
@Service
public class DgServiceImpl extends ServiceImpl<DgMapper, Dg> implements IDgService {
    @Autowired
    private DgMapper dgMapper;

    @Override
    public List<Dg> selectList(Dg dg) {
        return dgMapper.selectList(dg);
    }

    @Override
    public AjaxResult getMedicalRecord(String beginTime, String endTime,Long patientId) {
        return AjaxResult.success(dgMapper.getMedicalRecord(beginTime,endTime,patientId));
    }

    @Override
    public List<Dg> getDgByCard(String card) {
        return dgMapper.getDgByCard(card);
    }
}
