order_code,material_id,purchase_num,arrival_num,type,qualified_num,disqualification_num,wbs,arrival_time,measurement_id,supplier_id,entry_number,warehousing_num
insert into tld_warehousing_virtual(unique_code,num,storage_location_code,wllb_code,supp_id,serial,type,produc_date,capacity,seq,user_id,storage_location_name,attribute,notice_id,warehouse_transfer_id)
values(#{uniqueCode},#{num},#{storageLocationCode},#{wllbCode},#{suppId},#{serial},#{type},#{producDate},#{capacity},#{seq},#{userId},#{storageLocationName},#{attribute},#{noticeId},#{warehouseTransferId})
delete from tld_warehousing_virtual where serial = #{serial} and wllb_code = #{wllbCode} and produc_date = #{producDate} and supp_id = #{suppId}
update tld_receive_goods
set
warehousing_num = warehousing_num + #{warehousingNum}
where id = #{id}
insert into tld_storage(wllb_code,supplier_id,serial,produc_date,produc_batch,capacity,seq,type,user_id,department_id,storage_location_code,scrq)
values
(#{item.wllbCode},#{item.suppId},#{item.serial},#{item.producDate},#{item.producDate},#{item.num},#{item.seq},#{item.type},#{item.userId},#{item.departmentId},#{item.storageLocationCode},now())
insert into tld_inventory(storage_location_code,wllb_class,material_id,amount,totime,hold,amount_lock,account_sleeve,wbs,supplier_id,serial,wllb_code,produc_date,scrq,produc_batch)
values
(#{item.storageLocationCode},#{item.wllbClass},#{item.materialId},#{item.num},now(),'0','0',#{item.accountSleeve},#{item.wbs},#{item.suppId},#{item.serial},#{item.wllbCode},#{item.producDate}, now(),#{item.producDate})
delete from tld_warehousing_virtual where unique_code = #{uniqueCode}
insert into tld_return_gs_warehousing(storage_code,gs_ck,source_type,move_type,entry_number,wbs,material_id,warehousing_num,receive_goods_id,scrq,order_number,user_name,storage_location_code)
values(#{storageCode},#{gsCk},#{sourceType},#{moveType},#{entryNumber},#{wbs},#{materialId},#{warehousingNum},#{id},now(),#{orderNumber},#{userName},#{storageLocationCode});
insert into
tld_inventory(storage_location_code,material_id,amount,hold,amount_lock,account_sleeve,wbs,produc_date,scrq,wllb_class,produc_batch,attribute)
value(#{storageLocationCode},#{materialId},#{warehousingNum},'0','0',#{companyNumber},#{wbs},now(),now(),#{wllbClass},#{producBatch},#{attribute});
update tld_notice set warehousing_num = #{warehousingNum},type = '1' where notice_id = #{noticeId} and material_id = #{materialId}
update tld_inventory set amount = amount + #{warehousingNum} where storage_location_code = #{storageLocationCode};
update tld_notice set warehousing_num = #{warehousingNum},type = '1' where notice_id = #{noticeId} and material_id = #{materialId}
delete from tld_inventory where storage_location_code = #{storageLocationCode} and material_id = #{materialId}
update tld_inventory set amount = amount - #{warehousingNum} where storage_location_code = #{storageLocationCode} and material_id = #{materialId}
insert into tld_half_product(wllb_code,produc_date,produc_batch,capacity,user_id,storage_location_code,scrq)
value(#{wllbCode},#{producDate},#{producDate},#{num},#{userId},#{storageLocationCode},now())
update tld_ask_goods set out_num = out_num + #{warehousingNum},type = '1' where id = #{id}
insert into tld_removal_half_product(wllb_code,num,user_id,scrq,ask_goods_id,department)
value(#{wllbCode},#{num},#{userId},now(),#{askGoodsId},#{department})
insert into tld_half(wllb_code,produc_date,produc_batch,capacity,user_id,storage_location_code,scrq,serial,seq,attribute)
value(#{wllbCode},#{producDate},#{producDate},#{num},#{userId},#{storageLocationCode},now(),#{serial},#{seq},#{attribute})