进度管理大屏

This commit is contained in:
lcj
2025-12-17 16:36:08 +08:00
parent 86951d43b4
commit 4d7df7298a
3 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -41,6 +41,11 @@ public class ProjectImageProgressDetailVo implements Serializable {
*/
private BigDecimal totalProgress;
/**
* 完成率
*/
private BigDecimal completionRate;
/**
* 单位
*/

View File

@ -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);
});
}