|
@@ -1,866 +0,0 @@
|
|
|
-/**
|
|
|
|
|
- * 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.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("/data/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() {
|
|
|
|
|
- EtlRainDataEntity etlRainDataEntity = new EtlRainDataEntity();
|
|
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
|
|
- //calendar.set(Calendar.HOUR_OF_DAY, 1);
|
|
|
|
|
- calendar.set(Calendar.MINUTE, 0);
|
|
|
|
|
- calendar.set(Calendar.SECOND, 0);
|
|
|
|
|
- etlRainDataEntity.setTm(calendar.getTime());
|
|
|
|
|
- etlRainDataEntity.setFromDate(calendar.getTime());
|
|
|
|
|
- etlRainDataEntity.setRtuCode("01710140");
|
|
|
|
|
- etlRainDataEntity.setIntv(1.0);
|
|
|
|
|
- etlRainDataEntity.setDrp(3.0);
|
|
|
|
|
- kafkaTemplate.send("topic-etl-rain-data", JSONObject.toJSONString(etlRainDataEntity));
|
|
|
|
|
- return R.data("ok");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @GetMapping("/data/rain/2")
|
|
|
|
|
- @ApiOperationSupport(order = 1)
|
|
|
|
|
- public R<String> addRain2() {
|
|
|
|
|
- EtlRainDataEntity etlRainDataEntity = new EtlRainDataEntity();
|
|
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
|
|
- calendar.set(Calendar.HOUR_OF_DAY, 2);
|
|
|
|
|
- calendar.set(Calendar.MINUTE, 0);
|
|
|
|
|
- calendar.set(Calendar.SECOND, 0);
|
|
|
|
|
- etlRainDataEntity.setTm(calendar.getTime());
|
|
|
|
|
- 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/3")
|
|
|
|
|
- @ApiOperationSupport(order = 1)
|
|
|
|
|
- public R<String> addRain3() {
|
|
|
|
|
- EtlRainDataEntity etlRainDataEntity = new EtlRainDataEntity();
|
|
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
|
|
- calendar.set(Calendar.HOUR_OF_DAY, 3);
|
|
|
|
|
- calendar.set(Calendar.MINUTE, 0);
|
|
|
|
|
- calendar.set(Calendar.SECOND, 0);
|
|
|
|
|
- etlRainDataEntity.setTm(calendar.getTime());
|
|
|
|
|
- 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, 4);
|
|
|
|
|
- calendar.set(Calendar.MINUTE, 0);
|
|
|
|
|
- calendar.set(Calendar.SECOND, 0);
|
|
|
|
|
- etlRainDataEntity.setTm(calendar.getTime());
|
|
|
|
|
- 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, 5);
|
|
|
|
|
- calendar.set(Calendar.MINUTE, 0);
|
|
|
|
|
- calendar.set(Calendar.SECOND, 0);
|
|
|
|
|
- etlRainDataEntity.setTm(calendar.getTime());
|
|
|
|
|
- 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");
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|