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. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java
  3. 16
      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") @ApiModelProperty(value = "机构Id")
private Long deptId; private Long deptId;
@ApiModelProperty(value = "设备名称") @ApiModelProperty(value = "机构名称")
private String deviceCode; private String deptName;
@ApiModelProperty(value = "设备名称")
private String deviceName;
@ApiModelProperty(value = "状态") @ApiModelProperty(value = "状态")
private Integer status; private Integer status;

2
hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java

@ -638,7 +638,7 @@ public class FdpMonitorServiceImpl extends BaseServiceImpl<FdpMonitorMapper, Fdp
} }
paramMap.put("stationIds", list.toArray(new String[0])); paramMap.put("stationIds", list.toArray(new String[0]));
}else{ }else{
paramMap.put("stationIds", stations); paramMap.put("stationIds", stations);
} }
String result = HttpRequestUtil.postCall(paramMap, autoFaultPath, "POST"); String result = HttpRequestUtil.postCall(paramMap, autoFaultPath, "POST");
if (StringUtil.isBlank(result)) { if (StringUtil.isBlank(result)) {

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

Loading…
Cancel
Save