zengh
2021-01-15 58d92eba8c87fdc91abd928d1b5d3da5a9ef52e8
src/main/java/org/springblade/modules/equipment/mapper/EquipmentMapper.xml
@@ -59,7 +59,7 @@
    <select id="selectEquipmentPage" resultMap="equipmentResultMap">
        select id,deviceName,deviceNumber,deviceType,ownership,ownerId,devicestate,stime,ST_ASTEXT (coordinate ) AS
        coordinate,dtype,
        coordinate,dtype,heartbeat,expireTime,pay,
        parent_id,
        FORMAT( jd, 6 ) AS jd,
        FORMAT( wd, 6 ) AS wd,
@@ -79,7 +79,6 @@
        <if test="dtype!=null">
            and dtype=#{dtype}
        </if>
        and parent_id!=0
    </select>
    <!--新增-->
@@ -95,7 +94,8 @@
    <select id="lazyList" resultMap="deptVOResultMap">
        SELECT dept.id,dept.deviceName,dept.deviceNumber,dept.deviceType,dept.ownership,
        dept.ownerId,dept.devicestate,dept.stime,
        ST_ASTEXT(dept.coordinate) as coordinate,dept.dtype,dept.serialNumber,dept.stype,dept.channelNumber,dept.pay,dept.expireTime,dept.heartbeat,
        ST_ASTEXT(dept.coordinate) as
        coordinate,dept.dtype,dept.serialNumber,dept.stype,dept.channelNumber,dept.pay,dept.expireTime,dept.heartbeat,
        dept.parent_id,FORMAT(dept.jd,6) as jd,FORMAT(dept.wd,6) as wd,dept.street as
        streeName,u.yname,d.addvnm,dept.addvcd,
        (
@@ -136,6 +136,13 @@
    coordinate=POINT(#{jd},#{wd}),parent_id=#{parentId},jd=#{jd},wd=#{wd},addvcd=#{addvnm},street=#{streeName},dtype=#{dtype} where id=#{id}
    </update>
    <update id="updateClinent" parameterType="org.springblade.modules.equipment.entity.Equipment">
    update sys_equipment SET deviceName=#{deviceName},deviceNumber=#{deviceNumber},deviceType=#{deviceType},
    ownership=#{ownership},devicestate=#{devicestate},stime=#{stime},
    addvcd=#{addvcd},street=#{street},dtype=#{dtype},pay=#{pay},expireTime=#{expireTime},heartbeat=#{heartbeat} where id=#{id}
    </update>
    <update id="updataType">
        update sys_equipment SET devicestate = 1 where id in (${arr})
    </update>
@@ -156,7 +163,7 @@
        SELECT
        dept.id,dept.deviceName,dept.deviceNumber,dept.deviceType,dept.ownership,
        dept.ownerId,dept.devicestate,dept.stime,
        ST_ASTEXT(dept.coordinate) as coordinate,dept.dtype,
        ST_ASTEXT(dept.coordinate) as coordinate,dept.dtype,dept.expireTime,dept.heartbeat,
        dept.parent_id,dept.jd,dept.wd,dept.street as streeName,u.yname,d.addvnm,dept.addvcd,
        (
        SELECT