|
|
@ -9,22 +9,25 @@ |
|
|
|
M.PROJECT_TOTAL AS projectTotal |
|
|
|
FROM screen_project_category_org_daily m |
|
|
|
left join customer_project_category_dict d |
|
|
|
on(m.CATEGORY_CODE=D.CATEGORY_CODE AND D.DEL_FLAG='0') |
|
|
|
on(m.CATEGORY_CODE=D.CATEGORY_CODE |
|
|
|
AND D.DEL_FLAG='0' |
|
|
|
and d.CUSTOMER_ID=#{customerId}) |
|
|
|
WHERE M.DEL_FLAG = '0' |
|
|
|
AND M.ORG_ID = #{agencyId} |
|
|
|
AND M.DATE_ID = ( |
|
|
|
select |
|
|
|
date_id |
|
|
|
from |
|
|
|
screen_project_category_org_daily |
|
|
|
where |
|
|
|
del_flag = '0' |
|
|
|
and ORG_ID = #{agencyId} |
|
|
|
order by |
|
|
|
date_id desc, |
|
|
|
created_time desc |
|
|
|
limit 1 |
|
|
|
) |
|
|
|
AND M.ORG_ID = #{agencyId} |
|
|
|
AND M.DATE_ID = ( |
|
|
|
select |
|
|
|
date_id |
|
|
|
from |
|
|
|
screen_project_category_org_daily |
|
|
|
where |
|
|
|
del_flag = '0' |
|
|
|
and ORG_ID = #{agencyId} |
|
|
|
and CUSTOMER_ID=#{customerId} |
|
|
|
order by |
|
|
|
date_id desc, |
|
|
|
created_time desc |
|
|
|
limit 1 |
|
|
|
) |
|
|
|
ORDER BY M.CATEGORY_CODE ASC |
|
|
|
</select> |
|
|
|
</mapper> |