main #1
@ -432,7 +432,7 @@ public class ScrProductionServiceImpl extends ServiceImpl<ScrProductionMapper, S
|
|||||||
|
|
||||||
// 聚合该产品的总产量
|
// 聚合该产品的总产量
|
||||||
BigDecimal totalProduction = productProductions.stream()
|
BigDecimal totalProduction = productProductions.stream()
|
||||||
.map(ScrProduction::getProduction)
|
.map(ScrProduction::getPower)
|
||||||
.filter(ObjectUtil::isNotEmpty)
|
.filter(ObjectUtil::isNotEmpty)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
productParam.setPower(totalProduction); // 使用power字段存储总产量
|
productParam.setPower(totalProduction); // 使用power字段存储总产量
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user