<?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.njcn.device.pq.mapper.LargeScreenMapper">

    <!--查询监测点新增个数-->
    <select id="getMonitorAddCount" resultType="java.util.Map">
        select
        count(1) as count
        from pq_line pl
        where
        pl.id in
        <foreach collection="lineIds" item="item" open="(" close=")" separator=",">
            #{item}
        </foreach>
        <if test="startTime != null and startTime != ''">
            and date_format(pl.Create_Time,'%y%m%d') &gt;= date_format(#{startTime},'%y%m%d')
        </if>
        <if test="endTime != null and endTime != ''">
            and date_format(pl.Create_Time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
        </if>
    </select>

    <select id="getRunTime" resultType="com.njcn.device.pq.pojo.vo.OldTimeVO">
        SELECT Login_Time "oldDate"  FROM pq_device
        order by Login_Time limit 1
    </select>
</mapper>
