进度管理大屏
This commit is contained in:
@ -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
|
||||
|
||||
@ -41,6 +41,11 @@ public class ProjectImageProgressDetailVo implements Serializable {
|
||||
*/
|
||||
private BigDecimal totalProgress;
|
||||
|
||||
/**
|
||||
* 完成率
|
||||
*/
|
||||
private BigDecimal completionRate;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
|
||||
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user