select record_id, prepare_id, material_code, materail_name, materail_spc, unit,
quantity, product_date, shift_id, status, remark, attr1, attr2, attr3, attr4,
create_by, create_time, update_by, update_time, prod_type, factory_code
from mes_prepare_detail
insert into mes_prepare_detail
record_id,
prepare_id,
material_code,
materail_name,
materail_spc,
unit,
quantity,
product_date,
shift_id,
status,
remark,
attr1,
attr2,
attr3,
attr4,
create_by,
create_time,
update_by,
update_time,
prod_type,
factory_code,
#{recordId},
#{prepareId},
#{materialCode},
#{materailName},
#{materailSpc},
#{unit},
#{quantity},
#{productDate},
#{shiftId},
#{status},
#{remark},
#{attr1},
#{attr2},
#{attr3},
#{attr4},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{prodType},
#{factoryCode},
INSERT INTO mes_prepare_detail (
record_id,prepare_id,material_code,material_name,unit,
quantity,create_by,create_time,factory_code,status,
locator,need_date,recoil,fund_quanlity,buy_flag
)VALUES
(
#{d.recordId},#{d.prepareId},#{d.materialCode},#{d.materailName},#{d.unit},
#{d.quantity},#{d.createBy},#{d.createTime},#{d.factoryCode},#{d.status},
#{d.locator},#{d.needDate},#{d.recoil},#{d.fundQuanlity},#{d.buyFlag}
)
update mes_prepare_detail
prepare_id = #{prepareId},
material_code = #{materialCode},
materail_name = #{materailName},
materail_spc = #{materailSpc},
unit = #{unit},
quantity = #{quantity},
product_date = #{productDate},
shift_id = #{shiftId},
status = #{status},
remark = #{remark},
attr1 = #{attr1},
attr2 = #{attr2},
attr3 = #{attr3},
attr4 = #{attr4},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
prod_type = #{prodType},
factory_code = #{factoryCode},
where record_id = #{recordId}
delete from mes_prepare_detail where record_id = #{recordId}
delete from mes_prepare_detail where record_id in
#{recordId}