|
|
@@ -1,1048 +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.ConcurrentDateFormat;
|
|
|
-import org.springblade.core.tool.utils.Func;
|
|
|
-import org.springblade.etl.entity.*;
|
|
|
-
|
|
|
-import org.springblade.etl.service.*;
|
|
|
-
|
|
|
-import org.springblade.modules.baseinfo.monitorpoint.entity.MonitorPointInfoEntity;
|
|
|
-import org.springblade.modules.baseinfo.monitorpoint.entity.MonitorPointRelEntity;
|
|
|
-import org.springblade.modules.baseinfo.monitorpoint.service.IMonitorPointRelService;
|
|
|
-import org.springblade.modules.baseinfo.monitorpoint.service.IMonitorPointService;
|
|
|
-import org.springblade.modules.baseinfo.monitorpoint.vo.MonitorPointInfoVO;
|
|
|
-import org.springblade.modules.baseinfo.monitorsite.entity.MonitorSiteInfoEntity;
|
|
|
-import org.springblade.modules.baseinfo.monitorsite.entity.MonitorSiteRelEntity;
|
|
|
-import org.springblade.modules.baseinfo.monitorsite.service.IMonitorSiteRelService;
|
|
|
-import org.springblade.modules.baseinfo.monitorsite.service.IMonitorSiteService;
|
|
|
-import org.springblade.modules.baseinfo.rtu.entity.RtuInfoEntity;
|
|
|
-import org.springblade.modules.baseinfo.rtu.service.IRtuBaseInfoService;
|
|
|
-import org.springblade.modules.baseinfo.wateruseconsumer.entity.WaterUseConsumerInfoEntity;
|
|
|
-import org.springblade.modules.baseinfo.wateruseconsumer.service.IWaterUseConsumerService;
|
|
|
-import org.springblade.modules.business.warning.service.IRtuWarningService;
|
|
|
-import org.springblade.surfacerain.SurfaceRainDataProcessor;
|
|
|
-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/etl/test")
|
|
|
-@AllArgsConstructor
|
|
|
-@Api(value = "业务字典", tags = "业务字典")
|
|
|
-@Slf4j
|
|
|
-public class EtlTestController 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 SurfaceRainDataProcessor surfDataProcessTask;
|
|
|
-
|
|
|
- private final IEtlRtuDataService rtuDataService;
|
|
|
-
|
|
|
- private final IEtlWiuDataService wiuDataService;
|
|
|
-
|
|
|
- private final IWaterUseConsumerService waterUseConsumerService;
|
|
|
-
|
|
|
- private final IEtlWiustDataService wiustDataService;
|
|
|
-
|
|
|
- private final IMonitorSiteService monitorSiteService;
|
|
|
-
|
|
|
- private final IEtlMpDataService mpDataService;
|
|
|
-
|
|
|
- private final IMonitorPointService monitorPointService;
|
|
|
-
|
|
|
- private final IEtlWiuWiustDataService wiuWiustDataService;
|
|
|
- private final IMonitorSiteRelService monitorSiteRelService;
|
|
|
-
|
|
|
- private final IEtlWiustMpDataService wiustMpDataService;
|
|
|
- private final IMonitorPointRelService monitorPointRelService;
|
|
|
-
|
|
|
-
|
|
|
- @GetMapping("/rtu")
|
|
|
- @ApiOperationSupport(order = 1)
|
|
|
- public R<String> updateEtlRtu() {
|
|
|
- EtlRtuDataEntity etlRtuDataEntity = new EtlRtuDataEntity();
|
|
|
- List<EtlRtuDataEntity> list = rtuDataService.selectList(etlRtuDataEntity);
|
|
|
- for (EtlRtuDataEntity entity : list) {
|
|
|
- RtuInfoEntity rtuInfoEntity = new RtuInfoEntity();
|
|
|
- rtuInfoEntity.setRtuCode(entity.getRtuCd());
|
|
|
- rtuInfoEntity.setAdCode(entity.getOrgCode());
|
|
|
- if ("00".equals(entity.getOrgCode())) {
|
|
|
- rtuInfoEntity.setOrgId(1123598813738675201L);
|
|
|
- } else if ("11".equals(entity.getOrgCode())) {
|
|
|
- rtuInfoEntity.setOrgId(1715215595639267330L);
|
|
|
- } else if ("12".equals(entity.getOrgCode())) {
|
|
|
- rtuInfoEntity.setOrgId(1715215690510229506L);
|
|
|
- } else if ("10".equals(entity.getOrgCode())) {
|
|
|
- rtuInfoEntity.setOrgId(1715215884710699010L);
|
|
|
- } else if ("13".equals(entity.getOrgCode())) {
|
|
|
- rtuInfoEntity.setOrgId(1715215952884916226L);
|
|
|
- } else if ("14".equals(entity.getOrgCode())) {
|
|
|
- rtuInfoEntity.setOrgId(1715216007264067585L);
|
|
|
- } else if ("15".equals(entity.getOrgCode())) {
|
|
|
- rtuInfoEntity.setOrgId(1715216066533777409L);
|
|
|
- } else if ("713".equals(entity.getOrgCode())) {
|
|
|
- rtuInfoEntity.setOrgId(1715215779899236354L);
|
|
|
- } else if ("111".equals(entity.getOrgCode())) {
|
|
|
- rtuInfoEntity.setOrgId(1715216136150835201L);
|
|
|
- }
|
|
|
- rtuBaseInfoService.save(rtuInfoEntity);
|
|
|
- }
|
|
|
-
|
|
|
- return R.success("ok");
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/wiu")
|
|
|
- @ApiOperationSupport(order = 1)
|
|
|
- public R<String> updateEtlWiu() {
|
|
|
- EtlWiuDataEntity dataEntity = new EtlWiuDataEntity();
|
|
|
- List<EtlWiuDataEntity> list = wiuDataService.selectList(dataEntity);
|
|
|
- for (EtlWiuDataEntity entity : list) {
|
|
|
- WaterUseConsumerInfoEntity waterUseConsumerInfoEntity = new WaterUseConsumerInfoEntity();
|
|
|
- waterUseConsumerInfoEntity.setWiuCd(entity.getWiuCd());
|
|
|
- waterUseConsumerInfoEntity.setWiuNm(entity.getWiuNm());
|
|
|
- waterUseConsumerInfoEntity.setLrNm(entity.getLrNm());
|
|
|
- waterUseConsumerInfoEntity.setTradTp(entity.getTradTp());
|
|
|
- waterUseConsumerInfoEntity.setEcoTp(entity.getEcoTp());
|
|
|
- waterUseConsumerInfoEntity.setMonLevel(entity.getMong());
|
|
|
- waterUseConsumerInfoEntity.setWiuTp(entity.getWiuTp());
|
|
|
- waterUseConsumerInfoEntity.setAddr(entity.getAddr());
|
|
|
- if ("00".equals(entity.getOrgCode())) {
|
|
|
- waterUseConsumerInfoEntity.setOrgId(1123598813738675201L);
|
|
|
- } else if ("11".equals(entity.getOrgCode())) {
|
|
|
- waterUseConsumerInfoEntity.setOrgId(1715215595639267330L);
|
|
|
- } else if ("12".equals(entity.getOrgCode())) {
|
|
|
- waterUseConsumerInfoEntity.setOrgId(1715215690510229506L);
|
|
|
- } else if ("10".equals(entity.getOrgCode())) {
|
|
|
- waterUseConsumerInfoEntity.setOrgId(1715215884710699010L);
|
|
|
- } else if ("13".equals(entity.getOrgCode())) {
|
|
|
- waterUseConsumerInfoEntity.setOrgId(1715215952884916226L);
|
|
|
- } else if ("14".equals(entity.getOrgCode())) {
|
|
|
- waterUseConsumerInfoEntity.setOrgId(1715216007264067585L);
|
|
|
- } else if ("15".equals(entity.getOrgCode())) {
|
|
|
- waterUseConsumerInfoEntity.setOrgId(1715216066533777409L);
|
|
|
- } else if ("713".equals(entity.getOrgCode())) {
|
|
|
- waterUseConsumerInfoEntity.setOrgId(1715215779899236354L);
|
|
|
- } else if ("111".equals(entity.getOrgCode())) {
|
|
|
- waterUseConsumerInfoEntity.setOrgId(1715216136150835201L);
|
|
|
- }
|
|
|
- waterUseConsumerService.save(waterUseConsumerInfoEntity);
|
|
|
- }
|
|
|
-
|
|
|
- return R.success("ok");
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/wiust")
|
|
|
- @ApiOperationSupport(order = 1)
|
|
|
- public R<String> updateEtlWiust() {
|
|
|
- EtlWiustDataEntity dataEntity = new EtlWiustDataEntity();
|
|
|
- List<EtlWiustDataEntity> list = wiustDataService.selectList(dataEntity);
|
|
|
- for (EtlWiustDataEntity entity : list) {
|
|
|
- MonitorSiteInfoEntity monitorSiteInfoEntity = new MonitorSiteInfoEntity();
|
|
|
- monitorSiteInfoEntity.setWiustCd(entity.getWiustCd());
|
|
|
- monitorSiteInfoEntity.setWiustNm(entity.getWiustNm());
|
|
|
- monitorSiteInfoEntity.setWiustTp(entity.getWiustTp());
|
|
|
- monitorSiteInfoEntity.setLoc(entity.getLoc());
|
|
|
- monitorSiteInfoEntity.setDatTp(entity.getDatTp());
|
|
|
- monitorSiteInfoEntity.setWellTp(entity.getWellTp());
|
|
|
- String tm = entity.getEstStYm() + "01120000";
|
|
|
- monitorSiteInfoEntity.setEstStYm(Func.parse(tm, ConcurrentDateFormat.of("yyyyMMddHHmmss")));
|
|
|
-
|
|
|
- monitorSiteService.save(monitorSiteInfoEntity);
|
|
|
- }
|
|
|
-
|
|
|
- return R.success("ok");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @GetMapping("/mp")
|
|
|
- @ApiOperationSupport(order = 1)
|
|
|
- public R<String> updateEtlMp() {
|
|
|
- EtlMpDataEntity dataEntity = new EtlMpDataEntity();
|
|
|
- List<EtlMpDataEntity> list = mpDataService.selectList(dataEntity);
|
|
|
- for (EtlMpDataEntity entity : list) {
|
|
|
- MonitorPointInfoEntity pointInfoEntity = new MonitorPointInfoEntity();
|
|
|
- pointInfoEntity.setMpCd(entity.getMpCd());
|
|
|
- pointInfoEntity.setMpNm(entity.getMpNm());
|
|
|
- pointInfoEntity.setMpAddr(entity.getMpAddr());
|
|
|
- pointInfoEntity.setMpItem(entity.getMpItem());
|
|
|
- pointInfoEntity.setIsAuto(entity.getIsAuto());
|
|
|
- pointInfoEntity.setSourTp(entity.getSourTp());
|
|
|
- pointInfoEntity.setLat(entity.getWeiDu());
|
|
|
- pointInfoEntity.setLng(entity.getJingDu());
|
|
|
-
|
|
|
- monitorPointService.save(pointInfoEntity);
|
|
|
- }
|
|
|
-
|
|
|
- return R.success("ok");
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/rel/mp")
|
|
|
- @ApiOperationSupport(order = 1)
|
|
|
- public R<String> updateEtlWiustMp() {
|
|
|
- EtlWiustMpDataEntity dataEntity = new EtlWiustMpDataEntity();
|
|
|
- List<EtlWiustMpDataEntity> list = wiustMpDataService.selectList(dataEntity);
|
|
|
- for (EtlWiustMpDataEntity entity : list) {
|
|
|
- MonitorPointRelEntity pointInfoEntity = new MonitorPointRelEntity();
|
|
|
- pointInfoEntity.setMpCd(entity.getMpCd());
|
|
|
- pointInfoEntity.setWiustCd(entity.getWiustCd());
|
|
|
- monitorPointRelService.save(pointInfoEntity);
|
|
|
- }
|
|
|
-
|
|
|
- return R.success("ok");
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/rel/wiust")
|
|
|
- @ApiOperationSupport(order = 1)
|
|
|
- public R<String> updateEtlWiuWiust() {
|
|
|
- EtlWiuWiustDataEntity dataEntity = new EtlWiuWiustDataEntity();
|
|
|
- List<EtlWiuWiustDataEntity> list = wiuWiustDataService.selectList(dataEntity);
|
|
|
- for (EtlWiuWiustDataEntity entity : list) {
|
|
|
- MonitorSiteRelEntity pointInfoEntity = new MonitorSiteRelEntity();
|
|
|
- pointInfoEntity.setWiuCd(entity.getWiuCd());
|
|
|
- pointInfoEntity.setWiustCd(entity.getWiustCd());
|
|
|
-
|
|
|
-
|
|
|
- monitorSiteRelService.save(pointInfoEntity);
|
|
|
- }
|
|
|
-
|
|
|
- return R.success("ok");
|
|
|
- }
|
|
|
-
|
|
|
- @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");
|
|
|
- }
|
|
|
-}
|