package com.fs.hospital.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.fs.hospital.vo.HospitalTreatOrderLogsHVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.hospital.mapper.HospitalTreatOrderLogsMapper;
import com.fs.hospital.domain.HospitalTreatOrderLogs;
import com.fs.hospital.service.IHospitalTreatOrderLogsService;

/**
 * 治疗记录Service业务层处理
 *
 * @author fs
 * @date 2024-03-26
 */
@Service
public class HospitalTreatOrderLogsServiceImpl implements IHospitalTreatOrderLogsService
{
    @Autowired
    private HospitalTreatOrderLogsMapper hospitalTreatOrderLogsMapper;

    /**
     * 查询治疗记录
     *
     * @param logsId 治疗记录主键
     * @return 治疗记录
     */
    @Override
    public HospitalTreatOrderLogs selectHospitalTreatOrderLogsByLogsId(Long logsId)
    {
        return hospitalTreatOrderLogsMapper.selectHospitalTreatOrderLogsByLogsId(logsId);
    }

    /**
     * 查询治疗记录列表
     *
     * @param hospitalTreatOrderLogs 治疗记录
     * @return 治疗记录
     */
    @Override
    public List<HospitalTreatOrderLogs> selectHospitalTreatOrderLogsList(HospitalTreatOrderLogs hospitalTreatOrderLogs)
    {
        return hospitalTreatOrderLogsMapper.selectHospitalTreatOrderLogsList(hospitalTreatOrderLogs);
    }

    /**
     * 新增治疗记录
     *
     * @param hospitalTreatOrderLogs 治疗记录
     * @return 结果
     */
    @Override
    public int insertHospitalTreatOrderLogs(HospitalTreatOrderLogs hospitalTreatOrderLogs)
    {
        hospitalTreatOrderLogs.setCreateTime(DateUtils.getNowDate());
        return hospitalTreatOrderLogsMapper.insertHospitalTreatOrderLogs(hospitalTreatOrderLogs);
    }

    /**
     * 修改治疗记录
     *
     * @param hospitalTreatOrderLogs 治疗记录
     * @return 结果
     */
    @Override
    public int updateHospitalTreatOrderLogs(HospitalTreatOrderLogs hospitalTreatOrderLogs)
    {
        return hospitalTreatOrderLogsMapper.updateHospitalTreatOrderLogs(hospitalTreatOrderLogs);
    }

    /**
     * 批量删除治疗记录
     *
     * @param logsIds 需要删除的治疗记录主键
     * @return 结果
     */
    @Override
    public int deleteHospitalTreatOrderLogsByLogsIds(Long[] logsIds)
    {
        return hospitalTreatOrderLogsMapper.deleteHospitalTreatOrderLogsByLogsIds(logsIds);
    }

    /**
     * 删除治疗记录信息
     *
     * @param logsId 治疗记录主键
     * @return 结果
     */
    @Override
    public int deleteHospitalTreatOrderLogsByLogsId(Long logsId)
    {
        return hospitalTreatOrderLogsMapper.deleteHospitalTreatOrderLogsByLogsId(logsId);
    }

    @Override
    public List<HospitalTreatOrderLogsHVO> selectHospitalTreatOrderLogsListVO(HospitalTreatOrderLogs hospitalTreatOrderLogs) {
        return hospitalTreatOrderLogsMapper.selectHospitalTreatOrderLogsListVO(hospitalTreatOrderLogs);
    }
}
