南昌市物联网技防平台-后台
zengh
2021-04-23 670bc85ba8468dbe9a427abc54f2bca9d4e71749
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
@@ -79,7 +79,7 @@
        LEFT JOIN (
        SELECT
        count( id ) AS jtype,
        deviceNumber
        deviceNumber as deviceN
        FROM
        sys_alarm
        WHERE
@@ -88,7 +88,7 @@
        OR jtype = 1
        GROUP BY
        deviceNumber
        ) alarm ON alarm.deviceNumber = equipment.deviceNumber
        ) alarm ON alarm.deviceN = equipment.deviceNumber
        where 1=1
        <if test="equipment.deviceName!=null">
@@ -148,7 +148,7 @@
        LEFT JOIN (
        SELECT
        count( id ) AS jtype,
        deviceNumber
        deviceNumber as deviceN
        FROM
        sys_alarm
        WHERE
@@ -157,7 +157,7 @@
        OR jtype = 1
        GROUP BY
        deviceNumber
        ) alarm ON alarm.deviceNumber = equipment.deviceNumber
        ) alarm ON alarm.deviceN = equipment.deviceNumber
        where 1=1
        <if test="equipment.deviceName!=null">
@@ -217,6 +217,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>
@@ -267,7 +272,7 @@
        LEFT JOIN (
        SELECT
        count( id ) AS jtype,
        deviceNumber
        deviceNumber as deviceN
        FROM
        sys_alarm
        WHERE
@@ -276,7 +281,7 @@
        OR jtype = 1
        GROUP BY
        deviceNumber
        ) alarm ON alarm.deviceNumber = equipment.deviceNumber
        ) alarm ON alarm.deviceN = equipment.deviceNumber
        WHERE
        1 =1