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

import com.chinaitop.depot.intelligent.grainsituation.model.TPoints;
import com.chinaitop.depot.intelligent.grainsituation.model.TTestdata;
import com.chinaitop.depot.intelligent.grainsituation.model.TTestdataLayer;
import org.apache.ibatis.annotations.Param;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface TemperatureRecordService {
    List<TTestdata> getList(String vCfCode, String vDatatime, String startTime, String endTime,String tType,String orgId);

    List<TTestdataLayer> findByHouseAndTime(String lqId,String vCfCode, String vDatatime,String orgId);

    ArrayList<Object> findByHouseAndTimes(String lqId,String vCfCode, String vDatatime, String zsfs);

    List<TTestdata> getComparison(String vCfCodeLeft, String startTimeLeft, String endTimeLeft, String vCfCodeRight, String startTimeRight, String endTimeRight, String tType, String orgId);

    void insertBatch(List<TTestdata> testData);

    List<TTestdata> getByCodeAndTimes(List<String> cDcsCodes,List<Date> cTimes,List<String> lqTypes);

    String getOrgId (String cfCode);

    TTestdata getById(String id);

    /**
     *  获取温度表格
     * @param id
     * @param zsfs 
     * @return
     */
    Map<Integer, Map<Integer, Map<Integer, List<TPoints>>>> findByTempTable(String id, String zsfs);

    /**
     * 根据id查询浅圆仓粮情点温
     * y列值始终为 1 浅圆仓不需要
     * @param id
     * @return
     */
    Map<Integer,List<TPoints>> shallowCircularPointTempTable(String id);

    /**
     * 刷新云端测温数据中t_points字段的
     * @param orgId 组织机构ID
     * @param pageSize 要转换的条数
     * @return
     */
    void test(String orgId, Integer pageSize) throws IOException;
}
