package com.fs.his.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.fs.his.param.FsDrugReportListDParam;
import com.fs.his.param.FsDrugReportListUParam;
import com.fs.his.vo.FsDrugReportDVO;
import com.fs.his.vo.FsDrugReportListDVO;
import com.fs.his.vo.FsDrugReportListUVO;
import com.fs.his.vo.FsDrugReportUVO;
import com.fs.his.param.FsDrugReportParam;
import com.fs.his.vo.FsDrugReportListVO;
import com.fs.his.vo.FsDrugReportVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.his.mapper.FsDrugReportMapper;
import com.fs.his.domain.FsDrugReport;
import com.fs.his.service.IFsDrugReportService;

/**
 * 用药报告Service业务层处理
 *
 * @author fs
 * @date 2024-04-23
 */
@Service
public class FsDrugReportServiceImpl implements IFsDrugReportService
{
    @Autowired
    private FsDrugReportMapper fsDrugReportMapper;

    /**
     * 查询用药报告
     *
     * @param reportId 用药报告主键
     * @return 用药报告
     */
    @Override
    public FsDrugReport selectFsDrugReportByReportId(Long reportId)
    {
        return fsDrugReportMapper.selectFsDrugReportByReportId(reportId);
    }

    /**
     * 查询用药报告列表
     *
     * @param fsDrugReport 用药报告
     * @return 用药报告
     */
    @Override
    public List<FsDrugReport> selectFsDrugReportList(FsDrugReport fsDrugReport)
    {
        return fsDrugReportMapper.selectFsDrugReportList(fsDrugReport);
    }

    /**
     * 新增用药报告
     *
     * @param fsDrugReport 用药报告
     * @return 结果
     */
    @Override
    public int insertFsDrugReport(FsDrugReport fsDrugReport)
    {
        fsDrugReport.setCreateTime(DateUtils.getNowDate());
        return fsDrugReportMapper.insertFsDrugReport(fsDrugReport);
    }

    /**
     * 修改用药报告
     *
     * @param fsDrugReport 用药报告
     * @return 结果
     */
    @Override
    public int updateFsDrugReport(FsDrugReport fsDrugReport)
    {
        return fsDrugReportMapper.updateFsDrugReport(fsDrugReport);
    }

    /**
     * 批量删除用药报告
     *
     * @param reportIds 需要删除的用药报告主键
     * @return 结果
     */
    @Override
    public int deleteFsDrugReportByReportIds(Long[] reportIds)
    {
        return fsDrugReportMapper.deleteFsDrugReportByReportIds(reportIds);
    }

    /**
     * 删除用药报告信息
     *
     * @param reportId 用药报告主键
     * @return 结果
     */
    @Override
    public int deleteFsDrugReportByReportId(Long reportId)
    {
        return fsDrugReportMapper.deleteFsDrugReportByReportId(reportId);
    }

    @Override
    public List<FsDrugReportListDVO> selectFsDrugReportListDVO(FsDrugReportListDParam param) {
        return fsDrugReportMapper.selectFsDrugReportListDVO(param);
    }

    @Override
    public FsDrugReportDVO selectFsDrugReportDVOByReportId(Long reportId) {
        return fsDrugReportMapper.selectFsDrugReportDVOByReportId(reportId);
    }

    @Override
    public List<FsDrugReportListUVO> selectFsDrugReportListUVO(FsDrugReportListUParam param) {
        return fsDrugReportMapper.selectFsDrugReportListUVO(param);
    }

    @Override
    public FsDrugReportUVO selectFsDrugReportUVOByReportId(Long reportId) {
        return fsDrugReportMapper.selectFsDrugReportUVOByReportId(reportId);
    }
    public List<FsDrugReportListVO> selectFsDrugReportListVO(FsDrugReportParam fsDrugReport) {
        return fsDrugReportMapper.selectFsDrugReportListVO(fsDrugReport);
    }

    @Override
    public FsDrugReportVO selectFsDrugReportByReportIdVO(Long reportId) {
        return fsDrugReportMapper.selectFsDrugReportByReportIdVO(reportId);
    }
}
