update TousseInstance set isRoutine='是' where invoice_id is not null and sterilizationRecord_id in ( select sr.id from SterilizationRecord sr,TousseInstance ti where ti.sterilizationRecord_id=sr.id and (sr.biologyResult is null or sr.biologyResult<>'不合格') and (sr.biologicalMonitoringStartDate is null or sr.biologicalMonitoringEndDateti.invoiceSendTime or sr.biologyResult='不合格') );