update recyclingDamageItem set tousseItem_ID = (select min(i.id) from TousseItem i,RecyclingDamageRecord r where i.recyclingDamageRecord_id = r.id and recyclingDamageItem.recyclingDamageRecord_ID = r.id);
update recyclingError set materialDefinitionId = (select m.id from MaterialDefinition m 
where (case when m.specification is null then m.name else (m.name + '[' + m.specification + ']') END) = recyclingError.materialName);
update recyclingDamageItem set materialDefinitionId = (select m.id from MaterialDefinition m 
where (case when m.specification is null then m.name else (m.name + '[' + m.specification + ']') END) = recyclingDamageItem.materialName);
update RecyclingError set additionalAmount = amount,additionalTime = missTime where type = '回收记录';
