<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nantian.cloud.dbcapp.mapper.record.CollectionMapper">



    <select id="getTotal" resultType="java.lang.Integer">

     SELECT COUNT(ID)  FROM  collectpoint where EntID in (

        select entid from t_enterprise_old where  1=1
        <if test="inde1 !=null">
         and   industryCode =#{inde1}
        </if>
        <if test="code !=null">
            and region_code like  CONCAT(#{code},'%')
        </if>


    )


    </select>

    <select id="getTotal2020" resultType="java.lang.Integer">

        select count(dataCode) from configure_data_collect where  enterpriseCode  in (
            SELECT enterpriseCode from enterprise_info where 1=1
            <if test="inde1 !=null">
                and   tid =#{inde1}
            </if>
            <if test="code !=null">
                and regionCode like  CONCAT(#{code},'%')
            </if>
         )

    </select>

</mapper>
