INSERT INTO ma_type_put_in_storage_info
put_in_type,
num,
num,
type_id,
creator,
code,
remarks,
create_time
VALUES
#{putInType},
#{num},
#{totalNum},
#{typeId},
#{creator},
#{code},
#{remarks},
sysdate()
INSERT INTO ma_type_put_in_storage_details (
num,
num,
info_id,
type_id,
ma_id,
remarks,
ma_code,
)
VALUES (
1,
#{putInStoreNum},
#{infoId},
#{typeId},
#{maId},
#{remark},
#{maCode},
)
insert into ma_machine (
type_id,
ma_code,
ma_status,
buy_price,
ma_vender,
check_man,
out_fac_code,
this_check_time,
next_check_time,
create_time
)values(
#{typeId},
#{maCode},
1,
#{buyPrice},
#{maVender},
#{checkMan},
#{outFacCode},
#{thisCheckTime},
#{nextCheckTime},
sysdate()
)
UPDATE ma_type
SET storage_num = IFNULL(storage_num, 0) + #{num},
update_time = now()
and type_id = #{typeId}