zjh
2024-12-07 148a7f11b0ead8539cae824f02dda19a703f4d0b
ltkj-hosp/src/main/resources/mapper/hosp/TjSamplingMapper.xml
@@ -22,6 +22,10 @@
        <result property="deleted" column="deleted"/>
        <result property="parentId" column="parent_id"/>
        <result property="jyxh" column="jyxh"/>
        <result property="specimenTypeCode" column="specimen_type_code"/>
        <result property="isMerge" column="is_merge"/>
        <result property="jyxmdm" column="jyxmdm"/>
        <result property="jxbz" column="jxbz"/>
    </resultMap>
    <sql id="selectTjSamplingVo">
@@ -41,7 +45,11 @@
               update_time,
               deleted,
               parent_id,
               jyxh
               jyxh,
               specimen_type_code,
               is_merge,
               jyxmdm,
               jxbz
        from tj_sampling
    </sql>
@@ -121,6 +129,14 @@
            </if>
            <if test="jyxh != null">jyxh,
            </if>
            <if test="specimenTypeCode != null">specimen_type_code,
            </if>
            <if test="isMerge != null">is_merge,
            </if>
            <if test="jyxmdm != null">jyxmdm,
            </if>
            <if test="jxbz != null">jxbz,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},
@@ -156,6 +172,14 @@
            <if test="parentId != null">#{parentId},
            </if>
            <if test="jyxh != null">#{jyxh},
            </if>
            <if test="specimenTypeCode != null">#{specimenTypeCode},
            </if>
            <if test="isMerge != null">#{isMerge},
            </if>
            <if test="jyxmdm != null">#{jyxmdm},
            </if>
            <if test="jxbz != null">#{jxbz},
            </if>
        </trim>
    </insert>
@@ -210,6 +234,18 @@
            <if test="jyxh != null">jyxh =
                #{jyxh},
            </if>
            <if test="specimenTypeCode != null">specimen_type_code =
                #{specimenTypeCode},
            </if>
            <if test="isMerge != null">is_merge =
                #{isMerge},
            </if>
            <if test="isMerge != null">jyxmdm =
                #{jyxmdm},
            </if>
            <if test="jxbz != null">jxbz =
                #{jxbz},
            </if>
        </trim>
        where id = #{id}
    </update>
@@ -226,4 +262,22 @@
            #{id}
        </foreach>
    </delete>
    <update id="updateHeBingXm" parameterType="java.util.Map">
        UPDATE tj_sampling a SET a.parent_id=#{parentId} WHERE a.id in
        <foreach item="id" collection="ids" open="(" separator="," close=")">
            #{id}
        </foreach>
    </update>
    <update id="updateHeBingXms" parameterType="java.util.Map">
        UPDATE tj_sampling a SET a.parent_id=null WHERE a.parent_id in
        <foreach item="id" collection="ids" open="(" separator="," close=")">
            #{id}
        </foreach>
    </update>
</mapper>