| | |
| | | <result column="pay" property="pay"/> |
| | | <result column="expireTime" property="expireTime"/> |
| | | <result column="heartbeat" property="heartbeat"/> |
| | | <result column="province" property="province"/> |
| | | <result column="city" property="city"/> |
| | | <result column="district" property="district"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode"> |
| | |
| | | select id,deviceName,deviceNumber,deviceType,ownership,ownerId,devicestate,stime,ST_ASTEXT (coordinate ) AS |
| | | coordinate,dtype,heartbeat,expireTime,pay, |
| | | parent_id, |
| | | FORMAT( jd, 6 ) AS jd, |
| | | FORMAT( wd, 6 ) AS wd, |
| | | jd , |
| | | wd , |
| | | street, |
| | | addvcd,pay,expireTime from sys_equipment where 1=1 |
| | | <if test="deviceName!=null"> |
| | | and (deviceName like concat('%',#{deviceName},'%') or deviceNumber like |
| | | concat('%',#{deviceName},'%')) |
| | | <if test="equipment.deviceName!=null"> |
| | | and (deviceName like concat('%',#{equipment.deviceName},'%') or deviceNumber like |
| | | concat('%',#{equipment.deviceName},'%')) |
| | | </if> |
| | | <if test="addvcd!=null"> |
| | | and addvcd=#{addvcd} |
| | | <if test="equipment.addvcd!=null"> |
| | | and addvcd=#{equipment.addvcd} |
| | | </if> |
| | | <if test="devicestate!=null"> |
| | | and devicestate =#{devicestate} |
| | | <if test="equipment.devicestate!=null"> |
| | | and devicestate =#{equipment.devicestate} |
| | | </if> |
| | | |
| | | <if test="dtype!=null"> |
| | | and dtype=#{dtype} |
| | | <if test="equipment.dtype!=null"> |
| | | and dtype=#{equipment.dtype} |
| | | </if> |
| | | </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.expireTime,dept.heartbeat, |
| | | dept.parent_id,dept.jd,dept.wd,dept.street as streeName,u.yname,d.addvnm,dept.addvcd, |
| | | dept.parent_id,dept.jd,dept.wd,dept.street,u.yname,d.addvnm,dept.addvcd, |
| | | ( |
| | | SELECT |
| | | CASE WHEN count(1) > 0 THEN 1 ELSE 0 END |
| | |
| | | dept.wd, |
| | | dept.street AS streeName, |
| | | u.yname, |
| | | d.addvnm, |
| | | dept.addvcd |
| | | dept.addvcd, |
| | | dept.province, |
| | | dept.city, |
| | | dept.district |
| | | FROM |
| | | sys_equipment dept |
| | | LEFT JOIN sys_suser u ON u.ynumber = dept.ownerId |
| | | LEFT JOIN sys_district d ON d.addvcds = dept.addvcd |
| | | LEFT JOIN sys_street s ON s.id = dept.street WHERE dept.deviceNumber=#{deviceNumber} |
| | | </select> |
| | | |