From f76e09f832e71b29c7b7771c1d0aaa5858f9a20f Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期三, 09 十月 2024 15:49:37 +0800
Subject: [PATCH] 修改

---
 modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 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 909ede2..fc4a743 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
@@ -182,6 +182,9 @@
         JSONObject jsonObject = new JSONObject(templetStr);
         JSONArray jsonArray = jsonObject.getJSONArray("cells");
 
+        JSONObject jsonObject3 = new JSONObject(templetStr);
+        JSONArray jsonArray3 = jsonObject3.getJSONArray("cells");
+
         this.getPetsInfo();
         double x1 = 0;
         double x2 = 0;
@@ -237,12 +240,13 @@
                 jsonArray.add(lineJson);
             }
             lineArray.add(statusDtoList);
+
             JSONObject textJson = new JSONObject(templetsStrMap.get("text"));
             JsonUtils2.setJsonValueByPath(textJson, "id".split("/"), UUIDUtil.generateId().toString());
             JsonUtils2.setJsonValueByPath(textJson, "attrs/label/textWrap/text".split("/"), dto.getName());
             JsonUtils2.setJsonValueByPath(textJson, "position/x".split("/"), 20);
             JsonUtils2.setJsonValueByPath(textJson, "position/y".split("/"), y - 15);
-            jsonArray.add(textJson);
+            jsonArray3.add(textJson);
         }
 
         //闃舵妯″瀷鍙婂埢搴�
@@ -385,12 +389,12 @@
         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(), 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 + 20;
+            y = y + 10;
         }
 
         //鍥句緥
@@ -402,11 +406,12 @@
             JSONObject f = templetsMap.get(s);
             x1 = x1 + spaceWitdth;
             x2 = x2 + spaceWitdth;
-            setlineXy(f, x1, y, x2, y, null);
+            setlineXy(f, x1, y+10, x2, y+10, null);
             jsonArray2.add(f);
         }
         timeDiagramDto.setDiagramJson(jsonObject.toString());
         timeDiagramDto.setSmallDiagramJson(jsonObject2.toString());
+        timeDiagramDto.setTextDiagramJson(jsonObject3.toString());
 
         return timeDiagramDto;
     }

--
Gitblit v1.9.1