feat (farm): 种植中心-生产计划
- 添加任务概述信息
This commit is contained in:
@@ -15,10 +15,25 @@
|
||||
where tenant_id = #{tenantId}
|
||||
and deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="getTotalArea" parameterType="Long" resultType="java.lang.Double">
|
||||
select sum(total_area)
|
||||
from farm_production_plan
|
||||
where tenant_id = #{tenantId}
|
||||
and deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="getPlanOverview"
|
||||
parameterType="string"
|
||||
resultType="cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanPageRespVO$PlanOverview">
|
||||
SELECT
|
||||
base_id,
|
||||
COUNT(*) AS planCount,
|
||||
SUM(CASE WHEN plan_status = 3 THEN 1 ELSE 0 END) AS planCompletedCount,
|
||||
SUM(CASE WHEN plan_status = 2 THEN 1 ELSE 0 END) AS planInProgressCount,
|
||||
SUM(CASE WHEN plan_status = 4 THEN 1 ELSE 0 END) AS planOverdueCount
|
||||
FROM farm_production_plan
|
||||
WHERE base_id IS NOT NULL AND deleted = 0 AND base_id = #{baseId}
|
||||
GROUP BY base_id
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user