select id, no, name, pers_type, comment, status, update_by, update_time, create_by, create_time from sw_prescription insert into sw_prescription no, name, pers_type, comment, status, update_by, update_time, create_by, create_time, #{no}, #{name}, #{persType}, #{comment}, #{status}, #{updateBy}, #{updateTime}, #{createBy}, #{createTime}, update sw_prescription no = #{no}, name = #{name}, pers_type = #{persType}, comment = #{comment}, status = #{status}, update_by = #{updateBy}, update_time = #{updateTime}, create_by = #{createBy}, create_time = #{createTime}, where id = #{id} delete from sw_prescription where id = #{id} delete from sw_prescription where id in #{id} delete from sw_pres_detail where pers_id in #{persId} delete from sw_pres_detail where pers_id = #{persId} insert into sw_pres_detail( id, pers_id, medi_id, dosage, unit_id, usage_id) values ( #{item.id}, #{item.persId}, #{item.mediId}, #{item.dosage}, #{item.unitId}, #{item.usageId})