fix (farm): 微服务API
- 数字驾驶舱-统计图-种植计划完成情况
This commit is contained in:
@@ -16,12 +16,12 @@ import lombok.NoArgsConstructor;
|
||||
public class PlantingPlanCompletionRespVO {
|
||||
|
||||
@Schema(description = "未开始数量")
|
||||
private Double notStartedRatio;
|
||||
private Integer notStartedRatio;
|
||||
@Schema(description = "进行中数量")
|
||||
private Double inProgressRatio;
|
||||
private Integer inProgressRatio;
|
||||
@Schema(description = "已完成数量")
|
||||
private Double completedRatio;
|
||||
private Integer completedRatio;
|
||||
@Schema(description = "逾期数量")
|
||||
private Double overdueRatio;
|
||||
private Integer overdueRatio;
|
||||
|
||||
}
|
||||
|
||||
@@ -67,10 +67,10 @@
|
||||
resultType="cn.iocoder.yudao.module.farm.controller.admin.api.vo.PlantingPlanCompletionRespVO">
|
||||
|
||||
SELECT
|
||||
ROUND(SUM(CASE WHEN plan_status = 1 THEN 1 ELSE 0 END) * 100.0 / COUNT(*), 2) AS notStartedRatio,
|
||||
ROUND(SUM(CASE WHEN plan_status = 2 THEN 1 ELSE 0 END) * 100.0 / COUNT(*), 2) AS inProgressRatio,
|
||||
ROUND(SUM(CASE WHEN plan_status = 3 THEN 1 ELSE 0 END) * 100.0 / COUNT(*), 2) AS completedRatio,
|
||||
ROUND(SUM(CASE WHEN plan_status = 4 THEN 1 ELSE 0 END) * 100.0 / COUNT(*), 2) AS overdueRatio
|
||||
SUM(CASE WHEN plan_status = 1 THEN 1 ELSE 0 END) AS notStartedRatio,
|
||||
SUM(CASE WHEN plan_status = 2 THEN 1 ELSE 0 END) AS inProgressRatio,
|
||||
SUM(CASE WHEN plan_status = 3 THEN 1 ELSE 0 END) AS completedRatio,
|
||||
SUM(CASE WHEN plan_status = 4 THEN 1 ELSE 0 END) AS overdueRatio
|
||||
FROM farm_production_plan
|
||||
<where>
|
||||
deleted = 0
|
||||
|
||||
Reference in New Issue
Block a user