| | |
| | | import com.qianwen.smartman.modules.mdc.enums.ProductivityTypeEnum; |
| | | import com.qianwen.smartman.modules.mdc.enums.RpsTypeEnum; |
| | | |
| | | /** |
| | | * 效率计算 |
| | | */ |
| | | public class EifficiencyUtils { |
| | | public static Double openShiftTypeCalculationResults(List<SuperAggregateState> superAggregateStates, ProductivityTypeEnum productivityType) { |
| | | Double v; |
| | |
| | | return v; |
| | | } |
| | | |
| | | /** |
| | | * 计算运行率? |
| | | * @param originalData |
| | | * @return |
| | | */ |
| | | public static Double calculationRunning(List<SuperAggregateState> originalData) { |
| | | List<SuperAggregateState> originalData2 = FilterOffUtils.filterOffDay(originalData, OpenTypeEnums.RUNNING); |
| | | double result = 0.0d; |
| | |
| | | return Double.valueOf(result); |
| | | } |
| | | |
| | | /** |
| | | * 计算报警率 |
| | | * @param originalData |
| | | * @return |
| | | */ |
| | | public static Double calculationAlarm(List<SuperAggregateState> originalData) { |
| | | List<SuperAggregateState> originalData2 = FilterOffUtils.filterOffDay(originalData, OpenTypeEnums.ALARM); |
| | | double result = 0.0d; |
| | | if (Func.isNotEmpty(originalData2)) { |
| | | //总时间 |
| | | double sum = originalData2.stream().mapToDouble((v0) -> { |
| | | return v0.getDurationCollect(); |
| | | }).sum(); |
| | |
| | | return Double.valueOf(result); |
| | | } |
| | | |
| | | /** |
| | | * 计算OEE稼动率 |
| | | * @param originalData |
| | | * @return |
| | | */ |
| | | public static Double calculationOee(List<SuperAggregateState> originalData) { |
| | | List<SuperAggregateState> originalData2 = FilterOffUtils.filterOffDay(originalData, OpenTypeEnums.OEE); |
| | | double result = 0.0d; |