package com.chinaitop.depot.intelligent.basicdata.service;

import com.chinaitop.depot.intelligent.basicdata.model.TWarningThreshold;
import com.chinaitop.depot.intelligent.basicdata.model.TWarningThresholdList;

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

public interface WarningThresholdService {
    List<TWarningThresholdList> getList(String cfCode,String orgId);

    List<TWarningThreshold> getByCfCode(String cfCode, Integer wState,String orgId);

    void saveAndUpdate(List<TWarningThreshold> thresholdList, String[] splitBehindCode);

    int deleteById(String id);

    /**
     * 根据id删除列表并删除详情数据
     *
     * @param id
     * @param vCfCode
     * @return
     */
    int deleteThreshold(String id, String vCfCode, String thresholdSetListJson);

    TWarningThreshold getByCfCodeAndwName(String cfCode, Integer wState, String wModule, String wName);

    HashMap<String, String> getByOrgIdAndCfCode(String orgId, String cfCode);

    /**
     * 根据orgId或仓房code查询测温预警,报警阀值.
     * @param orgId
     * @param vCfCode
     * @return
     */
    Map<String, Map<String, Object>> getValueByOrgIdOrCfCode(String orgId, String vCfCode);

    /**
     * 根据时间和组织编码查询多仓房编码,组织编码拦截器获取
     * @param updateTime
     * @return
     */
    String getCfCodeByTime(String updateTime);

    //    String checkAddStore(String storeCodes);
    List<TWarningThreshold> storeListData(String thresholdListJson, String[] splitBehindCode);

    /**
     * 根据仓房编码和orgId批量删除主表和详情数据
     * @param splitBehindCode
     * @param orgId
     */
    void deleteByStoreCodeAndOrgId(String[] splitBehindCode, String orgId);
}
