package com.tuoheng.admin.service;

import com.alibaba.fastjson.JSONObject;
import com.tuoheng.admin.entity.request.report.ExportReportRequest;
import com.tuoheng.admin.entity.request.third.DspCallbackRequest;
import com.tuoheng.admin.service.airData.report.ExportReportService;
import com.tuoheng.admin.service.third.dsp.IDspCallbackService;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@Slf4j
@RunWith(SpringRunner.class)
@SpringBootTest
public class ExportReportServiceTest {

    @Autowired
    private ExportReportService exportReportService;

    @Test
    public void testxportReport() {
        ExportReportRequest request = new ExportReportRequest();
        request.setInspectionId("e53dc6189ec300fe063c30f5972a5fe1");
        //request.setAirDataTypeId("1");
        request.setOssUrl("https://img2.woyaogexing.com/2023/05/23/1ec4a4a1560ca19c8c1775251dabb620.png");
        request.setSamplingPointsNum("510");   // 采样点数量
        request.setAverageGridSize("84.9635米X849635米(7218803平方米)");   // 检测区域网格平均尺寸
        request.setGridArea("346502.563(平方米)");   // 总检测区域网格面积
        request.setCenterPointLongitudeAndLatitude("1187743E318280N");   // 检测区域中心点经纬度
        request.setAverageConcentration("20037ug/m3");   // 检测区域平均浓度
        request.setGridConcentrationMax("24714u/m31187726E318253N");   // 网格浓度最高值
        request.setGridConcentrationMix("16000ug/m3(1187761E318291N)");   // 网格浓度最小值
        request.setSinglePointConcentrationMax("25000ug/m3(1187718318252N)2022/04/29 14:06:40");   // 单点浓度最高值
        request.setSinglePointConcentrationMin("16000ug/m3(1187753318286 N)2022/04/2914:02:21");   // 单点浓度最低值
        //request.setGridSize(1);

        JSONObject json = (JSONObject) JSONObject.toJSON(request);
        log.info("-----> json={}", json);

//        exportReportService.exportReport(request);
    }

}
