—文件服务存储目录定义信息
SELECT FFILESERVERDIRID,FDIRPATH,FISDEFAULT,FTENANTDIR FROM AIS20220114110931.dbo.T_BAS_FILESERVERDIRINFO
默认值:-999999,‘TempfilePath’,0,‘’
insert into T_BAS_FILESERVERDIRINFO (FFILESERVERDIRID,FDIRPATH,FISDEFAULT,FTENANTDIR) values(113837,‘d:\soft’,1,‘’)
—文件服务器定义
SELECT FID,FK3CLOUDHOST,FSCHEME,FFILESERVERHOST,FPORT,FVIRDIR,FUSED,FENABLE,FCREATEDATE FROM AIS20220114110931.dbo.T_BAS_FILESERVERINFO
sqlserver
insert into T_BAS_FILESERVERINFO(FID,FK3CLOUDHOST,FSCHEME,FFILESERVERHOST,FPORT,FVIRDIR,FUSED,FENABLE,FCREATEDATE) values(‘113838’,‘localhost’,‘http’,‘127.0.0.1’,NULL,‘K3CloudFileServer’,‘1’,‘0’,‘2022-07-06 16:44:07.550’)
oracle
insert into T_BAS_FILESERVERINFO(FID,FK3CLOUDHOST,FSCHEME,FFILESERVERHOST,FPORT,FVIRDIR,FUSED,FENABLE,FCREATEDATE) values(113838,‘localhost’,‘http’,‘127.0.0.1’,NULL,‘K3CloudFileServer’,1,0,to_date(‘2022-07-06 16:44:07’,‘yyyy-mm-dd hh24:mi:ss’))
------------------------------------------------------------------------文件信息
—文件服务器中文件信息
SELECT FFILEID,FFILESERVERDIRID,FFILENAME,FLOCATIONPATH,FRELATIVEPATH,FCREATEDATE,FCREATORID,FFILESIZE,FISCOMPLETED,FSWFLOCATIONPATH,FSWFCOUNT,FFILESTORAGE,FFILESERVERID,FPREVIEWFILEPATH,FTHUMBNAILID FROM AIS20220114110931.dbo.T_BAS_FILESERVERFILEINFO
insert into T_BAS_FILESERVERFILEINFO (FFILEID,FFILESERVERDIRID,FFILENAME,FLOCATIONPATH,FRELATIVEPATH,FCREATEDATE,FCREATORID,FFILESIZE,FISCOMPLETED,FSWFLOCATIONPATH,FSWFCOUNT,FFILESTORAGE,FFILESERVERID,FPREVIEWFILEPATH,FTHUMBNAILID) values(‘da7c7edf86ed45eaabd5b78000368215’,‘113837’,‘api接口文档.txt’,‘d:\soft\Doc\2022\da7c7edf86ed45eaabd5b78000368215.txt’,‘/Doc/2022/da7c7edf86ed45eaabd5b78000368215.txt’,‘2022-07-07 09:46:16.440’,‘0’,‘2585’,‘1’,‘convertError’,‘0’,‘0’,‘113838’,‘’,‘’)
FFILEID:da7c7edf86ed45eaabd5b78000368215 FFILESERVERDIRID:113837 FFILENAME:api接口文档.txt FLOCATIONPATHd:\soft\Doc\2022\da7c7edf86ed45eaabd5b78000368215.txt FRELATIVEPATH:/Doc/2022/da7c7edf86ed45eaabd5b78000368215.txt FCREATEDATE:2022-07-07 09:46:16.440 FCREATORID:0 FFILESIZE:2585 FISCOMPLETED:1 FSWFLOCATIONPATH:convertError FSWFCOUNT:0 FFILESTORAGE:0 FFILESERVERID:113838 FPREVIEWFILEPATH:‘’ FTHUMBNAILID:NULL
—附件信息
SELECT FID,FBILLTYPE,FINTERID,FENTRYKEY,FATTACHMENTNAME,FBILLNO,FATTACHMENTSIZE,FCREATETIME,FAUDITTIME,FBILLSTATUS,FATTACHMENT,FAUDITMEN,FCREATEMEN,FENTRYINTERID,FMODIFYTIME,FALIASFILENAME,FEXTNAME,FNUMBER,FMODIFYMEN,FFILEID,FFILESTORAGE,FISALLOWDOWNLOAD,FTHUMBNAILID,FSOURCEID
FROM AIS20220114110931.dbo.T_BAS_ATTACHMENT
insert into T_BAS_ATTACHMENT(FID,FBILLTYPE,FINTERID,FENTRYKEY,FATTACHMENTNAME,FBILLNO,FATTACHMENTSIZE,FCREATETIME,FAUDITTIME,FBILLSTATUS,FATTACHMENT,FAUDITMEN,FCREATEMEN,FENTRYINTERID,FMODIFYTIME,FALIASFILENAME,FEXTNAME,FNUMBER,FMODIFYMEN,FFILEID,FFILESTORAGE,FISALLOWDOWNLOAD,FTHUMBNAILID,FSOURCEID) values
(‘113841’,‘STK_InStock’,‘100004’,’ ‘,‘api接口文档.txt’,‘CGRK00001’,‘2.52’,‘2022-07-07 09:46:16.980’,NULL,‘A’,NULL,NULL,‘100073’,’-1’,NULL,NULL,‘.txt’,NULL,NULL,‘da7c7edf86ed45eaabd5b78000368215’,‘1’,‘0’,NULL,‘0’)
FID:113841 FBILLTYPE:STK_InStock FINTERID:‘’ FENTRYKEY:100004 FATTACHMENTNAME:api接口文档.txt FBILLNO:CGRK00001 FATTACHMENTSIZE:2.52 FCREATETIME:2022-07-07 09:46:16.980 FAUDITTIME:NULL FBILLSTATUS:A FATTACHMENT:NULL FAUDITMEN:NULL FCREATEMEN:100073 FENTRYINTERID:-1 FMODIFYTIME:NULL FALIASFILENAME:NULL FEXTNAME:.txt FNUMBER:NULL FMODIFYMEN:NULL FFILEID:da7c7edf86ed45eaabd5b78000368215 FFILESTORAGE:1 FISALLOWDOWNLOAD:0 FTHUMBNAILID:NULL FSOURCEID:0
113837 文件服务器目录配置id
113838 文件服务器id
----------------------------------------扩展部分
SELECT TOP 1 * FROM T_BOS_REGISTER WHERE FDATACENTERID = ‘61e0e9ca2743d3’
—根据内容确定具体是那种存储方式
SELECT * FROM T_Meta_StorageService WHERE FUSED = 1
insert into T_Meta_StorageService(FID,FCLASSNAME,FCONFIGFORMID,FKERNELXML,FUSED) values(‘-111111’,‘FileServerClassName’,‘NULL’,‘NULL’,‘1’)
FCLASSNAME:
FileServerClassName 文件服务器
Kingdee.BOS.Business.PlugIn.FileServer.AWSCloudStorageServicePlugin, Kingdee.BOS.Business.PlugIn 亚马逊存储
Kingdee.BOS.Business.PlugIn.FileServer.KingdeeEntpCloudStorageServicePlugin, Kingdee.BOS.Business.PlugIn 金蝶企业云盘
如果该表中为空,则为数据库存储
—这是四种存储方式
SELECT * FROM T_BAS_STORAGESERVICEPLUGIN
FID FSTORAGESERVICECLASS FVALUE
1 FileServerClassName 1
2 Kingdee.BOS.Business.PlugIn.FileServer.AWSCloudStorageServicePlugin, Kingdee.BOS.Business.PlugIn 2
3 Kingdee.BOS.Business.PlugIn.FileServer.KingdeeCloudStorageServicePlugin, Kingdee.BOS.Business.PlugIn 3
4 Kingdee.BOS.Business.PlugIn.FileServer.KingdeeEntpCloudStorageServicePlugin, Kingdee.BOS.Business.PlugIn 4
第一步查询文件存储位置的FID
SELECT b.FNAME AS 枚举类型名称,*
FROM T_META_FORMENUM a
JOIN T_META_FORMENUM_L b ON a.FID=b.FID AND b.FLOCALEID=2052
WHERE b.FNAME=N’文件存储位置’
第二步查询所有文件存储方式的名称
SELECT b.FCAPTION AS 枚举项名称,a.FVALUE AS 枚举项值,*
FROM T_META_FORMENUMITEM a
JOIN T_META_FORMENUMITEM_L b ON a.FENUMID=b.FENUMID AND b.FLOCALEID=2052
WHERE a.FID=‘5f910924-50c4-4c1b-8fd6-d006ef9d2aac’
ORDER BY a.FVALUE
且FVALUE值与T_BAS_STORAGESERVICEPLUGIN中的值匹配