南昌市物联网技防平台-后台
tangzy
2021-03-26 afda08833e460a40a2d4e509f9df9d809c6f8f31
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
@@ -244,20 +244,16 @@
        update sys_equipment SET devicestate = 0 where id in (${arr})
    </update>
    <update id="updateOnes" parameterType="org.springblade.jfpt.equipment.entity.Equipment">
    update sys_equipment SET deviceName=#{deviceName},deviceNumber=#{deviceNumber},deviceType=#{deviceType},
    ownership=#{ownership},ownerId=#{yname},devicestate=#{devicestate},stime=#{stime},
    coordinate=POINT(#{jd},#{wd}),parent_id=#{parentId},jd=#{jd},wd=#{wd},addvcd=#{addvnm},street=#{streeName},dtype=#{dtype} where id=#{id}
</update>
    <select id="selectInfo" resultMap="deptVOResultMap"
            parameterType="org.springblade.jfpt.equipment.entity.Equipment">
        SELECT
        dept.id,dept.deviceName,dept.deviceNumber,dept.deviceType,dept.ownership,
        dept.deptId,dept.id,dept.deviceName,dept.deviceNumber,dept.deviceType,dept.ownership,
        dept.ownerId,dept.devicestate,dept.stime,dept.district,dept.province,dept.city,
        ST_ASTEXT(dept.coordinate) as coordinate,dept.dtype,dept.expireTime,dept.heartbeat, dept.state,dept.reason,
        dept.parent_id,dept.jd,dept.wd,dept.street,u.yname,d.addvnm,dept.addvcd,dept.serialNumber,dept.channelNumber,
        dept.oneContacts,dept.onePhone,dept.oneId,
        dept.twoContacts,dept.twoPhone,dept.twoId,
        dept.ThreeContacts,dept.ThreePhone,dept.threeId,
        (
        SELECT
        CASE WHEN count(1) > 0 THEN 1 ELSE 0 END