update ProxyDisinfection set receiveStatus = '已接收' where id in (select id from InvoicePlan where isConvertPackingRecord = '是' and deliverStatus in ('已发货','部分发货','待发货')); update ProxyDisinfection set receiveStatus = '待接收' where id in (select id from InvoicePlan where isConvertPackingRecord = '是' and deliverStatus = '待接收'); update ProxyDisinfection set receiveStatus = '部分接收' where id in (select id from InvoicePlan where isConvertPackingRecord = '是' and deliverStatus = '部分接收'); update InvoicePlan set deliverStatus = '待发货' where deliverStatus in ('待接收','部分接收'); update Tousseitem set hasReceivedAmount = (select count(*) from Tousseinstance where hasReceived = '是' and tousseDefinition_id = Tousseitem.Toussedefinitionid and ProxyDisinfection_id = Tousseitem.recyclingApplication_ID) where recyclingApplication_ID in (select id from InvoicePlan where isConvertPackingRecord = '是');