package com.ruoyi.os.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.os.mapper.PatientInsuranceInfoMapper;
import com.ruoyi.os.domain.PatientInsuranceInfo;
import com.ruoyi.os.service.IPatientInsuranceInfoService;

/**
 * 患者医保信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-19
 */
@Service
public class PatientInsuranceInfoServiceImpl implements IPatientInsuranceInfoService 
{
    @Autowired
    private PatientInsuranceInfoMapper patientInsuranceInfoMapper;

    /**
     * 查询患者医保信息
     * 
     * @param id 患者医保信息主键
     * @return 患者医保信息
     */
    @Override
    public PatientInsuranceInfo selectPatientInsuranceInfoById(Long id)
    {
        return patientInsuranceInfoMapper.selectPatientInsuranceInfoById(id);
    }

    /**
     * 查询患者医保信息列表
     * 
     * @param patientInsuranceInfo 患者医保信息
     * @return 患者医保信息
     */
    @Override
    public List<PatientInsuranceInfo> selectPatientInsuranceInfoList(PatientInsuranceInfo patientInsuranceInfo)
    {
        return patientInsuranceInfoMapper.selectPatientInsuranceInfoList(patientInsuranceInfo);
    }

    /**
     * 新增患者医保信息
     * 
     * @param patientInsuranceInfo 患者医保信息
     * @return 结果
     */
    @Override
    public int insertPatientInsuranceInfo(PatientInsuranceInfo patientInsuranceInfo)
    {
        return patientInsuranceInfoMapper.insertPatientInsuranceInfo(patientInsuranceInfo);
    }

    /**
     * 修改患者医保信息
     * 
     * @param patientInsuranceInfo 患者医保信息
     * @return 结果
     */
    @Override
    public int updatePatientInsuranceInfo(PatientInsuranceInfo patientInsuranceInfo)
    {
        return patientInsuranceInfoMapper.updatePatientInsuranceInfo(patientInsuranceInfo);
    }

    /**
     * 批量删除患者医保信息
     * 
     * @param ids 需要删除的患者医保信息主键
     * @return 结果
     */
    @Override
    public int deletePatientInsuranceInfoByIds(Long[] ids)
    {
        return patientInsuranceInfoMapper.deletePatientInsuranceInfoByIds(ids);
    }

    /**
     * 删除患者医保信息信息
     * 
     * @param id 患者医保信息主键
     * @return 结果
     */
    @Override
    public int deletePatientInsuranceInfoById(Long id)
    {
        return patientInsuranceInfoMapper.deletePatientInsuranceInfoById(id);
    }

    /**
     * Excel表批量插入患者医保信息
     *
     * @param insurancelist 患者医保信息集合
     * @return 结果
     */
    @Override
    public int insertPatientInsuranceInfos(List<PatientInsuranceInfo> insurancelist) {
        return patientInsuranceInfoMapper.insertPatientInsuranceInfos(insurancelist);
    }
}
