package com.srs.diagnostic.mapper;

import java.util.List;
import java.util.Map;

import com.srs.diagnostic.domain.DiaReportItems;
import com.srs.diagnostic.domain.DiaReportStandards;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 诊断报告标准Mapper接口
 *
 * @author LSD
 * @date 2025-06-21
 */
@Mapper
public interface DiaReportStandardsMapper extends BaseMapper<DiaReportStandards> {

    public List<Map<String, Object>> countGradeItemFinishNumByRelId(DiaReportStandards params);

    public List<Map<String, Object>> countGradeFinishNumByRelId(DiaReportStandards params) ;

    public List<Map<String, Object>> countClassItemFinishNumByRelId(DiaReportStandards params);

    public List<Map<String, Object>> countMajorItemFinishNumByRelId(DiaReportStandards params);

    public List<Map<String, Object>> countClassFinishNumByRelId(DiaReportStandards params);

    public List<Map<String, Object>> countMajorFinishNumByRelId(DiaReportStandards params);

    public List<Map<String, Object>> countDeptFinishNumByRelId(DiaReportStandards params);

    public List<Map<String, Object>> countDeptItemFinishNumByRelId(DiaReportStandards params) ;

    public Map<String,Object> countItemFinishNumByRelId(DiaReportStandards param) ;

    public Map<String, Object> countFinishNumByRelId(DiaReportStandards param);

    List<DiaReportStandards> selectStandardDeptBatch(
            @Param("relId") Long relId,
            @Param("level") Integer level,
            @Param("deptId") Long deptId,
            @Param("itemIds") List<Long> itemIds
    );

    public DiaReportStandards selectStandardDept(DiaReportStandards param);


    public List<DiaReportItems> getItemByReportId(Long reportId) ;

    /**
     * 查询诊断报告标准
     *
     * @param standardId 诊断报告标准主键
     * @return 诊断报告标准
     */
    public DiaReportStandards selectDiaReportStandardsByStandardId(Long standardId);

    /**
     * 查询诊断报告标准列表
     *
     * @param diaReportStandards 诊断报告标准
     * @return 诊断报告标准集合
     */
    List<DiaReportStandards> selectDiaReportStandardsList(DiaReportStandards diaReportStandards);

    /**
     * 新增诊断报告标准
     *
     * @param diaReportStandards 诊断报告标准
     * @return 结果
     */
    int insertDiaReportStandards(DiaReportStandards diaReportStandards);

    /**
     * 修改诊断报告标准
     *
     * @param diaReportStandards 诊断报告标准
     * @return 结果
     */
    int updateDiaReportStandards(DiaReportStandards diaReportStandards);

    /**
     * 删除诊断报告标准
     *
     * @param standardId 诊断报告标准主键
     * @return 结果
     */
    int deleteDiaReportStandardsByStandardId(Long standardId);

    /**
     * 批量删除诊断报告标准
     *
     * @param standardIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteDiaReportStandardsByStandardIds(Long[] standardIds);
}
