package com.njcn.gather.storage.service;

import com.njcn.db.mybatisplus.service.IReplenishMybatisService;
import com.njcn.gather.storage.pojo.po.BaseResult;
import com.njcn.gather.storage.pojo.po.SimAndDigHarmonicResult;

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

public interface DetectionDataDealService extends IReplenishMybatisService<SimAndDigHarmonicResult> {


    Boolean acceptNonHarmonic(List<? extends BaseResult> nonHarmonicResultList, String code);

    Boolean acceptHarmonic(List<? extends BaseResult> harmonicResultList, String code);

    Boolean acceptNonHarmonicResult(List<? extends BaseResult> nonHarmonicResultList, String code);

    Boolean acceptHarmonicResult(List<? extends BaseResult> SimAndDigHarmonicResultList, String code);

    /**
     * 根据终端id查询终端所有监测项目是否合格
     *
     * @param isContrast
     * @param ids
     * @param adType
     * @param code
     * @return
     */
    Map<String, Integer> devResult(boolean isContrast, List<String> ids, List<String> adType, String code);

    /**
     * 获取检测点的检测结果
     *
     * @param monitorId
     * @param adTypes
     * @param dataSource
     * @param num
     * @param waveNum
     * @param code
     * @return
     */
    Integer getMonitorResult(String monitorId, List<String> adTypes, String dataSource, Integer num, Integer waveNum, String code);

    /**
     * 获取指定检测次数下，最后一次合格录波的组数，如果没有合格的录波，则返回-1
     *
     * @param monitorId
     * @param adTypes
     * @param num
     * @param code
     * @return
     */
    Map<Integer, Integer> getWaveNumResultMap(String monitorId, List<String> adTypes, Integer num, String code);
}
