|
|
@ -36,13 +36,21 @@ |
|
|
|
p.GRID_ID, |
|
|
|
p.AGENCY_ID AS PID, |
|
|
|
P.PIDS, |
|
|
|
count(1)as projectTotal |
|
|
|
<if test='projectType == "closed" '> |
|
|
|
count(1) AS closedProjectTotal |
|
|
|
</if> |
|
|
|
<if test='projectType == "all" '> |
|
|
|
count(1)as projectTotal |
|
|
|
</if> |
|
|
|
FROM |
|
|
|
fact_origin_project_category_daily c |
|
|
|
LEFT JOIN fact_origin_project_main_daily p ON ( c.PROJECT_Id = p.id and p.del_flag='0' AND p.GRID_ID != '') |
|
|
|
WHERE |
|
|
|
c.DEL_FLAG = '0' |
|
|
|
AND c.CUSTOMER_ID = #{customerId} |
|
|
|
<if test='projectType == "closed" '> |
|
|
|
AND p.PROJECT_STATUS = 'closed' |
|
|
|
</if> |
|
|
|
AND c.`LEVEL` = '2' |
|
|
|
AND p.GRID_ID != '' |
|
|
|
GROUP BY |
|
|
@ -60,13 +68,21 @@ |
|
|
|
p.GRID_ID, |
|
|
|
p.AGENCY_ID AS PID, |
|
|
|
P.PIDS, |
|
|
|
count(distinct c.project_id)as projectTotal |
|
|
|
<if test='projectType == "closed" '> |
|
|
|
count(distinct c.project_id) AS closedProjectTotal |
|
|
|
</if> |
|
|
|
<if test='projectType == "all" '> |
|
|
|
count(distinct c.project_id)as projectTotal |
|
|
|
</if> |
|
|
|
FROM |
|
|
|
fact_origin_project_category_daily c |
|
|
|
LEFT JOIN fact_origin_project_main_daily p ON ( c.PROJECT_Id = p.id and p.del_flag='0' AND p.GRID_ID != '') |
|
|
|
WHERE |
|
|
|
c.DEL_FLAG = '0' |
|
|
|
AND p.GRID_ID != '' |
|
|
|
<if test='projectType == "closed" '> |
|
|
|
AND p.PROJECT_STATUS = 'closed' |
|
|
|
</if> |
|
|
|
AND c.CUSTOMER_ID = #{customerId} |
|
|
|
GROUP BY |
|
|
|
c.CUSTOMER_ID, |
|
|
|