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();