package com.fs.company.service.impl;

import com.fs.common.utils.DateUtils;
import com.fs.company.domain.CompanyTcmReport;
import com.fs.company.mapper.CompanyTcmReportMapper;
import com.fs.company.param.CompanyTcmReportListQueryParam;
import com.fs.company.service.ICompanyTcmReportService;
import com.fs.company.vo.CompanyReportExportVO;
import com.fs.company.vo.CompanyTcmReportExportVO;
import com.fs.company.vo.CompanyTcmReportListVO;
import com.fs.company.vo.CompanyTcmStatisticsExportVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 中医档期业绩报表Service业务层处理
 *
 * @author fs
 * @date 2023-09-05
 */
@Service
public class CompanyTcmReportServiceImpl implements ICompanyTcmReportService
{
    @Autowired
    private CompanyTcmReportMapper companyTcmReportMapper;

    /**
     * 查询中医档期业绩报表
     *
     * @param id 中医档期业绩报表ID
     * @return 中医档期业绩报表
     */
    @Override
    public CompanyTcmReport selectCompanyTcmReportById(Long id)
    {
        return companyTcmReportMapper.selectCompanyTcmReportById(id);
    }

    /**
     * 查询中医档期业绩报表列表
     *
     * @param companyTcmReport 中医档期业绩报表
     * @return 中医档期业绩报表
     */
    @Override
    public List<CompanyTcmReport> selectCompanyTcmReportList(CompanyTcmReport companyTcmReport)
    {
        return companyTcmReportMapper.selectCompanyTcmReportList(companyTcmReport);
    }

    @Override
    public List<CompanyTcmReportListVO> selectCompanyTcmReportListVOList(CompanyTcmReportListQueryParam companyTcmReport) {
        return companyTcmReportMapper.selectCompanyTcmReportListVOList(companyTcmReport);
    }

    @Override
    public List<CompanyTcmReportExportVO> selectCompanyTcmReportExportVOList(CompanyTcmReportListQueryParam companyTcmReport) {
        return companyTcmReportMapper.selectCompanyTcmReportExportVOList(companyTcmReport);
    }

    @Override
    public List<CompanyTcmReportListVO> selectCompanyTcmReportStatisticsVOList(CompanyTcmReportListQueryParam param) {
        return companyTcmReportMapper.selectCompanyTcmReportStatisticsVOList(param);
    }

    @Override
    public List<CompanyTcmStatisticsExportVO> selectCompanyTcmStatisticsExportVOList(CompanyTcmReportListQueryParam param) {
        return companyTcmReportMapper.selectCompanyTcmStatisticsExportVOList(param);
    }

    @Override
    public List<CompanyReportExportVO> selectCompanyReportExportVOList(CompanyTcmReportListQueryParam param) {
        return companyTcmReportMapper.selectCompanyReportExportVOList(param);
    }

    @Override
    public List<CompanyTcmReportListVO> selectReportStatisticsByScheduleId(CompanyTcmReportListQueryParam param) {
        return companyTcmReportMapper.selectReportStatisticsByScheduleId(param);
    }


    /**
     * 新增中医档期业绩报表
     *
     * @param companyTcmReport 中医档期业绩报表
     * @return 结果
     */
    @Override
    public int insertCompanyTcmReport(CompanyTcmReport companyTcmReport)
    {
        companyTcmReport.setCreateTime(DateUtils.getNowDate());
        return companyTcmReportMapper.insertCompanyTcmReport(companyTcmReport);
    }

    /**
     * 修改中医档期业绩报表
     *
     * @param companyTcmReport 中医档期业绩报表
     * @return 结果
     */
    @Override
    public int updateCompanyTcmReport(CompanyTcmReport companyTcmReport)
    {
        companyTcmReport.setUpdateTime(DateUtils.getNowDate());
        return companyTcmReportMapper.updateCompanyTcmReport(companyTcmReport);
    }

    /**
     * 批量删除中医档期业绩报表
     *
     * @param ids 需要删除的中医档期业绩报表ID
     * @return 结果
     */
    @Override
    public int deleteCompanyTcmReportByIds(Long[] ids)
    {
        return companyTcmReportMapper.deleteCompanyTcmReportByIds(ids);
    }

    /**
     * 删除中医档期业绩报表信息
     *
     * @param id 中医档期业绩报表ID
     * @return 结果
     */
    @Override
    public int deleteCompanyTcmReportById(Long id)
    {
        return companyTcmReportMapper.deleteCompanyTcmReportById(id);
    }
}
