南昌市物联网技防平台-后台
zengh
2021-03-10 fa9ffa9012d7b1df7692bb99e71be6592f48cd4b
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/jingdan/mapper/JingdanMapper.xml
@@ -25,9 +25,26 @@
        <result column="handletype" property="handletype"/>
    </resultMap>
    <select id="selectJingdanPage" resultMap="jingdanResultMap">
        select * from sys_jingdan where is_deleted = 0
        SELECT j.id,j.galarmPeople,j.phoneNumber,j.place,j.content,j.galarmTime,j.waringType,j.deviceNumber,j.type,
        j.handleP,j.handleTime,j.handName,j.level,ST_ASTEXT(j.coordinate) as coordinate,j.jd,j.wd,j.addvcd,j.rName,
        d.addvnm FROM sys_jingdan j LEFT JOIN sys_district d on d.addvcds=j.addvcd where 1=1
        <if test="jingdan.waringType!=null and jingdan.waringType!=''">
            and j.waringType=#{jingdan.waringType}
        </if>
        <if test="jingdan.beginTime!=null and jingdan.beginTime!=''">
            and j.galarmTime &gt;=#{jingdan.beginTime}
        </if>
        <if test="jingdan.endTime!=null and jingdan.endTime!=''">
            and j.galarmTime &lt;=#{jingdan.endTime}
        </if>
        <if test="jingdan.addvcd!=null and jingdan.addvcd!=''">
            and j.addvcd=#{jingdan.addvcd}
        </if>
        <if test="jingdan.type!=null and jingdan.type!=''">
            and j.type=#{jingdan.type}
        </if>
        ORDER BY j.type asc
    </select>
    <select id="selectList" resultMap="jingdanResultMap">
@@ -76,13 +93,13 @@
        </if>
    </select>
  <!--  <insert id="insert">
        insert into sys_jingdan(galarmPeople,phoneNumber,place,content,galarmTime,waringType,deviceNumber,type,
        handleP,handleTime,handName,level,coordinate,jd,wd,addvcd)
        values (#{galarmPeople},#{phoneNumber},#{place},#{content},#{galarmTime}
        ,#{waringType},#{deviceNumber},#{type},#{handleP},#{handleTime},
        #{handName},#{level},POINT(#{jd},#{wd}),#{jd},#{wd},#{addvcd})
    </insert>-->
<!--    <insert id="insert">-->
<!--        insert into sys_jingdan(galarmPeople,phoneNumber,place,content,galarmTime,waringType,deviceNumber,type,-->
<!--        handleP,handleTime,handName,level,coordinate,jd,wd,addvcd)-->
<!--        values (#{galarmPeople},#{phoneNumber},#{place},#{content},#{galarmTime}-->
<!--        ,#{waringType},#{deviceNumber},#{type},#{handleP},#{handleTime},-->
<!--        #{handName},#{level},POINT(#{jd},#{wd}),#{jd},#{wd},#{addvcd})-->
<!--    </insert>-->
    <sql id="key">
@@ -184,6 +201,9 @@
            <if test="level!=null and level!=''">
                #{level},
            </if>
            <if test="coordinate=null and coordinate=''">
                coordinate,
            </if>
            <if test="jd!=null and wd!=null">
                POINT(#{jd},#{wd}),
            </if>