package com.kcim.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kcim.dao.model.ImportPatientItem;
import com.kcim.dao.model.dto.PatientItemDepartmentGroupVo;
import com.kcim.dao.model.dto.PatientItemVo;
import com.kcim.vo.PatientInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 患者收费项目导入
 *
 * @author Wang.YS
 * @date 2023-10-17 15:35:58
 */
@Mapper
public interface ImportPatientItemMapper extends BaseMapper<ImportPatientItem> {

    List<PatientItemVo> getAllGroupByCompute(@Param("computeDate") String computeDate,
                                             @Param("hospId") Long hospId);

    List<PatientItemVo> getAllGroupByOrder(@Param("computeDate") String computeDate,
                                           @Param("hospId") Long hospId);

    List<PatientInfoVo> getPatientItemPatientInfo(Page<PatientInfoVo> page, @Param("computeDate") String computeDate,
                                                  @Param("filter") String filter,
                                                  @Param("hospId") Long hospId);

    void reducingPatientItemByFileId(@Param("computeDate") String computeDate,
                                     @Param("hospId") Long hospId,
                                     @Param("fileId") Long fileId,
                                     @Param("date") Date date,
                                     @Param("userId") String userId);

    List<PatientItemDepartmentGroupVo> getByDepartGroupComputeDateItem(@Param("computeDate") String computeDate,
                                                                       @Param("hospId") Long hospId);

    List<PatientItemDepartmentGroupVo> getByDepartGroupComputeDateItem(
            @Param("page") Page<PatientItemDepartmentGroupVo> page,
            @Param("computeDate") String computeDate,
            @Param("hospId") Long hospId);

    long getItemGroupCount(@Param("computeDate") String computeDate,
                           @Param("hospId") Long hospId);

    List<PatientItemDepartmentGroupVo> getPatientItemGroupList(@Param("page") Page<PatientItemDepartmentGroupVo> page,
                                                               @Param("computeDate") String computeDate,
                                                               @Param("hospId") Long hospId);

    long getPatientItemGroupCount(@Param("computeDate") String computeDate,
                                  @Param("hospId") Long hospId);

    List<PatientItemDepartmentGroupVo>  getDepartAmountGroup(@Param("computeDate") String computeDate,
                              @Param("hospId") Long hospId);

    long getDrugCount(@Param("computeDate") String computeDate,
                      @Param("hospId") Long hospId);

    List<PatientItemDepartmentGroupVo> getByNoCalculateComputeDateDrugMaterial(@Param("page") Page<PatientItemDepartmentGroupVo> page,
                                                                               @Param("computeDate") String computeDate,
                                                                               @Param("hospId") Long hospId);
}
