Browse Source

revert add text.text

zhongwei
tyty 1 year ago
parent
commit
aafd3cdee5
  1. 7
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetDeviceVo.java
  2. 14
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/AreaDutyServiceImpl.java

7
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetDeviceVo.java

@ -16,11 +16,8 @@ public class AreaAssetDeviceVo {
@ApiModelProperty(value = "机构Id")
private Long deptId;
@ApiModelProperty(value = "设备名称")
private String deviceCode;
@ApiModelProperty(value = "设备名称")
private String deviceName;
@ApiModelProperty(value = "机构名称")
private String deptName;
@ApiModelProperty(value = "状态")
private Integer status;

14
hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/AreaDutyServiceImpl.java

@ -174,13 +174,7 @@ public class AreaDutyServiceImpl implements AreaDutyService {
AreaTimelyVo timely = new AreaTimelyVo();
timely.setEventId(early.getFaultId());
timely.setContent(early.getFinfo());
timely.setDeptName("未知");
if(!StringUtil.isEmpty(early.getStation())){
List<String> names = stations.stream().filter(o->o.getCode().equals(early.getStation())).map(StationEntity::getName).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(names)){
timely.setDeptName(names.get(0));
}
}
timely.setDeptName(early.getStation());
timely.setTime(early.getCreateTime());
//int sum = this.eventToHours(LocalDateTime.parse(early.getCreateTime(),DateUtil.DATETIME_FORMATTER));
timely.setType("智能预警");
@ -318,12 +312,12 @@ public class AreaDutyServiceImpl implements AreaDutyService {
asset.setDevices(entry.getValue().stream().map(value->{
AreaAssetDeviceVo item = new AreaAssetDeviceVo();
item.setDeptId(entry.getKey());
item.setDeviceCode(value.getEmCode());
item.setDeviceName(value.getName());
item.setDeptName(asset.getDeptName());
// 状态
HydropowerUnitRealVo real = reals.stream().filter(o->o.getDeviceCode().equals(value.getEmCode())).min(Comparator.comparing(HydropowerUnitRealVo::getDeviceCode)).get();
if(ObjectUtil.isEmpty(real)){
item.setStatus(2);
if(ObjectUtil.isNotEmpty(real) && Math.abs(real.getActivePower()) > 0){
}else if(Math.abs(real.getActivePower()) > 0){
item.setStatus(1);
}
return item;

Loading…
Cancel
Save