--数据源分录 删除历史预置数据（该数据只上了主干，没有上基线，删除无问题）
delete from t_msplan_reportextmodel where fid in(1752221252950428672,1753505455369402368);

delete from t_msplan_reportextmodel_l where fid in(1752221252950428672,1753505455369402368);

delete from t_msplan_reportextcolumn where fid in(1752221252950428672,1753505455369402368);

delete from t_msplan_reportextentity where fid in(1752221252950428672,1753505455369402368);


--删除历史预置数据（该数据只上了主干，没有上基线，删除无问题）

delete from t_mrp_bftransfer where fid in (1752089257087861760,1752089547971231744,1752089928587542528,1752090550116286464,1752091255321396224,1752192837765562368,1753501793062598656,1753502234546583552,1753502976586135552);

delete from t_mrp_bftransfer_l where fid in (1752089257087861760,1752089547971231744,1752089928587542528,1752090550116286464,1752091255321396224,1752192837765562368,1753501793062598656,1753502234546583552,1753502976586135552);

delete from t_mrp_bftransfer_u where fdataid in (1752089257087861760,1752089547971231744,1752089928587542528,1752090550116286464,1752091255321396224,1752192837765562368,1753501793062598656,1753502234546583552,1753502976586135552);

delete from t_mrp_billtranferentry where fid in (1752089257087861760,1752089547971231744,1752089928587542528,1752090550116286464,1752091255321396224,1752192837765562368,1753501793062598656,1753502234546583552,1753502976586135552);



--实体字段映射配置
IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1754277175579657216) 
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1754277175437050880,'masterid',1754277175579657216,'entrymaterialid','entrymaterialid',' ',' ','单据头.子项物料编码',' ',1,'单据头.物料编码','masterid','0'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1754277959948058624) 
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1754277959897726976,'masterid',1754277959948058624,'entrymaterialid','entrymaterialid',' ',' ','单据头.子项物料编码',' ',1,'单据头.物料编码','masterid','0'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1754278751992038400)
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1754278751874597888,'masterid',1754278751992038400,'entrymaterialid','entrymaterialid',' ',' ','单据头.子项物料编码',' ',1,'单据头.物料编码','masterid','0'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1754278751992038401)
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1754278751874597888,'createorg',1754278751992038401,' ',' ','GetPurChaseOrgByOrg(org)  ','{"expression":"GetPurChaseOrgByOrg(org)  ","exprTran":"GetPurChaseOrgByOrg(生产组织)  ","description":{"zh_CN":""},"localeExprTran":{"zh_CN":"GetPurChaseOrgByOrg(生产组织)  "},"exprDesc":"GetPurChaseOrgByOrg(生产组织)  "}',' ','GetPurChaseOrgByOrg(生产组织)  ',2,'单据头.采购信息创建组织','createorg','1'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1754277959948058625)
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1754277959897726976,'createorg',1754277959948058625,'org','org',' ',' ','单据头.生产组织',' ',2,'单据头.生产信息创建组织','createorg','0'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1754277175579657217)
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1754277175437050880,'createorg',1754277175579657217,' ',' ','GetPurChaseOrgByOrg(org)','{"expression":"GetPurChaseOrgByOrg(org)","exprTran":"GetPurChaseOrgByOrg(生产组织)","description":{"zh_CN":""},"localeExprTran":{"zh_CN":"GetPurChaseOrgByOrg(生产组织)"},"exprDesc":"GetPurChaseOrgByOrg(生产组织)"}',' ','GetPurChaseOrgByOrg(生产组织)',2,'单据头.采购信息创建组织','createorg','1'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1754319862966010880)
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1754319862563357696,'masterid',1754319862966010880,'entrymaterialid','entrymaterialid',' ',' ','单据头.子项物料编码',' ',1,'单据头.物料编码','masterid','0'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1754319862966010881)
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1754319862563357696,'createorg',1754319862966010881,'org','org',' ',' ','单据头.生产组织',' ',2,'单据头.生产信息创建组织','createorg','0'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer WHERE FID =  1754277959897726976)
INSERT INTO t_mrp_bftransfer(FID,FBITINDEX,FVERSION,FLARGETEXTFIELD,FCREATEORGID,FSOURCEDATAID,FMASTERID,FORGID,FFIELDTYPE,FSTATUS,FCTRLSTRATEGY,FNUMBER,FSRCBILL,FISMATCHDIM,FCREATETIME,FSOURCEBITINDEX,FISSYSTEMINSERT,FMODIFIERID,FENABLE,FMODIFYTIME,FDESTBILL,FCREATORID,FLARGETEXTFIELD_TAG) VALUES (1754277959897726976,0,' ',' ',100000,0,1754277959897726976,100000,'D','C','5','report_bombatchforward_001','pdm_bombatch_forward','1',{ts'2018-08-08  08:08:08'},0,'0',1,'1',{ts'2018-08-08  08:08:08'},'bd_materialmftinfo',1,'{"filterRow":[],"forList":false}'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer WHERE FID =  1754278751874597888)
INSERT INTO t_mrp_bftransfer(FID,FBITINDEX,FVERSION,FLARGETEXTFIELD,FCREATEORGID,FSOURCEDATAID,FMASTERID,FORGID,FFIELDTYPE,FSTATUS,FCTRLSTRATEGY,FNUMBER,FSRCBILL,FISMATCHDIM,FCREATETIME,FSOURCEBITINDEX,FISSYSTEMINSERT,FMODIFIERID,FENABLE,FMODIFYTIME,FDESTBILL,FCREATORID,FLARGETEXTFIELD_TAG) VALUES (1754278751874597888,0,' ',' ',100000,0,1754278751874597888,100000,'D','C','5','report_bombatchforward_002','pdm_bombatch_forward','1',{ts'2018-08-08  08:08:08'},0,'0',1,'1',{ts'2018-08-08  08:08:08'},'bd_materialpurchaseinfo',1,'{"filterRow":[],"forList":false}'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer WHERE FID =  1754319862563357696)
INSERT INTO t_mrp_bftransfer(FID,FBITINDEX,FVERSION,FLARGETEXTFIELD,FCREATEORGID,FSOURCEDATAID,FMASTERID,FORGID,FFIELDTYPE,FSTATUS,FCTRLSTRATEGY,FNUMBER,FSRCBILL,FISMATCHDIM,FCREATETIME,FSOURCEBITINDEX,FISSYSTEMINSERT,FMODIFIERID,FENABLE,FMODIFYTIME,FDESTBILL,FCREATORID,FLARGETEXTFIELD_TAG) VALUES (1754319862563357696,0,' ',' ',100000,0,1754319862563357696,100000,'D','C','5','report_bombatchforward_003','pdm_bombatch_totalforward','1',{ts'2018-08-08  08:08:08'},0,'0',1,'1',{ts'2018-08-08  08:08:08'},'bd_materialmftinfo',1,'{"filterRow":[],"forList":false}'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer WHERE FID =  1754277175437050880)
INSERT INTO t_mrp_bftransfer(FID,FBITINDEX,FVERSION,FLARGETEXTFIELD,FCREATEORGID,FSOURCEDATAID,FMASTERID,FORGID,FFIELDTYPE,FSTATUS,FCTRLSTRATEGY,FNUMBER,FSRCBILL,FISMATCHDIM,FCREATETIME,FSOURCEBITINDEX,FISSYSTEMINSERT,FMODIFIERID,FENABLE,FMODIFYTIME,FDESTBILL,FCREATORID,FLARGETEXTFIELD_TAG) VALUES (1754277175437050880,0,' ',' ',100000,0,1754277175437050880,100000,'D','C','5','report_bombatchforward_004','pdm_bombatch_totalforward','1',{ts'2018-08-08  08:08:08'},0,'0',1,'1',{ts'2018-08-08  08:08:08'},'bd_materialpurchaseinfo',1,'{"filterRow":[],"forList":false}'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer_l WHERE FPKID = '3HGK4RWWIM9X')
INSERT INTO t_mrp_bftransfer_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1754277175437050880,'3HGK4RWWIM9X','zh_CN','BOM批量正查(综合)字段集-物料采购信息-报表注册模型字段映射'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer_l WHERE FPKID = '3HGK=GTEX37Y')
INSERT INTO t_mrp_bftransfer_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1754277959897726976,'3HGK=GTEX37Y','zh_CN','BOM批量正查(逐层)字段集-物料生产信息-报表注册模型字段映射'); 


IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer_l WHERE FPKID = '3HGKF8X12G2O')
INSERT INTO t_mrp_bftransfer_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1754278751874597888,'3HGKF8X12G2O','zh_CN','BOM批量正查(逐层)字段集-物料采购信息-报表注册模型字段映射'); 


IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer_l WHERE FPKID = '3HGS3UAKE7LK')
INSERT INTO t_mrp_bftransfer_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1754319862563357696,'3HGS3UAKE7LK','zh_CN','BOM批量正查(综合)字段集-物料生产信息-报表注册模型字段映射'); 


insert into t_mrp_bftransfer_u (fdataid,fuseorgid)
select fid ,fcreateorgid
from t_mrp_bftransfer a 
where a.fid in (1754319862563357696,1754278751874597888,1754277959897726976,1754277175437050880)
and not exists(select 1 from t_mrp_bftransfer_u b where b.fdataid  = a.fid and b.fuseorgid  = a.fcreateorgid );





--报表注册模型预置数据
IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextentity WHERE FENTRYID = 1754317230134280192)
INSERT INTO t_msplan_reportextentity(FMATCHDIMENSIONS,FID,FEXTENTITY,FFILTERRULE,FFILTERRULEVALUE_TAG,FENTRYID,FSEQ,FDSNUMBER,FFILTERRULEVALUE) VALUES (1754277959897726976,1754286130653578240,'bd_materialmftinfo','数据状态 等于 已审核 并且 使用状态 等于 可用 ','{"filterRow":[{"id":"3HGRLP+WN9CI","leftBracket":"","compareType":"105","fieldName":"status","rightBracket":"","logic":"0","value":[{"id":"3HGRLP+WN8P9","value":"C"}],"baseDataIds":[]},{"id":"3HGRLP+WN9CJ","leftBracket":"","compareType":"105","fieldName":"enable","rightBracket":"","logic":"0","value":[{"id":"3HGRLP+WN8P=","value":"1"}],"baseDataIds":[]}],"forList":false}',1754317230134280192,1,'DS_001',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextentity WHERE FENTRYID = 1754317230134280193)
INSERT INTO t_msplan_reportextentity(FMATCHDIMENSIONS,FID,FEXTENTITY,FFILTERRULE,FFILTERRULEVALUE_TAG,FENTRYID,FSEQ,FDSNUMBER,FFILTERRULEVALUE) VALUES (1754278751874597888,1754286130653578240,'bd_materialpurchaseinfo','采购信息数据状态 等于 已审核 并且 采购信息使用状态 等于 可用 ','{"filterRow":[{"id":"3HGRMHT29JZ0","leftBracket":"","compareType":"105","fieldName":"status","rightBracket":"","logic":"0","value":[{"id":"3HGRMHT29J9S","value":"C"}],"baseDataIds":[]},{"id":"3HGRMHT29JZ1","leftBracket":"","compareType":"105","fieldName":"enable","rightBracket":"","logic":"0","value":[{"id":"3HGRMHT29J9T","value":"1"}],"baseDataIds":[]}],"forList":false}',1754317230134280193,2,'DS_002',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextentity WHERE FENTRYID = 1754320731530871808)
INSERT INTO t_msplan_reportextentity(FMATCHDIMENSIONS,FID,FEXTENTITY,FFILTERRULE,FFILTERRULEVALUE_TAG,FENTRYID,FSEQ,FDSNUMBER,FFILTERRULEVALUE) VALUES (1754319862563357696,1754285651630507008,'bd_materialmftinfo','数据状态 等于 已审核 并且 使用状态 等于 可用 ','{"filterRow":[{"id":"3HGS696PJRZ=","leftBracket":"","compareType":"105","fieldName":"status","rightBracket":"","logic":"0","value":[{"id":"3HGS696PJSMJ","value":"C"}],"baseDataIds":[]},{"id":"3HGS696PJRZA","leftBracket":"","compareType":"105","fieldName":"enable","rightBracket":"","logic":"0","value":[{"id":"3HGS696PJSMK","value":"1"}],"baseDataIds":[]}],"forList":false}',1754320731530871808,1,'DS_001',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextentity WHERE FENTRYID = 1754320731530871809)
INSERT INTO t_msplan_reportextentity(FMATCHDIMENSIONS,FID,FEXTENTITY,FFILTERRULE,FFILTERRULEVALUE_TAG,FENTRYID,FSEQ,FDSNUMBER,FFILTERRULEVALUE) VALUES (1754277175437050880,1754285651630507008,'bd_materialpurchaseinfo','采购信息数据状态 等于 已审核 并且 采购信息使用状态 等于 可用 ','{"filterRow":[{"id":"3HGS7/DG62CA","leftBracket":"","compareType":"105","fieldName":"status","rightBracket":"","logic":"0","value":[{"id":"3HGS7/DG630K","value":"C"}],"baseDataIds":[]},{"id":"3HGS7/DG62CB","leftBracket":"","compareType":"105","fieldName":"enable","rightBracket":"","logic":"0","value":[{"id":"3HGS7/DG630L","value":"1"}],"baseDataIds":[]}],"forList":false}',1754320731530871809,2,'DS_002',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392064)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392064,'文本型','1','number',' ',' ',' ',' ',1,'BOM编码','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520258)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520258,'文本型','1','number',' ',' ',' ',' ',1,'BOM编码','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520259)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520259,'物料','1','materialid',' ',' ',' ',' ',2,'父项物料编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520260)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520260,'物料','1','entrymaterialid',' ',' ',' ',' ',3,'子项物料编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520261)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520261,'下拉列表','1','entrymaterialattr',' ',' ',' ',' ',4,'子项物料属性','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392065)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392065,'物料','1','entrymaterialid',' ',' ',' ',' ',2,'子项物料编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392066)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392066,'下拉列表','1','entrymaterialattr',' ',' ',' ',' ',3,'子项物料属性','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392067)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392067,'基础资料','1','entryunit',' ',' ',' ',' ',4,'计量单位','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392068)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392068,'基础资料','1','entryconfigcode',' ',' ',' ',' ',5,'子项物料配置号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392069)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392069,'基础资料','1','entryversion',' ',' ',' ',' ',6,'子项BOM版本号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392070)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392070,'数量型','1','commonused',' ',' ',' ',' ',7,'标准用量','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392071)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392071,'基础资料','1','featuretype',' ',' ',' ',' ',8,'特征类','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392072)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392072,'弹性域','1','entryauxproperty',' ',' ',' ',' ',9,'辅助属性','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392073)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392073,'组织','1','org',' ',' ',' ',' ',10,'生产组织','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392074)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392074,'文本型','1','bomlevel',' ',' ',' ',' ',11,'BOM层级','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392075)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392075,'文本型','1','level',' ',' ',' ',' ',12,'层级','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392076)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392076,'布尔型','1','entryisjumplevel',' ',' ',' ',' ',13,'跳层','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392077)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392077,'布尔型','1','isauxbom',' ',' ',' ',' ',14,'辅料BOM','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392078)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392078,'物料','1','rootmaterialid',' ',' ',' ',' ',15,'查询物料编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392079)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392079,'基础资料','1','rootconfigcode',' ',' ',' ',' ',16,'查询配置号','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392080)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392080,'文本型','1','entrymaterialname',' ','{"expression":"name","exprTran":"物料名称","description":{"zh_CN":""},"localeExprTran":{"zh_CN":"物料名称"},"exprDesc":"物料名称"}',' ',' ',17,'子项物料名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392081)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392081,'文本型','1','entrymaterialmodel',' ','{"expression":"modelnum","exprTran":"规格型号","description":{"zh_CN":""},"localeExprTran":{"zh_CN":"规格型号"},"exprDesc":"规格型号"}',' ',' ',18,'子项物料规格型号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392082)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392082,'文本型','1','rootmaterialname',' ','{"expression":"name","exprTran":"物料名称","description":{"zh_CN":""},"localeExprTran":{"zh_CN":"物料名称"},"exprDesc":"物料名称"}',' ',' ',19,'查询物料名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392083)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392083,'基础资料','1','rootbomversion',' ',' ',' ',' ',20,'查询版本号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754285651714392084)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1754285651714392084,'基础资料','1','rootinsteadnum',' ',' ',' ',' ',21,'查询替代号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520262)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520262,'基础资料','1','entryunit',' ',' ',' ',' ',5,'计量单位','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520263)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520263,'基础资料','1','entryconfigcode',' ',' ',' ',' ',6,'子项物料配置号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520264)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520264,'基础资料','1','entryversion',' ',' ',' ',' ',7,'子项BOM版本号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520265)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520265,'数量型','1','entryqtynumerator',' ',' ',' ',' ',8,'用量：分子','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520266)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520266,'数量型','1','entryqtydenominator',' ',' ',' ',' ',9,'用量：分母','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520267)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520267,'数量型','1','entryfixscrap',' ',' ',' ',' ',10,'固定损耗率','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520268)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520268,' ','1','entryscraprate',' ',' ',' ',' ',11,'变动损耗','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520269)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520269,'数量型','1','commonused',' ',' ',' ',' ',12,'标准用量','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520270)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520270,'下拉列表','1','entryqtytype',' ',' ',' ',' ',13,'用量类型','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520271)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520271,'下拉列表','1','entrytype',' ',' ',' ',' ',14,'组件类型','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520272)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520272,'基础资料','1','featuretype',' ',' ',' ',' ',15,'特征类编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520273)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520273,'弹性域','1','entryauxproperty',' ',' ',' ',' ',16,'辅助属性','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520274)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520274,'日期型','1','entryvaliddate',' ',' ',' ',' ',17,'生效时间','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520275)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520275,'日期型','1','entryinvaliddate',' ',' ',' ',' ',18,'失效时间','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520276)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520276,'长整数','1','bomentryid',' ',' ',' ',' ',19,'BOM分录ID','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520277)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520277,'长整数','1','bomid',' ',' ',' ',' ',20,'BOM表头ID','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520278)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520278,'组织','1','org',' ',' ',' ',' ',21,'生产组织','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520279)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520279,'文本型','1','bomlevel',' ',' ',' ',' ',22,'BOM层级','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520280)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520280,'文本型','1','level',' ',' ',' ',' ',23,'层级','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520281)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520281,'布尔型','1','entryisjumplevel',' ',' ',' ',' ',24,'跳层','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520282)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520282,'布尔型','1','isauxbom',' ',' ',' ',' ',25,'辅料BOM','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520283)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520283,'物料','1','rootmaterialid',' ',' ',' ',' ',26,'查询物料编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520284)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520284,'基础资料','1','rootconfigcode',' ',' ',' ',' ',27,'查询配置号','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520285)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520285,'文本型','1','materialname',' ','{"expression":"name","exprTran":"物料名称","description":{"zh_CN":""},"localeExprTran":{"zh_CN":"物料名称"},"exprDesc":"物料名称"}',' ',' ',28,'父项物料名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520286)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520286,'文本型','1','entrymaterialname',' ','{"expression":"name","exprTran":"物料名称","description":{"zh_CN":""},"localeExprTran":{"zh_CN":"物料名称"},"exprDesc":"物料名称"}',' ',' ',29,'子项物料名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520287)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520287,'文本型','1','entrymaterialmodel',' ','{"expression":"modelnum","exprTran":"规格型号","description":{"zh_CN":""},"localeExprTran":{"zh_CN":"规格型号"},"exprDesc":"规格型号"}',' ',' ',30,'子项物料规格型号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520288)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520288,'文本型','1','rootmaterialname',' ','{"expression":"name","exprTran":"物料名称","description":{"zh_CN":""},"localeExprTran":{"zh_CN":"物料名称"},"exprDesc":"物料名称"}',' ',' ',31,'查询物料名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520289)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520289,'基础资料','1','rootbomversion',' ',' ',' ',' ',32,'查询版本号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520290)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520290,'基础资料','1','replaceno',' ',' ',' ',' ',33,'子BOM替代号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1754286130695520291)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1754286130695520291,'基础资料','1','rootinsteadnum',' ',' ',' ',' ',34,'查询替代号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1895547692688455680)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1895547692688455680,'布尔型','0','entryisreplace',' ',' ',' ',' ',35,'替代件','0','1',' '); 


IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextmodel WHERE FID = 1754286130653578240)
INSERT INTO t_msplan_reportextmodel(FID,FREPORTENTITY,FCREATETIME,FMODIFIERID,FENABLE,FISSYSSET,FMODIFYTIME,FMASTERID,FSTATUS,FCREATORID,FNUMBER) VALUES (1754286130653578240,'pdm_bombatch_forward',{ts'2018-08-08  08:08:08'},1,'1','1',{ts'2018-08-08  08:08:08'},1754286130653578240,'C',1,'bomBatchForward_001'); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextmodel WHERE FID = 1754285651630507008)
INSERT INTO t_msplan_reportextmodel(FID,FREPORTENTITY,FCREATETIME,FMODIFIERID,FENABLE,FISSYSSET,FMODIFYTIME,FMASTERID,FSTATUS,FCREATORID,FNUMBER) VALUES (1754285651630507008,'pdm_bombatch_totalforward',{ts'2018-08-08  08:08:08'},1,'1','1',{ts'2018-08-08  08:08:08'},1754285651630507008,'C',1,'bomBatchForward_002'); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextmodel_l WHERE FPKID = '3HGLQIR0K5GP')
INSERT INTO t_msplan_reportextmodel_l(FID,FPKID,FLOCALEID,FREMARK,FNAME) VALUES (1754285651630507008,'3HGLQIR0K5GP','zh_CN','BOM批量正查（综合展开）报表注册模型（系统预置）','BOM批量正查（综合展开）报表注册模型'); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextmodel_l WHERE FPKID = '3HGLU/VXXV/R')
INSERT INTO t_msplan_reportextmodel_l(FID,FPKID,FLOCALEID,FREMARK,FNAME) VALUES (1754286130653578240,'3HGLU/VXXV/R','zh_CN','BOM批量正查（逐层展开）报表注册模型（系统预置）','BOM批量正查（逐层展开）报表注册模型'); 









---BOM批量反查的预置脚本
IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1759384113564922880) 
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1759384113330041856,'masterid',1759384113564922880,'entrymaterialid','entrymaterialid',' ',' ','单据头.子项物料编码',' ',1,'单据头.物料编码','masterid','0'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1759384113564922881) 
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1759384113330041856,'createorg',1759384113564922881,'org','org',' ',' ','单据头.生产组织',' ',2,'单据头.生产信息创建组织','createorg','0'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1759385840477365248) 
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1759385840468976640,'createorg',1759385840477365248,' ',' ','GetPurChaseOrgByOrg(org)','{"expression":"GetPurChaseOrgByOrg(org)","exprTran":"GetPurChaseOrgByOrg(生产组织)","description":{"zh_CN":""},"localeExprTran":{"zh_CN":"GetPurChaseOrgByOrg(生产组织)"},"exprDesc":"GetPurChaseOrgByOrg(生产组织)"}',' ','GetPurChaseOrgByOrg(生产组织)',1,'单据头.采购信息创建组织','createorg','1'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1759385840477365249) 
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1759385840468976640,'masterid',1759385840477365249,'entrymaterialid','entrymaterialid',' ',' ','单据头.子项物料编码',' ',2,'单据头.物料编码','masterid','0'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1759386671939412992) 
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1759386671931024384,'masterid',1759386671939412992,'materialid','materialid',' ',' ','单据头.父项物料编码',' ',1,'单据头.物料编码','masterid','0'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1759386671939412993) 
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1759386671931024384,'createorg',1759386671939412993,'org','org',' ',' ','单据头.生产组织',' ',2,'单据头.生产信息创建组织','createorg','0'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1759387615867483136) 
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1759387615859094528,'createorg',1759387615867483136,' ',' ','GetPurChaseOrgByOrg(org)','{"expression":"GetPurChaseOrgByOrg(org)","exprTran":"GetPurChaseOrgByOrg(生产组织)","description":{"zh_CN":""},"localeExprTran":{"zh_CN":"GetPurChaseOrgByOrg(生产组织)"},"exprDesc":"GetPurChaseOrgByOrg(生产组织)"}',' ','GetPurChaseOrgByOrg(生产组织)',1,'单据头.采购信息创建组织','createorg','1'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_billtranferentry WHERE FENTRYID =  1759387615867483137) 
INSERT INTO t_mrp_billtranferentry(FID,FDESTFIELDFLAG,FENTRYID,FSOURCEFIELDFLAG,FSOURCEENTITYFLAG,FCALCULATEEXC,FCALCULATEEXC_TAG,FSOURCEFIELDNAME,FCALCULATETEXT,FSEQ,FDESTFIELDNAME,FDESTENTITYFLAG,FCONVERTTYPE) VALUES (1759387615859094528,'masterid',1759387615867483137,'materialid','materialid',' ',' ','单据头.父项物料编码',' ',2,'单据头.物料编码','masterid','0'); 


IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer WHERE FID =  1759384113330041856) 
INSERT INTO t_mrp_bftransfer(FID,FBITINDEX,FVERSION,FLARGETEXTFIELD,FCREATEORGID,FSOURCEDATAID,FMASTERID,FORGID,FFIELDTYPE,FSTATUS,FCTRLSTRATEGY,FNUMBER,FSRCBILL,FISMATCHDIM,FCREATETIME,FSOURCEBITINDEX,FISSYSTEMINSERT,FMODIFIERID,FENABLE,FMODIFYTIME,FDESTBILL,FCREATORID,FLARGETEXTFIELD_TAG) VALUES (1759384113330041856,0,' ',' ',100000,0,1759384113330041856,100000,'D','C','5','report_bombatchforward_005','pdm_bombatch_back','1',{ts'2018-08-08  08:08:08'},0,'0',1,'1',{ts'2018-08-08  08:08:08'},'bd_materialmftinfo',1,'{"filterRow":[],"forList":false}'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer WHERE FID =  1759385840468976640)
INSERT INTO t_mrp_bftransfer(FID,FBITINDEX,FVERSION,FLARGETEXTFIELD,FCREATEORGID,FSOURCEDATAID,FMASTERID,FORGID,FFIELDTYPE,FSTATUS,FCTRLSTRATEGY,FNUMBER,FSRCBILL,FISMATCHDIM,FCREATETIME,FSOURCEBITINDEX,FISSYSTEMINSERT,FMODIFIERID,FENABLE,FMODIFYTIME,FDESTBILL,FCREATORID,FLARGETEXTFIELD_TAG) VALUES (1759385840468976640,0,' ',' ',100000,0,1759385840468976640,100000,'D','C','5','report_bombatchforward_006','pdm_bombatch_back','1',{ts'2018-08-08  08:08:08'},0,'0',1,'1',{ts'2018-08-08  08:08:08'},'bd_materialpurchaseinfo',1,'{"filterRow":[],"forList":false}'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer WHERE FID =  1759386671931024384)
INSERT INTO t_mrp_bftransfer(FID,FBITINDEX,FVERSION,FLARGETEXTFIELD,FCREATEORGID,FSOURCEDATAID,FMASTERID,FORGID,FFIELDTYPE,FSTATUS,FCTRLSTRATEGY,FNUMBER,FSRCBILL,FISMATCHDIM,FCREATETIME,FSOURCEBITINDEX,FISSYSTEMINSERT,FMODIFIERID,FENABLE,FMODIFYTIME,FDESTBILL,FCREATORID,FLARGETEXTFIELD_TAG) VALUES (1759386671931024384,0,' ',' ',100000,0,1759386671931024384,100000,'D','C','5','report_bombatchforward_007','pdm_bombatch_endlevelback','1',{ts'2018-08-08  08:08:08'},0,'0',1,'1',{ts'2018-08-08  08:08:08'},'bd_materialmftinfo',1,'{"filterRow":[],"forList":false}'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer WHERE FID =  1759387615859094528)
INSERT INTO t_mrp_bftransfer(FID,FBITINDEX,FVERSION,FLARGETEXTFIELD,FCREATEORGID,FSOURCEDATAID,FMASTERID,FORGID,FFIELDTYPE,FSTATUS,FCTRLSTRATEGY,FNUMBER,FSRCBILL,FISMATCHDIM,FCREATETIME,FSOURCEBITINDEX,FISSYSTEMINSERT,FMODIFIERID,FENABLE,FMODIFYTIME,FDESTBILL,FCREATORID,FLARGETEXTFIELD_TAG) VALUES (1759387615859094528,0,' ',' ',100000,0,1759387615859094528,100000,'D','C','5','report_bombatchforward_008','pdm_bombatch_endlevelback','1',{ts'2018-08-08  08:08:08'},0,'0',1,'1',{ts'2018-08-08  08:08:08'},'bd_materialpurchaseinfo',1,'{"filterRow":[],"forList":false}'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer_l WHERE FPKID = '3I30BYI5=NO5')
INSERT INTO t_mrp_bftransfer_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1759384113330041856,'3I30BYI5=NO5','zh_CN','BOM批量反查(逐级/单级)字段集-物料生产信息-报表注册模型字段映射'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer_l WHERE FPKID = '3I30OI=DFRZ5')
INSERT INTO t_mrp_bftransfer_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1759385840468976640,'3I30OI=DFRZ5','zh_CN','BOM批量反查(逐级/单级)字段集-物料采购信息-报表注册模型字段映射'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer_l WHERE FPKID = '3I30UKKXC4OX')
INSERT INTO t_mrp_bftransfer_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1759386671931024384,'3I30UKKXC4OX','zh_CN','BOM批量反查(末级)字段集-物料生产信息-报表注册模型字段映射'); 

IF NOT EXISTS (SELECT 1 FROM t_mrp_bftransfer_l WHERE FPKID = '3I31/FUYGTQA')
INSERT INTO t_mrp_bftransfer_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1759387615859094528,'3I31/FUYGTQA','zh_CN','BOM批量反查(末级)字段集-物料采购信息-报表注册模型字段映射'); 



insert into t_mrp_bftransfer_u (fdataid,fuseorgid)
select fid ,fcreateorgid
from t_mrp_bftransfer a 
where a.fid in (1759384113330041856,1759385840468976640,1759386671931024384,1759387615859094528)
and not exists(select 1 from t_mrp_bftransfer_u b where b.fdataid  = a.fid and b.fuseorgid  = a.fcreateorgid );






---BOM批量反查：报表注册模型
IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextentity WHERE FENTRYID = 1759389678693344256)
INSERT INTO t_msplan_reportextentity(FMATCHDIMENSIONS,FID,FEXTENTITY,FFILTERRULE,FFILTERRULEVALUE_TAG,FENTRYID,FSEQ,FDSNUMBER,FFILTERRULEVALUE) VALUES (1759386671931024384,1759389678651401216,'bd_materialmftinfo','数据状态 等于 已审核 并且 使用状态 等于 可用 ','{"filterRow":[{"id":"3I30+1J+=81W","leftBracket":"","compareType":"105","fieldName":"status","rightBracket":"","logic":"0","value":[{"id":"3I30+1J+A+P5","value":"C"}],"baseDataIds":[]},{"id":"3I30+1J+=81X","leftBracket":"","compareType":"105","fieldName":"enable","rightBracket":"","logic":"0","value":[{"id":"3I30+1J+A+P6","value":"1"}],"baseDataIds":[]}],"forList":false}',1759389678693344256,1,'DS_001',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextentity WHERE FENTRYID = 1759389678693344257)
INSERT INTO t_msplan_reportextentity(FMATCHDIMENSIONS,FID,FEXTENTITY,FFILTERRULE,FFILTERRULEVALUE_TAG,FENTRYID,FSEQ,FDSNUMBER,FFILTERRULEVALUE) VALUES (1759387615859094528,1759389678651401216,'bd_materialpurchaseinfo','采购信息数据状态 等于 已审核 并且 物料编码.使用状态 等于 可用 ','{"filterRow":[{"id":"3I30/0GHA8HD","leftBracket":"","compareType":"105","fieldName":"status","rightBracket":"","logic":"0","value":[{"id":"3I30/0GKZEA6","value":"C"}],"baseDataIds":[]},{"id":"3I30/0GKYNOX","leftBracket":"","compareType":"105","fieldName":"masterid.enable","rightBracket":"","logic":"0","value":[{"id":"3I30/0GKZEA7","value":"1"}],"baseDataIds":[]}],"forList":false}',1759389678693344257,2,'DS_002',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextentity WHERE FENTRYID = 1759389934201955328)
INSERT INTO t_msplan_reportextentity(FMATCHDIMENSIONS,FID,FEXTENTITY,FFILTERRULE,FFILTERRULEVALUE_TAG,FENTRYID,FSEQ,FDSNUMBER,FFILTERRULEVALUE) VALUES (1759384113330041856,1759389934193566720,'bd_materialmftinfo','数据状态 等于 已审核 并且 使用状态 等于 可用 ','{"filterRow":[{"id":"3I300H3S13Y0","leftBracket":"","compareType":"105","fieldName":"status","rightBracket":"","logic":"0","value":[{"id":"3I300H3S1WJA","value":"C"}],"baseDataIds":[]},{"id":"3I300H3S13Y1","leftBracket":"","compareType":"105","fieldName":"enable","rightBracket":"","logic":"0","value":[{"id":"3I300H3S1WJB","value":"1"}],"baseDataIds":[]}],"forList":false}',1759389934201955328,1,'DS_001',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextentity WHERE FENTRYID = 1759389934201955329)
INSERT INTO t_msplan_reportextentity(FMATCHDIMENSIONS,FID,FEXTENTITY,FFILTERRULE,FFILTERRULEVALUE_TAG,FENTRYID,FSEQ,FDSNUMBER,FFILTERRULEVALUE) VALUES (1759385840468976640,1759389934193566720,'bd_materialpurchaseinfo','采购信息数据状态 等于 已审核 并且 采购信息使用状态 等于 可用 ','{"filterRow":[{"id":"3I301F2Q5DIC","leftBracket":"","compareType":"105","fieldName":"status","rightBracket":"","logic":"0","value":[{"id":"3I301F2Q654N","value":"C"}],"baseDataIds":[]},{"id":"3I301F2Q5DID","leftBracket":"","compareType":"105","fieldName":"enable","rightBracket":"","logic":"0","value":[{"id":"3I301F2Q654O","value":"1"}],"baseDataIds":[]}],"forList":false}',1759389934201955329,2,'DS_002',' '); 


IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299202)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299202,'文本型','1','number',' ',' ',' ',' ',1,'编码','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299203)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299203,'组织','1','org',' ',' ',' ',' ',2,'生产组织','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299205)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299205,'物料','1','rootmaterialid',' ',' ',' ',' ',4,'查询物料编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299206)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299206,'基础资料','1','rootbomversion',' ',' ',' ',' ',5,'查询版本号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299207)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299207,'基础资料','1','rootfeaturetype',' ',' ',' ',' ',6,'查询特征类编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299208)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299208,'基础资料','1','rootinsteadnum',' ',' ',' ',' ',7,'查询替代号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299209)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299209,'文本型','1','materialname',' ',' ',' ',' ',8,'父项物料名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299210)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299210,'文本型','1','materialmodel',' ',' ',' ',' ',9,'父项物料规格型号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299211)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299211,'文本型','1','rootmaterialname',' ',' ',' ',' ',10,'查询物料名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299212)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299212,'文本型','1','rootfeaturetypename',' ',' ',' ',' ',11,'查询特征类名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299213)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299213,'物料','1','materialid',' ',' ',' ',' ',12,'父项物料编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910274)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910274,'文本型','1','number',' ',' ',' ',' ',1,'BOM编码','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910275)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910275,'物料','1','entrymaterialid',' ',' ',' ',' ',2,'子项物料编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910280)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910280,'数量型','1','commonused',' ',' ',' ',' ',7,'标准用量','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910281)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910281,'基础资料','1','featuretype',' ',' ',' ',' ',8,'子项特征类编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910282)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910282,'弹性域','1','entryauxproperty',' ',' ',' ',' ',9,'辅助属性','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910283)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910283,'组织','1','org',' ',' ',' ',' ',10,'生产组织','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910284)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910284,'文本型','1','bomlevel',' ',' ',' ',' ',11,'BOM层级','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910285)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910285,'文本型','1','level',' ',' ',' ',' ',12,'层级','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910286)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910286,'物料','1','rootmaterialid',' ',' ',' ',' ',13,'查询物料编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910287)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910287,'基础资料','1','rootbomversion',' ',' ',' ',' ',14,'查询版本号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910288)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910288,'基础资料','1','rootinsteadnum',' ',' ',' ',' ',15,'查询替代号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910289)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910289,'基础资料','1','replaceno',' ',' ',' ',' ',16,'子BOM替代号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910290)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910290,'文本型','1','materialname',' ',' ',' ',' ',17,'父项物料名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910291)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910291,'文本型','1','entrymaterialname',' ',' ',' ',' ',18,'子项物料名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910292)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910292,'文本型','1','entrymaterialmodel',' ',' ',' ',' ',19,'子项物料规格型号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910293)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910293,'文本型','1','rootmaterialname',' ',' ',' ',' ',20,'查询物料名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910294)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910294,'物料','1','materialid',' ',' ',' ',' ',21,'父项物料编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910295)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910295,'数量型','1','entryqtynumerator',' ',' ',' ',' ',22,'用量：分子','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910296)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910296,'数量型','1','entryqtydenominator',' ',' ',' ',' ',23,'用量：分母','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910297)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910297,'下拉列表','1','entryqtytype',' ',' ',' ',' ',24,'用量类型','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910298)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910298,'长整数','1','bomentryid',' ',' ',' ',' ',25,'BOM分录ID','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910299)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910299,'文本型','1','featuretypename',' ',' ',' ',' ',26,'子项特征类名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910300)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910300,'基础资料','1','rootfeaturetype',' ',' ',' ',' ',27,'查询特征类编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910301)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910301,'文本型','1','rootfeaturetypename',' ',' ',' ',' ',28,'查询特征类名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299215)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299215,'数量型','1','commonused',' ',' ',' ',' ',13,'标准用量','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299219)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299219,'下拉列表','1','entryqtytype',' ',' ',' ',' ',14,'用量类型','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299220)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299220,'弹性域','1','entryauxproperty',' ',' ',' ',' ',15,'辅助属性','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299221)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299221,'基础资料','1','featuretype',' ',' ',' ',' ',16,'特征类编码','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299222)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299222,'基础资料','1','featuretypename',' ',' ',' ',' ',17,'特征类名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759428679848518656)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759428679848518656,'基础资料','1','unit',' ',' ',' ',' ',18,'基本单位','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759428679848518657)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759428679848518657,'下拉列表','1','materialattr',' ',' ',' ',' ',19,'物料属性','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759428679848518658)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759428679848518658,'基础资料','1','version',' ',' ',' ',' ',20,'父项版本号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759428679848518659)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759428679848518659,'基础资料','1','pconfigcode',' ',' ',' ',' ',21,'配置号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910276)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910276,'下拉列表','1','entrymaterialattr',' ',' ',' ',' ',3,'子项物料属性','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910277)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910277,'基础资料','1','entryunit',' ',' ',' ',' ',4,'子项物料计量单位','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910278)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910278,'基础资料','1','entryconfigcode',' ',' ',' ',' ',5,'子项物料配置号','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389934201910279)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759389934201910279,'基础资料','1','entryversion',' ',' ',' ',' ',6,'子项物料版本号','1','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759430314452673536)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759430314452673536,'下拉列表','1','materialattr',' ',' ',' ',' ',29,'物料属性','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759430314452673537)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759430314452673537,'基础资料','1','pconfigcode',' ',' ',' ',' ',30,'配置号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759430314452673538)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759430314452673538,'基础资料','1','unit',' ',' ',' ',' ',31,'基本单位','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759430314452673539)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389934193566720,1759430314452673539,'基础资料','1','version',' ',' ',' ',' ',32,'父项版本号','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1759389678693299204)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1759389678651401216,1759389678693299204,'文本型','1','level',' ',' ',' ',' ',3,'层级','1','1',' '); 


IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextmodel WHERE FID = 1759389934193566720)
INSERT INTO t_msplan_reportextmodel(FID,FREPORTENTITY,FCREATETIME,FMODIFIERID,FENABLE,FISSYSSET,FMODIFYTIME,FMASTERID,FSTATUS,FCREATORID,FNUMBER) VALUES (1759389934193566720,'pdm_bombatch_back',{ts'2018-08-08  08:08:08'},1,'1','1',{ts'2018-08-08  08:08:08'},1759389934193566720,'C',1,'bomBatchForward_003'); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextmodel WHERE FID = 1759389678651401216)
INSERT INTO t_msplan_reportextmodel(FID,FREPORTENTITY,FCREATETIME,FMODIFIERID,FENABLE,FISSYSSET,FMODIFYTIME,FMASTERID,FSTATUS,FCREATORID,FNUMBER) VALUES (1759389678651401216,'pdm_bombatch_endlevelback',{ts'2018-08-08  08:08:08'},1,'1','1',{ts'2018-08-08  08:08:08'},1759389678651401216,'C',1,'bomBatchForward_004'); 


IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextmodel_l WHERE FPKID = '3I31DH29E/YP')
INSERT INTO t_msplan_reportextmodel_l(FID,FPKID,FLOCALEID,FREMARK,FNAME) VALUES (1759389678651401216,'3I31DH29E/YP','zh_CN','BOM批量反查（末级反查）报表注册模型（系统预置）','BOM批量反查（末级反查）报表注册模型'); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextmodel_l WHERE FPKID = '3I31FBP6OGFQ')
INSERT INTO t_msplan_reportextmodel_l(FID,FPKID,FLOCALEID,FREMARK,FNAME) VALUES (1759389934193566720,'3I31FBP6OGFQ','zh_CN','BOM批量反查（逐级/单级反查）报表注册模型（系统预置）','BOM批量反查（逐级/单级反查）报表注册模型'); 

--名称调整
update t_msplan_reportextcolumn set FFIELDNAME = '子项物料属性' where fid in(1754286130653578240,1754285651630507008,1759389934193566720,1759389678651401216) and FFIELDNAME='子项物属性';

update t_msplan_reportextcolumn set FFIELDNAME = '用量：分子' where fid in(1754286130653578240,1754285651630507008,1759389934193566720,1759389678651401216) and FFIELDNAME='分子';

update t_msplan_reportextcolumn set FFIELDNAME = '用量：分母' where fid in(1754286130653578240,1754285651630507008,1759389934193566720,1759389678651401216) and FFIELDNAME='分母';


IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1776932666021603328)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754285651630507008,1776932666021603328,'基础资料','0','featuretypename',' ',' ',' ',' ',22,'特征类名称','0','1',' '); 

IF NOT EXISTS (SELECT 1 FROM t_msplan_reportextcolumn WHERE FENTRYID = 1776932292971819008)
INSERT INTO t_msplan_reportextcolumn(FID,FENTRYID,FDATATYPE,FISSYSSETFIELD,FFIELDNUMBER,FCALCULATEEXC,FCALCULATEEXC_TAG,FDATASOURCEENTITY,FCALCULATETEXT,FSEQ,FFIELDNAME,FFIELDUNVISIBLE,FCONVERTTYPE,FSRCDSNUMBER) VALUES (1754286130653578240,1776932292971819008,'基础资料','0','featuretypename',' ',' ',' ',' ',35,'特征类名称','0','1',' '); 


--子项特征类名称 调整为基础资料
update t_msplan_reportextcolumn set FDATATYPE = '基础资料' where FENTRYID in(1759389934201910299,1759389678693299222) ;

update t_msplan_reportextcolumn set FFIELDNAME = '特征类编码' where FENTRYID in(1754286130695520272,1754285651714392071) and  FFIELDNAME = '特征类';

update t_msplan_reportextcolumn set FFIELDNAME = '子项物料计量单位' where FENTRYID = 1759389934201910277 and  FFIELDNAME = '计量单位';

update t_msplan_reportextcolumn set FFIELDNAME = '子项物料配置号' where FENTRYID = 1759389934201910278 and  FFIELDNAME = '配置号';
