diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/dto/FdpFaultRealDataDTO.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/dto/FdpFaultRealDataDTO.java index ad6d7cd..15b814b 100644 --- a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/dto/FdpFaultRealDataDTO.java +++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/dto/FdpFaultRealDataDTO.java @@ -39,7 +39,8 @@ public class FdpFaultRealDataDTO { private String identifier; @ApiModelProperty("物模型是否开机:无法获取当作开机处理") private Boolean powerOn; - + @ApiModelProperty("数据来源:yc、yx、soe分别为遥测、遥信、事件") + private String style; @ApiModelProperty("获取的实时数据如果MULTI是“单”则为数值,MULTI是“多”则为数组") private List real; @ApiModelProperty("获取的实时数据如果MULTI是“单”则为数值,MULTI是“多”则为数组") diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/vo/FdpFaultRealDataVO.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/vo/FdpFaultRealDataVO.java index a5094a7..6007ee8 100644 --- a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/vo/FdpFaultRealDataVO.java +++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/vo/FdpFaultRealDataVO.java @@ -30,6 +30,8 @@ public class FdpFaultRealDataVO { private String name; @ApiModelProperty("位置") private String ord; + @ApiModelProperty("数据来源:yc、yx、soe分别为遥测、遥信、事件") + private String style; @ApiModelProperty("单代表对应一个实时数据,多代表对应一组实时数据") private String multi; @ApiModelProperty("数据的物模型id") diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/response/FaultStateResp.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/response/FaultStateResp.java index 5f57d23..a449dce 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/response/FaultStateResp.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/response/FaultStateResp.java @@ -16,14 +16,16 @@ import java.time.LocalDateTime; @Data public class FaultStateResp { - @ApiModelProperty("故障ID") - @JSONField(name = "ID") - private String id; - - @ApiModelProperty("故障名称") +// @ApiModelProperty("故障ID") +// @JSONField(name = "ID") +// private String id; +// +// @ApiModelProperty("故障名称") +// @JSONField(name = "NAME") +// private String name; + @ApiModelProperty("数据时间") @JSONField(name = "NAME") - private String name; - + private String ts; @ApiModelProperty("状态") @JSONField(name = "STATUS") @JsonSerialize(nullsUsing = NullSerializer.class) @@ -62,10 +64,10 @@ public class FaultStateResp { @JSONField(name = "INFO") private String info; - @ApiModelProperty("优先级") - @JSONField(name = "PRIORITY") - @JsonSerialize(nullsUsing = NullSerializer.class) - private int priority; +// @ApiModelProperty("优先级") +// @JSONField(name = "PRIORITY") +// @JsonSerialize(nullsUsing = NullSerializer.class) +// private int priority; @ApiModelProperty("该状态的创建来源(auto/manual)") @JSONField(name = "SOURCE") diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpFaultServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpFaultServiceImpl.java index 9bc8bdd..a1bb75e 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpFaultServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpFaultServiceImpl.java @@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.hnac.hzims.fdp.dto.FdpFaultDTO; import com.hnac.hzims.fdp.entity.FdpFaultEntity; @@ -14,7 +13,6 @@ import com.hnac.hzims.fdp.service.IFdpFaultService; import com.hnac.hzims.fdp.util.HttpRequestUtil; import com.hnac.hzims.fdp.vo.FdpFaultVO; import com.hnac.hzims.fdp.wrapper.FdpFaultWrapper; -import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.feign.IStationClient; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -43,7 +41,7 @@ public class FdpFaultServiceImpl extends BaseServiceImpl history = new HashMap<>(2); - history.put("start",start); - history.put("end",end); - params.put("history",history); +// params.put("stationId",stationId); +// Map history = new HashMap<>(2); + params.put("start",start); + params.put("end",end); +// params.put("history",history); String result = HttpRequestUtil.postCall(params,url,"POST"); // HashMap stringObjectHashMap = JSONObject.parseObject(result, new TypeReference>() { // }); @@ -127,27 +125,26 @@ public class FdpFaultServiceImpl extends BaseServiceImpl respList = r.getData(); - /**根据开始时间排序**/ - respList = respList.stream().sorted(Comparator.comparing(FaultStateResp::getCreateTime)).collect(Collectors.toList()); - List addList = new ArrayList<>(); - for(int i=0;i addList = new ArrayList<>(); +// for(int i=0;i