-- 单据参数（应该无数据）
-- DELETE FROM T_BAS_BILLPARAMETER WHERE FFORMID LIKE 'odaom_%' OR FFORMID LIKE 'hjms_%' OR FFORMID LIKE 'odpta_%' OR FFORMID LIKE 'odvta_%' OR FFORMID LIKE 'odofs_%' OR FFORMID LIKE 'hbos_%';

-- 定时任务（应该无数据）
-- DELETE FROM T_SCH_TASK WHERE FJOBID IN (SELECT FID FROM T_SCH_JOB WHERE FTASKDEFINEID IN (SELECT FID FROM T_SCH_TASKDEFINE WHERE FAPPID IN ('odvta','hjms','odaom','odofs','odpta','hbos')));
-- DELETE FROM T_SCH_JOB_L WHERE FID IN (SELECT FID FROM T_SCH_JOB WHERE FTASKDEFINEID IN (SELECT FID FROM T_SCH_TASKDEFINE WHERE FAPPID IN ('odvta','hjms','odaom','odofs','odpta','hbos')));
-- DELETE FROM T_SCH_JOB WHERE FTASKDEFINEID IN (SELECT FID FROM T_SCH_TASKDEFINE WHERE FAPPID IN ('odvta','hjms','odaom','odofs','odpta','hbos'));
-- DELETE FROM T_SCH_TASKDEFINE_L WHERE FID IN (SELECT FID FROM T_SCH_TASKDEFINE WHERE FAPPID IN ('odvta','hjms','odaom','odofs','odpta','hbos'));
-- DELETE FROM T_SCH_TASKDEFINE WHERE FAPPID IN ('odvta','hjms','odaom','odofs','odpta','hbos');

-- 导入导出模板 
DELETE FROM T_BAS_IMPORTTEMPLATE_L WHERE FID IN (
SELECT FID FROM T_BAS_IMPORTTEMPLATE WHERE FBIZOBJECT LIKE 'odaom_%' OR FBIZOBJECT LIKE 'hjms_%' OR FBIZOBJECT LIKE 'odpta_%' OR FBIZOBJECT LIKE 'odvta_%' OR FBIZOBJECT LIKE 'odofs_%' OR FBIZOBJECT LIKE 'hbos_%'
);
DELETE FROM T_BAS_IMPORTTEMPLATEENTRY WHERE FID IN (
SELECT FID FROM T_BAS_IMPORTTEMPLATE WHERE FBIZOBJECT LIKE 'odaom_%' OR FBIZOBJECT LIKE 'hjms_%' OR FBIZOBJECT LIKE 'odpta_%' OR FBIZOBJECT LIKE 'odvta_%' OR FBIZOBJECT LIKE 'odofs_%' OR FBIZOBJECT LIKE 'hbos_%'
);
DELETE FROM T_BAS_IMPORTTEMPLATE WHERE FBIZOBJECT LIKE 'odaom_%' OR FBIZOBJECT LIKE 'hjms_%' OR FBIZOBJECT LIKE 'odpta_%' OR FBIZOBJECT LIKE 'odvta_%' OR FBIZOBJECT LIKE 'odofs_%' OR FBIZOBJECT LIKE 'hbos_%';

-- 编码规则
DELETE FROM T_CR_MAXSERIAL WHERE FCODERULEID IN (
SELECT FID FROM T_CR_CODERULE WHERE FBIZOBJECTID LIKE 'odaom_%' OR FBIZOBJECTID LIKE 'hjms_%' OR FBIZOBJECTID LIKE 'odpta_%' OR FBIZOBJECTID LIKE 'odvta_%' OR FBIZOBJECTID LIKE 'odofs_%' OR FBIZOBJECTID LIKE 'hbos_%'
);
DELETE FROM T_CR_CODERULEENTRY WHERE FID IN (
SELECT FID FROM T_CR_CODERULE WHERE FBIZOBJECTID LIKE 'odaom_%' OR FBIZOBJECTID LIKE 'hjms_%' OR FBIZOBJECTID LIKE 'odpta_%' OR FBIZOBJECTID LIKE 'odvta_%' OR FBIZOBJECTID LIKE 'odofs_%' OR FBIZOBJECTID LIKE 'hbos_%'
);
DELETE FROM T_CR_CODERULE_L WHERE FID IN (
SELECT FID FROM T_CR_CODERULE WHERE FBIZOBJECTID LIKE 'odaom_%' OR FBIZOBJECTID LIKE 'hjms_%' OR FBIZOBJECTID LIKE 'odpta_%' OR FBIZOBJECTID LIKE 'odvta_%' OR FBIZOBJECTID LIKE 'odofs_%' OR FBIZOBJECTID LIKE 'hbos_%'
);
DELETE FROM T_CR_CODERULE WHERE FBIZOBJECTID LIKE 'odaom_%' OR FBIZOBJECTID LIKE 'hjms_%' OR FBIZOBJECTID LIKE 'odpta_%' OR FBIZOBJECTID LIKE 'odvta_%' OR FBIZOBJECTID LIKE 'odofs_%' OR FBIZOBJECTID LIKE 'hbos_%';

-- 过滤方案
DELETE FROM T_BAS_FILTERSCHEME_L WHERE FID IN (
SELECT FSCHEMEID FROM T_BAS_FILTERSCHEME WHERE FFORMID LIKE 'odaom_%' OR FFORMID LIKE 'hjms_%' OR FFORMID LIKE 'odpta_%' OR FFORMID LIKE 'odvta_%' OR FFORMID LIKE 'odofs_%' OR FFORMID LIKE 'hbos_%'
);
DELETE FROM T_BAS_FILTERSCHEME WHERE FFORMID LIKE 'odaom_%' OR FFORMID LIKE 'hjms_%' OR FFORMID LIKE 'odpta_%' OR FFORMID LIKE 'odvta_%' OR FFORMID LIKE 'odofs_%' OR FFORMID LIKE 'hbos_%';

-- 应用首页布局配置
DELETE FROM T_BAS_CARDCONFIG_L WHERE FID IN (SELECT FID FROM T_BAS_CARDCONFIG WHERE FMAINPAGEID IN (SELECT FID FROM T_BAS_MAINPAGELAYOUT WHERE FBIZAPPID IN ('0MUXXTHPNAGV','YJ77I0+4B7J','0MUX44WQ3XYV','0MUY214Z85A4','0MUXMXLGAQAA','0T+FZ95WLJ3Z')));
DELETE FROM T_BAS_CARDCONFIG WHERE FMAINPAGEID IN (SELECT FID FROM T_BAS_MAINPAGELAYOUT WHERE FBIZAPPID IN ('0MUXXTHPNAGV','YJ77I0+4B7J','0MUX44WQ3XYV','0MUY214Z85A4','0MUXMXLGAQAA','0T+FZ95WLJ3Z'));
DELETE FROM T_BAS_MAINPAGELAYOUT_L WHERE FID IN (SELECT FID FROM T_BAS_MAINPAGELAYOUT WHERE FBIZAPPID IN ('0MUXXTHPNAGV','YJ77I0+4B7J','0MUX44WQ3XYV','0MUY214Z85A4','0MUXMXLGAQAA','0T+FZ95WLJ3Z'));
DELETE FROM T_BAS_MAINPAGELAYOUT WHERE FBIZAPPID IN ('0MUXXTHPNAGV','YJ77I0+4B7J','0MUX44WQ3XYV','0MUY214Z85A4','0MUXMXLGAQAA','0T+FZ95WLJ3Z');

-- OPENAPI（应该无数据）
--  DELETE FROM T_OPEN_APISERVICE_AICMD_L WHERE FENTRYID IN (SELECT FENTRYID FROM T_OPEN_APISERVICE_AICMD WHERE FID IN (SELECT FID FROM T_OPEN_APISERVICE WHERE FAPPID IN ('0MUXXTHPNAGV','YJ77I0+4B7J','0MUX44WQ3XYV','0MUY214Z85A4','0MUXMXLGAQAA','0T+FZ95WLJ3Z')));
-- DELETE FROM T_OPEN_APISERVICE_AICMD WHERE FID IN (SELECT FID FROM T_OPEN_APISERVICE WHERE FAPPID IN ('0MUXXTHPNAGV','YJ77I0+4B7J','0MUX44WQ3XYV','0MUY214Z85A4','0MUXMXLGAQAA','0T+FZ95WLJ3Z'));
-- DELETE FROM T_OPEN_APISERVICE_L WHERE FID IN (SELECT FID FROM T_OPEN_APISERVICE WHERE FAPPID IN ('0MUXXTHPNAGV','YJ77I0+4B7J','0MUX44WQ3XYV','0MUY214Z85A4','0MUXMXLGAQAA','0T+FZ95WLJ3Z'));
-- DELETE FROM T_OPEN_APISERVICE WHERE FAPPID IN ('0MUXXTHPNAGV','YJ77I0+4B7J','0MUX44WQ3XYV','0MUY214Z85A4','0MUXMXLGAQAA','0T+FZ95WLJ3Z');
