Index: ssts-web/src/main/webapp/dataUpdater/sqls/5.0.2_5.0.3.sql =================================================================== diff -u -r34844 -r34884 --- ssts-web/src/main/webapp/dataUpdater/sqls/5.0.2_5.0.3.sql (.../5.0.2_5.0.3.sql) (revision 34844) +++ ssts-web/src/main/webapp/dataUpdater/sqls/5.0.2_5.0.3.sql (.../5.0.2_5.0.3.sql) (revision 34884) @@ -1,2 +1,4 @@ update TousseItem set packageStatus = '待二次回收' where recyclingApplication_ID in (select ip.id from ForeignTousseApplication fta join invoicePlan ip on ip.id = fta.id where ip.recyclingStatus = '待回收' and fta.packageStatus = '已使用') and packageStatus is null; +update TousseItem set packageStatus = '已接收' where recyclingApplication_ID in (select id from ForeignTousseApplication where packageStatus = '部分接收') and packageStatus is null and recyclingamount > 0; +update TousseItem set packageStatus = '待接收' where recyclingApplication_ID in (select id from ForeignTousseApplication where packageStatus = '部分接收') and packageStatus is null and recyclingamount is null; update TousseItem set packageStatus = (select packageStatus from ForeignTousseApplication where id = TousseItem.recyclingApplication_ID) where recyclingApplication_ID in (select id from ForeignTousseApplication) and packageStatus is null; \ No newline at end of file