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