组态数据回显调整
This commit is contained in:
@@ -15,9 +15,18 @@ import java.util.List;
|
||||
@Data
|
||||
public class ZuTaiDTO {
|
||||
|
||||
@SerializedName("done_json")
|
||||
private List<Detail> doneJson;
|
||||
|
||||
@Data
|
||||
public static class Detail{
|
||||
|
||||
@SerializedName("id")
|
||||
private String id;
|
||||
|
||||
@SerializedName("name")
|
||||
private String name;
|
||||
|
||||
@SerializedName("title")
|
||||
private String title;
|
||||
|
||||
@@ -27,33 +36,6 @@ public class ZuTaiDTO {
|
||||
@SerializedName("display")
|
||||
private Boolean display;
|
||||
|
||||
@SerializedName("typeName")
|
||||
private String typeName;
|
||||
|
||||
@SerializedName("svgColor")
|
||||
private String svgColor;
|
||||
|
||||
@SerializedName("svgPositionX")
|
||||
private Double svgPositionX;
|
||||
|
||||
@SerializedName("svgPositionY")
|
||||
private Double svgPositionY;
|
||||
|
||||
@SerializedName("echartsOption")
|
||||
private String echartsOption;
|
||||
|
||||
@SerializedName("list")
|
||||
private String list;
|
||||
|
||||
@SerializedName("tableHeader")
|
||||
private String tableHeader;
|
||||
|
||||
@SerializedName("size")
|
||||
private Double size;
|
||||
|
||||
@SerializedName("angle")
|
||||
private Double angle;
|
||||
|
||||
@SerializedName("lineId")
|
||||
private List<String> lineId;
|
||||
|
||||
@@ -62,4 +44,7 @@ public class ZuTaiDTO {
|
||||
|
||||
@SerializedName("UName")
|
||||
private String target;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -86,8 +86,8 @@ public class LineTargetServiceImpl implements ILineTargetService {
|
||||
List<CsRtDataVO> result = new ArrayList<>();
|
||||
String path = csPagePOService.queryById(id).getPath();
|
||||
InputStream inputStream = fileStorageUtil.getFileStream(path);
|
||||
List<ZuTaiDTO> list = analysisJson(inputStream);
|
||||
list.forEach(item->{
|
||||
ZuTaiDTO zuTaiDto = analysisJson(inputStream);
|
||||
zuTaiDto.getDoneJson().forEach(item->{
|
||||
if (!Objects.isNull(item.getTarget())){
|
||||
String targetTag = item.getTarget().split("\\$")[0];
|
||||
String phasic = item.getTarget().split("\\$")[1];
|
||||
@@ -108,13 +108,13 @@ public class LineTargetServiceImpl implements ILineTargetService {
|
||||
/**
|
||||
* 解析json文件
|
||||
*/
|
||||
public List<ZuTaiDTO> analysisJson(InputStream inputStream) {
|
||||
public ZuTaiDTO analysisJson(InputStream inputStream) {
|
||||
Gson gson = new Gson();
|
||||
String text = new BufferedReader(
|
||||
new InputStreamReader(inputStream, StandardCharsets.UTF_8))
|
||||
.lines()
|
||||
.collect(Collectors.joining("\n"));
|
||||
return gson.fromJson(text, new TypeToken<List<ZuTaiDTO>>(){}.getType());
|
||||
return gson.fromJson(text, new TypeToken<ZuTaiDTO>(){}.getType());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user