Browse Source

#SDK改造

zhongwei
yang_shj 2 years ago
parent
commit
3a19cfd80c
  1. 4
      hzims-service-api/assets-api/pom.xml
  2. 8
      hzims-service-api/equipment-api/pom.xml
  3. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/AlarmHandleDetailEntity.java
  4. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmHandleVo.java
  5. 3
      hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/controller/EquipmentLedgerController.java
  6. 3
      hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/RealTimeDataServer.java
  7. 5
      hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/impl/HistoricalDataServerImpl.java
  8. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/impl/RealTimeDataServerImpl.java
  9. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java
  10. 14
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java
  11. 15
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java
  12. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java
  13. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomePageServiceImpl.java
  14. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PlatformServiceImpl.java
  15. 9
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/RunMonthReportServiceImpl.java
  16. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/UnitRunningTimeServiceImpl.java
  17. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WaterServiceImpl.java

4
hzims-service-api/assets-api/pom.xml

@ -16,10 +16,10 @@
<groupId>com.hnac.hzims</groupId> <groupId>com.hnac.hzims</groupId>
<artifactId>ticket-api</artifactId> <artifactId>ticket-api</artifactId>
</dependency> </dependency>
<dependency> <!--<dependency>
<groupId>com.hnac.hzinfo.data</groupId> <groupId>com.hnac.hzinfo.data</groupId>
<artifactId>hzinfo-data-api</artifactId> <artifactId>hzinfo-data-api</artifactId>
</dependency> </dependency>-->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId> <artifactId>easyexcel</artifactId>

8
hzims-service-api/equipment-api/pom.xml

@ -17,13 +17,17 @@
<!-- <artifactId>hzinfo-data-api</artifactId>--> <!-- <artifactId>hzinfo-data-api</artifactId>-->
<!-- <version>2.7.5.RELEASE</version>--> <!-- <version>2.7.5.RELEASE</version>-->
<!-- </dependency>--> <!-- </dependency>-->
<dependency> <!--<dependency>
<groupId>com.hnac.hzinfo.data</groupId> <groupId>com.hnac.hzinfo.data</groupId>
<artifactId>hzinfo-data-api</artifactId> <artifactId>hzinfo-data-api</artifactId>
</dependency> </dependency>-->
<dependency> <dependency>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<artifactId>blade-system-api</artifactId> <artifactId>blade-system-api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.hnac.hzinfo.data</groupId>
<artifactId>hzinfo-data-sdk</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/AlarmHandleDetailEntity.java

@ -34,5 +34,5 @@ public class AlarmHandleDetailEntity extends BaseEntity {
private String falseAlarmDesc; private String falseAlarmDesc;
@ApiModelProperty("附件路径") @ApiModelProperty("附件路径")
private Long filePath; private String filePath;
} }

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmHandleVo.java

@ -32,7 +32,7 @@ public class AlarmHandleVo extends AlarmHandleEntity {
private String filePath; private String filePath;
@ApiModelProperty("通知处理人") @ApiModelProperty("通知处理人")
private String handleUser; private Long handleUser;
@ApiModelProperty("现象Id") @ApiModelProperty("现象Id")
@JsonSerialize(nullsUsing = NullSerializer.class) @JsonSerialize(nullsUsing = NullSerializer.class)

3
hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/controller/EquipmentLedgerController.java

@ -2,8 +2,6 @@ package com.hnac.hzims.monitor.controller;
import com.hnac.hzims.monitor.server.HistoricalDataServer; import com.hnac.hzims.monitor.server.HistoricalDataServer;
import com.hnac.hzims.monitor.server.RealTimeDataServer; import com.hnac.hzims.monitor.server.RealTimeDataServer;
import com.hnac.hzinfo.dataconfig.deviceInstace.DeviceInstance;
import com.hnac.hzinfo.dataconfig.deviceInstace.DeviceInstanceAttr;
import com.hnac.hzinfo.dataconfig.entity.*; import com.hnac.hzinfo.dataconfig.entity.*;
import com.hnac.hzinfo.datasearch.analyse.domain.AnalyzeDataCondition; import com.hnac.hzinfo.datasearch.analyse.domain.AnalyzeDataCondition;
import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData;
@ -11,7 +9,6 @@ import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import oracle.jdbc.proxy.annotation.Post;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;

3
hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/RealTimeDataServer.java

@ -1,9 +1,6 @@
package com.hnac.hzims.monitor.server; package com.hnac.hzims.monitor.server;
import com.hnac.hzinfo.dataconfig.deviceInstace.DeviceInstance;
import com.hnac.hzinfo.dataconfig.deviceInstace.DeviceInstanceAttr;
import com.hnac.hzinfo.dataconfig.entity.*; import com.hnac.hzinfo.dataconfig.entity.*;
import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData;
import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO; import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;

5
hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/impl/HistoricalDataServerImpl.java

@ -6,6 +6,7 @@ import com.hnac.hzims.monitor.server.HistoricalDataServer;
import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient; import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient;
import com.hnac.hzinfo.datasearch.analyse.domain.AnalyzeDataCondition; import com.hnac.hzinfo.datasearch.analyse.domain.AnalyzeDataCondition;
import com.hnac.hzinfo.datasearch.analyse.domain.AnalyzeDataList; import com.hnac.hzinfo.datasearch.analyse.domain.AnalyzeDataList;
import com.hnac.hzinfo.sdk.core.response.HzPage;
import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.BladePage;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -20,12 +21,12 @@ public class HistoricalDataServerImpl implements HistoricalDataServer {
@Override @Override
public R<BladePage<AnalyzeDataList>> gethisData(AnalyzeDataCondition analyzeDataCondition, IPage<Map> page) { public R<HzPage<AnalyzeDataList>> gethisData(AnalyzeDataCondition analyzeDataCondition, IPage<Map> page) {
analyzeDataCondition.setPage(Integer.valueOf(page.getCurrent()+"")); analyzeDataCondition.setPage(Integer.valueOf(page.getCurrent()+""));
analyzeDataCondition.setLimit(Integer.valueOf(page.getSize()+"")); analyzeDataCondition.setLimit(Integer.valueOf(page.getSize()+""));
analyzeDataCondition.setNeedPage(true); analyzeDataCondition.setNeedPage(true);
analyzeDataCondition.setFull(0); analyzeDataCondition.setFull(0);
R<BladePage<AnalyzeDataList>> analyzeDataByAnalyzeCode = analyseDataSearchClient.getAnalyzeDataByAnalyzeCode(analyzeDataCondition); R<HzPage<AnalyzeDataList>> analyzeDataByAnalyzeCode = analyseDataSearchClient.getAnalyzeDataByAnalyzeCode(analyzeDataCondition);
return analyzeDataByAnalyzeCode; return analyzeDataByAnalyzeCode;
} }

2
hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/impl/RealTimeDataServerImpl.java

@ -4,8 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.equipment.entity.EmInfoEntity; import com.hnac.hzims.equipment.entity.EmInfoEntity;
import com.hnac.hzims.equipment.mapper.EmInfoMapper; import com.hnac.hzims.equipment.mapper.EmInfoMapper;
import com.hnac.hzims.monitor.server.RealTimeDataServer; import com.hnac.hzims.monitor.server.RealTimeDataServer;
import com.hnac.hzinfo.dataconfig.deviceInstace.DeviceInstance;
import com.hnac.hzinfo.dataconfig.deviceInstace.DeviceInstanceAttr;
import com.hnac.hzinfo.dataconfig.entity.*; import com.hnac.hzinfo.dataconfig.entity.*;
import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient; import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient;

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java

@ -9,11 +9,12 @@ import com.hnac.hzims.operational.alert.service.HistoryAbnormalAlarmService;
import com.hnac.hzims.operational.maintenance.constants.HomePageConstant; import com.hnac.hzims.operational.maintenance.constants.HomePageConstant;
import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.service.IStationService; import com.hnac.hzims.operational.station.service.IStationService;
import com.hnac.hzinfo.datasearch.soe.ISoeClient;
import com.hnac.hzinfo.datasearch.soe.domian.SoeData; import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryConditionByStation; import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryConditionByStation;
import com.hnac.hzinfo.sdk.core.response.HzPage; import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result; import com.hnac.hzinfo.sdk.core.response.Result;
import com.hnac.hzinfo.sdk.soe.ISoeClient;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

14
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AlarmHandleServiceImpl.java

@ -59,11 +59,21 @@ public class AlarmHandleServiceImpl extends BaseServiceImpl<AlarmHandleMapper, A
throw new ServiceException("无效处理!"); throw new ServiceException("无效处理!");
} }
AlarmHandleDetailEntity detail = new AlarmHandleDetailEntity(); AlarmHandleDetailEntity detail = new AlarmHandleDetailEntity();
BeanUtils.copyProperties(param,detail); detail.setAccessId(param.getAccessId());
detail.setPhenomenonId(param.getPhenomenonId());
detail.setHandleUser(param.getHandleUser());
detail.setDelayTime(param.getDelayTime());
detail.setDelayCause(param.getDelayCause());
detail.setFalseAlarmDesc(param.getFalseAlarmDesc());
detail.setFilePath(param.getFilePath());
detailService.save(detail); detailService.save(detail);
AlarmHandleEntity entity = new AlarmHandleEntity(); AlarmHandleEntity entity = new AlarmHandleEntity();
entity.setDetailId(detail.getId()); entity.setDetailId(detail.getId());
BeanUtils.copyProperties(param,entity); entity.setAlarmTime(param.getAlarmTime());
entity.setAlarmContent(param.getAlarmContent());
entity.setHandleWay(param.getHandleWay());
entity.setStationCode(param.getStationCode());
entity.setAlarmType(param.getAlarmType());
return this.save(entity); return this.save(entity);
} }

15
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java

@ -8,13 +8,9 @@ import com.hnac.hzims.operational.alert.constants.AbnormalAlarmConstant;
import com.hnac.hzims.operational.alert.entity.HistoryAbnormalAlarmEntity; import com.hnac.hzims.operational.alert.entity.HistoryAbnormalAlarmEntity;
import com.hnac.hzims.operational.alert.mapper.HistoryAbnormalAlarmMapper; import com.hnac.hzims.operational.alert.mapper.HistoryAbnormalAlarmMapper;
import com.hnac.hzims.operational.alert.service.HistoryAbnormalAlarmService; import com.hnac.hzims.operational.alert.service.HistoryAbnormalAlarmService;
import com.hnac.hzims.operational.config.entity.StAlarmRecordEntity;
import com.hnac.hzims.operational.config.vo.AlarmDataPageVo; import com.hnac.hzims.operational.config.vo.AlarmDataPageVo;
import com.hnac.hzims.operational.config.vo.AlarmVo; import com.hnac.hzims.operational.config.vo.AlarmVo;
import com.hnac.hzims.operational.config.vo.IntelligentAlarmCountVo; import com.hnac.hzims.operational.config.vo.IntelligentAlarmCountVo;
import com.hnac.hzims.operational.config.vo.SoeBodyVo;
import com.hnac.hzims.operational.main.vo.AreaGenerationMakeUpVo;
import com.hnac.hzims.operational.main.vo.AreaMonthReportVo;
import com.hnac.hzims.operational.maintenance.constants.HomePageConstant; import com.hnac.hzims.operational.maintenance.constants.HomePageConstant;
import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.service.IStationService; import com.hnac.hzims.operational.station.service.IStationService;
@ -22,23 +18,20 @@ import com.hnac.hzims.operational.station.vo.HistoryAbnormalAlarmVo;
import com.hnac.hzinfo.datasearch.soe.ISoeClient; import com.hnac.hzinfo.datasearch.soe.ISoeClient;
import com.hnac.hzinfo.datasearch.soe.domian.SoeData; import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryConditionByStation; import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryConditionByStation;
import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.logstash.logback.encoder.org.apache.commons.lang3.ObjectUtils; import net.logstash.logback.encoder.org.apache.commons.lang3.ObjectUtils;
import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils; import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.lang.reflect.Field; import java.lang.reflect.Field;
@ -223,7 +216,7 @@ public class HistoryAbnormalAlarmServiceImpl extends BaseServiceImpl<HistoryAbno
// nacos中配置告警类型:"0-默认", "1-系统", "2-告警", "3-故障", "4-用户操作", "5-遥测越限", "6-遥信变位", "7-注册信息", // nacos中配置告警类型:"0-默认", "1-系统", "2-告警", "3-故障", "4-用户操作", "5-遥测越限", "6-遥信变位", "7-注册信息",
// "8-信息提示", "9-设备巡检", "10-遥控操作", "11-遥测越限恢复","12-未定义","13-通讯中断","14-数据异常" // "8-信息提示", "9-设备巡检", "10-遥控操作", "11-遥测越限恢复","12-未定义","13-通讯中断","14-数据异常"
condition.setTypes(Arrays.asList(types.split(","))); condition.setTypes(Arrays.asList(types.split(",")));
R<BladePage<SoeData>> result = alarmClient.getByStationsAndTime(condition); Result<HzPage<SoeData>> result = alarmClient.getByStationsAndTime(condition);
// 步骤3. TODO 过滤已处理告警 // 步骤3. TODO 过滤已处理告警
@ -272,7 +265,7 @@ public class HistoryAbnormalAlarmServiceImpl extends BaseServiceImpl<HistoryAbno
// nacos中配置告警类型:"0-默认", "1-系统", "2-告警", "3-故障", "4-用户操作", "5-遥测越限", "6-遥信变位", "7-注册信息", // nacos中配置告警类型:"0-默认", "1-系统", "2-告警", "3-故障", "4-用户操作", "5-遥测越限", "6-遥信变位", "7-注册信息",
// "8-信息提示", "9-设备巡检", "10-遥控操作", "11-遥测越限恢复","12-未定义","13-通讯中断","14-数据异常" // "8-信息提示", "9-设备巡检", "10-遥控操作", "11-遥测越限恢复","12-未定义","13-通讯中断","14-数据异常"
condition.setTypes(type_list); condition.setTypes(type_list);
R<BladePage<SoeData>> result = alarmClient.getByStationsAndTime(condition); Result<HzPage<SoeData>> result = alarmClient.getByStationsAndTime(condition);
IPage<AlarmVo> page = Condition.getPage(query); IPage<AlarmVo> page = Condition.getPage(query);
if(result.isSuccess() && ObjectUtil.isNotEmpty(result)){ if(result.isSuccess() && ObjectUtil.isNotEmpty(result)){
// 步骤3.TODO 过滤完成告警处理数据 // 步骤3.TODO 过滤完成告警处理数据

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java

@ -27,12 +27,12 @@ import com.hnac.hzims.operational.station.service.IStationService;
import com.hnac.hzims.operational.util.ExcelUtil; import com.hnac.hzims.operational.util.ExcelUtil;
import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient; import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO;
import com.hnac.hzinfo.datasearch.soe.ISoeClient;
import com.hnac.hzinfo.datasearch.soe.domian.SoeData; import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryConditionByStation; import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryConditionByStation;
import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO; import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO;
import com.hnac.hzinfo.sdk.core.response.HzPage; import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result; import com.hnac.hzinfo.sdk.core.response.Result;
import com.hnac.hzinfo.sdk.soe.ISoeClient;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
@ -466,7 +466,7 @@ public class StAlamRecordServiceImpl extends BaseServiceImpl<StAlarmRecordMapper
soeQueryConditionByStation.setTypes(Arrays.asList(type.split(","))); soeQueryConditionByStation.setTypes(Arrays.asList(type.split(",")));
log.error("stations_and_time : {}", soeQueryConditionByStation ); log.error("stations_and_time : {}", soeQueryConditionByStation );
List<SoeDataVo> collect = new ArrayList<>(); List<SoeDataVo> collect = new ArrayList<>();
Result<HzPage<SoeData>> byStationsAndTime = soeClient.getByStationsAndTime(soeQueryConditionByStation); Result<HzPage<SoeData>> byStationsAndTime = soeClient.getByStationsAndTime(soeQueryConditionByStation);
if (!byStationsAndTime.isSuccess() || ObjectUtil.isEmpty(byStationsAndTime.getData()) || CollectionUtil.isEmpty(byStationsAndTime.getData().getRecords())) { if (!byStationsAndTime.isSuccess() || ObjectUtil.isEmpty(byStationsAndTime.getData()) || CollectionUtil.isEmpty(byStationsAndTime.getData().getRecords())) {
return R.data(vo); return R.data(vo);
} }

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomePageServiceImpl.java

@ -29,6 +29,7 @@ import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeDataConditionVO; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeDataConditionVO;
import com.hnac.hzinfo.datasearch.soe.ISoeClient; import com.hnac.hzinfo.datasearch.soe.ISoeClient;
import com.hnac.hzinfo.datasearch.soe.domian.SoeData; import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import com.hnac.hzinfo.sdk.core.response.Result;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
@ -371,7 +372,7 @@ public class HomePageServiceImpl implements IHomePageService {
float currentDayPowerGeneration = getPowerGeneration(effEmInfoList, getCurrentTime() + " 00:00:00", getAddDayTime(1) + " 00:00:00",EquipmentConstants.CycleTypeEnum.DAY_CYCLE.getType()); float currentDayPowerGeneration = getPowerGeneration(effEmInfoList, getCurrentTime() + " 00:00:00", getAddDayTime(1) + " 00:00:00",EquipmentConstants.CycleTypeEnum.DAY_CYCLE.getType());
powerStationTotalVo.setCurrentDayPowerGeneration(currentDayPowerGeneration); powerStationTotalVo.setCurrentDayPowerGeneration(currentDayPowerGeneration);
// 告警列表 // 告警列表
R<List<SoeData>> S = soeClient.getByLastLimitTime(null, station.getCode(), 1); Result<List<SoeData>> S = soeClient.getByLastLimitTime(null, station.getCode(), 1);
if(!S.isSuccess() || CollectionUtil.isEmpty(S.getData())){ if(!S.isSuccess() || CollectionUtil.isEmpty(S.getData())){
return powerStationTotalVo; return powerStationTotalVo;
} }

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PlatformServiceImpl.java

@ -44,6 +44,8 @@ import com.hnac.hzinfo.inspect.report.feign.IInspectReportClient;
import com.hnac.hzinfo.inspect.report.vo.AlarmRoutReportVO; import com.hnac.hzinfo.inspect.report.vo.AlarmRoutReportVO;
import com.hnac.hzinfo.inspect.task.entity.TaskEntity; import com.hnac.hzinfo.inspect.task.entity.TaskEntity;
import com.hnac.hzinfo.inspect.task.feign.IInspectTaskClient; import com.hnac.hzinfo.inspect.task.feign.IInspectTaskClient;
import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
@ -197,7 +199,7 @@ public class PlatformServiceImpl implements IPlatformService {
soe.setBeginTime(LocalDateTime.parse(DateUtil.format(new Date(), "yyyy-MM-dd 00:00:00"), df)); soe.setBeginTime(LocalDateTime.parse(DateUtil.format(new Date(), "yyyy-MM-dd 00:00:00"), df));
soe.setEndTime(LocalDateTime.now()); soe.setEndTime(LocalDateTime.now());
List<SoeDataVo> collect = new ArrayList<>(); List<SoeDataVo> collect = new ArrayList<>();
R<BladePage<SoeData>> soeDataListPage = soeClient.getByStationsAndTime(soe); Result<HzPage<SoeData>> soeDataListPage = soeClient.getByStationsAndTime(soe);
if (soeDataListPage.isSuccess() && ObjectUtil.isNotEmpty(soeDataListPage.getData())) { if (soeDataListPage.isSuccess() && ObjectUtil.isNotEmpty(soeDataListPage.getData())) {
List<SoeData> records = soeDataListPage.getData().getRecords(); List<SoeData> records = soeDataListPage.getData().getRecords();
collect = records.stream().map(iter -> { collect = records.stream().map(iter -> {
@ -223,7 +225,7 @@ public class PlatformServiceImpl implements IPlatformService {
public R<List<AlarmRankingVo>> doCloudAlarmRanking(Integer serveType) { public R<List<AlarmRankingVo>> doCloudAlarmRanking(Integer serveType) {
Map<String, String> stationIdKey = stationService.getKyeStationNameValueStationId(true); Map<String, String> stationIdKey = stationService.getKyeStationNameValueStationId(true);
List<String> stationIdByServeType = stationService.getStationIdByServeType(null, serveType); List<String> stationIdByServeType = stationService.getStationIdByServeType(null, serveType);
R<List<SoeCountVO>> soeCountByStation = soeClient.getSoeCountByStation(StringUtil.join(stationIdByServeType, ","), DateUtil.parse(DateUtil.format(new Date(), "yyyy-MM-01 00:00:00"), DateUtil.PATTERN_DATETIME), new Date()); Result<List<SoeCountVO>> soeCountByStation = soeClient.getSoeCountByStation(StringUtil.join(stationIdByServeType, ","), DateUtil.parse(DateUtil.format(new Date(), "yyyy-MM-01 00:00:00"), DateUtil.PATTERN_DATETIME), new Date());
if (soeCountByStation.isSuccess() && CollectionUtil.isNotEmpty(soeCountByStation.getData())) { if (soeCountByStation.isSuccess() && CollectionUtil.isNotEmpty(soeCountByStation.getData())) {
List<SoeCountVO> data = soeCountByStation.getData(); List<SoeCountVO> data = soeCountByStation.getData();
List<SoeCountVO> collect = data.stream().sorted(Comparator.comparing(SoeCountVO::getCount).reversed()).limit(5).collect(Collectors.toList()); List<SoeCountVO> collect = data.stream().sorted(Comparator.comparing(SoeCountVO::getCount).reversed()).limit(5).collect(Collectors.toList());
@ -741,7 +743,7 @@ public class PlatformServiceImpl implements IPlatformService {
originalDataQuery.setEndTime(new Date()); originalDataQuery.setEndTime(new Date());
originalDataQuery.setLimit(100000000); originalDataQuery.setLimit(100000000);
originalDataQuery.setPage(1); originalDataQuery.setPage(1);
R<BladePage<PointData>> originalDataByRealIds = historyDataSearchClient.getOriginalDataByRealIds(originalDataQuery); Result<HzPage<PointData>> originalDataByRealIds = historyDataSearchClient.getOriginalDataByRealIds(originalDataQuery);
if (originalDataByRealIds.isSuccess() && ObjectUtil.isNotEmpty(originalDataByRealIds.getData())) { if (originalDataByRealIds.isSuccess() && ObjectUtil.isNotEmpty(originalDataByRealIds.getData())) {
List<PointData> records = originalDataByRealIds.getData().getRecords(); List<PointData> records = originalDataByRealIds.getData().getRecords();

9
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/RunMonthReportServiceImpl.java

@ -32,11 +32,12 @@ import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryCondition; import com.hnac.hzinfo.datasearch.soe.domian.SoeQueryCondition;
import com.hnac.hzinfo.datasearch.soe.po.SoeLastValueMonthByRealIdsPO; import com.hnac.hzinfo.datasearch.soe.po.SoeLastValueMonthByRealIdsPO;
import com.hnac.hzinfo.datasearch.soe.vo.SoeLastValueMonthByRealIdsVO; import com.hnac.hzinfo.datasearch.soe.vo.SoeLastValueMonthByRealIdsVO;
import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.*; import org.springblade.core.tool.utils.*;
import org.springblade.system.cache.DictCache; import org.springblade.system.cache.DictCache;
@ -354,7 +355,7 @@ public class RunMonthReportServiceImpl extends ServiceImpl<RunMonthReportMapper,
soeQueryCondition.setStationId(station.getCode()); soeQueryCondition.setStationId(station.getCode());
soeQueryCondition.setBeginTime(DateUtil.parse(map.get("startTime"), DateUtil.PATTERN_DATETIME)); soeQueryCondition.setBeginTime(DateUtil.parse(map.get("startTime"), DateUtil.PATTERN_DATETIME));
soeQueryCondition.setEndTime(DateUtil.parse(map.get("endTime"), DateUtil.PATTERN_DATETIME)); soeQueryCondition.setEndTime(DateUtil.parse(map.get("endTime"), DateUtil.PATTERN_DATETIME));
R<List<SoeData>> byTypeAndTimeRange = soeClient.getByTypeAndTimeRange(soeQueryCondition); Result<List<SoeData>> byTypeAndTimeRange = soeClient.getByTypeAndTimeRange(soeQueryCondition);
List<SoeData> soeDataList = new ArrayList<>(); List<SoeData> soeDataList = new ArrayList<>();
List<SoeData> collect = new ArrayList<>(); List<SoeData> collect = new ArrayList<>();
if (byTypeAndTimeRange.isSuccess()) { if (byTypeAndTimeRange.isSuccess()) {
@ -484,13 +485,13 @@ public class RunMonthReportServiceImpl extends ServiceImpl<RunMonthReportMapper,
originalDataQuery.setEndTime(DateUtil.parse(dateMap.get("endTime"), DateUtil.PATTERN_DATETIME)); originalDataQuery.setEndTime(DateUtil.parse(dateMap.get("endTime"), DateUtil.PATTERN_DATETIME));
originalDataQuery.setLimit(100000); originalDataQuery.setLimit(100000);
originalDataQuery.setPage(1); originalDataQuery.setPage(1);
R<BladePage<PointData>> originalDataByRealIds = historyDataSearchClient.getOriginalDataByRealIds(originalDataQuery); Result<HzPage<PointData>> originalDataByRealIds = historyDataSearchClient.getOriginalDataByRealIds(originalDataQuery);
HistorPointPO historPointPO = new HistorPointPO(); HistorPointPO historPointPO = new HistorPointPO();
historPointPO.setRealId(realId); historPointPO.setRealId(realId);
historPointPO.setQueryTime(DateUtil.parse(dateMap.get("startTime"), DateUtil.PATTERN_DATETIME)); historPointPO.setQueryTime(DateUtil.parse(dateMap.get("startTime"), DateUtil.PATTERN_DATETIME));
boolean bool = false; boolean bool = false;
PointData pointData = null; PointData pointData = null;
R<PointData> lastRowDataByTime = historyDataSearchClient.getLastRowDataByTime(historPointPO); Result<PointData> lastRowDataByTime = historyDataSearchClient.getLastRowDataByTime(historPointPO);
if (lastRowDataByTime.isSuccess() && ObjectUtil.isNotEmpty(lastRowDataByTime.getData())) { if (lastRowDataByTime.isSuccess() && ObjectUtil.isNotEmpty(lastRowDataByTime.getData())) {
pointData = new PointData(); pointData = new PointData();
pointData = lastRowDataByTime.getData(); pointData = lastRowDataByTime.getData();

7
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/UnitRunningTimeServiceImpl.java

@ -14,9 +14,10 @@ import com.hnac.hzinfo.datasearch.history.IHistoryDataSearchClient;
import com.hnac.hzinfo.datasearch.history.OriginalDataQuery; import com.hnac.hzinfo.datasearch.history.OriginalDataQuery;
import com.hnac.hzinfo.datasearch.history.po.HistorPointPO; import com.hnac.hzinfo.datasearch.history.po.HistorPointPO;
import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO; import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO;
import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.*; import org.springblade.core.tool.utils.*;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -153,7 +154,7 @@ public class UnitRunningTimeServiceImpl extends BaseServiceImpl<UnitRunningTimeM
originalDataQuery.setEndTime(DateUtil.parse(dateMap.get("endTime"), DateUtil.PATTERN_DATETIME)); originalDataQuery.setEndTime(DateUtil.parse(dateMap.get("endTime"), DateUtil.PATTERN_DATETIME));
originalDataQuery.setLimit(100000); originalDataQuery.setLimit(100000);
originalDataQuery.setPage(1); originalDataQuery.setPage(1);
R<BladePage<PointData>> originalDataByRealIds = historyDataSearchClient.getOriginalDataByRealIds(originalDataQuery); Result<HzPage<PointData>> originalDataByRealIds = historyDataSearchClient.getOriginalDataByRealIds(originalDataQuery);
HistorPointPO historPointPO = new HistorPointPO(); HistorPointPO historPointPO = new HistorPointPO();
historPointPO.setRealId(realId); historPointPO.setRealId(realId);
//historPointPO.setQueryTime(DateUtil.parse(dateMap.get("startTime"), DateUtil.PATTERN_DATETIME)); //historPointPO.setQueryTime(DateUtil.parse(dateMap.get("startTime"), DateUtil.PATTERN_DATETIME));
@ -163,7 +164,7 @@ public class UnitRunningTimeServiceImpl extends BaseServiceImpl<UnitRunningTimeM
//获取最后一条数据 //获取最后一条数据
R<PointData> lastRowDataByTime = historyDataSearchClient.getLastRowDataByTime(historPointPO); Result<PointData> lastRowDataByTime = historyDataSearchClient.getLastRowDataByTime(historPointPO);
if (lastRowDataByTime.isSuccess() && ObjectUtil.isNotEmpty(lastRowDataByTime.getData())) { if (lastRowDataByTime.isSuccess() && ObjectUtil.isNotEmpty(lastRowDataByTime.getData())) {
pointData = lastRowDataByTime.getData(); pointData = lastRowDataByTime.getData();
bool = true; bool = true;

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WaterServiceImpl.java

@ -28,9 +28,10 @@ import com.hnac.hzinfo.datasearch.history.IHistoryDataSearchClient;
import com.hnac.hzinfo.datasearch.history.OriginalDataQuery; import com.hnac.hzinfo.datasearch.history.OriginalDataQuery;
import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO; import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO;
import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO; import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO;
import com.hnac.hzinfo.sdk.core.response.HzPage;
import com.hnac.hzinfo.sdk.core.response.Result;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
@ -38,7 +39,6 @@ import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil; import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.entity.Dept; import org.springblade.system.entity.Dept;
import org.springblade.system.feign.ISysClient; import org.springblade.system.feign.ISysClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -51,8 +51,6 @@ import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -455,7 +453,7 @@ public class WaterServiceImpl implements IWaterService {
originalDataQuery.setLimit(100000); originalDataQuery.setLimit(100000);
originalDataQuery.setPage(1); originalDataQuery.setPage(1);
// 查询时间范围开关机监测点历史数据 // 查询时间范围开关机监测点历史数据
R<BladePage<PointData>> R = historyDataSearchClient.getOriginalDataByRealIds(originalDataQuery); Result<HzPage<PointData>> R = historyDataSearchClient.getOriginalDataByRealIds(originalDataQuery);
if(!R.isSuccess() || ObjectUtil.isEmpty(R.getData())){ if(!R.isSuccess() || ObjectUtil.isEmpty(R.getData())){
return waterRunVo; return waterRunVo;
} }

Loading…
Cancel
Save