Commit 0a274c95 authored by suhuiguang's avatar suhuiguang

1.4色管安全:企业统计、设备统计之前未明确需求进行开发

parent 968361b4
......@@ -28,4 +28,8 @@ public interface ZLStatisticsMapper {
String getOrgCodeByCompanyCode(@Param("cityCode") String cityCode);
List<Map<String, String>> userCountNew(@Param("screenDto") DPFilterParamDto screenDto, @Param("unitTypeList") List<String> unitTypeList);
Long countCompanyForCertDateTimeOut(@Param("dto") DPFilterParamDto dpFilterParamDto, @Param("orgCode") String orgCode, @Param("limitDate") String limitDate);
Long countCompanyForCertDateTemporary(@Param("dto")DPFilterParamDto dpFilterParamDto, @Param("orgCode") String orgCode, @Param("limitDate") String limitDate);
}
......@@ -69,7 +69,34 @@
</foreach>
</if>
</select>
<sql id="countCompanyNumber">
select
count(1)
from
(
SELECT
(select min(l.expiry_date) from tz_base_unit_licence l where l.unit_code = b.use_unit_code) as expiry_date
FROM
"tz_base_enterprise_info" b
where
1=1
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
and operating_status = '在业'
and register_type !='个人主体'
and expiry_date is not null
) a
</sql>
<select id="countCompanyForCertDateTimeOut" resultType="java.lang.Long">
<include refid="countCompanyNumber"/>
where
a.expiry_date <![CDATA[<]]> #{limitDate}
</select>
<select id="countCompanyForCertDateTemporary" resultType="java.lang.Long">
<include refid="countCompanyNumber"/>
where
a.expiry_date >= current_date
and a.expiry_date <![CDATA[<=]]> #{limitDate}
</select>
</mapper>
......@@ -224,6 +224,7 @@
1=1
and ((supervise_org_code != '50' and supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (supervise_org_code = '50' and office_region LIKE CONCAT ('%', #{cityCode}, '%')))
and operating_status = #{operatingStatus}
and register_type !='个人主体'
</select>
<select id="queryByUseCode" resultType="com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto">
select * from tz_base_enterprise_info where use_code in
......
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