Lius
2025-06-23 6877bf8d6020cfd3d787036e70de9b04c3eadeea
计算OEE任务调整
已修改1个文件
14 ■■■■■ 文件已修改
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcOeeInfoServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcOeeInfoServiceImpl.java
@@ -204,12 +204,10 @@
                    mdcOeeInfo.setTimeActuationRate(timeActuationRate);
                    // 有效运行时间 --- 按需求维护零件加工总时长||系统主轴负载时间
                    Integer effectiveRunLong = 0;
                    Integer totalProcessLong = mdcPartProcessInfoService.selectTotalProcessLong(equipmentId, validDate);
                    if (totalProcessLong == 0) {
                        //查询设备运行时间
                        effectiveRunLong = mdcEquipmentStatisticalInfoService.selectProcessLong(equipmentId, validDate.replace("-", ""));
                    } else {
                        effectiveRunLong = totalProcessLong;
//                    Integer totalProcessLong = mdcPartProcessInfoService.selectTotalProcessLong(equipmentId, validDate);
                    effectiveRunLong = mdcEquipmentStatisticalInfoService.selectProcessLong(equipmentId, validDate.replace("-", ""));
                    if (effectiveRunLong == null) {
                        effectiveRunLong = 0;
                    }
                    mdcOeeInfo.setEffectiveRunLong(effectiveRunLong);
                    // 性能开动率 --- 有效运行时间/开动时间
@@ -217,7 +215,7 @@
                    if (effectiveRunLong != 0 && actuateLong != 0) {
                        performanceRate = new BigDecimal(effectiveRunLong).divide(new BigDecimal(actuateLong), 4, RoundingMode.HALF_UP).multiply(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP);
                    }
                    mdcOeeInfo.setPerformanceRate(performanceRate);
                    mdcOeeInfo.setPerformanceRate(performanceRate.compareTo(new BigDecimal(100)) > 0 ? new BigDecimal(100) : performanceRate);
                    // 加工零件数量 --- 按维护数据统计当天
                    Integer processCount = mdcPartProcessInfoService.selectTotalProcessCount(equipmentId, validDate);
                    mdcOeeInfo.setProcessCount(processCount);
@@ -225,7 +223,7 @@
                    Integer passCount = mdcPartProcessInfoService.selectTotalPassCount(equipmentId, validDate);
                    mdcOeeInfo.setPassCount(passCount);
                    // 合格率 --- 合格数/加工数
                    BigDecimal passRate = BigDecimal.ONE;
                    BigDecimal passRate = new BigDecimal("100");
                    if (processCount != 0 && passCount != 0) {
                        passRate = new BigDecimal(passCount).divide(new BigDecimal(processCount), 4, RoundingMode.HALF_UP).multiply(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP);
                    }