| | |
| | | from device_examine_plan cqm |
| | | left join user u1 on u1.id = cqm.write_user_id |
| | | left join user u3 on u3.id = cqm.ratify_user_id |
| | | where exists (select 1 from device_examine_plan_details cqmd where cqmd.plan_id = cqm.plan_id) |
| | | order by cqm.create_time desc) a |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | |
| | | where cqm.plan_id = #{deviceExaminePlanId} |
| | | </select> |
| | | |
| | | <!-- 有明细的核查计划年份(倒序),没有明细的年份不返回 --> |
| | | <select id="selectPlanYears" resultType="java.lang.String"> |
| | | select distinct p.plan_year |
| | | from device_examine_plan p |
| | | inner join device_examine_plan_details d on d.plan_id = p.plan_id |
| | | order by p.plan_year desc |
| | | </select> |
| | | |
| | | </mapper> |