From f2c0932e2ea1628c46bcc89b1554445824bc472e Mon Sep 17 00:00:00 2001 From: lcj <2331845269@qq.com> Date: Wed, 10 Dec 2025 10:58:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PgsProgressCategoryServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java index af746ebd..86c3cfb9 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressCategoryServiceImpl.java @@ -2005,9 +2005,12 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl throw new ServiceException("不支持的设施类型", HttpStatus.BAD_REQUEST); } // 更新进度类别数量 + BigDecimal total = category.getTotal().add(BigDecimal.valueOf(number)); PgsProgressCategory updateCategory = new PgsProgressCategory(); updateCategory.setId(progressCategoryId); - updateCategory.setTotal(category.getTotal().add(BigDecimal.valueOf(number))); + updateCategory.setTotal(total); + updateCategory.setOwnerPrice(total.multiply(category.getOwnerPrice())); + updateCategory.setConstructionPrice(total.multiply(category.getConstructionPrice())); boolean update = this.updateById(updateCategory); if (!update) { throw new ServiceException("修改进度类别数量失败,数据库异常", HttpStatus.ERROR);