修改bug
This commit is contained in:
@ -2005,9 +2005,12 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
||||
case null, default -> 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);
|
||||
|
||||
Reference in New Issue
Block a user