diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/entity/ContentEntity.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/entity/ContentEntity.java index e3372eb..495bdae 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/entity/ContentEntity.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/entity/ContentEntity.java @@ -133,7 +133,7 @@ public class ContentEntity extends TenantEntity { @ApiModelProperty(value = "绑定物模型属性标识") private String attrSignage; - @ApiModelProperty(value = "绑定物模型属性标识") + @ApiModelProperty(value = "绑定物模型属性名称") private String attrName; @ApiModelProperty(value = "绑定采集点ID") diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationAttributeServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationAttributeServiceImpl.java index 9a60ed7..05560c2 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationAttributeServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationAttributeServiceImpl.java @@ -39,6 +39,7 @@ import org.springframework.util.Assert; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; +import java.util.stream.Stream; /** * @author hx @@ -237,6 +238,8 @@ public class StationAttributeServiceImpl extends BaseServiceImpl this.fillAttrId(stationAttrList,stationAttr)) .sorted(Comparator.comparing(StationAttributeVo::getSort,Comparator.nullsLast(Integer::compareTo))) .collect(Collectors.toList()); + // 排序完成之后循环赋值 + Stream.iterate(1,n -> n+1).limit(result.size()).forEach(index -> result.get(index-1).setSort(index)); return result; } @@ -282,7 +285,6 @@ public class StationAttributeServiceImpl extends BaseServiceImpl