-- ============================================
-- BPM 完整流程导出
-- 流程: 巡视整改销号流程 (partymatter_close)
-- 节点: 共 10 个（全部）
-- 导出时间: 2026-08-12 15:00:41
-- ============================================
-- 执行效果:
--   目标库无此流程 → 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, 'supervision', 'partymatter_close', '巡视整改销号流程', 0,
  UNHEX(
'3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554'
'462D38223F3E0A3C62706D6E323A646566696E6974696F6E7320786D6C6E733A'
'62706D6E323D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42'
'504D4E2F32303130303532342F4D4F44454C2220786D6C6E733A7873693D2268'
'7474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D612D'
'696E7374616E63652220786D6C6E733A62706D6E64693D22687474703A2F2F77'
'77772E6F6D672E6F72672F737065632F42504D4E2F32303130303532342F4449'
'2220786D6C6E733A64633D22687474703A2F2F7777772E6F6D672E6F72672F73'
'7065632F44442F32303130303532342F44432220786D6C6E733A666C6F776162'
'6C653D22687474703A2F2F666C6F7761626C652E6F72672F62706D6E2220786D'
'6C6E733A64693D22687474703A2F2F7777772E6F6D672E6F72672F737065632F'
'44442F32303130303532342F4449222069643D2273616D706C652D6469616772'
'616D22207461726765744E616D6573706163653D22687474703A2F2F62706D6E'
'2E696F2F736368656D612F62706D6E22207873693A736368656D614C6F636174'
'696F6E3D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42504D'
'4E2F32303130303532342F4D4F44454C2042504D4E32302E787364223E3C6270'
'6D6E323A70726F636573732069643D2270617274796D61747465725F636C6F73'
'6522206E616D653D22E5B7A1E8A786E695B4E694B9E99480E58FB7E6B581E7A8'
'8B223E3C62706D6E323A646F63756D656E746174696F6E3EE5859AE5A794E4BC'
'9A2FE68980E58AA1E4BC9A2FE68A8AE68A8AE884893C2F62706D6E323A646F63'
'756D656E746174696F6E3E3C62706D6E323A657874656E73696F6E456C656D65'
'6E74733E3C666C6F7761626C653A657865637574696F6E4C697374656E657220'
'636C6173733D226F72672E6A656563672E6D6F64756C65732E65787462706D2E'
'6C697374656E65722E657865637574696F6E2E50726F63657373456E644C6973'
'74656E657222206576656E743D22656E6422202F3E3C666C6F7761626C653A65'
'76656E744C697374656E657220636C6173733D226F72672E6A656563672E6D6F'
'64756C65732E6C697374656E65722E7461736B7469702E5461736B4372656174'
'65476C6F62616C4C697374656E657222202F3E3C2F62706D6E323A657874656E'
'73696F6E456C656D656E74733E3C62706D6E323A73746172744576656E742069'
'643D22737461727422206E616D653D22E5BC80E5A78B2220666C6F7761626C65'
'3A696E69746961746F723D226170706C79557365724964223E3C62706D6E323A'
'6F7574676F696E673E466C6F775F30306D3936316D3C2F62706D6E323A6F7574'
'676F696E673E3C2F62706D6E323A73746172744576656E743E3C62706D6E323A'
'757365725461736B2069643D225461736B5F31617A7065716A22206E616D653D'
'22E7BAAAE6A380E983A8E7BB8FE58A9EE4BABAE79B91E5AF9F2220666C6F7761'
'626C653A61737369676E65653D22247B6A6A5F776F726B65727D223E3C62706D'
'6E323A696E636F6D696E673E466C6F775F317431766267683C2F62706D6E323A'
'696E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3033'
'73766664683C2F62706D6E323A6F7574676F696E673E3C62706D6E323A6D756C'
'7469496E7374616E63654C6F6F7043686172616374657269737469637320666C'
'6F7761626C653A636F6C6C656374696F6E3D22247B5869537065616B46656564'
'6261636B466C6F772E6765744A4A44657074576F726B65724C69737428297D22'
'20666C6F7761626C653A656C656D656E745661726961626C653D226A6A5F776F'
'726B6572223E3C62706D6E323A6C6F6F7043617264696E616C69747920787369'
'3A747970653D2262706D6E323A74466F726D616C45787072657373696F6E223E'
'247B5869537065616B466565646261636B466C6F772E6765744A4A4465707457'
'6F726B65724C6973744C656E67746828297D3C2F62706D6E323A6C6F6F704361'
'7264696E616C6974793E3C62706D6E323A636F6D706C6574696F6E436F6E6469'
'74696F6E207873693A747970653D2262706D6E323A74466F726D616C45787072'
'657373696F6E223E247B6E724F66436F6D706C65746564496E7374616E636573'
'2667743B3D317D3C2F62706D6E323A636F6D706C6574696F6E436F6E64697469'
'6F6E3E3C2F62706D6E323A6D756C7469496E7374616E63654C6F6F7043686172'
'61637465726973746963733E3C2F62706D6E323A757365725461736B3E3C6270'
'6D6E323A757365725461736B2069643D225461736B5F303971786F746F22206E'
'616D653D22E7BAAAE5A794E4B9A6E8AEB0E5AEA1E689B92220666C6F7761626C'
'653A61737369676E65653D22247B696E7370656374436C6F73656F7574466C6F'
'772E6765744A57534A5573657228297D223E3C62706D6E323A696E636F6D696E'
'673E466C6F775F31387A71766F633C2F62706D6E323A696E636F6D696E673E3C'
'62706D6E323A6F7574676F696E673E466C6F775F3077306338396B3C2F62706D'
'6E323A6F7574676F696E673E3C2F62706D6E323A757365725461736B3E3C6270'
'6D6E323A757365725461736B2069643D225461736B5F3063666A6B6E6E22206E'
'616D653D22E5859AE5A794E4B9A6E8AEB0E5AEA1E689B92220666C6F7761626C'
'653A61737369676E65653D22247B696E7370656374496D70726F7665466C6F77'
'2E676574534457534A28297D223E3C62706D6E323A696E636F6D696E673E466C'
'6F775F3077306338396B3C2F62706D6E323A696E636F6D696E673E3C62706D6E'
'323A6F7574676F696E673E466C6F775F306D66706C76703C2F62706D6E323A6F'
'7574676F696E673E3C2F62706D6E323A757365725461736B3E3C62706D6E323A'
'73657175656E6365466C6F772069643D22466C6F775F3077306338396B222073'
'6F757263655265663D225461736B5F303971786F746F22207461726765745265'
'663D225461736B5F3063666A6B6E6E22202F3E3C62706D6E323A73657175656E'
'6365466C6F772069643D22466C6F775F30306D3936316D2220736F7572636552'
'65663D22737461727422207461726765745265663D225461736B5F316B366E37'
'356722202F3E3C62706D6E323A757365725461736B2069643D225461736B5F31'
'6B366E37356722206E616D653D22E8B4A3E4BBBBE983A8E997A8E8B49FE8B4A3'
'E4BABAE58886E9858DE4BBBBE58AA12FE79BB4E68EA5E58A9EE7BB932220666C'
'6F7761626C653A61737369676E65653D22247B6170706C795573657249647D22'
'3E3C62706D6E323A657874656E73696F6E456C656D656E74733E3C666C6F7761'
'626C653A7461736B4C697374656E65722064656C656761746545787072657373'
'696F6E3D22247B496E73706563744166746572496D706C446570744C65616465'
'72417070726F76654C697374656E65727D22206576656E743D22636F6D706C65'
'7465222069643D2258363748776866734D4A64367338633322202F3E3C2F6270'
'6D6E323A657874656E73696F6E456C656D656E74733E3C62706D6E323A696E63'
'6F6D696E673E466C6F775F30306D3936316D3C2F62706D6E323A696E636F6D69'
'6E673E3C62706D6E323A6F7574676F696E673E466C6F775F307478793265673C'
'2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A757365725461736B'
'3E3C62706D6E323A656E644576656E742069643D22456E645F3078736761766A'
'22206E616D653D22E7BB93E69D9F223E3C62706D6E323A696E636F6D696E673E'
'466C6F775F306D66706C76703C2F62706D6E323A696E636F6D696E673E3C2F62'
'706D6E323A656E644576656E743E3C62706D6E323A73657175656E6365466C6F'
'772069643D22466C6F775F306D66706C76702220736F757263655265663D2254'
'61736B5F3063666A6B6E6E22207461726765745265663D22456E645F30787367'
'61766A22202F3E3C62706D6E323A6578636C7573697665476174657761792069'
'643D22476174657761795F31746469676F6422206E616D653D22E8B4A3E4BBBB'
'E983A8E997A8E8B49FE8B4A3E4BBBBE4BABAE698AFE590A6E58A9EE7BB93223E'
'3C62706D6E323A696E636F6D696E673E466C6F775F307478793265673C2F6270'
'6D6E323A696E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F'
'775F3031673063636A3C2F62706D6E323A6F7574676F696E673E3C62706D6E32'
'3A6F7574676F696E673E466C6F775F31796F353765683C2F62706D6E323A6F75'
'74676F696E673E3C2F62706D6E323A6578636C7573697665476174657761793E'
'3C62706D6E323A73657175656E6365466C6F772069643D22466C6F775F307478'
'793265672220736F757263655265663D225461736B5F316B366E373567222074'
'61726765745265663D22476174657761795F31746469676F6422202F3E3C6270'
'6D6E323A757365725461736B2069643D225461736B5F3072327675746A22206E'
'616D653D22E8B4A3E4BBBBE983A8E997A8E7BB8FE58A9EE4BABAE58F8DE9A688'
'2220666C6F7761626C653A61737369676E65653D22247B696E7370656374496D'
'70726F7665466C6F772E676574537562417070726F7665557365722865786563'
'7574696F6E297D223E3C62706D6E323A696E636F6D696E673E466C6F775F3031'
'673063636A3C2F62706D6E323A696E636F6D696E673E3C62706D6E323A6F7574'
'676F696E673E466C6F775F31386C333761633C2F62706D6E323A6F7574676F69'
'6E673E3C2F62706D6E323A757365725461736B3E3C62706D6E323A7365717565'
'6E6365466C6F772069643D22466C6F775F3031673063636A22206E616D653D22'
'E590A62220736F757263655265663D22476174657761795F31746469676F6422'
'207461726765745265663D225461736B5F3072327675746A223E3C62706D6E32'
'3A636F6E646974696F6E45787072657373696F6E207873693A747970653D2262'
'706D6E323A74466F726D616C45787072657373696F6E223E247B696E73706563'
'74496D70726F7665466C6F772E6765744973456E6428657865637574696F6E29'
'213D2231227D3C2F62706D6E323A636F6E646974696F6E45787072657373696F'
'6E3E3C2F62706D6E323A73657175656E6365466C6F773E3C62706D6E323A7573'
'65725461736B2069643D225461736B5F316B33366C6D7622206E616D653D22E8'
'B4A3E4BBBBE983A8E997A8E8B49FE8B4A3E4BABAE5AEA1E689B92220666C6F77'
'61626C653A61737369676E65653D22247B696E7370656374496D70726F766546'
'6C6F772E676574496D706C446570744C656164657228657865637574696F6E29'
'7D223E3C62706D6E323A696E636F6D696E673E466C6F775F31386C333761633C'
'2F62706D6E323A696E636F6D696E673E3C62706D6E323A6F7574676F696E673E'
'466C6F775F30676978396B703C2F62706D6E323A6F7574676F696E673E3C2F62'
'706D6E323A757365725461736B3E3C62706D6E323A757365725461736B206964'
'3D225461736B5F3163766674326622206E616D653D22E5859AE7BEA4E7BB8FE5'
'8A9EE4BABAE7A1AEE8AEA42220666C6F7761626C653A61737369676E65653D22'
'247B64715F776F726B65727D223E3C62706D6E323A696E636F6D696E673E466C'
'6F775F31796F353765683C2F62706D6E323A696E636F6D696E673E3C62706D6E'
'323A696E636F6D696E673E466C6F775F30676978396B703C2F62706D6E323A69'
'6E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F313969'
'376C6C753C2F62706D6E323A6F7574676F696E673E3C62706D6E323A6D756C74'
'69496E7374616E63654C6F6F7043686172616374657269737469637320666C6F'
'7761626C653A636F6C6C656374696F6E3D22247B696E7370656374436C6F7365'
'6F7574466C6F772E676574447144657074576F726B65724C69737428297D2220'
'666C6F7761626C653A656C656D656E745661726961626C653D2264715F776F72'
'6B6572223E3C62706D6E323A6C6F6F7043617264696E616C697479207873693A'
'747970653D2262706D6E323A74466F726D616C45787072657373696F6E223E24'
'7B696E7370656374436C6F73656F7574466C6F772E676574447144657074576F'
'726B65724C6973744C656E67746828297D3C2F62706D6E323A6C6F6F70436172'
'64696E616C6974793E3C62706D6E323A636F6D706C6574696F6E436F6E646974'
'696F6E207873693A747970653D2262706D6E323A74466F726D616C4578707265'
'7373696F6E223E247B6E724F66436F6D706C65746564496E7374616E63657326'
'67743B3D317D3C2F62706D6E323A636F6D706C6574696F6E436F6E646974696F'
'6E3E3C2F62706D6E323A6D756C7469496E7374616E63654C6F6F704368617261'
'637465726973746963733E3C2F62706D6E323A757365725461736B3E3C62706D'
'6E323A73657175656E6365466C6F772069643D22466C6F775F31796F35376568'
'22206E616D653D22E698AF2220736F757263655265663D22476174657761795F'
'31746469676F6422207461726765745265663D225461736B5F31637666743266'
'223E3C62706D6E323A636F6E646974696F6E45787072657373696F6E20787369'
'3A747970653D2262706D6E323A74466F726D616C45787072657373696F6E223E'
'247B696E7370656374496D70726F7665466C6F772E6765744973456E64286578'
'65637574696F6E293D3D2231227D3C2F62706D6E323A636F6E646974696F6E45'
'787072657373696F6E3E3C2F62706D6E323A73657175656E6365466C6F773E3C'
'62706D6E323A73657175656E6365466C6F772069643D22466C6F775F30676978'
'396B702220736F757263655265663D225461736B5F316B33366C6D7622207461'
'726765745265663D225461736B5F3163766674326622202F3E3C62706D6E323A'
'73657175656E6365466C6F772069643D22466C6F775F31386C33376163222073'
'6F757263655265663D225461736B5F3072327675746A22207461726765745265'
'663D225461736B5F316B33366C6D7622202F3E3C62706D6E323A757365725461'
'736B2069643D225461736B5F316B317A74333722206E616D653D22E58886E7AE'
'A1E68980E9A286E5AFBCE5AEA1E689B92220666C6F7761626C653A6173736967'
'6E65653D22247B696E7370656374496D70726F7665466C6F772E676574534C44'
'28657865637574696F6E297D223E3C62706D6E323A696E636F6D696E673E466C'
'6F775F30786D326761713C2F62706D6E323A696E636F6D696E673E3C62706D6E'
'323A6F7574676F696E673E466C6F775F31387A71766F633C2F62706D6E323A6F'
'7574676F696E673E3C2F62706D6E323A757365725461736B3E3C62706D6E323A'
'73657175656E6365466C6F772069643D22466C6F775F31387A71766F63222073'
'6F757263655265663D225461736B5F316B317A74333722207461726765745265'
'663D225461736B5F303971786F746F22202F3E3C62706D6E323A73657175656E'
'6365466C6F772069643D22466C6F775F313969376C6C752220736F7572636552'
'65663D225461736B5F3163766674326622207461726765745265663D22546173'
'6B5F3164777A73613622202F3E3C62706D6E323A757365725461736B2069643D'
'225461736B5F306D666B63647822206E616D653D22E7BAAAE6A380E983A8E9A2'
'86E5AFBCE5AEA1E689B92220666C6F7761626C653A61737369676E65653D2224'
'7B6A6A5F6C65616465727D223E3C62706D6E323A696E636F6D696E673E466C6F'
'775F303373766664683C2F62706D6E323A696E636F6D696E673E3C62706D6E32'
'3A6F7574676F696E673E466C6F775F30786D326761713C2F62706D6E323A6F75'
'74676F696E673E3C62706D6E323A6D756C7469496E7374616E63654C6F6F7043'
'686172616374657269737469637320666C6F7761626C653A636F6C6C65637469'
'6F6E3D22247B696E7370656374436C6F73656F7574466C6F772E6765744A4A44'
'6570744C644C69737428297D2220666C6F7761626C653A656C656D656E745661'
'726961626C653D226A6A5F6C6561646572223E3C62706D6E323A6C6F6F704361'
'7264696E616C697479207873693A747970653D2262706D6E323A74466F726D61'
'6C45787072657373696F6E223E247B696E7370656374436C6F73656F7574466C'
'6F772E6765744A4A446570744C644C6973744C656E67746828297D3C2F62706D'
'6E323A6C6F6F7043617264696E616C6974793E3C62706D6E323A636F6D706C65'
'74696F6E436F6E646974696F6E207873693A747970653D2262706D6E323A7446'
'6F726D616C45787072657373696F6E223E247B6E724F66436F6D706C65746564'
'496E7374616E6365732667743B3D317D3C2F62706D6E323A636F6D706C657469'
'6F6E436F6E646974696F6E3E3C2F62706D6E323A6D756C7469496E7374616E63'
'654C6F6F704368617261637465726973746963733E3C2F62706D6E323A757365'
'725461736B3E3C62706D6E323A73657175656E6365466C6F772069643D22466C'
'6F775F30786D326761712220736F757263655265663D225461736B5F306D666B'
'63647822207461726765745265663D225461736B5F316B317A74333722202F3E'
'3C62706D6E323A757365725461736B2069643D225461736B5F3164777A736136'
'22206E616D653D22E5859AE7BEA4E9A286E5AFBCE7A1AEE8AEA42220666C6F77'
'61626C653A61737369676E65653D22247B64715F6C647D223E3C62706D6E323A'
'696E636F6D696E673E466C6F775F313969376C6C753C2F62706D6E323A696E63'
'6F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3174317662'
'67683C2F62706D6E323A6F7574676F696E673E3C62706D6E323A6D756C746949'
'6E7374616E63654C6F6F7043686172616374657269737469637320666C6F7761'
'626C653A636F6C6C656374696F6E3D22247B696E7370656374436C6F73656F75'
'74466C6F772E6765744471446570744C645573657249644C69737428297D2220'
'666C6F7761626C653A656C656D656E745661726961626C653D2264715F6C6422'
'3E3C62706D6E323A6C6F6F7043617264696E616C697479207873693A74797065'
'3D2262706D6E323A74466F726D616C45787072657373696F6E223E247B696E73'
'70656374436C6F73656F7574466C6F772E6765744471446570744C6455736572'
'49644C6973744C656E67746828297D3C2F62706D6E323A6C6F6F704361726469'
'6E616C6974793E3C62706D6E323A636F6D706C6574696F6E436F6E646974696F'
'6E207873693A747970653D2262706D6E323A74466F726D616C45787072657373'
'696F6E223E247B6E724F66436F6D706C65746564496E7374616E636573266774'
'3B3D317D3C2F62706D6E323A636F6D706C6574696F6E436F6E646974696F6E3E'
'3C2F62706D6E323A6D756C7469496E7374616E63654C6F6F7043686172616374'
'65726973746963733E3C2F62706D6E323A757365725461736B3E3C62706D6E32'
'3A73657175656E6365466C6F772069643D22466C6F775F317431766267682220'
'736F757263655265663D225461736B5F3164777A736136222074617267657452'
'65663D225461736B5F31617A7065716A22202F3E3C62706D6E323A7365717565'
'6E6365466C6F772069643D22466C6F775F303373766664682220736F75726365'
'5265663D225461736B5F31617A7065716A22207461726765745265663D225461'
'736B5F306D666B63647822202F3E3C2F62706D6E323A70726F636573733E3C62'
'706D6E64693A42504D4E4469616772616D2069643D2242504D4E446961677261'
'6D5F31223E3C62706D6E64693A42504D4E506C616E652069643D2242504D4E50'
'6C616E655F31222062706D6E456C656D656E743D2270617274796D6174746572'
'5F636C6F7365223E3C62706D6E64693A42504D4E456467652069643D22466C6F'
'775F303373766664685F6469222062706D6E456C656D656E743D22466C6F775F'
'30337376666468223E3C64693A776179706F696E7420783D2231303130222079'
'3D2234303022202F3E3C64693A776179706F696E7420783D2231303130222079'
'3D2234323022202F3E3C64693A776179706F696E7420783D223932302220793D'
'2234323022202F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64'
'693A42504D4E456467652069643D22466C6F775F317431766267685F64692220'
'62706D6E456C656D656E743D22466C6F775F31743176626768223E3C64693A77'
'6179706F696E7420783D223932352220793D2232393022202F3E3C64693A7761'
'79706F696E7420783D22313031302220793D2232393022202F3E3C64693A7761'
'79706F696E7420783D22313031302220793D2233323022202F3E3C2F62706D6E'
'64693A42504D4E456467653E3C62706D6E64693A42504D4E456467652069643D'
'22466C6F775F30786D326761715F6469222062706D6E456C656D656E743D2246'
'6C6F775F30786D32676171223E3C64693A776179706F696E7420783D22383230'
'2220793D2234323022202F3E3C64693A776179706F696E7420783D2237393022'
'20793D2234323022202F3E3C2F62706D6E64693A42504D4E456467653E3C6270'
'6D6E64693A42504D4E456467652069643D22466C6F775F313969376C6C755F64'
'69222062706D6E456C656D656E743D22466C6F775F313969376C6C75223E3C64'
'693A776179706F696E7420783D223739302220793D2232393022202F3E3C6469'
'3A776179706F696E7420783D223832352220793D2232393022202F3E3C2F6270'
'6D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E456467652069'
'643D22466C6F775F31387A71766F635F6469222062706D6E456C656D656E743D'
'22466C6F775F31387A71766F63223E3C64693A776179706F696E7420783D2236'
'39302220793D2234323022202F3E3C64693A776179706F696E7420783D223635'
'302220793D2234323022202F3E3C2F62706D6E64693A42504D4E456467653E3C'
'62706D6E64693A42504D4E456467652069643D22466C6F775F31386C33376163'
'5F6469222062706D6E456C656D656E743D22466C6F775F31386C33376163223E'
'3C64693A776179706F696E7420783D223635302220793D2231373022202F3E3C'
'64693A776179706F696E7420783D223639302220793D2231373022202F3E3C2F'
'62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E45646765'
'2069643D22466C6F775F30676978396B705F6469222062706D6E456C656D656E'
'743D22466C6F775F30676978396B70223E3C64693A776179706F696E7420783D'
'223734302220793D2232313022202F3E3C64693A776179706F696E7420783D22'
'3734302220793D2232353022202F3E3C2F62706D6E64693A42504D4E45646765'
'3E3C62706D6E64693A42504D4E456467652069643D22466C6F775F31796F3537'
'65685F6469222062706D6E456C656D656E743D22466C6F775F31796F35376568'
'223E3C64693A776179706F696E7420783D223632352220793D2232393022202F'
'3E3C64693A776179706F696E7420783D223639302220793D2232393022202F3E'
'3C62706D6E64693A42504D4E4C6162656C3E3C64633A426F756E647320783D22'
'3634342220793D22323733222077696474683D22313222206865696768743D22'
'313422202F3E3C2F62706D6E64693A42504D4E4C6162656C3E3C2F62706D6E64'
'693A42504D4E456467653E3C62706D6E64693A42504D4E456467652069643D22'
'466C6F775F3031673063636A5F6469222062706D6E456C656D656E743D22466C'
'6F775F3031673063636A223E3C64693A776179706F696E7420783D2236303022'
'20793D2232363522202F3E3C64693A776179706F696E7420783D223630302220'
'793D2232313022202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64633A'
'426F756E647320783D223538332220793D22323333222077696474683D223132'
'22206865696768743D22313422202F3E3C2F62706D6E64693A42504D4E4C6162'
'656C3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D'
'4E456467652069643D22466C6F775F307478793265675F6469222062706D6E45'
'6C656D656E743D22466C6F775F30747879326567223E3C64693A776179706F69'
'6E7420783D223532302220793D2232393022202F3E3C64693A776179706F696E'
'7420783D223537352220793D2232393022202F3E3C2F62706D6E64693A42504D'
'4E456467653E3C62706D6E64693A42504D4E456467652069643D22466C6F775F'
'306D66706C76705F6469222062706D6E456C656D656E743D22466C6F775F306D'
'66706C7670223E3C64693A776179706F696E7420783D223432302220793D2234'
'323022202F3E3C64693A776179706F696E7420783D223334382220793D223432'
'3022202F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42'
'504D4E456467652069643D22466C6F775F30306D3936316D5F6469222062706D'
'6E456C656D656E743D22466C6F775F30306D3936316D223E3C64693A77617970'
'6F696E7420783D223334382220793D2232393022202F3E3C64693A776179706F'
'696E7420783D223432302220793D2232393022202F3E3C2F62706D6E64693A42'
'504D4E456467653E3C62706D6E64693A42504D4E456467652069643D22466C6F'
'775F3077306338396B5F6469222062706D6E456C656D656E743D22466C6F775F'
'3077306338396B223E3C64693A776179706F696E7420783D223535302220793D'
'2234323022202F3E3C64693A776179706F696E7420783D223532302220793D22'
'34323022202F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E6469'
'3A42504D4E53686170652069643D2253746172744576656E745F303179647A71'
'655F6469222062706D6E456C656D656E743D227374617274223E3C64633A426F'
'756E647320783D223331322220793D22323732222077696474683D2233362220'
'6865696768743D22333622202F3E3C62706D6E64693A42504D4E4C6162656C3E'
'3C64633A426F756E647320783D223331382220793D2232343822207769647468'
'3D22323322206865696768743D22313422202F3E3C2F62706D6E64693A42504D'
'4E4C6162656C3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64'
'693A42504D4E53686170652069643D2241637469766974795F31617A7065716A'
'5F6469222062706D6E456C656D656E743D225461736B5F31617A7065716A223E'
'3C64633A426F756E647320783D223936302220793D2233323022207769647468'
'3D2231303022206865696768743D22383022202F3E3C2F62706D6E64693A4250'
'4D4E53686170653E3C62706D6E64693A42504D4E53686170652069643D224163'
'7469766974795F303971786F746F5F6469222062706D6E456C656D656E743D22'
'5461736B5F303971786F746F223E3C64633A426F756E647320783D2235353022'
'20793D22333830222077696474683D2231303022206865696768743D22383022'
'202F3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A4250'
'4D4E53686170652069643D2241637469766974795F3063666A6B6E6E5F646922'
'2062706D6E456C656D656E743D225461736B5F3063666A6B6E6E223E3C64633A'
'426F756E647320783D223432302220793D22333830222077696474683D223130'
'3022206865696768743D22383022202F3E3C2F62706D6E64693A42504D4E5368'
'6170653E3C62706D6E64693A42504D4E53686170652069643D22416374697669'
'74795F316B366E3735675F6469222062706D6E456C656D656E743D225461736B'
'5F316B366E373567223E3C64633A426F756E647320783D223432302220793D22'
'323530222077696474683D2231303022206865696768743D22383022202F3E3C'
'2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E5368'
'6170652069643D224576656E745F3078736761766A5F6469222062706D6E456C'
'656D656E743D22456E645F3078736761766A223E3C64633A426F756E64732078'
'3D223331322220793D22343032222077696474683D2233362220686569676874'
'3D22333622202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64633A426F'
'756E647320783D223331392220793D22343435222077696474683D2232332220'
'6865696768743D22313422202F3E3C2F62706D6E64693A42504D4E4C6162656C'
'3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E'
'53686170652069643D22476174657761795F31746469676F645F646922206270'
'6D6E456C656D656E743D22476174657761795F31746469676F64222069734D61'
'726B657256697369626C653D2274727565223E3C64633A426F756E647320783D'
'223537352220793D22323635222077696474683D22353022206865696768743D'
'22353022202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64633A426F75'
'6E647320783D223536312220793D22333235222077696474683D223738222068'
'65696768743D22323722202F3E3C2F62706D6E64693A42504D4E4C6162656C3E'
'3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E53'
'686170652069643D2241637469766974795F3072327675746A5F646922206270'
'6D6E456C656D656E743D225461736B5F3072327675746A223E3C64633A426F75'
'6E647320783D223535302220793D22313330222077696474683D223130302220'
'6865696768743D22383022202F3E3C2F62706D6E64693A42504D4E5368617065'
'3E3C62706D6E64693A42504D4E53686170652069643D2241637469766974795F'
'316B33366C6D765F6469222062706D6E456C656D656E743D225461736B5F316B'
'33366C6D76223E3C64633A426F756E647320783D223639302220793D22313330'
'222077696474683D2231303022206865696768743D22383022202F3E3C2F6270'
'6D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E5368617065'
'2069643D2241637469766974795F316376667432665F6469222062706D6E456C'
'656D656E743D225461736B5F31637666743266223E3C64633A426F756E647320'
'783D223639302220793D22323530222077696474683D22313030222068656967'
'68743D22383022202F3E3C2F62706D6E64693A42504D4E53686170653E3C6270'
'6D6E64693A42504D4E53686170652069643D2241637469766974795F316B317A'
'7433375F6469222062706D6E456C656D656E743D225461736B5F316B317A7433'
'37223E3C64633A426F756E647320783D223639302220793D2233383022207769'
'6474683D2231303022206865696768743D22383022202F3E3C2F62706D6E6469'
'3A42504D4E53686170653E3C62706D6E64693A42504D4E53686170652069643D'
'2241637469766974795F306D666B6364785F6469222062706D6E456C656D656E'
'743D225461736B5F306D666B636478223E3C64633A426F756E647320783D2238'
'32302220793D22333830222077696474683D2231303022206865696768743D22'
'383022202F3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E6469'
'3A42504D4E53686170652069643D2241637469766974795F3164777A7361365F'
'6469222062706D6E456C656D656E743D225461736B5F3164777A736136223E3C'
'64633A426F756E647320783D223832352220793D22323530222077696474683D'
'2231303022206865696768743D22383022202F3E3C2F62706D6E64693A42504D'
'4E53686170653E3C2F62706D6E64693A42504D4E506C616E653E3C2F62706D6E'
'64693A42504D4E4469616772616D3E3C2F62706D6E323A646566696E6974696F'
'6E733E'  ), 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 = 'partymatter_close'
);

-- ============================================
-- 1b. 流程定义 UPDATE（目标库已存在同 key 流程时，覆盖为最新流程图与配置，保留 id/process_key）
-- ============================================
UPDATE ext_act_process
SET process_type = 'supervision',
    process_name = '巡视整改销号流程',
    process_status = 0,
    process_xml = UNHEX(
'3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554'
'462D38223F3E0A3C62706D6E323A646566696E6974696F6E7320786D6C6E733A'
'62706D6E323D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42'
'504D4E2F32303130303532342F4D4F44454C2220786D6C6E733A7873693D2268'
'7474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D612D'
'696E7374616E63652220786D6C6E733A62706D6E64693D22687474703A2F2F77'
'77772E6F6D672E6F72672F737065632F42504D4E2F32303130303532342F4449'
'2220786D6C6E733A64633D22687474703A2F2F7777772E6F6D672E6F72672F73'
'7065632F44442F32303130303532342F44432220786D6C6E733A666C6F776162'
'6C653D22687474703A2F2F666C6F7761626C652E6F72672F62706D6E2220786D'
'6C6E733A64693D22687474703A2F2F7777772E6F6D672E6F72672F737065632F'
'44442F32303130303532342F4449222069643D2273616D706C652D6469616772'
'616D22207461726765744E616D6573706163653D22687474703A2F2F62706D6E'
'2E696F2F736368656D612F62706D6E22207873693A736368656D614C6F636174'
'696F6E3D22687474703A2F2F7777772E6F6D672E6F72672F737065632F42504D'
'4E2F32303130303532342F4D4F44454C2042504D4E32302E787364223E3C6270'
'6D6E323A70726F636573732069643D2270617274796D61747465725F636C6F73'
'6522206E616D653D22E5B7A1E8A786E695B4E694B9E99480E58FB7E6B581E7A8'
'8B223E3C62706D6E323A646F63756D656E746174696F6E3EE5859AE5A794E4BC'
'9A2FE68980E58AA1E4BC9A2FE68A8AE68A8AE884893C2F62706D6E323A646F63'
'756D656E746174696F6E3E3C62706D6E323A657874656E73696F6E456C656D65'
'6E74733E3C666C6F7761626C653A657865637574696F6E4C697374656E657220'
'636C6173733D226F72672E6A656563672E6D6F64756C65732E65787462706D2E'
'6C697374656E65722E657865637574696F6E2E50726F63657373456E644C6973'
'74656E657222206576656E743D22656E6422202F3E3C666C6F7761626C653A65'
'76656E744C697374656E657220636C6173733D226F72672E6A656563672E6D6F'
'64756C65732E6C697374656E65722E7461736B7469702E5461736B4372656174'
'65476C6F62616C4C697374656E657222202F3E3C2F62706D6E323A657874656E'
'73696F6E456C656D656E74733E3C62706D6E323A73746172744576656E742069'
'643D22737461727422206E616D653D22E5BC80E5A78B2220666C6F7761626C65'
'3A696E69746961746F723D226170706C79557365724964223E3C62706D6E323A'
'6F7574676F696E673E466C6F775F30306D3936316D3C2F62706D6E323A6F7574'
'676F696E673E3C2F62706D6E323A73746172744576656E743E3C62706D6E323A'
'757365725461736B2069643D225461736B5F31617A7065716A22206E616D653D'
'22E7BAAAE6A380E983A8E7BB8FE58A9EE4BABAE79B91E5AF9F2220666C6F7761'
'626C653A61737369676E65653D22247B6A6A5F776F726B65727D223E3C62706D'
'6E323A696E636F6D696E673E466C6F775F317431766267683C2F62706D6E323A'
'696E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3033'
'73766664683C2F62706D6E323A6F7574676F696E673E3C62706D6E323A6D756C'
'7469496E7374616E63654C6F6F7043686172616374657269737469637320666C'
'6F7761626C653A636F6C6C656374696F6E3D22247B5869537065616B46656564'
'6261636B466C6F772E6765744A4A44657074576F726B65724C69737428297D22'
'20666C6F7761626C653A656C656D656E745661726961626C653D226A6A5F776F'
'726B6572223E3C62706D6E323A6C6F6F7043617264696E616C69747920787369'
'3A747970653D2262706D6E323A74466F726D616C45787072657373696F6E223E'
'247B5869537065616B466565646261636B466C6F772E6765744A4A4465707457'
'6F726B65724C6973744C656E67746828297D3C2F62706D6E323A6C6F6F704361'
'7264696E616C6974793E3C62706D6E323A636F6D706C6574696F6E436F6E6469'
'74696F6E207873693A747970653D2262706D6E323A74466F726D616C45787072'
'657373696F6E223E247B6E724F66436F6D706C65746564496E7374616E636573'
'2667743B3D317D3C2F62706D6E323A636F6D706C6574696F6E436F6E64697469'
'6F6E3E3C2F62706D6E323A6D756C7469496E7374616E63654C6F6F7043686172'
'61637465726973746963733E3C2F62706D6E323A757365725461736B3E3C6270'
'6D6E323A757365725461736B2069643D225461736B5F303971786F746F22206E'
'616D653D22E7BAAAE5A794E4B9A6E8AEB0E5AEA1E689B92220666C6F7761626C'
'653A61737369676E65653D22247B696E7370656374436C6F73656F7574466C6F'
'772E6765744A57534A5573657228297D223E3C62706D6E323A696E636F6D696E'
'673E466C6F775F31387A71766F633C2F62706D6E323A696E636F6D696E673E3C'
'62706D6E323A6F7574676F696E673E466C6F775F3077306338396B3C2F62706D'
'6E323A6F7574676F696E673E3C2F62706D6E323A757365725461736B3E3C6270'
'6D6E323A757365725461736B2069643D225461736B5F3063666A6B6E6E22206E'
'616D653D22E5859AE5A794E4B9A6E8AEB0E5AEA1E689B92220666C6F7761626C'
'653A61737369676E65653D22247B696E7370656374496D70726F7665466C6F77'
'2E676574534457534A28297D223E3C62706D6E323A696E636F6D696E673E466C'
'6F775F3077306338396B3C2F62706D6E323A696E636F6D696E673E3C62706D6E'
'323A6F7574676F696E673E466C6F775F306D66706C76703C2F62706D6E323A6F'
'7574676F696E673E3C2F62706D6E323A757365725461736B3E3C62706D6E323A'
'73657175656E6365466C6F772069643D22466C6F775F3077306338396B222073'
'6F757263655265663D225461736B5F303971786F746F22207461726765745265'
'663D225461736B5F3063666A6B6E6E22202F3E3C62706D6E323A73657175656E'
'6365466C6F772069643D22466C6F775F30306D3936316D2220736F7572636552'
'65663D22737461727422207461726765745265663D225461736B5F316B366E37'
'356722202F3E3C62706D6E323A757365725461736B2069643D225461736B5F31'
'6B366E37356722206E616D653D22E8B4A3E4BBBBE983A8E997A8E8B49FE8B4A3'
'E4BABAE58886E9858DE4BBBBE58AA12FE79BB4E68EA5E58A9EE7BB932220666C'
'6F7761626C653A61737369676E65653D22247B6170706C795573657249647D22'
'3E3C62706D6E323A657874656E73696F6E456C656D656E74733E3C666C6F7761'
'626C653A7461736B4C697374656E65722064656C656761746545787072657373'
'696F6E3D22247B496E73706563744166746572496D706C446570744C65616465'
'72417070726F76654C697374656E65727D22206576656E743D22636F6D706C65'
'7465222069643D2258363748776866734D4A64367338633322202F3E3C2F6270'
'6D6E323A657874656E73696F6E456C656D656E74733E3C62706D6E323A696E63'
'6F6D696E673E466C6F775F30306D3936316D3C2F62706D6E323A696E636F6D69'
'6E673E3C62706D6E323A6F7574676F696E673E466C6F775F307478793265673C'
'2F62706D6E323A6F7574676F696E673E3C2F62706D6E323A757365725461736B'
'3E3C62706D6E323A656E644576656E742069643D22456E645F3078736761766A'
'22206E616D653D22E7BB93E69D9F223E3C62706D6E323A696E636F6D696E673E'
'466C6F775F306D66706C76703C2F62706D6E323A696E636F6D696E673E3C2F62'
'706D6E323A656E644576656E743E3C62706D6E323A73657175656E6365466C6F'
'772069643D22466C6F775F306D66706C76702220736F757263655265663D2254'
'61736B5F3063666A6B6E6E22207461726765745265663D22456E645F30787367'
'61766A22202F3E3C62706D6E323A6578636C7573697665476174657761792069'
'643D22476174657761795F31746469676F6422206E616D653D22E8B4A3E4BBBB'
'E983A8E997A8E8B49FE8B4A3E4BBBBE4BABAE698AFE590A6E58A9EE7BB93223E'
'3C62706D6E323A696E636F6D696E673E466C6F775F307478793265673C2F6270'
'6D6E323A696E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F'
'775F3031673063636A3C2F62706D6E323A6F7574676F696E673E3C62706D6E32'
'3A6F7574676F696E673E466C6F775F31796F353765683C2F62706D6E323A6F75'
'74676F696E673E3C2F62706D6E323A6578636C7573697665476174657761793E'
'3C62706D6E323A73657175656E6365466C6F772069643D22466C6F775F307478'
'793265672220736F757263655265663D225461736B5F316B366E373567222074'
'61726765745265663D22476174657761795F31746469676F6422202F3E3C6270'
'6D6E323A757365725461736B2069643D225461736B5F3072327675746A22206E'
'616D653D22E8B4A3E4BBBBE983A8E997A8E7BB8FE58A9EE4BABAE58F8DE9A688'
'2220666C6F7761626C653A61737369676E65653D22247B696E7370656374496D'
'70726F7665466C6F772E676574537562417070726F7665557365722865786563'
'7574696F6E297D223E3C62706D6E323A696E636F6D696E673E466C6F775F3031'
'673063636A3C2F62706D6E323A696E636F6D696E673E3C62706D6E323A6F7574'
'676F696E673E466C6F775F31386C333761633C2F62706D6E323A6F7574676F69'
'6E673E3C2F62706D6E323A757365725461736B3E3C62706D6E323A7365717565'
'6E6365466C6F772069643D22466C6F775F3031673063636A22206E616D653D22'
'E590A62220736F757263655265663D22476174657761795F31746469676F6422'
'207461726765745265663D225461736B5F3072327675746A223E3C62706D6E32'
'3A636F6E646974696F6E45787072657373696F6E207873693A747970653D2262'
'706D6E323A74466F726D616C45787072657373696F6E223E247B696E73706563'
'74496D70726F7665466C6F772E6765744973456E6428657865637574696F6E29'
'213D2231227D3C2F62706D6E323A636F6E646974696F6E45787072657373696F'
'6E3E3C2F62706D6E323A73657175656E6365466C6F773E3C62706D6E323A7573'
'65725461736B2069643D225461736B5F316B33366C6D7622206E616D653D22E8'
'B4A3E4BBBBE983A8E997A8E8B49FE8B4A3E4BABAE5AEA1E689B92220666C6F77'
'61626C653A61737369676E65653D22247B696E7370656374496D70726F766546'
'6C6F772E676574496D706C446570744C656164657228657865637574696F6E29'
'7D223E3C62706D6E323A696E636F6D696E673E466C6F775F31386C333761633C'
'2F62706D6E323A696E636F6D696E673E3C62706D6E323A6F7574676F696E673E'
'466C6F775F30676978396B703C2F62706D6E323A6F7574676F696E673E3C2F62'
'706D6E323A757365725461736B3E3C62706D6E323A757365725461736B206964'
'3D225461736B5F3163766674326622206E616D653D22E5859AE7BEA4E7BB8FE5'
'8A9EE4BABAE7A1AEE8AEA42220666C6F7761626C653A61737369676E65653D22'
'247B64715F776F726B65727D223E3C62706D6E323A696E636F6D696E673E466C'
'6F775F31796F353765683C2F62706D6E323A696E636F6D696E673E3C62706D6E'
'323A696E636F6D696E673E466C6F775F30676978396B703C2F62706D6E323A69'
'6E636F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F313969'
'376C6C753C2F62706D6E323A6F7574676F696E673E3C62706D6E323A6D756C74'
'69496E7374616E63654C6F6F7043686172616374657269737469637320666C6F'
'7761626C653A636F6C6C656374696F6E3D22247B696E7370656374436C6F7365'
'6F7574466C6F772E676574447144657074576F726B65724C69737428297D2220'
'666C6F7761626C653A656C656D656E745661726961626C653D2264715F776F72'
'6B6572223E3C62706D6E323A6C6F6F7043617264696E616C697479207873693A'
'747970653D2262706D6E323A74466F726D616C45787072657373696F6E223E24'
'7B696E7370656374436C6F73656F7574466C6F772E676574447144657074576F'
'726B65724C6973744C656E67746828297D3C2F62706D6E323A6C6F6F70436172'
'64696E616C6974793E3C62706D6E323A636F6D706C6574696F6E436F6E646974'
'696F6E207873693A747970653D2262706D6E323A74466F726D616C4578707265'
'7373696F6E223E247B6E724F66436F6D706C65746564496E7374616E63657326'
'67743B3D317D3C2F62706D6E323A636F6D706C6574696F6E436F6E646974696F'
'6E3E3C2F62706D6E323A6D756C7469496E7374616E63654C6F6F704368617261'
'637465726973746963733E3C2F62706D6E323A757365725461736B3E3C62706D'
'6E323A73657175656E6365466C6F772069643D22466C6F775F31796F35376568'
'22206E616D653D22E698AF2220736F757263655265663D22476174657761795F'
'31746469676F6422207461726765745265663D225461736B5F31637666743266'
'223E3C62706D6E323A636F6E646974696F6E45787072657373696F6E20787369'
'3A747970653D2262706D6E323A74466F726D616C45787072657373696F6E223E'
'247B696E7370656374496D70726F7665466C6F772E6765744973456E64286578'
'65637574696F6E293D3D2231227D3C2F62706D6E323A636F6E646974696F6E45'
'787072657373696F6E3E3C2F62706D6E323A73657175656E6365466C6F773E3C'
'62706D6E323A73657175656E6365466C6F772069643D22466C6F775F30676978'
'396B702220736F757263655265663D225461736B5F316B33366C6D7622207461'
'726765745265663D225461736B5F3163766674326622202F3E3C62706D6E323A'
'73657175656E6365466C6F772069643D22466C6F775F31386C33376163222073'
'6F757263655265663D225461736B5F3072327675746A22207461726765745265'
'663D225461736B5F316B33366C6D7622202F3E3C62706D6E323A757365725461'
'736B2069643D225461736B5F316B317A74333722206E616D653D22E58886E7AE'
'A1E68980E9A286E5AFBCE5AEA1E689B92220666C6F7761626C653A6173736967'
'6E65653D22247B696E7370656374496D70726F7665466C6F772E676574534C44'
'28657865637574696F6E297D223E3C62706D6E323A696E636F6D696E673E466C'
'6F775F30786D326761713C2F62706D6E323A696E636F6D696E673E3C62706D6E'
'323A6F7574676F696E673E466C6F775F31387A71766F633C2F62706D6E323A6F'
'7574676F696E673E3C2F62706D6E323A757365725461736B3E3C62706D6E323A'
'73657175656E6365466C6F772069643D22466C6F775F31387A71766F63222073'
'6F757263655265663D225461736B5F316B317A74333722207461726765745265'
'663D225461736B5F303971786F746F22202F3E3C62706D6E323A73657175656E'
'6365466C6F772069643D22466C6F775F313969376C6C752220736F7572636552'
'65663D225461736B5F3163766674326622207461726765745265663D22546173'
'6B5F3164777A73613622202F3E3C62706D6E323A757365725461736B2069643D'
'225461736B5F306D666B63647822206E616D653D22E7BAAAE6A380E983A8E9A2'
'86E5AFBCE5AEA1E689B92220666C6F7761626C653A61737369676E65653D2224'
'7B6A6A5F6C65616465727D223E3C62706D6E323A696E636F6D696E673E466C6F'
'775F303373766664683C2F62706D6E323A696E636F6D696E673E3C62706D6E32'
'3A6F7574676F696E673E466C6F775F30786D326761713C2F62706D6E323A6F75'
'74676F696E673E3C62706D6E323A6D756C7469496E7374616E63654C6F6F7043'
'686172616374657269737469637320666C6F7761626C653A636F6C6C65637469'
'6F6E3D22247B696E7370656374436C6F73656F7574466C6F772E6765744A4A44'
'6570744C644C69737428297D2220666C6F7761626C653A656C656D656E745661'
'726961626C653D226A6A5F6C6561646572223E3C62706D6E323A6C6F6F704361'
'7264696E616C697479207873693A747970653D2262706D6E323A74466F726D61'
'6C45787072657373696F6E223E247B696E7370656374436C6F73656F7574466C'
'6F772E6765744A4A446570744C644C6973744C656E67746828297D3C2F62706D'
'6E323A6C6F6F7043617264696E616C6974793E3C62706D6E323A636F6D706C65'
'74696F6E436F6E646974696F6E207873693A747970653D2262706D6E323A7446'
'6F726D616C45787072657373696F6E223E247B6E724F66436F6D706C65746564'
'496E7374616E6365732667743B3D317D3C2F62706D6E323A636F6D706C657469'
'6F6E436F6E646974696F6E3E3C2F62706D6E323A6D756C7469496E7374616E63'
'654C6F6F704368617261637465726973746963733E3C2F62706D6E323A757365'
'725461736B3E3C62706D6E323A73657175656E6365466C6F772069643D22466C'
'6F775F30786D326761712220736F757263655265663D225461736B5F306D666B'
'63647822207461726765745265663D225461736B5F316B317A74333722202F3E'
'3C62706D6E323A757365725461736B2069643D225461736B5F3164777A736136'
'22206E616D653D22E5859AE7BEA4E9A286E5AFBCE7A1AEE8AEA42220666C6F77'
'61626C653A61737369676E65653D22247B64715F6C647D223E3C62706D6E323A'
'696E636F6D696E673E466C6F775F313969376C6C753C2F62706D6E323A696E63'
'6F6D696E673E3C62706D6E323A6F7574676F696E673E466C6F775F3174317662'
'67683C2F62706D6E323A6F7574676F696E673E3C62706D6E323A6D756C746949'
'6E7374616E63654C6F6F7043686172616374657269737469637320666C6F7761'
'626C653A636F6C6C656374696F6E3D22247B696E7370656374436C6F73656F75'
'74466C6F772E6765744471446570744C645573657249644C69737428297D2220'
'666C6F7761626C653A656C656D656E745661726961626C653D2264715F6C6422'
'3E3C62706D6E323A6C6F6F7043617264696E616C697479207873693A74797065'
'3D2262706D6E323A74466F726D616C45787072657373696F6E223E247B696E73'
'70656374436C6F73656F7574466C6F772E6765744471446570744C6455736572'
'49644C6973744C656E67746828297D3C2F62706D6E323A6C6F6F704361726469'
'6E616C6974793E3C62706D6E323A636F6D706C6574696F6E436F6E646974696F'
'6E207873693A747970653D2262706D6E323A74466F726D616C45787072657373'
'696F6E223E247B6E724F66436F6D706C65746564496E7374616E636573266774'
'3B3D317D3C2F62706D6E323A636F6D706C6574696F6E436F6E646974696F6E3E'
'3C2F62706D6E323A6D756C7469496E7374616E63654C6F6F7043686172616374'
'65726973746963733E3C2F62706D6E323A757365725461736B3E3C62706D6E32'
'3A73657175656E6365466C6F772069643D22466C6F775F317431766267682220'
'736F757263655265663D225461736B5F3164777A736136222074617267657452'
'65663D225461736B5F31617A7065716A22202F3E3C62706D6E323A7365717565'
'6E6365466C6F772069643D22466C6F775F303373766664682220736F75726365'
'5265663D225461736B5F31617A7065716A22207461726765745265663D225461'
'736B5F306D666B63647822202F3E3C2F62706D6E323A70726F636573733E3C62'
'706D6E64693A42504D4E4469616772616D2069643D2242504D4E446961677261'
'6D5F31223E3C62706D6E64693A42504D4E506C616E652069643D2242504D4E50'
'6C616E655F31222062706D6E456C656D656E743D2270617274796D6174746572'
'5F636C6F7365223E3C62706D6E64693A42504D4E456467652069643D22466C6F'
'775F303373766664685F6469222062706D6E456C656D656E743D22466C6F775F'
'30337376666468223E3C64693A776179706F696E7420783D2231303130222079'
'3D2234303022202F3E3C64693A776179706F696E7420783D2231303130222079'
'3D2234323022202F3E3C64693A776179706F696E7420783D223932302220793D'
'2234323022202F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64'
'693A42504D4E456467652069643D22466C6F775F317431766267685F64692220'
'62706D6E456C656D656E743D22466C6F775F31743176626768223E3C64693A77'
'6179706F696E7420783D223932352220793D2232393022202F3E3C64693A7761'
'79706F696E7420783D22313031302220793D2232393022202F3E3C64693A7761'
'79706F696E7420783D22313031302220793D2233323022202F3E3C2F62706D6E'
'64693A42504D4E456467653E3C62706D6E64693A42504D4E456467652069643D'
'22466C6F775F30786D326761715F6469222062706D6E456C656D656E743D2246'
'6C6F775F30786D32676171223E3C64693A776179706F696E7420783D22383230'
'2220793D2234323022202F3E3C64693A776179706F696E7420783D2237393022'
'20793D2234323022202F3E3C2F62706D6E64693A42504D4E456467653E3C6270'
'6D6E64693A42504D4E456467652069643D22466C6F775F313969376C6C755F64'
'69222062706D6E456C656D656E743D22466C6F775F313969376C6C75223E3C64'
'693A776179706F696E7420783D223739302220793D2232393022202F3E3C6469'
'3A776179706F696E7420783D223832352220793D2232393022202F3E3C2F6270'
'6D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E456467652069'
'643D22466C6F775F31387A71766F635F6469222062706D6E456C656D656E743D'
'22466C6F775F31387A71766F63223E3C64693A776179706F696E7420783D2236'
'39302220793D2234323022202F3E3C64693A776179706F696E7420783D223635'
'302220793D2234323022202F3E3C2F62706D6E64693A42504D4E456467653E3C'
'62706D6E64693A42504D4E456467652069643D22466C6F775F31386C33376163'
'5F6469222062706D6E456C656D656E743D22466C6F775F31386C33376163223E'
'3C64693A776179706F696E7420783D223635302220793D2231373022202F3E3C'
'64693A776179706F696E7420783D223639302220793D2231373022202F3E3C2F'
'62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D4E45646765'
'2069643D22466C6F775F30676978396B705F6469222062706D6E456C656D656E'
'743D22466C6F775F30676978396B70223E3C64693A776179706F696E7420783D'
'223734302220793D2232313022202F3E3C64693A776179706F696E7420783D22'
'3734302220793D2232353022202F3E3C2F62706D6E64693A42504D4E45646765'
'3E3C62706D6E64693A42504D4E456467652069643D22466C6F775F31796F3537'
'65685F6469222062706D6E456C656D656E743D22466C6F775F31796F35376568'
'223E3C64693A776179706F696E7420783D223632352220793D2232393022202F'
'3E3C64693A776179706F696E7420783D223639302220793D2232393022202F3E'
'3C62706D6E64693A42504D4E4C6162656C3E3C64633A426F756E647320783D22'
'3634342220793D22323733222077696474683D22313222206865696768743D22'
'313422202F3E3C2F62706D6E64693A42504D4E4C6162656C3E3C2F62706D6E64'
'693A42504D4E456467653E3C62706D6E64693A42504D4E456467652069643D22'
'466C6F775F3031673063636A5F6469222062706D6E456C656D656E743D22466C'
'6F775F3031673063636A223E3C64693A776179706F696E7420783D2236303022'
'20793D2232363522202F3E3C64693A776179706F696E7420783D223630302220'
'793D2232313022202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64633A'
'426F756E647320783D223538332220793D22323333222077696474683D223132'
'22206865696768743D22313422202F3E3C2F62706D6E64693A42504D4E4C6162'
'656C3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42504D'
'4E456467652069643D22466C6F775F307478793265675F6469222062706D6E45'
'6C656D656E743D22466C6F775F30747879326567223E3C64693A776179706F69'
'6E7420783D223532302220793D2232393022202F3E3C64693A776179706F696E'
'7420783D223537352220793D2232393022202F3E3C2F62706D6E64693A42504D'
'4E456467653E3C62706D6E64693A42504D4E456467652069643D22466C6F775F'
'306D66706C76705F6469222062706D6E456C656D656E743D22466C6F775F306D'
'66706C7670223E3C64693A776179706F696E7420783D223432302220793D2234'
'323022202F3E3C64693A776179706F696E7420783D223334382220793D223432'
'3022202F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E64693A42'
'504D4E456467652069643D22466C6F775F30306D3936316D5F6469222062706D'
'6E456C656D656E743D22466C6F775F30306D3936316D223E3C64693A77617970'
'6F696E7420783D223334382220793D2232393022202F3E3C64693A776179706F'
'696E7420783D223432302220793D2232393022202F3E3C2F62706D6E64693A42'
'504D4E456467653E3C62706D6E64693A42504D4E456467652069643D22466C6F'
'775F3077306338396B5F6469222062706D6E456C656D656E743D22466C6F775F'
'3077306338396B223E3C64693A776179706F696E7420783D223535302220793D'
'2234323022202F3E3C64693A776179706F696E7420783D223532302220793D22'
'34323022202F3E3C2F62706D6E64693A42504D4E456467653E3C62706D6E6469'
'3A42504D4E53686170652069643D2253746172744576656E745F303179647A71'
'655F6469222062706D6E456C656D656E743D227374617274223E3C64633A426F'
'756E647320783D223331322220793D22323732222077696474683D2233362220'
'6865696768743D22333622202F3E3C62706D6E64693A42504D4E4C6162656C3E'
'3C64633A426F756E647320783D223331382220793D2232343822207769647468'
'3D22323322206865696768743D22313422202F3E3C2F62706D6E64693A42504D'
'4E4C6162656C3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64'
'693A42504D4E53686170652069643D2241637469766974795F31617A7065716A'
'5F6469222062706D6E456C656D656E743D225461736B5F31617A7065716A223E'
'3C64633A426F756E647320783D223936302220793D2233323022207769647468'
'3D2231303022206865696768743D22383022202F3E3C2F62706D6E64693A4250'
'4D4E53686170653E3C62706D6E64693A42504D4E53686170652069643D224163'
'7469766974795F303971786F746F5F6469222062706D6E456C656D656E743D22'
'5461736B5F303971786F746F223E3C64633A426F756E647320783D2235353022'
'20793D22333830222077696474683D2231303022206865696768743D22383022'
'202F3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A4250'
'4D4E53686170652069643D2241637469766974795F3063666A6B6E6E5F646922'
'2062706D6E456C656D656E743D225461736B5F3063666A6B6E6E223E3C64633A'
'426F756E647320783D223432302220793D22333830222077696474683D223130'
'3022206865696768743D22383022202F3E3C2F62706D6E64693A42504D4E5368'
'6170653E3C62706D6E64693A42504D4E53686170652069643D22416374697669'
'74795F316B366E3735675F6469222062706D6E456C656D656E743D225461736B'
'5F316B366E373567223E3C64633A426F756E647320783D223432302220793D22'
'323530222077696474683D2231303022206865696768743D22383022202F3E3C'
'2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E5368'
'6170652069643D224576656E745F3078736761766A5F6469222062706D6E456C'
'656D656E743D22456E645F3078736761766A223E3C64633A426F756E64732078'
'3D223331322220793D22343032222077696474683D2233362220686569676874'
'3D22333622202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64633A426F'
'756E647320783D223331392220793D22343435222077696474683D2232332220'
'6865696768743D22313422202F3E3C2F62706D6E64693A42504D4E4C6162656C'
'3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E'
'53686170652069643D22476174657761795F31746469676F645F646922206270'
'6D6E456C656D656E743D22476174657761795F31746469676F64222069734D61'
'726B657256697369626C653D2274727565223E3C64633A426F756E647320783D'
'223537352220793D22323635222077696474683D22353022206865696768743D'
'22353022202F3E3C62706D6E64693A42504D4E4C6162656C3E3C64633A426F75'
'6E647320783D223536312220793D22333235222077696474683D223738222068'
'65696768743D22323722202F3E3C2F62706D6E64693A42504D4E4C6162656C3E'
'3C2F62706D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E53'
'686170652069643D2241637469766974795F3072327675746A5F646922206270'
'6D6E456C656D656E743D225461736B5F3072327675746A223E3C64633A426F75'
'6E647320783D223535302220793D22313330222077696474683D223130302220'
'6865696768743D22383022202F3E3C2F62706D6E64693A42504D4E5368617065'
'3E3C62706D6E64693A42504D4E53686170652069643D2241637469766974795F'
'316B33366C6D765F6469222062706D6E456C656D656E743D225461736B5F316B'
'33366C6D76223E3C64633A426F756E647320783D223639302220793D22313330'
'222077696474683D2231303022206865696768743D22383022202F3E3C2F6270'
'6D6E64693A42504D4E53686170653E3C62706D6E64693A42504D4E5368617065'
'2069643D2241637469766974795F316376667432665F6469222062706D6E456C'
'656D656E743D225461736B5F31637666743266223E3C64633A426F756E647320'
'783D223639302220793D22323530222077696474683D22313030222068656967'
'68743D22383022202F3E3C2F62706D6E64693A42504D4E53686170653E3C6270'
'6D6E64693A42504D4E53686170652069643D2241637469766974795F316B317A'
'7433375F6469222062706D6E456C656D656E743D225461736B5F316B317A7433'
'37223E3C64633A426F756E647320783D223639302220793D2233383022207769'
'6474683D2231303022206865696768743D22383022202F3E3C2F62706D6E6469'
'3A42504D4E53686170653E3C62706D6E64693A42504D4E53686170652069643D'
'2241637469766974795F306D666B6364785F6469222062706D6E456C656D656E'
'743D225461736B5F306D666B636478223E3C64633A426F756E647320783D2238'
'32302220793D22333830222077696474683D2231303022206865696768743D22'
'383022202F3E3C2F62706D6E64693A42504D4E53686170653E3C62706D6E6469'
'3A42504D4E53686170652069643D2241637469766974795F3164777A7361365F'
'6469222062706D6E456C656D656E743D225461736B5F3164777A736136223E3C'
'64633A426F756E647320783D223832352220793D22323530222077696474683D'
'2231303022206865696768743D22383022202F3E3C2F62706D6E64693A42504D'
'4E53686170653E3C2F62706D6E64693A42504D4E506C616E653E3C2F62706D6E'
'64693A42504D4E4469616772616D3E3C2F62706D6E323A646566696E6974696F'
'6E733E'    ),
    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 = 'partymatter_close';

-- @pid = 目标库已有流程的 id（存在则复用）；没有则用刚生成的 @new_pid
SET @pid = COALESCE(
  (SELECT id FROM ext_act_process WHERE process_key = 'partymatter_close'),
  @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(), '-', ''), 'dq_delete_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 = 'dq_delete_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_09qxoto', 'Task_1k6n75g', '责任部门负责人分配任务/直接办结'
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_09qxoto', 'Task_0r2vutj', '责任部门经办人反馈'
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_09qxoto', 'Task_1k36lmv', '责任部门负责人审批'
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_09qxoto', 'Task_1cvft2f', '党群经办人确认'
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_09qxoto', 'Task_1dwzsa6', '党群领导确认'
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_09qxoto', 'Task_1azpeqj', '纪检部经办人监察'
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_09qxoto', 'Task_0mfkcdx', '纪检部领导审批'
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_09qxoto', 'Task_1k1zt37', '分管所领导审批'
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_0cfjknn', 'Task_1k6n75g', '责任部门负责人分配任务/直接办结'
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_0cfjknn', 'Task_0r2vutj', '责任部门经办人反馈'
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_0cfjknn', 'Task_1k36lmv', '责任部门负责人审批'
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_0cfjknn', 'Task_1cvft2f', '党群经办人确认'
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_0cfjknn', 'Task_1dwzsa6', '党群领导确认'
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_0cfjknn', 'Task_1azpeqj', '纪检部经办人监察'
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_0cfjknn', 'Task_0mfkcdx', '纪检部领导审批'
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_0cfjknn', 'Task_1k1zt37', '分管所领导审批'
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_0cfjknn', 'Task_09qxoto', '纪委书记审批'
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_0mfkcdx', 'Task_1k6n75g', '责任部门负责人分配任务/直接办结'
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_0mfkcdx', 'Task_0r2vutj', '责任部门经办人反馈'
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_0mfkcdx', 'Task_1k36lmv', '责任部门负责人审批'
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_0mfkcdx', 'Task_1cvft2f', '党群经办人确认'
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_0mfkcdx', 'Task_1dwzsa6', '党群领导确认'
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_0mfkcdx', 'Task_1azpeqj', '纪检部经办人监察'
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_1azpeqj', 'Task_1k6n75g', '责任部门负责人分配任务/直接办结'
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_1azpeqj', 'Task_0r2vutj', '责任部门经办人反馈'
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_1azpeqj', 'Task_1k36lmv', '责任部门负责人审批'
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_1azpeqj', 'Task_1cvft2f', '党群经办人确认'
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_1azpeqj', 'Task_1dwzsa6', '党群领导确认'
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_1cvft2f', 'Task_1k6n75g', '责任部门负责人分配任务/直接办结'
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_1cvft2f', 'Task_0r2vutj', '责任部门经办人反馈'
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_1cvft2f', 'Task_1k36lmv', '责任部门负责人审批'
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_1dwzsa6', 'Task_1k6n75g', '责任部门负责人分配任务/直接办结'
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_1dwzsa6', 'Task_0r2vutj', '责任部门经办人反馈'
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_1dwzsa6', 'Task_1k36lmv', '责任部门负责人审批'
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_1dwzsa6', 'Task_1cvft2f', '党群经办人确认'
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_1k1zt37', 'Task_1k6n75g', '责任部门负责人分配任务/直接办结'
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_1k1zt37', 'Task_0r2vutj', '责任部门经办人反馈'
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_1k1zt37', 'Task_1k36lmv', '责任部门负责人审批'
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_1k1zt37', 'Task_1cvft2f', '党群经办人确认'
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_1k1zt37', 'Task_1dwzsa6', '党群领导确认'
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_1k1zt37', 'Task_1azpeqj', '纪检部经办人监察'
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_1k1zt37', 'Task_0mfkcdx', '纪检部领导审批'
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_1k36lmv', 'Task_0r2vutj', '责任部门经办人反馈'
FROM DUAL WHERE @pid IS NOT NULL;

-- ============================================
-- 5. 节点配置（逐节点 UPDATE，无记录则 INSERT，保留已有 ID）
-- ============================================
-- 节点1: 纪检部经办人监察 (Task_1azpeqj)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showEditFeedback=1&nonJiJianFieldsReadonly=1&showJiJianFields=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_1azpeqj';

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_1azpeqj', '纪检部经办人监察',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showEditFeedback=1&nonJiJianFieldsReadonly=1&showJiJianFields=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_1azpeqj'
  );

-- 节点2: 纪委书记审批 (Task_09qxoto)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showJiJianFields=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_09qxoto';

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_09qxoto', '纪委书记审批',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showJiJianFields=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_09qxoto'
  );

-- 节点3: 党委书记审批 (Task_0cfjknn)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showJiJianFields=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_0cfjknn';

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_0cfjknn', '党委书记审批',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showJiJianFields=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_0cfjknn'
  );

-- 节点4: 责任部门负责人分配任务/直接办结 (Task_1k6n75g)
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 = '办结的话，填已办结，请党群经办人确认，没办结的话填经xxx办',
    default_opinion2 = NULL,
    default_opinion_var = NULL,
    node_config_json = NULL
WHERE process_id = @pid AND process_node_code = 'Task_1k6n75g';

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_1k6n75g', '责任部门负责人分配任务/直接办结',
  '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,
  '办结的话，填已办结，请党群经办人确认，没办结的话填经xxx办', 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_1k6n75g'
  );

-- 节点5: 责任部门经办人反馈 (Task_0r2vutj)
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_0r2vutj';

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_0r2vutj', '责任部门经办人反馈',
  '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_0r2vutj'
  );

-- 节点6: 责任部门负责人审批 (Task_1k36lmv)
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_1k36lmv';

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_1k36lmv', '责任部门负责人审批',
  '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_1k36lmv'
  );

-- 节点7: 党群经办人确认 (Task_1cvft2f)
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_1cvft2f';

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_1cvft2f', '党群经办人确认',
  '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_1cvft2f'
  );

-- 节点8: 分管所领导审批 (Task_1k1zt37)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showJiJianFields=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_1k1zt37';

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_1k1zt37', '分管所领导审批',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showJiJianFields=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_1k1zt37'
  );

-- 节点9: 纪检部领导审批 (Task_0mfkcdx)
UPDATE ext_act_process_node
SET model_and_view = 'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showEditFeedback=1&nonJiJianFieldsReadonly=1&showJiJianFields=1',
    model_and_view_mobile = NULL,
    node_timeout = NULL,
    node_bpm_status = NULL,
    form_edit_status = '0',
    cc_status = '0',
    selnext_user_status = '1',
    msg_status = '1',
    transfer_status = '1',
    add_sign_status = '1',
    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_0mfkcdx';

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_0mfkcdx', '纪检部领导审批',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1&showFeedbackInfo=1&showEditFeedback=1&nonJiJianFieldsReadonly=1&showJiJianFields=1', NULL, NULL, NULL,
  '0', '0', '1', '1',
  '1', '1', '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_0mfkcdx'
  );

-- 节点10: 党群领导确认 (Task_1dwzsa6)
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 = '1',
    msg_status = '1',
    transfer_status = '1',
    add_sign_status = '1',
    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_1dwzsa6';

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_1dwzsa6', '党群领导确认',
  'dq/inspectTask/components/DqInspectTaskBPMForm?showProcessHandle=1', NULL, NULL, NULL,
  '0', '0', '1', '1',
  '1', '1', '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_1dwzsa6'
  );

-- 清理不在新版 XML 中的旧节点配置（目标库旧版 BPMN 遗留的孤儿节点，保证节点表与新 XML 完全一致）
DELETE FROM ext_act_process_node
WHERE process_id = @pid AND process_node_code NOT IN ('Task_1azpeqj','Task_09qxoto','Task_0cfjknn','Task_1k6n75g','Task_0r2vutj','Task_1k36lmv','Task_1cvft2f','Task_1k1zt37','Task_0mfkcdx','Task_1dwzsa6');

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