select id, supplier_id,origin_place,entrance_time, variety, transport_vehicle, weight, pigpens, animal_cert_no,animal_cert_pics, cargo_owner, company_no, cargo_owner_phone, animal_category, amount, units, useto, from_place, to_place, carrier, carrier_phone, animal_eartags, remark, create_time,create_by, update_time, update_by, del_flag from entrance_batch
insert into entrance_batch
supplier_id,
origin_place,
entrance_time,
variety,
transport_vehicle,
weight,
pigpens,
animal_cert_no,
animal_cert_pics,
cargo_owner,
company_no,
cargo_owner_phone,
animal_category,
amount,
units,
useto,
from_place,
to_place,
carrier,
carrier_phone,
animal_eartags,
remark,
create_time,
create_by,
del_flag
#{supplierId},
#{originPlace},
#{entranceTime},
#{variety},
#{transportVehicle},
#{weight},
#{pigpens},
#{animalCertNo},
#{animalCertPics},
#{cargoOwner},
#{companyNo},
#{cargoOwnerPhone},
#{animalCategory},
#{amount},
#{units},
#{useto},
#{fromPlace},
#{toPlace},
#{carrier},
#{carrierPhone},
#{animalEartags},
#{remark},
#{createTime},
#{createBy},
'0'
update entrance_batch
supplier_id = #{supplierId},
origin_place = #{originPlace},
entrance_time = #{entranceTime},
variety = #{variety},
transport_vehicle = #{transportVehicle},
weight = #{weight},
pigpens = #{pigpens},
animal_cert_no = #{animalCertNo},
animal_cert_pics = #{animalCertPics},
cargo_owner = #{cargoOwner},
company_no = #{companyNo},
cargo_owner_phone = #{cargoOwnerPhone},
animal_category = #{animalCategory},
amount = #{amount},
units = #{units},
useto = #{useto},
from_place = #{fromPlace},
to_place = #{toPlace},
carrier = #{carrier},
carrier_phone = #{carrierPhone},
animal_eartags = #{animalEartags},
remark = #{remark},
update_time = #{updateTime},
update_by = #{updateBy},
where id = #{id}
update entrance_batch set del_flag = '2' where id = #{id}
update entrance_batch set del_flag = '2' where id in
#{id}