| | |
| | | setlineXy(modelJson3, 0, y, x2, y, null); |
| | | jsonArray.add(modelJson3); |
| | | |
| | | double curPointHour = 50, periodHour = 50; |
| | | double curPointHour = 10, periodHour = 50; |
| | | while (curPointHour < totalHours) { |
| | | JSONObject modelJson4 = new JSONObject(templetsStrMap.get("model")); |
| | | double x = curPointHour * pointNumPerHour; |
| | | setlineXy(modelJson4, x, y, x, y, null); |
| | | jsonArray.add(modelJson4); |
| | | curPointHour += 10.0; |
| | | } |
| | | |
| | | return jsonObject.toString(); |
| | |
| | | "end".equals(item.getAlgorithmType())).collect(Collectors.toList()).get(0); |
| | | ModelNode computerNode = modelNodeAndVnodeList.stream().filter(item -> |
| | | endAlgo.getComputerList().equals(item.getId().toString())).collect(Collectors.toList()).get(0); |
| | | node2DOM(productList, |
| | | node2DOM(productId, |
| | | productList, |
| | | paramDataList, |
| | | gkModelsAssembled, |
| | | algorithmList, |
| | |
| | | } |
| | | |
| | | // 递归函数 |
| | | private void node2DOM(List<XhProductModel> productList, |
| | | private void node2DOM(Long productId, |
| | | List<XhProductModel> productList, |
| | | List<ParamData> paramDataList, |
| | | List<OperatConditModel> gkModelsAssembled, |
| | | List<Algorithm> algorithmList, |
| | |
| | | "end".equals(item.getAlgorithmType())).collect(Collectors.toList()).get(0); |
| | | ModelNode computerNode = modelNodeAndVnodeListSub.stream().filter(item -> |
| | | endAlgo.getComputerList().equals(item.getId().toString())).collect(Collectors.toList()).get(0); |
| | | node2DOM(productList, |
| | | node2DOM(product.getId(), |
| | | productList, |
| | | paramDataList, |
| | | gkModelsAssembled, |
| | | algorithmListSub, |
| | |
| | | Algorithm algo = algorithmList.stream().filter(item -> |
| | | node.getId().equals(item.getId())).collect(Collectors.toList()).get(0); |
| | | Element element = parent.addElement("logic"); |
| | | element.addAttribute("name", algo.getId().toString()); |
| | | if (null == productId) { |
| | | element.addAttribute("name", algo.getId().toString()); |
| | | } else { |
| | | element.addAttribute("name", productId.toString()); |
| | | } |
| | | if ("series".equals(algo.getAlgorithmType())) { |
| | | element.addAttribute("type", "series"); |
| | | } else if ("parallel".equals(algo.getAlgorithmType())) { |
| | |
| | | for (String nodeStr : computerNodeListStr) { |
| | | ModelNode mn = modelNodeAndVnodeList.stream().filter(item -> |
| | | nodeStr.equals(item.getId().toString())).collect(Collectors.toList()).get(0); |
| | | node2DOM(productList, |
| | | node2DOM(null, |
| | | productList, |
| | | paramDataList, |
| | | gkModelsAssembled, |
| | | algorithmList, |