南昌市物联网技防平台-后台
zengh
2021-04-29 5d4210f4f6dff3341c1a034857bf8da6cd7cf692
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
@@ -202,12 +202,8 @@
        <if test="dxtype!=null and dxtype == 3">
            and heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and state!=null
        </if>
        <if test="childList!=null and childList.size>0">
            and deptId in
            <foreach collection="childList" index="index" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        <if test="pid!=null and pid!=''">
            and deptId like concat('%',#{pid},'%')
        </if>
    </select>
@@ -217,6 +213,11 @@
       INSERT INTO sys_equipment (deviceName,deviceNumber,deviceType,ownership,ownerId,devicestate,stime,coordinate,parent_id,jd,wd,addvcd,street,dtype) VALUES (#{deviceName},#{deviceNumber},#{deviceType},#{ownership},#{yname},#{devicestate},#{stime},POINT(#{jd},#{wd}),#{parentId},#{jd},#{wd},#{addvcd},#{streeName},#{dtype})
    </insert>
    <!--新增-->
    <insert id="saveImg" parameterType="org.springblade.jfpt.equipment.entity.Equipment">
       INSERT INTO sys_depl (deviceName,deviceNumber,contacts,calls,paddress,deploymentTime) VALUES (#{deviceName},#{deviceNumber},#{contacts},#{call},#{paddress},#{deploymentTime})
    </insert>
    <select id="tree" resultMap="treeNodeResultMap">
          select id, parent_id, deviceName as title, id as "value", id as "key" from sys_equipment
    </select>