/*删除历史错误旧数据*/
--采购协同--
--近三个月待确认--
DELETE FROM t_bas_filterscheme WHERE FSCHEMEID = '2=OD9KTTSDRP';

DELETE FROM t_bas_filterscheme_l WHERE FID = '2=OD9KTTSDRP' AND FLOCALEID = 'zh_CN';
DELETE FROM t_bas_filterscheme_l WHERE FID = '2=OD9KTTSDRP' AND FLOCALEID = 'en_US';
DELETE FROM t_bas_filterscheme_l WHERE FID = '2=OD9KTTSDRP' AND FLOCALEID = 'zh_TW';
--近三个月待发货--
DELETE FROM t_bas_filterscheme WHERE FSCHEMEID = '2=ODF7ARO+OE';

DELETE FROM t_bas_filterscheme_l WHERE FID = '2=ODF7ARO+OE' AND FLOCALEID = 'zh_CN';
DELETE FROM t_bas_filterscheme_l WHERE FID = '2=ODF7ARO+OE' AND FLOCALEID = 'en_US';
DELETE FROM t_bas_filterscheme_l WHERE FID = '2=ODF7ARO+OE' AND FLOCALEID = 'zh_TW';
--近三个月已发货--
DELETE FROM t_bas_filterscheme WHERE FSCHEMEID = '2=ODMPEQAOUS';

DELETE FROM t_bas_filterscheme_l WHERE FID = '2=ODMPEQAOUS' AND FLOCALEID = 'zh_CN';
DELETE FROM t_bas_filterscheme_l WHERE FID = '2=ODMPEQAOUS' AND FLOCALEID = 'en_US';
DELETE FROM t_bas_filterscheme_l WHERE FID = '2=ODMPEQAOUS' AND FLOCALEID = 'zh_TW';


--近三个月已收货--
DELETE FROM t_bas_filterscheme WHERE FSCHEMEID = '2=ODOTKQZR=2';

DELETE FROM t_bas_filterscheme_l WHERE FID = '2=ODOTKQZR=2' AND FLOCALEID = 'zh_CN';
DELETE FROM t_bas_filterscheme_l WHERE FID = '2=ODOTKQZR=2' AND FLOCALEID = 'en_US';
DELETE FROM t_bas_filterscheme_l WHERE FID = '2=ODOTKQZR=2' AND FLOCALEID = 'zh_TW';



/* 卡片配置 */
--采购协同--
UPDATE t_bas_cardconfig SET FCONFIG = '{"cardType":"bos_card_billstats_list","config":{"7":{"appnum":null,"unit":"1","datatype":"count","filterschema":"2K24KPYHAVLV","scale":"0","menuid":null,"entityid":"pur_order","numtitle":"f:customname","numcolor":"#FF903D"},"8":{"appnum":null,"unit":"1","datatype":"count","filterschema":"2K25SJOJ/FSZ","scale":"0","menuid":null,"entityid":"pur_order","numtitle":"f:customname","numcolor":"#FF903D"},"9":{"appnum":null,"unit":"1","datatype":"count","filterschema":"2K25I25E/XTJ","scale":"0","menuid":null,"entityid":"pur_order","numtitle":"f:customname","numcolor":"#FF903D"},"10":{"appnum":null,"unit":"1","datatype":"count","filterschema":"2K25PZNIPPF5","scale":"0","menuid":null,"entityid":"pur_order","numtitle":"f:customname","numcolor":"#FF903D"}}}' WHERE FMAINPAGEID = 425266310948114432 AND FCARDID = 417940929987533824;


--采购协同--
--近三个月待确认--
delete from t_bas_filterscheme where FSCHEMEID = '2K24KPYHAVLV';
INSERT INTO t_bas_filterscheme (fschemeid, fisshare, fformid, fscheme, fentryentity, fisdefault, fschemename, fnextentryscheme, fcreatetime, fseq, fmodifytime, fisfixed, fuserid) VALUES ('2K24KPYHAVLV', '0', 'pur_order', 'rO0ABXNyABNqYXZhLnV0aWwuQXJyYXlMaXN0eIHSHZnHYZ0DAAFJAARzaXpleHAAAAADdwQAAAADc3IAF2phdmEudXRpbC5MaW5rZWRIYXNoTWFwNMBOXBBswPsCAAFaAAthY2Nlc3NPcmRlcnhyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAx3CAAAABAAAAAHdAAJRmllbGROYW1lc3EAfgAAAAAAAXcEAAAAAXQACGJpbGxkYXRleHQAB0NvbXBhcmVzcQB+AAAAAAABdwQAAAABdAACMjR4dAAFVmFsdWVzcQB+AAAAAAABdwQAAAABdAAAeHQABExlZnRzcQB+AAAAAAABdwQAAAABcQB+AA14dAAFUmlnaHRzcQB+AAAAAAABdwQAAAABcQB+AA14dAAFTG9naWNzcQB+AAAAAAABdwQAAAABc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAB4dAAFZml4ZWRzcgARamF2YS5sYW5nLkJvb2xlYW7NIHKA1Zz67gIAAVoABXZhbHVleHABeABzcQB+AAI/QAAAAAAADHcIAAAAEAAAAAZxAH4ABXNxAH4AAAAAAAF3BAAAAAF0AApiaWxsc3RhdHVzeHEAfgAIc3EAfgAAAAAAAXcEAAAAAXQAAzEwNXhxAH4AC3NxAH4AAAAAAAF3BAAAAAF0AAFDeHEAfgAOc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgAQc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgASc3EAfgAAAAAAAXcEAAAAAXEAfgAWeHgAc3EAfgACP0AAAAAAAAx3CAAAABAAAAAGcQB+AAVzcQB+AAAAAAABdwQAAAABdAAJY2Ztc3RhdHVzeHEAfgAIc3EAfgAAAAAAAXcEAAAAAXQAAzEwNXhxAH4AC3NxAH4AAAAAAAF3BAAAAAF0AAFBeHEAfgAOc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgAQc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgASc3EAfgAAAAAAAXcEAAAAAXEAfgAWeHgAeA==', 'materialentry', '0', '近三个月待确认', '0', {ts'2022-07-05 00:00:00'}, 0, null, '1', 1210069609236019200);


DELETE FROM t_bas_filterscheme_l WHERE FID = '2=OD9KTTSDRP' AND FLOCALEID = 'zh_CN';
INSERT INTO t_bas_filterscheme_l(FID,FSCHEMEID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('2=OD9KTTSDRP','2=OD9KTTSDRP','2=OD9KV=T5JP','zh_CN','单据状态 等于 已审核  并且            确认状态 等于 待确认  并且    业务日期 为 过去三个月  ','近三个月待确认'); 
DELETE FROM t_bas_filterscheme_l WHERE FID = '2=OD9KTTSDRP' AND FLOCALEID = 'en_US';
INSERT INTO t_bas_filterscheme_l(FID,FSCHEMEID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('2=OD9KTTSDRP','2=OD9KTTSDRP','2=OD9KV=T0UX','en_US','单据状态 等于 已审核  并且            确认状态 等于 待确认  并且    业务日期 为 过去三个月  ','近三个月待确认'); 
DELETE FROM t_bas_filterscheme_l WHERE FID = '2=OD9KTTSDRP' AND FLOCALEID = 'zh_TW';
INSERT INTO t_bas_filterscheme_l(FID,FSCHEMEID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES ('2=OD9KTTSDRP','2=OD9KTTSDRP','2=OD9KV=T5JQ','zh_TW','单据状态 等于 已审核  并且            确认状态 等于 待确认  并且    业务日期 为 过去三个月  ','近三个月待确认'); 

--近三个月待发货--
delete from t_bas_filterscheme where FSCHEMEID = '2K25SJOJ/FSZ';
INSERT INTO t_bas_filterscheme (fschemeid, fisshare, fformid, fscheme, fentryentity, fisdefault, fschemename, fnextentryscheme, fcreatetime, fseq, fmodifytime, fisfixed, fuserid) VALUES ('2K25SJOJ/FSZ', '0', 'pur_order', 'rO0ABXNyABNqYXZhLnV0aWwuQXJyYXlMaXN0eIHSHZnHYZ0DAAFJAARzaXpleHAAAAADdwQAAAADc3IAF2phdmEudXRpbC5MaW5rZWRIYXNoTWFwNMBOXBBswPsCAAFaAAthY2Nlc3NPcmRlcnhyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAx3CAAAABAAAAAHdAAJRmllbGROYW1lc3EAfgAAAAAAAXcEAAAAAXQACGJpbGxkYXRleHQAB0NvbXBhcmVzcQB+AAAAAAABdwQAAAABdAACMjR4dAAFVmFsdWVzcQB+AAAAAAABdwQAAAABdAAAeHQABExlZnRzcQB+AAAAAAABdwQAAAABcQB+AA14dAAFUmlnaHRzcQB+AAAAAAABdwQAAAABcQB+AA14dAAFTG9naWNzcQB+AAAAAAABdwQAAAABc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAB4dAAFZml4ZWRzcgARamF2YS5sYW5nLkJvb2xlYW7NIHKA1Zz67gIAAVoABXZhbHVleHABeABzcQB+AAI/QAAAAAAADHcIAAAAEAAAAAZxAH4ABXNxAH4AAAAAAAF3BAAAAAF0AApiaWxsc3RhdHVzeHEAfgAIc3EAfgAAAAAAAXcEAAAAAXQAAzEwNXhxAH4AC3NxAH4AAAAAAAF3BAAAAAF0AAFDeHEAfgAOc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgAQc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgASc3EAfgAAAAAAAXcEAAAAAXEAfgAWeHgAc3EAfgACP0AAAAAAAAx3CAAAABAAAAAGcQB+AAVzcQB+AAAAAAABdwQAAAABdAAJbG9nc3RhdHVzeHEAfgAIc3EAfgAAAAAAAXcEAAAAAXQAAjE3eHEAfgALc3EAfgAAAAAAAncEAAAAAnQAAUF0AAFCeHEAfgAOc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgAQc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgASc3EAfgAAAAAAAXcEAAAAAXEAfgAWeHgAeA==', 'materialentry', '0', '近三个月待发货', '0', {ts'2022-07-05 00:00:00'}, 0, null, '1', 1210069609236019200);

delete from t_bas_filterscheme_l where fid = '2K25SJOJ/FSZ' AND FLOCALEID = 'zh_CN';
delete from t_bas_filterscheme_l where fid = '2K25SJOJ/FSZ' AND FLOCALEID = 'en_US';
delete from t_bas_filterscheme_l where fid = '2K25SJOJ/FSZ' AND FLOCALEID = 'zh_TW';
INSERT INTO t_bas_filterscheme_l (fid, fschemeid, fpkid, flocaleid, fdescription, fname) VALUES ('2K25SJOJ/FSZ', '2K25SJOJ/FSZ', '2K25SJOIZD/6', 'zh_CN', '业务日期 为 过去三个月  并且            单据状态 等于 已审核  并且    物流状态 在……中 待发货;部分发货  ', '近三个月待发货');
INSERT INTO t_bas_filterscheme_l (fid, fschemeid, fpkid, flocaleid, fdescription, fname) VALUES ('2K25SJOJ/FSZ', '2K25SJOJ/FSZ', '2K25SJOJ/FT+', 'en_US', '业务日期 为 过去三个月  并且            单据状态 等于 已审核  并且    物流状态 在……中 待发货;部分发货  ', '近三个月待发货');
INSERT INTO t_bas_filterscheme_l (fid, fschemeid, fpkid, flocaleid, fdescription, fname) VALUES ('2K25SJOJ/FSZ', '2K25SJOJ/FSZ', '2K25SJOIZD/7', 'zh_TW', '业务日期 为 过去三个月  并且            单据状态 等于 已审核  并且    物流状态 在……中 待发货;部分发货  ', '近三个月待发货');
 

--近三个月已发货--
delete from t_bas_filterscheme where FSCHEMEID = '2K25I25E/XTJ';
INSERT INTO t_bas_filterscheme (fschemeid, fisshare, fformid, fscheme, fentryentity, fisdefault, fschemename, fnextentryscheme, fcreatetime, fseq, fmodifytime, fisfixed, fuserid) VALUES ('2K25I25E/XTJ', '0', 'pur_order', 'rO0ABXNyABNqYXZhLnV0aWwuQXJyYXlMaXN0eIHSHZnHYZ0DAAFJAARzaXpleHAAAAADdwQAAAADc3IAF2phdmEudXRpbC5MaW5rZWRIYXNoTWFwNMBOXBBswPsCAAFaAAthY2Nlc3NPcmRlcnhyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAx3CAAAABAAAAAHdAAJRmllbGROYW1lc3EAfgAAAAAAAXcEAAAAAXQACGJpbGxkYXRleHQAB0NvbXBhcmVzcQB+AAAAAAABdwQAAAABdAACMjR4dAAFVmFsdWVzcQB+AAAAAAABdwQAAAABdAAAeHQABExlZnRzcQB+AAAAAAABdwQAAAABcQB+AA14dAAFUmlnaHRzcQB+AAAAAAABdwQAAAABcQB+AA14dAAFTG9naWNzcQB+AAAAAAABdwQAAAABc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAB4dAAFZml4ZWRzcgARamF2YS5sYW5nLkJvb2xlYW7NIHKA1Zz67gIAAVoABXZhbHVleHABeABzcQB+AAI/QAAAAAAADHcIAAAAEAAAAAZxAH4ABXNxAH4AAAAAAAF3BAAAAAF0AApiaWxsc3RhdHVzeHEAfgAIc3EAfgAAAAAAAXcEAAAAAXQAAzEwNXhxAH4AC3NxAH4AAAAAAAF3BAAAAAF0AAFDeHEAfgAOc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgAQc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgASc3EAfgAAAAAAAXcEAAAAAXEAfgAWeHgAc3EAfgACP0AAAAAAAAx3CAAAABAAAAAGcQB+AAVzcQB+AAAAAAABdwQAAAABdAAJbG9nc3RhdHVzeHEAfgAIc3EAfgAAAAAAAXcEAAAAAXQAAzEwNXhxAH4AC3NxAH4AAAAAAAF3BAAAAAF0AAFDeHEAfgAOc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgAQc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgASc3EAfgAAAAAAAXcEAAAAAXEAfgAWeHgAeA==', 'materialentry', '0', '近三个月已发货', '0', {ts'2022-07-05 00:00:00'}, 0, null, '1', 1210069609236019200);

delete from t_bas_filterscheme_l where fid = '2K25I25E/XTJ' AND FLOCALEID = 'zh_CN';
delete from t_bas_filterscheme_l where fid = '2K25I25E/XTJ' AND FLOCALEID = 'en_US';
delete from t_bas_filterscheme_l where fid = '2K25I25E/XTJ' AND FLOCALEID = 'zh_TW';
INSERT INTO t_bas_filterscheme_l (fid, fschemeid, fpkid, flocaleid, fdescription, fname) VALUES ('2K25I25E/XTJ', '2K25I25E/XTJ', '2K25I25DZV/S', 'zh_CN', '业务日期 为 过去三个月  并且            单据状态 等于 已审核  并且    物流状态 等于 已发货  ', '近三个月已发货');
INSERT INTO t_bas_filterscheme_l (fid, fschemeid, fpkid, flocaleid, fdescription, fname) VALUES ('2K25I25E/XTJ', '2K25I25E/XTJ', '2K25I25E/XTK', 'en_US', '业务日期 为 过去三个月  并且            单据状态 等于 已审核  并且    物流状态 等于 已发货  ', '近三个月已发货');
INSERT INTO t_bas_filterscheme_l (fid, fschemeid, fpkid, flocaleid, fdescription, fname) VALUES ('2K25I25E/XTJ', '2K25I25E/XTJ', '2K25I25DZV/T', 'zh_TW', '业务日期 为 过去三个月  并且            单据状态 等于 已审核  并且    物流状态 等于 已发货  ', '近三个月已发货');


--近三个月已收货--
delete from t_bas_filterscheme where FSCHEMEID = '2K25PZNIPPF5';
INSERT INTO t_bas_filterscheme (fschemeid, fisshare, fformid, fscheme, fentryentity, fisdefault, fschemename, fnextentryscheme, fcreatetime, fseq, fmodifytime, fisfixed, fuserid) VALUES ('2K25PZNIPPF5', '0', 'pur_order', 'rO0ABXNyABNqYXZhLnV0aWwuQXJyYXlMaXN0eIHSHZnHYZ0DAAFJAARzaXpleHAAAAADdwQAAAADc3IAF2phdmEudXRpbC5MaW5rZWRIYXNoTWFwNMBOXBBswPsCAAFaAAthY2Nlc3NPcmRlcnhyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAx3CAAAABAAAAAHdAAJRmllbGROYW1lc3EAfgAAAAAAAXcEAAAAAXQACGJpbGxkYXRleHQAB0NvbXBhcmVzcQB+AAAAAAABdwQAAAABdAACMjR4dAAFVmFsdWVzcQB+AAAAAAABdwQAAAABdAAAeHQABExlZnRzcQB+AAAAAAABdwQAAAABcQB+AA14dAAFUmlnaHRzcQB+AAAAAAABdwQAAAABcQB+AA14dAAFTG9naWNzcQB+AAAAAAABdwQAAAABc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAB4dAAFZml4ZWRzcgARamF2YS5sYW5nLkJvb2xlYW7NIHKA1Zz67gIAAVoABXZhbHVleHABeABzcQB+AAI/QAAAAAAADHcIAAAAEAAAAAZxAH4ABXNxAH4AAAAAAAF3BAAAAAF0AApiaWxsc3RhdHVzeHEAfgAIc3EAfgAAAAAAAXcEAAAAAXQAAzEwNXhxAH4AC3NxAH4AAAAAAAF3BAAAAAF0AAFDeHEAfgAOc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgAQc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgASc3EAfgAAAAAAAXcEAAAAAXEAfgAWeHgAc3EAfgACP0AAAAAAAAx3CAAAABAAAAAGcQB+AAVzcQB+AAAAAAABdwQAAAABdAAJbG9nc3RhdHVzeHEAfgAIc3EAfgAAAAAAAXcEAAAAAXQAAzEwNXhxAH4AC3NxAH4AAAAAAAF3BAAAAAF0AAFFeHEAfgAOc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgAQc3EAfgAAAAAAAXcEAAAAAXEAfgANeHEAfgASc3EAfgAAAAAAAXcEAAAAAXEAfgAWeHgAeA==', 'materialentry', '0', '近三个月已收货', '0', {ts'2022-07-05 00:00:00'}, 0, null, '1', 1210069609236019200);

delete from t_bas_filterscheme_l where fid = '2K25PZNIPPF5' AND FLOCALEID = 'zh_CN';
delete from t_bas_filterscheme_l where fid = '2K25PZNIPPF5' AND FLOCALEID = 'en_US';
delete from t_bas_filterscheme_l where fid = '2K25PZNIPPF5' AND FLOCALEID = 'zh_TW';
INSERT INTO t_bas_filterscheme_l (fid, fschemeid, fpkid, flocaleid, fdescription, fname) VALUES ('2K25PZNIPPF5', '2K25PZNIPPF5', '2K25PZNINMND', 'zh_CN', '业务日期 为 过去三个月  并且            单据状态 等于 已审核  并且    物流状态 等于 已收货  ', '近三个月已收货');
INSERT INTO t_bas_filterscheme_l (fid, fschemeid, fpkid, flocaleid, fdescription, fname) VALUES ('2K25PZNIPPF5', '2K25PZNIPPF5', '2K25PZNIPPF6', 'en_US', '业务日期 为 过去三个月  并且            单据状态 等于 已审核  并且    物流状态 等于 已收货  ', '近三个月已收货');
INSERT INTO t_bas_filterscheme_l (fid, fschemeid, fpkid, flocaleid, fdescription, fname) VALUES ('2K25PZNIPPF5', '2K25PZNIPPF5', '2K25PZNINMNE', 'zh_TW', '业务日期 为 过去三个月  并且            单据状态 等于 已审核  并且    物流状态 等于 已收货  ', '近三个月已收货');