Commit 35fd5b93 authored by suhuiguang's avatar suhuiguang

feat(jg):行政审批局

1.大屏统计办理时效统计,统计维度由接收机构的单位orgcode调整为使用单位的管辖和使用办理的设备数情况统计保持一致
parent b543cce1
......@@ -103,4 +103,9 @@ public class DPFilterParamDto {
* 监管机构组织机构代码
*/
private String superviseOrgCode;
/**
* 区域下的所有单位监管、行政审批(地市、区县级)
*/
private List<String> companyCodes;
}
......@@ -72,6 +72,13 @@ public interface JGStatisticsMapper {
List<Map<String, Object>> selectNoticeCountTopTen(@Param("orgCode") String orgCode, @Param("time") String time);
/**
* 告知类业务平均办理时效,统计维度:接收机构所在的行政区域;
* 由于告知类,接收机构为监管机构,receive_company_org_code为监管机构的orgCode,故还保持使用receive_company_org_code匹配orgCode即可
* @param dpFilterParamDto 过滤条件
* @param orgCode 登录人或者选择区域转换后的orgCode
* @return 告知类业务平均办理时效
*/
List<CountDto> queryNoticeAvgDayByReceiveCompany(@Param("dto") DPFilterParamDto dpFilterParamDto, @Param("orgCode") String orgCode);
List<CountDto> queryUseAvgDayByReceiveCompany(@Param("dto") DPFilterParamDto dpFilterParamDto, @Param("orgCode") String orgCode);
......
......@@ -665,16 +665,15 @@
COUNT DESC
limit 10
</select>
<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,
bi.supervise_org_code AS keyStr
T.receive_company_org_code AS keyStr
FROM
tzs_jg_installation_notice T,
tz_base_enterprise_info bi
tzs_jg_installation_notice T
WHERE
T.use_unit_credit_code = bi.use_unit_code
and T.notice_status = 6616
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})
......@@ -682,17 +681,15 @@
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY bi.supervise_org_code
GROUP BY T.receive_company_org_code
union all
SELECT
round(avg(T.accept_date::date - T.notice_date::date + 1),1) as strValue,
bi.supervise_org_code AS keyStr
T.receive_company_org_code AS keyStr
FROM
tzs_jg_maintain_notice T,
tz_base_enterprise_info bi
tzs_jg_maintain_notice T
WHERE
T.use_unit_credit_code = bi.use_unit_code
and T.notice_status = 6616
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})
......@@ -700,17 +697,15 @@
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY bi.supervise_org_code
GROUP BY T.receive_company_org_code
union all
SELECT
round(avg(T.accept_date::date - T.notice_date::date + 1),1) as strValue,
bi.supervise_org_code AS keyStr
T.receive_company_org_code AS keyStr
FROM
tzs_jg_reform_notice T,
tz_base_enterprise_info bi
tzs_jg_reform_notice T
WHERE
T.use_unit_credit_code = bi.use_unit_code
and T.notice_status = 6616
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})
......@@ -718,17 +713,15 @@
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY bi.supervise_org_code
GROUP BY T.receive_company_org_code
union all
SELECT
round(avg(T.handle_date::date - T.notice_date::date + 1),1) as strValue,
bi.supervise_org_code AS keyStr
T.receive_company_org_code AS keyStr
FROM
tzs_jg_transfer_notice T,
tz_base_enterprise_info bi
tzs_jg_transfer_notice T
WHERE
T.use_unit_credit_code = bi.use_unit_code
and T.notice_status = 6616
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})
......@@ -736,19 +729,28 @@
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.notice_date as date),#{dto.endDate})
</if>
GROUP BY bi.supervise_org_code
GROUP BY T.receive_company_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,
bi.supervise_org_code AS keyStr
T.receive_company_code AS keyStr
FROM
tzs_jg_use_registration T,
tz_base_enterprise_info bi
tzs_jg_use_registration T
WHERE
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}, '%')
T.audit_status = '已完成' and T.is_delete = 0
<choose>
<when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
and T.receive_company_code = ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</otherwise>
</choose>
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.reg_date as date),#{dto.beginDate})
</if>
......@@ -759,14 +761,23 @@
union all
SELECT
round(avg(T.audit_pass_date::date - T.reg_date::date + 1),1) as strValue,
bi.supervise_org_code AS keyStr
T.receive_company_code AS keyStr
FROM
tzs_jg_vehicle_information T,
tz_base_enterprise_info bi
tzs_jg_vehicle_information T
WHERE
T.use_unit_credit_code = bi.use_unit_code
and T.status = '已完成'
and bi.supervise_org_code like concat(#{orgCode}, '%')
T.status = '已完成'
<choose>
<when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
and T.receive_company_code = ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</otherwise>
</choose>
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.reg_date as date),#{dto.beginDate})
</if>
......@@ -777,21 +788,24 @@
</select>
<select id="queryChangeAvgDayByReceiveCompany" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
SELECT
round(avg(T.audit_pass_date::date - T.apply_date::date + 1),1) as strValue,
T.org_code AS keyStr
FROM
(
SELECT
bi.supervise_org_code as org_code,
crn.apply_date,
crn.audit_pass_date
round(avg(crn.audit_pass_date::date - crn.apply_date::date + 1),1) as strValue,
crn.receive_company_code AS keyStr
FROM
tzs_jg_change_registration_name crn,
tz_base_enterprise_info bi
tzs_jg_change_registration_name crn
WHERE
crn.use_unit_credit_code = bi.use_unit_code
AND crn.audit_status = '已完成'
and bi.supervise_org_code like concat(#{orgCode}, '%')
crn.audit_status = '已完成'
<choose>
<when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
and crn.receive_company_code = ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</otherwise>
</choose>
and crn.apply_date is not null
and crn.audit_pass_date is not null
<if test="dto.beginDate !=null and dto.beginDate !=''">
......@@ -800,18 +814,15 @@
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(crn.apply_date as date),#{dto.endDate})
</if>
) T
GROUP BY T.org_code
GROUP BY crn.receive_company_code
union all
SELECT
round(avg(T.audit_pass_date::date - T.reg_date::date + 1),1) as strValue,
bi.supervise_org_code AS keyStr
T.receive_company_code AS keyStr
FROM
tzs_jg_change_registration_reform T,
tz_base_enterprise_info bi
tzs_jg_change_registration_reform T
WHERE
T.use_unit_credit_code = bi.use_unit_code
and T.audit_status = '已完成'
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})
......@@ -823,76 +834,112 @@
union all
SELECT
round(avg(T.audit_pass_date::date - T.reg_date::date + 1),1) as strValue,
bi.supervise_org_code AS keyStr
T.receive_company_code AS keyStr
FROM
tzs_jg_change_registration_transfer T,
tz_base_enterprise_info bi
tzs_jg_change_registration_transfer T
WHERE
T.use_unit_credit_code = bi.use_unit_code
and T.audit_status = '已完成'
and bi.supervise_org_code like concat(#{orgCode},'%')
T.audit_status = '已完成'
<choose>
<when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
and T.receive_company_code = ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</otherwise>
</choose>
<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 bi.supervise_org_code
GROUP BY T.receive_company_code
union all
SELECT
round(avg(T.audit_pass_date::date - T.apply_date::date + 1),1) as strValue,
bi.supervise_org_code AS keyStr
T.receive_org_code AS keyStr
FROM
tzs_jg_change_registration_unit T,
tz_base_enterprise_info bi
tzs_jg_change_registration_unit T
WHERE
T.use_unit_credit_code = bi.use_unit_code
and T.status = '已完成'
and bi.supervise_org_code like concat(#{orgCode},'%')
T.status = '已完成'
<choose>
<when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
and T.receive_org_code = ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</otherwise>
</choose>
<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 bi.supervise_org_code
GROUP BY T.receive_org_code
union all
SELECT
round(avg(T.audit_pass_date::date - T.apply_date::date + 1),1) as strValue,
bi.supervise_org_code AS keyStr
T.receive_org_code AS keyStr
FROM
tzs_jg_change_vehicle_registration_unit T,
tz_base_enterprise_info bi
tzs_jg_change_vehicle_registration_unit T
WHERE
T.use_unit_credit_code = bi.use_unit_code
and T.status = '已完成'
and bi.supervise_org_code like concat(#{orgCode},'%')
T.status = '已完成'
<choose>
<when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
and T.receive_org_code = ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</otherwise>
</choose>
<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 bi.supervise_org_code
GROUP BY T.receive_org_code
</select>
<select id="queryDisableAvgDayByReceiveCompany" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
SELECT
round(avg(T.audit_pass_date::date - T.apply_date::date + 1),1) as strValue,
T.org_code AS keyStr
T.receive_company_code AS keyStr
FROM
(
SELECT
crn.sequence_nbr,
bi.supervise_org_code as org_code,
crn.receive_org_code,
crn.audit_pass_date,
crn.apply_date
FROM
tzs_jg_enable_disable crn,
tz_base_enterprise_info bi
WHERE
crn.use_unit_credit_code = bi.use_unit_code
and crn.audit_status = '已完成'
and bi.supervise_org_code like concat(#{orgCode}, '%')
tzs_jg_enable_disable crn
WHERE
crn.audit_status = '已完成'
<choose>
<when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
and crn.receive_company_code = ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</otherwise>
</choose>
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.apply_date as date),#{dto.beginDate})
</if>
......@@ -901,26 +948,35 @@
</if>
) T
GROUP BY
T.org_code
T.receive_company_code
</select>
<select id="queryCancelAvgDayByReceiveCompany" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
SELECT
round(avg(T.audit_pass_date::date - T.create_date::date + 1),1) as strValue,
T.org_code AS keyStr
T.receive_company_code AS keyStr
FROM
(
SELECT
crn.sequence_nbr,
bi.supervise_org_code as org_code,
crn.receive_org_code as receive_company_code,
crn.audit_pass_date,
crn.create_date
FROM
tzs_jg_scrap_cancel crn,
tz_base_enterprise_info bi
WHERE
crn.use_unit_code = bi.use_unit_code
AND crn.audit_status = '已完成'
and bi.supervise_org_code like concat(#{orgCode}, '%')
tzs_jg_scrap_cancel crn
WHERE
crn.audit_status = '已完成'
<choose>
<when test='dto.cityCode != null and dto.cityCode == "610000"'>
and 1=1
</when>
<otherwise>
and crn.receive_company_code = ANY(ARRAY[
<foreach collection="dto.companyCodes" item="companyCode" separator=",">
#{companyCode}
</foreach>
])
</otherwise>
</choose>
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.create_date as date),#{dto.beginDate})
</if>
......@@ -928,7 +984,7 @@
and date_le(CAST(T.create_date as date),#{dto.endDate})
</if>
) T
GROUP BY T.org_code
GROUP BY T.receive_company_code
</select>
<select id="selectAZNoticeDetailList" resultType="java.util.Map">
SELECT
......
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