diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/ProgressBigScreenController.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/ProgressBigScreenController.java index 4c4b5600..f6d19401 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/ProgressBigScreenController.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/controller/ProgressBigScreenController.java @@ -1,6 +1,5 @@ package org.dromara.bigscreen.controller; -import cn.dev33.satoken.annotation.SaIgnore; import jakarta.annotation.Resource; import jakarta.validation.constraints.NotNull; import lombok.RequiredArgsConstructor; @@ -27,7 +26,6 @@ import java.util.List; * @author lilemy * @date 2025-12-15 11:35 */ -@SaIgnore @Validated @RestController @RequiredArgsConstructor diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/vo/ProjectImageProgressDetailVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/vo/ProjectImageProgressDetailVo.java index 8c113b3b..c96f65d1 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/vo/ProjectImageProgressDetailVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/vo/ProjectImageProgressDetailVo.java @@ -41,6 +41,11 @@ public class ProjectImageProgressDetailVo implements Serializable { */ private BigDecimal totalProgress; + /** + * 完成率 + */ + private BigDecimal completionRate; + /** * 单位 */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/ProjectBigScreenServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/ProjectBigScreenServiceImpl.java index 77547d18..eed36584 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/ProjectBigScreenServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/ProjectBigScreenServiceImpl.java @@ -581,6 +581,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService { vo.setPlanProgress(c.getPlanTotal()); vo.setActualProgress(c.getCompleted()); vo.setTotalProgress(c.getTotal()); + vo.setCompletionRate(BigDecimalUtil.toPercentage(c.getCompleted(), c.getTotal())); return vo; }).toList(); } @@ -615,6 +616,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService { BigDecimal total = children.stream().map(PgsProgressCategory::getTotal) .reduce(BigDecimal.ZERO, BigDecimal::add); vo.setTotalProgress(total); + vo.setCompletionRate(BigDecimalUtil.toPercentage(completed, total)); detailVoList.add(vo); }); } else { @@ -645,6 +647,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService { .filter(Objects::nonNull) .findFirst().orElse(null); vo.setUnit(unit); + vo.setCompletionRate(BigDecimalUtil.toPercentage(actual, total)); detailVoList.add(vo); }); }