|
|
|
@ -115,7 +115,7 @@ public class PlantServiceImpl extends BaseServiceImpl<PlantMapper, PlantEntity> |
|
|
|
.filter(s -> StringUtils.equals(s.getPlantId().toString(), tsKvDTO.getThingCode())) |
|
|
|
.findFirst() |
|
|
|
.ifPresent(s -> { |
|
|
|
BigDecimal income = CalculationUtil.income(new BigDecimal(tsKvDTO.getVal()), s.getProfitco2(), 2); |
|
|
|
BigDecimal income = CalculationUtil.income(new BigDecimal(tsKvDTO.getVal()), s.getUnitProfit(), 2); |
|
|
|
if (income == null) { |
|
|
|
income = BigDecimal.ZERO; |
|
|
|
} |
|
|
|
@ -229,6 +229,12 @@ public class PlantServiceImpl extends BaseServiceImpl<PlantMapper, PlantEntity> |
|
|
|
plantDTO.setReductionyy(reductionUsage.toPlainString()); |
|
|
|
} |
|
|
|
} |
|
|
|
//月发电量 |
|
|
|
TsKvDTO tsKvDTOmm = tsKvService.findLatestByCodeAndAttr(String.valueOf(plantId), "A29mm"); |
|
|
|
if(!Objects.isNull(tsKvDTOmm)){ |
|
|
|
plantDTO.setAttrKey29mm(tsKvDTOmm.getAttrKey()); |
|
|
|
plantDTO.setVal29mm(new BigDecimal(tsKvDTOmm.getVal()).toPlainString()); |
|
|
|
} |
|
|
|
//当前功率 |
|
|
|
TsKvDTO tsKvDTO16 = tsKvService.findLatestByCodeAndAttr(String.valueOf(plantId), "A16"); |
|
|
|
if(!Objects.isNull(tsKvDTO16)){ |
|
|
|
|