Commit c01dee70 authored by chenzhao's avatar chenzhao

采集增加定时 调整分析中心算法

parent 3df46798
......@@ -25,6 +25,7 @@ import com.yeejoin.amos.api.householdapi.face.service.GoodWeDataAcquisitionServi
import com.yeejoin.amos.openapi.enums.PVProducerInfoEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.server.Jsp;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import java.util.Date;
......@@ -83,6 +84,7 @@ public class GoodWeDataAcquisitionServiceImpl implements GoodWeDataAcquisitionSe
@Autowired
TdJpStationMapper tdJpStationMapper;
@Override
@Scheduled(cron = "${dataRequstScheduled.GoodWe}")
public void stationList() {
HashMap<String, Object> requestInfo = new HashMap<>();
requestInfo.put("page_index", 1);
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
......@@ -760,13 +761,23 @@ public class CommonServiceImpl {
List<IdxBizFanPointProcessVariableClassification> list = IdxBizFanPointProcessVariableClassificationHashMap
.get(s);
list.forEach(IdxBizFanPointProcessVariableClassification -> {
List<IdxBizFanPointVarCorrelation> gongkuangList = idxBizFanPointVarCorrelationMapper
List<IdxBizFanPointVarCorrelation> gongkuangList;
gongkuangList = idxBizFanPointVarCorrelationMapper
.selectList(new QueryWrapper<IdxBizFanPointVarCorrelation>()
.eq("ANALYSIS_GATEWAY_ID",
IdxBizFanPointProcessVariableClassification.getGatewayId())
.eq("ANALYSIS_POINT_ID",
IdxBizFanPointProcessVariableClassification.getSequenceNbr())
.orderByDesc("CORRELATION_COEFFICIENT").last("limit 0,3"));
.eq("MATCH","匹配"));
if (CollectionUtil.isEmpty(gongkuangList) || gongkuangList.size() !=3 ){
gongkuangList = idxBizFanPointVarCorrelationMapper
.selectList(new QueryWrapper<IdxBizFanPointVarCorrelation>()
.eq("ANALYSIS_GATEWAY_ID",
IdxBizFanPointProcessVariableClassification.getGatewayId())
.eq("ANALYSIS_POINT_ID",
IdxBizFanPointProcessVariableClassification.getSequenceNbr())
.orderByDesc("CORRELATION_COEFFICIENT").last("limit 0,3"));
}
if (gongkuangList.size() > 0) {
foreachHandlerConditionVariabAnalyse1Fan(s, gongkuangList, startTime, endTime,
IdxBizFanPointProcessVariableClassification);
......@@ -810,7 +821,18 @@ public class CommonServiceImpl {
idxBizPvPointProcessVariableClassification.getGatewayId())
.eq("ANALYSIS_POINT_ID",
idxBizPvPointProcessVariableClassification.getSequenceNbr())
.orderByDesc("CORRELATION_COEFFICIENT").last("limit 0,3"));
.eq("MATCH","匹配"));
if (CollectionUtil.isEmpty(gongkuangList) || gongkuangList.size() != 3){
gongkuangList = idxBizPvPointVarCorrelationMapper
.selectList(new QueryWrapper<IdxBizPvPointVarCorrelation>()
.eq("ANALYSIS_GATEWAY_ID",
idxBizPvPointProcessVariableClassification.getGatewayId())
.eq("ANALYSIS_POINT_ID",
idxBizPvPointProcessVariableClassification.getSequenceNbr())
.orderByDesc("CORRELATION_COEFFICIENT").last("limit 0,3"));
}
if (gongkuangList.size() > 0) {
foreachHandlerConditionVariabAnalyse1Pv(s, gongkuangList, startTime, endTime,
idxBizPvPointProcessVariableClassification);
......
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