Commit 6e105493 authored by hezhuozhi's avatar hezhuozhi

添加查询工况变量默认值时间

parent cd0d13a5
......@@ -20,6 +20,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
......@@ -53,6 +54,8 @@ public class KafkaAnalyseController {
IndicatorDataMapper indicatorDataMapper;
@Autowired
IdxBizFanHealthIndexMapper idxBizFanHealthIndexMapper;
@Value("${gkblhf.select.day:-1}")
private String gkblhfSelectDay;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "获取执行结果", notes = "获取执行结果")
......@@ -174,7 +177,7 @@ public class KafkaAnalyseController {
List<String> addressInfo = idxBizFanHealthIndexMapper.getAddressInfo();
String join = String.join(",", addressInfo);
String startTime = DateUtils.convertDateToString(DateUtil.offsetDay(new Date(), -1),
String startTime = DateUtils.convertDateToString(DateUtil.offsetDay(new Date(), Integer.parseInt(gkblhfSelectDay)),
DateUtils.DATE_TIME_PATTERN);
String endTime = DateUtils.convertDateToString(DateUtils.getCurrentDayEndTime(new Date()),
DateUtils.DATE_TIME_PATTERN);
......
......@@ -75,7 +75,8 @@ public class KafkaConsumerService {
@Autowired
IdxBizPvPointVarCentralValueMapper idxBizPvPointVarCentralValueMapper;
@Value("${gkblhf.select.day:-1}")
private String gkblhfSelectDay;
// 相关性
@Value("${base.url.XGX:http://10.20.1.29:8052/intelligent-analysis/correlation}")
private String baseUrlXGX;
......@@ -479,7 +480,7 @@ public class KafkaConsumerService {
private void buildZXZExecData(List<ConsumerRecord<String, String>> consumerRecords,
Map<String, Set<String>> gatewayPoints,
Map<String, List<IdxBizFanPointProcessVariableClassification>> zxzIds, String xgxPvConsumer) {
String startTime = DateUtils.convertDateToString(DateUtil.offsetDay(new Date(), -1),
String startTime = DateUtils.convertDateToString(DateUtil.offsetDay(new Date(), Integer.parseInt(gkblhfSelectDay)),
DateUtils.DATE_TIME_PATTERN);
String endTime = DateUtils.convertDateToString(DateUtils.getCurrentDayEndTime(new Date()),
DateUtils.DATE_TIME_PATTERN);
......@@ -504,7 +505,7 @@ public class KafkaConsumerService {
private void buildExecData(List<ConsumerRecord<String, String>> consumerRecords,
Map<String, Set<String>> gatewayPoints, String xgxPvConsumer) {
String startTime = DateUtils.convertDateToString(DateUtil.offsetDay(new Date(), -1),
String startTime = DateUtils.convertDateToString(DateUtil.offsetDay(new Date(), Integer.parseInt(gkblhfSelectDay)),
DateUtils.DATE_TIME_PATTERN);
String endTime = DateUtils.convertDateToString(DateUtils.getCurrentDayEndTime(new Date()),
DateUtils.DATE_TIME_PATTERN);
......@@ -825,7 +826,7 @@ public class KafkaConsumerService {
private void buildZXZPvExecData(List<ConsumerRecord<String, String>> consumerRecords,
Map<String, Set<String>> gatewayPoints,
Map<String, List<IdxBizPvPointProcessVariableClassification>> zxzIds, String xgxPvConsumer) {
String startTime = DateUtils.convertDateToString(DateUtil.offsetDay(new Date(), -1),
String startTime = DateUtils.convertDateToString(DateUtil.offsetDay(new Date(), Integer.parseInt(gkblhfSelectDay)),
DateUtils.DATE_TIME_PATTERN);
String endTime = DateUtils.convertDateToString(DateUtils.getCurrentDayEndTime(new Date()),
DateUtils.DATE_TIME_PATTERN);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment