package com.ruoyi.care.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.care.mapper.CareNurseRecordsMapper;
import com.ruoyi.care.domain.CareNurseRecords;
import com.ruoyi.care.service.ICareNurseRecordsService;

/**
 * 护理任务记录Service业务层处理
 * 
 * @author qy
 * @date 2024-11-26
 */
@Service
public class CareNurseRecordsServiceImpl implements ICareNurseRecordsService 
{
    @Autowired
    private CareNurseRecordsMapper careNurseRecordsMapper;

    /**
     * 查询护理任务记录
     * 
     * @param nursingRecordId 护理任务记录主键
     * @return 护理任务记录
     */
    @Override
    public CareNurseRecords selectCareNurseRecordsByNursingRecordId(Long nursingRecordId)
    {
        return careNurseRecordsMapper.selectCareNurseRecordsByNursingRecordId(nursingRecordId);
    }

    /**
     * 查询护理任务记录列表
     * 
     * @param careNurseRecords 护理任务记录
     * @return 护理任务记录
     */
    @Override
    public List<CareNurseRecords> selectCareNurseRecordsList(CareNurseRecords careNurseRecords)
    {
        return careNurseRecordsMapper.selectCareNurseRecordsList(careNurseRecords);
    }

    /**
     * 新增护理任务记录
     * 
     * @param careNurseRecords 护理任务记录
     * @return 结果
     */
    @Override
    public int insertCareNurseRecords(CareNurseRecords careNurseRecords)
    {
        careNurseRecords.setCreateTime(DateUtils.getNowDate());
        return careNurseRecordsMapper.insertCareNurseRecords(careNurseRecords);
    }

    /**
     * 修改护理任务记录
     * 
     * @param careNurseRecords 护理任务记录
     * @return 结果
     */
    @Override
    public int updateCareNurseRecords(CareNurseRecords careNurseRecords)
    {
        careNurseRecords.setUpdateTime(DateUtils.getNowDate());
        return careNurseRecordsMapper.updateCareNurseRecords(careNurseRecords);
    }

    /**
     * 批量删除护理任务记录
     * 
     * @param nursingRecordIds 需要删除的护理任务记录主键
     * @return 结果
     */
    @Override
    public int deleteCareNurseRecordsByNursingRecordIds(Long[] nursingRecordIds)
    {
        return careNurseRecordsMapper.deleteCareNurseRecordsByNursingRecordIds(nursingRecordIds);
    }

    /**
     * 删除护理任务记录信息
     * 
     * @param nursingRecordId 护理任务记录主键
     * @return 结果
     */
    @Override
    public int deleteCareNurseRecordsByNursingRecordId(Long nursingRecordId)
    {
        return careNurseRecordsMapper.deleteCareNurseRecordsByNursingRecordId(nursingRecordId);
    }
}
