select vi.id, vi.village_towns, vi.village, vi.villager_group,vi.age, vi.house_type, vi.domicile, vi.province, vi.city,
vi.region, vi.user_name, vi.gender, vi.id_card, vi.phone_num, vi.key_industries, vi.is_vaccination, vi.vaccine_name, vi.jici,
vi.vaccination_time, vi.vaccination_place, vi.contraindication, vi.suspend,vi.suspend_url,vi.other_url,vi.vaccination_time,
vi.should_be, vi.other, vi.progress, vi.remark, vi.status, vi.create_by, vi.create_time, vi.update_by, vi.update_time,
vi.is_del,vi.code,vi.birthday,vi.work_unit,vi.crowd_classification,vi.manufacturer,vi.now_in,vi.url,
viu.id as id_user,viu.id_card as id_card_user,viu.vaccine_name as vaccine_name_user,viu.jici as jici_user,viu.vaccination_time as vaccination_time_user,
viu.vaccination_place as vaccination_place_user,viu.progress as progress_user,viu.status as status_user
from vaccine_info vi left join vaccine_info_user viu
on vi.id_card = viu.id_card and viu.is_del = 'N'
insert into vaccine_info
village_towns,
village,
villager_group,
house_type,
domicile,
province,
city,
region,
user_name,
gender,
id_card,
phone_num,
key_industries,
is_vaccination,
vaccine_name,
jici,
vaccination_time,
vaccination_place,
contraindication,
suspend,
should_be,
other,
progress,
remark,
status,
create_by,
update_by,
update_time,
is_del,
code,
birthday,
work_unit,
crowd_classification,
manufacturer,
now_in,
url,
should_slow,
suspend_url,
suspend_url,
create_time
#{villageTowns},
#{village},
#{villagerGroup},
#{houseType},
#{domicile},
#{province},
#{city},
#{region},
#{userName},
#{gender},
#{idCard},
#{phoneNum},
#{keyIndustries},
#{isVaccination},
#{vaccineName},
#{jici},
#{vaccinationTime},
#{vaccinationPlace},
#{contraindication},
#{suspend},
#{shouldBe},
#{other},
#{progress},
#{remark},
#{status},
#{createBy},
#{updateBy},
#{updateTime},
#{isDel},
#{code},
#{birthday},
#{workUnit},
#{crowdClassification},
#{manufacturer},
#{nowIn},
#{url},
#{shouldSlow},
#{suspendUrl},
#{otherUrl},
sysdate()
update vaccine_info
village_towns = #{villageTowns},
village = #{village},
villager_group = #{villagerGroup},
house_type = #{houseType},
domicile = #{domicile},
province = #{province},
city = #{city},
region = #{region},
user_name = #{userName},
gender = #{gender},
id_card = #{idCard},
phone_num = #{phoneNum},
key_industries = #{keyIndustries},
is_vaccination = #{isVaccination},
vaccine_name = #{vaccineName},
jici = #{jici},
vaccination_time = #{vaccinationTime},
vaccination_place = #{vaccinationPlace},
contraindication = #{contraindication},
suspend = #{suspend},
should_be = #{shouldBe},
other = #{other},
progress = #{progress},
remark = #{remark},
status = #{status},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
is_del = #{isDel},
code = #{code},
birthday = #{birthday},
work_unit = #{workUnit},
crowd_classification = #{crowdClassification},
manufacturer = #{manufacturer},
now_in = #{nowIn},
url = #{url},
should_slow = #{shouldSlow},
suspend_url = #{suspendUrl},
other_url = #{otherUrl},
where id = #{id}
update vaccine_info set is_del = 'Y' where id = #{id}
update vaccine_info set is_del = 'Y' where id in
#{id}