and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
and date_le(CAST(a.accept_date as date),#{dto.endDate})
and date_le(CAST(a.accept_date as date),#{dto.endDate})
union all
union all
SELECT count(1) FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成' and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(audit_pass_date as date),#{dto.endDate})
SELECT SUM(num) FROM (
SELECT count(1) AS num FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成' and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(audit_pass_date as date),#{dto.endDate})
union all
SELECT count(1) AS num FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成' and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(audit_pass_date as date),#{dto.endDate})
)
union all
union all
SELECT
SELECT
count(1)
count(1)
...
@@ -989,15 +993,17 @@
...
@@ -989,15 +993,17 @@
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
and date_le(CAST(a.accept_date as date),#{dto.endDate})
and date_le(CAST(a.accept_date as date),#{dto.endDate})
union all
union all
select sum(num) from (
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 date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
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 date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
union all
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 date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(audit_pass_date as date),#{dto.endDate})
SELECT count(1) as num FROM "tzs_jg_change_registration_reform" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成' and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(audit_pass_date as date),#{dto.endDate})
union all
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 date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(audit_pass_date as date),#{dto.endDate})
SELECT count(1) as num FROM "tzs_jg_change_registration_transfer" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成' and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(audit_pass_date as date),#{dto.endDate})
union all
union all
SELECT count(1) as num FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成' and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(audit_pass_date as date),#{dto.endDate})
SELECT count(1) as num FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成' and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(audit_pass_date as date),#{dto.endDate})
)
union all
SELECT count(1) as num FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成' and date_ge(CAST(audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(audit_pass_date as date),#{dto.endDate})
)
union all
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 date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
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 date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate}) and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})