IF NOT EXISTS (SELECT 1 FROM T_ER_TRIP_FIELDMAPENTRY WHERE FMAPTARGETFIELD='param.costCenterList.[1].costCenterName' and fid =1865840957615236096)
INSERT INTO T_ER_TRIP_FIELDMAPENTRY(FID,FMAPTYPEEXT,FMAPSTATUS,FMAPSOURCEFIELDEXT,FMAPDESC,FMAPTARGETFIELDDESC,FMAPDESIGNEXT,FENTRYID,FMAPISDEFAULT,FMAPCREATETIME,FMAPSOURCEFIELD,FMAPMODIFYTIME,FMAPDESIGN,FSEQ,FMAPTYPE,FMAPTARGETFIELD,FMAPPRIMARYKEY) VALUES (1865840957615236096,' ','1',' ','单据头.id','成本中心名称',' ',2209565239886854144,'1',{ts'2025-05-07  00:00:00'},'costcompany.id',{ts'2025-05-07  00:00:00'},' ',28,'1','param.costCenterList.[1].costCenterName','0');
IF NOT EXISTS (SELECT 1 FROM T_ER_TRIP_FIELDMAPENTRY WHERE FMAPTARGETFIELD='param.costCenterList.[1].costCenterCode' and fid =1865840957615236096)
INSERT INTO T_ER_TRIP_FIELDMAPENTRY(FID,FMAPTYPEEXT,FMAPSTATUS,FMAPSOURCEFIELDEXT,FMAPDESC,FMAPTARGETFIELDDESC,FMAPDESIGNEXT,FENTRYID,FMAPISDEFAULT,FMAPCREATETIME,FMAPSOURCEFIELD,FMAPMODIFYTIME,FMAPDESIGN,FSEQ,FMAPTYPE,FMAPTARGETFIELD,FMAPPRIMARYKEY) VALUES (1865840957615236096,' ','1',' ',' ','成本中心Code',' ',2209565239886854145,'1',{ts'2025-05-07  00:00:00'},' ',{ts'2025-05-07  00:00:00'},' ',29,'2','param.costCenterList.[1].costCenterCode','0');
IF NOT EXISTS (SELECT 1 FROM T_ER_TRIP_FIELDMAPENTRY WHERE FMAPTARGETFIELD='param.costCenterList.[1].costCenterTypeName'and fid =1865840957615236096)
INSERT INTO T_ER_TRIP_FIELDMAPENTRY(FID,FMAPTYPEEXT,FMAPSTATUS,FMAPSOURCEFIELDEXT,FMAPDESC,FMAPTARGETFIELDDESC,FMAPDESIGNEXT,FENTRYID,FMAPISDEFAULT,FMAPCREATETIME,FMAPSOURCEFIELD,FMAPMODIFYTIME,FMAPDESIGN,FSEQ,FMAPTYPE,FMAPTARGETFIELD,FMAPPRIMARYKEY) VALUES (1865840957615236096,' ','1',' ',' ','成本中心类型名称',' ',2209565239886854146,'1',{ts'2025-05-07  00:00:00'},' ',{ts'2025-05-07  00:00:00'},'费用承担公司ID',30,'2','param.costCenterList.[1].costCenterTypeName','0');
IF NOT EXISTS (SELECT 1 FROM T_ER_TRIP_FIELDMAPENTRY WHERE FMAPTARGETFIELD='param.costCenterList.[1].costCenterTypeCode'and fid =1865840957615236096)
INSERT INTO T_ER_TRIP_FIELDMAPENTRY(FID,FMAPTYPEEXT,FMAPSTATUS,FMAPSOURCEFIELDEXT,FMAPDESC,FMAPTARGETFIELDDESC,FMAPDESIGNEXT,FENTRYID,FMAPISDEFAULT,FMAPCREATETIME,FMAPSOURCEFIELD,FMAPMODIFYTIME,FMAPDESIGN,FSEQ,FMAPTYPE,FMAPTARGETFIELD,FMAPPRIMARYKEY) VALUES (1865840957615236096,' ','1',' ',' ','成本中心类型Code',' ',2209565239886854147,'1',{ts'2025-05-07  00:00:00'},' ',{ts'2025-05-07  00:00:00'},'costCenter1',31,'2','param.costCenterList.[1].costCenterTypeCode','0');
IF NOT EXISTS (SELECT 1 FROM T_ER_TRIP_FIELDMAPENTRY WHERE FMAPTARGETFIELD='param.costCenterList.[1].isDefault'and fid =1865840957615236096)
INSERT INTO T_ER_TRIP_FIELDMAPENTRY(FID,FMAPTYPEEXT,FMAPSTATUS,FMAPSOURCEFIELDEXT,FMAPDESC,FMAPTARGETFIELDDESC,FMAPDESIGNEXT,FENTRYID,FMAPISDEFAULT,FMAPCREATETIME,FMAPSOURCEFIELD,FMAPMODIFYTIME,FMAPDESIGN,FSEQ,FMAPTYPE,FMAPTARGETFIELD,FMAPPRIMARYKEY) VALUES (1865840957615236096,' ','1',' ',' ','是否默认值',' ',2209565239886854148,'1',{ts'2025-05-07  00:00:00'},' ',{ts'2025-05-07  00:00:00'},'true',32,'2','param.costCenterList.[1].isDefault','0');

   -- 配置一一对应 ID需要在前
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET fmaptype='1',fmapsourcefield='costcompany.id',fmapdesign=' ',FSEQ=23 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.costCenterList.[0].costCenterName';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET fmaptype='2',fmapsourcefield=' ',fmapdesign=' ',FSEQ=24 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.costCenterList.[0].costCenterCode';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET fmaptype='2',fmapsourcefield=' ',fmapdesign='费用承担公司ID',FSEQ=25 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.costCenterList.[0].costCenterTypeName';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET fmaptype='2',fmapsourcefield=' ',fmapdesign='costCenter',FSEQ=26 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.costCenterList.[0].costCenterTypeCode';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET fmaptype='2',fmapsourcefield=' ',fmapdesign='true',FSEQ=27 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.costCenterList.[0].isDefault';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET fmaptype='1',fmapsourcefield='costcompany.name',fmapdesign=' ',FSEQ=28 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.costCenterList.[1].costCenterName';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET fmaptype='2',fmapsourcefield=' ',fmapdesign=' ',FSEQ=29 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.costCenterList.[1].costCenterCode';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET fmaptype='2',fmapsourcefield=' ',fmapdesign='费用承担公司名称',FSEQ=30 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.costCenterList.[1].costCenterTypeName';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET fmaptype='2',fmapsourcefield=' ',fmapdesign='costCenter1',FSEQ=31 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.costCenterList.[1].costCenterTypeCode';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET fmaptype='2',fmapsourcefield=' ',fmapdesign='true',FSEQ=32 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.costCenterList.[1].isDefault';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET FSEQ=33 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.travelApplyType';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET FSEQ=34 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.travelApplyTime';
UPDATE T_ER_TRIP_FIELDMAPENTRY  SET FSEQ=35 WHERE FID =1865840957615236096 AND FMAPTARGETFIELD='param.travelUpdateTime';
