Commit 35fd5b93 authored by suhuiguang's avatar suhuiguang

feat(jg):行政审批局

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