| | |
| | | <result column="area" property="area" /> |
| | | <result column="in_ok" property="inOk" /> |
| | | <result column="out_ok" property="outOk" /> |
| | | <result column="loc_type1" property="locType1" /> |
| | | <result column="loc_type2" property="locType2" /> |
| | | <result column="loc_type3" property="locType3" /> |
| | | <result column="modi_user" property="modiUser" /> |
| | | <result column="modi_time" property="modiTime" /> |
| | | <result column="appe_user" property="appeUser" /> |
| | |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="getAvailableDevp" resultType="java.lang.Integer"> |
| | | <select id="getAvailableInSite" resultType="java.lang.Integer"> |
| | | select |
| | | abd.dev_no |
| | | from asr_bas_devp abd |
| | | left join asr_sta_desc asd on abd.dev_no = asd.stn_no |
| | | where 1=1 |
| | | and asd.type_no = 1 |
| | | and abd.in_enable = 'Y' |
| | | and asd.type_no = #{typeNo} |
| | | -- and abd.in_enable = 'Y' |
| | | group by abd.dev_no |
| | | </select> |
| | | |
| | | <select id="getAvailableOutSite" resultType="java.lang.Integer"> |
| | | select |
| | | abd.dev_no |
| | | from asr_bas_devp abd |
| | | left join asr_sta_desc asd on abd.dev_no = asd.stn_no |
| | | where 1=1 |
| | | and asd.type_no = #{typeNo} |
| | | -- and abd.out_enable = 'Y' |
| | | group by abd.dev_no |
| | | </select> |
| | | <select id="getCanInSites" resultType="java.lang.Integer"> |
| | | SELECT d.dev_no |
| | | FROM asr_bas_devp d |
| | | WHERE d.dev_no IN |
| | | <foreach collection="list" item="dev" open="(" separator="," close=")"> |
| | | #{dev} |
| | | </foreach> |
| | | AND d.canining = 'Y' |
| | | AND NOT EXISTS ( |
| | | SELECT 1 |
| | | FROM asr_wrk_mast w |
| | | WHERE w.sta_no = d.dev_no |
| | | AND ( |
| | | w.wrk_sts < 14 |
| | | OR EXISTS ( |
| | | SELECT 1 |
| | | FROM asr_bas_devp d2 |
| | | WHERE d2.wrk_no = w.wrk_no |
| | | ) |
| | | ) |
| | | ) |
| | | </select> |
| | | |
| | | </mapper> |