Commit d5087126 authored by 麻笑宇's avatar 麻笑宇

下钻接口修改时间筛选

parent 9819f9a2
......@@ -962,7 +962,13 @@
WHERE ui."DATA_SOURCE" like 'jg%'
</select>
<select id="countBizFinishedNumForDP" resultType="java.lang.Long">
SELECT count(1) FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616' and date_ge(CAST(handle_date as date),#{dto.beginDate}) and date_le(CAST(handle_date as date),#{dto.endDate})
SELECT count(1) FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(handle_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(handle_date as date),#{dto.endDate})
</if>
union all
SELECT
count(1)
......@@ -973,13 +979,30 @@
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.biz_type = 'supervise'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.accept_date as date),#{dto.endDate})
</if>
union all
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})
SELECT count(1) AS num FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
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})
SELECT count(1) AS num FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
)
union all
SELECT
......@@ -991,25 +1014,71 @@
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.inspection_type = 'DQJY'
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.accept_date as date),#{dto.endDate})
</if>
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 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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
</if>
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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
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})
SELECT count(1) as num FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
)
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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
</if>
</select>
<select id="countAllInFlowingForDPNoFinishedBizData" resultType="java.lang.Long">
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 notice_status != '6616' and date_ge(CAST(notice_date as date),#{dto.beginDate}) and date_le(CAST(notice_date as date),#{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 notice_status != '6616'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(notice_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(notice_date as date),#{dto.endDate})
</if>
union all
SELECT
count(1)
......@@ -1021,13 +1090,30 @@
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status != '6610' and a.status != '6615' and a.status != '6617' and a.status != '6616'
and a.biz_type = 'supervise'
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
and date_le(CAST(a.application_date as date),#{dto.endDate})
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.application_date as date),#{dto.endDate})
</if>
union all
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 status != '使用单位已撤回' and status != '已作废' and status != '已完成' and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_le(CAST(reg_date as date),#{dto.endDate})
SELECT count(1) as num FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(reg_date as date),#{dto.endDate})
</if>
union all
SELECT count(1) as num FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_le(CAST(reg_date as date),#{dto.endDate})
SELECT count(1) as num FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(reg_date as date),#{dto.endDate})
</if>
)
union all
SELECT
......@@ -1040,28 +1126,73 @@
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status != '6610' and a.status != '6615' and a.status != '6617' and a.status != '6616'
and a.inspection_type = 'DQJY'
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
and date_le(CAST(a.application_date as date),#{dto.endDate})
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.application_date as date),#{dto.endDate})
</if>
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_status !='已完成' and date_ge(CAST(a.apply_date as date),#{dto.beginDate}) and date_le(CAST(a.apply_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 a.audit_status != '使用单位待提交' and a.audit_status !='已作废' and a.audit_status !='已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.apply_date as date),#{dto.endDate})
</if>
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_status != '已完成' and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_le(CAST(reg_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 audit_status != '使用单位已撤回' and audit_status != '已作废' and audit_status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(reg_date as date),#{dto.endDate})
</if>
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_status != '已完成' and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_le(CAST(reg_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 audit_status != '使用单位已撤回' and audit_status != '已作废' and audit_status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(reg_date as date),#{dto.endDate})
</if>
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 status != '已完成' and date_ge(CAST(apply_date as date),#{dto.beginDate}) and date_le(CAST(apply_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 status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(apply_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(apply_date as date),#{dto.endDate})
</if>
union all
SELECT count(1) as num FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' and date_ge(CAST(apply_date as date),#{dto.beginDate}) and date_le(CAST(apply_date as date),#{dto.endDate})
SELECT count(1) as num FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(apply_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(apply_date as date),#{dto.endDate})
</if>
)
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_status != '已完成' and date_ge(CAST(a.create_date as date),#{dto.beginDate}) and date_le(CAST(a.create_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 a.audit_status != '使用单位已撤回' and a.audit_status != '已作废' and a.audit_status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.create_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.create_date as date),#{dto.endDate})
</if>
</select>
<select id="countBizFinishedNumForDPList" resultType="java.util.Map">
SELECT * FROM (SELECT sequence_nbr as sequenceNbr,install_unit_name as unitName,receive_org_name as
receiveOrgName,create_date as createDate,handle_date as handleDate FROM "tzs_jg_installation_notice" where
receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616' and date_ge(CAST(handle_date as
date),#{dto.beginDate}) and date_le(CAST(handle_date as date),#{dto.endDate})
receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(handle_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(handle_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and install_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1079,8 +1210,12 @@
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.biz_type = 'supervise'
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
and date_le(CAST(a.accept_date as date),#{dto.endDate})
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.accept_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and application_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1089,7 +1224,14 @@
</if>
union all
SELECT * FROM (
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%',#{dto.companyName}, '%')
</if>
......@@ -1097,7 +1239,13 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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})
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1115,8 +1263,12 @@
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.inspection_type = 'DQJY'
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
and date_le(CAST(a.accept_date as date),#{dto.endDate})
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.accept_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and application_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1125,7 +1277,13 @@
</if>
union all
SELECT * FROM (
SELECT a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1133,7 +1291,13 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_reform" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1141,7 +1305,13 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_transfer" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1149,7 +1319,13 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1157,7 +1333,13 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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})
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1166,7 +1348,13 @@
</if>
)
union all
select a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1176,7 +1364,13 @@
)
</select>
<select id="countBizFinishedNumForDPAZGZ" resultType="java.lang.Long">
SELECT count(1) FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616' and date_ge(CAST(handle_date as date),#{dto.beginDate}) and date_le(CAST(handle_date as date),#{dto.endDate})
SELECT count(1) FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(handle_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(handle_date as date),#{dto.endDate})
</if>
</select>
<select id="countBizFinishedNumForDPJDJY" resultType="java.lang.Long">
SELECT
......@@ -1188,14 +1382,31 @@
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.biz_type = 'supervise'
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
and date_le(CAST(a.accept_date as date),#{dto.endDate})
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.accept_date as date),#{dto.endDate})
</if>
</select>
<select id="countBizFinishedNumForDPSYDJ" resultType="java.lang.Long">
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})
SELECT count(1) AS num FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
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})
SELECT count(1) AS num FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
)
</select>
<select id="countBizFinishedNumForDPDQJY" resultType="java.lang.Long">
......@@ -1208,27 +1419,74 @@
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.inspection_type = 'DQJY'
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
and date_le(CAST(a.accept_date as date),#{dto.endDate})
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.accept_date as date),#{dto.endDate})
</if>
</select>
<select id="countBizFinishedNumForDPBGDJ" resultType="java.lang.Long">
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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
</if>
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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
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})
SELECT count(1) as num FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
)
</select>
<select id="countBizFinishedNumForDPZXBX" resultType="java.lang.Long">
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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
</if>
</select>
<select id="countAllInFlowingForDPNoFinishedBizDataAZGZ" resultType="java.lang.Long">
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 notice_status != '6616' and date_ge(CAST(notice_date as date),#{dto.beginDate}) and date_le(CAST(notice_date as date),#{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 notice_status != '6616'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(notice_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(notice_date as date),#{dto.endDate})
</if>
</select>
<select id="countAllInFlowingForDPNoFinishedBizDataJDJY" resultType="java.lang.Long">
SELECT
......@@ -1241,14 +1499,30 @@
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status != '6610' and a.status != '6615' and a.status != '6617' and a.status != '6616'
and a.biz_type = 'supervise'
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.application_date as date),#{dto.endDate})
</if>
</select>
<select id="countAllInFlowingForDPNoFinishedBizDataSYDJ" resultType="java.lang.Long">
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 status != '使用单位已撤回' and status != '已作废' and status != '已完成' and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_le(CAST(reg_date as date),#{dto.endDate})
SELECT count(1) as num FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(reg_date as date),#{dto.endDate})
</if>
union all
SELECT count(1) as num FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_le(CAST(reg_date as date),#{dto.endDate})
SELECT count(1) as num FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(reg_date as date),#{dto.endDate})
</if>
)
</select>
<select id="countAllInFlowingForDPNoFinishedBizDataDQJY" resultType="java.lang.Long">
......@@ -1262,27 +1536,73 @@
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status != '6610' and a.status != '6615' and a.status != '6617' and a.status != '6616'
and a.inspection_type = 'DQJY'
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.application_date as date),#{dto.endDate})
</if>
</select>
<select id="countAllInFlowingForDPNoFinishedBizDataBGDJ" resultType="java.lang.Long">
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_status !='已完成' and date_ge(CAST(a.apply_date as date),#{dto.beginDate}) and date_le(CAST(a.apply_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 a.audit_status != '使用单位待提交' and a.audit_status !='已作废' and a.audit_status !='已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.apply_date as date),#{dto.endDate})
</if>
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_status != '已完成' and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_le(CAST(reg_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 audit_status != '使用单位已撤回' and audit_status != '已作废' and audit_status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.apply_date as date),#{dto.endDate})
</if>
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_status != '已完成' and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_le(CAST(reg_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 audit_status != '使用单位已撤回' and audit_status != '已作废' and audit_status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.apply_date as date),#{dto.endDate})
</if>
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 status != '已完成' and date_ge(CAST(apply_date as date),#{dto.beginDate}) and date_le(CAST(apply_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 status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.apply_date as date),#{dto.endDate})
</if>
union all
SELECT count(1) as num FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' and date_ge(CAST(apply_date as date),#{dto.beginDate}) and date_le(CAST(apply_date as date),#{dto.endDate})
SELECT count(1) as num FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.apply_date as date),#{dto.endDate})
</if>
)
</select>
<select id="countAllInFlowingForDPNoFinishedBizDataZXBX" resultType="java.lang.Long">
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_status != '已完成' and date_ge(CAST(a.create_date as date),#{dto.beginDate}) and date_le(CAST(a.create_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 a.audit_status != '使用单位已撤回' and a.audit_status != '已作废' and a.audit_status != '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.create_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.create_date as date),#{dto.endDate})
</if>
</select>
<select id="countBizFinishedNumForDPListAZGZ" resultType="java.util.Map">
SELECT sequence_nbr as sequenceNbr,install_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,handle_date as handleDate FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616' and date_ge(CAST(handle_date as date),#{dto.beginDate}) and date_le(CAST(handle_date as date),#{dto.endDate})
SELECT sequence_nbr as sequenceNbr,install_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,handle_date as handleDate FROM "tzs_jg_installation_notice" where receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(handle_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(handle_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and install_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1300,8 +1620,12 @@
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.biz_type = 'supervise'
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.accept_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and application_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1311,7 +1635,12 @@
</select>
<select id="countBizFinishedNumForDPListSYDJ" resultType="java.util.Map">
SELECT * FROM (
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate}) </if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1319,7 +1648,13 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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})
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1338,8 +1673,12 @@
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616' and a.inspection_type = 'DQJY'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.accept_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and application_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1349,7 +1688,13 @@
</select>
<select id="countBizFinishedNumForDPListBGDJ" resultType="java.util.Map">
SELECT * FROM (
SELECT a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1357,7 +1702,13 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_reform" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1365,7 +1716,13 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_transfer" where receive_company_org_code like CONCAT(#{orgCode}, '%') and audit_status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1373,7 +1730,13 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1381,7 +1744,13 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
union all
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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})
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......@@ -1391,7 +1760,13 @@
)
</select>
<select id="countBizFinishedNumForDPListZXBX" resultType="java.util.Map">
select a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 a.sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate 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 = '已完成'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......
......@@ -345,8 +345,12 @@
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.accept_date as date),#{dto.endDate})
</if>
<if test="businessType !=null and businessType !=''">
and a.inspection_type = #{businessType}
</if>
......@@ -361,8 +365,12 @@
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status != '6610' and a.status != '6615' and a.status != '6617' and a.status != '6616'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.application_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.application_date as date),#{dto.endDate})
</if>
<if test="businessType !=null and businessType !=''">
and a.inspection_type = #{businessType}
</if>
......@@ -377,8 +385,12 @@
a.inspection_unit_code= b.use_unit_code
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and a.status = '6616'
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
and date_le(CAST(a.accept_date as date),#{dto.endDate})
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.accept_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(a.accept_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and application_unit_name like CONCAT('%', #{dto.companyName}, '%')
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment