Index: ssts-web/src/main/webapp/dataUpdater/4.0升级4.1脚本/配置一级供应室的器械包及服务临床脚本_oracle.sql =================================================================== diff -u -r13239 -r13388 --- ssts-web/src/main/webapp/dataUpdater/4.0升级4.1脚本/配置一级供应室的器械包及服务临床脚本_oracle.sql (.../配置一级供应室的器械包及服务临床脚本_oracle.sql) (revision 13239) +++ ssts-web/src/main/webapp/dataUpdater/4.0升级4.1脚本/配置一级供应室的器械包及服务临床脚本_oracle.sql (.../配置一级供应室的器械包及服务临床脚本_oracle.sql) (revision 13388) @@ -14,16 +14,26 @@ begin dbms_output.put_line('һ����Ӧ�ұ���='||cssdCode||',����='||cssdName); + delete from CssdHandleTousses; + + --��е������δ���ô�����ҵ���е�� insert into CssdHandleTousses (id, orgUnitCode ,orgUnitName ,tousseDefinitionId ,tousseName ) select HIBERNATE_SEQUENCE.Nextval, cssdCode,cssdName,td.id,td.name from TousseDefinition td where td.forDisplay='1' - and td.id not in (select tousseDefinitionId from CssdHandleTousses); + and (td.handlerDepartCode is null or len(td.handlerDepartCode) = 0) + and td.id not in (select tousseDefinitionId from CssdHandleTousses); + --��е�����������ô�����ҵ���е�� + insert into CssdHandleTousses (orgUnitCode,orgUnitName,tousseDefinitionId,tousseName) + select td.handlerDepartCode,td.handlerDepartName,td.id,td.name from TousseDefinition td where td.forDisplay='1' + and td.handlerDepartCode is not null and len(td.handlerDepartCode) > 0 + and td.id not in (select tousseDefinitionId from CssdHandleTousses) + delete from CssdServiceDepts; insert into CssdServiceDepts(id,clinicOrgUnitCode ,clinicOrgUnitId ,clinicOrgUnitName Index: ssts-web/src/main/webapp/dataUpdater/4.0升级4.1脚本/配置一级供应室的器械包及服务临床脚本_sqlserver.sql =================================================================== diff -u -r13239 -r13388 --- ssts-web/src/main/webapp/dataUpdater/4.0升级4.1脚本/配置一级供应室的器械包及服务临床脚本_sqlserver.sql (.../配置一级供应室的器械包及服务临床脚本_sqlserver.sql) (revision 13239) +++ ssts-web/src/main/webapp/dataUpdater/4.0升级4.1脚本/配置一级供应室的器械包及服务临床脚本_sqlserver.sql (.../配置一级供应室的器械包及服务临床脚本_sqlserver.sql) (revision 13388) @@ -10,16 +10,30 @@ begin tran begin try +delete from CssdHandleTousses; +--��е������δ���ô�����ҵ���е�� insert into CssdHandleTousses ( [orgUnitCode] ,[orgUnitName] ,[tousseDefinitionId] ,[tousseName] ) select @cssdCode,@cssdName,td.id,td.name from TousseDefinition td where td.forDisplay='1' +and (td.handlerDepartCode is null or len(td.handlerDepartCode) = 0) and td.id not in (select tousseDefinitionId from CssdHandleTousses) +--��е�����������ô�����ҵ���е�� +insert into CssdHandleTousses ( +[orgUnitCode] + ,[orgUnitName] + ,[tousseDefinitionId] + ,[tousseName] +) +select td.handlerDepartCode,td.handlerDepartName,td.id,td.name from TousseDefinition td where td.forDisplay='1' +and td.handlerDepartCode is not null and len(td.handlerDepartCode) > 0 +and td.id not in (select tousseDefinitionId from CssdHandleTousses) +delete from CssdServiceDepts; insert into CssdServiceDepts([clinicOrgUnitCode] ,[clinicOrgUnitId] ,[clinicOrgUnitName]