From 7917c76b02b213a5fa805a6e2c9936167fae5cc8 Mon Sep 17 00:00:00 2001
From: wente <329538422@qq.com>
Date: 星期一, 14 十月 2024 09:23:29 +0800
Subject: [PATCH] 时序图
---
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java
index fc4a743..64c4e78 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java
@@ -185,7 +185,7 @@
JSONObject jsonObject3 = new JSONObject(templetStr);
JSONArray jsonArray3 = jsonObject3.getJSONArray("cells");
- this.getPetsInfo();
+ String modelStr2 = this.getPetsInfo();
double x1 = 0;
double x2 = 0;
int y = -10;
@@ -379,7 +379,7 @@
}
parentStatusDtoList.add(new TimeDiagramStatusDto(x1, x2, lastStatus));
- JSONObject jsonObject2 = new JSONObject(templetStr);
+ JSONObject jsonObject2 = new JSONObject(modelStr2);
JSONArray jsonArray2 = jsonObject2.getJSONArray("cells");
List<List<TimeDiagramStatusDto>> smallStatusDtoList = new ArrayList<>();
smallStatusDtoList.add(parentStatusDtoList);
@@ -389,24 +389,25 @@
for (int i = 0; i < smallStatusDtoList.size(); i++) {
for (TimeDiagramStatusDto status : smallStatusDtoList.get(i)) {
JSONObject lineJson = new JSONObject(templetsStrMap2.get(status.getStatus()));
- setlineXy(lineJson, status.getX1(), y, status.getX2()+5, y, "");
+ setlineXy(lineJson, status.getX1(), y, status.getX2() + 5, y, "");
JsonUtils2.setJsonValueByPath(lineJson, "data/status".split("/"), status.getStatus());
JsonUtils2.setJsonValueByPath(lineJson, "id".split("/"), UUIDUtil.generateId().toString());
jsonArray2.add(lineJson);
}
- y = y + 10;
+ y = y + 25;
}
//鍥句緥
int spaceWitdth = 80;
x1 = 0;
x2 = spaceWitdth - 11;
+ y = 60;
String[] tlArr = "O,F,I,S,M".split(",");
for (String s : tlArr) {
JSONObject f = templetsMap.get(s);
x1 = x1 + spaceWitdth;
x2 = x2 + spaceWitdth;
- setlineXy(f, x1, y+10, x2, y+10, null);
+ setlineXy(f, x1, y, x2, y, null);
jsonArray2.add(f);
}
timeDiagramDto.setDiagramJson(jsonObject.toString());
@@ -451,12 +452,14 @@
}
}
- public void getPetsInfo() {
+ public String getPetsInfo() {
Map<String, Object> params = new HashMap<String, Object>();
params.put("projectId", 10000);
params.put("diagramId", 10000);
+ String modelStr2 = "";
List<TimeDiagram> list_style = baseDao.getTimeDiagram(params);
if (list_style.size() > 0) {
+ modelStr2 = list_style.get(0).getContent2();
String modelStr = list_style.get(0).getContent();
JSONObject modelJson = new JSONObject(modelStr);
JSONArray modelJsonArray = modelJson.getJSONArray("cells");
@@ -529,6 +532,7 @@
}
}
}
+ return modelStr2;
}
public List<ProductStatusDto> getStatusData(Long productId, Long taskId) {
--
Gitblit v1.9.1