From c0892e033a19c4a481db5d661df542e30cff3ce4 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Tue, 06 Apr 2021 14:31:16 +0800
Subject: [PATCH] 设备全查接口
---
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml | 29 ++++++++++++++++++++++-------
1 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
index 9046a9a..740fc3d 100644
--- a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
+++ b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/equipment/mapper/EquipmentMapper.xml
@@ -164,6 +164,10 @@
and dtype=#{equipment.dtype}
</if>
+ <if test="dxtype!=null">
+ and heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY)
+ </if>
+
<if test="childList!=null and childList.size>0">
and deptId in
<foreach collection="childList" index="index" item="item" open="(" separator="," close=")">
@@ -183,12 +187,20 @@
</select>
<select id="listAll" resultMap="equipmentResultMap">
- select id,deviceName,deviceNumber,deviceType,ownership,ownerId,devicestate,stime,dtype,heartbeat,expireTime,pay,
- parent_id,
- jd ,
- wd ,
- street,state,reason,
- addvcd,pay,expireTime from sys_equipment
+ select equipment.id,equipment.deviceName,equipment.deviceNumber,equipment.deviceType,equipment.ownership
+ ,equipment.ownerId,equipment.devicestate,equipment.stime,equipment.dtype,equipment.heartbeat,equipment.expireTime,
+ equipment.parent_id,equipment.district,equipment.province,equipment.city,equipment.serialNumber,equipment.channelNumber,
+ equipment.jd ,
+ equipment.wd ,
+ equipment.state,equipment.reason,
+ equipment.street,catalog.pid,
+ equipment.oneContacts,equipment.onePhone,equipment.oneId,
+ equipment.twoContacts,equipment.twoPhone,equipment.twoId,
+ equipment.ThreeContacts,equipment.ThreePhone,equipment.threeId,
+ equipment.deptId,
+ equipment.addvcd,equipment.pay,equipment.expireTime from sys_equipment equipment
+ left join sys_catalog catalog on catalog.eqid = equipment.deviceNumber
+ where 1=1
</select>
@@ -247,10 +259,13 @@
<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
--
Gitblit v1.9.3