| | |
| | | </select> |
| | | |
| | | <select id="count2" resultType="Integer"> |
| | | select count(1) from asr_wrk_detl where 1=1 and order_no = #{orderNo} and (wrk_no in (select wrk_no from asr_wrk_mast where 1=1 and wrk_sts in (11,12,13,14))) |
| | | SELECT COUNT(DISTINCT detl.batch) |
| | | FROM asr_wrk_detl detl |
| | | INNER JOIN asr_wrk_mast mast |
| | | ON detl.wrk_no = mast.wrk_no |
| | | WHERE (mast.io_type = 103 OR mast.io_type = 101) |
| | | AND mast.wrk_sts IN (11, 12, 13, 14) |
| | | AND detl.order_no = #{orderNo} |
| | | </select> |
| | | |
| | | <select id="count3" resultType="Integer"> |
| | | select count(1) from asr_bas_devp where 1=1 and dev_no > 19999 |
| | | SELECT COUNT(DISTINCT detl.batch) |
| | | FROM asr_wrk_detl detl |
| | | INNER JOIN asr_bas_devp devp |
| | | ON detl.wrk_no = devp.wrk_no |
| | | </select> |
| | | |
| | | <select id="count111" resultType="Integer"> |
| | | SELECT COUNT(DISTINCT batch) |
| | | FROM ( |
| | | SELECT detl.batch |
| | | FROM asr_wrk_detl detl |
| | | INNER JOIN asr_wrk_mast mast |
| | | ON detl.wrk_no = mast.wrk_no |
| | | WHERE mast.io_type IN (101, 103) |
| | | AND mast.wrk_sts IN (11, 12, 13, 14) |
| | | |
| | | UNION |
| | | |
| | | SELECT detl.batch |
| | | FROM asr_wrk_detl detl |
| | | INNER JOIN asr_bas_devp devp |
| | | ON detl.wrk_no = devp.wrk_no |
| | | WHERE devp.dev_no BETWEEN 131 AND 144 |
| | | ) AS combined_batches; |
| | | </select> |
| | | |
| | | </mapper> |