1.解决审计统计没有显示的bug

2.解决数据中心数据查询过慢和数据展示bug
This commit is contained in:
wr
2023-06-01 17:16:28 +08:00
parent 4fe1039934
commit 7419142abe
33 changed files with 797 additions and 286 deletions

View File

@@ -95,7 +95,7 @@ public class HarmonicServiceImpl implements IHarmonicService {
List<PollutionVO> childrenList = new ArrayList<>();
PollutionVO pollutionVO = new PollutionVO();
pollutionVO.setId(dept.getIndex());
pollutionVO.setName(dept.getName());
pollutionVO.setName(dept.getName()+"\n("+dept.getLineIndexes().size()+")");
dept.getSubIndexes().forEach(sub->{
List<PollutionLineDTO> l1 = map.get(sub);
PollutionVO children = new PollutionVO();

View File

@@ -195,7 +195,7 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
String name =temp.getName ();
List<String> powers = temp.getPowerrIdList ( );
pollutionVO.setId (detpid);
pollutionVO.setName (name);
pollutionVO.setName (name+"\n("+temp.getMonitorIdList().size()+")");
pollutionVO.setData (-1.0);
setData(harmonicPublicParam, pollutionType, searchBeginTime,harmonicPublicParam.getSearchEndTime(), pollutionVO, detpid);
if(CollectionUtil.isNotEmpty(powers)) {
@@ -242,7 +242,7 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
String name = temp.getName();
pollutionVO.setId(detpid);
pollutionVO.setName(name);
pollutionVO.setName(name+"\n("+temp.getLineIndexes().size()+")");
pollutionVO.setData(-1.0);
setData(harmonicPublicParam, pollutionType, searchBeginTime,harmonicPublicParam.getSearchEndTime(), pollutionVO, detpid);
List<PollutionVO> subPollutionVO = new ArrayList<>();

View File

@@ -89,7 +89,7 @@ public class SteadyExceedRateServiceImpl implements SteadyExceedRateService {
if (!CollectionUtils.isEmpty(deviceDataList)) {
List<Map<String,Double>> maps=new ArrayList<>();
for (GeneralDeviceDTO generalDeviceDTO: deviceDataList) {
type.add("("+generalDeviceDTO.getDeviceIndexes().size()+")"+generalDeviceDTO.getName());
type.add("("+generalDeviceDTO.getLineIndexes().size()+")"+generalDeviceDTO.getName());
List<String> lineIndexes = generalDeviceDTO.getLineIndexes();
Map<String, Double> collect=new HashMap<>();
@@ -129,15 +129,31 @@ public class SteadyExceedRateServiceImpl implements SteadyExceedRateService {
case 1:
//查询是天
List<String> intervalTime = PubUtils.getIntervalTime(steadyExceedCensusParam.getSearchBeginTime(),steadyExceedCensusParam.getSearchEndTime());
for (String interTime : intervalTime) {
String startTime = PublicDateUtil.getFisrtDayOfMonth(Integer.parseInt(interTime.substring(0, 4)), Integer.parseInt(interTime.substring(5)));
for (int j = 0; j < intervalTime.size(); j++) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
Date dt = simpleDateFormat.parse(startTime);
Date dtDate = simpleDateFormat.parse(steadyExceedCensusParam.getSearchEndTime());
Date dt ;
Date dtDate;
int beginDay;
if(j==0){
dt= simpleDateFormat.parse(steadyExceedCensusParam.getSearchBeginTime());
beginDay = Integer.valueOf(String.format("%td", dt));
}else{
String startTime = PublicDateUtil.getFisrtDayOfMonth(Integer.parseInt(intervalTime.get(j).substring(0, 4)), Integer.parseInt(intervalTime.get(j).substring(5)));
dt= simpleDateFormat.parse(startTime);
beginDay = Integer.valueOf(String.format("%td", dt));
}
if(j==intervalTime.size()-1){
dtDate= simpleDateFormat.parse(steadyExceedCensusParam.getSearchEndTime());
}else{
String startTime = PublicDateUtil.getLastDayOfMonth(Integer.parseInt(intervalTime.get(j).substring(0, 4)), Integer.parseInt(intervalTime.get(j).substring(5)));
dtDate= simpleDateFormat.parse(startTime);
}
Integer year = Integer.valueOf(String.format("%tY", dt));
Integer mon = Integer.valueOf(String.format("%tm", dt));
Integer day = Integer.valueOf(String.format("%td", dtDate));
List<String> dayTime = PubUtils.getIntervalDateTime(year, mon, day);
List<String> dayTime = PubUtils.getIntervalDateTime(year,beginDay, mon, day);
for (String s : dayTime) {
List<Double> steadyExceedRate = new ArrayList<>();
for (int i = 0; i < tempIndex.size(); i++) {

View File

@@ -116,7 +116,7 @@ public class SteadyQualifyServiceImpl implements SteadyQualifyService {
if (CollectionUtils.isEmpty(lineIndexes)) {
continue;
}
type.add(generalDeviceDTO.getName()+"\n("+generalDeviceDTO.getDeviceIndexes().size()+")");
type.add(generalDeviceDTO.getName()+"\n("+generalDeviceDTO.getLineIndexes().size()+")");
List<SteadyQualifyDTO> qualifiesRate = getQualifiesRate(lineIndexes, steadyCensusParam.getSearchBeginTime(), steadyCensusParam.getSearchEndTime());
SteadyQualifyVO dataMoreMonitorMoreDay = getDataMoreMonitorMoreDay(qualifiesRate);
harmonicVoltage.add(dataMoreMonitorMoreDay.getHarmonicVoltage());

View File

@@ -101,7 +101,7 @@ public class THDistortionServiceImpl implements THDistortionService {
if (CollectionUtils.isEmpty(lineIndexes)) {
continue;
}
type.add(generalDeviceDTO.getName()+"\n("+generalDeviceDTO.getDeviceIndexes().size()+")");
type.add(generalDeviceDTO.getName()+"\n("+generalDeviceDTO.getLineIndexes().size()+")");
List<PublicDTO> condition = getCondition(lineIndexes, thDistortionCensusParam.getSearchBeginTime(), thDistortionCensusParam.getSearchEndTime());
single.add(roundHalfUp(condition.stream().mapToDouble(PublicDTO::getData).average().orElse(3.14159)));
}

View File

@@ -88,7 +88,7 @@ public class TerminalServiceImpl implements TerminalService {
if (CollectionUtils.isEmpty(generalDeviceDTO.getDeviceIndexes())) {
continue;
}
type.add(generalDeviceDTO.getName()+"\n("+generalDeviceDTO.getDeviceIndexes().size()+")");
type.add(generalDeviceDTO.getName()+"\n("+generalDeviceDTO.getLineIndexes().size()+")");
List<String> deviceIndexes = generalDeviceDTO.getDeviceIndexes();
//根据终端查询在线率
List<PublicDTO> condition = getCondition(deviceIndexes, terminalCensusParam.getSearchBeginTime(), terminalCensusParam.getSearchEndTime());