DELETE d FROM data_source d JOIN period_formula_block f ON d.key_value_data_id = f.id WHERE f.Period = #{period,jdbcType=INTEGER};
delete from period_formula_block where period=#{period,jdbcType=INTEGER};
delete from period_tax_payer_report_rule where period=#{period,jdbcType=INTEGER};
delete from period_tax_rule_setting where period=#{period,jdbcType=INTEGER};
delete from period_cell_template where period=#{period,jdbcType=INTEGER} and report_template_id not in (#{exceptReportTemplateIDs,jdbcType=VARCHAR});
delete from period_cell_template_config where period=#{period,jdbcType=INTEGER} and report_template_id not in (#{exceptReportTemplateIDs,jdbcType=VARCHAR});
delete from period_template where period=#{period,jdbcType=INTEGER} and id not in (#{exceptReportTemplateIDs,jdbcType=VARCHAR});