/**
 * Copyright 2019 DH
 * All right reserved.
 * 项目名称: 大恒泰山系统
 * 创建日期:2022/8/22
 */
package org.springblade.etl.controller;


import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;

import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.etl.entity.EtlRainDataEntity;

import org.springblade.etl.entity.EtlRsvrDataEntity;

import org.springblade.etl.service.IEtlRainDataService;

import org.springblade.modules.baseinfo.rtu.service.IRtuBaseInfoService;
import org.springblade.modules.business.warning.service.IRtuWarningService;
import org.springblade.task.SurfDataProcessTask;
import org.springblade.test.DataPack;
import org.springblade.test.DataPackHeader;
import org.springblade.test.DataPoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import ucar.nc2.NetcdfFile;
import ucar.nc2.NetcdfFiles;

import javax.annotation.Resource;

import java.util.*;


/***
 * Date:2022/8/22
 * Title:行政区划管理
 * Description：对本文件的详细描述，原则上不能少于30字
 * @author dylan
 * @version 1.0
 * Remark：认为有必要的其他信息
 */
@RestController
@RequestMapping("galaxy-test/test")
@AllArgsConstructor
@Api(value = "业务字典", tags = "业务字典")
@Slf4j
public class TestController extends BladeController {
    private final IRtuBaseInfoService rtuBaseInfoService;
    private final IEtlRainDataService etlRainDataService;

    private final IRtuWarningService rtuWarningService;

    @Resource
    private RedisTemplate redisTemplate;
    @Autowired
    private KafkaTemplate<String, String> kafkaTemplate;

    @Resource
    private SurfDataProcessTask surfDataProcessTask;

    @GetMapping("/dcs")
    @ApiOperationSupport(order = 1)
    public R<String> sendDcs() {
        DataPack dataPack = new DataPack();
        DataPackHeader dataPackHeader = new DataPackHeader();
        dataPackHeader.setPower("power01");
        dataPackHeader.setGroup("1");
        dataPack.setDataHeader(dataPackHeader);
        List<DataPoint> dataBody = new ArrayList<>(2);
        DataPoint point = new DataPoint();
        point.setQuality(1L);
        point.setType(1L);
        point.setValue(15.2);
        point.setTime(System.currentTimeMillis());
        point.setPoint("1-rcs-te193a");
        dataBody.add(point);
        point = new DataPoint();
        point.setQuality(1L);
        point.setType(1L);
        point.setValue(25.2);
        point.setTime(System.currentTimeMillis());
        point.setPoint("1-rcs-ft101a-med");
        dataBody.add(point);
        point = new DataPoint();
        point.setQuality(1L);
        point.setType(1L);
        point.setValue(95.2);
        point.setTime(System.currentTimeMillis());
        point.setPoint("1-CAS-V014-VOPN");
        dataBody.add(point);
        dataPack.setDataBody(dataBody);

        kafkaTemplate.send("dcs.power01.test.1", JSONObject.toJSONString(dataPack));
        return R.success("ok");
    }


    @GetMapping("/krs")
    @ApiOperationSupport(order = 1)
    public R<String> sendKrs() {
        Map<String, Object> dataPack = new HashMap<>();
        dataPack.put("power", "power01");
        dataPack.put("time", System.currentTimeMillis());

        List<Map<String, Object>> radBody = new ArrayList<>(1);
        Map<String, Object> rad = new HashMap();
        rad.put("power", "power01");
        rad.put("station", "AS1");
        rad.put("value", 0.0);
        rad.put("time", System.currentTimeMillis());
        List<Map<String, Object>> points = new ArrayList<>(1);
        Map<String, Object> point = new HashMap<>();
        point.put("type", 1L);
        point.put("quality", 1L);
        point.put("value", 15.2);
        point.put("time", System.currentTimeMillis());
        point.put("point", "AS1RAD");
        points.add(point);
        rad.put("points", points);
        radBody.add(rad);

        rad = new HashMap();
        rad.put("power", "power01");
        rad.put("station", "BS1");
        rad.put("value", 0.0);
        rad.put("time", System.currentTimeMillis());
        points = new ArrayList<>(1);
        point = new HashMap<>();
        point.put("type", 1L);
        point.put("quality", 1L);
        point.put("value", 15.2);
        point.put("time", System.currentTimeMillis());
        point.put("point", "BS1RAD");
        points.add(point);
        rad.put("points", points);
        radBody.add(rad);

        dataPack.put("rad", radBody);


        List<Map<String, Object>> rainBody = new ArrayList<>(1);
        Map<String, Object> rain = new HashMap();
        rain.put("power", "power01");
        rain.put("station", "BS1");
        rain.put("value", 0.0);
        rain.put("time", System.currentTimeMillis());
        points = new ArrayList<>(1);
        point = new HashMap<>();
        point.put("type", 1L);
        point.put("quality", 1L);
        point.put("value", 15.2);
        point.put("time", System.currentTimeMillis());
        point.put("point", "BS1RAIN");
        points.add(point);
        rain.put("points", points);
        rainBody.add(rain);
        dataPack.put("rain", rainBody);


        List<Map<String, Object>> hihhBody = new ArrayList<>(1);
        Map<String, Object> hihh = new HashMap();
        hihh.put("power", "power01");
        hihh.put("station", "AS1");
        hihh.put("time", System.currentTimeMillis());
        hihh.put("hi", 0.0);
        hihh.put("hh", 1.0);
        hihhBody.add(hihh);

        hihh = new HashMap();
        hihh.put("power", "power01");
        hihh.put("station", "BS1");
        hihh.put("time", System.currentTimeMillis());
        hihh.put("hi", 0.0);
        hihh.put("hh", 1.0);
        hihhBody.add(hihh);
        dataPack.put("hihh", hihhBody);


        List<Map<String, Object>> weatherBody = new ArrayList<>(1);
        Map<String, Object> weather = new HashMap();
        weather.put("power", "power01");
        weather.put("station", "weather01");
        weather.put("time", System.currentTimeMillis());
        points = new ArrayList<>(1);
        point = new HashMap<>();
        point.put("type", 1L);
        point.put("quality", 1L);
        point.put("value", 15.2);
        point.put("time", System.currentTimeMillis());
        point.put("point", "surfacetemp");
        points.add(point);

        point = new HashMap<>();
        point.put("type", 1L);
        point.put("quality", 1L);
        point.put("value", 15.2);
        point.put("time", System.currentTimeMillis());
        point.put("point", "airtemp");
        points.add(point);
        weather.put("points", points);
        weatherBody.add(weather);
        dataPack.put("weather", weatherBody);


        List<Map<String, Object>> carBody = new ArrayList<>(1);
        Map<String, Object> car = new HashMap();
        car.put("power", "power01");
        car.put("car", "car01");
        car.put("time", System.currentTimeMillis());
        points = new ArrayList<>(1);
        point = new HashMap<>();
        point.put("type", 1L);
        point.put("quality", 1L);
        point.put("value", 15.2);
        point.put("time", System.currentTimeMillis());
        point.put("point", "carradrade");
        points.add(point);

        point = new HashMap<>();
        point.put("type", 1L);
        point.put("quality", 1L);
        point.put("value", 15.2);
        point.put("time", System.currentTimeMillis());
        point.put("point", "carlongitude");
        points.add(point);
        car.put("points", points);
        carBody.add(car);
        dataPack.put("car", carBody);


        kafkaTemplate.send("krs", JSONObject.toJSONString(dataPack));
        return R.success("ok");
    }

    @GetMapping("/dcs/rain")
    @ApiOperationSupport(order = 1)
    public R<String> addRain(@RequestParam(name = "rtuCode") String rtuCode) {
        try {
            String filename = "D:\\tmp\\test\\Z_SURF_C_BABJ_20230517112343_P_CMPA_RT_BEHT_0P01_HOR-PRE-2023051711.GRB2";


            //NetcdfFile netcdfFile = NetcdfFiles.open(filename, null);
            NetcdfFile netcdfFile = NetcdfFiles.open(filename);
            ///	ImmutableList<Variable> variables = netcdfFile.getVariables();
            //	surfDataProcessTask.submit(filename,Func.formatDateTime(new Date()));

//			log.info("***************************");
//			log.info("{}",	netcdfFile.getFileTypeId());
//			log.info("***************************");
//			log.info("{}",	netcdfFile.getTitle());
//			log.info("***************************");
//			log.info("{}",	netcdfFile.getDetailInfo());
//			log.info("***************************");
//			log.info("{}",netcdfFile.getLocation());
//			log.info("***************************");
            //	ImmutableDescriptor
            //ImmutableList<Variable> variables = netcdfFile.getVariables();
//			ImmutableList<Attribute> attributeIterator =	netcdfFile.getGlobalAttributes();
//			for(Attribute a:attributeIterator){
//				log.info("***************************");
//				log.info("Attribute {},{},{}",a.getName(),a.getStringValue(),a.getDataType().toString());
//			}

            //	List<String> lons = new LinkedList<>();
//			List<String> lats = new LinkedList<>();
//			List<String> times = new LinkedList<>();
//
//			List<Map<String, String>> values = new LinkedList<>();
//
//			for (Variable v : variables) {
//				log.info("***************************");
//				log.info("{},{},{}", v.getFullName(), v.getDataType().toString(), v.getDimensionsString());
//				log.info("***************************");
//				if (v.getFullName().equals("lon")) {
//					log.info("lon size {}", v.getSize());
//					Array datas = v.read();
//					Index index = datas.getIndex();
//					int[] shapelist = v.getShape();
//					for (int i = 0; i < shapelist[0]; i++) {
//						float lonv = datas.getFloat(index.set(i));
//						lons.add(Func.toStr(lonv));
//					}
//				}
//				log.info("***************************");
//				if (v.getFullName().equals("lat")) {
//					log.info("lat size {}", v.getSize());
//					Array datas = v.read();
//					Index index = datas.getIndex();
//					int[] shapelist = v.getShape();
//					for (int i = 0; i < shapelist[0]; i++) {
//						float latv = datas.getFloat(index.set(i));
//						lats.add(Func.toStr(latv));
//					}
//				}
//				log.info("***************************");
//				if (v.getFullName().equals("time")) {
//					log.info("time size {}", v.getSize());
//					Array datas = v.read();
//					Index index = datas.getIndex();
//					int[] shapelist = v.getShape();
//					for (int i = 0; i < shapelist[0]; i++) {
//						double timev = datas.getDouble(index.set(i));
//						times.add(Func.toStr(timev));
//					}
//				}
//				log.info("***************************");
//				if (v.getFullName().equals("reftime")) {
//					log.info("reftime size {}", v.getSize());
////					Array datas = v.read();
////					Index index= datas.getIndex();
////					int[] shapelist= v.getShape();
////					for (int i = 0; i < shapelist[0]; i++) {
////						double timev=	datas.getDouble(index.set(i));
////						times.add(Func.toStr(timev));
////					}
//				}
//
//
//				log.info("***************************");
//				if (v.getFullName().equals("Total_precipitation_surface")) {
//					log.info("surface size {}", v.getSize());
//					Array datas = v.read();
//					int[] shapelist = v.getShape();
//					Index index = datas.getIndex();
//					//按时间
//					for (int i = 0; i < shapelist[0]; i++) {
//						// 按维度
//						for (int n = 0; n < shapelist[1]; n++) {
//							// 按经度
//							for (int k = 0; k < 100; k++) {
//								// 按照对应索引获取数据并转换为string类型添加到数组中
//								float dval = datas.getFloat(index.set(i, n, k));
//								log.info("shape {} {} {}", i, n, k);
//								log.info("time,lat,lon,value:    {},{},{}", lats.get(n), lons.get(k), dval);
//							}
//						}
//					}
//				}
//
//			}

        } catch (Exception e) {
            e.printStackTrace();
        }

        return R.data("ok");
    }

    @GetMapping("/data/rain/1")
    @ApiOperationSupport(order = 1)
    public R<String> addRain1() {

        //	surfDataProcessTask.submitTask("Z_SURF_C_BABJ_20230517080534_P_CMPA_RT_BEHT_0P01_HOR-PRE-2023051708.GRB2");
//		EtlRainDataEntity etlRainDataEntity = new EtlRainDataEntity();
//
//		Calendar calendar = Calendar.getInstance();
//		calendar.set(Calendar.HOUR_OF_DAY, 12);
//		calendar.set(Calendar.MINUTE, 0);
//		calendar.set(Calendar.SECOND, 0);
//		etlRainDataEntity.setTm(calendar.getTime());
//
//		calendar.set(Calendar.MINUTE, 11);
//
//		etlRainDataEntity.setFromDate(calendar.getTime());
//
//		etlRainDataEntity.setRtuCode("01751310");
//		etlRainDataEntity.setIntv(0.05);
//		etlRainDataEntity.setDrp(1.0);
//
//		kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));


//		EtlRainDataEntity etlRainDataEntity=new EtlRainDataEntity();
//		etlRainDataEntity.setRtuCode("01751300");
//		etlRainDataEntity.setIntv(1.0);
//		etlRainDataEntity.setDrp(2.0);
//		etlRainDataEntity.setTm(new Date());
//		etlRainDataEntity.setFromDate(new Date());

        //rtuWarningService.checkRtuOutlierValueStatus(etlRainDataEntity);
        return R.data("ok");
    }

    @GetMapping("/data/rain/2")
    @ApiOperationSupport(order = 1)
    public R<String> addRain2() {
        //	try {

        //101.851139
        //39.044694
        //surf left top  0.0 39.039997  101.85
        //surf left bottom  0.0 39.039997  101.86
        //surf right top  0.0 39.05  101.85
        //surf right bottom  0.0 39.05  101.86


        String rtuCode = "01751300";

        ValueOperations<String, String> ops = redisTemplate.opsForValue();
        String key = rtuCode + ".surf.lefttop.value";
        String value1 = ops.get(key);
        key = rtuCode + ".surf.lefttop.lon";
        String ltLon = ops.get(key);
        key = rtuCode + ".surf.lefttop.lat";
        String ltLat = ops.get(key);

        key = rtuCode + ".surf.leftbottom.value";
        String value2 = ops.get(key);
        key = rtuCode + ".surf.leftbottom.lon";
        String lbLon = ops.get(key);
        key = rtuCode + ".surf.leftbottom.lat";
        String lbLat = ops.get(key);

        key = rtuCode + ".surf.righttop.value";
        String value3 = ops.get(key);
        key = rtuCode + ".surf.righttop.lon";
        String rtLon = ops.get(key);
        key = rtuCode + ".surf.righttop.lat";
        String rtLat = ops.get(key);

        key = rtuCode + ".surf.rightbottom.value";
        String value4 = ops.get(key);
        key = rtuCode + ".surf.rightbottom.lon";
        String rbLon = ops.get(key);
        key = rtuCode + ".surf.rightbottom.lat";
        String rbLat = ops.get(key);

        if (null != value1 && null != value2 && null != value3 && null != value4) {
            float count = Func.toFloat(value1) + Func.toFloat(value2) + Func.toFloat(value3) + Func.toFloat(value4);
            count = count / 4;
            log.info("测站编码{} 纬度 {} 经度{}", rtuCode, 39.044694, 101.851139);
            log.info("网格左上角 值  {} 纬度 {} 经度 {} ", value1, ltLat, ltLon);
            log.info("网格左下角 值  {} 纬度 {} 经度 {} ", value2, lbLat, lbLon);
            log.info("网格右上角 值  {} 纬度 {} 经度 {} ", value3, rtLat, rtLon);
            log.info("网格右下角 值  {} 纬度 {} 经度 {} ", value4, rbLat, rbLon);

            log.info("网格内降雨平均值 {}", count);

        } else {
            log.info("no surf info");
        }


        //surfDataProcessTask.getSurfValue("94.65","34.899998");
//		} catch (RocksDBException e) {
//			e.printStackTrace();
//		} catch (IOException e) {
//			e.printStackTrace();
//		} catch (ClassNotFoundException e) {
//			e.printStackTrace();
//		}
//		EtlRainDataEntity etlRainDataEntity = new EtlRainDataEntity();
//
//		Calendar calendar = Calendar.getInstance();
//		calendar.set(Calendar.HOUR_OF_DAY, 12);
//		calendar.set(Calendar.MINUTE, 5);
//		calendar.set(Calendar.SECOND, 0);
//		etlRainDataEntity.setTm(calendar.getTime());
//
//		calendar.set(Calendar.MINUTE, 5);
//
//		etlRainDataEntity.setFromDate(calendar.getTime());
//
//		etlRainDataEntity.setRtuCode("01751310");
//		etlRainDataEntity.setIntv(0.05);
//		etlRainDataEntity.setDrp(1.0);
//
//		kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));
        return R.data("ok");
    }

    @GetMapping("/data/rain/3")
    @ApiOperationSupport(order = 1)
    public R<String> addRain3() {
        EtlRainDataEntity etlRainDataEntity = new EtlRainDataEntity();

        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 14);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());

        //	calendar.set(Calendar.MINUTE, 22);

        etlRainDataEntity.setFromDate(calendar.getTime());

        etlRainDataEntity.setRtuCode("01740030");
        etlRainDataEntity.setIntv(1.0);
        etlRainDataEntity.setDrp(3.0);

        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));
        return R.data("ok");
    }

    @GetMapping("/data/rain/4")
    @ApiOperationSupport(order = 1)
    public R<String> addRain4() {
        EtlRainDataEntity etlRainDataEntity = new EtlRainDataEntity();

        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 12);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());

        calendar.set(Calendar.MINUTE, 27);

        etlRainDataEntity.setFromDate(calendar.getTime());

        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);

        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));
        return R.data("ok");
    }

    @GetMapping("/data/rain/5")
    @ApiOperationSupport(order = 1)
    public R<String> addRain5() {
        EtlRainDataEntity etlRainDataEntity = new EtlRainDataEntity();

        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 12);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());

        calendar.set(Calendar.MINUTE, 27);

        etlRainDataEntity.setFromDate(calendar.getTime());

        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(1.0);
        etlRainDataEntity.setDrp(1.0);

        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));
        return R.data("ok");
    }

    @GetMapping("/data/river/0")
    @ApiOperationSupport(order = 1)
    public R<String> addriver0() {
        ValueOperations<String, String> ops = redisTemplate.opsForValue();
        String key = "etl.river.40516502.up.5min";
        JSONArray array = new JSONArray();
        ops.set(key, array.toJSONString());
        return R.data("ok");
    }

    @GetMapping("/data/river/1")
    @ApiOperationSupport(order = 1)
    public R<String> addriver1() {

        EtlRsvrDataEntity etlRsvrDataEntity = new EtlRsvrDataEntity();

        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 9);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        etlRsvrDataEntity.setTm(calendar.getTime());

        calendar.set(Calendar.HOUR_OF_DAY, 11);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        etlRsvrDataEntity.setFromDate(calendar.getTime());

        etlRsvrDataEntity.setRtuCode("20911190");
        etlRsvrDataEntity.setRz(0.05);


        kafkaTemplate.send("topic-etl-rsvr-data", JSONObject.toJSONString(etlRsvrDataEntity));
        return R.data("ok");
    }

    @GetMapping("/data/river/2")
    @ApiOperationSupport(order = 1)
    public R<String> addriver2() {
        EtlRsvrDataEntity etlRsvrDataEntity = new EtlRsvrDataEntity();

        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 9);
        calendar.set(Calendar.MINUTE, 10);
        calendar.set(Calendar.SECOND, 0);
        etlRsvrDataEntity.setTm(calendar.getTime());

        calendar.set(Calendar.HOUR_OF_DAY, 12);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);

        etlRsvrDataEntity.setFromDate(calendar.getTime());

        etlRsvrDataEntity.setRtuCode("01718530");
        etlRsvrDataEntity.setRz(0.05);


        kafkaTemplate.send("topic-etl-rsvr-data", JSONObject.toJSONString(etlRsvrDataEntity));
        return R.data("ok");


    }

    @GetMapping("/data/river/3")
    @ApiOperationSupport(order = 1)
    public R<String> addriver3() {
        EtlRsvrDataEntity etlRsvrDataEntity = new EtlRsvrDataEntity();

        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 12);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRsvrDataEntity.setTm(calendar.getTime());

        calendar.set(Calendar.MINUTE, 27);

        etlRsvrDataEntity.setFromDate(calendar.getTime());

        etlRsvrDataEntity.setRtuCode("20911190");
        etlRsvrDataEntity.setRz(0.05);


        kafkaTemplate.send("topic-etl-rsvr-data", JSONObject.toJSONString(etlRsvrDataEntity));
        return R.data("ok");


    }

    @GetMapping("/data/river/4")
    @ApiOperationSupport(order = 1)
    public R<String> addriver4() {
        EtlRsvrDataEntity etlRsvrDataEntity = new EtlRsvrDataEntity();

        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 12);
        calendar.set(Calendar.MINUTE, 20);
        calendar.set(Calendar.SECOND, 0);
        etlRsvrDataEntity.setTm(calendar.getTime());

        calendar.set(Calendar.MINUTE, 35);

        etlRsvrDataEntity.setFromDate(calendar.getTime());

        etlRsvrDataEntity.setRtuCode("20911190");
        etlRsvrDataEntity.setRz(0.05);


        kafkaTemplate.send("topic-etl-rsvr-data", JSONObject.toJSONString(etlRsvrDataEntity));
        return R.data("ok");


    }

    @GetMapping("/data/rain/hour/0")
    @ApiOperationSupport(order = 1)
    public R<String> addrainhour0() {
        String key = "etl.rain.01751310.up.hour";

        ValueOperations<String, String> ops = redisTemplate.opsForValue();

        JSONArray array = new JSONArray();
        ops.set(key, array.toJSONString());
        return R.data("ok");
    }

    @GetMapping("/data/rain/hour")
    @ApiOperationSupport(order = 1)
    public R<String> addrainhour() {
        EtlRainDataEntity etlRainDataEntity = new EtlRainDataEntity();
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.DAY_OF_MONTH, 9);
        calendar.set(Calendar.HOUR_OF_DAY, 12);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.DAY_OF_MONTH, 9);
        calendar.set(Calendar.HOUR_OF_DAY, 13);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));


        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.DAY_OF_MONTH, 9);
        calendar.set(Calendar.HOUR_OF_DAY, 13);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

//		 etlRainDataEntity= new EtlRainDataEntity();
//		 calendar=Calendar.getInstance();
//		calendar.set(Calendar.DAY_OF_MONTH,9);
//		calendar.set(Calendar.HOUR_OF_DAY,14);
//		calendar.set(Calendar.MINUTE,15);
//		calendar.set(Calendar.SECOND,0);
//		etlRainDataEntity.setTm(calendar.getTime());
//		calendar.set(Calendar.MINUTE,27);
//		etlRainDataEntity.setFromDate(calendar.getTime());
//		etlRainDataEntity.setRtuCode("01751310");
//		etlRainDataEntity.setIntv(0.05);
//		etlRainDataEntity.setDrp(1.0);
//		kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

//		 etlRainDataEntity= new EtlRainDataEntity();
//		 calendar=Calendar.getInstance();
//		calendar.set(Calendar.DAY_OF_MONTH,9);
//		calendar.set(Calendar.HOUR_OF_DAY,15);
//		calendar.set(Calendar.MINUTE,15);
//		calendar.set(Calendar.SECOND,0);
//		etlRainDataEntity.setTm(calendar.getTime());
//		calendar.set(Calendar.MINUTE,27);
//		etlRainDataEntity.setFromDate(calendar.getTime());
//		etlRainDataEntity.setRtuCode("01751310");
//		etlRainDataEntity.setIntv(0.05);
//		etlRainDataEntity.setDrp(1.0);
//		kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

//		 etlRainDataEntity= new EtlRainDataEntity();
//		 calendar=Calendar.getInstance();
//		calendar.set(Calendar.DAY_OF_MONTH,9);
//		calendar.set(Calendar.HOUR_OF_DAY,16);
//		calendar.set(Calendar.MINUTE,15);
//		calendar.set(Calendar.SECOND,0);
//		etlRainDataEntity.setTm(calendar.getTime());
//		calendar.set(Calendar.MINUTE,27);
//		etlRainDataEntity.setFromDate(calendar.getTime());
//		etlRainDataEntity.setRtuCode("01751310");
//		etlRainDataEntity.setIntv(0.05);
//		etlRainDataEntity.setDrp(1.0);
//		kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.DAY_OF_MONTH, 9);
        calendar.set(Calendar.HOUR_OF_DAY, 17);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.DAY_OF_MONTH, 9);
        calendar.set(Calendar.HOUR_OF_DAY, 18);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

//		 etlRainDataEntity= new EtlRainDataEntity();
//		 calendar=Calendar.getInstance();
//		calendar.set(Calendar.DAY_OF_MONTH,9);
//		calendar.set(Calendar.HOUR_OF_DAY,19);
//		calendar.set(Calendar.MINUTE,15);
//		calendar.set(Calendar.SECOND,0);
//		etlRainDataEntity.setTm(calendar.getTime());
//		calendar.set(Calendar.MINUTE,27);
//		etlRainDataEntity.setFromDate(calendar.getTime());
//		etlRainDataEntity.setRtuCode("01751310");
//		etlRainDataEntity.setIntv(0.05);
//		etlRainDataEntity.setDrp(1.0);
//		kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

//		 etlRainDataEntity= new EtlRainDataEntity();
//		 calendar=Calendar.getInstance();
//		calendar.set(Calendar.DAY_OF_MONTH,9);
//		calendar.set(Calendar.HOUR_OF_DAY,20);
//		calendar.set(Calendar.MINUTE,15);
//		calendar.set(Calendar.SECOND,0);
//		etlRainDataEntity.setTm(calendar.getTime());
//		calendar.set(Calendar.MINUTE,27);
//		etlRainDataEntity.setFromDate(calendar.getTime());
//		etlRainDataEntity.setRtuCode("01751310");
//		etlRainDataEntity.setIntv(0.05);
//		etlRainDataEntity.setDrp(1.0);
//		kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.DAY_OF_MONTH, 9);
        calendar.set(Calendar.HOUR_OF_DAY, 21);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.DAY_OF_MONTH, 9);
        calendar.set(Calendar.HOUR_OF_DAY, 22);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.DAY_OF_MONTH, 9);
        calendar.set(Calendar.HOUR_OF_DAY, 23);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 1);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));


        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 2);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));


        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 3);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 4);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 5);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 6);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));


        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 7);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

//		etlRainDataEntity= new EtlRainDataEntity();
//		calendar=Calendar.getInstance();
//		calendar.set(Calendar.HOUR_OF_DAY,8);
//		calendar.set(Calendar.MINUTE,15);
//		calendar.set(Calendar.SECOND,0);
//		etlRainDataEntity.setTm(calendar.getTime());
//		calendar.set(Calendar.MINUTE,27);
//		etlRainDataEntity.setFromDate(calendar.getTime());
//		etlRainDataEntity.setRtuCode("01751310");
//		etlRainDataEntity.setIntv(0.05);
//		etlRainDataEntity.setDrp(1.0);
//		kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 9);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 10);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 11);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 12);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 13);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

//
//		etlRainDataEntity= new EtlRainDataEntity();
//		calendar=Calendar.getInstance();
//		calendar.set(Calendar.HOUR_OF_DAY,14);
//		calendar.set(Calendar.MINUTE,15);
//		calendar.set(Calendar.SECOND,0);
//		etlRainDataEntity.setTm(calendar.getTime());
//		calendar.set(Calendar.MINUTE,27);
//		etlRainDataEntity.setFromDate(calendar.getTime());
//		etlRainDataEntity.setRtuCode("01751310");
//		etlRainDataEntity.setIntv(0.05);
//		etlRainDataEntity.setDrp(1.0);
//		kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 15);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 16);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));
//
//
        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 17);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 18);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));


        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 19);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));


        etlRainDataEntity = new EtlRainDataEntity();
        calendar = Calendar.getInstance();
        calendar.set(Calendar.HOUR_OF_DAY, 20);
        calendar.set(Calendar.MINUTE, 15);
        calendar.set(Calendar.SECOND, 0);
        etlRainDataEntity.setTm(calendar.getTime());
        calendar.set(Calendar.MINUTE, 27);
        etlRainDataEntity.setFromDate(calendar.getTime());
        etlRainDataEntity.setRtuCode("01751310");
        etlRainDataEntity.setIntv(0.05);
        etlRainDataEntity.setDrp(1.0);
        kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));

        return R.data("ok");
    }
}
