xyc
2024-10-22 1dad50645c6e61980f15b2be4505f75e7c922ee7
Merge remote-tracking branch 'origin/master'
18个文件已修改
2个文件已添加
1023 ■■■■ 已修改文件
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ProductImg.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java 260 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/SimulatAssessController.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/dao/SimulatAssessDao.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/OperatConditModel.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/SimulatAssess.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/SimulatResult.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ModelRbdNodeService.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java 339 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/产品结构树导出模板.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
web/public/产品结构树导入模板.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/ParamData.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/basicInfo/XhProductModel.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/RBD-edit-img.vue 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/SchemeCompar.vue 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web/src/views/modules/taskReliability/SimulatAssess.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
@@ -32,6 +32,8 @@
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@@ -123,8 +125,8 @@
    @GetMapping("exportData")
    @ApiOperation("导出产品模型")
    @LogOperation("导出产品模型")
    public Result exportDataExcel(Long shipId) {
        xhProductModelService.exportDataExcel(shipId);
    public Result exportDataExcel(HttpServletRequest request, HttpServletResponse response, Long shipId,String fileName) {
        xhProductModelService.exportDataExcel(request,response,shipId,fileName);
        return null;
    }
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java
@@ -1,6 +1,7 @@
package com.zt.life.modules.mainPart.basicInfo.dao;
import com.zt.common.dao.BaseDao;
import com.zt.life.modules.mainPart.basicInfo.dto.ProductDto;
import com.zt.life.modules.mainPart.basicInfo.model.ProductImg;
import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel;
import org.apache.ibatis.annotations.Mapper;
@@ -43,5 +44,5 @@
    Long[] getByPid(Long id);
    void getProductByShip(Long shipId);
    List<ProductDto> getProductByShip(Long shipId);
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/model/ProductImg.java
@@ -38,6 +38,8 @@
    @TableField(exist = false)
    private String dataId;
    @TableField(exist = false)
    private Integer basicUnitNum;
    @TableField(exist = false)
    private String statusImg;
    @TableField(exist = false)
    private String productType;
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
@@ -1,5 +1,7 @@
package com.zt.life.modules.mainPart.basicInfo.service;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zt.common.constant.Constant;
import com.zt.common.service.BaseService;
@@ -8,14 +10,17 @@
import com.zt.common.utils.TreeUtils;
import com.zt.common.utils.UUIDUtil;
import com.zt.core.shiro.ImportUtil;
import com.zt.life.export.service.DownloadService;
import com.zt.life.modules.mainPart.basicInfo.dao.XhProductModelDao;
import com.zt.life.modules.mainPart.basicInfo.dto.ProductDto;
import com.zt.life.modules.mainPart.basicInfo.model.ParamData;
import com.zt.life.modules.mainPart.basicInfo.model.ProductImg;
import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel;
import com.zt.life.modules.mainPart.sysPictureBase.service.SysPictureBaseService;
import com.zt.modules.sys.dto.DictTypeDto;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
@@ -25,6 +30,9 @@
import com.zt.common.db.query.QueryFilter;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.*;
@@ -194,23 +202,37 @@
                    String xt = com.zt.core.shiro.ImportUtil.getCellValue(row, 1, pattern); //系统
                    String fxt = com.zt.core.shiro.ImportUtil.getCellValue(row, 2, pattern);
                    String sb = com.zt.core.shiro.ImportUtil.getCellValue(row, 3, pattern); //设备
                    String sameSbName = com.zt.core.shiro.ImportUtil.getCellValue(row, 4, pattern); //同类设备名称
                    String sameSbNumStr = com.zt.core.shiro.ImportUtil.getCellValue(row, 4, pattern); //同类设备数量
                    String equipType = com.zt.core.shiro.ImportUtil.getCellValue(row, 5, pattern); //设备类型
                    String reliabDistribType = com.zt.core.shiro.ImportUtil.getCellValue(row, 6, pattern); //可靠性分布类型
                    String basicJoinCompute = com.zt.core.shiro.ImportUtil.getCellValue(row, 7, pattern); //参加计算
                    String basicMtbfRegulate = com.zt.core.shiro.ImportUtil.getCellValue(row, 8, pattern); //mtbf
                    String basicMtbfRegulSuccRate = com.zt.core.shiro.ImportUtil.getCellValue(row, 9, pattern); //成功率
                    String basicMtbfOperatingRatio = com.zt.core.shiro.ImportUtil.getCellValue(row, 10, pattern); //运行比
                    String taskMtbcfRegulate = com.zt.core.shiro.ImportUtil.getCellValue(row, 11, pattern); //mtbcf
                    String taskMtbcfOtherParams2 = com.zt.core.shiro.ImportUtil.getCellValue(row, 12, pattern); //mtbcf其他参数2
                    String taskMtbcfOtherParams3 = com.zt.core.shiro.ImportUtil.getCellValue(row, 13, pattern); //mtbcf其他参数3
                    String taskMtbcfRegulSuccRate = com.zt.core.shiro.ImportUtil.getCellValue(row, 14, pattern); //mtbcf成功率
                    String taskMtbcfOperatingRatio = com.zt.core.shiro.ImportUtil.getCellValue(row, 15, pattern); //mtbcf运行比
                    String basicMtbfRegulateStr = com.zt.core.shiro.ImportUtil.getCellValue(row, 8, pattern); //mtbf
                    String basicMtbfRegulSuccRateStr = com.zt.core.shiro.ImportUtil.getCellValue(row, 9, pattern); //成功率
                    String basicMtbfOperatingRatioStr = com.zt.core.shiro.ImportUtil.getCellValue(row, 10, pattern); //运行比
                    String taskMtbcfRegulateStr = com.zt.core.shiro.ImportUtil.getCellValue(row, 11, pattern); //mtbcf
                    String taskMtbcfOtherParams2Str = com.zt.core.shiro.ImportUtil.getCellValue(row, 12, pattern); //mtbcf其他参数2
                    String taskMtbcfOtherParams3Str = com.zt.core.shiro.ImportUtil.getCellValue(row, 13, pattern); //mtbcf其他参数3
                    String taskMtbcfRegulSuccRateStr = com.zt.core.shiro.ImportUtil.getCellValue(row, 14, pattern); //mtbcf成功率
                    String taskMtbcfOperatingRatioStr = com.zt.core.shiro.ImportUtil.getCellValue(row, 15, pattern); //mtbcf运行比
                    String repairable = com.zt.core.shiro.ImportUtil.getCellValue(row, 16, pattern); //是否可维修
                    String repairDistribType = com.zt.core.shiro.ImportUtil.getCellValue(row, 17, pattern); //维修发布类型
                    String repairMttcr = com.zt.core.shiro.ImportUtil.getCellValue(row, 18, pattern); //mttcr
                    String repairMttcrOtherParams2 = com.zt.core.shiro.ImportUtil.getCellValue(row, 19, pattern); //mttcr其他参数2
                    String repairMttcrOtherParams3 = com.zt.core.shiro.ImportUtil.getCellValue(row, 20, pattern); //mttcr其他参数3
                    String repairMttcrStr = com.zt.core.shiro.ImportUtil.getCellValue(row, 18, pattern); //mttcr
                    String repairMttcrOtherParams2Str = com.zt.core.shiro.ImportUtil.getCellValue(row, 19, pattern); //mttcr其他参数2
                    String repairMttcrOtherParams3Str = com.zt.core.shiro.ImportUtil.getCellValue(row, 20, pattern); //mttcr其他参数3
                    Integer sameSbNum = StringUtils.isNotBlank(sameSbNumStr) ? Integer.parseInt(sameSbNumStr) : 1;
                    Double basicMtbfRegulate = StringUtils.isNotBlank(basicMtbfRegulateStr) ? Double.valueOf(basicMtbfRegulateStr) : null;
                    Double basicMtbfRegulSuccRate = StringUtils.isNotBlank(basicMtbfRegulSuccRateStr) ? Double.valueOf(basicMtbfRegulSuccRateStr) : null;
                    Double basicMtbfOperatingRatio = StringUtils.isNotBlank(basicMtbfOperatingRatioStr) ? Double.parseDouble(basicMtbfOperatingRatioStr) : 1.0;
                    Double taskMtbcfRegulate = StringUtils.isNotBlank(taskMtbcfRegulateStr) ? Double.parseDouble(taskMtbcfRegulateStr) : null;
                    Double taskMtbcfOtherParams2 = StringUtils.isNotBlank(taskMtbcfOtherParams2Str) ? Double.parseDouble(taskMtbcfOtherParams2Str) : null;
                    Double taskMtbcfOtherParams3 = StringUtils.isNotBlank(taskMtbcfOtherParams3Str) ? Double.parseDouble(taskMtbcfOtherParams3Str) : null;
                    Double taskMtbcfRegulSuccRate = StringUtils.isNotBlank(taskMtbcfRegulSuccRateStr) ? Double.parseDouble(taskMtbcfRegulSuccRateStr) : null;
                    Double taskMtbcfOperatingRatio = StringUtils.isNotBlank(taskMtbcfOperatingRatioStr) ? Double.parseDouble(taskMtbcfOperatingRatioStr) : 1.0;
                    Double repairMttcr = StringUtils.isNotBlank(repairMttcrStr) ? Double.parseDouble(repairMttcrStr) : null;
                    Double repairMttcrOtherParams2 = StringUtils.isNotBlank(repairMttcrOtherParams2Str) ? Double.parseDouble(repairMttcrOtherParams2Str) : null;
                    Double repairMttcrOtherParams3 = StringUtils.isNotBlank(repairMttcrOtherParams3Str) ? Double.parseDouble(repairMttcrOtherParams3Str) : null;
                    if (StringUtils.isBlank(sb))
                        continue;
@@ -253,10 +275,6 @@
                    } else {
                        curSbId = modelMap.get(sbPath).getId();
                        paramId = modelMap.get(sbPath).getParamId();
                    }
                    if(StringUtils.isBlank(sameSbName)){
                        sameSbName = sb;
                    }
                    if (StringUtils.isEmpty(sb)) {
@@ -311,7 +329,7 @@
                    xhProductModel.setPid(curFxtId == null ? curXtId : curFxtId);
                    xhProductModel.setId(curSbId);
                    xhProductModel.setName(sb);
                    xhProductModel.setSameSbName(sameSbName);
                    //xhProductModel.setSameSbName(sameSbName);
                    xhProductModel.setEquipType(equipType);
                    xhProductModel.setProductType("5");
                    xhProductModel.setSort(Integer.valueOf(sort));
@@ -320,7 +338,7 @@
                    xhProductModel.setNamePath(sbPath);
                    if (insertSb) {
                        this.insert(xhProductModel);
                    }else{
                    } else {
                        this.update(xhProductModel);
                    }
@@ -331,45 +349,21 @@
                    itemEntity.setProductId(curSbId);
                    itemEntity.setReliabDistribType(reliabType.get(reliabDistribType));
                    itemEntity.setBasicJoinCompute(isOrNot.get(basicJoinCompute));
                    if (StringUtils.isNotBlank(basicMtbfRegulate)) {
                        itemEntity.setBasicMtbfRegulate(Double.valueOf(basicMtbfRegulate));
                    }
                    if (StringUtils.isNotBlank(basicMtbfRegulSuccRate)) {
                        itemEntity.setBasicMtbfRegulSuccRate(Double.valueOf(basicMtbfRegulSuccRate));
                    }
                    if (StringUtils.isNotBlank(basicMtbfOperatingRatio)) {
                        itemEntity.setBasicMtbfOperatingRatio(Double.valueOf(basicMtbfOperatingRatio));
                    } else {
                        itemEntity.setBasicMtbfOperatingRatio(1.0);
                    }
                    if (StringUtils.isNotBlank(taskMtbcfRegulate)) {
                        itemEntity.setTaskMtbcfRegulate(Double.valueOf(taskMtbcfRegulate));
                    }
                    if (StringUtils.isNotBlank(taskMtbcfOtherParams2)) {
                        itemEntity.setTaskMtbcfOtherParams2(Double.valueOf(taskMtbcfOtherParams2));
                    }
                    if (StringUtils.isNotBlank(taskMtbcfOtherParams3)) {
                        itemEntity.setTaskMtbcfOtherParams3(Double.valueOf(taskMtbcfOtherParams3));
                    }
                    if (StringUtils.isNotBlank(taskMtbcfRegulSuccRate)) {
                        itemEntity.setTaskMtbcfRegulSuccRate(Double.valueOf(taskMtbcfRegulSuccRate));
                    }
                    if (StringUtils.isNotBlank(taskMtbcfOperatingRatio)) {
                        itemEntity.setTaskMtbcfOperatingRatio(Double.valueOf(taskMtbcfOperatingRatio));
                    } else {
                        itemEntity.setTaskMtbcfOperatingRatio(1.0);
                    }
                    itemEntity.setBasicUnitNum(sameSbNum);
                    itemEntity.setBasicMtbfRegulate(basicMtbfRegulate);
                    itemEntity.setBasicMtbfRegulSuccRate(basicMtbfRegulSuccRate);
                    itemEntity.setBasicMtbfOperatingRatio(basicMtbfOperatingRatio);
                    itemEntity.setTaskMtbcfRegulate(taskMtbcfRegulate);
                    itemEntity.setTaskMtbcfOtherParams2(taskMtbcfOtherParams2);
                    itemEntity.setTaskMtbcfOtherParams3(taskMtbcfOtherParams3);
                    itemEntity.setTaskMtbcfRegulSuccRate(taskMtbcfRegulSuccRate);
                    itemEntity.setTaskMtbcfOperatingRatio(taskMtbcfOperatingRatio);
                    itemEntity.setRepairable(isOrNot.get(repairable));
                    itemEntity.setRepairDistribType(repairType.get(repairDistribType));
                    if (StringUtils.isNotBlank(repairMttcr)) {
                        itemEntity.setRepairMttcr(Double.valueOf(repairMttcr));
                    }
                    if (StringUtils.isNotBlank(repairMttcrOtherParams2)) {
                        itemEntity.setRepairMttcrOtherParams2(Double.valueOf(repairMttcrOtherParams2));
                    }
                    if (StringUtils.isNotBlank(repairMttcrOtherParams3)) {
                        itemEntity.setRepairMttcrOtherParams3(Double.valueOf(repairMttcrOtherParams3));
                    }
                    itemEntity.setRepairMttcr(repairMttcr);
                    itemEntity.setRepairMttcrOtherParams2(repairMttcrOtherParams2);
                    itemEntity.setRepairMttcrOtherParams3(repairMttcrOtherParams3);
                    if (modelMap.get(sbPath) == null) {
                        paramDataService.insert(itemEntity);
                    } else {
@@ -414,7 +408,157 @@
        return baseDao.getByPid(id);
    }
    public void exportDataExcel(Long shipId) {
        baseDao.getProductByShip(shipId);
    public void exportDataExcel(HttpServletRequest request, HttpServletResponse response, Long shipId, String name) {
        Map<Integer, String> reliabType = new HashMap<>();
        reliabType.put(1, "指数分布");
        reliabType.put(3, "二项分布");
        reliabType.put(2, "威布尔分布");
        Map<Integer, String> repairType = new HashMap<>();
        repairType.put(1, "指数分布");
        repairType.put(2, "威布尔分布");
        Map<Integer, String> isOrNot = new HashMap<>();
        isOrNot.put(1, "是");
        isOrNot.put(0, "否");
        List<ProductDto> data = baseDao.getProductByShip(shipId);
        data = TreeUtils.build(data);
        List<ProductDto> List = new ArrayList<>();
        this.writeExcel(data, List);
        // è¯»å–模板文件
        try (InputStream inputStream = getClass().getResourceAsStream("/产品结构树导出模板.xlsx")) {
            Workbook workbook = new XSSFWorkbook(inputStream);
            // èŽ·å–ç¬¬ä¸€ä¸ªå·¥ä½œè¡¨
            Sheet sheet = workbook.getSheetAt(0);
            int num = 0;
            String xt = "";
            String fxt = "";
            String sb = "";
            for (int i = 0; i < List.size(); i++) {
                if (List.get(i).getProductType() == 5) {
                    num = num + 1;
                    String[] parentList = List.get(i).getNamePath().split(",");
                    Row row = sheet.createRow(sheet.getLastRowNum() + 1); // åˆ›å»ºæ–°è¡Œ
                    Cell cell = row.createCell(0);
                    cell.setCellValue(num);
                    if (parentList.length > 2) {
                        if (!xt.equals(parentList[0])) {
                            xt = parentList[0];
                            cell = row.createCell(1);
                            cell.setCellValue(xt);
                        }
                        if (!fxt.equals(parentList[1])) {
                            fxt = parentList[1];
                            cell = row.createCell(2);
                            cell.setCellValue(fxt);
                        }
                        if (!sb.equals(parentList[2])) {
                            sb = parentList[2];
                            cell = row.createCell(3);
                            cell.setCellValue(sb);
                        }
                    } else {
                        if (!xt.equals(parentList[0])) {
                            xt = parentList[0];
                            cell = row.createCell(1);
                            cell.setCellValue(xt);
                        }
                        if (!sb.equals(parentList[1])) {
                            sb = parentList[1];
                            cell = row.createCell(3);
                            cell.setCellValue(sb);
                        }
                    }
                    cell = row.createCell(4);
                    if (StringUtils.isNotBlank(List.get(i).getSameSbName())) {
                        cell.setCellValue(List.get(i).getSameSbName());
                    }
                    cell = row.createCell(5);
                    if (StringUtils.isNotBlank(List.get(i).getEquipType())) {
                        cell.setCellValue(List.get(i).getEquipType());
                    }
                    cell = row.createCell(6);
                    String type = reliabType.get(List.get(i).getReliabDistribType());
                    cell.setCellValue(type);
                    cell = row.createCell(7);
                    String isNot = isOrNot.get(List.get(i).getBasicJoinCompute());
                    cell.setCellValue(isNot);
                    cell = row.createCell(8);
                    if (List.get(i).getBasicMtbfRegulate() != null) {
                        cell.setCellValue(List.get(i).getBasicMtbfRegulate());
                    }
                    cell = row.createCell(9);
                    if (List.get(i).getBasicMtbfRegulSuccRate() != null) {
                        cell.setCellValue(List.get(i).getBasicMtbfRegulSuccRate());
                    }
                    cell = row.createCell(10);
                    if (List.get(i).getBasicMtbfOperatingRatio() != null) {
                        cell.setCellValue(List.get(i).getBasicMtbfOperatingRatio());
                    } else {
                        cell.setCellValue(1.0);
                    }
                    cell = row.createCell(11);
                    if (List.get(i).getTaskMtbcfRegulate() != null) {
                        cell.setCellValue(List.get(i).getTaskMtbcfRegulate());
                    }
                    cell = row.createCell(12);
                    if (List.get(i).getTaskMtbcfOtherParams2() != null) {
                        cell.setCellValue(List.get(i).getTaskMtbcfOtherParams2());
                    }
                    cell = row.createCell(13);
                    if (List.get(i).getTaskMtbcfOtherParams3() != null) {
                        cell.setCellValue(List.get(i).getTaskMtbcfOtherParams3());
                    }
                    cell = row.createCell(14);
                    if (List.get(i).getTaskMtbcfRegulSuccRate() != null) {
                        cell.setCellValue(List.get(i).getTaskMtbcfRegulSuccRate());
                    }
                    cell = row.createCell(15);
                    if (List.get(i).getTaskMtbcfOperatingRatio() != null) {
                        cell.setCellValue(List.get(i).getTaskMtbcfOperatingRatio());
                    } else {
                        cell.setCellValue(1.0);
                    }
                    cell = row.createCell(16);
                    if (List.get(i).getRepairable() != null) {
                        isNot = isOrNot.get(List.get(i).getRepairable());
                        cell.setCellValue(isNot);
                    }
                    cell = row.createCell(17);
                    if (List.get(i).getRepairDistribType() != null) {
                        type = repairType.get(List.get(i).getRepairDistribType());
                        cell.setCellValue(type);
                    }
                    cell = row.createCell(18);
                    if (List.get(i).getRepairMttcr() != null) {
                        cell.setCellValue(List.get(i).getRepairMttcr());
                    }
                    cell = row.createCell(19);
                    if (List.get(i).getRepairMttcrOtherParams2() != null) {
                        cell.setCellValue(List.get(i).getRepairMttcrOtherParams2());
                    }
                    cell = row.createCell(20);
                    if (List.get(i).getRepairMttcrOtherParams3() != null) {
                        cell.setCellValue(List.get(i).getRepairMttcrOtherParams3());
                    }
                }
            }
            response.setContentType("application/octet-stream;charset=UTF-8");
            String encodedFilename = DownloadService.getNameEncoder(request, name + "_产品结构树.xlsx");
            response.addHeader("Content-Disposition", "attachment;filename=" + encodedFilename);
            workbook.write(response.getOutputStream());
        } catch (
                IOException e) {
            e.printStackTrace();
        }
    }
    private void writeExcel(List<ProductDto> data, List<ProductDto> List) {
        for (ProductDto dto : data) {
            List.add(dto);
            writeExcel(dto.getChildren(), List);
        }
    }
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/controller/SimulatAssessController.java
@@ -13,10 +13,7 @@
import com.zt.common.validator.group.UpdateGroup;
import com.zt.life.modules.mainPart.async.PythonLib;
import com.zt.life.modules.mainPart.taskReliability.dto.*;
import com.zt.life.modules.mainPart.taskReliability.model.CurveParam;
import com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess;
import com.zt.life.modules.mainPart.taskReliability.model.Task;
import com.zt.life.modules.mainPart.taskReliability.model.TimeDiagram;
import com.zt.life.modules.mainPart.taskReliability.model.*;
import com.zt.life.modules.mainPart.taskReliability.service.SimulatAssessService;
import com.zt.life.modules.mainPart.taskReliability.service.TaskService;
import io.swagger.annotations.Api;
@@ -52,12 +49,6 @@
    @Autowired
    private RedisTemplate redisTemplate;
    @Autowired
    private PythonLib pythonLib;
    @Autowired
    private TaskService taskService;
    @Autowired
    private SimulatAssessService simulatAssessService;
@@ -85,13 +76,26 @@
        return Result.ok(data);
    }
    @GetMapping("verify")
    public Result<String> verify(Long taskId) {
        String result = simulatAssessService.verify(taskId);
        result = result.replaceAll("\n", "<br>");
        return Result.ok(result);
    }
    @PostMapping("analyze")
    public Result<Long> analyze(@RequestBody SimulatAssess simulatAssess) {
    public Result<Object> analyze(@RequestBody SimulatAssess simulatAssess) {
        //效验数据
//        Result result = pythonLib.callPython(simulatAssess);
        Result result = simulatAssessService.simulate(simulatAssess);
        return result;
        List<TaskModelCheckResultDto> result = simulatAssessService.simulateChecK(simulatAssess);
        if (result != null) {
            return Result.ok(result);
        }
        Boolean result2 = simulatAssessService.simulate(simulatAssess);
        if (result2)
            return Result.ok();
        else
            return Result.error();
    }
    @PostMapping("getResultXML")
@@ -107,8 +111,8 @@
    }
    @GetMapping("getStatus")
    public Result<TimeDiagramDto> getTimeDiagram(Long productId, Long taskId, Long fzId, double smallWidth,double minPointNum) {
        TimeDiagramDto data = simulatAssessService.getTimeDiagram(productId, taskId, fzId, smallWidth,minPointNum);
    public Result<TimeDiagramDto> getTimeDiagram(Long productId, Long taskId, Long fzId, double smallWidth, double minPointNum) {
        TimeDiagramDto data = simulatAssessService.getTimeDiagram(productId, taskId, fzId, smallWidth, minPointNum);
        return Result.ok(data);
    }
@@ -137,14 +141,31 @@
    }
    @GetMapping("getCalcProgress")
    public Result getCalcProgress(Long taskId) {
        String key = taskId.toString() + simulatAssessService.RELIA_SIM_TASK_TYPE_PROGRESS;
        String progress = (String) redisTemplate.opsForValue().get(key);
        if (progress == null) progress = "0";
        if (Objects.equals(progress, "100")) {
            simulatAssessService.deleteSimInfoInRedis(taskId);
    public Result getCalcProgress(@RequestParam("taskList[]") Long[] taskList) {
        Integer progress = 0;
        String progress2 = "";
        String key = null;
        if (taskList.length == 1) {
            key = taskList[0].toString() + simulatAssessService.RELIA_SIM_TASK_TYPE_PROGRESS;
            progress2 = (String) redisTemplate.opsForValue().get(key);
            progress = Integer.parseInt(progress2);
            if (progress == null) progress = 0;
            if (progress == 100) {
                //simulatAssessService.deleteSimInfoInRedis(taskId);
            }
        } else {
            for (Long taskId : taskList) {
                key = taskId.toString() + simulatAssessService.RELIA_SIM_TASK_TYPE_PROGRESS;
                progress2 = (String) redisTemplate.opsForValue().get(key);
                progress = progress + Integer.parseInt(progress2);
            }
            progress = progress / taskList.length;
            if (progress == 100) {
                //simulatAssessService.deleteSimInfoInRedis(taskId);
            }
        }
        return Result.ok(progress);
        return Result.ok(progress.toString());
    }
    @GetMapping("ReliabilityWeakness")
@@ -154,13 +175,16 @@
    }
    @GetMapping("SchemeCompar")
    public Result<SchemeComparDto> SchemeCompar(@RequestParam("taskList[]") String[] taskList,Long showProductId) {
       SchemeComparDto data = simulatAssessService.SchemeCompar(taskList,showProductId);
    public Result<SimulatResult> SchemeCompar(@RequestParam("taskList[]") String[] taskList, Long showProductId, Integer samplPeriod, Integer simulatFrequency) {
        SimulatResult data = simulatAssessService.SchemeCompar(taskList, showProductId, samplPeriod, simulatFrequency);
        return Result.ok(data);
    }
    @GetMapping("getEcharts")
    public Result<SchemeComparDto> getEcharts(@RequestParam("taskList[]") String[] taskList, Long showProductId) {
        SchemeComparDto data = simulatAssessService.getEcharts(taskList, showProductId);
        return Result.ok(data);
    }
    @PutMapping
    @ApiOperation("修改")
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/dao/SimulatAssessDao.java
@@ -1,13 +1,10 @@
package com.zt.life.modules.mainPart.taskReliability.dao;
import com.zt.common.dao.BaseDao;
import com.zt.life.modules.mainPart.taskReliability.dto.ModelDto;
import com.zt.life.modules.mainPart.taskReliability.dto.ProductStatusDto;
import com.zt.life.modules.mainPart.taskReliability.dto.WeakDto;
import com.zt.life.modules.mainPart.taskReliability.model.ModelRbd;
import com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess;
import com.zt.life.modules.mainPart.taskReliability.model.SimulatAssessTaskPhaseModel;
import com.zt.life.modules.mainPart.taskReliability.model.TimeDiagram;
import com.zt.life.modules.mainPart.taskReliability.dto.verifyDto;
import com.zt.life.modules.mainPart.taskReliability.model.*;
import org.apache.ibatis.annotations.Mapper;
@@ -44,4 +41,10 @@
    List<WeakDto> getProductList(Long taskId, Long productId);
    SimulatAssess getByTaskId(Long taskModelId);
    List<OperatConditModel> getModel(Long taskId);
    List<verifyDto> getNode(Long modelId);
    Integer getVoteNum(Long id);
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/OperatConditModel.java
@@ -61,4 +61,7 @@
    @TableField(exist = false)
    private Long iid;
    @TableField(exist = false)
    private String content;
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/SimulatAssess.java
@@ -42,7 +42,7 @@
    private String dataType;
    @TableField(exist = false)
    private Integer taskDuration;
    private Double taskDuration;
    @ApiModelProperty(value = "传给算法库的xml")
    private String xml;
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/model/SimulatResult.java
New file
@@ -0,0 +1,13 @@
package com.zt.life.modules.mainPart.taskReliability.model;
import com.zt.life.modules.mainPart.taskReliability.dto.TaskModelCheckResultDto;
import lombok.Data;
import java.util.List;
@Data
public class SimulatResult {
    private String type;
    private List<Long> idList;
    private List<TaskModelCheckResultDto> errList;
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/ModelRbdNodeService.java
@@ -6,6 +6,9 @@
import com.zt.life.modules.mainPart.taskReliability.model.*;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
/**
 * model_line
@@ -22,10 +25,14 @@
        node.setProductId(modelRbd.getProductId());
        node.setModelId(modelRbd.getId());
        Long[] nodeArr = modelRbd.getNodeArr();
        Map<Long,Integer> nodeMap = new HashMap<>();
        for(Long nodeId :nodeArr){
            node.setId(UUIDUtil.generateId());
            node.setNodeId(nodeId);
            baseDao.insert(node);
            if (nodeMap.get(nodeId)!=null) {
                node.setId(UUIDUtil.generateId());
                node.setNodeId(nodeId);
                baseDao.insert(node);
                nodeMap.put(nodeId,1);
            }
        }
    }
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java
@@ -24,6 +24,7 @@
import com.zt.life.modules.mainPart.taskReliability.dto.TaskPhaseConstraintDto;
import com.zt.life.modules.mainPart.taskReliability.model.*;
import com.zt.life.modules.mainPart.utils.GetStringSpace;
import io.swagger.models.auth.In;
import org.apache.commons.io.IOUtils;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
@@ -43,7 +44,10 @@
import org.springframework.transaction.annotation.Transactional;
import java.io.*;
import java.nio.file.FileAlreadyExistsException;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@@ -196,9 +200,9 @@
        double pointNumPerHour = 60.0 / simulatAssess.getSamplPeriod();
        //时序图线
        List<List<TimeDiagramStatusDto>> lineArray = new ArrayList();
        List<TimeDiagramStatusDto> statusDtoList = new ArrayList<>();
        List<TimeDiagramStatusDto> statusDtoListOld = new ArrayList<>();
        for (int i = 0; i < list.size(); i++) {
            List<TimeDiagramStatusDto> statusDtoList = new ArrayList<>();
            x1 = 0;
            groupY = groupHeight * i;
            ProductStatusDto dto = list.get(i);
@@ -228,7 +232,11 @@
                        break;
                }
                x2 = x1 + status.getTimes() * pointNumPerHour + 5;
                statusDtoList.add(new TimeDiagramStatusDto(x1, x2, status2));
                if (i == 0) {
                    statusDtoList.add(new TimeDiagramStatusDto(x1, x2, status2));
                } else {
                    statusDtoListOld.add(new TimeDiagramStatusDto(x1, x2, status2));
                }
                JSONObject lineJson = new JSONObject(templetsStrMap.get(status.getStatus()));
                setlineXy(lineJson, x1, y, x2, y, "");
                JsonUtils2.setJsonValueByPath(lineJson, "data/status".split("/"), status.getStatus());
@@ -239,8 +247,6 @@
                x1 = x2 - 5;
                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());
@@ -324,67 +330,73 @@
            curPointHour += periodHour;
        }
        List<TimeDiagramStatusDto> statusDtoListNew = new ArrayList<>();
        while (statusDtoListOld.size() > 0) {
            statusDtoListOld.stream().sorted(Comparator.comparing(TimeDiagramStatusDto::getX1)).collect(Collectors.toList());
            TimeDiagramStatusDto nextStatusDto = statusDtoListOld.get(0);
            if (statusDtoListNew.size() == 0) {
                statusDtoListNew.add(nextStatusDto);
            } else {
                TimeDiagramStatusDto currentStatusDto = statusDtoListNew.get(statusDtoListNew.size() - 1);
                if (nextStatusDto.getStatus() < currentStatusDto.getStatus()) {
                    if (nextStatusDto.getX1() == currentStatusDto.getX1() && nextStatusDto.getX2() == currentStatusDto.getX2()) {
                        currentStatusDto.setStatus(nextStatusDto.getStatus());
                    } else if (nextStatusDto.getX1() == currentStatusDto.getX1() && nextStatusDto.getX2() < currentStatusDto.getX2()) {
                        statusDtoListOld.add(new TimeDiagramStatusDto(nextStatusDto.getX2(), currentStatusDto.getX2(), currentStatusDto.getStatus()));
                        currentStatusDto.setStatus(nextStatusDto.getStatus());
                        currentStatusDto.setX2(nextStatusDto.getX2());
                    } else if (nextStatusDto.getX1() == currentStatusDto.getX1() && nextStatusDto.getX2() > currentStatusDto.getX2()) {
                        currentStatusDto.setStatus(nextStatusDto.getStatus());
                        currentStatusDto.setX2(nextStatusDto.getX2());
                    } else if (nextStatusDto.getX1() > currentStatusDto.getX1() && nextStatusDto.getX2() >= currentStatusDto.getX2()) {
                        currentStatusDto.setX2(nextStatusDto.getX1());
                        statusDtoListNew.add(new TimeDiagramStatusDto(nextStatusDto.getX1(), nextStatusDto.getX2(), nextStatusDto.getStatus()));
                    } else if (nextStatusDto.getX1() > currentStatusDto.getX1() && nextStatusDto.getX2() < currentStatusDto.getX2()) {
                        currentStatusDto.setX2(nextStatusDto.getX1());
                        statusDtoListNew.add(new TimeDiagramStatusDto(nextStatusDto.getX1(), nextStatusDto.getX2(), nextStatusDto.getStatus()));
                        statusDtoListOld.add(new TimeDiagramStatusDto(nextStatusDto.getX2(), currentStatusDto.getX2(), currentStatusDto.getStatus()));
                    }
                } else {
                    if (nextStatusDto.getX2() > currentStatusDto.getX2()) {
                        statusDtoListOld.add(new TimeDiagramStatusDto(currentStatusDto.getX2(), nextStatusDto.getX2(), nextStatusDto.getStatus()));
                    }
                }
            }
            statusDtoListOld.remove(0);
        }
        timeDiagramDto.setTotalWidth(x2);
        double pointRate = timeDiagramDto.getTotalWidth() / timeDiagramDto.getSmallWidth();
        List<TimeDiagramStatusDto> subStatusDtoList = new ArrayList<>();
        int lastStatus = 5;
        boolean isFirst = true;
        x1 = 0;
        for (double i = 0; i < timeDiagramDto.getSmallWidth(); i = i + timeDiagramDto.getMinPointNum()) {
            int netStatus = 5;
            for (int j = 1; j < list.size(); j++) {
                if (i >= 448) {
                    System.out.println(111);
                }
                int tmpStatus = getPointStatus(lineArray.get(j), i * pointRate, (i + timeDiagramDto.getMinPointNum()) * pointRate - 1);
                if (tmpStatus < netStatus) {
                    netStatus = tmpStatus;
                }
            }
            if (!isFirst) {
                if (lastStatus != netStatus) {
                    subStatusDtoList.add(new TimeDiagramStatusDto(x1, x2, lastStatus));
                    lastStatus = netStatus;
                    x1 = i;
                }
            } else {
                lastStatus = netStatus;
                isFirst = false;
            }
            x2 = i + timeDiagramDto.getMinPointNum() - 1;
        }
        subStatusDtoList.add(new TimeDiagramStatusDto(x1, x2, lastStatus));
        List<List<TimeDiagramStatusDto>> lineArray = new ArrayList();
        lineArray.add(statusDtoList);
        lineArray.add(statusDtoListNew);
        List<TimeDiagramStatusDto> parentStatusDtoList = new ArrayList<>();
        lastStatus = 5;
        isFirst = true;
        x1 = 0;
        for (double i = 0; i < timeDiagramDto.getSmallWidth(); i = i + timeDiagramDto.getMinPointNum()) {
            if (i >= 448) {
                System.out.println(111);
            }
            int netStatus = getPointStatus(lineArray.get(0), i * pointRate, (i + timeDiagramDto.getMinPointNum()) * pointRate - 1);
            if (!isFirst) {
                if (lastStatus != netStatus) {
                    parentStatusDtoList.add(new TimeDiagramStatusDto(x1, x2, lastStatus));
        List<List<TimeDiagramStatusDto>> smallStatusDtoList = new ArrayList<>();
        for (int j = 0; j < lineArray.size(); j++) {
            List<TimeDiagramStatusDto> tmpStatusDtoList = new ArrayList<>();
            int lastStatus = 5;
            Boolean isFirst = true;
            x1 = 0;
            for (double i = 0; i < timeDiagramDto.getSmallWidth(); i = i + timeDiagramDto.getMinPointNum()) {
                int netStatus = getPointStatus(lineArray.get(j), i * pointRate, (i + timeDiagramDto.getMinPointNum()) * pointRate - 1);
                if (!isFirst) {
                    if (lastStatus != netStatus) {
                        tmpStatusDtoList.add(new TimeDiagramStatusDto(x1, x2, lastStatus));
                        lastStatus = netStatus;
                        x1 = i;
                    }
                } else {
                    lastStatus = netStatus;
                    x1 = i;
                    isFirst = false;
                }
            } else {
                lastStatus = netStatus;
                isFirst = false;
                x2 = i + timeDiagramDto.getMinPointNum() - 1;
            }
            x2 = i + timeDiagramDto.getMinPointNum() - 1;
            tmpStatusDtoList.add(new TimeDiagramStatusDto(x1, x2, lastStatus));
            smallStatusDtoList.add(tmpStatusDtoList);
        }
        parentStatusDtoList.add(new TimeDiagramStatusDto(x1, x2, lastStatus));
        JSONObject jsonObject2 = new JSONObject(modelStr2);
        JSONArray jsonArray2 = jsonObject2.getJSONArray("cells");
        List<List<TimeDiagramStatusDto>> smallStatusDtoList = new ArrayList<>();
        smallStatusDtoList.add(parentStatusDtoList);
        smallStatusDtoList.add(subStatusDtoList);
        y = 10;
        for (int i = 0; i < smallStatusDtoList.size(); i++) {
            for (TimeDiagramStatusDto status : smallStatusDtoList.get(i)) {
@@ -606,16 +618,20 @@
    }
    @Transactional(rollbackFor = Exception.class)
    public Result simulate(SimulatAssess simulatAssess) {
        Result result = null;
    public List<TaskModelCheckResultDto> simulateChecK(SimulatAssess simulatAssess) {
        List<TaskModelCheckResultDto> result = null;
        // 1. æ£€æŸ¥æ¨¡åž‹å®Œæ•´æ€§
        List<TaskModelCheckResultDto> chkResult = taskService.checkTaskModel(simulatAssess.getProductId(),
                simulatAssess.getTaskModelId());
        if (chkResult.size() > 0) {
            result = Result.ok(chkResult);
            return result;
            return chkResult;
        }
        return result;
    }
    @Transactional(rollbackFor = Exception.class)
    public Boolean simulate(SimulatAssess simulatAssess) {
        Boolean result = false;
        // 2. ç»„装供算法库仿真的模型xml
        assembleModelXml(simulatAssess);
@@ -625,8 +641,8 @@
        return result;
    }
    private Result callReliaSimLib(SimulatAssess simulatAssess) {
        Result result = null;
    private Boolean callReliaSimLib(SimulatAssess simulatAssess) {
        Boolean result = false;
        InputStream is = null;
        BufferedReader br = null;
        try {
@@ -658,7 +674,7 @@
                ReliaSimLibResult rtn = com.alibaba.fastjson.JSONObject.parseObject(line, ReliaSimLibResult.class);
                if ("0".equals(rtn.getCode())) {
                    logger.info("启动可靠性仿真评估算法库成功。");
                    result = Result.ok();
                    result = true;
                } else {
                    String errorMsg = rtn.getErrorMsg();
                    throw new RenException("启动可靠性仿真评估算法库失败: errorMsg=" + errorMsg);
@@ -720,6 +736,9 @@
        List<ParamData> paramDataList = paramDataDao.getDeviceParams(productId);
        Long taskId = simulatAssess.getTaskModelId();
        Task task = taskService.get(taskId);
        if (simulatAssess.getTaskDuration() != null) {
            task.setTaskDuration(simulatAssess.getTaskDuration());
        }
        List<TaskBinoParam> binoParams = taskBinoParamDao.getBinoParams(taskId);
        // 1. è®¡ç®—各任务阶段的运行时长
@@ -1249,43 +1268,55 @@
        }
    }
    public SchemeComparDto SchemeCompar(String[] taskList, Long showProductId) {
        SchemeComparDto dto = new SchemeComparDto();
    public SimulatResult SchemeCompar(String[] taskList, Long showProductId, Integer samplPeriod, Integer simulatFrequency) {
        SimulatResult simulatResult = new SimulatResult();
        List<Long> idList = new ArrayList<>();
        List<TaskModelCheckResultDto> result = null;
/*        SchemeComparDto dto = new SchemeComparDto();
        List<SimulaDataDto> dataDtoList = new ArrayList<>();
        List<SchemeComparCurve> curveList = new ArrayList<>();
        List<Double> xData = new ArrayList<>();
        SimulatAssess simulatAssess;
        SimulaDataDto data;
        SimulaDataDto data;*/
        List<SimulatAssess> simulatAssessList = new ArrayList<>();
        Task task;
        double maxTaskDuration = 0.0;
        for (String taskId : taskList) {
            Long taskModelId = Long.parseLong(taskId);
            task = taskService.get(taskModelId);
            simulatAssess = this.getByTaskId(taskModelId);
            SimulaDataDto resultData;
            if (showProductId != null) {
                simulatAssess.setProductId(showProductId);
                resultData = this.getResultXML(simulatAssess);
            } else {
                resultData = this.getResultXML(simulatAssess);
            task = taskService.get(Long.parseLong(taskId));
            if (task.getTaskDuration() > maxTaskDuration) {
                maxTaskDuration = task.getTaskDuration();
            }
            data = resultData;
            data.setName(task.getTaskName());
            dataDtoList.add(data);
            xData = resultData.getCurveParam().getXData();
            SimulatAssess simulatAssess = new SimulatAssess();
            Long id = UUIDUtil.generateId();
            simulatAssess.setId(id);
            simulatAssess.setName("");
            simulatAssess.setProductId(showProductId);
            simulatAssess.setSamplPeriod(samplPeriod);
            simulatAssess.setSimulatFrequency(simulatFrequency);
            simulatAssess.setTaskDuration(maxTaskDuration);
            simulatAssess.setTaskModelId(Long.parseLong(taskId));
            SchemeComparCurve curve = new SchemeComparCurve();
            curve.setName(task.getTaskName());
            curve.setSmooth(true);
            curve.setType("line");
            curve.setData(resultData.getCurveParam().getYData());
            curveList.add(curve);
            simulatAssessList.add(simulatAssess);
            result = simulateChecK(simulatAssess);
            if (result!=null){
                simulatResult.setType("errorList");
                simulatResult.setErrList(result);
                return simulatResult;
            }
            idList.add(id);
        }
        dto.setXDataList(xData);
        dto.setDataList(dataDtoList);
        dto.setCurveList(curveList);
        return dto;
        for (SimulatAssess simulatAssess : simulatAssessList) {
            simulatAssess.setTaskDuration(maxTaskDuration);
            this.simulate(simulatAssess);
        }
        simulatResult.setType("idList");
        simulatResult.setIdList(idList);
        return simulatResult;
    }
    public SimulaDataDto getResultXML(SimulatAssess simulatAssess) {
@@ -1372,4 +1403,134 @@
        }
        return data;
    }
    public String verify(Long taskId) {
        StringBuilder result = new StringBuilder();
        Task task = taskService.get(taskId);
        double taskTime = task.getTaskDuration();
        List<OperatConditModel> list = baseDao.getModel(taskId);
        List<Double> reliabiyList = new ArrayList<>();
        String modelStr2 = "";
        for (OperatConditModel model : list) {
            if (model.getProductId().equals(task.getProductId())) {
                modelStr2 = model.getContent();
                continue;
            }
            List<verifyDto> listNodes = baseDao.getNode(model.getModelId());
            for (verifyDto node : listNodes) {
                //lmd,reliabiy,failRate
                double lmd = 1 / node.getMtbf();
                double reliabiy = Math.exp(-1 * lmd * taskTime);
                double failRate = 1 - reliabiy;
                node.setLmd(lmd);
                node.setReliabiy(reliabiy);
                node.setFailRate(failRate);
            }
            int total = listNodes.size();
            String modelStr = model.getContent();
            //找到表决数量
            if (modelStr.contains("switch")) {
                double a = 0;
                double lmd = listNodes.get(0).getLmd();
                result.append("\n").append(total).append("个相同设备旁联,3选1,MTTBCF是").append(listNodes.get(0).getMtbf()).append("\n");
                for (int i = 0; i <= total - 1; i++) {
                    double ijc = getjc(i);
                    double b = Math.pow(taskTime * lmd, i) * Math.exp(-1 * lmd * taskTime) / ijc;
                    a = a + b;
                    result.append("有").append(i + 1).append("个设备好的的概率为").append(b).append("\n");
                }
                result.append("整个旁联系统的可靠度为").append(new Formatter().format("%.4f", a)).append("\n");
                reliabiyList.add(a);
            } else if (modelStr.contains("parallel")) {
                double a = 1;
                result.append("\n并联设备有").append(total).append("个\n");
                for (int i = 0; i < listNodes.size(); i++) {
                    a = a * listNodes.get(i).getFailRate();
                    result.append("第").append(i + 1).append("个设备的MTBCF为").append(listNodes.get(i).getMtbf()).append(",").append(i + 1).append("个设备并联的失效率为").append(a).append("\n");
                }
                double reliabiy = 1 - a;
                result.append("整个并联系统的失效率为").append(a).append("整个并联系统的可靠度为").append(new Formatter().format("%.4f", reliabiy)).append("\n");
                reliabiyList.add(reliabiy);
            } else if (modelStr.contains("vote")) {
                Integer voteNum = baseDao.getVoteNum(model.getModelId());
                if (voteNum != null) {
                    result.append("\n").append(total).append("个相同设备表决,MTBCF为").append(listNodes.get(0).getMtbf()).append("表决数量为").append(voteNum).append("个\n");
                    double a = 0;
                    double zjc = getjc(total);
                    double reliabiy = listNodes.get(0).getReliabiy();
                    for (int i = voteNum; i <= total; i++) {
                        double ijc = getjc(i);
                        double nijc = getjc(total - i);
                        double b = (zjc / (ijc * nijc)) * Math.pow(reliabiy, i) * Math.pow(1 - reliabiy, total - i);
                        a = a + b;
                        result.append("有").append(i).append("个设备是好的概率为").append(b).append("\n");
                    }
                    result.append("整个表决系统的可靠度为").append(new Formatter().format("%.4f", a)).append("\n");
                    reliabiyList.add(a);
                }
            }
        }
        double totalReliabiy = 1;
        if (modelStr2.contains("parallel")) {
            for (Double reliabiy : reliabiyList) {
                totalReliabiy = totalReliabiy * (1 - reliabiy);
            }
            totalReliabiy = 1 - totalReliabiy;
        } else {
            for (Double reliabiy : reliabiyList) {
                totalReliabiy = totalReliabiy * reliabiy;
            }
        }
        result.append("\n整个总体系统的可靠度为").append(totalReliabiy).append("\n");
        return String.valueOf(result);
    }
    Double getjc(int a) {
        double result = 1.0;
        for (int i = a; i > 0; i--)
            result = result * i;
        return result;
    }
    public SchemeComparDto getEcharts(String[] taskList, Long showProductId) {
        SchemeComparDto dto = new SchemeComparDto();
        List<SimulaDataDto> dataDtoList = new ArrayList<>();
        List<SchemeComparCurve> curveList = new ArrayList<>();
        List<Double> xData = new ArrayList<>();
        SimulatAssess simulatAssess;
        SimulaDataDto data;
        Task task;
        for (String taskId : taskList) {
            Long taskModelId = Long.parseLong(taskId);
            task = taskService.get(taskModelId);
            simulatAssess = this.getByTaskId(taskModelId);
            simulatAssess.setDataType("fz");
            SimulaDataDto resultData;
            if (showProductId != null) {
                simulatAssess.setProductId(showProductId);
                resultData = this.getResultXML(simulatAssess);
            } else {
                resultData = this.getResultXML(simulatAssess);
            }
            data = resultData;
            data.setName(task.getTaskName());
            dataDtoList.add(data);
            xData = resultData.getCurveParam().getXData();
            SchemeComparCurve curve = new SchemeComparCurve();
            curve.setName(task.getTaskName());
            curve.setSmooth(true);
            curve.setType("line");
            curve.setData(resultData.getCurveParam().getYData());
            curveList.add(curve);
        }
        dto.setXDataList(xData);
        dto.setDataList(dataDtoList);
        dto.setCurveList(curveList);
        return dto;
    }
}
modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml
@@ -73,7 +73,8 @@
               p.repair_mttcr               as repairMttcr,
               p.repair_mttcr_other_params2 as repairMttcrOtherParams2,
               p.repair_mttcr_other_params3 as repairMttcrOtherParams3,
               p.task_mtbcf_regul_succ_rate as success_rate
               p.task_mtbcf_regul_succ_rate as success_rate,
               p.basic_unit_num             as basicUnitNum
        FROM product_model a
                 left join sys_dict_data d on d.DICT_VALUE = a.product_type and dict_type_id = '1728965873022050306'
                 left join param_data p on p.product_id = a.id
@@ -151,6 +152,38 @@
    <select id="getByPid" resultType="java.lang.Long">
        select id
        from product_model
        where IS_DELETE=0 and PID=${id}
        where IS_DELETE = 0
          and PID = ${id}
    </select>
    <select id="getProductByShip" resultType="com.zt.life.modules.mainPart.basicInfo.dto.ProductDto">
        select a.id,
               a.pid,
               a.name,
               a.product_type,
               a.name_path,
               a.same_sb_name,
               a.equip_type,
               b.reliab_distrib_type,
               b.basic_join_compute,
               b.basic_mtbf_regulate,
               b.basic_mtbf_regul_succ_rate,
               b.basic_mtbf_operating_ratio,
               b.task_mtbcf_regulate,
               b.task_mtbcf_other_params2,
               b.task_mtbcf_other_params3,
               b.task_mtbcf_regul_succ_rate,
               b.task_mtbcf_operating_ratio,
               b.repairable,
               b.repair_distrib_type,
               b.repair_mttcr,
               b.repair_mttcr_other_params2,
               b.repair_mttcr_other_params3
        from product_model a,
             param_data b
        where a.IS_DELETE = 0
          and b.IS_DELETE = 0
          and a.ship_id = ${shipId}
          AND a.id &lt;&gt; a.ship_id
          and a.id = b.product_id
    </select>
</mapper>
modules/mainPart/src/main/resources/mapper/taskReliability/SimulatAssessDao.xml
@@ -186,4 +186,48 @@
        order by CREATE_DATE desc
        limit 1
    </select>
    <select id="getModel" resultType="com.zt.life.modules.mainPart.taskReliability.model.OperatConditModel">
        SELECT d.product_id,
               d.model_id,
               e.content
        FROM task a,
             task_phase b,
             `task_phase_model` c,
             operat_condit_model d,
             model_rbd e
        WHERE a.id = ${taskId}
          AND a.IS_DELETE = 0
          AND b.task_id = a.id
          AND b.IS_DELETE = 0
          AND c.phase_id = b.id
          AND c.operat_condit_duration_rate > 0
          AND c.IS_DELETE = 0
          AND d.operat_condit_id = c.operat_condit_id
          AND d.IS_DELETE = 0
          AND e.id = d.model_id
          AND e.IS_DELETE = 0
    </select>
    <select id="getNode" resultType="com.zt.life.modules.mainPart.taskReliability.dto.verifyDto">
        SELECT c.`NAME`,
               c.id,
               b.task_mtbcf_regulate as mtbf
        FROM `model_rbd_node` a,
             param_data b,
             product_model c
        WHERE a.node_id = c.id
          and a.model_id = ${modelId}
          AND c.id = b.product_id
          AND a.is_delete = 0
          AND b.is_delete = 0
          AND c.is_delete = 0
    </select>
    <select id="getVoteNum" resultType="java.lang.Integer">
        select vote_num
        from algorithm
        where is_delete = 0
          and model_id = ${modelId}
          and model_type = 'vote'
          and vote_num is not null
        limit 1
    </select>
</mapper>
modules/mainPart/src/main/resources/²úÆ·½á¹¹Ê÷µ¼³öÄ£°å.xlsx
Binary files differ
web/public/²úÆ·½á¹¹Ê÷µ¼ÈëÄ£°å.xlsx
Binary files differ
web/src/views/modules/basicInfo/ParamData.vue
@@ -120,12 +120,12 @@
                         <span v-else v-text="scope.row.basicMtbfAcceptSuccRate"></span>
                       </template>
                     </el-table-column>-->
              <!--      <el-table-column prop="basicUnitNum" label="单元数量" :key="11" width="100" align="center">
                    <el-table-column prop="basicUnitNum" label="单元数量" :key="11" width="100" align="center">
                      <template slot-scope="scope">
                        <el-input v-if="scope.row.isEdit" v-model="scope.row.basicUnitNum"></el-input>
                        <span v-else v-text="scope.row.basicUnitNum"></span>
                      </template>
                    </el-table-column>-->
                    </el-table-column>
                    <el-table-column prop="basicRunsNum" label="运行次数" :key="12" width="100" align="center">
                      <template slot-scope="scope">
                        <el-input v-if="scope.row.isEdit" v-model="scope.row.basicRunsNum"></el-input>
web/src/views/modules/basicInfo/XhProductModel.vue
@@ -69,6 +69,7 @@
  import Cookies from "js-cookie";
  import TyProductModel from "./TyProductModel-AddOrUpdate";
  import ProductImport from "./ProductImport";
  import qs from 'qs'
  export default {
    data() {
@@ -81,7 +82,8 @@
          type: '',
          pid: '',
          srcId: '',
        }
        },
        productType:''
      }
    },
    components: {
@@ -146,10 +148,15 @@
        this.$refs.ProductImport.$refs.dialog.init(row)
      },
      async exportData(row) {
        let params = {
          shipId:row.id
        }
        let res = await this.$http.get(`/basicInfo/XhProductModel/exportData`,{params:params})
        console.log(row)
        let params = qs.stringify({
          'token': Cookies.get('token'),
          shipId:row.id,
          fileName:row.name
        })
        let apiURL = `/basicInfo/XhProductModel/exportData`
        window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}`
      },
web/src/views/modules/taskReliability/RBD-edit-img.vue
@@ -514,6 +514,7 @@
    },
    data() {
      return {
        canAdd: true,
        nodeX: '',
        nodeY: '',
        isFirstLoad: true,
@@ -905,26 +906,46 @@
        })
        this.graph.centerContent()
        const stencil = new Addon.Stencil({
          getDragNode: (node) => node.clone({keepId: true}),
          //getDragNode: (node) => node.clone({keepId: true}),
          getDropNode: (node) => {
            this.canAdd = true
            const {width, height} = node.size()
            if (node.getData().type && node.getData().nodeType === 'dashedBox') {
              return node.clone().size(60, 40)
            }
            if (node.getData().type && node.getData().type === 'imageNodes2') {
              return node.clone({keepId: true})
            } else {
              return node.clone()
            }
          },
          validateNode: (node) => {
            const existingNodes = this.graph.getNodes(); // èŽ·å–ç”»å¸ƒä¸Šæ‰€æœ‰èŠ‚ç‚¹
            for (const existingNode of existingNodes) {
              if (existingNode.id === node.id) {
                this.$message({message: '该设备节点已在画布上,无法再次绘制', type: 'warning'})
                return false; // å–消添加节点操作
              const nodes = this.graph.getNodes()
              let deviceNoArr = []
              // æ£€æŸ¥é™¤å½“前节点之外的所有节点的包围框是否相交
              for (const node2 of nodes) {
                console.log(node2, 'saveDiagram node')
                if (node2.getData().nodeType == 'node' && node2.getData().dataId) {
                  if (node2.getData().dataId == node.getData().dataId) {
                    deviceNoArr.push(node2.getData().deviceNo)
                  }
                }
              }
              let no = 0
              console.log(node, 'node')
              console.log(deviceNoArr, 'deviceNoArr')
              for (let i = 1; i <= node.getData().basicUnitNum; i++) {
                if (deviceNoArr.findIndex(item => item === i) === -1) {
                  no = i
                  node.getData().deviceNo = i
                  node.attr('text/text', node.attr('text/text') + '-' + i)
                  break
                }
              }
              if (no === 0) {
                this.canAdd = false
              }
            }
            return node.clone()
          },
          validateNode: (node) => {
            if (!this.canAdd) {
              this.$message({message: '该设备节点已在画布上,无法再次绘制', type: 'warning'})
              return false
            }
          },
          title: '',
          target: this.graph,
@@ -1003,10 +1024,12 @@
            //imageUrl: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=${item.imgPath}`,
            width: 60,
            height: 60,
            id: item.dataId, // æ‰‹åŠ¨è®¾ç½®èŠ‚ç‚¹çš„ ID
            //id: item.dataId, // æ‰‹åŠ¨è®¾ç½®èŠ‚ç‚¹çš„ ID
            data: {
              type: 'imageNodes2',
              dataId: item.dataId,
              basicUnitNum: item.basicUnitNum,
              deviceNo: 0,
              nodeType: item.nodeType,
              nodeTypeExt: item.nodeTypeExt,
              productType: item.productType,
@@ -1174,7 +1197,7 @@
          }
          const nodeType = node.getData().nodeType; // èŽ·å–èŠ‚ç‚¹çš„ç±»åž‹
          const nodeObj = node
          console.log(123)
          console.log(node.id, 'node.id')
          let intersectNode = this.findIntersectsNode(node)
          if (intersectNode) { // å½“有节点相交 ==>并行
            this.addBranch(intersectNode, nodeObj)
@@ -1941,12 +1964,12 @@
      createParallelBrach(x, y, dragNode) {
        dragNode.position(x + 320, y - dragNode.size().height / 2)
        const connectNode = this.createConnectNode(x + 50, y)
        this.createBrach(dragNode,connectNode,x,y-50)
        this.createBrach(dragNode,connectNode,x,y+50)
        this.createBrach(dragNode, connectNode, x, y - 50)
        this.createBrach(dragNode, connectNode, x, y + 50)
        return {newStartNode: connectNode, newEndNode: dragNode}
      },
      createBrach(dragNode,connectNode,x,y){
      createBrach(dragNode, connectNode, x, y) {
        const dashedBox = this.createDashedBox(x + 150, y)
        dragNode.setData({startNodeId: connectNode.id})
@@ -1956,7 +1979,7 @@
          router: {
            name: 'manhattan',
            args: {
              startDirections: ['top','bottom'], // ä»Žä¸‹æ–¹å¼€å§‹
              startDirections: ['top', 'bottom'], // ä»Žä¸‹æ–¹å¼€å§‹
              endDirections: ['left'],      // å‘左方结束
            },
          },
@@ -1970,7 +1993,7 @@
            name: 'manhattan',
            args: {
              startDirections: ['right'], // ä»Žä¸‹æ–¹å¼€å§‹
              endDirections: ['top','bottom'],      // å‘左方结束
              endDirections: ['top', 'bottom'],      // å‘左方结束
            },
          },
          connector: {name: 'rounded'},
web/src/views/modules/taskReliability/SchemeCompar.vue
@@ -9,10 +9,21 @@
          <zt-select style="width: 400px" v-model="dataForm.taskModelId" :datas="schemeList"
                     @change="onTaskSelected" :multiple="true"/>
        </zt-form-item>
        <zt-form-item label="时间分片" prop="samplPeriod">
          <el-input type="number" :min="1" v-model="dataForm.samplPeriod">
            <template slot="append">分钟</template>
          </el-input>
        </zt-form-item>
        <zt-form-item label="仿真次数" prop="simulatFrequency">
          <el-input type="number" :min="1" v-model="dataForm.simulatFrequency">
            <template slot="append">次数</template>
          </el-input>
        </zt-form-item>
        <zt-form-item>
          <zt-button @click="compair()">方案对比</zt-button>
        </zt-form-item>
      </el-form>
      <el-progress v-if="isShow" :percentage="percentage"></el-progress>
      <el-col :span="4">
        <div style="margin-right: 5px;height: calc(100vh - 230px)" v-if="isSelect">
          <product-model-tree @on-selected="onTreeSelected" showXdy="false"
@@ -21,7 +32,7 @@
      </el-col>
      <el-col :span="20">
        <div class="fa-card-a" style="position: relative;height: calc(100vh - 230px)">
          <div v-if="isShow">
          <div v-if="Show">
            <el-button v-if="isZk" type="info" size="small" icon="el-icon-caret-bottom"
                       style="position: absolute;right: 10%;top: 9%;z-index: 1" @click="zk()"></el-button>
            <el-button v-if="!isZk" type="info" size="small" icon="el-icon-caret-right"
@@ -39,7 +50,7 @@
                  width="100px"
                  align="right">
                  <template slot-scope="scope">
                    <span>{{  keepNumber(scope.row.mtbf) }}</span>
                    <span>{{  keepNumberBy2(scope.row.mtbf) }}</span>
                  </template>
                </el-table-column>
                <el-table-column
@@ -48,7 +59,7 @@
                  width="100px"
                  align="right">
                  <template slot-scope="scope">
                    <span>{{  keepNumber(scope.row.mttr) }}</span>
                    <span>{{  keepNumberBy2(scope.row.mttr) }}</span>
                  </template>
                </el-table-column>
                <el-table-column
@@ -57,7 +68,7 @@
                  width="100px"
                  align="right">
                  <template slot-scope="scope">
                    <span>{{  keepNumber(scope.row.mttr) }}</span>
                    <span>{{  keepNumberBy4(scope.row.msr) }}</span>
                  </template>
                </el-table-column>
              </el-table>
@@ -69,6 +80,24 @@
        </div>
      </el-col>
    </el-row>
    <el-dialog v-dialogDrag :close-on-click-modal="false" top="8vh" :visible.sync="dialogVisible" title="模型检查"
               width="60%" @close="dialogVisible = false">
      <el-tag type="danger" style="margin-bottom: 10px">模型定义/参数配置里存在以下问题:</el-tag>
      <el-table :data="modelCheckResult" height="350"
                :header-cell-style="{'text-align':'center'}">
        <el-table-column prop="category" label="检查结果" align="center" width="150"/>
        <el-table-column prop="taskName" label="任务名称" align="center"/>
        <el-table-column prop="taskPhaseName" label="任务阶段名称" align="center"/>
        <el-table-column prop="gkName" label="工况名称" align="center"/>
        <el-table-column prop="nodeName" label="节点名称" align="center"/>
        <el-table-column prop="modelName" label="模型名称" align="center"/>
        <el-table-column prop="deviceName" label="设备名称" align="center"/>
        <el-table-column prop="paramName" label="参数名称" align="center"/>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="dialogVisible = false">关 é—­</el-button>
      </div>
    </el-dialog>
  </div>
</template>
@@ -83,6 +112,7 @@
        myChartStyle: {float: "left", width: "100%", height: "600px"}, //图表样式
        isSelect: false,
        isShow: false,
        Show: false,
        isZk: true,
        productList: [],
        schemeList: [],
@@ -92,20 +122,32 @@
          productId: '',
          showProductId: '',
          dataType: 'fz',
          samplPeriod: '10',
          simulatFrequency: 500,
        },
        percentage: 2,
        xDataList: [],
        seriesList: [],
        tableData: [],
        taskList: [],
        fzIdList: [],
        dialogVisible: false,
        modelCheckResult: [],
      }
    },
    mounted() {
      this.getProductList()
    },
    computed: {
      keepNumber() { //过滤器保留4为小数
      keepNumberBy4() { //过滤器保留4为小数
        return function (val) {        // å¯¹è®¡ç®—属性进行传参
          const numM = Number(val).toFixed(5);
          return numM.substring(0, numM.length - 1);
        }
      },
      keepNumberBy2() { //过滤器保留4为小数
        return function (val) {        // å¯¹è®¡ç®—属性进行传参
          const numM = Number(val).toFixed(3);
          return numM.substring(0, numM.length - 1);
        }
      },
@@ -113,7 +155,13 @@
    components: {
      ProductModelTree,
    },
    watch: {
      percentage() {
        if (this.percentage === 100) {
          this.getEcharts();
        }
      }
    },
    methods: {
      onTreeSelected(data) {
        if (this.dataForm.taskModelId.length > 0) {
@@ -121,7 +169,7 @@
          console.log(data, 'onProductSelected')
          this.dataForm.showProductId = data.id
          this.$nextTick(() => {
            this.compair()
            this.getEcharts()
          })
        }
      },
@@ -157,19 +205,59 @@
        console.log(res.data)
        this.schemeList = res.data
      },
      getStroke() {
        if (this.percentage < 100) {
          let param = {
            taskList: this.fzIdList
          }
          this.$http.get(`/taskReliability/SimulatAssess/getCalcProgress`, {params: param}).then(
            res => {
              if (res.data) {
                this.percentage = parseFloat(res.data)
              }
            }
          )
        } else {
          clearInterval(this.timers)
          this.percentage = 0
        }
      },
      async compair() {
        this.isShow = true
        this.dialogVisible = false
        this.modelCheckResult = []
        let params = {
          taskList: this.dataForm.taskModelId,
          showProductId: this.dataForm.productId,
          samplPeriod: this.dataForm.samplPeriod,
          simulatFrequency: this.dataForm.simulatFrequency
        }
        console.log(this.dataForm.taskModelId, 'this.dataForm.taskModelId')
        let res = await this.$http.get('/taskReliability/SimulatAssess/SchemeCompar', {params: params})
        console.log(res.data, "res")
        if (res.success) {
          if (res.data.type=="errorList") {
            this.modelCheckResult = res.data.errList
            this.dialogVisible = true
            this.isShow = false
          } else {
            this.fzIdList = res.data.idList
            this.timers = window.setInterval(this.getStroke, 1000)
          }
        }
      },
      async getEcharts() {
        let params = {
          taskList: this.dataForm.taskModelId,
          showProductId: this.dataForm.showProductId
        }
        console.log(this.dataForm.taskModelId, 'this.dataForm.taskModelId')
        let res = await this.$http.get('/taskReliability/SimulatAssess/SchemeCompar', {params: params})
        let res = await this.$http.get('/taskReliability/SimulatAssess/getEcharts', {params: params})
        console.log(res.data, "res")
        this.xDataList = res.data.xdataList
        this.seriesList = res.data.curveList
        this.tableData = res.data.dataList
        this.isShow = true
        this.Show = true
        this.option = {
          xAxis: {
            data: this.xDataList,
web/src/views/modules/taskReliability/SimulatAssess.vue
@@ -35,9 +35,9 @@
            </div>
          </el-col>
    </el-row>
    <el-dialog :close-on-click-modal="false" :visible.sync="dialogVisible" title="模型检查" width="60%" @close="dialogVisible = false">
      <el-tag type="danger">模型定义/参数配置里存在以下问题:</el-tag>
      <el-table :data="modelCheckResult" height="100px" v-adaptive="{bottomOffset:30}"
    <el-dialog v-dialogDrag :close-on-click-modal="false" top="8vh" :visible.sync="dialogVisible" title="模型检查" width="60%" @close="dialogVisible = false">
      <el-tag type="danger" style="margin-bottom: 10px">模型定义/参数配置里存在以下问题:</el-tag>
      <el-table :data="modelCheckResult" height="350"
                :header-cell-style="{'text-align':'center'}">
        <el-table-column prop="category" label="检查结果" align="center" width="150"/>
        <el-table-column prop="taskName" label="任务名称" align="center"/>
@@ -115,6 +115,7 @@
        console.log(data, ' onProductSelected(data)')
        this.dataForm.productId = data.id
        this.getTaskList()
        this.dataForm.taskModelId = ''
        this.$nextTick(() => {
          this.$refs.ProductModelTree.getProductList()
        })
@@ -138,7 +139,10 @@
      },
      getStroke() {
        if (this.percentage < 100) {
          this.$http.get(`/taskReliability/SimulatAssess/getCalcProgress?taskId=${this.dataForm.id}`).then(
          let param = {
            taskList: [this.dataForm.id]
          }
          this.$http.get(`/taskReliability/SimulatAssess/getCalcProgress`, {params: param}).then(
            res => {
              if (res.data) {
                this.percentage = parseFloat(res.data)
@@ -159,7 +163,7 @@
        let res = await this.$http.post('/taskReliability/SimulatAssess/analyze', this.dataForm)
        if (res.success) {
          console.log(res.data)
          if (res.data != null && res.data.length > 0) {
          if (res.data && res.data.length > 0) {
            this.modelCheckResult = res.data
            this.dialogVisible = true
          } else {