| | |
| | | processMainEntity.setSort(conf.getSort()); |
| | | // 日实际值 |
| | | Double value = getConfValue(conf.getDataType(),conf.getPointNo()); |
| | | processMainEntity.setRealValue(value == null ? BigDecimal.ZERO : BigDecimal.valueOf(value)); |
| | | processMainEntity.setRealValue(value == null ? BigDecimal.valueOf(-2) : BigDecimal.valueOf(value)); |
| | | |
| | | // 基准值、理论值 来源模型下发结果 |
| | | Double standValue = getConfValue("DATAPOINT",conf.getExt1()); |
| | | processMainEntity.setStandValue(standValue == null ? BigDecimal.ZERO : BigDecimal.valueOf(standValue)); |
| | | processMainEntity.setStandValue(standValue == null ? BigDecimal.valueOf(-2) : BigDecimal.valueOf(standValue)); |
| | | Double theoryValue = getConfValue("DATAPOINT",conf.getExt2()); |
| | | processMainEntity.setTheoryValue(theoryValue == null ? BigDecimal.ZERO : BigDecimal.valueOf(theoryValue)); |
| | | processMainEntity.setTheoryValue(theoryValue == null ? BigDecimal.valueOf(-2) : BigDecimal.valueOf(theoryValue)); |
| | | // 历史最优计算方向 |
| | | if (conf.getExt3() != null) { |
| | | directionMap.put(conf.getIndCode(),Double.valueOf(conf.getExt3())); |
| | |
| | | if (resultCodeMap.containsKey("main_jcmq")) { |
| | | // 焦炭产量 |
| | | BigDecimal jtcl = resultCodeMap.get("main_jcmq").getRealValue(); |
| | | if (jtcl != null && !jtcl.equals(BigDecimal.ZERO)) { |
| | | if (jtcl != null && !jtcl.equals(BigDecimal.valueOf(-2))) { |
| | | processMainEntities.forEach(e -> { |
| | | // 吨焦产煤气 |
| | | if (e.getIndCode().equals("main_jcmq") && resultCodeMap.containsKey("main_jlmqfs")) { |
| | |
| | | BigDecimal mainJlmqxh = resultCodeMap.get("main_jlmqxh").getRealValue(); |
| | | e.setRealValue(mainGlmqxh.add(mainJlmqxh).divide(jtcl,2,BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | // 吨焦耗蒸汽 |
| | | if (e.getIndCode().equals("main_djhzq") && resultCodeMap.containsKey("main_zqxh")) { |
| | | // 干熄焦蒸汽产生 |
| | | BigDecimal mainZqxh = resultCodeMap.get("main_zqxh").getRealValue(); |
| | | e.setRealValue(mainZqxh.divide(jtcl,2,BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | // 吨焦耗电 |
| | | if (e.getIndCode().equals("main_djhd") && resultCodeMap.containsKey("main_dlxh")) { |
| | | // 干熄焦蒸汽产生 |
| | | BigDecimal mainDlxh = resultCodeMap.get("main_dlxh").getRealValue(); |
| | | e.setRealValue(mainDlxh.divide(jtcl,2,BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | } |