|
@@ -718,17 +718,17 @@
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <select id="findByEntrustType" resultType="com.jeeplus.finance.projectReportArchive.service.dto.CwProjectReportArchiveDTO">
|
|
|
|
|
|
|
+ <select id="findByReportType" resultType="com.jeeplus.finance.projectReportArchive.service.dto.CwProjectReportArchiveDTO">
|
|
|
select
|
|
select
|
|
|
a.number,
|
|
a.number,
|
|
|
cw_prnl.report_no AS reportNo
|
|
cw_prnl.report_no AS reportNo
|
|
|
from cw_project_report_archive a
|
|
from cw_project_report_archive a
|
|
|
left join cw_project_report_new_line cw_prnl on a.report_id = cw_prnl.report_id and cw_prnl.del_flag = '0'
|
|
left join cw_project_report_new_line cw_prnl on a.report_id = cw_prnl.report_id and cw_prnl.del_flag = '0'
|
|
|
- where a.entrust_type = #{entrustType}
|
|
|
|
|
|
|
+ where cw_prnl.report_no like concat('%',#{reportType},'%')
|
|
|
and a.del_flag = '0'
|
|
and a.del_flag = '0'
|
|
|
- and a.status = '5'
|
|
|
|
|
- order by
|
|
|
|
|
- a.update_time DESC
|
|
|
|
|
- limit 1
|
|
|
|
|
|
|
+ ORDER BY
|
|
|
|
|
+ CAST(SUBSTRING(cw_prnl.report_no, 7, 4) AS UNSIGNED) DESC,
|
|
|
|
|
+ CAST(SUBSTRING(cw_prnl.report_no, 12, LENGTH(cw_prnl.report_no)-12) AS UNSIGNED) DESC
|
|
|
|
|
+ LIMIT 1;
|
|
|
</select>
|
|
</select>
|
|
|
</mapper>
|
|
</mapper>
|