生产中心加入租户查询
This commit is contained in:
@@ -24,19 +24,20 @@
|
||||
</select>
|
||||
|
||||
<select id="getPlanOverview"
|
||||
parameterType="string"
|
||||
parameterType="String"
|
||||
resultType="cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanRespVO$PlanOverview">
|
||||
SELECT
|
||||
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
|
||||
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>
|
||||
deleted = 0
|
||||
<if test="baseId != null and baseId != ''">
|
||||
AND base_id = #{baseId}
|
||||
</if>
|
||||
and tenant_id = #{tenantId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user