微调
This commit is contained in:
@@ -87,4 +87,6 @@ public interface CommonService {
|
|||||||
List<StatisticalDataDTO> getEachModule(CommonQueryParam param);
|
List<StatisticalDataDTO> getEachModule(CommonQueryParam param);
|
||||||
|
|
||||||
StatisticalDataDTO getDataCounts(String lineId, String tableName, String columnName,String resultName, String phasic, String dataType, String clDid, String process,String startTime, String endTime);
|
StatisticalDataDTO getDataCounts(String lineId, String tableName, String columnName,String resultName, String phasic, String dataType, String clDid, String process,String startTime, String endTime);
|
||||||
|
|
||||||
|
List<StatisticalDataDTO> getModuleData(CommonQueryParam param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,7 @@ import com.njcn.influx.service.CommonService;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description:
|
* Description:
|
||||||
@@ -187,7 +185,22 @@ public class CommonServiceImpl implements CommonService {
|
|||||||
.eq(InfluxDBTableConstant.CL_DID,clDid)
|
.eq(InfluxDBTableConstant.CL_DID,clDid)
|
||||||
.eq(InfluxDBTableConstant.PROCESS,process)
|
.eq(InfluxDBTableConstant.PROCESS,process)
|
||||||
.between(InfluxDBTableConstant.TIME, startTime, endTime);
|
.between(InfluxDBTableConstant.TIME, startTime, endTime);
|
||||||
System.out.println("sql==:" + influxQueryWrapper.generateSql());
|
|
||||||
return commonMapper.getLineRtData(influxQueryWrapper);
|
return commonMapper.getLineRtData(influxQueryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StatisticalDataDTO> getModuleData(CommonQueryParam param) {
|
||||||
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(param.getTableName(),StatisticalDataDTO.class);
|
||||||
|
influxQueryWrapper
|
||||||
|
.select(StatisticalDataDTO::getLineId)
|
||||||
|
.select(StatisticalDataDTO::getPhaseType)
|
||||||
|
.select("Apf_RmsI_ModOut","value")
|
||||||
|
.select("Apf_RmsI_Load","avgValue")
|
||||||
|
.between(InfluxDBTableConstant.TIME, param.getStartTime(), param.getEndTime())
|
||||||
|
.eq(InfluxDBTableConstant.LINE_ID,param.getLineId())
|
||||||
|
.eq(InfluxDBTableConstant.VALUE_TYPE,"avg")
|
||||||
|
.eq(InfluxDBTableConstant.PROCESS,param.getProcess())
|
||||||
|
.eq(InfluxDBTableConstant.CL_DID,param.getClDid());
|
||||||
|
return commonMapper.getDeviceRtDataByTime(influxQueryWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user