-- 业绩看板「二中心复诊」医助拆解接口（fans/yeji · pid=293）
-- 幂等：按 perms 判重

INSERT INTO `zyt_system_menu`
(`pid`, `type`, `name`, `icon`, `sort`, `perms`, `paths`, `component`, `selected`, `params`, `is_show`, `is_disable`, `create_time`, `update_time`)
SELECT
    293, 'A', '业绩-复诊拆解', '', 11,
    'stats.yejiStats/revisitBreakdown', '', '', '', '',
    1, 0, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
FROM DUAL
WHERE EXISTS (SELECT 1 FROM `zyt_system_menu` p WHERE p.id = 293)
  AND NOT EXISTS (
    SELECT 1 FROM `zyt_system_menu` m
    WHERE m.perms = 'stats.yejiStats/revisitBreakdown'
);
