|
@ -281,27 +281,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
dc_busi_target_draft_daynew d, |
|
|
dc_busi_target_draft_daynew d, |
|
|
dc_busi_report_target_config c, |
|
|
dc_busi_report_target_config c, |
|
|
dc_base_target_model m, |
|
|
dc_base_target_model m, |
|
|
( |
|
|
( |
|
|
select |
|
|
select |
|
|
asset_code |
|
|
max(CONCAT( date_year , date_month , date_day)) max_date, |
|
|
from |
|
|
target_model_code, |
|
|
dc_base_asset_info |
|
|
organize_id |
|
|
where |
|
|
from |
|
|
org_id = #{orgId} |
|
|
dc_busi_target_draft_daynew |
|
|
and asset_level = #{assetLevel} |
|
|
where |
|
|
and asset_type = #{assetType} |
|
|
organize_id in |
|
|
limit 1) a |
|
|
<foreach item="orgId" collection="orgIds" open="(" separator="," close=")"> |
|
|
|
|
|
#{orgId} |
|
|
|
|
|
</foreach> |
|
|
|
|
|
and CONCAT(date_year , date_month , date_day) <= CONCAT(#{dateYear}, #{dateMonth}, #{dateDay}) |
|
|
|
|
|
group by |
|
|
|
|
|
target_model_code, |
|
|
|
|
|
organize_id |
|
|
|
|
|
) md, |
|
|
|
|
|
( |
|
|
|
|
|
select |
|
|
|
|
|
asset_code |
|
|
|
|
|
from |
|
|
|
|
|
dc_base_asset_info |
|
|
|
|
|
where |
|
|
|
|
|
org_id in |
|
|
|
|
|
<foreach item="orgId" collection="orgIds" open="(" separator="," close=")"> |
|
|
|
|
|
#{orgId} |
|
|
|
|
|
</foreach> |
|
|
|
|
|
and asset_level = #{assetLevel} |
|
|
|
|
|
and asset_type = #{assetType} |
|
|
|
|
|
limit 1 |
|
|
|
|
|
) a |
|
|
where |
|
|
where |
|
|
d.asset_code = a.asset_code |
|
|
d.asset_code = a.asset_code |
|
|
|
|
|
and CONCAT(d.date_year , d.date_month , d.date_day) = md.max_date |
|
|
|
|
|
and d.target_model_code = md.target_model_code |
|
|
|
|
|
and d.organize_id = md.organize_id |
|
|
and d.target_model_code = c.target_model_code |
|
|
and d.target_model_code = c.target_model_code |
|
|
and d.target_model_code =m.target_model_code |
|
|
and d.target_model_code =m.target_model_code |
|
|
and c.report_name in |
|
|
and c.report_name in |
|
|
<foreach item="reportName" collection="reportNames" open="(" separator="," close=")"> |
|
|
<foreach item="reportName" collection="reportNames" open="(" separator="," close=")"> |
|
|
#{reportName} |
|
|
#{reportName} |
|
|
</foreach> |
|
|
</foreach> |
|
|
and d.date_year = #{dateYear} |
|
|
|
|
|
and d.date_month = #{dateMonth} |
|
|
|
|
|
and d.date_day = #{dateDay} |
|
|
|
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
</mapper> |
|
|
</mapper> |