From 1431c8968495d2523ff6ae4d56788c15e0ee6847 Mon Sep 17 00:00:00 2001 From: hailin Date: Sat, 28 Feb 2026 11:01:37 -0800 Subject: [PATCH] fix(pre-planting): Decimal -> Number in totalAmount reduce --- .../application/services/pre-planting-application.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/services/planting-service/src/pre-planting/application/services/pre-planting-application.service.ts b/backend/services/planting-service/src/pre-planting/application/services/pre-planting-application.service.ts index feaf5773..79876c32 100644 --- a/backend/services/planting-service/src/pre-planting/application/services/pre-planting-application.service.ts +++ b/backend/services/planting-service/src/pre-planting/application/services/pre-planting-application.service.ts @@ -417,7 +417,7 @@ export class PrePlantingApplicationService { where: { orderNo: { in: merge.sourceOrderNos } }, select: { totalAmount: true }, }); - const greenPointsAmount = sourceOrders.reduce((sum, o) => sum + o.totalAmount, 0); + const greenPointsAmount = sourceOrders.reduce((sum, o) => sum + Number(o.totalAmount), 0); const totalAmount = Math.round(greenPointsAmount * 1.1 * 100) / 100; // 含税 CNY // 生成北京时间日期