--增加分类 GO IF EXISTS(SELECT * FROM SYS_ScriptCategories WHERE id=177) Delete from SYS_ScriptCategories WHERE id=177 insert into SYS_ScriptCategories(ID,Code,Name,ComponentID,xRowNum,ParentID,xLevel,Description) Values(177, 'FileStorageClient', '文件存储接口', 9014, 0, 0, 0, Null) GO --删除旧记录 delete from SYS_Scripts where id=17968 --删除脚本内容 GO GO IF EXISTS(SELECT * FROM SYS_Scripts WHERE id=17968) Delete from SYS_Scripts WHERE id=17968 insert into SYS_Scripts(ID,CategoryID,Code,Name,Description,xType,DatasourceID,DisplayNames,xRowNum,xText,UpdateDate,UpdateUser,UpdateMode,Custom) Values(17968, 177, 'SQL_获取RIS上传目录', '获取RIS上传目录', '获取RIS上传目录', 1, 0, Null, 1, 'declare @ID int,@Mode int set @ID = %d set @Mode =%d declare @Param201 varchar(10) select @Param201 = Value from SYS_Parameters with(nolock) where ProductID = 9014 and programid = 9014001 and ParamNo = 201 if @Mode = 1 begin select BBC01 FirstPath, CONVERT(VARCHAR(10), PAA74, 120 ) SecondPath, case when @Param201 = ''True'' then PAA06 + ''('' + PAA07 + '')'' ELSE PAA06 END ThirdPath from PAA1 with(nolock) where PAA01 = @ID end else if @Mode = 2 select '''' FirstPath, '''' SecondPath, '''' ThirdPath else if @Mode = 3 begin select CONVERT(VARCHAR(10), LAB40, 120 ) FirstPath,LAB01 SecondPath, '''' ThirdPath from LAB1 WITH(NOLOCK) WHERE LAB01 = @ID end else if @Mode = 4 begin select @ID FirstPath,'''' SecondPath, '''' ThirdPath end else if @Mode = 6 begin select VAA07 FirstPath,'''' SecondPath, '''' ThirdPath from CBM1 with(nolock) WHERE CBM01 = @ID end else if @Mode = 7 begin select VAE94 FirstPath,'''' SecondPath, '''' ThirdPath from VAE1 with(nolock) WHERE VAE01 = @ID end else if @Mode = 9 begin select CONVERT(VARCHAR(10), VAT08, 120 ) FirstPath, CAST(VAA07 AS VARCHAR(10)) SecondPath, '''' ThirdPath from VAT1 with(nolock) WHERE VAT01 = @ID end else if @Mode = 10 begin --查询分类 select @ID FirstPath, '''' SecondPath, '''' ThirdPath end else if @Mode = 11 begin select @ID FirstPath, '''' SecondPath, '''' ThirdPath end else if @Mode = 13 begin select @ID FirstPath, '''' SecondPath, '''' ThirdPath end else if @Mode = 14 begin select @ID FirstPath, '''' SecondPath, '''' ThirdPath end else if @Mode = 15 begin select @ID FirstPath, '''' SecondPath, '''' ThirdPath end else if @Mode = 16 begin select @ID FirstPath,'''' SecondPath, '''' ThirdPath end else if @Mode = 17 begin select @ID FirstPath,'''' SecondPath, '''' ThirdPath end else if @Mode = 18 begin select @ID FirstPath,'''' SecondPath, '''' ThirdPath end else if @Mode = 19 begin select @ID FirstPath,'''' SecondPath, '''' ThirdPath end else if @Mode = 20 begin select @ID FirstPath,'''' SecondPath, '''' ThirdPath end else if @Mode = 21 begin select @ID FirstPath,'''' SecondPath, '''' ThirdPath end else if @Mode = 22 begin select @ID FirstPath,'''' SecondPath, '''' ThirdPath end else if @Mode = 23 begin select @ID FirstPath,'''' SecondPath, '''' ThirdPath end else begin select @ID FirstPath,'''' SecondPath, '''' ThirdPath end ', '2021-12-02 15:01:05', '(1000020)单金龙', 0, 0) GO If EXISTS(SELECT * from Sys_CustomScripts WHERE ID = 17968) Update a SET a.Custom = b.Custom from SYS_Scripts a join Sys_CustomScripts b on b.ID = a.ID where a.ID=17968 GO