|
|
|
@ -28,10 +28,7 @@ import org.springframework.stereotype.Service; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.RoundingMode; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Objects; |
|
|
|
import java.util.Optional; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.atomic.AtomicReference; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@ -226,7 +223,7 @@ public class PlantServiceImpl extends BaseServiceImpl<PlantMapper, PlantEntity> |
|
|
|
TsKvDTO tsKvDTO29 = tsKvService.findLatestByCodeAndAttr(String.valueOf(plantId), "A29yy"); |
|
|
|
if(!Objects.isNull(tsKvDTO29)){ |
|
|
|
plantDTO.setAttrKey29yy(tsKvDTO29.getAttrKey()); |
|
|
|
plantDTO.setVal29yy(tsKvDTO29.getVal()); |
|
|
|
plantDTO.setVal29yy(new BigDecimal(tsKvDTO29.getVal()).divide(new BigDecimal(10000)).setScale(4,RoundingMode.UP).toPlainString()); |
|
|
|
//年减排量 |
|
|
|
if(!Objects.isNull(plantDTO.getProfitco2())){ |
|
|
|
BigDecimal reductionUsage = CalculationUtil.getCarbonUsage(new BigDecimal(tsKvDTO29.getVal()), reductionFactor, coefficient, 2); |
|
|
|
@ -251,6 +248,7 @@ public class PlantServiceImpl extends BaseServiceImpl<PlantMapper, PlantEntity> |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
plantDTOS.sort(Comparator.comparing(PlantDTO::getCapacity).reversed()); |
|
|
|
return plantDTOS; |
|
|
|
} |
|
|
|
|
|
|
|
|