| | |
| | | Integer passCount = mdcJcRcJobreportService.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); |
| | | } |
| | |
| | | // OEE --- 时间开动率 * 性能开动率 * 一次合格率 |
| | | BigDecimal oee = BigDecimal.ZERO; |
| | | if (!timeActuationRate.equals(BigDecimal.ZERO) && !performanceRate.equals(BigDecimal.ZERO) && !passRate.equals(BigDecimal.ZERO)) { |
| | | oee = timeActuationRate.multiply(performanceRate).multiply(passRate).divide(new BigDecimal("10000"), 4, RoundingMode.HALF_UP); |
| | | oee = timeActuationRate.multiply(performanceRate).multiply(passRate).divide(new BigDecimal("1000000"), 4, RoundingMode.HALF_UP); |
| | | } |
| | | mdcOeeInfo.setOee(oee); |
| | | result.add(mdcOeeInfo); |