select id, patid, sdtype, sddesc, sdnotes, apply_time, del_flag, check_by, check_flag, check_time, checkdesc, update_by, update_time, create_by, create_time, upload_flag, upload_time, orgid, pid, guid from pat_speciallist
    
    
    
    
        insert into pat_speciallist
        
            patid,
            sdtype,
            sddesc,
            sdnotes,
            apply_time,
            del_flag,
            check_by,
            check_flag,
            check_time,
            checkdesc,
            update_by,
            update_time,
            create_by,
            create_time,
            upload_flag,
            upload_time,
            orgid,
            pid,
            guid,
         
        
            #{patid},
            #{sdtype},
            #{sddesc},
            #{sdnotes},
            #{applyTime},
            #{delFlag},
            #{checkBy},
            #{checkFlag},
            #{checkTime},
            #{checkdesc},
            #{updateBy},
            #{updateTime},
            #{createBy},
            #{createTime},
            #{uploadFlag},
            #{uploadTime},
            #{orgid},
            #{pid},
            #{guid},
         
    
    
        update pat_speciallist
        
            patid = #{patid},
            sdtype = #{sdtype},
            sddesc = #{sddesc},
            sdnotes = #{sdnotes},
            apply_time = #{applyTime},
            del_flag = #{delFlag},
            check_by = #{checkBy},
            check_flag = #{checkFlag},
            check_time = #{checkTime},
            checkdesc = #{checkdesc},
            update_by = #{updateBy},
            update_time = #{updateTime},
            create_by = #{createBy},
            create_time = #{createTime},
            upload_flag = #{uploadFlag},
            upload_time = #{uploadTime},
            orgid = #{orgid},
            pid = #{pid},
            guid = #{guid},
        
        where id = #{id}
    
    
        update pat_speciallist
        
            del_flag =1,
        
        where id = #{id}
    
    
        delete from pat_speciallist where id in
        
            #{id}