#
lsh
2024-06-26 2cebd39fd1514c991da647f08124e18a0b02abe9
src/main/resources/mapper/WrkMastExecuteMapper.xml
@@ -22,8 +22,39 @@
        <result column="wrk_sts" property="wrkSts" />
        <result column="io_type" property="ioType" />
        <result column="type" property="type" />
        <result column="rgv_end_id" property="rgvEndId" />
    </resultMap>
    <sql id="batchSeq">
        <if test="type != null">
            and type = #{type}
        </if>
        <if test="ioType != null">
            and io_type = #{ioType}
        </if>
        <if test="wrkType != null">
            and wrk_type = #{wrkType}
        </if>
        <if test="steNo != null">
            and ste_id = #{steNo}
        </if>
        <if test="jarNo != null">
            and jar_id = #{jarNo}
        </if>
        <if test="rgvNo != null">
            and rgv_id = #{rgvNo}
        </if>
        <!--        <choose>-->
        <!--            <when test="type != null and type != ''">-->
        <!--                and type = #{type}-->
        <!--            </when>-->
        <!--            <otherwise>-->
        <!--                and (type IS NULL OR type = '')-->
        <!--            </otherwise>-->
        <!--        </choose>-->
    </sql>
    <select id="getWrkMastExecuteByWrkNo" resultMap="BaseResultMap">
        select top 1 * from jar_wrk_mast_execute
@@ -37,14 +68,25 @@
        and jar_id = #{jarId}
    </select>
    <select id="sselectWrkMastExecuteByType" resultMap="BaseResultMap">
    <select id="selectWrkMastExecuteByType" resultMap="BaseResultMap">
        select * from jar_wrk_mast_execute
        where 1=1
        and type = #{type}
        and io_type = #{iotype}
        and wrk_type = 0;
    </select>
    <select id="selectWrkMastExecuteByTypeAndIoTyperAndWrkType" resultMap="BaseResultMap">
        select * from jar_wrk_mast_execute
        where 1=1
        <include refid="batchSeq"></include>
    </select>
    <select id="selectWrkMastExecuteByWrk" resultMap="BaseResultMap">
        select * from jar_wrk_mast_execute
        where 1=1
        <include refid="batchSeq"></include>
    </select>
    <select id="getWrkMastExecuteByJarIdCount" resultType="Integer">
        select count(1) from jar_wrk_mast_execute
        where 1=1