select bbi.barcode_id,
bbi.print_time,
bbi.print_person,
bbi.batch_flag,
bbi.barcode_type,
bbi.barcode_info,
bbi.batch_code,
bbi.pallet_info_code,
bbi.bind_barcode,
bbi.material_id,
bmi.material_name,
bbi.manufacturer_id,
bbi.amount,
bbi.machine_name,
bbi.print_number,
bbi.po_no,
bbi.production_date,
bbi.accepted_date,
bbi.last_outstock_date,
bbi.plan_code,
bbi.plan_detail_code,
bbi.sale_order_id,
bbi.saleorder_code,
bbi.project_no,
bbi.print_flag,
bbi.serial_number,
bbi.remark,
bbi.bind_status,
bbi.bind_by,
bbi.bind_time,
bbi.update_by,
bbi.update_time
from mes_base_barcode_info bbi
left join mes_base_material_info bmi on bmi.material_id = bbi.material_id
insert into mes_base_barcode_info
print_time,
print_person,
print_flag,
batch_flag,
barcode_type,
barcode_info,
batch_code,
pallet_info_code,
material_id,
manufacturer_id,
amount,
machine_name,
print_number,
po_no,
production_date,
accepted_date,
last_outstock_date,
plan_code,
plan_detail_code,
sale_order_id,
saleorder_code,
project_no,
serial_number,
remark,
bind_status,
bind_by,
bind_time,
update_by,
update_time,
#{printTime},
#{printPerson},
#{printFlag},
#{batchFlag},
#{barcodeType},
#{barcodeInfo},
#{batchCode},
#{palletInfoCode},
#{materialId},
#{manufacturerId},
#{amount},
#{machineName},
#{printNumber},
#{poNo},
#{productionDate},
#{acceptedDate},
#{lastOutstockDate},
#{planCode},
#{planDetailCode},
#{saleOrderId},
#{saleorderCode},
#{projectNo},
#{serialNumber},
#{remark},
#{bindStatus},
#{bindBy},
#{bindTime},
#{updateBy},
#{updateTime},
update mes_base_barcode_info
print_time = #{printTime},
print_person = #{printPerson},
batch_flag = #{batchFlag},
print_flag = #{printFlag},
barcode_type = #{barcodeType},
barcode_info = #{barcodeInfo},
batch_code = #{batchCode},
pallet_info_code = #{palletInfoCode},
material_id = #{materialId},
manufacturer_id = #{manufacturerId},
amount = #{amount},
machine_name = #{machineName},
print_number = #{printNumber},
po_no = #{poNo},
production_date = #{productionDate},
accepted_date = #{acceptedDate},
last_outstock_date = #{lastOutstockDate},
plan_code = #{planCode},
plan_detail_code = #{planDetailCode},
sale_order_id = #{saleOrderId},
saleorder_code = #{saleorderCode},
project_no = #{projectNo},
serial_number = #{serialNumber},
remark = #{remark},
bind_status = #{bindStatus},
bind_by = #{bindBy},
bind_time = #{bindTime},
update_by = #{updateBy},
update_time = #{updateTime},
where barcode_id = #{barcodeId}
delete
from mes_base_barcode_info
where barcode_id = #{barcodeId}
delete from mes_base_barcode_info where barcode_id in
#{barcodeId}