|
|
@ -32,7 +32,7 @@ |
|
|
|
c.DEL_FLAG = '0' |
|
|
|
AND c.CUSTOMER_ID = #{customerId} |
|
|
|
AND c.`LEVEL` = '2' |
|
|
|
|
|
|
|
AND p.GRID_ID != '' |
|
|
|
GROUP BY |
|
|
|
c.CUSTOMER_ID, |
|
|
|
c.CATEGORY_CODE, |
|
|
@ -54,6 +54,7 @@ |
|
|
|
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 != '' |
|
|
|
AND c.CUSTOMER_ID = #{customerId} |
|
|
|
GROUP BY |
|
|
|
c.CUSTOMER_ID, |
|
|
@ -84,6 +85,7 @@ |
|
|
|
</foreach> |
|
|
|
) |
|
|
|
AND c.`LEVEL` = '2' |
|
|
|
AND p.GRID_ID = '' |
|
|
|
GROUP BY c.CUSTOMER_ID, c.CATEGORY_CODE, c.`LEVEL`, p.AGENCY_ID, p.PID, P.PIDS |
|
|
|
UNION ALL |
|
|
|
SELECT |
|
|
@ -103,6 +105,7 @@ |
|
|
|
p.AGENCY_ID = #{orgId} |
|
|
|
</foreach> |
|
|
|
) |
|
|
|
AND p.GRID_ID = '' |
|
|
|
GROUP BY c.CUSTOMER_ID, left(c.CATEGORY_CODE, 4), c.`LEVEL`, p.PID, p.AGENCY_ID, P.PIDS |
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|