|
@@ -1612,6 +1612,7 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
BigDecimal sameMonthElectricity = getTotal(sameDayLastMonthList);
|
|
|
BigDecimal sameYearElectricity = getTotal(sameDayLastYearList);
|
|
|
|
|
|
+ // 基本费用
|
|
|
BigDecimal dayBasic = getBasicExpenses(dayList, cfg, siteId, dayElectricity);
|
|
|
BigDecimal monthBasic = getBasicExpenses(monthList, cfg, siteId, monthElectricity);
|
|
|
BigDecimal yearBasic = getBasicExpenses(yearList, cfg, siteId, yearElectricity);
|
|
@@ -1620,13 +1621,13 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
BigDecimal sameYearBasic = getBasicExpenses(sameDayLastYearList, cfg, siteId, sameYearElectricity);
|
|
|
|
|
|
// 3. 费用汇总
|
|
|
- BigDecimal dayCost = calculateTotalCost(calculateTimeFee(siteId, today, 1)).add(dayBasic);
|
|
|
- BigDecimal monthCost = calculateTotalCost(calculateTimeFee(siteId, today, 2)).add(monthBasic);
|
|
|
- BigDecimal yearCost = calculateTotalCost(calculateTimeFee(siteId, today, 3)).add(yearBasic);
|
|
|
+ BigDecimal dayCost = calculateTotalCost(calculateTimeFee(siteId, today, 1));//.add(dayBasic);
|
|
|
+ BigDecimal monthCost = calculateTotalCost(calculateTimeFee(siteId, today, 2));
|
|
|
+ BigDecimal yearCost = calculateTotalCost(calculateTimeFee(siteId, today, 3));
|
|
|
|
|
|
- BigDecimal yesterdayCost = calculateTotalCost(calculateTimeFee(siteId, yesterday1, 1)).add(sameDayBasic);
|
|
|
- BigDecimal sameMonthCost = calculateTotalCost(calculateTimeFee(siteId, lastMonth, 22)).add(sameMonthBasic);
|
|
|
- BigDecimal sameYearCost = calculateTotalCost(calculateTimeFee(siteId, lastYear, 33)).add(sameYearBasic);
|
|
|
+ BigDecimal yesterdayCost = calculateTotalCost(calculateTimeFee(siteId, yesterday1, 1));//.add(sameDayBasic);
|
|
|
+ BigDecimal sameMonthCost = calculateTotalCost(calculateTimeFee(siteId, lastMonth, 22));
|
|
|
+ BigDecimal sameYearCost = calculateTotalCost(calculateTimeFee(siteId, lastYear, 33));
|
|
|
|
|
|
// 4. 设置值
|
|
|
vo.setTodayCost(dayCost);
|
|
@@ -1646,7 +1647,6 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
? monthCost.subtract(sameMonthCost)
|
|
|
.divide(sameMonthCost, 2, RoundingMode.HALF_UP)
|
|
|
: BigDecimal.ZERO);
|
|
|
-
|
|
|
// 年环比
|
|
|
vo.setYearCostRingRatio(sameYearCost.compareTo(BigDecimal.ZERO) != 0
|
|
|
? yearCost.subtract(sameYearCost)
|
|
@@ -2458,7 +2458,7 @@ public class HtAnalogDataServiceImpl extends AbstractCrudService<HtAnalogDataMap
|
|
|
SiteElectricityRecord::getTotalCost,
|
|
|
BigDecimal::add)));
|
|
|
|
|
|
- result = timeKeys.stream()
|
|
|
+ result = timeKeys.stream()
|
|
|
.map(t -> monthMap.getOrDefault(YearMonth.from(t), null))
|
|
|
.collect(Collectors.toList());
|
|
|
}
|