SELECT count(1) FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616' and handle_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) FROM "tz_jyjc_inspection_application" a, tz_base_enterprise_info b where a.inspection_unit_code= b.use_unit_code and b.supervise_org_code like '50%' and a.status = '6616' and a.biz_type = 'supervise' and a.accept_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成' and audit_pass_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) FROM "tz_jyjc_inspection_application" a, tz_base_enterprise_info b where a.inspection_unit_code= b.use_unit_code and b.supervise_org_code like '50%' and a.status = '6616' and a.inspection_type = 'DQJY' and a.accept_date between #{dto.beginDate} and #{dto.endDate}
union all
select sum(num) from (
select count(1) as num from tzs_jg_change_registration_name a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like '50%' and a.audit_status = '已完成' and a.audit_pass_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) as num FROM "tzs_jg_change_registration_reform" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成' and audit_pass_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) as num FROM "tzs_jg_change_registration_transfer" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成' and audit_pass_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) as num FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成' and audit_pass_date between #{dto.beginDate} and #{dto.endDate}
)
union all
select count(1) from tzs_jg_scrap_cancel a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%') and a.audit_status = '已完成' and a.audit_pass_date between #{dto.beginDate} and #{dto.endDate}
SELECT count(1) FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status != '6610' and notice_status != '6615' and notice_status != '6617' and handle_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) FROM "tz_jyjc_inspection_application" a, tz_base_enterprise_info b where a.inspection_unit_code= b.use_unit_code and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status != '6610' and a.status != '6615' and a.status != '6617' and a.biz_type = 'supervise' and a.accept_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and audit_pass_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) FROM "tz_jyjc_inspection_application" a, tz_base_enterprise_info b where a.inspection_unit_code= b.use_unit_code and b.supervise_org_code like CONCAT(#{orgCode}, '%') and a.status != '6610' and a.status != '6615' and a.status != '6617' and a.inspection_type = 'DQJY' and a.accept_date between #{dto.beginDate} and #{dto.endDate}
union all
select sum(num) from (
select count(1) as num from tzs_jg_change_registration_name a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%') and a.audit_status != '使用单位已撤回' and a.audit_status != '使用单位待提交' and a.audit_status !='已作废' and a.audit_pass_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) as num FROM "tzs_jg_change_registration_reform" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status != '使用单位待提交' and audit_status != '使用单位已撤回' and audit_status != '已作废' and audit_pass_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) as num FROM "tzs_jg_change_registration_transfer" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status != '使用单位待提交' and audit_status != '使用单位已撤回' and audit_status != '已作废' and audit_pass_date between #{dto.beginDate} and #{dto.endDate}
union all
SELECT count(1) as num FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and audit_pass_date between #{dto.beginDate} and #{dto.endDate}
)
union all
select count(1) from tzs_jg_scrap_cancel a, privilege_company b where a.receive_org_code= b.company_code and b.org_code like CONCAT(#{orgCode}, '%') and a.audit_status != '使用单位待提交' and a.audit_status != '使用单位已撤回' and a.audit_status != '已作废' and a.audit_pass_date between #{dto.beginDate} and #{dto.endDate}