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,'azgz' as tplType,'azgz' as bType,
CASE when notice_status = 0 then '已完成'
ELSE '进行中'
END as status
'已完成' as status
FROM "tzs_jg_installation_notice"
where
receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616'
...
...
@@ -1313,9 +1311,7 @@
union all
SELECT sequence_nbr as sequenceNbr,install_unit_name as unitName,receive_org_name as
receiveOrgName,create_date as createDate,handle_date as handleDate,'azgz' as tplType,'azgz' as bType,
CASE when notice_status = 0 then '已完成'
ELSE '进行中'
END as status 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'
'进行中' as status 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'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(notice_date as date),#{dto.beginDate})
</if>
...
...
@@ -1333,9 +1329,7 @@
SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as
receiveOrgName,application_date as createDate,accept_date as handleDate,'jdjy' as tplType,'jdjy' as bType,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
'已完成' as status
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
...
...
@@ -1359,9 +1353,7 @@
SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as
receiveOrgName,application_date as createDate,accept_date as handleDate,'jdjy' as tplType,'jdjy' as bType,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
'进行中' as status
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
...
...
@@ -1416,7 +1408,7 @@
)
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,'sydj' as tplType,'sydj' as bType, status FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' and is_delete = 0
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,'sydj' as tplType,'sydj' as bType, '进行中' as status FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' and is_delete = 0
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
...
...
@@ -1430,7 +1422,7 @@
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,'sydj' as tplType,'vehicle' as bType, status FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,'sydj' as tplType,'vehicle' as bType, '进行中' as status FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
...
...
@@ -1449,9 +1441,7 @@
SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as receiveOrgName,application_date as createDate,accept_date as handleDate,
'dqjy' as tplType,'dqjy' as bType,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
'已完成' as status
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
...
...
@@ -1475,9 +1465,7 @@
SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as receiveOrgName,application_date as createDate,accept_date as handleDate,
'dqjy' as tplType,'dqjy' as bType,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
'进行中' as status
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
...
...
@@ -1572,7 +1560,7 @@
)
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,'bgdj' as tplType,'gm' as bType, a.audit_status as status 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 !='已完成'
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,'bgdj' as tplType,'gm' as bType, '进行中' as status 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 !='已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate})
</if>
...
...
@@ -1586,7 +1574,7 @@
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,'bgdj' as tplType,'gz' as bType, audit_status as status 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 != '已完成'
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,'bgdj' as tplType,'gz' as bType,'进行中' as status 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 != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
...
...
@@ -1600,7 +1588,7 @@
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,'bgdj' as tplType,'yz' as bType ,audit_status as status 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 != '已完成'
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,'bgdj' as tplType,'yz' as bType ,'进行中' as status 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 != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
...
...
@@ -1614,7 +1602,7 @@
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,'bgdj' as tplType,'dw' as bType ,status FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,'bgdj' as tplType,'dw' as bType ,'进行中' as status FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(apply_date as date),#{dto.beginDate})
</if>
...
...
@@ -1629,7 +1617,7 @@
</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,'bgdj' as tplType,'cyqp' as bType ,status FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,'bgdj' as tplType,'cyqp' as bType ,'进行中' as status FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(apply_date as date),#{dto.beginDate})
</if>
...
...
@@ -1645,7 +1633,7 @@
)
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,'zxbf' as tplType,'zxbf' as bType, a.status as status 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 = '已完成'
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,'zxbf' as tplType,'zxbf' as bType, a.audit_status as status 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 = '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if>
...
...
@@ -1659,7 +1647,7 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</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,'zxbf' as tplType,'zxbf' as bType, a.status as status 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 != '已完成'
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,'zxbf' as tplType,'zxbf' as bType, '进行中' as status 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 != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.create_date as date),#{dto.beginDate})
SELECT sequence_nbr as sequenceNbr,install_unit_name as unitName,receive_org_name as
receiveOrgName,create_date as createDate,handle_date as handleDate,'azgz' as tplType,'azgz' as bType,
CASE when notice_status = 0 then '已完成'
ELSE '进行中'
END as status
'已完成' as status
FROM "tzs_jg_installation_notice"
where
receive_company_org_code like CONCAT(#{orgCode}, '%') and notice_status = '6616'
...
...
@@ -1930,9 +1916,7 @@
union all
SELECT sequence_nbr as sequenceNbr,install_unit_name as unitName,receive_org_name as
receiveOrgName,create_date as createDate,handle_date as handleDate,'azgz' as tplType,'azgz' as bType,
CASE when notice_status = 0 then '已完成'
ELSE '进行中'
END as status 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'
'进行中'as status 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'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(notice_date as date),#{dto.beginDate})
</if>
...
...
@@ -1950,9 +1934,7 @@
SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as
receiveOrgName,application_date as createDate,accept_date as handleDate,'jdjy' as tplType,'jdjy' as bType,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
'已完成' as status
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
...
...
@@ -1976,9 +1958,7 @@
SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as
receiveOrgName,application_date as createDate,accept_date as handleDate,'jdjy' as tplType,'jdjy' as bType,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
'进行中' as status
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
...
...
@@ -2033,7 +2013,7 @@
)
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,status,'sydj' as tplType,'sydj' as bType FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' and is_delete = 0
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate, '进行中' as status,'sydj' as tplType,'sydj' as bType FROM "tzs_jg_use_registration" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' and is_delete = 0
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
...
...
@@ -2047,7 +2027,7 @@
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,status,'sydj' as tplType,'vehicle' as bType FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate, '进行中' as status,'sydj' as tplType,'vehicle' as bType FROM "tzs_jg_vehicle_information" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
...
...
@@ -2066,9 +2046,7 @@
SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as receiveOrgName,application_date as createDate,accept_date as handleDate,
'dqjy' as tplType,'dqjy' as bType,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
'已完成' as status
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
...
...
@@ -2092,9 +2070,7 @@
SELECT
a.sequence_nbr as sequenceNbr,application_unit_name as unitName,inspection_unit_name as receiveOrgName,application_date as createDate,accept_date as handleDate,
'dqjy' as tplType,'dqjy' as bType,
CASE when a.status = 0 then '已完成'
ELSE '进行中'
END as status
'进行中' as status
FROM
"tz_jyjc_inspection_application" a,
tz_base_enterprise_info b
...
...
@@ -2190,7 +2166,7 @@
)
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,a.audit_status as status,'bgdj' as tplType,'gm' as bType 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 !='已完成'
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,'进行中' as status,'bgdj' as tplType,'gm' as bType 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 !='已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.apply_date as date),#{dto.beginDate})
</if>
...
...
@@ -2204,7 +2180,7 @@
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,audit_status as status,'bgdj' as tplType,'gz' as bType 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 != '已完成'
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,'进行中' as status,'bgdj' as tplType,'gz' as bType 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 != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
...
...
@@ -2218,7 +2194,7 @@
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,audit_status as status,'bgdj' as tplType,'yz' as bType 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 != '已完成'
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,'进行中' as status,'bgdj' as tplType,'yz' as bType 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 != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate})
</if>
...
...
@@ -2232,7 +2208,7 @@
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,status,'bgdj' as tplType,'dw' as bType FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,'进行中' as status,'bgdj' as tplType,'dw' as bType FROM "tzs_jg_change_registration_unit" where receive_company_org_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(apply_date as date),#{dto.beginDate})
</if>
...
...
@@ -2247,7 +2223,7 @@
</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,status,'bgdj' as tplType,'cyqp' as bType FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
SELECT sequence_nbr as sequenceNbr,use_unit_name as unitName,receive_org_name as receiveOrgName,create_date as createDate,audit_pass_date as handleDate,'进行中' as status,'bgdj' as tplType,'cyqp' as bType FROM "tzs_jg_change_vehicle_registration_unit" where org_branch_code like CONCAT(#{orgCode}, '%') and status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(apply_date as date),#{dto.beginDate})
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,a.status as status,'zxbf' as tplType,'zxbf' as bType 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 = '已完成'
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,a.audit_status as status,'zxbf' as tplType,'zxbf' as bType 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 = '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.audit_pass_date as date),#{dto.beginDate})
</if>
...
...
@@ -2277,7 +2253,7 @@
and receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
</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,a.status as status,'zxbf' as tplType,'zxbf' as bType 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 != '已完成'
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, '进行中' as status,'zxbf' as tplType,'zxbf' as bType 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 != '已完成'
<iftest="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(a.create_date as date),#{dto.beginDate})