组态数据回显调整
This commit is contained in:
@@ -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