jinlin
2024-10-23 567f923ff6b9147229def8562258493922232a33
关于修改可靠性产品重复
4个文件已修改
35 ■■■■ 已修改文件
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/dao/XhProductModelDao.java
@@ -45,4 +45,6 @@
    Long[] getByPid(Long id);
    List<ProductDto> getProductByShip(Long shipId);
    List<XhProductModel> getProductListByShip(Long productId, int level1, int level2);
}
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
@@ -102,10 +102,9 @@
                    productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE,
                            Constant.Bool.NO).lt("product_type", 5).ne("product_type", 1).and(wrapper -> wrapper.eq("ship_id", productId).or().eq("id", productId)).orderByAsc(Constant.TableColumn.SORT));
                } else if (ztShow == 5) {
                    List<XhProductModel> dbList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE,
                            Constant.Bool.NO).gt("product_type", 1).and(wrapper -> wrapper.eq("ship_id", productId).or().eq("id", productId)));
                    List<XhProductModel> dbList = baseDao.getProductListByShip(productId,2,5);
                    for (XhProductModel row : dbList) {
                        if (row.getSameSbNum() > 1) {
                        if (row.getSameSbNum()!=null && row.getSameSbNum() > 1) {
                            for (int i = 1; i <= row.getSameSbNum(); i++) {
                                try {
                                    XhProductModel newRow = row.clone();
@@ -325,6 +324,7 @@
                        ParamData itemEntity = new ParamData();
                        itemEntity.setShipId(shipId);
                        itemEntity.setProductId(curXtId);
                        itemEntity.setBasicUnitNum(1);
                        paramDataService.insert(itemEntity);
                    }
@@ -344,6 +344,7 @@
                        ParamData itemEntity = new ParamData();
                        itemEntity.setShipId(shipId);
                        itemEntity.setProductId(curFxtId);
                        itemEntity.setBasicUnitNum(1);
                        paramDataService.insert(itemEntity);
                    }
@@ -368,9 +369,9 @@
                    //绑定设备ID
                    itemEntity.setShipId(shipId);
                    itemEntity.setProductId(curSbId);
                    itemEntity.setBasicUnitNum(sameSbNum);
                    itemEntity.setReliabDistribType(reliabType.get(reliabDistribType));
                    itemEntity.setBasicJoinCompute(isOrNot.get(basicJoinCompute));
                    itemEntity.setBasicUnitNum(sameSbNum);
                    itemEntity.setBasicMtbfRegulate(basicMtbfRegulate);
                    itemEntity.setBasicMtbfRegulSuccRate(basicMtbfRegulSuccRate);
                    itemEntity.setBasicMtbfOperatingRatio(basicMtbfOperatingRatio);
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/taskReliability/service/SimulatAssessService.java
@@ -354,9 +354,9 @@
                        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()));
                        currentStatusDto.setX2(nextStatusDto.getX1());
                    }
                } else {
                    if (nextStatusDto.getX1() >= currentStatusDto.getX2()) {
@@ -1193,10 +1193,10 @@
        return failureModel;
    }
    private boolean isRepairDirac(boolean repairDiracFlag, TaskPhaseModel taskPhaseModel, Long productId) {
    private boolean isRepairDirac(Boolean repairDiracFlag, TaskPhaseModel taskPhaseModel, Long productId) {
        boolean result = false;
        if (repairDiracFlag) {
        if (repairDiracFlag != null && repairDiracFlag) {
            if (taskPhaseModel.getPhaseConstraints() == null) {
                result = true;
            } else {
modules/mainPart/src/main/resources/mapper/basicInfo/XhProductModelDao.xml
@@ -65,7 +65,7 @@
               ''                           as statusImg,
               d.dict_code                  as productType,
               p.repairable                 as isRepair,
               p.task_mtbcf_accept          as taskMtbcf,
               p.task_mtbcf_regulate        as taskMtbcf,
               p.task_mtbcf_other_params2   as taskMtbcfOtherParams2,
               p.task_mtbcf_other_params3   as taskMtbcfOtherParams3,
               p.reliab_distrib_type        as reliabDistribType,
@@ -186,4 +186,20 @@
          AND a.id &lt;&gt; a.ship_id
          and a.id = b.product_id
    </select>
    <select id="getProductListByShip" resultType="com.zt.life.modules.mainPart.basicInfo.model.XhProductModel">
        select a.*, b.basic_unit_num as sameSbNum
        from product_model a,
             param_data b
        where a.IS_DELETE = 0 and b.IS_DELETE = 0
          and a.id = b.product_id
        <if test="productId !=null">
            and a.ship_id = #{productId}
        </if>
        <if test="level1 !=null">
            and a.product_type &gt;= #{level1}
        </if>
        <if test="level2 !=null">
            and a.product_type &lt;= #{level2}
        </if>
    </select>
</mapper>