南昌市物联网技防平台-学校版后台
Administrator
2021-06-10 5ca04497918f6491e49728a23c306bb88facb5cb
统计接口修改
2 files modified
14 ■■■■ changed files
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml 12 ●●●● patch | view | raw | blame | history
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/suser/mapper/SuserMapper.xml 2 ●●● patch | view | raw | blame | history
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
@@ -193,13 +193,13 @@
            and dtype=#{equipment.dtype}
        </if>
        <if test="dxtype!=null and dxtype == 0">
            and heartbeat &lt; DATE_SUB(NOW(),INTERVAL 1 DAY)  and dtype=0
            and  dtype=0
        </if>
        <if test="dxtype!=null and dxtype == 1">
            and heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=1
            and  dtype=1
        </if>
        <if test="dxtype!=null and dxtype == 2">
            and heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=2
            and  dtype=2
        </if>
        <if test="dxtype!=null and dxtype == 3">
            and dtype=3
@@ -454,12 +454,12 @@
    <!--查询设备在线数量-->
    <select id="selectEqCz" resultType="Integer">
        select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=1
        select COUNT(*) from sys_equipment where dtype=1
    </select>
    <!--查询设备掉线数量-->
    <select id="selectEqCd" resultType="Integer">
        select COUNT(*) from sys_equipment where heartbeat &lt; DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=0
        select COUNT(*) from sys_equipment where dtype=0
    </select>
    <!--查询预警设备数量-->
@@ -480,7 +480,7 @@
    <!--查询预警设备数量-->
    <select id="selectEqCys" resultType="Integer">
        select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=2
        select COUNT(*) from sys_equipment where dtype=2
    </select>
    <!--查询设故障数量-->
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/suser/mapper/SuserMapper.xml
@@ -120,7 +120,7 @@
    <!--查询业主总数-->
    <select id="selectSuserCount" resultType="java.lang.Integer">
       select count(*) from blade_tenant  where is_deleted=0 and tenant_id!="000000"
       select count(*) from jfpth0.blade_tenant  where is_deleted=0 and tenant_id!="000000"
    </select>
    <update id="updateUser">