package com.fs.his.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.his.mapper.FsDoctorPrescribeDrugMapper;
import com.fs.his.domain.FsDoctorPrescribeDrug;
import com.fs.his.service.IFsDoctorPrescribeDrugService;

/**
 * 医生处方药品Service业务层处理
 *
 * @author fs
 * @date 2023-08-08
 */
@Service
public class FsDoctorPrescribeDrugServiceImpl implements IFsDoctorPrescribeDrugService
{
    @Autowired
    private FsDoctorPrescribeDrugMapper fsDoctorPrescribeDrugMapper;

    /**
     * 查询医生处方药品
     *
     * @param drugId 医生处方药品主键
     * @return 医生处方药品
     */
    @Override
    public FsDoctorPrescribeDrug selectFsDoctorPrescribeDrugByDrugId(Long drugId)
    {
        return fsDoctorPrescribeDrugMapper.selectFsDoctorPrescribeDrugByDrugId(drugId);
    }

    /**
     * 查询医生处方药品列表
     *
     * @param fsDoctorPrescribeDrug 医生处方药品
     * @return 医生处方药品
     */
    @Override
    public List<FsDoctorPrescribeDrug> selectFsDoctorPrescribeDrugList(FsDoctorPrescribeDrug fsDoctorPrescribeDrug)
    {
        return fsDoctorPrescribeDrugMapper.selectFsDoctorPrescribeDrugList(fsDoctorPrescribeDrug);
    }

    /**
     * 新增医生处方药品
     *
     * @param fsDoctorPrescribeDrug 医生处方药品
     * @return 结果
     */
    @Override
    public int insertFsDoctorPrescribeDrug(FsDoctorPrescribeDrug fsDoctorPrescribeDrug)
    {
        return fsDoctorPrescribeDrugMapper.insertFsDoctorPrescribeDrug(fsDoctorPrescribeDrug);
    }

    /**
     * 修改医生处方药品
     *
     * @param fsDoctorPrescribeDrug 医生处方药品
     * @return 结果
     */
    @Override
    public int updateFsDoctorPrescribeDrug(FsDoctorPrescribeDrug fsDoctorPrescribeDrug)
    {
        return fsDoctorPrescribeDrugMapper.updateFsDoctorPrescribeDrug(fsDoctorPrescribeDrug);
    }

    /**
     * 批量删除医生处方药品
     *
     * @param drugIds 需要删除的医生处方药品主键
     * @return 结果
     */
    @Override
    public int deleteFsDoctorPrescribeDrugByDrugIds(Long[] drugIds)
    {
        return fsDoctorPrescribeDrugMapper.deleteFsDoctorPrescribeDrugByDrugIds(drugIds);
    }

    /**
     * 删除医生处方药品信息
     *
     * @param drugId 医生处方药品主键
     * @return 结果
     */
    @Override
    public int deleteFsDoctorPrescribeDrugByDrugId(Long drugId)
    {
        return fsDoctorPrescribeDrugMapper.deleteFsDoctorPrescribeDrugByDrugId(drugId);
    }

    @Override
    public int deleteFsDoctorPrescribeDrugByPrescribe(Long prescribeId) {
        return fsDoctorPrescribeDrugMapper.deleteFsDoctorPrescribeDrugByPrescribe(prescribeId);
    }
}
