-- ============================================
-- BPM 完整流程导出
-- 流程: 巡视整改提升流程 (process_1780563034974)
-- 节点: 共 7 个（全部）
-- 导出时间: 2026-08-12 15:00:14
-- ============================================
-- 执行效果:
--   目标库无此流程 → INSERT 全部数据，发布即可用
--   目标库已有此流程 → 流程定义(process_xml/process_json)与节点配置全部 UPDATE，保留 id/process_key
-- 执行后: 去流程设计器点"发布"
-- ============================================

SET @new_pid = REPLACE(UUID(), '-', '');

-- ============================================
-- 1. 流程定义（仅在目标库无此 process_key 时 INSERT，process_status 强制置 0 未发布）
-- ============================================
INSERT INTO ext_act_process
  (id, process_type, process_key, process_name, process_status,
   process_xml, process_json, low_app_id, note,
   pc_icon, app_icon, urge_status, back_status, graphic_status,
   auto_submit_status, notify_way, start_type, open_status,
   run_concurrent_mode)
SELECT
  @new_pid, 'oa', 'process_1780563034974', '巡视整改提升流程', 0,
  UNHEX(
'3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554'
'462D38223F3E0A3C62706D6E323A646566696E6974696F6E7320786D6C6E733A'
'62706D6E323D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42'
'504D4E2F32303130303532342F4D4F44454C2220786D6C6E733A7873693D2268'
'7474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D612D'
'696E7374616E63652220786D6C6E733A62706D6E64693D22687474703A2F2F77'
'77772E6F6D672E6F72672F737065632F42504D4E2F32303130303532342F4449'
'2220786D6C6E733A64633D22687474703A2F2F7777772E6F6D672E6F72672F73'
'7065632F44442F32303130303532342F44432220786D6C6E733A666C6F776162'
'6C653D22687474703A2F2F666C6F7761626C652E6F72672F62706D6E2220786D'
'6C6E733A64693D22687474703A2F2F7777772E6F6D672E6F72672F737065632F'
'44442F32303130303532342F4449222069643D2273616D706C652D6469616772'
'616D22207461726765744E616D6573706163653D22687474703A2F2F62706D6E'
'2E696F2F736368656D612F62706D6E22207873693A736368656D614C6F636174'
'696F6E3D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42504D'
'4E2F32303130303532342F4D4F44454C2042504D4E32302E787364223E3C6270'
'6D6E323A70726F636573732069643D2270726F636573735F3137383035363330'
'333439373422206E616D653D22E5B7A1E8A786E695B4E694B9E68F90E58D87E6'
'B581E7A88B223E3C62706D6E323A657874656E73696F6E456C656D656E74733E'
'3C666C6F7761626C653A657865637574696F6E4C697374656E657220636C6173'
'733D226F72672E6A656563672E6D6F64756C65732E65787462706D2E6C697374'
'656E65722E657865637574696F6E2E50726F63657373456E644C697374656E65'
'7222206576656E743D22656E6422202F3E3C666C6F7761626C653A6576656E74'
'4C697374656E657220636C6173733D226F72672E6A656563672E6D6F64756C65'
'732E6C697374656E65722E7461736B7469702E5461736B437265617465476C6F'
'62616C4C697374656E657222202F3E3C2F62706D6E323A657874656E73696F6E'
'456C656D656E74733E3C62706D6E323A73746172744576656E742069643D2273'
'7461727422206E616D653D22E5BC80E5A78B2220666C6F7761626C653A696E69'
'746961746F723D226170706C79557365724964223E3C62706D6E323A6F757467'
'6F696E673E466C6F775F3064736B3179363C2F62706D6E323A6F7574676F696E'
'673E3C2F62706D6E323A73746172744576656E743E3C62706D6E323A6578636C'
'7573697665476174657761792069643D22476174657761795F30706F63377069'
'22206E616D653D22E698AFE590A6E99C80E8A681E5859AE7BEA4E8B49FE8B4A3'
'E4BABAE5AEA1E689B9223E3C62706D6E323A696E636F6D696E673E466C6F775F'
'30696574666F733C2F62706D6E323A696E636F6D696E673E3C62706D6E323A6F'
'7574676F696E673E466C6F775F3132677A6F69623C2F62706D6E323A6F757467'
'6F696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3176646F3877'
'793C2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A6578636C7573'
'697665476174657761793E3C62706D6E323A757365725461736B2069643D2254'
'61736B5F316E6A346B376222206E616D653D22E5859AE7BEA4E7BB8FE58A9EE4'
'BABAE58F91E8B5B7E79DA3E58A9EE6B581E7A88B2220666C6F7761626C653A61'
'737369676E65653D22247B6170706C795573657249647D223E3C62706D6E323A'
'696E636F6D696E673E466C6F775F3064736B3179363C2F62706D6E323A696E63'
'6F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3069657466'
'6F733C2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A7573657254'
'61736B3E3C62706D6E323A73657175656E6365466C6F772069643D22466C6F77'
'5F30696574666F732220736F757263655265663D225461736B5F316E6A346B37'
'6222207461726765745265663D22476174657761795F30706F6337706922202F'
'3E3C62706D6E323A73657175656E6365466C6F772069643D22466C6F775F3064'
'736B3179362220736F757263655265663D227374617274222074617267657452'
'65663D225461736B5F316E6A346B376222202F3E3C62706D6E323A7573657254'
'61736B2069643D225461736B5F3169393973367622206E616D653D22E5859AE7'
'BEA4E8B49FE8B4A3E4BABAE694B6E99B86E5898DE5AEA1E689B92220666C6F77'
'61626C653A61737369676E65653D22247B696E7370656374496D70726F766546'
'6C6F772E67657444714C656164657228657865637574696F6E297D223E3C6270'
'6D6E323A657874656E73696F6E456C656D656E74733E3C666C6F7761626C653A'
'7461736B4C697374656E65722064656C656761746545787072657373696F6E3D'
'22247B496E7370656374416674657244714C6561646572417070726F76654C69'
'7374656E65727D22206576656E743D22636F6D706C657465222069643D224348'
'7870706D42434D44666E5861705722202F3E3C2F62706D6E323A657874656E73'
'696F6E456C656D656E74733E3C62706D6E323A696E636F6D696E673E466C6F77'
'5F3132677A6F69623C2F62706D6E323A696E636F6D696E673E3C62706D6E323A'
'6F7574676F696E673E466C6F775F3068336361777A3C2F62706D6E323A6F7574'
'676F696E673E3C2F62706D6E323A757365725461736B3E3C62706D6E323A7365'
'7175656E6365466C6F772069643D22466C6F775F3132677A6F696222206E616D'
'653D22E698AF2220736F757263655265663D22476174657761795F30706F6337'
'706922207461726765745265663D225461736B5F31693939733676223E3C6270'
'6D6E323A636F6E646974696F6E45787072657373696F6E207873693A74797065'
'3D2262706D6E323A74466F726D616C45787072657373696F6E223E247B696E73'
'70656374496D70726F7665466C6F772E6765744E65656444714C656164657241'
'7070726F766528657865637574696F6E293D3D2231227D3C2F62706D6E323A63'
'6F6E646974696F6E45787072657373696F6E3E3C2F62706D6E323A7365717565'
'6E6365466C6F773E3C62706D6E323A757365725461736B2069643D225461736B'
'5F3163363475766C22206E616D653D22E8B4A3E4BBBBE983A8E997A8E9A286E5'
'AFBCE68EA5E58F97E4BBBBE58AA1E5B9B6E58886E9858D2220666C6F7761626C'
'653A61737369676E65653D22247B696D706C446570746C647D223E3C62706D6E'
'323A657874656E73696F6E456C656D656E74733E3C666C6F7761626C653A7461'
'736B4C697374656E65722064656C656761746545787072657373696F6E3D2224'
'7B496E73706563744166746572496D706C446570744C6561646572417070726F'
'76654C697374656E65727D22206576656E743D22636F6D706C65746522206964'
'3D2269656377696A78376A63335854626B4E22202F3E3C666C6F7761626C653A'
'7461736B4C697374656E65722064656C656761746545787072657373696F6E3D'
'22247B41667465724D6561737572655265734C656164657253746F72654C6973'
'74656E65727D22206576656E743D22636F6D706C657465222069643D22655777'
'514D625948704779746345697422202F3E3C2F62706D6E323A657874656E7369'
'6F6E456C656D656E74733E3C62706D6E323A696E636F6D696E673E466C6F775F'
'3176646F3877793C2F62706D6E323A696E636F6D696E673E3C62706D6E323A69'
'6E636F6D696E673E466C6F775F3068336361777A3C2F62706D6E323A696E636F'
'6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3163796C6977'
'7A3C2F62706D6E323A6F7574676F696E673E3C62706D6E323A6D756C7469496E'
'7374616E63654C6F6F7043686172616374657269737469637320666C6F776162'
'6C653A636F6C6C656374696F6E3D22247B696E7370656374496D70726F766546'
'6C6F772E676574496D706C446570744C65616465724C69737428657865637574'
'696F6E297D2220666C6F7761626C653A656C656D656E745661726961626C653D'
'22696D706C446570746C64223E3C62706D6E323A6C6F6F7043617264696E616C'
'697479207873693A747970653D2262706D6E323A74466F726D616C4578707265'
'7373696F6E223E247B696E7370656374496D70726F7665466C6F772E67657449'
'6D706C446570744C65616465724C6973744C656E67746828657865637574696F'
'6E297D3C2F62706D6E323A6C6F6F7043617264696E616C6974793E3C62706D6E'
'323A636F6D706C6574696F6E436F6E646974696F6E207873693A747970653D22'
'62706D6E323A74466F726D616C45787072657373696F6E223E247B6E724F6643'
'6F6D706C65746564496E7374616E6365732667743B3D317D203C2F62706D6E32'
'3A636F6D706C6574696F6E436F6E646974696F6E3E3C2F62706D6E323A6D756C'
'7469496E7374616E63654C6F6F704368617261637465726973746963733E3C2F'
'62706D6E323A757365725461736B3E3C62706D6E323A73657175656E6365466C'
'6F772069643D22466C6F775F3176646F38777922206E616D653D22E590A62220'
'736F757263655265663D22476174657761795F30706F63377069222074617267'
'65745265663D225461736B5F3163363475766C223E3C62706D6E323A636F6E64'
'6974696F6E45787072657373696F6E207873693A747970653D2262706D6E323A'
'74466F726D616C45787072657373696F6E223E247B696E7370656374496D7072'
'6F7665466C6F772E6765744E65656444714C6561646572417070726F76652865'
'7865637574696F6E293D3D2230227D3C2F62706D6E323A636F6E646974696F6E'
'45787072657373696F6E3E3C2F62706D6E323A73657175656E6365466C6F773E'
'3C62706D6E323A73657175656E6365466C6F772069643D22466C6F775F306833'
'6361777A2220736F757263655265663D225461736B5F31693939733676222074'
'61726765745265663D225461736B5F3163363475766C22202F3E3C62706D6E32'
'3A757365725461736B2069643D225461736B5F306D627237333522206E616D65'
'3D22E983A8E997A8E7BB8FE58A9EE4BABAE58F8DE9A688E5AE8CE68890E68385'
'E586B5E5B9B6E4B88AE4BCA0E99984E4BBB62220666C6F7761626C653A617373'
'69676E65653D22247B696E7370656374496D70726F7665466C6F772E67657453'
'7562417070726F76655573657228657865637574696F6E297D223E3C62706D6E'
'323A696E636F6D696E673E466C6F775F303869743862623C2F62706D6E323A69'
'6E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F307238'
'6D37316B3C2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A757365'
'725461736B3E3C62706D6E323A6578636C757369766547617465776179206964'
'3D22476174657761795F3178317866613422206E616D653D22E983A8E997A8E9'
'A286E5AFBCE698AFE590A6E79BB4E68EA5E58A9EE7BB93223E3C62706D6E323A'
'696E636F6D696E673E466C6F775F3163796C69777A3C2F62706D6E323A696E63'
'6F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3164746E65'
'38373C2F62706D6E323A6F7574676F696E673E3C62706D6E323A6F7574676F69'
'6E673E466C6F775F303869743862623C2F62706D6E323A6F7574676F696E673E'
'3C2F62706D6E323A6578636C7573697665476174657761793E3C62706D6E323A'
'73657175656E6365466C6F772069643D22466C6F775F3163796C69777A222073'
'6F757263655265663D225461736B5F3163363475766C22207461726765745265'
'663D22476174657761795F3178317866613422202F3E3C62706D6E323A757365'
'725461736B2069643D225461736B5F306D787467303522206E616D653D22E8B4'
'A3E4BBBBE983A8E997A8E9A286E5AFBCE5AEA1E689B92220666C6F7761626C65'
'3A61737369676E65653D22247B696E7370656374496D70726F7665466C6F772E'
'676574496D706C446570744C656164657228657865637574696F6E297D223E3C'
'62706D6E323A696E636F6D696E673E466C6F775F3072386D37316B3C2F62706D'
'6E323A696E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F77'
'5F30666D6E39366F3C2F62706D6E323A6F7574676F696E673E3C2F62706D6E32'
'3A757365725461736B3E3C62706D6E323A73657175656E6365466C6F77206964'
'3D22466C6F775F3164746E65383722206E616D653D22E698AF2220736F757263'
'655265663D22476174657761795F317831786661342220746172676574526566'
'3D225461736B5F31343232366979223E3C62706D6E323A636F6E646974696F6E'
'45787072657373696F6E207873693A747970653D2262706D6E323A74466F726D'
'616C45787072657373696F6E223E247B696E7370656374496D70726F7665466C'
'6F772E6765744973456E6428657865637574696F6E293D3D2231227D3C2F6270'
'6D6E323A636F6E646974696F6E45787072657373696F6E3E3C2F62706D6E323A'
'73657175656E6365466C6F773E3C62706D6E323A757365725461736B2069643D'
'225461736B5F3134323236697922206E616D653D22E5859AE7BEA4E7BB8FE58A'
'9EE4BABAE5AEA1E69FA52220666C6F7761626C653A61737369676E65653D2224'
'7B6170706C795573657249647D223E3C62706D6E323A696E636F6D696E673E46'
'6C6F775F3164746E6538373C2F62706D6E323A696E636F6D696E673E3C62706D'
'6E323A696E636F6D696E673E466C6F775F30666D6E39366F3C2F62706D6E323A'
'696E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3031'
'75736C34673C2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A7573'
'65725461736B3E3C62706D6E323A73657175656E6365466C6F772069643D2246'
'6C6F775F3038697438626222206E616D653D22E590A62220736F757263655265'
'663D22476174657761795F3178317866613422207461726765745265663D2254'
'61736B5F306D6272373335223E3C62706D6E323A636F6E646974696F6E457870'
'72657373696F6E207873693A747970653D2262706D6E323A74466F726D616C45'
'787072657373696F6E223E247B696E7370656374496D70726F7665466C6F772E'
'6765744973456E6428657865637574696F6E29213D2231227D3C2F62706D6E32'
'3A636F6E646974696F6E45787072657373696F6E3E3C2F62706D6E323A736571'
'75656E6365466C6F773E3C62706D6E323A757365725461736B2069643D225461'
'736B5F3069786931727322206E616D653D22E5859AE7BEA4E8B49FE8B4A3E4BA'
'BAE694B6E99B86E5908EE5AEA1E689B92220666C6F7761626C653A6173736967'
'6E65653D22247B64716C647D223E3C62706D6E323A696E636F6D696E673E466C'
'6F775F303175736C34673C2F62706D6E323A696E636F6D696E673E3C62706D6E'
'323A6F7574676F696E673E466C6F775F30616C70616E733C2F62706D6E323A6F'
'7574676F696E673E3C62706D6E323A6D756C7469496E7374616E63654C6F6F70'
'43686172616374657269737469637320666C6F7761626C653A636F6C6C656374'
'696F6E3D22247B696E7370656374496D70726F7665466C6F772E676574447144'
'6570744C645573657249644C69737428297D2220666C6F7761626C653A656C65'
'6D656E745661726961626C653D2264716C64223E3C62706D6E323A6C6F6F7043'
'617264696E616C697479207873693A747970653D2262706D6E323A74466F726D'
'616C45787072657373696F6E223E247B696E7370656374496D70726F7665466C'
'6F772E6765744471446570744C645573657249644C6973744C656E6774682829'
'7D3C2F62706D6E323A6C6F6F7043617264696E616C6974793E3C62706D6E323A'
'636F6D706C6574696F6E436F6E646974696F6E207873693A747970653D226270'
'6D6E323A74466F726D616C45787072657373696F6E223E247B6E724F66436F6D'
'706C65746564496E7374616E6365732667743B3D317D3C2F62706D6E323A636F'
'6D706C6574696F6E436F6E646974696F6E3E3C2F62706D6E323A6D756C746949'
'6E7374616E63654C6F6F704368617261637465726973746963733E3C2F62706D'
'6E323A757365725461736B3E3C62706D6E323A73657175656E6365466C6F7720'
'69643D22466C6F775F303175736C34672220736F757263655265663D22546173'
'6B5F3134323236697922207461726765745265663D225461736B5F3069786931'
'727322202F3E3C62706D6E323A73657175656E6365466C6F772069643D22466C'
'6F775F3072386D37316B2220736F757263655265663D225461736B5F306D6272'
'37333522207461726765745265663D225461736B5F306D787467303522202F3E'
'3C62706D6E323A73657175656E6365466C6F772069643D22466C6F775F30666D'
'6E39366F2220736F757263655265663D225461736B5F306D7874673035222074'
'61726765745265663D225461736B5F3134323236697922202F3E3C62706D6E32'
'3A656E644576656E742069643D22456E645F31313634326271223E3C62706D6E'
'323A696E636F6D696E673E466C6F775F30616C70616E733C2F62706D6E323A69'
'6E636F6D696E673E3C2F62706D6E323A656E644576656E743E3C62706D6E323A'
'73657175656E6365466C6F772069643D22466C6F775F30616C70616E73222073'
'6F757263655265663D225461736B5F3069786931727322207461726765745265'
'663D22456E645F3131363432627122202F3E3C2F62706D6E323A70726F636573'
'733E3C62706D6E64693A42504D4E4469616772616D2069643D2242504D4E4469'
'616772616D5F31223E3C62706D6E64693A42504D4E506C616E652069643D2242'
'504D4E506C616E655F31222062706D6E456C656D656E743D2270726F63657373'
'5F31373830353633303334393734223E3C62706D6E64693A42504D4E45646765'
'2069643D22466C6F775F30616C70616E735F6469222062706D6E456C656D656E'
'743D22466C6F775F30616C70616E73223E3C64693A776179706F696E7420783D'
'223536302220793D2236363022202F3E3C64693A776179706F696E7420783D22'
'3536302220793D2236393222202F3E3C2F62706D6E64693A42504D4E45646765'
'3E3C62706D6E64693A42504D4E456467652069643D22466C6F775F30666D6E39'
'366F5F6469222062706D6E456C656D656E743D22466C6F775F30666D6E39366F'
'223E3C64693A776179706F696E7420783D223635302220793D2235313022202F'
'3E3C64693A776179706F696E7420783D223631302220793D2235313022202F3E'
'3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E4564'
'67652069643D22466C6F775F3072386D37316B5F6469222062706D6E456C656D'
'656E743D22466C6F775F3072386D37316B223E3C64693A776179706F696E7420'
'783D223730302220793D2234353022202F3E3C64693A776179706F696E742078'
'3D223730302220793D2234373022202F3E3C2F62706D6E64693A42504D4E4564'
'67653E3C62706D6E64693A42504D4E456467652069643D22466C6F775F303175'
'736C34675F6469222062706D6E456C656D656E743D22466C6F775F303175736C'
'3467223E3C64693A776179706F696E7420783D223536302220793D2235353022'
'202F3E3C64693A776179706F696E7420783D223536302220793D223538302220'
'2F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E'
'456467652069643D22466C6F775F303869743862625F6469222062706D6E456C'
'656D656E743D22466C6F775F30386974386262223E3C64693A776179706F696E'
'7420783D223538352220793D2234313022202F3E3C64693A776179706F696E74'
'20783D223635302220793D2234313022202F3E3C62706D6E64693A42504D4E4C'
'6162656C3E3C64633A426F756E647320783D223631302220793D223339332220'
'77696474683D22313222206865696768743D22313422202F3E3C2F62706D6E64'
'693A42504D4E4C6162656C3E3C2F62706D6E64693A42504D4E456467653E3C62'
'706D6E64693A42504D4E456467652069643D22466C6F775F3164746E6538375F'
'6469222062706D6E456C656D656E743D22466C6F775F3164746E653837223E3C'
'64693A776179706F696E7420783D223536302220793D2234333522202F3E3C64'
'693A776179706F696E7420783D223536302220793D2234373022202F3E3C6270'
'6D6E64693A42504D4E4C6162656C3E3C64633A426F756E647320783D22353337'
'2220793D22343433222077696474683D22313222206865696768743D22313422'
'202F3E3C2F62706D6E64693A42504D4E4C6162656C3E3C2F62706D6E64693A42'
'504D4E456467653E3C62706D6E64693A42504D4E456467652069643D22466C6F'
'775F3163796C69777A5F6469222062706D6E456C656D656E743D22466C6F775F'
'3163796C69777A223E3C64693A776179706F696E7420783D223536302220793D'
'2233343022202F3E3C64693A776179706F696E7420783D223536302220793D22'
'33383522202F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E6469'
'3A42504D4E456467652069643D22466C6F775F3068336361777A5F6469222062'
'706D6E456C656D656E743D22466C6F775F3068336361777A223E3C64693A7761'
'79706F696E7420783D223730302220793D2232323022202F3E3C64693A776179'
'706F696E7420783D223730302220793D2233303022202F3E3C64693A77617970'
'6F696E7420783D223631302220793D2233303022202F3E3C2F62706D6E64693A'
'42504D4E456467653E3C62706D6E64693A42504D4E456467652069643D22466C'
'6F775F3176646F3877795F6469222062706D6E456C656D656E743D22466C6F77'
'5F3176646F387779223E3C64693A776179706F696E7420783D22353630222079'
'3D2232303522202F3E3C64693A776179706F696E7420783D223536302220793D'
'2232363022202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64633A426F'
'756E647320783D223536392220793D22323234222077696474683D2231322220'
'6865696768743D22313422202F3E3C2F62706D6E64693A42504D4E4C6162656C'
'3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E45'
'6467652069643D22466C6F775F3132677A6F69625F6469222062706D6E456C65'
'6D656E743D22466C6F775F3132677A6F6962223E3C64693A776179706F696E74'
'20783D223538352220793D2231383022202F3E3C64693A776179706F696E7420'
'783D223635302220793D2231383022202F3E3C62706D6E64693A42504D4E4C61'
'62656C3E3C64633A426F756E647320783D223631322220793D22313632222077'
'696474683D22313222206865696768743D22313422202F3E3C2F62706D6E6469'
'3A42504D4E4C6162656C3E3C2F62706D6E64693A42504D4E456467653E3C6270'
'6D6E64693A42504D4E456467652069643D22466C6F775F3064736B3179365F64'
'69222062706D6E456C656D656E743D22466C6F775F3064736B317936223E3C64'
'693A776179706F696E7420783D223332382220793D2231383022202F3E3C6469'
'3A776179706F696E7420783D223338302220793D2231383022202F3E3C2F6270'
'6D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E456467652069'
'643D22466C6F775F30696574666F735F6469222062706D6E456C656D656E743D'
'22466C6F775F30696574666F73223E3C64693A776179706F696E7420783D2234'
'38302220793D2231383022202F3E3C64693A776179706F696E7420783D223533'
'352220793D2231383022202F3E3C2F62706D6E64693A42504D4E456467653E3C'
'62706D6E64693A42504D4E53686170652069643D2253746172744576656E745F'
'303179647A71655F6469222062706D6E456C656D656E743D227374617274223E'
'3C64633A426F756E647320783D223239322220793D2231363222207769647468'
'3D22333622206865696768743D22333622202F3E3C62706D6E64693A42504D4E'
'4C6162656C3E3C64633A426F756E647320783D223239392220793D2232303522'
'2077696474683D22323322206865696768743D22313422202F3E3C2F62706D6E'
'64693A42504D4E4C6162656C3E3C2F62706D6E64693A42504D4E53686170653E'
'3C62706D6E64693A42504D4E53686170652069643D22476174657761795F3070'
'6F633770695F6469222062706D6E456C656D656E743D22476174657761795F30'
'706F63377069222069734D61726B657256697369626C653D2274727565223E3C'
'64633A426F756E647320783D223533352220793D22313535222077696474683D'
'22353022206865696768743D22353022202F3E3C62706D6E64693A42504D4E4C'
'6162656C3E3C64633A426F756E647320783D223532312220793D223131372E35'
'222077696474683D22373822206865696768743D22323722202F3E3C2F62706D'
'6E64693A42504D4E4C6162656C3E3C2F62706D6E64693A42504D4E5368617065'
'3E3C62706D6E64693A42504D4E53686170652069643D2241637469766974795F'
'316E6A346B37625F6469222062706D6E456C656D656E743D225461736B5F316E'
'6A346B3762223E3C64633A426F756E647320783D223338302220793D22313430'
'222077696474683D2231303022206865696768743D22383022202F3E3C2F6270'
'6D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E5368617065'
'2069643D2241637469766974795F316939397336765F6469222062706D6E456C'
'656D656E743D225461736B5F31693939733676223E3C64633A426F756E647320'
'783D223635302220793D22313430222077696474683D22313030222068656967'
'68743D22383022202F3E3C2F62706D6E64693A42504D4E53686170653E3C6270'
'6D6E64693A42504D4E53686170652069643D2241637469766974795F31633634'
'75766C5F6469222062706D6E456C656D656E743D225461736B5F316336347576'
'6C223E3C64633A426F756E647320783D223531302220793D2232363022207769'
'6474683D2231303022206865696768743D22383022202F3E3C2F62706D6E6469'
'3A42504D4E53686170653E3C62706D6E64693A42504D4E53686170652069643D'
'2241637469766974795F306D62723733355F6469222062706D6E456C656D656E'
'743D225461736B5F306D6272373335223E3C64633A426F756E647320783D2236'
'35302220793D22333730222077696474683D2231303022206865696768743D22'
'383022202F3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E6469'
'3A42504D4E53686170652069643D22476174657761795F317831786661345F64'
'69222062706D6E456C656D656E743D22476174657761795F3178317866613422'
'2069734D61726B657256697369626C653D2274727565223E3C64633A426F756E'
'647320783D223533352220793D22333835222077696474683D22353022206865'
'696768743D22353022202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64'
'633A426F756E647320783D223434372220793D22333936222077696474683D22'
'373822206865696768743D22323722202F3E3C2F62706D6E64693A42504D4E4C'
'6162656C3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A'
'42504D4E53686170652069643D2241637469766974795F306D78746730355F64'
'69222062706D6E456C656D656E743D225461736B5F306D7874673035223E3C64'
'633A426F756E647320783D223635302220793D22343730222077696474683D22'
'31303022206865696768743D22383022202F3E3C2F62706D6E64693A42504D4E'
'53686170653E3C62706D6E64693A42504D4E53686170652069643D2241637469'
'766974795F313432323669795F6469222062706D6E456C656D656E743D225461'
'736B5F31343232366979223E3C64633A426F756E647320783D22353130222079'
'3D22343730222077696474683D2231303022206865696768743D22383022202F'
'3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E'
'53686170652069643D2241637469766974795F306978693172735F6469222062'
'706D6E456C656D656E743D225461736B5F30697869317273223E3C64633A426F'
'756E647320783D223531302220793D22353830222077696474683D2231303022'
'206865696768743D22383022202F3E3C2F62706D6E64693A42504D4E53686170'
'653E3C62706D6E64693A42504D4E53686170652069643D224576656E745F3131'
'36343262715F6469222062706D6E456C656D656E743D22456E645F3131363432'
'6271223E3C64633A426F756E647320783D223534322220793D22363932222077'
'696474683D22333622206865696768743D22333622202F3E3C2F62706D6E6469'
'3A42504D4E53686170653E3C2F62706D6E64693A42504D4E506C616E653E3C2F'
'62706D6E64693A42504D4E4469616772616D3E3C2F62706D6E323A646566696E'
'6974696F6E733E'  ), NULL, NULL, NULL,
  NULL, NULL, '1', '1', '1',
  '0', NULL, 'manual', '1',
  '0'
FROM DUAL
WHERE NOT EXISTS (
  SELECT 1 FROM ext_act_process WHERE process_key = 'process_1780563034974'
);

-- ============================================
-- 1b. 流程定义 UPDATE（目标库已存在同 key 流程时，覆盖为最新流程图与配置，保留 id/process_key）
-- ============================================
UPDATE ext_act_process
SET process_type = 'oa',
    process_name = '巡视整改提升流程',
    process_status = 0,
    process_xml = UNHEX(
'3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554'
'462D38223F3E0A3C62706D6E323A646566696E6974696F6E7320786D6C6E733A'
'62706D6E323D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42'
'504D4E2F32303130303532342F4D4F44454C2220786D6C6E733A7873693D2268'
'7474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D612D'
'696E7374616E63652220786D6C6E733A62706D6E64693D22687474703A2F2F77'
'77772E6F6D672E6F72672F737065632F42504D4E2F32303130303532342F4449'
'2220786D6C6E733A64633D22687474703A2F2F7777772E6F6D672E6F72672F73'
'7065632F44442F32303130303532342F44432220786D6C6E733A666C6F776162'
'6C653D22687474703A2F2F666C6F7761626C652E6F72672F62706D6E2220786D'
'6C6E733A64693D22687474703A2F2F7777772E6F6D672E6F72672F737065632F'
'44442F32303130303532342F4449222069643D2273616D706C652D6469616772'
'616D22207461726765744E616D6573706163653D22687474703A2F2F62706D6E'
'2E696F2F736368656D612F62706D6E22207873693A736368656D614C6F636174'
'696F6E3D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42504D'
'4E2F32303130303532342F4D4F44454C2042504D4E32302E787364223E3C6270'
'6D6E323A70726F636573732069643D2270726F636573735F3137383035363330'
'333439373422206E616D653D22E5B7A1E8A786E695B4E694B9E68F90E58D87E6'
'B581E7A88B223E3C62706D6E323A657874656E73696F6E456C656D656E74733E'
'3C666C6F7761626C653A657865637574696F6E4C697374656E657220636C6173'
'733D226F72672E6A656563672E6D6F64756C65732E65787462706D2E6C697374'
'656E65722E657865637574696F6E2E50726F63657373456E644C697374656E65'
'7222206576656E743D22656E6422202F3E3C666C6F7761626C653A6576656E74'
'4C697374656E657220636C6173733D226F72672E6A656563672E6D6F64756C65'
'732E6C697374656E65722E7461736B7469702E5461736B437265617465476C6F'
'62616C4C697374656E657222202F3E3C2F62706D6E323A657874656E73696F6E'
'456C656D656E74733E3C62706D6E323A73746172744576656E742069643D2273'
'7461727422206E616D653D22E5BC80E5A78B2220666C6F7761626C653A696E69'
'746961746F723D226170706C79557365724964223E3C62706D6E323A6F757467'
'6F696E673E466C6F775F3064736B3179363C2F62706D6E323A6F7574676F696E'
'673E3C2F62706D6E323A73746172744576656E743E3C62706D6E323A6578636C'
'7573697665476174657761792069643D22476174657761795F30706F63377069'
'22206E616D653D22E698AFE590A6E99C80E8A681E5859AE7BEA4E8B49FE8B4A3'
'E4BABAE5AEA1E689B9223E3C62706D6E323A696E636F6D696E673E466C6F775F'
'30696574666F733C2F62706D6E323A696E636F6D696E673E3C62706D6E323A6F'
'7574676F696E673E466C6F775F3132677A6F69623C2F62706D6E323A6F757467'
'6F696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3176646F3877'
'793C2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A6578636C7573'
'697665476174657761793E3C62706D6E323A757365725461736B2069643D2254'
'61736B5F316E6A346B376222206E616D653D22E5859AE7BEA4E7BB8FE58A9EE4'
'BABAE58F91E8B5B7E79DA3E58A9EE6B581E7A88B2220666C6F7761626C653A61'
'737369676E65653D22247B6170706C795573657249647D223E3C62706D6E323A'
'696E636F6D696E673E466C6F775F3064736B3179363C2F62706D6E323A696E63'
'6F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3069657466'
'6F733C2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A7573657254'
'61736B3E3C62706D6E323A73657175656E6365466C6F772069643D22466C6F77'
'5F30696574666F732220736F757263655265663D225461736B5F316E6A346B37'
'6222207461726765745265663D22476174657761795F30706F6337706922202F'
'3E3C62706D6E323A73657175656E6365466C6F772069643D22466C6F775F3064'
'736B3179362220736F757263655265663D227374617274222074617267657452'
'65663D225461736B5F316E6A346B376222202F3E3C62706D6E323A7573657254'
'61736B2069643D225461736B5F3169393973367622206E616D653D22E5859AE7'
'BEA4E8B49FE8B4A3E4BABAE694B6E99B86E5898DE5AEA1E689B92220666C6F77'
'61626C653A61737369676E65653D22247B696E7370656374496D70726F766546'
'6C6F772E67657444714C656164657228657865637574696F6E297D223E3C6270'
'6D6E323A657874656E73696F6E456C656D656E74733E3C666C6F7761626C653A'
'7461736B4C697374656E65722064656C656761746545787072657373696F6E3D'
'22247B496E7370656374416674657244714C6561646572417070726F76654C69'
'7374656E65727D22206576656E743D22636F6D706C657465222069643D224348'
'7870706D42434D44666E5861705722202F3E3C2F62706D6E323A657874656E73'
'696F6E456C656D656E74733E3C62706D6E323A696E636F6D696E673E466C6F77'
'5F3132677A6F69623C2F62706D6E323A696E636F6D696E673E3C62706D6E323A'
'6F7574676F696E673E466C6F775F3068336361777A3C2F62706D6E323A6F7574'
'676F696E673E3C2F62706D6E323A757365725461736B3E3C62706D6E323A7365'
'7175656E6365466C6F772069643D22466C6F775F3132677A6F696222206E616D'
'653D22E698AF2220736F757263655265663D22476174657761795F30706F6337'
'706922207461726765745265663D225461736B5F31693939733676223E3C6270'
'6D6E323A636F6E646974696F6E45787072657373696F6E207873693A74797065'
'3D2262706D6E323A74466F726D616C45787072657373696F6E223E247B696E73'
'70656374496D70726F7665466C6F772E6765744E65656444714C656164657241'
'7070726F766528657865637574696F6E293D3D2231227D3C2F62706D6E323A63'
'6F6E646974696F6E45787072657373696F6E3E3C2F62706D6E323A7365717565'
'6E6365466C6F773E3C62706D6E323A757365725461736B2069643D225461736B'
'5F3163363475766C22206E616D653D22E8B4A3E4BBBBE983A8E997A8E9A286E5'
'AFBCE68EA5E58F97E4BBBBE58AA1E5B9B6E58886E9858D2220666C6F7761626C'
'653A61737369676E65653D22247B696D706C446570746C647D223E3C62706D6E'
'323A657874656E73696F6E456C656D656E74733E3C666C6F7761626C653A7461'
'736B4C697374656E65722064656C656761746545787072657373696F6E3D2224'
'7B496E73706563744166746572496D706C446570744C6561646572417070726F'
'76654C697374656E65727D22206576656E743D22636F6D706C65746522206964'
'3D2269656377696A78376A63335854626B4E22202F3E3C666C6F7761626C653A'
'7461736B4C697374656E65722064656C656761746545787072657373696F6E3D'
'22247B41667465724D6561737572655265734C656164657253746F72654C6973'
'74656E65727D22206576656E743D22636F6D706C657465222069643D22655777'
'514D625948704779746345697422202F3E3C2F62706D6E323A657874656E7369'
'6F6E456C656D656E74733E3C62706D6E323A696E636F6D696E673E466C6F775F'
'3176646F3877793C2F62706D6E323A696E636F6D696E673E3C62706D6E323A69'
'6E636F6D696E673E466C6F775F3068336361777A3C2F62706D6E323A696E636F'
'6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3163796C6977'
'7A3C2F62706D6E323A6F7574676F696E673E3C62706D6E323A6D756C7469496E'
'7374616E63654C6F6F7043686172616374657269737469637320666C6F776162'
'6C653A636F6C6C656374696F6E3D22247B696E7370656374496D70726F766546'
'6C6F772E676574496D706C446570744C65616465724C69737428657865637574'
'696F6E297D2220666C6F7761626C653A656C656D656E745661726961626C653D'
'22696D706C446570746C64223E3C62706D6E323A6C6F6F7043617264696E616C'
'697479207873693A747970653D2262706D6E323A74466F726D616C4578707265'
'7373696F6E223E247B696E7370656374496D70726F7665466C6F772E67657449'
'6D706C446570744C65616465724C6973744C656E67746828657865637574696F'
'6E297D3C2F62706D6E323A6C6F6F7043617264696E616C6974793E3C62706D6E'
'323A636F6D706C6574696F6E436F6E646974696F6E207873693A747970653D22'
'62706D6E323A74466F726D616C45787072657373696F6E223E247B6E724F6643'
'6F6D706C65746564496E7374616E6365732667743B3D317D203C2F62706D6E32'
'3A636F6D706C6574696F6E436F6E646974696F6E3E3C2F62706D6E323A6D756C'
'7469496E7374616E63654C6F6F704368617261637465726973746963733E3C2F'
'62706D6E323A757365725461736B3E3C62706D6E323A73657175656E6365466C'
'6F772069643D22466C6F775F3176646F38777922206E616D653D22E590A62220'
'736F757263655265663D22476174657761795F30706F63377069222074617267'
'65745265663D225461736B5F3163363475766C223E3C62706D6E323A636F6E64'
'6974696F6E45787072657373696F6E207873693A747970653D2262706D6E323A'
'74466F726D616C45787072657373696F6E223E247B696E7370656374496D7072'
'6F7665466C6F772E6765744E65656444714C6561646572417070726F76652865'
'7865637574696F6E293D3D2230227D3C2F62706D6E323A636F6E646974696F6E'
'45787072657373696F6E3E3C2F62706D6E323A73657175656E6365466C6F773E'
'3C62706D6E323A73657175656E6365466C6F772069643D22466C6F775F306833'
'6361777A2220736F757263655265663D225461736B5F31693939733676222074'
'61726765745265663D225461736B5F3163363475766C22202F3E3C62706D6E32'
'3A757365725461736B2069643D225461736B5F306D627237333522206E616D65'
'3D22E983A8E997A8E7BB8FE58A9EE4BABAE58F8DE9A688E5AE8CE68890E68385'
'E586B5E5B9B6E4B88AE4BCA0E99984E4BBB62220666C6F7761626C653A617373'
'69676E65653D22247B696E7370656374496D70726F7665466C6F772E67657453'
'7562417070726F76655573657228657865637574696F6E297D223E3C62706D6E'
'323A696E636F6D696E673E466C6F775F303869743862623C2F62706D6E323A69'
'6E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F307238'
'6D37316B3C2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A757365'
'725461736B3E3C62706D6E323A6578636C757369766547617465776179206964'
'3D22476174657761795F3178317866613422206E616D653D22E983A8E997A8E9'
'A286E5AFBCE698AFE590A6E79BB4E68EA5E58A9EE7BB93223E3C62706D6E323A'
'696E636F6D696E673E466C6F775F3163796C69777A3C2F62706D6E323A696E63'
'6F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3164746E65'
'38373C2F62706D6E323A6F7574676F696E673E3C62706D6E323A6F7574676F69'
'6E673E466C6F775F303869743862623C2F62706D6E323A6F7574676F696E673E'
'3C2F62706D6E323A6578636C7573697665476174657761793E3C62706D6E323A'
'73657175656E6365466C6F772069643D22466C6F775F3163796C69777A222073'
'6F757263655265663D225461736B5F3163363475766C22207461726765745265'
'663D22476174657761795F3178317866613422202F3E3C62706D6E323A757365'
'725461736B2069643D225461736B5F306D787467303522206E616D653D22E8B4'
'A3E4BBBBE983A8E997A8E9A286E5AFBCE5AEA1E689B92220666C6F7761626C65'
'3A61737369676E65653D22247B696E7370656374496D70726F7665466C6F772E'
'676574496D706C446570744C656164657228657865637574696F6E297D223E3C'
'62706D6E323A696E636F6D696E673E466C6F775F3072386D37316B3C2F62706D'
'6E323A696E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F77'
'5F30666D6E39366F3C2F62706D6E323A6F7574676F696E673E3C2F62706D6E32'
'3A757365725461736B3E3C62706D6E323A73657175656E6365466C6F77206964'
'3D22466C6F775F3164746E65383722206E616D653D22E698AF2220736F757263'
'655265663D22476174657761795F317831786661342220746172676574526566'
'3D225461736B5F31343232366979223E3C62706D6E323A636F6E646974696F6E'
'45787072657373696F6E207873693A747970653D2262706D6E323A74466F726D'
'616C45787072657373696F6E223E247B696E7370656374496D70726F7665466C'
'6F772E6765744973456E6428657865637574696F6E293D3D2231227D3C2F6270'
'6D6E323A636F6E646974696F6E45787072657373696F6E3E3C2F62706D6E323A'
'73657175656E6365466C6F773E3C62706D6E323A757365725461736B2069643D'
'225461736B5F3134323236697922206E616D653D22E5859AE7BEA4E7BB8FE58A'
'9EE4BABAE5AEA1E69FA52220666C6F7761626C653A61737369676E65653D2224'
'7B6170706C795573657249647D223E3C62706D6E323A696E636F6D696E673E46'
'6C6F775F3164746E6538373C2F62706D6E323A696E636F6D696E673E3C62706D'
'6E323A696E636F6D696E673E466C6F775F30666D6E39366F3C2F62706D6E323A'
'696E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3031'
'75736C34673C2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A7573'
'65725461736B3E3C62706D6E323A73657175656E6365466C6F772069643D2246'
'6C6F775F3038697438626222206E616D653D22E590A62220736F757263655265'
'663D22476174657761795F3178317866613422207461726765745265663D2254'
'61736B5F306D6272373335223E3C62706D6E323A636F6E646974696F6E457870'
'72657373696F6E207873693A747970653D2262706D6E323A74466F726D616C45'
'787072657373696F6E223E247B696E7370656374496D70726F7665466C6F772E'
'6765744973456E6428657865637574696F6E29213D2231227D3C2F62706D6E32'
'3A636F6E646974696F6E45787072657373696F6E3E3C2F62706D6E323A736571'
'75656E6365466C6F773E3C62706D6E323A757365725461736B2069643D225461'
'736B5F3069786931727322206E616D653D22E5859AE7BEA4E8B49FE8B4A3E4BA'
'BAE694B6E99B86E5908EE5AEA1E689B92220666C6F7761626C653A6173736967'
'6E65653D22247B64716C647D223E3C62706D6E323A696E636F6D696E673E466C'
'6F775F303175736C34673C2F62706D6E323A696E636F6D696E673E3C62706D6E'
'323A6F7574676F696E673E466C6F775F30616C70616E733C2F62706D6E323A6F'
'7574676F696E673E3C62706D6E323A6D756C7469496E7374616E63654C6F6F70'
'43686172616374657269737469637320666C6F7761626C653A636F6C6C656374'
'696F6E3D22247B696E7370656374496D70726F7665466C6F772E676574447144'
'6570744C645573657249644C69737428297D2220666C6F7761626C653A656C65'
'6D656E745661726961626C653D2264716C64223E3C62706D6E323A6C6F6F7043'
'617264696E616C697479207873693A747970653D2262706D6E323A74466F726D'
'616C45787072657373696F6E223E247B696E7370656374496D70726F7665466C'
'6F772E6765744471446570744C645573657249644C6973744C656E6774682829'
'7D3C2F62706D6E323A6C6F6F7043617264696E616C6974793E3C62706D6E323A'
'636F6D706C6574696F6E436F6E646974696F6E207873693A747970653D226270'
'6D6E323A74466F726D616C45787072657373696F6E223E247B6E724F66436F6D'
'706C65746564496E7374616E6365732667743B3D317D3C2F62706D6E323A636F'
'6D706C6574696F6E436F6E646974696F6E3E3C2F62706D6E323A6D756C746949'
'6E7374616E63654C6F6F704368617261637465726973746963733E3C2F62706D'
'6E323A757365725461736B3E3C62706D6E323A73657175656E6365466C6F7720'
'69643D22466C6F775F303175736C34672220736F757263655265663D22546173'
'6B5F3134323236697922207461726765745265663D225461736B5F3069786931'
'727322202F3E3C62706D6E323A73657175656E6365466C6F772069643D22466C'
'6F775F3072386D37316B2220736F757263655265663D225461736B5F306D6272'
'37333522207461726765745265663D225461736B5F306D787467303522202F3E'
'3C62706D6E323A73657175656E6365466C6F772069643D22466C6F775F30666D'
'6E39366F2220736F757263655265663D225461736B5F306D7874673035222074'
'61726765745265663D225461736B5F3134323236697922202F3E3C62706D6E32'
'3A656E644576656E742069643D22456E645F31313634326271223E3C62706D6E'
'323A696E636F6D696E673E466C6F775F30616C70616E733C2F62706D6E323A69'
'6E636F6D696E673E3C2F62706D6E323A656E644576656E743E3C62706D6E323A'
'73657175656E6365466C6F772069643D22466C6F775F30616C70616E73222073'
'6F757263655265663D225461736B5F3069786931727322207461726765745265'
'663D22456E645F3131363432627122202F3E3C2F62706D6E323A70726F636573'
'733E3C62706D6E64693A42504D4E4469616772616D2069643D2242504D4E4469'
'616772616D5F31223E3C62706D6E64693A42504D4E506C616E652069643D2242'
'504D4E506C616E655F31222062706D6E456C656D656E743D2270726F63657373'
'5F31373830353633303334393734223E3C62706D6E64693A42504D4E45646765'
'2069643D22466C6F775F30616C70616E735F6469222062706D6E456C656D656E'
'743D22466C6F775F30616C70616E73223E3C64693A776179706F696E7420783D'
'223536302220793D2236363022202F3E3C64693A776179706F696E7420783D22'
'3536302220793D2236393222202F3E3C2F62706D6E64693A42504D4E45646765'
'3E3C62706D6E64693A42504D4E456467652069643D22466C6F775F30666D6E39'
'366F5F6469222062706D6E456C656D656E743D22466C6F775F30666D6E39366F'
'223E3C64693A776179706F696E7420783D223635302220793D2235313022202F'
'3E3C64693A776179706F696E7420783D223631302220793D2235313022202F3E'
'3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E4564'
'67652069643D22466C6F775F3072386D37316B5F6469222062706D6E456C656D'
'656E743D22466C6F775F3072386D37316B223E3C64693A776179706F696E7420'
'783D223730302220793D2234353022202F3E3C64693A776179706F696E742078'
'3D223730302220793D2234373022202F3E3C2F62706D6E64693A42504D4E4564'
'67653E3C62706D6E64693A42504D4E456467652069643D22466C6F775F303175'
'736C34675F6469222062706D6E456C656D656E743D22466C6F775F303175736C'
'3467223E3C64693A776179706F696E7420783D223536302220793D2235353022'
'202F3E3C64693A776179706F696E7420783D223536302220793D223538302220'
'2F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E'
'456467652069643D22466C6F775F303869743862625F6469222062706D6E456C'
'656D656E743D22466C6F775F30386974386262223E3C64693A776179706F696E'
'7420783D223538352220793D2234313022202F3E3C64693A776179706F696E74'
'20783D223635302220793D2234313022202F3E3C62706D6E64693A42504D4E4C'
'6162656C3E3C64633A426F756E647320783D223631302220793D223339332220'
'77696474683D22313222206865696768743D22313422202F3E3C2F62706D6E64'
'693A42504D4E4C6162656C3E3C2F62706D6E64693A42504D4E456467653E3C62'
'706D6E64693A42504D4E456467652069643D22466C6F775F3164746E6538375F'
'6469222062706D6E456C656D656E743D22466C6F775F3164746E653837223E3C'
'64693A776179706F696E7420783D223536302220793D2234333522202F3E3C64'
'693A776179706F696E7420783D223536302220793D2234373022202F3E3C6270'
'6D6E64693A42504D4E4C6162656C3E3C64633A426F756E647320783D22353337'
'2220793D22343433222077696474683D22313222206865696768743D22313422'
'202F3E3C2F62706D6E64693A42504D4E4C6162656C3E3C2F62706D6E64693A42'
'504D4E456467653E3C62706D6E64693A42504D4E456467652069643D22466C6F'
'775F3163796C69777A5F6469222062706D6E456C656D656E743D22466C6F775F'
'3163796C69777A223E3C64693A776179706F696E7420783D223536302220793D'
'2233343022202F3E3C64693A776179706F696E7420783D223536302220793D22'
'33383522202F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E6469'
'3A42504D4E456467652069643D22466C6F775F3068336361777A5F6469222062'
'706D6E456C656D656E743D22466C6F775F3068336361777A223E3C64693A7761'
'79706F696E7420783D223730302220793D2232323022202F3E3C64693A776179'
'706F696E7420783D223730302220793D2233303022202F3E3C64693A77617970'
'6F696E7420783D223631302220793D2233303022202F3E3C2F62706D6E64693A'
'42504D4E456467653E3C62706D6E64693A42504D4E456467652069643D22466C'
'6F775F3176646F3877795F6469222062706D6E456C656D656E743D22466C6F77'
'5F3176646F387779223E3C64693A776179706F696E7420783D22353630222079'
'3D2232303522202F3E3C64693A776179706F696E7420783D223536302220793D'
'2232363022202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64633A426F'
'756E647320783D223536392220793D22323234222077696474683D2231322220'
'6865696768743D22313422202F3E3C2F62706D6E64693A42504D4E4C6162656C'
'3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E45'
'6467652069643D22466C6F775F3132677A6F69625F6469222062706D6E456C65'
'6D656E743D22466C6F775F3132677A6F6962223E3C64693A776179706F696E74'
'20783D223538352220793D2231383022202F3E3C64693A776179706F696E7420'
'783D223635302220793D2231383022202F3E3C62706D6E64693A42504D4E4C61'
'62656C3E3C64633A426F756E647320783D223631322220793D22313632222077'
'696474683D22313222206865696768743D22313422202F3E3C2F62706D6E6469'
'3A42504D4E4C6162656C3E3C2F62706D6E64693A42504D4E456467653E3C6270'
'6D6E64693A42504D4E456467652069643D22466C6F775F3064736B3179365F64'
'69222062706D6E456C656D656E743D22466C6F775F3064736B317936223E3C64'
'693A776179706F696E7420783D223332382220793D2231383022202F3E3C6469'
'3A776179706F696E7420783D223338302220793D2231383022202F3E3C2F6270'
'6D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E456467652069'
'643D22466C6F775F30696574666F735F6469222062706D6E456C656D656E743D'
'22466C6F775F30696574666F73223E3C64693A776179706F696E7420783D2234'
'38302220793D2231383022202F3E3C64693A776179706F696E7420783D223533'
'352220793D2231383022202F3E3C2F62706D6E64693A42504D4E456467653E3C'
'62706D6E64693A42504D4E53686170652069643D2253746172744576656E745F'
'303179647A71655F6469222062706D6E456C656D656E743D227374617274223E'
'3C64633A426F756E647320783D223239322220793D2231363222207769647468'
'3D22333622206865696768743D22333622202F3E3C62706D6E64693A42504D4E'
'4C6162656C3E3C64633A426F756E647320783D223239392220793D2232303522'
'2077696474683D22323322206865696768743D22313422202F3E3C2F62706D6E'
'64693A42504D4E4C6162656C3E3C2F62706D6E64693A42504D4E53686170653E'
'3C62706D6E64693A42504D4E53686170652069643D22476174657761795F3070'
'6F633770695F6469222062706D6E456C656D656E743D22476174657761795F30'
'706F63377069222069734D61726B657256697369626C653D2274727565223E3C'
'64633A426F756E647320783D223533352220793D22313535222077696474683D'
'22353022206865696768743D22353022202F3E3C62706D6E64693A42504D4E4C'
'6162656C3E3C64633A426F756E647320783D223532312220793D223131372E35'
'222077696474683D22373822206865696768743D22323722202F3E3C2F62706D'
'6E64693A42504D4E4C6162656C3E3C2F62706D6E64693A42504D4E5368617065'
'3E3C62706D6E64693A42504D4E53686170652069643D2241637469766974795F'
'316E6A346B37625F6469222062706D6E456C656D656E743D225461736B5F316E'
'6A346B3762223E3C64633A426F756E647320783D223338302220793D22313430'
'222077696474683D2231303022206865696768743D22383022202F3E3C2F6270'
'6D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E5368617065'
'2069643D2241637469766974795F316939397336765F6469222062706D6E456C'
'656D656E743D225461736B5F31693939733676223E3C64633A426F756E647320'
'783D223635302220793D22313430222077696474683D22313030222068656967'
'68743D22383022202F3E3C2F62706D6E64693A42504D4E53686170653E3C6270'
'6D6E64693A42504D4E53686170652069643D2241637469766974795F31633634'
'75766C5F6469222062706D6E456C656D656E743D225461736B5F316336347576'
'6C223E3C64633A426F756E647320783D223531302220793D2232363022207769'
'6474683D2231303022206865696768743D22383022202F3E3C2F62706D6E6469'
'3A42504D4E53686170653E3C62706D6E64693A42504D4E53686170652069643D'
'2241637469766974795F306D62723733355F6469222062706D6E456C656D656E'
'743D225461736B5F306D6272373335223E3C64633A426F756E647320783D2236'
'35302220793D22333730222077696474683D2231303022206865696768743D22'
'383022202F3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E6469'
'3A42504D4E53686170652069643D22476174657761795F317831786661345F64'
'69222062706D6E456C656D656E743D22476174657761795F3178317866613422'
'2069734D61726B657256697369626C653D2274727565223E3C64633A426F756E'
'647320783D223533352220793D22333835222077696474683D22353022206865'
'696768743D22353022202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64'
'633A426F756E647320783D223434372220793D22333936222077696474683D22'
'373822206865696768743D22323722202F3E3C2F62706D6E64693A42504D4E4C'
'6162656C3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A'
'42504D4E53686170652069643D2241637469766974795F306D78746730355F64'
'69222062706D6E456C656D656E743D225461736B5F306D7874673035223E3C64'
'633A426F756E647320783D223635302220793D22343730222077696474683D22'
'31303022206865696768743D22383022202F3E3C2F62706D6E64693A42504D4E'
'53686170653E3C62706D6E64693A42504D4E53686170652069643D2241637469'
'766974795F313432323669795F6469222062706D6E456C656D656E743D225461'
'736B5F31343232366979223E3C64633A426F756E647320783D22353130222079'
'3D22343730222077696474683D2231303022206865696768743D22383022202F'
'3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E'
'53686170652069643D2241637469766974795F306978693172735F6469222062'
'706D6E456C656D656E743D225461736B5F30697869317273223E3C64633A426F'
'756E647320783D223531302220793D22353830222077696474683D2231303022'
'206865696768743D22383022202F3E3C2F62706D6E64693A42504D4E53686170'
'653E3C62706D6E64693A42504D4E53686170652069643D224576656E745F3131'
'36343262715F6469222062706D6E456C656D656E743D22456E645F3131363432'
'6271223E3C64633A426F756E647320783D223534322220793D22363932222077'
'696474683D22333622206865696768743D22333622202F3E3C2F62706D6E6469'
'3A42504D4E53686170653E3C2F62706D6E64693A42504D4E506C616E653E3C2F'
'62706D6E64693A42504D4E4469616772616D3E3C2F62706D6E323A646566696E'
'6974696F6E733E'    ),
    process_json = NULL,
    low_app_id = NULL,
    note = NULL,
    pc_icon = NULL,
    app_icon = NULL,
    urge_status = '1',
    back_status = '1',
    graphic_status = '1',
    auto_submit_status = '0',
    notify_way = NULL,
    start_type = 'manual',
    open_status = '1',
    run_concurrent_mode = '0'
WHERE process_key = 'process_1780563034974';

-- @pid = 目标库已有流程的 id（存在则复用）；没有则用刚生成的 @new_pid
SET @pid = COALESCE(
  (SELECT id FROM ext_act_process WHERE process_key = 'process_1780563034974'),
  @new_pid
);
-- 注意：若目标库已存在同 key 流程，@pid 复用其 id；上面的 1b UPDATE 会把流程定义覆盖为新版，节点配置随后也会 UPDATE

-- ============================================
-- 2. 业务表单关联
-- ============================================
INSERT INTO ext_act_process_form
  (id, relation_code, biz_name, process_id, form_table_name,
   form_type, title_exp, form_deal_style, flow_status_col,
   trigger_action, low_app_id, start_signal_name, sort_num)
SELECT REPLACE(UUID(), '-', ''), 'inspect_flow_create_01', NULL, @pid, 'task_task',
  '3', '${title} 【巡视整改】', 'default', 'bpm_status',
  NULL, NULL, NULL, NULL
FROM DUAL
WHERE @pid IS NOT NULL
  AND NOT EXISTS (
    SELECT 1 FROM ext_act_process_form
    WHERE relation_code = 'inspect_flow_create_01'
  );
-- 注：relation_code 全局唯一（uk_eapf_relation_code）。目标库已存在同 relation_code（含挂在别的流程上）时跳过，避免 1062 报错；
--     保留目标库原有表单关联（如两库同一流程 process_key 不同，target 已有正确关联就不重复建）
-- ============================================
-- 3. 字段权限（先清后插，保证与源库完全一致）
-- ============================================
DELETE FROM ext_act_process_node_auth WHERE process_id = @pid;
-- ============================================
-- 4. 驳回目标（先清后插）
-- ============================================
DELETE FROM ext_act_process_node_reject_target WHERE process_id = @pid;
INSERT INTO ext_act_process_node_reject_target
  (id, process_id, source_node_code, target_node_code, target_node_name)
SELECT REPLACE(UUID(), '-', ''), @pid, 'Task_0ixi1rs', 'Task_1c64uvl', '责任部门领导接受任务并分配'
FROM DUAL WHERE @pid IS NOT NULL;

INSERT INTO ext_act_process_node_reject_target
  (id, process_id, source_node_code, target_node_code, target_node_name)
SELECT REPLACE(UUID(), '-', ''), @pid, 'Task_0ixi1rs', 'Task_0mbr735', '部门经办人反馈完成情况并上传附件'
FROM DUAL WHERE @pid IS NOT NULL;

INSERT INTO ext_act_process_node_reject_target
  (id, process_id, source_node_code, target_node_code, target_node_name)
SELECT REPLACE(UUID(), '-', ''), @pid, 'Task_0ixi1rs', 'Task_0mxtg05', '责任部门领导审批'
FROM DUAL WHERE @pid IS NOT NULL;

INSERT INTO ext_act_process_node_reject_target
  (id, process_id, source_node_code, target_node_code, target_node_name)
SELECT REPLACE(UUID(), '-', ''), @pid, 'Task_0ixi1rs', 'Task_14226iy', '党群经办人审查'
FROM DUAL WHERE @pid IS NOT NULL;

INSERT INTO ext_act_process_node_reject_target
  (id, process_id, source_node_code, target_node_code, target_node_name)
SELECT REPLACE(UUID(), '-', ''), @pid, 'Task_0mxtg05', 'Task_0mbr735', '部门经办人反馈完成情况并上传附件'
FROM DUAL WHERE @pid IS NOT NULL;

INSERT INTO ext_act_process_node_reject_target
  (id, process_id, source_node_code, target_node_code, target_node_name)
SELECT REPLACE(UUID(), '-', ''), @pid, 'Task_14226iy', 'Task_1c64uvl', '责任部门领导接受任务并分配'
FROM DUAL WHERE @pid IS NOT NULL;

INSERT INTO ext_act_process_node_reject_target
  (id, process_id, source_node_code, target_node_code, target_node_name)
SELECT REPLACE(UUID(), '-', ''), @pid, 'Task_14226iy', 'Task_0mbr735', '部门经办人反馈完成情况并上传附件'
FROM DUAL WHERE @pid IS NOT NULL;

INSERT INTO ext_act_process_node_reject_target
  (id, process_id, source_node_code, target_node_code, target_node_name)
SELECT REPLACE(UUID(), '-', ''), @pid, 'Task_14226iy', 'Task_0mxtg05', '责任部门领导审批'
FROM DUAL WHERE @pid IS NOT NULL;

INSERT INTO ext_act_process_node_reject_target
  (id, process_id, source_node_code, target_node_code, target_node_name)
SELECT REPLACE(UUID(), '-', ''), @pid, 'Task_1i99s6v', 'Task_1nj4k7b', '党群经办人发起督办流程'
FROM DUAL WHERE @pid IS NOT NULL;

-- ============================================
-- 5. 节点配置（逐节点 UPDATE，无记录则 INSERT，保留已有 ID）
-- ============================================
-- 节点1: 党群经办人发起督办流程 (Task_1nj4k7b)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1',
    model_and_view_mobile = NULL,
    node_timeout = NULL,
    node_bpm_status = NULL,
    form_edit_status = '0',
    cc_status = '0',
    selnext_user_status = '0',
    msg_status = '0',
    transfer_status = '0',
    add_sign_status = '0',
    reject_status = '0',
    allow_counter_sign_add_user = NULL,
    default_opinion = '发起流程',
    default_opinion2 = NULL,
    default_opinion_var = NULL,
    node_config_json = NULL
WHERE process_id = @pid AND process_node_code = 'Task_1nj4k7b';

INSERT INTO ext_act_process_node
  (id, form_id, process_id, process_node_code, process_node_name,
   model_and_view, model_and_view_mobile, node_timeout, node_bpm_status,
   form_edit_status, cc_status, selnext_user_status, msg_status,
   transfer_status, add_sign_status, reject_status, allow_counter_sign_add_user,
   default_opinion, [REDACTED], default_opinion_var, node_config_json)
SELECT REPLACE(UUID(), '-', ''), NULL, @pid, 'Task_1nj4k7b', '党群经办人发起督办流程',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1', NULL, NULL, NULL,
  '0', '0', '0', '0',
  '0', '0', '0', NULL,
  '发起流程', NULL, NULL, NULL
FROM DUAL
WHERE @pid IS NOT NULL
  AND NOT EXISTS (
    SELECT 1 FROM ext_act_process_node
    WHERE process_id = @pid AND process_node_code = 'Task_1nj4k7b'
  );

-- 节点2: 党群负责人收集前审批 (Task_1i99s6v)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1',
    model_and_view_mobile = NULL,
    node_timeout = NULL,
    node_bpm_status = NULL,
    form_edit_status = '0',
    cc_status = '0',
    selnext_user_status = '0',
    msg_status = '0',
    transfer_status = '0',
    add_sign_status = '0',
    reject_status = '1',
    allow_counter_sign_add_user = NULL,
    default_opinion = '已审批，请责任部门办',
    default_opinion2 = NULL,
    default_opinion_var = NULL,
    node_config_json = NULL
WHERE process_id = @pid AND process_node_code = 'Task_1i99s6v';

INSERT INTO ext_act_process_node
  (id, form_id, process_id, process_node_code, process_node_name,
   model_and_view, model_and_view_mobile, node_timeout, node_bpm_status,
   form_edit_status, cc_status, selnext_user_status, msg_status,
   transfer_status, add_sign_status, reject_status, allow_counter_sign_add_user,
   default_opinion, [REDACTED], default_opinion_var, node_config_json)
SELECT REPLACE(UUID(), '-', ''), NULL, @pid, 'Task_1i99s6v', '党群负责人收集前审批',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1', NULL, NULL, NULL,
  '0', '0', '0', '0',
  '0', '0', '1', NULL,
  '已审批，请责任部门办', NULL, NULL, NULL
FROM DUAL
WHERE @pid IS NOT NULL
  AND NOT EXISTS (
    SELECT 1 FROM ext_act_process_node
    WHERE process_id = @pid AND process_node_code = 'Task_1i99s6v'
  );

-- 节点3: 责任部门领导接受任务并分配 (Task_1c64uvl)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showSubApproveUser=1&showFeedbackInfo=1&showAddFeedback=1&showEditFeedback=1',
    model_and_view_mobile = NULL,
    node_timeout = NULL,
    node_bpm_status = NULL,
    form_edit_status = '0',
    cc_status = '0',
    selnext_user_status = '0',
    msg_status = '0',
    transfer_status = '0',
    add_sign_status = '0',
    reject_status = '0',
    allow_counter_sign_add_user = NULL,
    default_opinion = '如果有经办人的话请经办人办，没有的话填入已完成反馈，请党群经办人审查',
    default_opinion2 = NULL,
    default_opinion_var = NULL,
    node_config_json = NULL
WHERE process_id = @pid AND process_node_code = 'Task_1c64uvl';

INSERT INTO ext_act_process_node
  (id, form_id, process_id, process_node_code, process_node_name,
   model_and_view, model_and_view_mobile, node_timeout, node_bpm_status,
   form_edit_status, cc_status, selnext_user_status, msg_status,
   transfer_status, add_sign_status, reject_status, allow_counter_sign_add_user,
   default_opinion, [REDACTED], default_opinion_var, node_config_json)
SELECT REPLACE(UUID(), '-', ''), NULL, @pid, 'Task_1c64uvl', '责任部门领导接受任务并分配',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showSubApproveUser=1&showFeedbackInfo=1&showAddFeedback=1&showEditFeedback=1', NULL, NULL, NULL,
  '0', '0', '0', '0',
  '0', '0', '0', NULL,
  '如果有经办人的话请经办人办，没有的话填入已完成反馈，请党群经办人审查', NULL, NULL, NULL
FROM DUAL
WHERE @pid IS NOT NULL
  AND NOT EXISTS (
    SELECT 1 FROM ext_act_process_node
    WHERE process_id = @pid AND process_node_code = 'Task_1c64uvl'
  );

-- 节点4: 部门经办人反馈完成情况并上传附件 (Task_0mbr735)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showAddFeedback=1&showEditFeedback=1',
    model_and_view_mobile = NULL,
    node_timeout = NULL,
    node_bpm_status = NULL,
    form_edit_status = '0',
    cc_status = '0',
    selnext_user_status = '0',
    msg_status = '0',
    transfer_status = '0',
    add_sign_status = '0',
    reject_status = '0',
    allow_counter_sign_add_user = NULL,
    default_opinion = '已反馈，请领导审批',
    default_opinion2 = NULL,
    default_opinion_var = NULL,
    node_config_json = NULL
WHERE process_id = @pid AND process_node_code = 'Task_0mbr735';

INSERT INTO ext_act_process_node
  (id, form_id, process_id, process_node_code, process_node_name,
   model_and_view, model_and_view_mobile, node_timeout, node_bpm_status,
   form_edit_status, cc_status, selnext_user_status, msg_status,
   transfer_status, add_sign_status, reject_status, allow_counter_sign_add_user,
   default_opinion, [REDACTED], default_opinion_var, node_config_json)
SELECT REPLACE(UUID(), '-', ''), NULL, @pid, 'Task_0mbr735', '部门经办人反馈完成情况并上传附件',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showAddFeedback=1&showEditFeedback=1', NULL, NULL, NULL,
  '0', '0', '0', '0',
  '0', '0', '0', NULL,
  '已反馈，请领导审批', NULL, NULL, NULL
FROM DUAL
WHERE @pid IS NOT NULL
  AND NOT EXISTS (
    SELECT 1 FROM ext_act_process_node
    WHERE process_id = @pid AND process_node_code = 'Task_0mbr735'
  );

-- 节点5: 责任部门领导审批 (Task_0mxtg05)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showAddFeedback=1&showEditFeedback=1',
    model_and_view_mobile = NULL,
    node_timeout = NULL,
    node_bpm_status = NULL,
    form_edit_status = '0',
    cc_status = '0',
    selnext_user_status = '0',
    msg_status = '0',
    transfer_status = '0',
    add_sign_status = '0',
    reject_status = '1',
    allow_counter_sign_add_user = NULL,
    default_opinion = '已审批，请党群经办人审查',
    default_opinion2 = NULL,
    default_opinion_var = NULL,
    node_config_json = NULL
WHERE process_id = @pid AND process_node_code = 'Task_0mxtg05';

INSERT INTO ext_act_process_node
  (id, form_id, process_id, process_node_code, process_node_name,
   model_and_view, model_and_view_mobile, node_timeout, node_bpm_status,
   form_edit_status, cc_status, selnext_user_status, msg_status,
   transfer_status, add_sign_status, reject_status, allow_counter_sign_add_user,
   default_opinion, [REDACTED], default_opinion_var, node_config_json)
SELECT REPLACE(UUID(), '-', ''), NULL, @pid, 'Task_0mxtg05', '责任部门领导审批',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showAddFeedback=1&showEditFeedback=1', NULL, NULL, NULL,
  '0', '0', '0', '0',
  '0', '0', '1', NULL,
  '已审批，请党群经办人审查', NULL, NULL, NULL
FROM DUAL
WHERE @pid IS NOT NULL
  AND NOT EXISTS (
    SELECT 1 FROM ext_act_process_node
    WHERE process_id = @pid AND process_node_code = 'Task_0mxtg05'
  );

-- 节点6: 党群经办人审查 (Task_14226iy)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1',
    model_and_view_mobile = NULL,
    node_timeout = NULL,
    node_bpm_status = NULL,
    form_edit_status = '0',
    cc_status = '0',
    selnext_user_status = '0',
    msg_status = '0',
    transfer_status = '0',
    add_sign_status = '0',
    reject_status = '1',
    allow_counter_sign_add_user = NULL,
    default_opinion = '已监察，请领导审批',
    default_opinion2 = NULL,
    default_opinion_var = NULL,
    node_config_json = NULL
WHERE process_id = @pid AND process_node_code = 'Task_14226iy';

INSERT INTO ext_act_process_node
  (id, form_id, process_id, process_node_code, process_node_name,
   model_and_view, model_and_view_mobile, node_timeout, node_bpm_status,
   form_edit_status, cc_status, selnext_user_status, msg_status,
   transfer_status, add_sign_status, reject_status, allow_counter_sign_add_user,
   default_opinion, [REDACTED], default_opinion_var, node_config_json)
SELECT REPLACE(UUID(), '-', ''), NULL, @pid, 'Task_14226iy', '党群经办人审查',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1', NULL, NULL, NULL,
  '0', '0', '0', '0',
  '0', '0', '1', NULL,
  '已监察，请领导审批', NULL, NULL, NULL
FROM DUAL
WHERE @pid IS NOT NULL
  AND NOT EXISTS (
    SELECT 1 FROM ext_act_process_node
    WHERE process_id = @pid AND process_node_code = 'Task_14226iy'
  );

-- 节点7: 党群负责人收集后审批 (Task_0ixi1rs)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showIsNeedLeaderApprove=1&showSelnextUser=1',
    model_and_view_mobile = NULL,
    node_timeout = NULL,
    node_bpm_status = NULL,
    form_edit_status = '0',
    cc_status = '0',
    selnext_user_status = '0',
    msg_status = '0',
    transfer_status = '0',
    add_sign_status = '0',
    reject_status = '1',
    allow_counter_sign_add_user = NULL,
    default_opinion = '已审批',
    default_opinion2 = NULL,
    default_opinion_var = NULL,
    node_config_json = NULL
WHERE process_id = @pid AND process_node_code = 'Task_0ixi1rs';

INSERT INTO ext_act_process_node
  (id, form_id, process_id, process_node_code, process_node_name,
   model_and_view, model_and_view_mobile, node_timeout, node_bpm_status,
   form_edit_status, cc_status, selnext_user_status, msg_status,
   transfer_status, add_sign_status, reject_status, allow_counter_sign_add_user,
   default_opinion, [REDACTED], default_opinion_var, node_config_json)
SELECT REPLACE(UUID(), '-', ''), NULL, @pid, 'Task_0ixi1rs', '党群负责人收集后审批',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showIsNeedLeaderApprove=1&showSelnextUser=1', NULL, NULL, NULL,
  '0', '0', '0', '0',
  '0', '0', '1', NULL,
  '已审批', NULL, NULL, NULL
FROM DUAL
WHERE @pid IS NOT NULL
  AND NOT EXISTS (
    SELECT 1 FROM ext_act_process_node
    WHERE process_id = @pid AND process_node_code = 'Task_0ixi1rs'
  );

-- 清理不在新版 XML 中的旧节点配置（目标库旧版 BPMN 遗留的孤儿节点，保证节点表与新 XML 完全一致）
DELETE FROM ext_act_process_node
WHERE process_id = @pid AND process_node_code NOT IN ('Task_1nj4k7b','Task_1i99s6v','Task_1c64uvl','Task_0mbr735','Task_0mxtg05','Task_14226iy','Task_0ixi1rs');

-- ============================================
-- 校验
-- ============================================
SELECT
  CASE WHEN @pid IS NULL
    THEN '❌ 流程未创建：目标库中不存在 process_key = process_1780563034974 的 ext_act_process 记录。请先在 Flowable 设计器中导入 BPMN XML。'
    ELSE CONCAT('✅ 流程已就绪: ', @pid, '，共 ',
      (SELECT COUNT(*) FROM ext_act_process_node WHERE process_id = @pid), ' 个节点，请前往流程设计器点击"发布"')
  END AS result;
