Commit 431ca8a4 authored by suhuiguang's avatar suhuiguang

1.大屏-区域安全指数接口优重写初稿

parent 0327b460
...@@ -13,4 +13,11 @@ import org.apache.ibatis.annotations.Param; ...@@ -13,4 +13,11 @@ import org.apache.ibatis.annotations.Param;
public interface CylinderStatisticsMapper { public interface CylinderStatisticsMapper {
Long countEnterpriseNumForCylinder(@Param("orgCode") String orgCode); Long countEnterpriseNumForCylinder(@Param("orgCode") String orgCode);
/**
* 按照管辖维度,统计充装单位使用登记证的办理率
* @param orgCode 区域对应的单位orgCode
* @return 办理率*100
*/
String queryUserRegisterCertAppPercent(@Param("orgCode") String orgCode);
} }
...@@ -10,4 +10,25 @@ ...@@ -10,4 +10,25 @@
unit_type LIKE'%充装单位%' unit_type LIKE'%充装单位%'
and supervise_org_code like concat(#{orgCode},'%') and supervise_org_code like concat(#{orgCode},'%')
</select> </select>
<select id="queryUserRegisterCertAppPercent" resultType="java.lang.String">
select
case when s2.total= 0 then 0 else round(s1.num/s2.total * 100, 2) end as percent
from
(SELECT
count(DISTINCT(a.use_unit_credit_code)) as num
FROM
"tzs_jg_use_registration_manage" a,
privilege_company c
where
a.receive_company_code = c.company_code
and a.certificate_status='已登记'
and c.org_code like concat(#{orgCode},'%')) s1,
(SELECT
count(1) as total
FROM "tz_base_enterprise_info"
where
unit_type LIKE'%充装单位%'
and supervise_org_code like concat(#{orgCode},'%')
) s2
</select>
</mapper> </mapper>
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