Index: ssts-web/src/main/webapp/dataUpdater/4.0升级4.1脚本/服务器启动之后执行的脚本.txt =================================================================== diff -u -r13754 -r20836 --- ssts-web/src/main/webapp/dataUpdater/4.0升级4.1脚本/服务器启动之后执行的脚本.txt (.../服务器启动之后执行的脚本.txt) (revision 13754) +++ ssts-web/src/main/webapp/dataUpdater/4.0升级4.1脚本/服务器启动之后执行的脚本.txt (.../服务器启动之后执行的脚本.txt) (revision 20836) @@ -98,3 +98,10 @@ select count(0),'��е��',tousseName,'��Ժ��Ӧ��',(select orgUnitCoding from OrgUnit where name='��Ժ��Ӧ��'),tousseDefinition_id,'��Ժ��Ӧ�Ҳֿ�',(select id from WareHouse where name='��Ժ��Ӧ�Ҳֿ�') from TousseInstance where status in ('�����','������') group by tousseName,tousseDefinition_id; insert into GoodsStock(amount,goodsType,name,orgUnitName,orgUnitCode,materialDefinitionId,wareHouseName,wareHouseId) select sum(m.storage),'����',name,'��Ժ��Ӧ��',(select orgUnitCoding from OrgUnit where name='��Ժ��Ӧ��'),id,'��Ժ��Ӧ�Ҳֿ�',(select id from WareHouse where name='��Ժ��Ӧ�Ҳֿ�') from MaterialDefinition m group by id , name; + +--9.�ⲿ������������ݴ��� +update TousseInstance set invoicePlanId=(select foreignProxyDisinfection_id from ForeignProxyItem where id=TousseInstance.foreignProxyItem_id ) where invoicePlanId is null; +update ForeignProxyItem set invoicePlanId=foreignProxyDisinfection_id where foreignProxyDisinfection_id is not null and invoicePlanId is null; + +update TousseInstance set applicationTousseItemId=(select id from TousseItem where recyclingApplication_ID=TousseInstance.invoicePlanId and tousseName=TousseInstance.tousseName ) where foreignProxyItem_id is not null and applicationTousseItemId is null; +update ForeignProxyItem set tousseItemId = (select id from TousseItem where recyclingApplication_ID=ForeignProxyItem.foreignProxyDisinfection_id and tousseName=ForeignProxyItem.tousseName) where tousseItemId is null;