| | |
| | | </resultMap> |
| | | |
| | | <select id="selectAllWrkMastStaList" resultMap="BaseResultMap"> |
| | | select * from asr_wrk_mast_sta and wrk_sts=0 order by line_number,id |
| | | select * from asr_wrk_mast_sta |
| | | where 1=1 |
| | | and wrk_sts=0 |
| | | <if test="type!=null"> |
| | | and type = #{type} |
| | | </if> |
| | | order by line_number,id |
| | | </select> |
| | | |
| | | <select id="selectByWrkNo" resultMap="BaseResultMap"> |
| | | select top 1 * from asr_wrk_mast_sta |
| | | where 1=1 |
| | | and wrk_no = #{wrkNo} |
| | | and wrk_no = #{workNo} |
| | | </select> |
| | | |
| | | <select id="selectNoInterfere" resultMap="BaseResultMap"> |
| | |
| | | order by line_number,id |
| | | </select> |
| | | |
| | | <select id="selectAllWrkCount" resultMap="Integer"> |
| | | select count(1) from asr_wrk_mast_sta |
| | | <select id="selectNoInterfereList" resultMap="BaseResultMap"> |
| | | select * from asr_wrk_mast_sta |
| | | where 1=1 |
| | | and (sta_start in |
| | | <foreach item="item" collection="staStarts" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | or sta_start = 0 |
| | | ) |
| | | and (sta_end in |
| | | <foreach item="item" collection="staEnds" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | or sta_end = 0 |
| | | ) |
| | | and wrk_sts=0 |
| | | order by line_number,id |
| | | </select> |
| | | |
| | | <select id="selectAllWrkCount" resultType="Integer"> |
| | | select count(1) from asr_wrk_mast_sta |
| | | where 1=1 |
| | | <if test="type!=null"> |
| | | and type = #{type} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectAllWrkCount108" resultType="Integer"> |
| | | select count(1) from asr_wrk_mast_sta |
| | | where 1=1 |
| | | and type = 1 |
| | | and (sta_end = 108 or sta_start = 108) |
| | | </select> |
| | | |
| | | <select id="selectAllWrkCount108Y" resultType="Integer"> |
| | | select count(1) from asr_wrk_mast_sta |
| | | where 1=1 |
| | | -- and type = 1 |
| | | and ((sta_end <= 108 or sta_start <= 108) |
| | | or (sta_end = 118 or sta_start = 118) |
| | | or (sta_end = 122 or sta_start = 122)) |
| | | </select> |
| | | |
| | | <select id="selectAllWrkStsCount" resultType="Integer"> |
| | | select count(1) from asr_wrk_mast_sta |
| | | where 1=1 |
| | | <if test="type!=null"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="wrkSts!=null"> |
| | | and wrk_sts = #{wrkSts} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectAllWrkStsCountWrkMastSta" resultMap="BaseResultMap"> |
| | | select top 1 * from asr_wrk_mast_sta |
| | | where 1=1 |
| | | <if test="type!=null"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="wrkSts!=null"> |
| | | and wrk_sts = #{wrkSts} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |