From c6fbb4ae9af4a0d4936d2545b5c8749eab54f4c1 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期一, 12 五月 2025 14:56:09 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RunCokingMainTask.java | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RunCokingMainTask.java b/ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RunCokingMainTask.java index 521ba14..985b8a4 100644 --- a/ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RunCokingMainTask.java +++ b/ansteel-biz/src/main/java/com/iailab/module/ansteel/job/task/RunCokingMainTask.java @@ -4,6 +4,8 @@ import com.iailab.module.ansteel.coking.entity.*; import com.iailab.module.ansteel.coking.service.*; import com.iailab.module.ansteel.common.enums.ProcessConfDataTypeEnum; +import com.iailab.module.data.api.arc.ArcDataApi; +import com.iailab.module.data.api.arc.dto.ApiArcDataDTO; import com.iailab.module.data.api.ind.IndItemApi; import com.iailab.module.data.api.ind.dto.ApiIndItemValueDTO; import com.iailab.module.data.api.point.DataPointApi; @@ -34,6 +36,8 @@ private CokingProcessConfService cokingProcessConfService; @Resource private DataPointApi dataPointApi; + @Resource + private ArcDataApi arcDataApi; @Resource private IndItemApi indItemApi; @Resource @@ -131,6 +135,19 @@ 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)); + } + }); } } @@ -138,11 +155,11 @@ // 计算 统计值 processMainEntities.forEach(processMainEntity -> { // 计算 月累计 - calendar.add(Calendar.DAY_OF_YEAR, -29); + calendar.add(Calendar.DAY_OF_YEAR, -28); String clock_30 = DateUtils.format(calendar.getTime(), DateUtils.FORMAT_YEAR_MONTH_DAY); List<CokingProcessMainEntity> historyList_30 = cokingProcessMainService.historyList(clock_30, clock, "day",processMainEntity.getIndCode()); historyList_30.add(processMainEntity); - double monthValue = historyList_30.stream().mapToDouble(e -> e.getRealValue().doubleValue()).sum(); + double monthValue = historyList_30.stream().mapToDouble(e -> e.getRealValue().doubleValue()).average().orElse(0.0) * 30; processMainEntity.setMonthValue(BigDecimal.valueOf(monthValue)); // 计算 历史平均 @@ -190,7 +207,11 @@ value = Double.valueOf(indValues.get(0).getDataValue().toString()); } break; - case MODEL: + case ARC: + ApiArcDataDTO apiArcDataDTO = arcDataApi.queryArcLastValue(pointNo); + if (apiArcDataDTO != null) { + value = apiArcDataDTO.getArcValue().doubleValue(); + } break; default: break; -- Gitblit v1.9.3