Browse Source

# HZ100C参数下发与备份功能

(cherry picked from commit 2f8c0a2786)
zhongwei
haungxing 1 year ago
parent
commit
41b2137b95
  1. 6
      hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/emParam/entity/ParamBackupsDetailEntity.java
  2. 6
      hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/emParam/vo/ParamVO.java
  3. 1
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/AppHydropowerStationVo.java
  4. 6
      hzims-service/equipment/src/main/java/com/hnac/hzims/emParam/service/impl/ParamServiceImpl.java
  5. 3
      hzims-service/equipment/src/main/resources/db/1.0.1.sql
  6. 2
      hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java

6
hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/emParam/entity/ParamBackupsDetailEntity.java

@ -51,10 +51,4 @@ public class ParamBackupsDetailEntity extends TenantEntity implements Serializab
@ApiModelProperty("最小值")
private String minValue;
@ApiModelProperty("保留小数位")
private Integer keepFigures;
@ApiModelProperty("描述")
private String descs;
}

6
hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/emParam/vo/ParamVO.java

@ -61,10 +61,4 @@ public class ParamVO implements Serializable {
@ApiModelProperty("最小值")
private String minValue;
@ApiModelProperty("保留小数位")
private Integer keepFigures;
@ApiModelProperty("描述")
private String descs;
}

1
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/vo/AppHydropowerStationVo.java

@ -2,7 +2,6 @@ package com.hnac.hzims.operational.main.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.hnac.hzims.hzimsweather.response.weather.Daily;
import com.hnac.hzinfo.datasearch.soe.domian.SoeData;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

6
hzims-service/equipment/src/main/java/com/hnac/hzims/emParam/service/impl/ParamServiceImpl.java

@ -70,17 +70,17 @@ public class ParamServiceImpl implements IParamService {
public List<ParamTreeVO> recall(String emCode,String stationCode) {
List<ParamTreeVO> result = Lists.newArrayList();
// 获取设备物模型中是参数的属性
R<List<DeviceInstanceAttrVO>> paramDeviceAttrR = deviceClient.getOnlineAttr(emCode);
Result<List<DeviceInstanceAttrVO>> paramDeviceAttrR = deviceDataClient.getIsParamDeviceAttr(emCode);
Assert.isTrue(paramDeviceAttrR.isSuccess() && CollectionUtil.isNotEmpty(paramDeviceAttrR.getData()),() -> {
throw new ServiceException("获取设备实例物模型属性失败!");
});
// 获取实时数据
List<String> signageList = paramDeviceAttrR.getData().stream().filter(o->StringUtil.isNotBlank(o.getSignage()) && StringUtil.isNotBlank(o.getFacDeviceAttrId())).map(DeviceInstanceAttrVO::getSignage).collect(Collectors.toList());
List<String> signageList = paramDeviceAttrR.getData().stream().map(DeviceInstanceAttrVO::getSignage).filter(StringUtil::isNotBlank).collect(Collectors.toList());
Result<DeviceDataDTO> realDataR = deviceDataClient.getDeviceRealDataByCode(emCode, signageList);
Assert.isTrue(realDataR.isSuccess(),() -> {
throw new ServiceException("参数召回获取实时数据失败");
});
Map<ParamGroupVO, List<ParamVO>> paramGroupVOListMap = paramDeviceAttrR.getData().stream().filter(o->StringUtil.isNotBlank(o.getFacDeviceAttrId())).map(this::convert).collect(Collectors.groupingBy(p -> {
Map<ParamGroupVO, List<ParamVO>> paramGroupVOListMap = paramDeviceAttrR.getData().stream().map(this::convert).collect(Collectors.groupingBy(p -> {
ParamGroupVO paramGroupVO = new ParamGroupVO();
paramGroupVO.setGroupId(String.valueOf(p.getModelClassifyId()));
paramGroupVO.setGroupName(p.getModelClassifyName());

3
hzims-service/equipment/src/main/resources/db/1.0.1.sql

@ -45,6 +45,3 @@ CREATE TABLE `hzims_param_backups_detail` (
`CREATE_DEPT` bigint(20) DEFAULT NULL COMMENT '创建部门',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
alter table `HZIMS_PARAM_BACKUPS_DETAIL` add COLUMN `KEEP_FIGURES` INT(11) COMMENT '小数点位数';
alter table `HZIMS_PARAM_BACKUPS_DETAIL` add COLUMN `DESCS` VARCHAR(255) COMMENT '描述';

2
hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java

@ -90,7 +90,7 @@ public class MessagePushRecordController extends BladeController {
@GetMapping("/readMessageBatch")
@ApiOperation("批量处理消息")
@ApiOperationSupport(order = 7)
public R<Boolean> readMessageBatch(@RequestParam(required = false) String businessClassify,@RequestParam(required = false) String type) {
public R<Boolean> readMessageBatch(String businessClassify,String type) {
LambdaUpdateWrapper<MessagePushRecordEntity> eq = Wrappers.<MessagePushRecordEntity>lambdaUpdate()
.set(MessagePushRecordEntity::getStatus, MessageConstants.CONFIRM)
.set(MessagePushRecordEntity::getRespondTime, LocalDateTime.now())

Loading…
Cancel
Save