Commit 7e5a1bdf authored by suhuiguang's avatar suhuiguang

feat(jg):行政审批局

1.大屏统计办理时效统计,统计维度由接收机构的单位orgcode调整为使用单位的管辖和使用办理的设备数情况统计保持一致
parent 9e7bcae1
......@@ -668,98 +668,112 @@
<select id="queryNoticeAvgDayByReceiveCompany" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
SELECT
round(avg(T.handle_date::date - T.notice_date::date + 1),1) as strValue,
T.receive_company_org_code AS keyStr
bi.supervise_org_code AS keyStr
FROM
tzs_jg_installation_notice T
tzs_jg_installation_notice T,
tz_base_enterprise_info bi
WHERE
T.notice_status = 6616
T.use_unit_credit_code = bi.use_unit_code
and T.notice_status = 6616
and bi.supervise_org_code like concat(#{orgCode}, '%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.notice_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_org_code
GROUP BY bi.supervise_org_code
union all
SELECT
round(avg(T.accept_date::date - T.notice_date::date + 1),1) as strValue,
T.receive_company_org_code AS keyStr
bi.supervise_org_code AS keyStr
FROM
tzs_jg_maintain_notice T
tzs_jg_maintain_notice T,
tz_base_enterprise_info bi
WHERE
T.notice_status = 6616
T.use_unit_credit_code = bi.use_unit_code
and T.notice_status = 6616
and bi.supervise_org_code like concat(#{orgCode}, '%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.notice_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_org_code
GROUP BY bi.supervise_org_code
union all
SELECT
round(avg(T.accept_date::date - T.notice_date::date + 1),1) as strValue,
T.receive_company_org_code AS keyStr
bi.supervise_org_code AS keyStr
FROM
tzs_jg_reform_notice T
tzs_jg_reform_notice T,
tz_base_enterprise_info bi
WHERE
T.notice_status = 6616
T.use_unit_credit_code = bi.use_unit_code
and T.notice_status = 6616
and bi.supervise_org_code like concat(#{orgCode}, '%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.notice_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_org_code
GROUP BY bi.supervise_org_code
union all
SELECT
round(avg(T.handle_date::date - T.notice_date::date + 1),1) as strValue,
T.receive_company_org_code AS keyStr
bi.supervise_org_code AS keyStr
FROM
tzs_jg_transfer_notice T
tzs_jg_transfer_notice T,
tz_base_enterprise_info bi
WHERE
T.notice_status = 6616
T.use_unit_credit_code = bi.use_unit_code
and T.notice_status = 6616
and bi.supervise_org_code like concat(#{orgCode}, '%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.notice_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_org_code
GROUP BY bi.supervise_org_code
</select>
<select id="queryUseAvgDayByReceiveCompany" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
SELECT
round(avg(T.audit_pass_date::date - T.reg_date::date + 1),1) as strValue,
T.receive_company_org_code AS keyStr
bi.supervise_org_code AS keyStr
FROM
tzs_jg_use_registration T
tzs_jg_use_registration T,
tz_base_enterprise_info bi
WHERE
T.audit_status = '已完成' and T.is_delete = 0
and T.receive_company_org_code like concat(#{orgCode}, '%')
T.use_unit_credit_code = bi.use_unit_code
and T.audit_status = '已完成' and T.is_delete = 0
and bi.supervise_org_code like concat(#{orgCode}, '%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.reg_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.reg_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_org_code
GROUP BY bi.supervise_org_code
union all
SELECT
round(avg(T.audit_pass_date::date - T.reg_date::date + 1),1) as strValue,
pc.org_code AS keyStr
bi.supervise_org_code AS keyStr
FROM
tzs_jg_vehicle_information T,
privilege_company pc
tz_base_enterprise_info bi
WHERE
T.status = '已完成'
and t.receive_company_code = pc.company_code
and pc.org_code like concat(#{orgCode}, '%')
T.use_unit_credit_code = bi.use_unit_code
and T.status = '已完成'
and bi.supervise_org_code like concat(#{orgCode}, '%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.reg_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.reg_date as date),#{dto.endDate})
</if>
GROUP BY pc.org_code
GROUP BY bi.supervise_org_code
</select>
<select id="queryChangeAvgDayByReceiveCompany" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
SELECT
......@@ -768,16 +782,16 @@
FROM
(
SELECT
pc.org_code,
bi.supervise_org_code as org_code,
crn.apply_date,
crn.audit_pass_date
FROM
tzs_jg_change_registration_name crn,
privilege_company pc
tz_base_enterprise_info bi
WHERE
crn.receive_org_code = pc.company_code
crn.use_unit_credit_code = bi.use_unit_code
AND crn.audit_status = '已完成'
and pc.org_code like concat(#{orgCode}, '%')
and bi.supervise_org_code like concat(#{orgCode}, '%')
and crn.apply_date is not null
and crn.audit_pass_date is not null
<if test="dto.beginDate !=null and dto.beginDate !=''">
......@@ -791,12 +805,14 @@
union all
SELECT
round(avg(T.audit_pass_date::date - T.reg_date::date + 1),1) as strValue,
T.receive_company_org_code AS keyStr
bi.supervise_org_code AS keyStr
FROM
tzs_jg_change_registration_reform T
tzs_jg_change_registration_reform T,
tz_base_enterprise_info bi
WHERE
T.audit_status = '已完成'
and T.receive_company_org_code like concat(#{orgCode},'%')
T.use_unit_credit_code = bi.use_unit_code
and T.audit_status = '已完成'
and bi.supervise_org_code like concat(#{orgCode},'%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.reg_date as date),#{dto.beginDate})
</if>
......@@ -807,51 +823,57 @@
union all
SELECT
round(avg(T.audit_pass_date::date - T.reg_date::date + 1),1) as strValue,
T.receive_company_org_code AS keyStr
bi.supervise_org_code AS keyStr
FROM
tzs_jg_change_registration_transfer T
tzs_jg_change_registration_transfer T,
tz_base_enterprise_info bi
WHERE
T.audit_status = '已完成'
and T.receive_company_org_code like concat(#{orgCode},'%')
T.use_unit_credit_code = bi.use_unit_code
and T.audit_status = '已完成'
and bi.supervise_org_code like concat(#{orgCode},'%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.reg_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.reg_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_org_code
GROUP BY bi.supervise_org_code
union all
SELECT
round(avg(T.audit_pass_date::date - T.apply_date::date + 1),1) as strValue,
T.receive_company_org_code AS keyStr
bi.supervise_org_code AS keyStr
FROM
tzs_jg_change_registration_unit T
tzs_jg_change_registration_unit T,
tz_base_enterprise_info bi
WHERE
T.status = '已完成'
and T.receive_company_org_code like concat(#{orgCode},'%')
T.use_unit_credit_code = bi.use_unit_code
and T.status = '已完成'
and bi.supervise_org_code like concat(#{orgCode},'%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.apply_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.apply_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_org_code
GROUP BY bi.supervise_org_code
union all
SELECT
round(avg(T.audit_pass_date::date - T.apply_date::date + 1),1) as strValue,
T.receive_company_org_code AS keyStr
bi.supervise_org_code AS keyStr
FROM
tzs_jg_change_vehicle_registration_unit T
tzs_jg_change_vehicle_registration_unit T,
tz_base_enterprise_info bi
WHERE
T.status = '已完成'
and T.receive_company_org_code like concat(#{orgCode},'%')
T.use_unit_credit_code = bi.use_unit_code
and T.status = '已完成'
and bi.supervise_org_code like concat(#{orgCode},'%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.apply_date as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.apply_date as date),#{dto.endDate})
</if>
GROUP BY T.receive_company_org_code
GROUP BY bi.supervise_org_code
</select>
<select id="queryDisableAvgDayByReceiveCompany" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
SELECT
......@@ -861,16 +883,16 @@
(
SELECT
crn.sequence_nbr,
pc.org_code,
bi.supervise_org_code as org_code,
crn.audit_pass_date,
crn.apply_date
FROM
tzs_jg_enable_disable crn,
privilege_company pc
tz_base_enterprise_info bi
WHERE
crn.receive_company_code = pc.company_code
AND crn.audit_status = '已完成'
and pc.org_code like concat(#{orgCode}, '%')
crn.use_unit_credit_code = bi.use_unit_code
and crn.audit_status = '已完成'
and bi.supervise_org_code like concat(#{orgCode}, '%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.apply_date as date),#{dto.beginDate})
</if>
......@@ -889,16 +911,16 @@
(
SELECT
crn.sequence_nbr,
pc.org_code,
bi.supervise_org_code as org_code,
crn.audit_pass_date,
crn.create_date
FROM
tzs_jg_scrap_cancel crn,
privilege_company pc
tz_base_enterprise_info bi
WHERE
crn.receive_org_code = pc.company_code
crn.use_unit_code = bi.use_unit_code
AND crn.audit_status = '已完成'
and pc.org_code like concat(#{orgCode}, '%')
and bi.supervise_org_code like concat(#{orgCode}, '%')
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.create_date as date),#{dto.beginDate})
</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