select id, notrequired_flag, notrequiredreason, patientno, patid_his, age_unit, age_unit2, sd_flag, name, sex, idcardno, birthdate, age, age2, nation, native_place, place_of_residence, birthplace, sourcefrom, archivetime, archiveby, telcode, relativetelcode, idcardtype, orgid, openid, del_flag, update_by, update_time, create_by, create_time, isupload, pattype, viptype, upload_time, care_facilities, case_path, degree_of_education, marital_status, income, medicare_type, care_person, guid, case_person_age from pat_archive insert into pat_archive patientno, patid_his, sd_flag, pattype, viptype, name, sex, nation, native_place, place_of_residence, birthplace, idcardno, dduserid, pid, guid, birthdate, age, age2, sourcefrom, archivetime, archiveby, telcode, relativetelcode, idcardtype, orgid, openid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, age_unit, age_unit2, notrequired_flag, notrequiredreason, care_facilities, case_path, degree_of_education, marital_status, income, medicare_type, care_person, case_person_age, #{patientno}, #{patidHis}, #{sdFlag}, #{pattype}, #{>viptype}, #{name}, #{sex}, #{nation}, #{nativePlace}, #{placeOfResidence}, #{birthplace}, #{idcardno}, #{dduserid}, #{pid}, #{guid}, #{birthdate}, #{age}, #{age2}, #{sourcefrom}, #{archivetime}, #{archiveby}, #{telcode}, #{relativetelcode}, #{idcardtype}, #{orgid}, #{openid}, #{delFlag}, #{updateBy}, #{updateTime}, #{createBy}, #{createTime}, #{isupload}, #{uploadTime}, #{ageUnit}, #{ageUnit2}, #{notrequiredFlag}, #{notrequiredreason}, #{careFacilities}, #{casePath}, #{degreeOfEducation}, #{maritalStatus}, #{income}, #{medicareType}, #{carePerson}, #{casePersonAge}, insert into pat_archive(name,viptype,sex,idcardno,birthdate,place_of_residence,age,age2,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time ,create_by,create_time,isupload,upload_time,pattype,nation,birthplace,native_place,patientno,patid_his,sd_flag,age_unit,age_unit2,notrequired_flag,notrequiredreason,care_facilities,case_path, degree_of_education,marital_status,income,medicare_type,care_person,case_person_age) values (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.placeOfResidence},#{item.age},#{item.age2},#{item.sourcefrom},#{item.archivetime},#{item.archiveby} ,#{item.telcode},#{item.archiveby},#{item.idcardtype},#{item.orgid},#{item.openid},#{item.dduserid},#{item.updateBy}, #{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.nation},#{item.birthplace},#{item.nativePlace},#{item.patientno}, #{item.patidHis},#{item.sdFlag},#{item.ageUnit},#{item.ageUnit2},#{item.notrequiredFlag},#{item.notrequiredreason} ,#{item.careFacilities},#{item.casePath},#{item.degreeOfEducation},#{item.maritalStatus},#{item.income},#{item.medicareType},#{item.carePerson},#{item.casePersonAge}) update pat_archive name = #{name}, sex = #{sex}, idcardno = #{idcardno}, birthdate = #{birthdate}, place_of_residence = #{placeOfResidence}, birthplace = #{birthplace}, age = #{age}, age2 = #{age2}, sourcefrom = #{sourcefrom}, archivetime = #{archivetime}, archiveby = #{archiveby}, telcode = #{telcode}, relativetelcode = #{relativetelcode}, idcardtype = #{idcardtype}, orgid = #{orgid}, openid = #{openid}, del_flag = #{delFlag}, update_by = #{updateBy}, update_time = #{updateTime}, create_by = #{createBy}, create_time = #{createTime}, isupload = #{isupload}, upload_time = #{uploadTime}, viptype = #{viptype}, patientno = #{patientno}, patid_his = #{patidHis}, sd_flag = #{sdFlag}, age_unit = #{ageUnit}, age_unit2 = #{ageUnit2}, notrequired_flag = #{notrequiredFlag}, notrequiredreason = #{notrequiredreason}, care_facilities = #{careFacilities}, case_path = #{casePath}, degree_of_education = #{degreeOfEducation}, marital_status = #{maritalStatus}, income = #{income}, medicare_type = #{medicareType}, care_person = #{carePerson}, case_person_age = #{casePersonAge}, guid = #{guid}, where id = #{id} update pat_archive del_flag =1 where id = #{id} update pat_archive set del_flag =1 where id in #{id}