#
lsh
2024-06-26 9e5f9371ed18a317eb5fcbbd94bc174837e561a3
src/main/resources/mapper/BasJarMastMapper.xml
@@ -21,19 +21,48 @@
        <result column="modi_time" property="modiTime" />
        <result column="appe_time" property="appeTime" />
        <result column="jar_loc_digit" property="jarLocDigit" />
        <result column="burial" property="burial" />
    </resultMap>
    <select id="getJarMastByWrkNo" resultMap="BaseResultMap">
        select top 1 * from asr_bas_jar_mast
        where 1=1
          and wrk_no = #{wrkNo}
        order by jar_loc_digit desc
    </select>
    <select id="getJarMastByJarId" resultMap="BaseResultMap">
        select * from asr_bas_jar_mast
        where 1=1
        and jar_id = #{jarId}
        order by jar_loc_digit
        order by jar_loc_digit desc
    </select>
    <select id="getJarMastByJarIdAndStatusList" resultMap="BaseResultMap">
        select * from asr_bas_jar_mast
        where 1=1
          and
            (
            status in
            <foreach collection="statusList" item="status" index="index" open="(" close=")" separator=",">
                #{status}
            </foreach>
            )
          and jar_id = #{jarId}
        order by jar_loc_digit desc
    </select>
    <select id="getJarMastByJarIdMax" resultMap="BaseResultMap">
        select top 1 * from asr_bas_jar_mast
        where 1=1
            and
                (
                status in
                <foreach collection="statusList" item="status" index="index" open="(" close=")" separator=",">
                    #{status}
                </foreach>
                )
          and jar_id = #{jarId}
        order by jar_loc_digit desc
    </select>
@@ -41,6 +70,13 @@
    <select id="getJarMastByJarIdMin" resultMap="BaseResultMap">
        select top 1 * from asr_bas_jar_mast
        where 1=1
            and
                (
                status in
                <foreach collection="statusList" item="status" index="index" open="(" close=")" separator=",">
                    #{status}
                </foreach>
                )
          and jar_id = #{jarId}
        order by jar_loc_digit asc
    </select>
@@ -51,4 +87,26 @@
        and jar_id = #{jarId}
    </select>
    <select id="selectJarMastOperationByStatusList" resultType="Integer">
        select count(1) from asr_bas_jar_mast
        where 1=1
          and
            (
            status in
            <foreach collection="statusList" item="status" index="index" open="(" close=")" separator=",">
                #{status}
            </foreach>
            )
          and jar_id = #{jarId}
        order by jar_loc_digit desc
    </select>
    <update id="updateStatus">
        update asr_bas_jar_mast
        set status = #{statusUpdate}
        where 1=1
        and jar_id = #{jarId}
        and status = #{status}
    </update>
</mapper>