jinlin
2024-09-26 7686039d6fcdf7dc4d1fdde3758bd98ff9646f2a
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java
@@ -187,11 +187,13 @@
        int groupHeight = 20;
        double pointNumPerHour = 60.0 / simulatAssess.getSamplPeriod();
        //时序图线
        for (int i = 0; i < list.size(); i++) {
            x1 = 0;
            groupY = groupHeight * i;
            ProductStatusDto dto = list.get(i);
            double startTime = 0.0;
            for (StatusDto status : dto.getStatusList()) {
                switch (status.getStatus()) {
                    case "O":
@@ -210,9 +212,10 @@
                JSONObject lineJson = new JSONObject(templetsStrMap.get(status.getStatus()));
                setlineXy(lineJson, x1, y, x2, y, "");
                JsonUtils2.setJsonValueByPath(lineJson, "data/status".split("/"), status.getStatus());
                JsonUtils2.setJsonValueByPath(lineJson, "data/startTimes".split("/"), String.format("%.4f", x1));
                JsonUtils2.setJsonValueByPath(lineJson, "data/endTimes".split("/"), String.format("%.4f", x1 + status.getTimes()));
                JsonUtils2.setJsonValueByPath(lineJson, "data/startTimes".split("/"), String.format("%.1f", startTime));
                JsonUtils2.setJsonValueByPath(lineJson, "data/endTimes".split("/"), String.format("%.1f", startTime + status.getTimes()));
                JsonUtils2.setJsonValueByPath(lineJson, "id".split("/"), UUIDUtil.generateId().toString());
                startTime = startTime + status.getTimes();
                x1 = x2 - 5;
                jsonArray.add(lineJson);
            }
@@ -1038,6 +1041,7 @@
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        List<WeakDto> productList = baseDao.getProductList(taskId, productId);
@@ -1052,6 +1056,7 @@
            Object nameValue = jsonArray.getJSONObject(i).get("name");
            if (nameValue instanceof Long) {
                productId1 = (Long) nameValue;
                if (map.get(productId1) != null) {
                WeakDto weakDto = map.get(productId1);
                Double mtbfTime = null;
@@ -1079,8 +1084,13 @@
                list.add(data);
            }
        }
        List<WeakDto> treeList = TreeUtils.build(list);
        }
        List<WeakDto> treeList = new ArrayList<>();
        if (list.size() > 0) {
            treeList = TreeUtils.build(list);
        this.getIsweak(treeList.get(0).getChildren());
        }
        return treeList;
    }