主表:T_BF_WRITEBACKRULE
多语言表:T_BF_WRITEBACKRULE_L
通过反写规则的名字在多语言表找到反写规则的唯一标识,两个表的通过唯一标识关联。
SELECT * FROM dbo.T_BF_WRITEBACKRULE WHERE FID='f899a3be-be66-45ce-b9af-0078e3fa77bf'
SELECT * FROM dbo.T_BF_WRITEBACKRULE_L WHERE FID='f899a3be-be66-45ce-b9af-0078e3fa77bf'
--FNAME='售后单变更单【保存】反写售后单的变更状态'
两种方式:BOS导入或者数据库执行执行,选择一个就可以了。
/****** 插入主表 ******/
DELETE T_BF_WRITEBACKRULE WHERE FID='f899a3be-be66-45ce-b9af-0078e3fa77bf';
INSERT INTO T_BF_WRITEBACKRULE(FID,FMODELTYPEID,FSUBSYSID,FMODELTYPESUBID,FVERSION,FISTEMPLATE,FKERNELXML,FBASEOBJECTID,FDEVTYPE,FSUPPLIERNAME,FPASSWORD,FINHERITPATH,FMODIFIERID,FMODIFYDATE,FCOMPUTERINFO,FSOURCEFORMID,FTARGETFORMID,FAUTOFITFREEFLOW,FPACKAGEID,FAUTOFITALLFLOWS,FSYSSTATUS,FMAINVERSION) VALUES ('f899a3be-be66-45ce-b9af-0078e3fa77bf',780,null,0,'638351193584503556',null,null,' ',0,'XXXX',null,N' ',102069,{ts'2023-11-09 09:35:59'},'efe6cd0f-95d5-4a44-bb3b-0a11c690664a(MAC:efe6cd0f-95d5-4a44-bb3b-0a11c690664a)>GATE:127.0.0.1;efe6cd0f-95d5-4a44-bb3b-0a11c690664a','XXXX_AS_AfterOrder','XXXX_AS_AfterOrderBG','1',null,'1','0','638351193584503556') ;
/****** 插入多语言表 ******/
DELETE T_BF_WRITEBACKRULE_L WHERE FID='f899a3be-be66-45ce-b9af-0078e3fa77bf';
INSERT INTO T_BF_WRITEBACKRULE_L(FPKID,FID,FLOCALEID,FNAME,FKERNELXMLLANG,FDESCRIPTION) VALUES ('6928A260-17DA-41E5-A782-E0496931CBED','f899a3be-be66-45ce-b9af-0078e3fa77bf',2052,N'售后单变更单【保存】反写售后单的变更状态',null,N' ') ;
--执行XML的更新,查询被同步的数据库名的表数据,然后执行更新
UPDATE T_BF_WRITEBACKRULE SET T_BF_WRITEBACKRULE.FKERNELXML=t.FKERNELXML FROM
(
SELECT FID,FKERNELXML FROM 被同步的数据库名.dbo.T_BF_WRITEBACKRULE
WHERE FID ='f899a3be-be66-45ce-b9af-0078e3fa77bf'
--多个 IN ('aa4e35a0-9d37-4158-8697-4aee6fdc40b5','f899a3be-be66-45ce-b9af-0078e3fa77bf')
) t
WHERE t.fid=T_BF_WRITEBACKRULE.fid;
如果 XML执行更新有障碍,或者是云服务器未开外网,那就 数据库脚本直接执行,xml文件可以通过bos导入。