From 034b1be0c7cc3af23cc8860b31269034bfbd75fe Mon Sep 17 00:00:00 2001 From: xiachao Date: Mon, 30 Sep 2024 16:55:20 +0800 Subject: [PATCH] =?UTF-8?q?bug=20=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thing/carbon/energyloss/dto/EnergyLossReportParam.java | 4 ++-- .../carbon/energyloss/service/impl/EnergyLossServiceImpl.java | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/report-analysis/src/main/java/com/thing/carbon/energyloss/dto/EnergyLossReportParam.java b/modules/report-analysis/src/main/java/com/thing/carbon/energyloss/dto/EnergyLossReportParam.java index 057c0e0..7e57309 100644 --- a/modules/report-analysis/src/main/java/com/thing/carbon/energyloss/dto/EnergyLossReportParam.java +++ b/modules/report-analysis/src/main/java/com/thing/carbon/energyloss/dto/EnergyLossReportParam.java @@ -36,10 +36,10 @@ public class EnergyLossReportParam implements Serializable { public String getAttrCodeType(){ - if(this.thingAttrCodeType.equals("date")){ + if(this.thingAttrCodeType.equals("date")||this.thingAttrCodeType.equals("hh")){ return "hh"; } - if(this.thingAttrCodeType.equals("month")){ + if(this.thingAttrCodeType.equals("month")||this.thingAttrCodeType.equals("dd")){ return "dd"; } return "mm"; diff --git a/modules/report-analysis/src/main/java/com/thing/carbon/energyloss/service/impl/EnergyLossServiceImpl.java b/modules/report-analysis/src/main/java/com/thing/carbon/energyloss/service/impl/EnergyLossServiceImpl.java index e27b3af..034b8b5 100644 --- a/modules/report-analysis/src/main/java/com/thing/carbon/energyloss/service/impl/EnergyLossServiceImpl.java +++ b/modules/report-analysis/src/main/java/com/thing/carbon/energyloss/service/impl/EnergyLossServiceImpl.java @@ -135,7 +135,9 @@ public class EnergyLossServiceImpl implements EnergyLossService { .eq(IotThingSourceEntity::getRootId, rootId) .eq(IotThingSourceEntity::getConfigType, param.getConfigType()) .eq(IotThingSourceEntity::getThingAttrGroup,labelGroupName) - .eq(IotThingSourceEntity::getStartStatus,"0")); + .eq(IotThingSourceEntity::getStartStatus,"0") + .eq(IotThingSourceEntity::getThingAttrCodeType,param.getAttrCodeType())); + String key=null; if (CollectionUtil.isNotEmpty(iotThingSourceEntities)){ key = iotThingSourceEntities.get(0).getThingAttrCode();