-- 预置容差类型脚本
DELETE FROM t_ap_tolerancetype WHERE FID = 2025457231713031168;
INSERT INTO t_ap_tolerancetype(FID,FCONTROLITEMNAME,FISPREINSERT,FCONTRASTITEMNAME,FCONTRASTITEM,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FCONTROLLER,FMODIFIERID,FENABLE,FMODIFYTIME,FCONTROLITEM,FCONTRASTER,FDESCRIBE,FCREATORID) VALUES (2025457231713031168,'匹配对象.本次匹配价税合计','1','收票单信息.本次匹配价税合计','curmatchtotalamt_i',2025457231713031168,'C','059_S','发票匹配明细价税合计差异',{ts'2024-08-26  00:00:00'},'ap_invoicematch',13466739,'1',{ts'2024-08-28  00:00:00'},'curmatchtotalamt_a','ap_invoicematch',' ',13466739);
DELETE FROM t_ap_tolerancetype WHERE FID = 2021090255859351552;
INSERT INTO t_ap_tolerancetype(FID,FCONTROLITEMNAME,FISPREINSERT,FCONTRASTITEMNAME,FCONTRASTITEM,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FCONTROLLER,FMODIFIERID,FENABLE,FMODIFYTIME,FCONTROLITEM,FCONTRASTER,FDESCRIBE,FCREATORID) VALUES (2021090255859351552,'匹配对象.单价','1','收票单信息.单价','price_i',2021090255859351552,'C','063_S','发票匹配单价差异',{ts'2024-08-20  00:00:00'},'ap_invoicematch',13466739,'1',{ts'2024-08-26  00:00:00'},'price_a','ap_invoicematch',' ',13466739);
DELETE FROM t_ap_tolerancetype WHERE FID = 2025456386267172864;
INSERT INTO t_ap_tolerancetype(FID,FCONTROLITEMNAME,FISPREINSERT,FCONTRASTITEMNAME,FCONTRASTITEM,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FCONTROLLER,FMODIFIERID,FENABLE,FMODIFYTIME,FCONTROLITEM,FCONTRASTER,FDESCRIBE,FCREATORID) VALUES (2025456386267172864,'匹配对象.本次匹配金额','1','收票单信息.本次匹配金额','curmatchamt_i',2025456386267172864,'C','064_S','发票匹配明细金额差异',{ts'2024-08-26  00:00:00'},'ap_invoicematch',13466739,'1',{ts'2024-08-28  00:00:00'},'curmatchamt_a','ap_invoicematch',' ',13466739);
DELETE FROM t_ap_tolerancetype WHERE FID = 2021106041407675392;
INSERT INTO t_ap_tolerancetype(FID,FCONTROLITEMNAME,FISPREINSERT,FCONTRASTITEMNAME,FCONTRASTITEM,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FCONTROLLER,FMODIFIERID,FENABLE,FMODIFYTIME,FCONTROLITEM,FCONTRASTER,FDESCRIBE,FCREATORID) VALUES (2021106041407675392,'匹配对象.本次匹配金额','1','收票单总金额','amttotal',2021106041407675392,'C','060_S','发票匹配总金额差异',{ts'2024-08-20  00:00:00'},'ap_invoicematch',13466739,'1',{ts'2024-08-28  00:00:00'},'curmatchamt_a','ap_invoicematch',' ',13466739);
DELETE FROM t_ap_tolerancetype WHERE FID = 2025458154032091136;
INSERT INTO t_ap_tolerancetype(FID,FCONTROLITEMNAME,FISPREINSERT,FCONTRASTITEMNAME,FCONTRASTITEM,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FCONTROLLER,FMODIFIERID,FENABLE,FMODIFYTIME,FCONTROLITEM,FCONTRASTER,FDESCRIBE,FCREATORID) VALUES (2025458154032091136,'匹配对象.本次匹配税额','1','收票单总税额','taxtotal',2025458154032091136,'C','061_S','发票匹配总税额差异',{ts'2024-08-26  00:00:00'},'ap_invoicematch',13466739,'1',{ts'2024-08-28  00:00:00'},'curmatchtax_a','ap_invoicematch',' ',13466739);
DELETE FROM t_ap_tolerancetype WHERE FID = 2025458512577974272;
INSERT INTO t_ap_tolerancetype(FID,FCONTROLITEMNAME,FISPREINSERT,FCONTRASTITEMNAME,FCONTRASTITEM,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FCONTROLLER,FMODIFIERID,FENABLE,FMODIFYTIME,FCONTROLITEM,FCONTRASTER,FDESCRIBE,FCREATORID) VALUES (2025458512577974272,'匹配对象.本次匹配价税合计','1','收票单总价税合计','pricetotal',2025458512577974272,'C','062_S','发票匹配总价税合计差异',{ts'2024-08-26  00:00:00'},'ap_invoicematch',13466739,'1',{ts'2024-08-28  00:00:00'},'curmatchtotalamt_a','ap_invoicematch',' ',13466739);
DELETE FROM t_ap_tolerancetype WHERE FID = 2025456758696203264;
INSERT INTO t_ap_tolerancetype(FID,FCONTROLITEMNAME,FISPREINSERT,FCONTRASTITEMNAME,FCONTRASTITEM,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FCONTROLLER,FMODIFIERID,FENABLE,FMODIFYTIME,FCONTROLITEM,FCONTRASTER,FDESCRIBE,FCREATORID) VALUES (2025456758696203264,'匹配对象.本次匹配税额','1','收票单信息.本次匹配税额','curmatchtax_i',2025456758696203264,'C','065_S','发票匹配明细税额差异',{ts'2024-08-26  00:00:00'},'ap_invoicematch',13466739,'1',{ts'2024-08-28  00:00:00'},'curmatchtax_a','ap_invoicematch',' ',13466739);

-- 预置容差类型多语言脚本
DELETE FROM t_ap_tolerancetype_l WHERE FPKID = '4B8V07MMFVAJ' and FLOCALEID = 'zh_CN';
INSERT INTO t_ap_tolerancetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (2021090255859351552,'4B8V07MMFVAJ','zh_CN','发票匹配单价差异');
DELETE FROM t_ap_tolerancetype_l WHERE FPKID = '4BSRU0JRHBUS' and FLOCALEID = 'zh_CN';
INSERT INTO t_ap_tolerancetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (2025456386267172864,'4BSRU0JRHBUS','zh_CN','发票匹配明细金额差异');
DELETE FROM t_ap_tolerancetype_l WHERE FPKID = '4BSRWRD6W3W5' and FLOCALEID = 'zh_CN';
INSERT INTO t_ap_tolerancetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (2025456758696203264,'4BSRWRD6W3W5','zh_CN','发票匹配明细税额差异');
DELETE FROM t_ap_tolerancetype_l WHERE FPKID = '4B8Y+93X2W37' and FLOCALEID = 'zh_CN';
INSERT INTO t_ap_tolerancetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (2021106041407675392,'4B8Y+93X2W37','zh_CN','发票匹配总金额差异');
DELETE FROM t_ap_tolerancetype_l WHERE FPKID = '4BSS+6U+3LFL' and FLOCALEID = 'zh_CN';
INSERT INTO t_ap_tolerancetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (2025457231713031168,'4BSS+6U+3LFL','zh_CN','发票匹配明细价税合计差异');
DELETE FROM t_ap_tolerancetype_l WHERE FPKID = '4BSS4XYDYK3F' and FLOCALEID = 'zh_CN';
INSERT INTO t_ap_tolerancetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (2025458154032091136,'4BSS4XYDYK3F','zh_CN','发票匹配总税额差异');
DELETE FROM t_ap_tolerancetype_l WHERE FPKID = '4BSS7IUBQVSE' and FLOCALEID = 'zh_CN';
INSERT INTO t_ap_tolerancetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (2025458512577974272,'4BSS7IUBQVSE','zh_CN','发票匹配总价税合计差异');

-- 预置容差方案脚本
DELETE FROM t_ap_tolerancescheme WHERE FID = 2025460777653129216;
INSERT INTO t_ap_tolerancescheme(FID,FISPREINSERT,FMASTERID,FSTATUS,FNAME,FNUMBER,FCREATETIME,FCONTROLLER,FMODIFIERID,FENABLE,FMODIFYTIME,FCONTRASTER,FDESCRIBE,FCREATORID) VALUES (2025460777653129216,'1',2025460777653129216,'C','发票匹配容差方案','RC081',{ts'2024-08-26  00:00:00'},'ap_invoicematch',13466739,'1',{ts'2024-09-04  00:00:00'},'ap_invoicematch',' ',13466739);

-- 预置容差方案多语言脚本
DELETE FROM t_ap_tolerancescheme_l WHERE FPKID = '4BSSN0JSE=0R' and FLOCALEID = 'zh_CN';
INSERT INTO t_ap_tolerancescheme_l(FID,FPKID,FLOCALEID,FNAME) VALUES (2025460777653129216,'4BSSN0JSE=0R','zh_CN','发票匹配容差方案');


-- 预置容差方案规则脚本
DELETE FROM t_ap_toleranceruleentry WHERE FENTRYID = 2025460777711849477;
INSERT INTO t_ap_toleranceruleentry(FID,FTOLERANCEDIM,FISPREINSERT,FUPTOLERANCETYPE,FTOLERANCETYPEID,FLIMITTOLERANCETYPE,FENTRYID,FDIMENSIONMAP,FSEQ,FDIMENSIONMAP_TAG) VALUES (2025460777653129216,' ','1','numerical',2025458154032091136,'numerical',2025460777711849477,' ',6,' ');
DELETE FROM t_ap_toleranceruleentry WHERE FENTRYID = 2025460777711849478;
INSERT INTO t_ap_toleranceruleentry(FID,FTOLERANCEDIM,FISPREINSERT,FUPTOLERANCETYPE,FTOLERANCETYPEID,FLIMITTOLERANCETYPE,FENTRYID,FDIMENSIONMAP,FSEQ,FDIMENSIONMAP_TAG) VALUES (2025460777653129216,' ','1','numerical',2025458512577974272,'numerical',2025460777711849478,' ',7,' ');
DELETE FROM t_ap_toleranceruleentry WHERE FENTRYID = 2026994230991273984;
INSERT INTO t_ap_toleranceruleentry(FID,FTOLERANCEDIM,FISPREINSERT,FUPTOLERANCETYPE,FTOLERANCETYPEID,FLIMITTOLERANCETYPE,FENTRYID,FDIMENSIONMAP,FSEQ,FDIMENSIONMAP_TAG) VALUES (2025460777653129216,' ','1','numerical',2025456386267172864,'numerical',2026994230991273984,' ',2,' ');
DELETE FROM t_ap_toleranceruleentry WHERE FENTRYID = 2026994230991273985;
INSERT INTO t_ap_toleranceruleentry(FID,FTOLERANCEDIM,FISPREINSERT,FUPTOLERANCETYPE,FTOLERANCETYPEID,FLIMITTOLERANCETYPE,FENTRYID,FDIMENSIONMAP,FSEQ,FDIMENSIONMAP_TAG) VALUES (2025460777653129216,' ','1','numerical',2025456758696203264,'numerical',2026994230991273985,' ',3,' ');
DELETE FROM t_ap_toleranceruleentry WHERE FENTRYID = 2026994230991273986;
INSERT INTO t_ap_toleranceruleentry(FID,FTOLERANCEDIM,FISPREINSERT,FUPTOLERANCETYPE,FTOLERANCETYPEID,FLIMITTOLERANCETYPE,FENTRYID,FDIMENSIONMAP,FSEQ,FDIMENSIONMAP_TAG) VALUES (2025460777653129216,' ','1','numerical',2025457231713031168,'numerical',2026994230991273986,' ',4,' ');
DELETE FROM t_ap_toleranceruleentry WHERE FENTRYID = 2025460777711849472;
INSERT INTO t_ap_toleranceruleentry(FID,FTOLERANCEDIM,FISPREINSERT,FUPTOLERANCETYPE,FTOLERANCETYPEID,FLIMITTOLERANCETYPE,FENTRYID,FDIMENSIONMAP,FSEQ,FDIMENSIONMAP_TAG) VALUES (2025460777653129216,' ','1','numerical',2021090255859351552,'numerical',2025460777711849472,' ',1,' ');
DELETE FROM t_ap_toleranceruleentry WHERE FENTRYID = 2025460777711849476;
INSERT INTO t_ap_toleranceruleentry(FID,FTOLERANCEDIM,FISPREINSERT,FUPTOLERANCETYPE,FTOLERANCETYPEID,FLIMITTOLERANCETYPE,FENTRYID,FDIMENSIONMAP,FSEQ,FDIMENSIONMAP_TAG) VALUES (2025460777653129216,' ','1','numerical',2021106041407675392,'numerical',2025460777711849476,' ',5,' ');

-- 预置容差范围脚本
DELETE FROM t_ap_tolerancerange WHERE FDETAILID = 2025460777711850504;
INSERT INTO t_ap_tolerancerange(FDIMENSIONPK1,FDIMENSIONPK2,FDIMENSIONPK2_TAG,FDIMENSIONPK7,FDIMENSIONPK8,FDIMENSIONPK9,FDIMENSIONPK7_TAG,FDIMENSIONPK3,FUPTOLERANCE,FDIMENSIONPK4,FDIMENSIONPK5,FDIMENSIONPK6,FDETAILID,FDIMENSIONPK5_TAG,FDIMENSIONPK1_TAG,FDIMENSIONPK6_TAG,FSEQ,FDIMENSIONPK9_TAG,FDIMENSIONPK4_TAG,FLIMITTOLERANCE,FENTRYID,FDIMENSIONPK10,FDIMENSIONPK3_TAG,FDIMENSIONPK8_TAG,FDIMENSIONPK10_TAG) VALUES (' ',' ',' ',' ',' ',' ',' ',' ',0,' ',' ',' ',2025460777711850504,' ',' ',' ',1,' ',' ',0,2025460777711849478,' ',' ',' ',' ');
DELETE FROM t_ap_tolerancerange WHERE FDETAILID = 2025460777711850498;
INSERT INTO t_ap_tolerancerange(FDIMENSIONPK1,FDIMENSIONPK2,FDIMENSIONPK2_TAG,FDIMENSIONPK7,FDIMENSIONPK8,FDIMENSIONPK9,FDIMENSIONPK7_TAG,FDIMENSIONPK3,FUPTOLERANCE,FDIMENSIONPK4,FDIMENSIONPK5,FDIMENSIONPK6,FDETAILID,FDIMENSIONPK5_TAG,FDIMENSIONPK1_TAG,FDIMENSIONPK6_TAG,FSEQ,FDIMENSIONPK9_TAG,FDIMENSIONPK4_TAG,FLIMITTOLERANCE,FENTRYID,FDIMENSIONPK10,FDIMENSIONPK3_TAG,FDIMENSIONPK8_TAG,FDIMENSIONPK10_TAG) VALUES (' ',' ',' ',' ',' ',' ',' ',' ',0,' ',' ',' ',2025460777711850498,' ',' ',' ',1,' ',' ',0,2025460777711849472,' ',' ',' ',' ');
DELETE FROM t_ap_tolerancerange WHERE FDETAILID = 2025460777711850502;
INSERT INTO t_ap_tolerancerange(FDIMENSIONPK1,FDIMENSIONPK2,FDIMENSIONPK2_TAG,FDIMENSIONPK7,FDIMENSIONPK8,FDIMENSIONPK9,FDIMENSIONPK7_TAG,FDIMENSIONPK3,FUPTOLERANCE,FDIMENSIONPK4,FDIMENSIONPK5,FDIMENSIONPK6,FDETAILID,FDIMENSIONPK5_TAG,FDIMENSIONPK1_TAG,FDIMENSIONPK6_TAG,FSEQ,FDIMENSIONPK9_TAG,FDIMENSIONPK4_TAG,FLIMITTOLERANCE,FENTRYID,FDIMENSIONPK10,FDIMENSIONPK3_TAG,FDIMENSIONPK8_TAG,FDIMENSIONPK10_TAG) VALUES (' ',' ',' ',' ',' ',' ',' ',' ',0,' ',' ',' ',2025460777711850502,' ',' ',' ',1,' ',' ',0,2025460777711849476,' ',' ',' ',' ');
DELETE FROM t_ap_tolerancerange WHERE FDETAILID = 2025460777711850503;
INSERT INTO t_ap_tolerancerange(FDIMENSIONPK1,FDIMENSIONPK2,FDIMENSIONPK2_TAG,FDIMENSIONPK7,FDIMENSIONPK8,FDIMENSIONPK9,FDIMENSIONPK7_TAG,FDIMENSIONPK3,FUPTOLERANCE,FDIMENSIONPK4,FDIMENSIONPK5,FDIMENSIONPK6,FDETAILID,FDIMENSIONPK5_TAG,FDIMENSIONPK1_TAG,FDIMENSIONPK6_TAG,FSEQ,FDIMENSIONPK9_TAG,FDIMENSIONPK4_TAG,FLIMITTOLERANCE,FENTRYID,FDIMENSIONPK10,FDIMENSIONPK3_TAG,FDIMENSIONPK8_TAG,FDIMENSIONPK10_TAG) VALUES (' ',' ',' ',' ',' ',' ',' ',' ',0,' ',' ',' ',2025460777711850503,' ',' ',' ',1,' ',' ',0,2025460777711849477,' ',' ',' ',' ');
DELETE FROM t_ap_tolerancerange WHERE FDETAILID = 2026994230991275008;
INSERT INTO t_ap_tolerancerange(FDIMENSIONPK1,FDIMENSIONPK2,FDIMENSIONPK2_TAG,FDIMENSIONPK7,FDIMENSIONPK8,FDIMENSIONPK9,FDIMENSIONPK7_TAG,FDIMENSIONPK3,FUPTOLERANCE,FDIMENSIONPK4,FDIMENSIONPK5,FDIMENSIONPK6,FDETAILID,FDIMENSIONPK5_TAG,FDIMENSIONPK1_TAG,FDIMENSIONPK6_TAG,FSEQ,FDIMENSIONPK9_TAG,FDIMENSIONPK4_TAG,FLIMITTOLERANCE,FENTRYID,FDIMENSIONPK10,FDIMENSIONPK3_TAG,FDIMENSIONPK8_TAG,FDIMENSIONPK10_TAG) VALUES (' ',' ',' ',' ',' ',' ',' ',' ',0,' ',' ',' ',2026994230991275008,' ',' ',' ',1,' ',' ',0,2026994230991273984,' ',' ',' ',' ');
DELETE FROM t_ap_tolerancerange WHERE FDETAILID = 2026994230991275009;
INSERT INTO t_ap_tolerancerange(FDIMENSIONPK1,FDIMENSIONPK2,FDIMENSIONPK2_TAG,FDIMENSIONPK7,FDIMENSIONPK8,FDIMENSIONPK9,FDIMENSIONPK7_TAG,FDIMENSIONPK3,FUPTOLERANCE,FDIMENSIONPK4,FDIMENSIONPK5,FDIMENSIONPK6,FDETAILID,FDIMENSIONPK5_TAG,FDIMENSIONPK1_TAG,FDIMENSIONPK6_TAG,FSEQ,FDIMENSIONPK9_TAG,FDIMENSIONPK4_TAG,FLIMITTOLERANCE,FENTRYID,FDIMENSIONPK10,FDIMENSIONPK3_TAG,FDIMENSIONPK8_TAG,FDIMENSIONPK10_TAG) VALUES (' ',' ',' ',' ',' ',' ',' ',' ',0,' ',' ',' ',2026994230991275009,' ',' ',' ',1,' ',' ',0,2026994230991273985,' ',' ',' ',' ');
DELETE FROM t_ap_tolerancerange WHERE FDETAILID = 2026994230991275010;
INSERT INTO t_ap_tolerancerange(FDIMENSIONPK1,FDIMENSIONPK2,FDIMENSIONPK2_TAG,FDIMENSIONPK7,FDIMENSIONPK8,FDIMENSIONPK9,FDIMENSIONPK7_TAG,FDIMENSIONPK3,FUPTOLERANCE,FDIMENSIONPK4,FDIMENSIONPK5,FDIMENSIONPK6,FDETAILID,FDIMENSIONPK5_TAG,FDIMENSIONPK1_TAG,FDIMENSIONPK6_TAG,FSEQ,FDIMENSIONPK9_TAG,FDIMENSIONPK4_TAG,FLIMITTOLERANCE,FENTRYID,FDIMENSIONPK10,FDIMENSIONPK3_TAG,FDIMENSIONPK8_TAG,FDIMENSIONPK10_TAG) VALUES (' ',' ',' ',' ',' ',' ',' ',' ',0,' ',' ',' ',2026994230991275010,' ',' ',' ',1,' ',' ',0,2026994230991273986,' ',' ',' ',' ');

