(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) limit 1) as bm_name
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) limit 1) as bm_name
FROM spmk_approve_summary a
FROM spmk_approve_summary a
WHERE a.org_code = #{param.orgCode}
WHERE a.org_code = #{param.orgCode}
<iftest="param.type != null and param.type >= 1">
<iftest="param.type != null and param.type >= 1">
and a.id in
and a.id in
(SELECT approve_summary_id FROM spmk_approve_execute_record WHERE id IN
(SELECT approve_summary_id FROM spmk_approve_execute_record WHERE id IN
(SELECT approve_execute_record_id FROM spmk_executor WHERE emp_num = #{param.empNum})
(SELECT
and type = #{param.type}
approve_execute_record_id
FROM
spmk_executor
WHERE
emp_num = #{param.empNum})
and type = #{param.type}
)
)
and a.sts <![CDATA[ <> ]]> 1
</if>
</if>
<iftest="param.type != null and param.type == 0">
<iftest="param.type != null and param.type == 0">
...
@@ -156,6 +163,7 @@
...
@@ -156,6 +163,7 @@
<iftest="param.sts != null">
<iftest="param.sts != null">
and a.sts = #{param.sts}
and a.sts = #{param.sts}
</if>
</if>
<iftest="param.query != null and param.query != ''">
<iftest="param.query != null and param.query != ''">