select id, guid, serialnum, fatweight, bodyweight, recordtime, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, patid, sourcename, visittype, visitid from pat_med_weight
    
    
    
    
        insert into pat_med_weight
        
            serialnum,
            fatweight,
            bodyweight,
            recordtime,
            orgid,
            del_flag,
            update_by,
            update_time,
            create_by,
            create_time,
            isupload,
            upload_time,
            patid,
            sourcename,
            visittype,
            visitid,
            guid,
         
        
            #{serialnum},
            #{fatweight},
            #{bodyweight},
            #{recordtime},
            #{orgid},
            #{delFlag},
            #{updateBy},
            #{updateTime},
            #{createBy},
            #{createTime},
            #{isupload},
            #{uploadTime},
            #{patid},
            #{sourcename},
            #{visittype},
            #{visitid},
            #{guid},
         
    
    
        update pat_med_weight
        
            serialnum = #{serialnum},
            fatweight = #{fatweight},
            bodyweight = #{bodyweight},
            recordtime = #{recordtime},
            orgid = #{orgid},
            del_flag = #{delFlag},
            update_by = #{updateBy},
            update_time = #{updateTime},
            create_by = #{createBy},
            create_time = #{createTime},
            isupload = #{isupload},
            upload_time = #{uploadTime},
            patid = #{patid},
            sourcename = #{sourcename},
            visittype = #{visittype},
            visitid = #{visitid},
            guid = #{guid},
        
        where id = #{id}
    
    
        delete from pat_med_weight where id = #{id}
    
    
        delete from pat_med_weight where id in
        
            #{id}