Fancy
2024-06-20 279a149dd1ff4ef7a7a9353469532332d3fdcb5f
pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkLastMapper.xml
@@ -33,6 +33,69 @@
        where  id = #{id,jdbcType=BIGINT} 
    </select>
    <select id="selectByUserAndStation" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from plt_station where status ==1
        <trim prefix="and" suffixOverrides="and">
            <if test="id != null and id !=''">
                id = #{id,jdbcType=BIGINT} and
            </if>
            <if test="code != null and code !=''">
                code = #{code,jdbcType=VARCHAR} and
            </if>
            <if test="name != null and name !=''">
                name  like concat('%', #{name}, '%') and
            </if>
            <if test="disabled != null and disabled !=''">
                disabled = #{disabled,jdbcType=TINYINT} and
            </if>
            <if test="lineId != null and lineId !=''">
                line_id = #{lineId,jdbcType=BIGINT} and
            </if>
        </trim>
        order by id desc
    </select>
    <select id="selectList" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from sta_assembly_work_last
        <where>
            <if test="userId != null and userId !=''">
              and user_id = #{userId,jdbcType=BIGINT}
            </if>
            <if test="lineId != null and lineId !=''">
              and line_id = #{lineId,jdbcType=BIGINT}
            </if>
            <if test="stationId != null and stationId !=''">
              and station_id = #{stationId,jdbcType=BIGINT}
            </if>
            <if test="planId != null and planId !=''">
              and plan_id = #{planId,jdbcType=BIGINT}
            </if>
            <if test="processId != null and processId !=''">
              and process_id = #{processId,jdbcType=BIGINT}
            </if>
            <if test="nodeId != null and nodeId !=''">
              and node_id = #{nodeId,jdbcType=BIGINT}
            </if>
            <if test="status != null and status !=''">
              and status = #{status,jdbcType=TINYINT}
            </if>
            <if test="startTime != null and startTime !=''">
                and start_time = #{startTime,jdbcType=TIMESTAMP},
            </if>
            <if test="endTime != null and userId !=''">
                and  end_time = #{endTime,jdbcType=TIMESTAMP},
            </if>
            <if test="assistants != null and assistants !=''">
                and assistants = #{assistants,jdbcType=VARCHAR}
            </if>
        </where>
        order by id desc
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from sta_assembly_work_last
        where  id = #{id,jdbcType=BIGINT}