package com.yanzhu.jh.trouble.mapper;

import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
import com.yanzhu.jh.trouble.domain.where.SmzSspProblemmodifyWhere;

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

/**
 * 质量整改Mapper接口
 * 
 * @author JiangYuQi
 * @date 2023-07-28
 */
public interface SmzSspProblemmodifyMapper 
{
    /**
     * 查询质量整改
     * 
     * @param id 质量整改主键
     * @return 质量整改
     */
    public SmzSspProblemmodify selectSmzSspProblemmodifyById(Long id);

    /**
     * 查询质量整改详情
     *
     * @param id 质量整改主键
     * @return 质量整改
     */
    public SmzSspProblemmodify selectSmzSspProblemmodifyInfoById(Long id);

    /**
     * 查询质量整改列表
     * 
     * @param smzSspProblemmodify 质量整改
     * @return 质量整改集合
     */
    public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);

    /**
     * 查询质量整改列表
     *
     * @param smzSspProblemmodify 质量整改
     * @return 质量整改集合
     */
    public List<SmzSspProblemmodify> selectWechatSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);

    /**
     * 根据状态分组统计数量
     * @param smzSspProblemmodify 查询条件
     * @return List<Map<String, Integer>>
     */
    public List<Map<String, Object>> findProblemmodifyGroupByCheckState(SmzSspProblemmodify smzSspProblemmodify);

    /**
     * 根据状态分组统计数量
     * @param smzSspProblemmodify 查询条件
     * @return Integer
     */
    public Integer findProblemmodifyTimeoutCount(SmzSspProblemmodify smzSspProblemmodify);

    /**
     * 新增质量整改
     * 
     * @param smzSspProblemmodify 质量整改
     * @return 结果
     */
    public int insertSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify);

    /**
     * 修改质量整改
     * 
     * @param smzSspProblemmodify 质量整改
     * @return 结果
     */
    public int updateSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify);

    /**
     * 删除质量整改
     * 
     * @param id 质量整改主键
     * @return 结果
     */
    public int deleteSmzSspProblemmodifyById(Long id);

    /**
     * 批量删除质量整改
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSmzSspProblemmodifyByIds(Long[] ids);

    /**
     * 按安全类型分组查询
     * @param where
     * @return
     */
    public List<SmzSspProblemmodify> selectSummary(SmzSspProblemmodifyWhere where);

    /**
     * 按项目分组统计
     * @param where
     * @return
     */
    public List<SmzSspProblemmodify> selectSummaryByProject(SmzSspProblemmodifyWhere where);

    /**
     * 查询某天预警数
     * @param where startDate 查询的日期
     * @return
     */
    public List<SmzSspProblemmodify> countByDate(SmzSspProblemmodifyWhere where);

    /**
     * 查询两个日期之间的预警数
     * @param where startDate 开始日期  endDate 结束日期
     * @return
     */
    public List<SmzSspProblemmodify> countByDateRange(SmzSspProblemmodifyWhere where);

    public List<SmzSspProblemmodify> groupByInfotypeCheckState(SmzSspProblemmodifyWhere where);

    public int countTimeout(SmzSspProblemmodifyWhere where);

}
