update InstrumentInstance set repairStatus = '使用中' where idCardInstanceId is not null and lastInstrumentRepairId is null and repairStatus = '待使用';
update TousseMaintain set tousseDefinitionId = (select icd.tousseDefinitionID from IDCardInstance ici join IDCardDefinition icd on icd.id = ici.idCardDefinitionID where ici.id = TousseMaintain.idCardInstanceID) where idCardInstanceID is not null and tousseDefinitionId is null;